diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ir.cc | 4 | ||||
-rw-r--r-- | src/ir.h | 7 | ||||
-rw-r--r-- | src/literal.cc | 16 | ||||
-rw-r--r-- | src/prebuilt/wast-lexer-gen.cc | 9052 | ||||
-rw-r--r-- | src/prebuilt/wast-parser-gen.cc | 2908 | ||||
-rw-r--r-- | src/prebuilt/wast-parser-gen.hh | 4 | ||||
-rw-r--r-- | src/prebuilt/wast-parser-gen.output | 5760 | ||||
-rw-r--r-- | src/wast-lexer.cc | 68 | ||||
-rw-r--r-- | src/wast-parser-lexer-shared.cc | 34 | ||||
-rw-r--r-- | src/wast-parser-lexer-shared.h | 75 | ||||
-rw-r--r-- | src/wast-parser.y | 1086 | ||||
-rw-r--r-- | src/wat-writer.cc | 2 |
12 files changed, 9641 insertions, 9375 deletions
@@ -599,7 +599,9 @@ void destroy_table(Table* table) { destroy_string_slice(&table->name); } -ModuleField::ModuleField() : type(ModuleFieldType::Start), next(nullptr) { +ModuleField::ModuleField() : ModuleField(ModuleFieldType::Start) {} + +ModuleField::ModuleField(ModuleFieldType type) : type(type), next(nullptr) { WABT_ZERO_MEMORY(loc); WABT_ZERO_MEMORY(start); } @@ -269,9 +269,9 @@ struct Import { StringSlice field_name; ExternalKind kind; union { - /* an imported func is has the type Func so it can be more easily - * included in the Module's vector of funcs; but only the - * FuncDeclaration will have any useful information */ + // An imported func has the type Func so it can be more easily included in + // the Module's vector of funcs, but only the FuncDeclaration will have any + // useful information. Func* func; Table* table; Memory* memory; @@ -305,6 +305,7 @@ enum class ModuleFieldType { struct ModuleField { WABT_DISALLOW_COPY_AND_ASSIGN(ModuleField); ModuleField(); + explicit ModuleField(ModuleFieldType); ~ModuleField(); Location loc; diff --git a/src/literal.cc b/src/literal.cc index 8e025ace..1e1d1d99 100644 --- a/src/literal.cc +++ b/src/literal.cc @@ -376,7 +376,7 @@ static void parse_float_infinity(const char* s, } else if (*s == '+') { s++; } - assert(string_starts_with(s, end, "inf")); // Could be inf or infinity. + assert(string_starts_with(s, end, "inf")); *out_bits = make_float(is_neg, F32_MAX_EXP, 0); } @@ -428,7 +428,7 @@ void write_float_hex(char* out, size_t size, uint32_t bits) { /* 1234567890123456 */ /* -0x#.######p-### */ /* -nan:0x###### */ - /* -infinity */ + /* -inf */ char buffer[WABT_MAX_FLOAT_HEX]; char* p = buffer; bool is_neg = (bits >> F32_SIGN_SHIFT); @@ -440,8 +440,8 @@ void write_float_hex(char* out, size_t size, uint32_t bits) { if (exp == F32_MAX_EXP) { /* infinity or nan */ if (sig == 0) { - strcpy(p, "infinity"); - p += 8; + strcpy(p, "inf"); + p += 3; } else { strcpy(p, "nan"); p += 3; @@ -716,7 +716,7 @@ static void parse_double_infinity(const char* s, } else if (*s == '+') { s++; } - assert(string_starts_with(s, end, "inf")); // Could be inf or infinity. + assert(string_starts_with(s, end, "inf")); *out_bits = make_double(is_neg, F64_MAX_EXP, 0); } @@ -769,7 +769,7 @@ void write_double_hex(char* out, size_t size, uint64_t bits) { /* 123456789012345678901234 */ /* -0x#.#############p-#### */ /* -nan:0x############# */ - /* -infinity */ + /* -inf */ char buffer[WABT_MAX_DOUBLE_HEX]; char* p = buffer; bool is_neg = (bits >> F64_SIGN_SHIFT); @@ -781,8 +781,8 @@ void write_double_hex(char* out, size_t size, uint64_t bits) { if (exp == F64_MAX_EXP) { /* infinity or nan */ if (sig == 0) { - strcpy(p, "infinity"); - p += 8; + strcpy(p, "inf"); + p += 3; } else { strcpy(p, "nan"); p += 3; diff --git a/src/prebuilt/wast-lexer-gen.cc b/src/prebuilt/wast-lexer-gen.cc index 4cf69ccf..8f249385 100644 --- a/src/prebuilt/wast-lexer-gen.cc +++ b/src/prebuilt/wast-lexer-gen.cc @@ -50,18 +50,20 @@ YY_USER_ACTION; \ wast_parser_error(loc, this, parser, __VA_ARGS__) -#define BEGIN(c) \ - do { \ - cond = c; \ - } while (0) -#define FILL(n) \ - do { \ - if (WABT_FAILED(Fill(loc, parser, n))) { \ - RETURN(EOF); \ - continue; \ - } \ +#define BEGIN(c) cond = (c) +#define FILL(n) \ + do { \ + if (WABT_FAILED(Fill(loc, parser, (n)))) { \ + RETURN(EOF); \ + } \ } while (0) +#define MAYBE_MALFORMED_UTF8(desc) \ + if (!(eof_ && limit_ - cursor_ <= YYMAXFILL)) { \ + ERROR("malformed utf-8%s", desc); \ + } \ + continue + #define yytext (token_) #define yyleng (cursor_ - token_) @@ -176,7 +178,8 @@ Result WastLexer::Fill(Location* loc, WastParser* parser, size_t need) { // http://re2c.org/examples/example_03.html. if (limit_ < buffer_ + buffer_size_ - YYMAXFILL) { eof_ = true; - memset(limit_, 0, YYMAXFILL); + // Fill with 0xff, since that is an invalid utf-8 byte. + memset(limit_, 0xff, YYMAXFILL); limit_ += YYMAXFILL; } return Result::Ok; @@ -194,9 +197,10 @@ int WastLexer::GetToken(Token* lval, Location* loc, WastParser* parser) { for (;;) { token_ = cursor_; -#line 198 "src/prebuilt/wast-lexer-gen.cc" +#line 201 "src/prebuilt/wast-lexer-gen.cc" { unsigned char yych; + unsigned int yyaccept = 0; if (cond < 2) { if (cond < 1) { goto YYCOND_i; @@ -212,155 +216,313 @@ int WastLexer::GetToken(Token* lval, Location* loc, WastParser* parser) { } /* *********************************** */ YYCOND_BAD_TEXT: - if ((limit_ - cursor_) < 3) FILL(3); + if ((limit_ - cursor_) < 5) FILL(5); yych = *cursor_; - if (yych <= '!') { - if (yych <= '\t') { - if (yych >= 0x01) goto yy5; + if (yych <= 0x7F) { + if (yych <= '!') { + if (yych == '\n') goto yy5; + if (yych >= ' ') goto yy7; } else { - if (yych <= '\n') goto yy7; - if (yych <= 0x1F) goto yy5; - goto yy9; + if (yych <= '"') goto yy9; + if (yych == '\\') goto yy11; + goto yy7; } } else { - if (yych <= '\\') { - if (yych <= '"') goto yy11; - if (yych <= '[') goto yy9; - goto yy13; + if (yych <= 0xEF) { + if (yych <= 0xC1) goto yy12; + if (yych <= 0xDF) goto yy14; + if (yych <= 0xE0) goto yy15; + goto yy16; } else { - if (yych == 0x7F) goto yy5; - goto yy9; + if (yych <= 0xF0) goto yy17; + if (yych <= 0xF3) goto yy18; + if (yych <= 0xF4) goto yy19; + goto yy12; } } ++cursor_; -#line 249 "src/wast-lexer.cc" - { ERROR("unexpected EOF"); RETURN(EOF); } -#line 239 "src/prebuilt/wast-lexer-gen.cc" -yy5: - ++cursor_; -yy6: -#line 250 "src/wast-lexer.cc" +yy4: +#line 251 "src/wast-lexer.cc" { ERROR("illegal character in string"); continue; } -#line 246 "src/prebuilt/wast-lexer-gen.cc" -yy7: +#line 249 "src/prebuilt/wast-lexer-gen.cc" +yy5: ++cursor_; BEGIN(YYCOND_i); -#line 242 "src/wast-lexer.cc" +#line 244 "src/wast-lexer.cc" { ERROR("newline in string"); NEWLINE; continue; } -#line 254 "src/prebuilt/wast-lexer-gen.cc" -yy9: +#line 257 "src/prebuilt/wast-lexer-gen.cc" +yy7: ++cursor_; -#line 241 "src/wast-lexer.cc" +#line 243 "src/wast-lexer.cc" { continue; } -#line 259 "src/prebuilt/wast-lexer-gen.cc" -yy11: +#line 262 "src/prebuilt/wast-lexer-gen.cc" +yy9: ++cursor_; BEGIN(YYCOND_i); -#line 248 "src/wast-lexer.cc" +#line 250 "src/wast-lexer.cc" { TEXT; RETURN(TEXT); } -#line 265 "src/prebuilt/wast-lexer-gen.cc" -yy13: - yych = *++cursor_; - if (yych <= '@') { - if (yych <= '"') { - if (yych == '\n') goto yy6; - if (yych >= '"') goto yy9; +#line 268 "src/prebuilt/wast-lexer-gen.cc" +yy11: + yyaccept = 0; + yych = *(marker_ = ++cursor_); + if (yych <= 'f') { + if (yych <= '/') { + if (yych <= '!') { + if (yych == '\n') goto yy4; + goto yy20; + } else { + if (yych <= '"') goto yy7; + if (yych == '\'') goto yy7; + goto yy20; + } } else { - if (yych <= '\'') { - if (yych >= '\'') goto yy9; + if (yych <= 'F') { + if (yych <= '9') goto yy22; + if (yych <= '@') goto yy20; + goto yy22; } else { - if (yych <= '/') goto yy14; - if (yych <= '9') goto yy16; + if (yych == '\\') goto yy7; + if (yych <= '`') goto yy20; + goto yy22; } } } else { - if (yych <= 'f') { - if (yych <= '[') { - if (yych <= 'F') goto yy16; + if (yych <= 0x7F) { + if (yych <= 'q') { + if (yych == 'n') goto yy7; + goto yy20; } else { - if (yych <= '\\') goto yy9; - if (yych >= 'a') goto yy16; + if (yych == 's') goto yy20; + if (yych <= 't') goto yy7; + goto yy20; } } else { - if (yych <= 'n') { - if (yych >= 'n') goto yy9; + if (yych <= 0xEF) { + if (yych <= 0xC1) goto yy4; + if (yych <= 0xDF) goto yy23; + if (yych <= 0xE0) goto yy25; + goto yy26; } else { - if (yych == 't') goto yy9; + if (yych <= 0xF0) goto yy27; + if (yych <= 0xF3) goto yy28; + if (yych <= 0xF4) goto yy29; + goto yy4; } } } -yy14: +yy12: ++cursor_; +yy13: +#line 253 "src/wast-lexer.cc" + { MAYBE_MALFORMED_UTF8(" in string"); } +#line 322 "src/prebuilt/wast-lexer-gen.cc" +yy14: + yych = *++cursor_; + if (yych <= 0x7F) goto yy13; + if (yych <= 0xBF) goto yy7; + goto yy13; yy15: -#line 245 "src/wast-lexer.cc" + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x9F) goto yy13; + if (yych <= 0xBF) goto yy30; + goto yy13; +yy16: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy13; + if (yych <= 0xBF) goto yy30; + goto yy13; +yy17: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x8F) goto yy13; + if (yych <= 0xBF) goto yy31; + goto yy13; +yy18: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy13; + if (yych <= 0xBF) goto yy31; + goto yy13; +yy19: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy13; + if (yych <= 0x8F) goto yy31; + goto yy13; +yy20: + ++cursor_; +yy21: +#line 247 "src/wast-lexer.cc" { ERROR("bad escape \"%.*s\"", static_cast<int>(yyleng), yytext); continue; } -#line 303 "src/prebuilt/wast-lexer-gen.cc" -yy16: - ++cursor_; - if ((yych = *cursor_) <= '@') { - if (yych <= '/') goto yy15; - if (yych <= '9') goto yy9; - goto yy15; +#line 365 "src/prebuilt/wast-lexer-gen.cc" +yy22: + yych = *++cursor_; + if (yych <= '@') { + if (yych <= '/') goto yy21; + if (yych <= '9') goto yy7; + goto yy21; } else { - if (yych <= 'F') goto yy9; - if (yych <= '`') goto yy15; - if (yych <= 'f') goto yy9; - goto yy15; + if (yych <= 'F') goto yy7; + if (yych <= '`') goto yy21; + if (yych <= 'f') goto yy7; + goto yy21; } +yy23: + yych = *++cursor_; + if (yych <= 0x7F) goto yy24; + if (yych <= 0xBF) goto yy20; +yy24: + cursor_ = marker_; + if (yyaccept == 0) { + goto yy4; + } else { + goto yy13; + } +yy25: + yych = *++cursor_; + if (yych <= 0x9F) goto yy24; + if (yych <= 0xBF) goto yy23; + goto yy24; +yy26: + yych = *++cursor_; + if (yych <= 0x7F) goto yy24; + if (yych <= 0xBF) goto yy23; + goto yy24; +yy27: + yych = *++cursor_; + if (yych <= 0x8F) goto yy24; + if (yych <= 0xBF) goto yy26; + goto yy24; +yy28: + yych = *++cursor_; + if (yych <= 0x7F) goto yy24; + if (yych <= 0xBF) goto yy26; + goto yy24; +yy29: + yych = *++cursor_; + if (yych <= 0x7F) goto yy24; + if (yych <= 0x8F) goto yy26; + goto yy24; +yy30: + yych = *++cursor_; + if (yych <= 0x7F) goto yy24; + if (yych <= 0xBF) goto yy7; + goto yy24; +yy31: + ++cursor_; + if ((yych = *cursor_) <= 0x7F) goto yy24; + if (yych <= 0xBF) goto yy30; + goto yy24; /* *********************************** */ YYCOND_BLOCK_COMMENT: - if ((limit_ - cursor_) < 2) FILL(2); + if ((limit_ - cursor_) < 4) FILL(4); yych = *cursor_; - if (yych <= '\'') { - if (yych <= 0x00) goto yy19; - if (yych == '\n') goto yy23; - goto yy21; + if (yych <= 0x7F) { + if (yych <= '\'') { + if (yych == '\n') goto yy36; + } else { + if (yych <= '(') goto yy38; + if (yych == ';') goto yy39; + } } else { - if (yych <= '(') goto yy25; - if (yych == ';') goto yy26; - goto yy21; + if (yych <= 0xEF) { + if (yych <= 0xC1) goto yy40; + if (yych <= 0xDF) goto yy42; + if (yych <= 0xE0) goto yy43; + goto yy44; + } else { + if (yych <= 0xF0) goto yy45; + if (yych <= 0xF3) goto yy46; + if (yych <= 0xF4) goto yy47; + goto yy40; + } } -yy19: - ++cursor_; -#line 472 "src/wast-lexer.cc" - { ERROR("unexpected EOF"); RETURN(EOF); } -#line 333 "src/prebuilt/wast-lexer-gen.cc" -yy21: +yy34: ++cursor_; -yy22: -#line 473 "src/wast-lexer.cc" +yy35: +#line 474 "src/wast-lexer.cc" { continue; } -#line 339 "src/prebuilt/wast-lexer-gen.cc" -yy23: +#line 453 "src/prebuilt/wast-lexer-gen.cc" +yy36: ++cursor_; -#line 471 "src/wast-lexer.cc" +#line 473 "src/wast-lexer.cc" { NEWLINE; continue; } -#line 344 "src/prebuilt/wast-lexer-gen.cc" -yy25: +#line 458 "src/prebuilt/wast-lexer-gen.cc" +yy38: yych = *++cursor_; - if (yych == ';') goto yy27; - goto yy22; -yy26: + if (yych == ';') goto yy48; + goto yy35; +yy39: yych = *++cursor_; - if (yych == ')') goto yy29; - goto yy22; -yy27: + if (yych == ')') goto yy50; + goto yy35; +yy40: ++cursor_; -#line 467 "src/wast-lexer.cc" +yy41: +#line 475 "src/wast-lexer.cc" + { MAYBE_MALFORMED_UTF8(" in block comment"); } +#line 472 "src/prebuilt/wast-lexer-gen.cc" +yy42: + yych = *++cursor_; + if (yych <= 0x7F) goto yy41; + if (yych <= 0xBF) goto yy34; + goto yy41; +yy43: + yych = *(marker_ = ++cursor_); + if (yych <= 0x9F) goto yy41; + if (yych <= 0xBF) goto yy52; + goto yy41; +yy44: + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy41; + if (yych <= 0xBF) goto yy52; + goto yy41; +yy45: + yych = *(marker_ = ++cursor_); + if (yych <= 0x8F) goto yy41; + if (yych <= 0xBF) goto yy54; + goto yy41; +yy46: + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy41; + if (yych <= 0xBF) goto yy54; + goto yy41; +yy47: + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy41; + if (yych <= 0x8F) goto yy54; + goto yy41; +yy48: + ++cursor_; +#line 469 "src/wast-lexer.cc" { COMMENT_NESTING++; continue; } -#line 357 "src/prebuilt/wast-lexer-gen.cc" -yy29: +#line 507 "src/prebuilt/wast-lexer-gen.cc" +yy50: ++cursor_; -#line 468 "src/wast-lexer.cc" +#line 470 "src/wast-lexer.cc" { if (--COMMENT_NESTING == 0) BEGIN(YYCOND_INIT); continue; } -#line 364 "src/prebuilt/wast-lexer-gen.cc" +#line 514 "src/prebuilt/wast-lexer-gen.cc" +yy52: + yych = *++cursor_; + if (yych <= 0x7F) goto yy53; + if (yych <= 0xBF) goto yy34; +yy53: + cursor_ = marker_; + goto yy41; +yy54: + ++cursor_; + if ((yych = *cursor_) <= 0x7F) goto yy53; + if (yych <= 0xBF) goto yy52; + goto yy53; /* *********************************** */ YYCOND_LINE_COMMENT: { @@ -381,6284 +543,5846 @@ YYCOND_LINE_COMMENT: 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, }; - if (limit_ <= cursor_) FILL(1); + if ((limit_ - cursor_) < 2) FILL(2); yych = *cursor_; if (yybm[0+yych] & 128) { - goto yy34; + goto yy58; } - goto yy36; -yy33: -#line 465 "src/wast-lexer.cc" + if (yych <= 0xE0) { + if (yych <= '\n') goto yy60; + if (yych <= 0xC1) goto yy62; + if (yych <= 0xDF) goto yy64; + goto yy65; + } else { + if (yych <= 0xF0) { + if (yych <= 0xEF) goto yy66; + goto yy67; + } else { + if (yych <= 0xF3) goto yy68; + if (yych <= 0xF4) goto yy69; + goto yy62; + } + } +yy57: +#line 467 "src/wast-lexer.cc" { continue; } -#line 411 "src/prebuilt/wast-lexer-gen.cc" -yy34: - ++cursor_; +#line 587 "src/prebuilt/wast-lexer-gen.cc" +yy58: + yyaccept = 0; + marker_ = ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; if (yybm[0+yych] & 128) { - goto yy34; + goto yy58; } - goto yy33; -yy36: + if (yych <= 0xEF) { + if (yych <= 0xC1) goto yy57; + if (yych <= 0xDF) goto yy70; + if (yych <= 0xE0) goto yy72; + goto yy73; + } else { + if (yych <= 0xF0) goto yy74; + if (yych <= 0xF3) goto yy75; + if (yych <= 0xF4) goto yy76; + goto yy57; + } +yy60: ++cursor_; BEGIN(YYCOND_i); -#line 464 "src/wast-lexer.cc" +#line 466 "src/wast-lexer.cc" { NEWLINE; continue; } -#line 425 "src/prebuilt/wast-lexer-gen.cc" +#line 612 "src/prebuilt/wast-lexer-gen.cc" +yy62: + ++cursor_; +yy63: +#line 482 "src/wast-lexer.cc" + { MAYBE_MALFORMED_UTF8(""); } +#line 618 "src/prebuilt/wast-lexer-gen.cc" +yy64: + yych = *++cursor_; + if (yych <= 0x7F) goto yy63; + if (yych <= 0xBF) goto yy58; + goto yy63; +yy65: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x9F) goto yy63; + if (yych <= 0xBF) goto yy70; + goto yy63; +yy66: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy63; + if (yych <= 0xBF) goto yy70; + goto yy63; +yy67: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x8F) goto yy63; + if (yych <= 0xBF) goto yy73; + goto yy63; +yy68: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy63; + if (yych <= 0xBF) goto yy73; + goto yy63; +yy69: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy63; + if (yych <= 0x8F) goto yy73; + goto yy63; +yy70: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x7F) goto yy71; + if (yych <= 0xBF) goto yy58; +yy71: + cursor_ = marker_; + if (yyaccept == 0) { + goto yy57; + } else { + goto yy63; + } +yy72: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x9F) goto yy71; + if (yych <= 0xBF) goto yy70; + goto yy71; +yy73: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x7F) goto yy71; + if (yych <= 0xBF) goto yy70; + goto yy71; +yy74: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x8F) goto yy71; + if (yych <= 0xBF) goto yy73; + goto yy71; +yy75: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x7F) goto yy71; + if (yych <= 0xBF) goto yy73; + goto yy71; +yy76: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x7F) goto yy71; + if (yych <= 0x8F) goto yy73; + goto yy71; } /* *********************************** */ YYCOND_i: { static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 0, 0, 0, 8, 0, 0, + 0, 4, 0, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 36, 104, 0, 104, 104, 104, 104, 104, + 32, 32, 104, 104, 40, 104, 104, 104, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 104, 32, 104, 104, 104, 104, + 104, 232, 232, 232, 232, 232, 232, 104, + 104, 104, 104, 104, 104, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 104, + 104, 104, 104, 40, 72, 40, 104, 104, + 104, 232, 232, 232, 232, 232, 232, 104, + 104, 104, 104, 104, 104, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 104, + 104, 104, 104, 40, 104, 40, 104, 32, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 72, 80, 0, 80, 80, 80, 80, 80, - 64, 64, 80, 80, 64, 80, 80, 80, - 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 80, 64, 80, 80, 80, 80, - 80, 208, 208, 208, 208, 208, 208, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 64, 16, 64, 80, 80, - 80, 208, 208, 208, 208, 208, 208, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 64, 80, 64, 80, 0, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, }; if ((limit_ - cursor_) < 29) FILL(29); yych = *cursor_; - if (yybm[0+yych] & 8) { - goto yy44; + if (yybm[0+yych] & 4) { + goto yy81; } - switch (yych) { - case 0x00: goto yy40; - case '\t': - case '\n': goto yy47; - case ' ': - case '!': - case '#': - case '%': - case '&': - case '\'': - case '*': - case '.': - case '/': - case ':': - case '<': - case '=': - case '>': - case '?': - case '@': - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case '\\': - case '^': - case '_': - case '`': - case 'h': - case 'j': - case 'k': - case 'q': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': - case '|': - case '~': goto yy49; - case '"': goto yy52; - case '$': goto yy54; - case '(': goto yy55; - case ')': goto yy57; - case '+': - case '-': goto yy59; - case '0': goto yy60; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy62; - case ';': goto yy64; - case 'a': goto yy65; - case 'b': goto yy66; - case 'c': goto yy67; - case 'd': goto yy68; - case 'e': goto yy69; - case 'f': goto yy70; - case 'g': goto yy71; - case 'i': goto yy72; - case 'l': goto yy73; - case 'm': goto yy74; - case 'n': goto yy75; - case 'o': goto yy76; - case 'p': goto yy77; - case 'r': goto yy78; - case 's': goto yy79; - case 't': goto yy80; - case 'u': goto yy81; - default: goto yy42; + if (yych <= 'e') { + if (yych <= '+') { + if (yych <= '#') { + if (yych <= 0x1F) { + if (yych <= 0x08) goto yy79; + if (yych <= '\n') goto yy84; + } else { + if (yych == '"') goto yy89; + goto yy86; + } + } else { + if (yych <= '(') { + if (yych <= '$') goto yy91; + if (yych <= '\'') goto yy86; + goto yy92; + } else { + if (yych <= ')') goto yy94; + if (yych <= '*') goto yy86; + goto yy96; + } + } + } else { + if (yych <= ':') { + if (yych <= '/') { + if (yych == '-') goto yy96; + goto yy86; + } else { + if (yych <= '0') goto yy97; + if (yych <= '9') goto yy99; + goto yy86; + } + } else { + if (yych <= 'a') { + if (yych <= ';') goto yy101; + if (yych <= '`') goto yy86; + goto yy102; + } else { + if (yych <= 'b') goto yy103; + if (yych <= 'c') goto yy104; + if (yych <= 'd') goto yy105; + goto yy106; + } + } + } + } else { + if (yych <= 'r') { + if (yych <= 'l') { + if (yych <= 'h') { + if (yych <= 'f') goto yy107; + if (yych <= 'g') goto yy108; + goto yy86; + } else { + if (yych <= 'i') goto yy109; + if (yych <= 'k') goto yy86; + goto yy110; + } + } else { + if (yych <= 'o') { + if (yych <= 'm') goto yy111; + if (yych <= 'n') goto yy112; + goto yy113; + } else { + if (yych <= 'p') goto yy114; + if (yych <= 'q') goto yy86; + goto yy115; + } + } + } else { + if (yych <= 0xC1) { + if (yych <= 'u') { + if (yych <= 's') goto yy116; + if (yych <= 't') goto yy117; + goto yy118; + } else { + if (yych <= '~') goto yy86; + if (yych >= 0x80) goto yy119; + } + } else { + if (yych <= 0xEF) { + if (yych <= 0xDF) goto yy121; + if (yych <= 0xE0) goto yy122; + goto yy123; + } else { + if (yych <= 0xF0) goto yy124; + if (yych <= 0xF3) goto yy125; + if (yych <= 0xF4) goto yy126; + goto yy119; + } + } + } } -yy40: - ++cursor_; -#line 479 "src/wast-lexer.cc" - { RETURN(EOF); } -#line 569 "src/prebuilt/wast-lexer-gen.cc" -yy42: +yy79: ++cursor_; -yy43: -#line 480 "src/wast-lexer.cc" +yy80: +#line 481 "src/wast-lexer.cc" { ERROR("unexpected char"); continue; } -#line 575 "src/prebuilt/wast-lexer-gen.cc" -yy44: +#line 841 "src/prebuilt/wast-lexer-gen.cc" +yy81: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; - if (yybm[0+yych] & 8) { - goto yy44; + if (yybm[0+yych] & 4) { + goto yy81; } -#line 475 "src/wast-lexer.cc" +#line 477 "src/wast-lexer.cc" { continue; } -#line 585 "src/prebuilt/wast-lexer-gen.cc" -yy47: +#line 851 "src/prebuilt/wast-lexer-gen.cc" +yy84: ++cursor_; -#line 474 "src/wast-lexer.cc" +#line 476 "src/wast-lexer.cc" { NEWLINE; continue; } -#line 590 "src/prebuilt/wast-lexer-gen.cc" -yy49: +#line 856 "src/prebuilt/wast-lexer-gen.cc" +yy86: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; -yy50: - if (yybm[0+yych] & 16) { - goto yy49; +yy87: + if (yybm[0+yych] & 8) { + goto yy86; } -yy51: -#line 476 "src/wast-lexer.cc" +yy88: +#line 478 "src/wast-lexer.cc" { ERROR("unexpected token \"%.*s\"", static_cast<int>(yyleng), yytext); continue; } -#line 604 "src/prebuilt/wast-lexer-gen.cc" -yy52: +#line 870 "src/prebuilt/wast-lexer-gen.cc" +yy89: + yyaccept = 0; yych = *(marker_ = ++cursor_); - if (yych <= 0x1F) goto yy53; - if (yych != 0x7F) goto yy83; -yy53: + if (yych <= 0x1F) goto yy90; + if (yych <= 0x7F) goto yy128; + if (yych <= 0xC1) goto yy90; + if (yych <= 0xF4) goto yy128; +yy90: BEGIN(YYCOND_BAD_TEXT); -#line 240 "src/wast-lexer.cc" +#line 242 "src/wast-lexer.cc" { continue; } -#line 613 "src/prebuilt/wast-lexer-gen.cc" -yy54: +#line 882 "src/prebuilt/wast-lexer-gen.cc" +yy91: yych = *++cursor_; - if (yych <= ';') { - if (yych <= '\'') { - if (yych == '!') goto yy88; - if (yych <= '"') goto yy51; - goto yy88; - } else { - if (yych <= '+') { - if (yych <= ')') goto yy51; - goto yy88; - } else { - if (yych <= ',') goto yy51; - if (yych <= ':') goto yy88; - goto yy51; - } - } + if (yych <= '\'') { + if (yych == '!') goto yy140; + if (yych <= '"') goto yy88; + goto yy140; } else { - if (yych <= 'z') { - if (yych <= '[') { - if (yych <= 'Z') goto yy88; - goto yy51; - } else { - if (yych == ']') goto yy51; - goto yy88; - } + if (yych <= ':') { + if (yych <= ')') goto yy88; + goto yy140; } else { - if (yych <= '|') { - if (yych <= '{') goto yy51; - goto yy88; - } else { - if (yych == '~') goto yy88; - goto yy51; - } + if (yych <= ';') goto yy88; + if (yych <= '~') goto yy140; + goto yy88; } } -yy55: +yy92: ++cursor_; - if ((yych = *cursor_) == ';') goto yy91; -#line 231 "src/wast-lexer.cc" + if ((yych = *cursor_) == ';') goto yy142; +#line 233 "src/wast-lexer.cc" { RETURN(LPAR); } -#line 655 "src/prebuilt/wast-lexer-gen.cc" -yy57: +#line 904 "src/prebuilt/wast-lexer-gen.cc" +yy94: ++cursor_; -#line 232 "src/wast-lexer.cc" +#line 234 "src/wast-lexer.cc" { RETURN(RPAR); } -#line 660 "src/prebuilt/wast-lexer-gen.cc" -yy59: +#line 909 "src/prebuilt/wast-lexer-gen.cc" +yy96: yych = *++cursor_; if (yych <= 'h') { - if (yych <= '/') goto yy50; - if (yych <= '0') goto yy93; - if (yych <= '9') goto yy95; - goto yy50; + if (yych <= '/') goto yy87; + if (yych <= '0') goto yy144; + if (yych <= '9') goto yy146; + goto yy87; } else { - if (yych <= 'i') goto yy97; - if (yych == 'n') goto yy98; - goto yy50; + if (yych <= 'i') goto yy148; + if (yych == 'n') goto yy149; + goto yy87; } -yy60: +yy97: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 32) { - goto yy62; + if (yybm[0+(yych = *cursor_)] & 16) { + goto yy99; } - if (yych <= 'E') { - if (yych <= '+') { - if (yych <= '"') { - if (yych == '!') goto yy49; - } else { - if (yych <= '\'') goto yy49; - if (yych >= '*') goto yy49; - } + if (yych <= ':') { + if (yych <= '\'') { + if (yych == '!') goto yy86; + if (yych >= '#') goto yy86; } else { - if (yych <= '.') { - if (yych <= ',') goto yy61; - if (yych <= '-') goto yy49; - goto yy99; - } else { - if (yych == ';') goto yy61; - if (yych <= 'D') goto yy49; - goto yy102; - } + if (yych <= ')') goto yy98; + if (yych == '.') goto yy150; + goto yy86; } } else { - if (yych <= 'w') { - if (yych <= '\\') { - if (yych != '[') goto yy49; - } else { - if (yych <= ']') goto yy61; - if (yych == 'e') goto yy102; - goto yy49; - } + if (yych <= 'd') { + if (yych <= ';') goto yy98; + if (yych == 'E') goto yy153; + goto yy86; } else { - if (yych <= '{') { - if (yych <= 'x') goto yy103; - if (yych <= 'z') goto yy49; + if (yych <= 'w') { + if (yych <= 'e') goto yy153; + goto yy86; } else { - if (yych == '}') goto yy61; - if (yych <= '~') goto yy49; + if (yych <= 'x') goto yy154; + if (yych <= '~') goto yy86; } } } -yy61: -#line 233 "src/wast-lexer.cc" +yy98: +#line 235 "src/wast-lexer.cc" { LITERAL(Int); RETURN(NAT); } -#line 719 "src/prebuilt/wast-lexer-gen.cc" -yy62: +#line 954 "src/prebuilt/wast-lexer-gen.cc" +yy99: ++cursor_; if ((limit_ - cursor_) < 3) FILL(3); yych = *cursor_; - if (yybm[0+yych] & 32) { - goto yy62; + if (yybm[0+yych] & 16) { + goto yy99; } - if (yych <= 'D') { - if (yych <= '+') { - if (yych <= '"') { - if (yych == '!') goto yy49; - goto yy61; - } else { - if (yych <= '\'') goto yy49; - if (yych <= ')') goto yy61; - goto yy49; - } + if (yych <= '.') { + if (yych <= '"') { + if (yych == '!') goto yy86; + goto yy98; } else { - if (yych <= '.') { - if (yych <= ',') goto yy61; - if (yych <= '-') goto yy49; - goto yy99; - } else { - if (yych == ';') goto yy61; - goto yy49; - } + if (yych <= '\'') goto yy86; + if (yych <= ')') goto yy98; + if (yych <= '-') goto yy86; + goto yy150; } } else { - if (yych <= 'd') { - if (yych <= '[') { - if (yych <= 'E') goto yy102; - if (yych <= 'Z') goto yy49; - goto yy61; - } else { - if (yych == ']') goto yy61; - goto yy49; - } + if (yych <= 'E') { + if (yych == ';') goto yy98; + if (yych <= 'D') goto yy86; + goto yy153; } else { - if (yych <= '{') { - if (yych <= 'e') goto yy102; - if (yych <= 'z') goto yy49; - goto yy61; - } else { - if (yych == '}') goto yy61; - if (yych <= '~') goto yy49; - goto yy61; - } + if (yych == 'e') goto yy153; + if (yych <= '~') goto yy86; + goto yy98; } } -yy64: +yy101: yych = *++cursor_; - if (yych == ';') goto yy104; - goto yy43; -yy65: + if (yych == ';') goto yy155; + goto yy80; +yy102: yych = *++cursor_; if (yych <= 'm') { - if (yych == 'l') goto yy106; - goto yy50; + if (yych == 'l') goto yy157; + goto yy87; } else { - if (yych <= 'n') goto yy107; - if (yych == 's') goto yy108; - goto yy50; + if (yych <= 'n') goto yy158; + if (yych == 's') goto yy159; + goto yy87; } -yy66: +yy103: yych = *++cursor_; - if (yych == 'l') goto yy109; - if (yych == 'r') goto yy110; - goto yy50; -yy67: + if (yych == 'l') goto yy160; + if (yych == 'r') goto yy161; + goto yy87; +yy104: yych = *++cursor_; - if (yych == 'a') goto yy112; - if (yych == 'u') goto yy113; - goto yy50; -yy68: + if (yych == 'a') goto yy163; + if (yych == 'u') goto yy164; + goto yy87; +yy105: yych = *++cursor_; - if (yych == 'a') goto yy114; - if (yych == 'r') goto yy115; - goto yy50; -yy69: + if (yych == 'a') goto yy165; + if (yych == 'r') goto yy166; + goto yy87; +yy106: yych = *++cursor_; if (yych <= 'm') { - if (yych == 'l') goto yy116; - goto yy50; + if (yych == 'l') goto yy167; + goto yy87; } else { - if (yych <= 'n') goto yy117; - if (yych == 'x') goto yy118; - goto yy50; + if (yych <= 'n') goto yy168; + if (yych == 'x') goto yy169; + goto yy87; } -yy70: +yy107: yych = *++cursor_; if (yych <= '5') { - if (yych == '3') goto yy119; - goto yy50; + if (yych == '3') goto yy170; + goto yy87; } else { - if (yych <= '6') goto yy120; - if (yych == 'u') goto yy121; - goto yy50; + if (yych <= '6') goto yy171; + if (yych == 'u') goto yy172; + goto yy87; } -yy71: +yy108: yych = *++cursor_; if (yych <= 'k') { - if (yych == 'e') goto yy122; - goto yy50; + if (yych == 'e') goto yy173; + goto yy87; } else { - if (yych <= 'l') goto yy123; - if (yych == 'r') goto yy124; - goto yy50; + if (yych <= 'l') goto yy174; + if (yych == 'r') goto yy175; + goto yy87; } -yy72: +yy109: yych = *++cursor_; if (yych <= 'e') { if (yych <= '3') { - if (yych <= '2') goto yy50; - goto yy125; + if (yych <= '2') goto yy87; + goto yy176; } else { - if (yych == '6') goto yy126; - goto yy50; + if (yych == '6') goto yy177; + goto yy87; } } else { if (yych <= 'l') { - if (yych <= 'f') goto yy127; - goto yy50; + if (yych <= 'f') goto yy178; + goto yy87; } else { - if (yych <= 'm') goto yy129; - if (yych <= 'n') goto yy130; - goto yy50; + if (yych <= 'm') goto yy180; + if (yych <= 'n') goto yy181; + goto yy87; } } -yy73: +yy110: yych = *++cursor_; - if (yych == 'o') goto yy131; - goto yy50; -yy74: + if (yych == 'o') goto yy182; + goto yy87; +yy111: yych = *++cursor_; if (yych <= 'n') { - if (yych == 'e') goto yy132; - goto yy50; + if (yych == 'e') goto yy183; + goto yy87; } else { - if (yych <= 'o') goto yy133; - if (yych == 'u') goto yy134; - goto yy50; + if (yych <= 'o') goto yy184; + if (yych == 'u') goto yy185; + goto yy87; } -yy75: +yy112: yych = *++cursor_; - if (yych == 'a') goto yy135; - if (yych == 'o') goto yy136; - goto yy50; -yy76: + if (yych == 'a') goto yy186; + if (yych == 'o') goto yy187; + goto yy87; +yy113: yych = *++cursor_; - if (yych == 'f') goto yy137; - goto yy50; -yy77: + if (yych == 'f') goto yy188; + goto yy87; +yy114: yych = *++cursor_; - if (yych == 'a') goto yy138; - goto yy50; -yy78: + if (yych == 'a') goto yy189; + goto yy87; +yy115: yych = *++cursor_; - if (yych == 'e') goto yy139; - goto yy50; -yy79: + if (yych == 'e') goto yy190; + goto yy87; +yy116: yych = *++cursor_; - if (yych == 'e') goto yy140; - if (yych == 't') goto yy141; - goto yy50; -yy80: + if (yych == 'e') goto yy191; + if (yych == 't') goto yy192; + goto yy87; +yy117: yych = *++cursor_; if (yych <= 'e') { - if (yych == 'a') goto yy142; - if (yych <= 'd') goto yy50; - goto yy143; + if (yych == 'a') goto yy193; + if (yych <= 'd') goto yy87; + goto yy194; } else { if (yych <= 'h') { - if (yych <= 'g') goto yy50; - goto yy144; + if (yych <= 'g') goto yy87; + goto yy195; } else { - if (yych == 'y') goto yy145; - goto yy50; + if (yych == 'y') goto yy196; + goto yy87; } } -yy81: +yy118: yych = *++cursor_; - if (yych == 'n') goto yy146; - goto yy50; -yy82: - ++cursor_; - if (limit_ <= cursor_) FILL(1); - yych = *cursor_; -yy83: - if (yybm[0+yych] & 64) { - goto yy82; - } - if (yych <= 0x1F) goto yy84; - if (yych <= '"') goto yy85; - if (yych <= '\\') goto yy87; -yy84: - cursor_ = marker_; - goto yy53; -yy85: + if (yych == 'n') goto yy197; + goto yy87; +yy119: ++cursor_; -#line 239 "src/wast-lexer.cc" - { TEXT; RETURN(TEXT); } -#line 921 "src/prebuilt/wast-lexer-gen.cc" -yy87: +yy120: +#line 482 "src/wast-lexer.cc" + { MAYBE_MALFORMED_UTF8(""); } +#line 1122 "src/prebuilt/wast-lexer-gen.cc" +yy121: + yych = *++cursor_; + if (yych <= 0x7F) goto yy120; + if (yych <= 0xBF) goto yy79; + goto yy120; +yy122: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x9F) goto yy120; + if (yych <= 0xBF) goto yy198; + goto yy120; +yy123: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy120; + if (yych <= 0xBF) goto yy198; + goto yy120; +yy124: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x8F) goto yy120; + if (yych <= 0xBF) goto yy199; + goto yy120; +yy125: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy120; + if (yych <= 0xBF) goto yy199; + goto yy120; +yy126: + yyaccept = 1; + yych = *(marker_ = ++cursor_); + if (yych <= 0x7F) goto yy120; + if (yych <= 0x8F) goto yy199; + goto yy120; +yy127: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; - if (yych <= 'F') { - if (yych <= '\'') { - if (yych == '"') goto yy82; - if (yych <= '&') goto yy84; - goto yy82; +yy128: + if (yybm[0+yych] & 32) { + goto yy127; + } + if (yych <= 0xDF) { + if (yych <= '"') { + if (yych >= ' ') goto yy130; } else { - if (yych <= '/') goto yy84; - if (yych <= '9') goto yy147; - if (yych <= '@') goto yy84; - goto yy147; + if (yych <= '\\') goto yy132; + if (yych >= 0xC2) goto yy133; } } else { - if (yych <= 'f') { - if (yych == '\\') goto yy82; - if (yych <= '`') goto yy84; - goto yy147; + if (yych <= 0xF0) { + if (yych <= 0xE0) goto yy134; + if (yych <= 0xEF) goto yy135; + goto yy136; } else { - if (yych <= 'n') { - if (yych <= 'm') goto yy84; - goto yy82; - } else { - if (yych == 't') goto yy82; - goto yy84; - } + if (yych <= 0xF3) goto yy137; + if (yych <= 0xF4) goto yy138; } } -yy88: +yy129: + cursor_ = marker_; + if (yyaccept == 0) { + goto yy90; + } else { + goto yy120; + } +yy130: + ++cursor_; +#line 241 "src/wast-lexer.cc" + { TEXT; RETURN(TEXT); } +#line 1194 "src/prebuilt/wast-lexer-gen.cc" +yy132: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; - if (yych <= ';') { + if (yych <= '[') { if (yych <= '\'') { - if (yych == '!') goto yy88; - if (yych >= '#') goto yy88; + if (yych == '"') goto yy127; + if (yych <= '&') goto yy129; + goto yy127; } else { - if (yych <= '+') { - if (yych >= '*') goto yy88; + if (yych <= '9') { + if (yych <= '/') goto yy129; + goto yy200; } else { - if (yych <= ',') goto yy90; - if (yych <= ':') goto yy88; + if (yych <= '@') goto yy129; + if (yych <= 'F') goto yy200; + goto yy129; } } } else { - if (yych <= 'z') { - if (yych <= '[') { - if (yych <= 'Z') goto yy88; + if (yych <= 'n') { + if (yych <= '`') { + if (yych <= '\\') goto yy127; + goto yy129; } else { - if (yych != ']') goto yy88; + if (yych <= 'f') goto yy200; + if (yych <= 'm') goto yy129; + goto yy127; } } else { - if (yych <= '|') { - if (yych >= '|') goto yy88; + if (yych <= 'r') { + if (yych <= 'q') goto yy129; + goto yy127; } else { - if (yych == '~') goto yy88; + if (yych == 't') goto yy127; + goto yy129; } } } -yy90: -#line 461 "src/wast-lexer.cc" +yy133: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x7F) goto yy129; + if (yych <= 0xBF) goto yy127; + goto yy129; +yy134: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x9F) goto yy129; + if (yych <= 0xBF) goto yy133; + goto yy129; +yy135: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x7F) goto yy129; + if (yych <= 0xBF) goto yy133; + goto yy129; +yy136: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x8F) goto yy129; + if (yych <= 0xBF) goto yy135; + goto yy129; +yy137: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x7F) goto yy129; + if (yych <= 0xBF) goto yy135; + goto yy129; +yy138: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; + if (yych <= 0x7F) goto yy129; + if (yych <= 0x8F) goto yy135; + goto yy129; +yy139: + ++cursor_; + if (limit_ <= cursor_) FILL(1); + yych = *cursor_; +yy140: + if (yybm[0+yych] & 64) { + goto yy139; + } + if (yych <= ')') goto yy141; + if (yych <= ',') goto yy86; + if (yych <= ';') goto yy141; + if (yych <= '}') goto yy86; +yy141: +#line 463 "src/wast-lexer.cc" { TEXT; RETURN(VAR); } -#line 986 "src/prebuilt/wast-lexer-gen.cc" -yy91: +#line 1291 "src/prebuilt/wast-lexer-gen.cc" +yy142: ++cursor_; BEGIN(YYCOND_BLOCK_COMMENT); -#line 466 "src/wast-lexer.cc" +#line 468 "src/wast-lexer.cc" { COMMENT_NESTING = 1; continue; } -#line 992 "src/prebuilt/wast-lexer-gen.cc" -yy93: +#line 1297 "src/prebuilt/wast-lexer-gen.cc" +yy144: ++cursor_; - if ((yych = *cursor_) <= 'D') { - if (yych <= ',') { - if (yych <= '"') { - if (yych == '!') goto yy49; - } else { - if (yych <= '\'') goto yy49; - if (yych <= ')') goto yy94; - if (yych <= '+') goto yy49; - } + if ((yych = *cursor_) <= '9') { + if (yych <= '\'') { + if (yych == '!') goto yy86; + if (yych >= '#') goto yy86; } else { - if (yych <= '/') { - if (yych == '.') goto yy99; - goto yy49; + if (yych <= '-') { + if (yych >= '*') goto yy86; } else { - if (yych <= '9') goto yy95; - if (yych != ';') goto yy49; + if (yych <= '.') goto yy150; + if (yych <= '/') goto yy86; + goto yy146; } } } else { - if (yych <= 'e') { - if (yych <= '[') { - if (yych <= 'E') goto yy102; - if (yych <= 'Z') goto yy49; + if (yych <= 'd') { + if (yych <= ';') { + if (yych <= ':') goto yy86; } else { - if (yych == ']') goto yy94; - if (yych <= 'd') goto yy49; - goto yy102; + if (yych == 'E') goto yy153; + goto yy86; } } else { - if (yych <= '{') { - if (yych == 'x') goto yy148; - if (yych <= 'z') goto yy49; + if (yych <= 'w') { + if (yych <= 'e') goto yy153; + goto yy86; } else { - if (yych == '}') goto yy94; - if (yych <= '~') goto yy49; + if (yych <= 'x') goto yy201; + if (yych <= '~') goto yy86; } } } -yy94: -#line 234 "src/wast-lexer.cc" +yy145: +#line 236 "src/wast-lexer.cc" { LITERAL(Int); RETURN(INT); } -#line 1036 "src/prebuilt/wast-lexer-gen.cc" -yy95: +#line 1334 "src/prebuilt/wast-lexer-gen.cc" +yy146: ++cursor_; if ((limit_ - cursor_) < 3) FILL(3); yych = *cursor_; - if (yych <= ';') { - if (yych <= '+') { - if (yych <= '"') { - if (yych == '!') goto yy49; - goto yy94; - } else { - if (yych <= '\'') goto yy49; - if (yych <= ')') goto yy94; - goto yy49; - } + if (yych <= '/') { + if (yych <= '\'') { + if (yych == '!') goto yy86; + if (yych <= '"') goto yy145; + goto yy86; } else { - if (yych <= '.') { - if (yych <= ',') goto yy94; - if (yych <= '-') goto yy49; - goto yy99; - } else { - if (yych <= '/') goto yy49; - if (yych <= '9') goto yy95; - if (yych <= ':') goto yy49; - goto yy94; - } + if (yych <= ')') goto yy145; + if (yych == '.') goto yy150; + goto yy86; } } else { - if (yych <= 'd') { - if (yych <= 'Z') { - if (yych == 'E') goto yy102; - goto yy49; - } else { - if (yych == '\\') goto yy49; - if (yych <= ']') goto yy94; - goto yy49; - } + if (yych <= 'D') { + if (yych <= '9') goto yy146; + if (yych == ';') goto yy145; + goto yy86; } else { - if (yych <= '{') { - if (yych <= 'e') goto yy102; - if (yych <= 'z') goto yy49; - goto yy94; + if (yych <= 'd') { + if (yych <= 'E') goto yy153; + goto yy86; } else { - if (yych == '}') goto yy94; - if (yych <= '~') goto yy49; - goto yy94; + if (yych <= 'e') goto yy153; + if (yych <= '~') goto yy86; + goto yy145; } } } -yy97: +yy148: yych = *++cursor_; - if (yych == 'n') goto yy149; - goto yy50; -yy98: + if (yych == 'n') goto yy202; + goto yy87; +yy149: yych = *++cursor_; - if (yych == 'a') goto yy135; - goto yy50; -yy99: + if (yych == 'a') goto yy186; + goto yy87; +yy150: ++cursor_; if ((limit_ - cursor_) < 3) FILL(3); yych = *cursor_; - if (yych <= 'D') { - if (yych <= '+') { - if (yych <= '"') { - if (yych == '!') goto yy49; - } else { - if (yych <= '\'') goto yy49; - if (yych >= '*') goto yy49; - } + if (yych <= '9') { + if (yych <= '"') { + if (yych == '!') goto yy86; } else { - if (yych <= '9') { - if (yych <= ',') goto yy101; - if (yych <= '/') goto yy49; - goto yy99; - } else { - if (yych != ';') goto yy49; - } + if (yych <= '\'') goto yy86; + if (yych <= ')') goto yy152; + if (yych <= '/') goto yy86; + goto yy150; } } else { - if (yych <= 'd') { - if (yych <= '[') { - if (yych <= 'E') goto yy102; - if (yych <= 'Z') goto yy49; - } else { - if (yych != ']') goto yy49; - } + if (yych <= 'E') { + if (yych == ';') goto yy152; + if (yych <= 'D') goto yy86; + goto yy153; } else { - if (yych <= '{') { - if (yych <= 'e') goto yy102; - if (yych <= 'z') goto yy49; - } else { - if (yych == '}') goto yy101; - if (yych <= '~') goto yy49; - } + if (yych == 'e') goto yy153; + if (yych <= '~') goto yy86; } } -yy101: -#line 235 "src/wast-lexer.cc" +yy152: +#line 237 "src/wast-lexer.cc" { LITERAL(Float); RETURN(FLOAT); } -#line 1135 "src/prebuilt/wast-lexer-gen.cc" -yy102: +#line 1399 "src/prebuilt/wast-lexer-gen.cc" +yy153: yych = *++cursor_; if (yych <= ',') { - if (yych == '+') goto yy150; - goto yy50; + if (yych == '+') goto yy203; + goto yy87; } else { - if (yych <= '-') goto yy150; - if (yych <= '/') goto yy50; - if (yych <= '9') goto yy151; - goto yy50; + if (yych <= '-') goto yy203; + if (yych <= '/') goto yy87; + if (yych <= '9') goto yy204; + goto yy87; } -yy103: +yy154: yych = *++cursor_; if (yybm[0+yych] & 128) { - goto yy153; + goto yy206; } - goto yy50; -yy104: + goto yy87; +yy155: ++cursor_; BEGIN(YYCOND_LINE_COMMENT); -#line 463 "src/wast-lexer.cc" +#line 465 "src/wast-lexer.cc" { continue; } -#line 1158 "src/prebuilt/wast-lexer-gen.cc" -yy106: +#line 1422 "src/prebuilt/wast-lexer-gen.cc" +yy157: yych = *++cursor_; - if (yych == 'i') goto yy155; - goto yy50; -yy107: + if (yych == 'i') goto yy208; + goto yy87; +yy158: yych = *++cursor_; - if (yych == 'y') goto yy156; - goto yy50; -yy108: + if (yych == 'y') goto yy209; + goto yy87; +yy159: yych = *++cursor_; - if (yych == 's') goto yy157; - goto yy50; -yy109: + if (yych == 's') goto yy210; + goto yy87; +yy160: yych = *++cursor_; - if (yych == 'o') goto yy158; - goto yy50; -yy110: + if (yych == 'o') goto yy211; + goto yy87; +yy161: ++cursor_; - if ((yych = *cursor_) <= 'Z') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy111; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych != ';') goto yy49; - } + if (yych <= '"') goto yy162; + if (yych <= '\'') goto yy86; } } else { - if (yych <= '_') { - if (yych <= '\\') { - if (yych >= '\\') goto yy49; - } else { - if (yych <= ']') goto yy111; - if (yych <= '^') goto yy49; - goto yy159; - } + if (yych <= '^') { + if (yych != ';') goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= '_') goto yy212; + if (yych <= '~') goto yy86; } } -yy111: -#line 264 "src/wast-lexer.cc" +yy162: +#line 266 "src/wast-lexer.cc" { RETURN(BR); } -#line 1212 "src/prebuilt/wast-lexer-gen.cc" -yy112: +#line 1459 "src/prebuilt/wast-lexer-gen.cc" +yy163: yych = *++cursor_; - if (yych == 'l') goto yy160; - goto yy50; -yy113: + if (yych == 'l') goto yy213; + goto yy87; +yy164: yych = *++cursor_; - if (yych == 'r') goto yy161; - goto yy50; -yy114: + if (yych == 'r') goto yy214; + goto yy87; +yy165: yych = *++cursor_; - if (yych == 't') goto yy162; - goto yy50; -yy115: + if (yych == 't') goto yy215; + goto yy87; +yy166: yych = *++cursor_; - if (yych == 'o') goto yy163; - goto yy50; -yy116: + if (yych == 'o') goto yy216; + goto yy87; +yy167: yych = *++cursor_; - if (yych == 'e') goto yy164; - if (yych == 's') goto yy165; - goto yy50; -yy117: + if (yych == 'e') goto yy217; + if (yych == 's') goto yy218; + goto yy87; +yy168: yych = *++cursor_; - if (yych == 'd') goto yy166; - goto yy50; -yy118: + if (yych == 'd') goto yy219; + goto yy87; +yy169: yych = *++cursor_; - if (yych == 'p') goto yy168; - goto yy50; -yy119: + if (yych == 'p') goto yy221; + goto yy87; +yy170: yych = *++cursor_; - if (yych == '2') goto yy169; - goto yy50; -yy120: + if (yych == '2') goto yy222; + goto yy87; +yy171: yych = *++cursor_; - if (yych == '4') goto yy171; - goto yy50; -yy121: + if (yych == '4') goto yy224; + goto yy87; +yy172: yych = *++cursor_; - if (yych == 'n') goto yy173; - goto yy50; -yy122: + if (yych == 'n') goto yy226; + goto yy87; +yy173: yych = *++cursor_; - if (yych == 't') goto yy174; - goto yy50; -yy123: + if (yych == 't') goto yy227; + goto yy87; +yy174: yych = *++cursor_; - if (yych == 'o') goto yy176; - goto yy50; -yy124: + if (yych == 'o') goto yy229; + goto yy87; +yy175: yych = *++cursor_; - if (yych == 'o') goto yy177; - goto yy50; -yy125: + if (yych == 'o') goto yy230; + goto yy87; +yy176: yych = *++cursor_; - if (yych == '2') goto yy178; - goto yy50; -yy126: + if (yych == '2') goto yy231; + goto yy87; +yy177: yych = *++cursor_; - if (yych == '4') goto yy180; - goto yy50; -yy127: + if (yych == '4') goto yy233; + goto yy87; +yy178: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 260 "src/wast-lexer.cc" +#line 262 "src/wast-lexer.cc" { RETURN(IF); } -#line 1281 "src/prebuilt/wast-lexer-gen.cc" -yy129: +#line 1528 "src/prebuilt/wast-lexer-gen.cc" +yy180: yych = *++cursor_; - if (yych == 'p') goto yy182; - goto yy50; -yy130: + if (yych == 'p') goto yy235; + goto yy87; +yy181: yych = *++cursor_; - if (yych == 'f') goto yy183; - if (yych == 'v') goto yy185; - goto yy50; -yy131: + if (yych == 'f') goto yy236; + if (yych == 'v') goto yy238; + goto yy87; +yy182: yych = *++cursor_; - if (yych == 'c') goto yy186; - if (yych == 'o') goto yy187; - goto yy50; -yy132: + if (yych == 'c') goto yy239; + if (yych == 'o') goto yy240; + goto yy87; +yy183: yych = *++cursor_; - if (yych == 'm') goto yy188; - goto yy50; -yy133: + if (yych == 'm') goto yy241; + goto yy87; +yy184: yych = *++cursor_; - if (yych == 'd') goto yy189; - goto yy50; -yy134: + if (yych == 'd') goto yy242; + goto yy87; +yy185: yych = *++cursor_; - if (yych == 't') goto yy190; - goto yy50; -yy135: + if (yych == 't') goto yy243; + goto yy87; +yy186: yych = *++cursor_; - if (yych == 'n') goto yy192; - goto yy50; -yy136: + if (yych == 'n') goto yy245; + goto yy87; +yy187: yych = *++cursor_; - if (yych == 'p') goto yy194; - goto yy50; -yy137: + if (yych == 'p') goto yy247; + goto yy87; +yy188: yych = *++cursor_; - if (yych == 'f') goto yy196; - goto yy50; -yy138: + if (yych == 'f') goto yy249; + goto yy87; +yy189: yych = *++cursor_; - if (yych == 'r') goto yy197; - goto yy50; -yy139: + if (yych == 'r') goto yy250; + goto yy87; +yy190: yych = *++cursor_; if (yych <= 'r') { - if (yych == 'g') goto yy198; - goto yy50; + if (yych == 'g') goto yy251; + goto yy87; } else { - if (yych <= 's') goto yy199; - if (yych <= 't') goto yy200; - goto yy50; + if (yych <= 's') goto yy252; + if (yych <= 't') goto yy253; + goto yy87; } -yy140: +yy191: yych = *++cursor_; - if (yych == 'l') goto yy201; - if (yych == 't') goto yy202; - goto yy50; -yy141: + if (yych == 'l') goto yy254; + if (yych == 't') goto yy255; + goto yy87; +yy192: yych = *++cursor_; - if (yych == 'a') goto yy203; - goto yy50; -yy142: + if (yych == 'a') goto yy256; + goto yy87; +yy193: + yych = *++cursor_; + if (yych == 'b') goto yy257; + goto yy87; +yy194: yych = *++cursor_; - if (yych == 'b') goto yy204; - goto yy50; -yy143: + if (yych == 'e') goto yy258; + goto yy87; +yy195: yych = *++cursor_; - if (yych == 'e') goto yy205; - goto yy50; -yy144: + if (yych == 'e') goto yy259; + goto yy87; +yy196: yych = *++cursor_; - if (yych == 'e') goto yy206; - goto yy50; -yy145: + if (yych == 'p') goto yy260; + goto yy87; +yy197: yych = *++cursor_; - if (yych == 'p') goto yy207; - goto yy50; -yy146: + if (yych == 'r') goto yy261; + goto yy87; +yy198: + yych = *++cursor_; + if (yych <= 0x7F) goto yy129; + if (yych <= 0xBF) goto yy79; + goto yy129; +yy199: yych = *++cursor_; - if (yych == 'r') goto yy208; - goto yy50; -yy147: + if (yych <= 0x7F) goto yy129; + if (yych <= 0xBF) goto yy198; + goto yy129; +yy200: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; if (yych <= '@') { - if (yych <= '/') goto yy84; - if (yych <= '9') goto yy82; - goto yy84; + if (yych <= '/') goto yy129; + if (yych <= '9') goto yy127; + goto yy129; } else { - if (yych <= 'F') goto yy82; - if (yych <= '`') goto yy84; - if (yych <= 'f') goto yy82; - goto yy84; + if (yych <= 'F') goto yy127; + if (yych <= '`') goto yy129; + if (yych <= 'f') goto yy127; + goto yy129; } -yy148: +yy201: yych = *++cursor_; if (yych <= '@') { - if (yych <= '/') goto yy50; - if (yych <= '9') goto yy209; - goto yy50; + if (yych <= '/') goto yy87; + if (yych <= '9') goto yy262; + goto yy87; } else { - if (yych <= 'F') goto yy209; - if (yych <= '`') goto yy50; - if (yych <= 'f') goto yy209; - goto yy50; + if (yych <= 'F') goto yy262; + if (yych <= '`') goto yy87; + if (yych <= 'f') goto yy262; + goto yy87; } -yy149: +yy202: yych = *++cursor_; - if (yych == 'f') goto yy183; - goto yy50; -yy150: + if (yych == 'f') goto yy236; + goto yy87; +yy203: yych = *++cursor_; - if (yych <= '/') goto yy50; - if (yych >= ':') goto yy50; -yy151: + if (yych <= '/') goto yy87; + if (yych >= ':') goto yy87; +yy204: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; - if (yych <= ':') { - if (yych <= ')') { - if (yych <= '!') { - if (yych <= ' ') goto yy101; - goto yy49; - } else { - if (yych <= '"') goto yy101; - if (yych <= '\'') goto yy49; - goto yy101; - } + if (yych <= ')') { + if (yych <= '!') { + if (yych <= ' ') goto yy152; + goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - goto yy101; - } else { - if (yych <= '/') goto yy49; - if (yych <= '9') goto yy151; - goto yy49; - } + if (yych <= '"') goto yy152; + if (yych <= '\'') goto yy86; + goto yy152; } } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych <= ';') goto yy101; - goto yy49; - } else { - if (yych == '\\') goto yy49; - goto yy101; - } + if (yych <= ':') { + if (yych <= '/') goto yy86; + if (yych <= '9') goto yy204; + goto yy86; } else { - if (yych <= '|') { - if (yych == '{') goto yy101; - goto yy49; - } else { - if (yych == '~') goto yy49; - goto yy101; - } + if (yych <= ';') goto yy152; + if (yych <= '~') goto yy86; + goto yy152; } } -yy153: +yy206: ++cursor_; if ((limit_ - cursor_) < 3) FILL(3); yych = *cursor_; if (yybm[0+yych] & 128) { - goto yy153; + goto yy206; } - if (yych <= ';') { - if (yych <= ')') { - if (yych <= '!') { - if (yych <= ' ') goto yy61; - goto yy49; - } else { - if (yych <= '"') goto yy61; - if (yych <= '\'') goto yy49; - goto yy61; - } + if (yych <= '-') { + if (yych <= '"') { + if (yych == '!') goto yy86; + goto yy98; } else { - if (yych <= '-') { - if (yych == ',') goto yy61; - goto yy49; - } else { - if (yych <= '.') goto yy211; - if (yych <= ':') goto yy49; - goto yy61; - } + if (yych <= '\'') goto yy86; + if (yych <= ')') goto yy98; + goto yy86; } } else { - if (yych <= 'p') { - if (yych <= '\\') { - if (yych == '[') goto yy61; - goto yy49; - } else { - if (yych <= ']') goto yy61; - if (yych <= 'o') goto yy49; - goto yy213; - } + if (yych <= ';') { + if (yych <= '.') goto yy264; + if (yych <= ':') goto yy86; + goto yy98; } else { - if (yych <= '|') { - if (yych == '{') goto yy61; - goto yy49; - } else { - if (yych == '~') goto yy49; - goto yy61; - } + if (yych == 'p') goto yy266; + if (yych <= '~') goto yy86; + goto yy98; } } -yy155: +yy208: yych = *++cursor_; - if (yych == 'g') goto yy214; - goto yy50; -yy156: + if (yych == 'g') goto yy267; + goto yy87; +yy209: yych = *++cursor_; - if (yych == 'f') goto yy215; - goto yy50; -yy157: + if (yych == 'f') goto yy268; + goto yy87; +yy210: yych = *++cursor_; - if (yych == 'e') goto yy216; - goto yy50; -yy158: + if (yych == 'e') goto yy269; + goto yy87; +yy211: yych = *++cursor_; - if (yych == 'c') goto yy217; - goto yy50; -yy159: + if (yych == 'c') goto yy270; + goto yy87; +yy212: yych = *++cursor_; - if (yych == 'i') goto yy218; - if (yych == 't') goto yy219; - goto yy50; -yy160: + if (yych == 'i') goto yy271; + if (yych == 't') goto yy272; + goto yy87; +yy213: yych = *++cursor_; - if (yych == 'l') goto yy220; - goto yy50; -yy161: + if (yych == 'l') goto yy273; + goto yy87; +yy214: yych = *++cursor_; - if (yych == 'r') goto yy222; - goto yy50; -yy162: + if (yych == 'r') goto yy275; + goto yy87; +yy215: yych = *++cursor_; - if (yych == 'a') goto yy223; - goto yy50; -yy163: + if (yych == 'a') goto yy276; + goto yy87; +yy216: yych = *++cursor_; - if (yych == 'p') goto yy225; - goto yy50; -yy164: + if (yych == 'p') goto yy278; + goto yy87; +yy217: yych = *++cursor_; - if (yych == 'm') goto yy227; - goto yy50; -yy165: + if (yych == 'm') goto yy280; + goto yy87; +yy218: yych = *++cursor_; - if (yych == 'e') goto yy229; - goto yy50; -yy166: + if (yych == 'e') goto yy282; + goto yy87; +yy219: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 270 "src/wast-lexer.cc" +#line 272 "src/wast-lexer.cc" { RETURN(END); } -#line 1539 "src/prebuilt/wast-lexer-gen.cc" -yy168: +#line 1757 "src/prebuilt/wast-lexer-gen.cc" +yy221: yych = *++cursor_; - if (yych == 'o') goto yy231; - goto yy50; -yy169: + if (yych == 'o') goto yy284; + goto yy87; +yy222: ++cursor_; - if ((yych = *cursor_) <= ':') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy170; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych == '.') goto yy232; - goto yy49; - } + if (yych <= '"') goto yy223; + if (yych <= '\'') goto yy86; } } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych >= '<') goto yy49; - } else { - if (yych == '\\') goto yy49; - } + if (yych <= ':') { + if (yych == '.') goto yy285; + goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= ';') goto yy223; + if (yych <= '~') goto yy86; } } -yy170: -#line 254 "src/wast-lexer.cc" +yy223: +#line 256 "src/wast-lexer.cc" { TYPE(F32); RETURN(VALUE_TYPE); } -#line 1580 "src/prebuilt/wast-lexer-gen.cc" -yy171: +#line 1783 "src/prebuilt/wast-lexer-gen.cc" +yy224: ++cursor_; - if ((yych = *cursor_) <= ':') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy172; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych == '.') goto yy233; - goto yy49; - } + if (yych <= '"') goto yy225; + if (yych <= '\'') goto yy86; } } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych >= '<') goto yy49; - } else { - if (yych == '\\') goto yy49; - } + if (yych <= ':') { + if (yych == '.') goto yy286; + goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= ';') goto yy225; + if (yych <= '~') goto yy86; } } -yy172: -#line 255 "src/wast-lexer.cc" +yy225: +#line 257 "src/wast-lexer.cc" { TYPE(F64); RETURN(VALUE_TYPE); } -#line 1617 "src/prebuilt/wast-lexer-gen.cc" -yy173: +#line 1805 "src/prebuilt/wast-lexer-gen.cc" +yy226: yych = *++cursor_; - if (yych == 'c') goto yy234; - goto yy50; -yy174: + if (yych == 'c') goto yy287; + goto yy87; +yy227: ++cursor_; - if ((yych = *cursor_) <= 'Z') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy175; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych != ';') goto yy49; - } + if (yych <= '"') goto yy228; + if (yych <= '\'') goto yy86; } } else { - if (yych <= '_') { - if (yych <= '\\') { - if (yych >= '\\') goto yy49; - } else { - if (yych <= ']') goto yy175; - if (yych <= '^') goto yy49; - goto yy236; - } + if (yych <= '^') { + if (yych != ';') goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= '_') goto yy289; + if (yych <= '~') goto yy86; } } -yy175: -#line 450 "src/wast-lexer.cc" +yy228: +#line 452 "src/wast-lexer.cc" { RETURN(GET); } -#line 1659 "src/prebuilt/wast-lexer-gen.cc" -yy176: +#line 1830 "src/prebuilt/wast-lexer-gen.cc" +yy229: yych = *++cursor_; - if (yych == 'b') goto yy237; - goto yy50; -yy177: + if (yych == 'b') goto yy290; + goto yy87; +yy230: yych = *++cursor_; - if (yych == 'w') goto yy238; - goto yy50; -yy178: + if (yych == 'w') goto yy291; + goto yy87; +yy231: ++cursor_; - if ((yych = *cursor_) <= ':') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy179; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych == '.') goto yy239; - goto yy49; - } + if (yych <= '"') goto yy232; + if (yych <= '\'') goto yy86; } } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych >= '<') goto yy49; - } else { - if (yych == '\\') goto yy49; - } + if (yych <= ':') { + if (yych == '.') goto yy292; + goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= ';') goto yy232; + if (yych <= '~') goto yy86; } } -yy179: -#line 252 "src/wast-lexer.cc" +yy232: +#line 254 "src/wast-lexer.cc" { TYPE(I32); RETURN(VALUE_TYPE); } -#line 1704 "src/prebuilt/wast-lexer-gen.cc" -yy180: +#line 1860 "src/prebuilt/wast-lexer-gen.cc" +yy233: ++cursor_; - if ((yych = *cursor_) <= ':') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy181; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych == '.') goto yy240; - goto yy49; - } + if (yych <= '"') goto yy234; + if (yych <= '\'') goto yy86; } } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych >= '<') goto yy49; - } else { - if (yych == '\\') goto yy49; - } + if (yych <= ':') { + if (yych == '.') goto yy293; + goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= ';') goto yy234; + if (yych <= '~') goto yy86; } } -yy181: -#line 253 "src/wast-lexer.cc" +yy234: +#line 255 "src/wast-lexer.cc" { TYPE(I64); RETURN(VALUE_TYPE); } -#line 1741 "src/prebuilt/wast-lexer-gen.cc" -yy182: +#line 1882 "src/prebuilt/wast-lexer-gen.cc" +yy235: yych = *++cursor_; - if (yych == 'o') goto yy241; - goto yy50; -yy183: + if (yych == 'o') goto yy294; + goto yy87; +yy236: ++cursor_; - if ((yych = *cursor_) <= 'Z') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy184; - if (yych <= '\'') goto yy49; - } - } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych != ';') goto yy49; - } - } - } else { - if (yych <= 'i') { - if (yych <= '\\') { - if (yych >= '\\') goto yy49; - } else { - if (yych <= ']') goto yy184; - if (yych <= 'h') goto yy49; - goto yy242; - } - } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } - } + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -yy184: -#line 237 "src/wast-lexer.cc" +#line 239 "src/wast-lexer.cc" { LITERAL(Infinity); RETURN(FLOAT); } -#line 1783 "src/prebuilt/wast-lexer-gen.cc" -yy185: +#line 1894 "src/prebuilt/wast-lexer-gen.cc" +yy238: yych = *++cursor_; - if (yych == 'o') goto yy243; - goto yy50; -yy186: + if (yych == 'o') goto yy295; + goto yy87; +yy239: yych = *++cursor_; - if (yych == 'a') goto yy244; - goto yy50; -yy187: + if (yych == 'a') goto yy296; + goto yy87; +yy240: yych = *++cursor_; - if (yych == 'p') goto yy245; - goto yy50; -yy188: + if (yych == 'p') goto yy297; + goto yy87; +yy241: yych = *++cursor_; - if (yych == 'o') goto yy247; - goto yy50; -yy189: + if (yych == 'o') goto yy299; + goto yy87; +yy242: yych = *++cursor_; - if (yych == 'u') goto yy248; - goto yy50; -yy190: + if (yych == 'u') goto yy300; + goto yy87; +yy243: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 257 "src/wast-lexer.cc" +#line 259 "src/wast-lexer.cc" { RETURN(MUT); } -#line 1811 "src/prebuilt/wast-lexer-gen.cc" -yy192: +#line 1922 "src/prebuilt/wast-lexer-gen.cc" +yy245: ++cursor_; - if ((yych = *cursor_) <= ';') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy193; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych <= '9') goto yy49; - if (yych <= ':') goto yy249; - } + if (yych <= '"') goto yy246; + if (yych <= '\'') goto yy86; } } else { - if (yych <= 'z') { - if (yych <= '[') { - if (yych <= 'Z') goto yy49; - } else { - if (yych != ']') goto yy49; - } + if (yych <= ':') { + if (yych <= '9') goto yy86; + goto yy301; } else { - if (yych <= '|') { - if (yych >= '|') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= ';') goto yy246; + if (yych <= '~') goto yy86; } } -yy193: -#line 238 "src/wast-lexer.cc" +yy246: +#line 240 "src/wast-lexer.cc" { LITERAL(Nan); RETURN(FLOAT); } -#line 1848 "src/prebuilt/wast-lexer-gen.cc" -yy194: +#line 1944 "src/prebuilt/wast-lexer-gen.cc" +yy247: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 258 "src/wast-lexer.cc" +#line 260 "src/wast-lexer.cc" { RETURN(NOP); } -#line 1856 "src/prebuilt/wast-lexer-gen.cc" -yy196: +#line 1952 "src/prebuilt/wast-lexer-gen.cc" +yy249: yych = *++cursor_; - if (yych == 's') goto yy250; - goto yy50; -yy197: + if (yych == 's') goto yy302; + goto yy87; +yy250: yych = *++cursor_; - if (yych == 'a') goto yy251; - goto yy50; -yy198: + if (yych == 'a') goto yy303; + goto yy87; +yy251: yych = *++cursor_; - if (yych == 'i') goto yy252; - goto yy50; -yy199: + if (yych == 'i') goto yy304; + goto yy87; +yy252: yych = *++cursor_; - if (yych == 'u') goto yy253; - goto yy50; -yy200: + if (yych == 'u') goto yy305; + goto yy87; +yy253: yych = *++cursor_; - if (yych == 'u') goto yy254; - goto yy50; -yy201: + if (yych == 'u') goto yy306; + goto yy87; +yy254: yych = *++cursor_; - if (yych == 'e') goto yy255; - goto yy50; -yy202: + if (yych == 'e') goto yy307; + goto yy87; +yy255: yych = *++cursor_; - if (yych == '_') goto yy256; - goto yy50; -yy203: + if (yych == '_') goto yy308; + goto yy87; +yy256: yych = *++cursor_; - if (yych == 'r') goto yy257; - goto yy50; -yy204: + if (yych == 'r') goto yy309; + goto yy87; +yy257: yych = *++cursor_; - if (yych == 'l') goto yy258; - goto yy50; -yy205: + if (yych == 'l') goto yy310; + goto yy87; +yy258: yych = *++cursor_; - if (yych == '_') goto yy259; - goto yy50; -yy206: + if (yych == '_') goto yy311; + goto yy87; +yy259: yych = *++cursor_; - if (yych == 'n') goto yy260; - goto yy50; -yy207: + if (yych == 'n') goto yy312; + goto yy87; +yy260: yych = *++cursor_; - if (yych == 'e') goto yy262; - goto yy50; -yy208: + if (yych == 'e') goto yy314; + goto yy87; +yy261: yych = *++cursor_; - if (yych == 'e') goto yy264; - goto yy50; -yy209: + if (yych == 'e') goto yy316; + goto yy87; +yy262: ++cursor_; if ((limit_ - cursor_) < 3) FILL(3); yych = *cursor_; - if (yych <= '@') { - if (yych <= ',') { - if (yych <= '"') { - if (yych == '!') goto yy49; - goto yy94; - } else { - if (yych <= '\'') goto yy49; - if (yych <= ')') goto yy94; - if (yych <= '+') goto yy49; - goto yy94; - } + if (yych <= '9') { + if (yych <= '\'') { + if (yych == '!') goto yy86; + if (yych <= '"') goto yy145; + goto yy86; } else { - if (yych <= '/') { - if (yych != '.') goto yy49; + if (yych <= '-') { + if (yych <= ')') goto yy145; + goto yy86; } else { - if (yych <= '9') goto yy209; - if (yych == ';') goto yy94; - goto yy49; + if (yych <= '.') goto yy264; + if (yych <= '/') goto yy86; + goto yy262; } } } else { - if (yych <= 'f') { - if (yych <= '[') { - if (yych <= 'F') goto yy209; - if (yych <= 'Z') goto yy49; - goto yy94; + if (yych <= '`') { + if (yych <= ';') { + if (yych <= ':') goto yy86; + goto yy145; } else { - if (yych == ']') goto yy94; - if (yych <= '`') goto yy49; - goto yy209; + if (yych <= '@') goto yy86; + if (yych <= 'F') goto yy262; + goto yy86; } } else { - if (yych <= '{') { - if (yych == 'p') goto yy213; - if (yych <= 'z') goto yy49; - goto yy94; + if (yych <= 'o') { + if (yych <= 'f') goto yy262; + goto yy86; } else { - if (yych == '}') goto yy94; - if (yych <= '~') goto yy49; - goto yy94; + if (yych <= 'p') goto yy266; + if (yych <= '~') goto yy86; + goto yy145; } } } -yy211: +yy264: ++cursor_; if ((limit_ - cursor_) < 3) FILL(3); yych = *cursor_; - if (yych <= 'F') { - if (yych <= '+') { - if (yych <= '"') { - if (yych == '!') goto yy49; - goto yy51; - } else { - if (yych <= '\'') goto yy49; - if (yych <= ')') goto yy51; - goto yy49; - } + if (yych <= ':') { + if (yych <= '\'') { + if (yych == '!') goto yy86; + if (yych <= '"') goto yy88; + goto yy86; } else { - if (yych <= '9') { - if (yych <= ',') goto yy51; - if (yych <= '/') goto yy49; - goto yy211; - } else { - if (yych == ';') goto yy51; - if (yych <= '@') goto yy49; - goto yy211; - } + if (yych <= ')') goto yy88; + if (yych <= '/') goto yy86; + if (yych <= '9') goto yy264; + goto yy86; } } else { - if (yych <= 'o') { - if (yych <= '\\') { - if (yych == '[') goto yy51; - goto yy49; - } else { - if (yych <= ']') goto yy51; - if (yych <= '`') goto yy49; - if (yych <= 'f') goto yy211; - goto yy49; - } + if (yych <= '`') { + if (yych <= ';') goto yy88; + if (yych <= '@') goto yy86; + if (yych <= 'F') goto yy264; + goto yy86; } else { - if (yych <= '{') { - if (yych <= 'p') goto yy213; - if (yych <= 'z') goto yy49; - goto yy51; + if (yych <= 'o') { + if (yych <= 'f') goto yy264; + goto yy86; } else { - if (yych == '}') goto yy51; - if (yych <= '~') goto yy49; - goto yy51; + if (yych <= 'p') goto yy266; + if (yych <= '~') goto yy86; + goto yy88; } } } -yy213: +yy266: yych = *++cursor_; if (yych <= ',') { - if (yych == '+') goto yy265; - goto yy50; + if (yych == '+') goto yy317; + goto yy87; } else { - if (yych <= '-') goto yy265; - if (yych <= '/') goto yy50; - if (yych <= '9') goto yy266; - goto yy50; + if (yych <= '-') goto yy317; + if (yych <= '/') goto yy87; + if (yych <= '9') goto yy318; + goto yy87; } -yy214: +yy267: yych = *++cursor_; - if (yych == 'n') goto yy269; - goto yy50; -yy215: + if (yych == 'n') goto yy321; + goto yy87; +yy268: yych = *++cursor_; - if (yych == 'u') goto yy270; - goto yy50; -yy216: + if (yych == 'u') goto yy322; + goto yy87; +yy269: yych = *++cursor_; - if (yych == 'r') goto yy271; - goto yy50; -yy217: + if (yych == 'r') goto yy323; + goto yy87; +yy270: yych = *++cursor_; - if (yych == 'k') goto yy272; - goto yy50; -yy218: + if (yych == 'k') goto yy324; + goto yy87; +yy271: yych = *++cursor_; - if (yych == 'f') goto yy274; - goto yy50; -yy219: + if (yych == 'f') goto yy326; + goto yy87; +yy272: yych = *++cursor_; - if (yych == 'a') goto yy276; - goto yy50; -yy220: + if (yych == 'a') goto yy328; + goto yy87; +yy273: ++cursor_; - if ((yych = *cursor_) <= 'Z') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy221; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych != ';') goto yy49; - } + if (yych <= '"') goto yy274; + if (yych <= '\'') goto yy86; } } else { - if (yych <= '_') { - if (yych <= '\\') { - if (yych >= '\\') goto yy49; - } else { - if (yych <= ']') goto yy221; - if (yych <= '^') goto yy49; - goto yy277; - } + if (yych <= '^') { + if (yych != ';') goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= '_') goto yy329; + if (yych <= '~') goto yy86; } } -yy221: -#line 267 "src/wast-lexer.cc" +yy274: +#line 269 "src/wast-lexer.cc" { RETURN(CALL); } -#line 2076 "src/prebuilt/wast-lexer-gen.cc" -yy222: +#line 2132 "src/prebuilt/wast-lexer-gen.cc" +yy275: yych = *++cursor_; - if (yych == 'e') goto yy278; - goto yy50; -yy223: + if (yych == 'e') goto yy330; + goto yy87; +yy276: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 444 "src/wast-lexer.cc" +#line 446 "src/wast-lexer.cc" { RETURN(DATA); } -#line 2088 "src/prebuilt/wast-lexer-gen.cc" -yy225: +#line 2144 "src/prebuilt/wast-lexer-gen.cc" +yy278: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 269 "src/wast-lexer.cc" +#line 271 "src/wast-lexer.cc" { RETURN(DROP); } -#line 2096 "src/prebuilt/wast-lexer-gen.cc" -yy227: +#line 2152 "src/prebuilt/wast-lexer-gen.cc" +yy280: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 443 "src/wast-lexer.cc" +#line 445 "src/wast-lexer.cc" { RETURN(ELEM); } -#line 2104 "src/prebuilt/wast-lexer-gen.cc" -yy229: +#line 2160 "src/prebuilt/wast-lexer-gen.cc" +yy282: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 262 "src/wast-lexer.cc" +#line 264 "src/wast-lexer.cc" { RETURN(ELSE); } -#line 2112 "src/prebuilt/wast-lexer-gen.cc" -yy231: +#line 2168 "src/prebuilt/wast-lexer-gen.cc" +yy284: yych = *++cursor_; - if (yych == 'r') goto yy279; - goto yy50; -yy232: + if (yych == 'r') goto yy331; + goto yy87; +yy285: yych = *++cursor_; switch (yych) { - case 'a': goto yy280; - case 'c': goto yy281; - case 'd': goto yy282; - case 'e': goto yy283; - case 'f': goto yy284; - case 'g': goto yy285; - case 'l': goto yy286; - case 'm': goto yy287; - case 'n': goto yy288; - case 'r': goto yy289; - case 's': goto yy290; - case 't': goto yy291; - default: goto yy50; + case 'a': goto yy332; + case 'c': goto yy333; + case 'd': goto yy334; + case 'e': goto yy335; + case 'f': goto yy336; + case 'g': goto yy337; + case 'l': goto yy338; + case 'm': goto yy339; + case 'n': goto yy340; + case 'r': goto yy341; + case 's': goto yy342; + case 't': goto yy343; + default: goto yy87; } -yy233: +yy286: yych = *++cursor_; switch (yych) { - case 'a': goto yy292; - case 'c': goto yy293; - case 'd': goto yy294; - case 'e': goto yy295; - case 'f': goto yy296; - case 'g': goto yy297; - case 'l': goto yy298; - case 'm': goto yy299; - case 'n': goto yy300; - case 'p': goto yy301; - case 'r': goto yy302; - case 's': goto yy303; - case 't': goto yy304; - default: goto yy50; + case 'a': goto yy344; + case 'c': goto yy345; + case 'd': goto yy346; + case 'e': goto yy347; + case 'f': goto yy348; + case 'g': goto yy349; + case 'l': goto yy350; + case 'm': goto yy351; + case 'n': goto yy352; + case 'p': goto yy353; + case 'r': goto yy354; + case 's': goto yy355; + case 't': goto yy356; + default: goto yy87; } -yy234: +yy287: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 434 "src/wast-lexer.cc" +#line 436 "src/wast-lexer.cc" { RETURN(FUNC); } -#line 2159 "src/prebuilt/wast-lexer-gen.cc" -yy236: +#line 2215 "src/prebuilt/wast-lexer-gen.cc" +yy289: yych = *++cursor_; - if (yych == 'g') goto yy305; - if (yych == 'l') goto yy306; - goto yy50; -yy237: + if (yych == 'g') goto yy357; + if (yych == 'l') goto yy358; + goto yy87; +yy290: yych = *++cursor_; - if (yych == 'a') goto yy307; - goto yy50; -yy238: + if (yych == 'a') goto yy359; + goto yy87; +yy291: yych = *++cursor_; - if (yych == '_') goto yy308; - goto yy50; -yy239: + if (yych == '_') goto yy360; + goto yy87; +yy292: yych = *++cursor_; switch (yych) { - case 'a': goto yy309; - case 'c': goto yy310; - case 'd': goto yy311; - case 'e': goto yy312; - case 'g': goto yy313; - case 'l': goto yy314; - case 'm': goto yy315; - case 'n': goto yy316; - case 'o': goto yy317; - case 'p': goto yy318; - case 'r': goto yy319; - case 's': goto yy320; - case 't': goto yy321; - case 'w': goto yy322; - case 'x': goto yy323; - default: goto yy50; + case 'a': goto yy361; + case 'c': goto yy362; + case 'd': goto yy363; + case 'e': goto yy364; + case 'g': goto yy365; + case 'l': goto yy366; + case 'm': goto yy367; + case 'n': goto yy368; + case 'o': goto yy369; + case 'p': goto yy370; + case 'r': goto yy371; + case 's': goto yy372; + case 't': goto yy373; + case 'w': goto yy374; + case 'x': goto yy375; + default: goto yy87; } -yy240: +yy293: yych = *++cursor_; switch (yych) { - case 'a': goto yy324; - case 'c': goto yy325; - case 'd': goto yy326; - case 'e': goto yy327; - case 'g': goto yy328; - case 'l': goto yy329; - case 'm': goto yy330; - case 'n': goto yy331; - case 'o': goto yy332; - case 'p': goto yy333; - case 'r': goto yy334; - case 's': goto yy335; - case 't': goto yy336; - case 'x': goto yy337; - default: goto yy50; + case 'a': goto yy376; + case 'c': goto yy377; + case 'd': goto yy378; + case 'e': goto yy379; + case 'g': goto yy380; + case 'l': goto yy381; + case 'm': goto yy382; + case 'n': goto yy383; + case 'o': goto yy384; + case 'p': goto yy385; + case 'r': goto yy386; + case 's': goto yy387; + case 't': goto yy388; + case 'x': goto yy389; + default: goto yy87; } -yy241: - yych = *++cursor_; - if (yych == 'r') goto yy338; - goto yy50; -yy242: +yy294: yych = *++cursor_; - if (yych == 'n') goto yy339; - goto yy50; -yy243: + if (yych == 'r') goto yy390; + goto yy87; +yy295: yych = *++cursor_; - if (yych == 'k') goto yy340; - goto yy50; -yy244: + if (yych == 'k') goto yy391; + goto yy87; +yy296: yych = *++cursor_; - if (yych == 'l') goto yy341; - goto yy50; -yy245: + if (yych == 'l') goto yy392; + goto yy87; +yy297: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 263 "src/wast-lexer.cc" +#line 265 "src/wast-lexer.cc" { RETURN(LOOP); } -#line 2235 "src/prebuilt/wast-lexer-gen.cc" -yy247: +#line 2287 "src/prebuilt/wast-lexer-gen.cc" +yy299: yych = *++cursor_; - if (yych == 'r') goto yy343; - goto yy50; -yy248: + if (yych == 'r') goto yy394; + goto yy87; +yy300: yych = *++cursor_; - if (yych == 'l') goto yy344; - goto yy50; -yy249: + if (yych == 'l') goto yy395; + goto yy87; +yy301: yych = *++cursor_; - if (yych == '0') goto yy345; - goto yy50; -yy250: + if (yych == '0') goto yy396; + goto yy87; +yy302: yych = *++cursor_; - if (yych == 'e') goto yy346; - goto yy50; -yy251: + if (yych == 'e') goto yy397; + goto yy87; +yy303: yych = *++cursor_; - if (yych == 'm') goto yy347; - goto yy50; -yy252: + if (yych == 'm') goto yy398; + goto yy87; +yy304: yych = *++cursor_; - if (yych == 's') goto yy349; - goto yy50; -yy253: + if (yych == 's') goto yy400; + goto yy87; +yy305: yych = *++cursor_; - if (yych == 'l') goto yy350; - goto yy50; -yy254: + if (yych == 'l') goto yy401; + goto yy87; +yy306: yych = *++cursor_; - if (yych == 'r') goto yy351; - goto yy50; -yy255: + if (yych == 'r') goto yy402; + goto yy87; +yy307: yych = *++cursor_; - if (yych == 'c') goto yy352; - goto yy50; -yy256: + if (yych == 'c') goto yy403; + goto yy87; +yy308: yych = *++cursor_; - if (yych == 'g') goto yy353; - if (yych == 'l') goto yy354; - goto yy50; -yy257: + if (yych == 'g') goto yy404; + if (yych == 'l') goto yy405; + goto yy87; +yy309: yych = *++cursor_; - if (yych == 't') goto yy355; - goto yy50; -yy258: + if (yych == 't') goto yy406; + goto yy87; +yy310: yych = *++cursor_; - if (yych == 'e') goto yy357; - goto yy50; -yy259: + if (yych == 'e') goto yy408; + goto yy87; +yy311: yych = *++cursor_; - if (yych == 'l') goto yy359; - goto yy50; -yy260: + if (yych == 'l') goto yy410; + goto yy87; +yy312: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 261 "src/wast-lexer.cc" +#line 263 "src/wast-lexer.cc" { RETURN(THEN); } -#line 2296 "src/prebuilt/wast-lexer-gen.cc" -yy262: +#line 2348 "src/prebuilt/wast-lexer-gen.cc" +yy314: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 433 "src/wast-lexer.cc" +#line 435 "src/wast-lexer.cc" { RETURN(TYPE); } -#line 2304 "src/prebuilt/wast-lexer-gen.cc" -yy264: +#line 2356 "src/prebuilt/wast-lexer-gen.cc" +yy316: yych = *++cursor_; - if (yych == 'a') goto yy360; - goto yy50; -yy265: + if (yych == 'a') goto yy411; + goto yy87; +yy317: yych = *++cursor_; - if (yych <= '/') goto yy50; - if (yych >= ':') goto yy50; -yy266: + if (yych <= '/') goto yy87; + if (yych >= ':') goto yy87; +yy318: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; - if (yych <= ':') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy268; - if (yych <= '\'') goto yy49; - } + if (yych <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych <= '/') goto yy49; - if (yych <= '9') goto yy266; - goto yy49; - } + if (yych <= '"') goto yy320; + if (yych <= '\'') goto yy86; } } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych >= '<') goto yy49; - } else { - if (yych == '\\') goto yy49; - } + if (yych <= ':') { + if (yych <= '/') goto yy86; + if (yych <= '9') goto yy318; + goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= ';') goto yy320; + if (yych <= '~') goto yy86; } } -yy268: -#line 236 "src/wast-lexer.cc" +yy320: +#line 238 "src/wast-lexer.cc" { LITERAL(Hexfloat); RETURN(FLOAT); } -#line 2352 "src/prebuilt/wast-lexer-gen.cc" -yy269: +#line 2389 "src/prebuilt/wast-lexer-gen.cc" +yy321: yych = *++cursor_; - if (yych == '=') goto yy361; - goto yy50; -yy270: + if (yych == '=') goto yy412; + goto yy87; +yy322: yych = *++cursor_; - if (yych == 'n') goto yy362; - goto yy50; -yy271: + if (yych == 'n') goto yy413; + goto yy87; +yy323: yych = *++cursor_; - if (yych == 't') goto yy363; - goto yy50; -yy272: + if (yych == 't') goto yy414; + goto yy87; +yy324: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 259 "src/wast-lexer.cc" +#line 261 "src/wast-lexer.cc" { RETURN(BLOCK); } -#line 2372 "src/prebuilt/wast-lexer-gen.cc" -yy274: +#line 2409 "src/prebuilt/wast-lexer-gen.cc" +yy326: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 265 "src/wast-lexer.cc" +#line 267 "src/wast-lexer.cc" { RETURN(BR_IF); } -#line 2380 "src/prebuilt/wast-lexer-gen.cc" -yy276: +#line 2417 "src/prebuilt/wast-lexer-gen.cc" +yy328: yych = *++cursor_; - if (yych == 'b') goto yy364; - goto yy50; -yy277: + if (yych == 'b') goto yy415; + goto yy87; +yy329: yych = *++cursor_; - if (yych == 'i') goto yy365; - goto yy50; -yy278: + if (yych == 'i') goto yy416; + goto yy87; +yy330: yych = *++cursor_; - if (yych == 'n') goto yy366; - goto yy50; -yy279: + if (yych == 'n') goto yy417; + goto yy87; +yy331: yych = *++cursor_; - if (yych == 't') goto yy367; - goto yy50; -yy280: + if (yych == 't') goto yy418; + goto yy87; +yy332: yych = *++cursor_; - if (yych == 'b') goto yy369; - if (yych == 'd') goto yy370; - goto yy50; -yy281: + if (yych == 'b') goto yy420; + if (yych == 'd') goto yy421; + goto yy87; +yy333: yych = *++cursor_; - if (yych == 'e') goto yy371; - if (yych == 'o') goto yy372; - goto yy50; -yy282: + if (yych == 'e') goto yy422; + if (yych == 'o') goto yy423; + goto yy87; +yy334: yych = *++cursor_; - if (yych == 'e') goto yy373; - if (yych == 'i') goto yy374; - goto yy50; -yy283: + if (yych == 'e') goto yy424; + if (yych == 'i') goto yy425; + goto yy87; +yy335: yych = *++cursor_; - if (yych == 'q') goto yy375; - goto yy50; -yy284: + if (yych == 'q') goto yy426; + goto yy87; +yy336: yych = *++cursor_; - if (yych == 'l') goto yy377; - goto yy50; -yy285: + if (yych == 'l') goto yy428; + goto yy87; +yy337: yych = *++cursor_; - if (yych == 'e') goto yy378; - if (yych == 't') goto yy380; - goto yy50; -yy286: + if (yych == 'e') goto yy429; + if (yych == 't') goto yy431; + goto yy87; +yy338: yych = *++cursor_; if (yych <= 'n') { - if (yych == 'e') goto yy382; - goto yy50; + if (yych == 'e') goto yy433; + goto yy87; } else { - if (yych <= 'o') goto yy384; - if (yych == 't') goto yy385; - goto yy50; + if (yych <= 'o') goto yy435; + if (yych == 't') goto yy436; + goto yy87; } -yy287: +yy339: yych = *++cursor_; if (yych <= 'h') { - if (yych == 'a') goto yy387; - goto yy50; + if (yych == 'a') goto yy438; + goto yy87; } else { - if (yych <= 'i') goto yy388; - if (yych == 'u') goto yy389; - goto yy50; + if (yych <= 'i') goto yy439; + if (yych == 'u') goto yy440; + goto yy87; } -yy288: +yy340: yych = *++cursor_; - if (yych == 'e') goto yy390; - goto yy50; -yy289: + if (yych == 'e') goto yy441; + goto yy87; +yy341: yych = *++cursor_; - if (yych == 'e') goto yy392; - goto yy50; -yy290: + if (yych == 'e') goto yy443; + goto yy87; +yy342: yych = *++cursor_; if (yych <= 's') { - if (yych == 'q') goto yy393; - goto yy50; + if (yych == 'q') goto yy444; + goto yy87; } else { - if (yych <= 't') goto yy394; - if (yych <= 'u') goto yy395; - goto yy50; + if (yych <= 't') goto yy445; + if (yych <= 'u') goto yy446; + goto yy87; } -yy291: +yy343: yych = *++cursor_; - if (yych == 'r') goto yy396; - goto yy50; -yy292: + if (yych == 'r') goto yy447; + goto yy87; +yy344: yych = *++cursor_; - if (yych == 'b') goto yy397; - if (yych == 'd') goto yy398; - goto yy50; -yy293: + if (yych == 'b') goto yy448; + if (yych == 'd') goto yy449; + goto yy87; +yy345: yych = *++cursor_; - if (yych == 'e') goto yy399; - if (yych == 'o') goto yy400; - goto yy50; -yy294: + if (yych == 'e') goto yy450; + if (yych == 'o') goto yy451; + goto yy87; +yy346: yych = *++cursor_; - if (yych == 'i') goto yy401; - goto yy50; -yy295: + if (yych == 'i') goto yy452; + goto yy87; +yy347: yych = *++cursor_; - if (yych == 'q') goto yy402; - goto yy50; -yy296: + if (yych == 'q') goto yy453; + goto yy87; +yy348: yych = *++cursor_; - if (yych == 'l') goto yy404; - goto yy50; -yy297: + if (yych == 'l') goto yy455; + goto yy87; +yy349: yych = *++cursor_; - if (yych == 'e') goto yy405; - if (yych == 't') goto yy407; - goto yy50; -yy298: + if (yych == 'e') goto yy456; + if (yych == 't') goto yy458; + goto yy87; +yy350: yych = *++cursor_; if (yych <= 'n') { - if (yych == 'e') goto yy409; - goto yy50; + if (yych == 'e') goto yy460; + goto yy87; } else { - if (yych <= 'o') goto yy411; - if (yych == 't') goto yy412; - goto yy50; + if (yych <= 'o') goto yy462; + if (yych == 't') goto yy463; + goto yy87; } -yy299: +yy351: yych = *++cursor_; if (yych <= 'h') { - if (yych == 'a') goto yy414; - goto yy50; + if (yych == 'a') goto yy465; + goto yy87; } else { - if (yych <= 'i') goto yy415; - if (yych == 'u') goto yy416; - goto yy50; + if (yych <= 'i') goto yy466; + if (yych == 'u') goto yy467; + goto yy87; } -yy300: +yy352: yych = *++cursor_; - if (yych == 'e') goto yy417; - goto yy50; -yy301: + if (yych == 'e') goto yy468; + goto yy87; +yy353: yych = *++cursor_; - if (yych == 'r') goto yy419; - goto yy50; -yy302: + if (yych == 'r') goto yy470; + goto yy87; +yy354: yych = *++cursor_; - if (yych == 'e') goto yy420; - goto yy50; -yy303: + if (yych == 'e') goto yy471; + goto yy87; +yy355: yych = *++cursor_; if (yych <= 's') { - if (yych == 'q') goto yy421; - goto yy50; + if (yych == 'q') goto yy472; + goto yy87; } else { - if (yych <= 't') goto yy422; - if (yych <= 'u') goto yy423; - goto yy50; + if (yych <= 't') goto yy473; + if (yych <= 'u') goto yy474; + goto yy87; } -yy304: +yy356: yych = *++cursor_; - if (yych == 'r') goto yy424; - goto yy50; -yy305: + if (yych == 'r') goto yy475; + goto yy87; +yy357: yych = *++cursor_; - if (yych == 'l') goto yy425; - goto yy50; -yy306: + if (yych == 'l') goto yy476; + goto yy87; +yy358: yych = *++cursor_; - if (yych == 'o') goto yy426; - goto yy50; -yy307: + if (yych == 'o') goto yy477; + goto yy87; +yy359: yych = *++cursor_; - if (yych == 'l') goto yy427; - goto yy50; -yy308: + if (yych == 'l') goto yy478; + goto yy87; +yy360: yych = *++cursor_; - if (yych == 'm') goto yy429; - goto yy50; -yy309: + if (yych == 'm') goto yy480; + goto yy87; +yy361: yych = *++cursor_; - if (yych == 'd') goto yy430; - if (yych == 'n') goto yy431; - goto yy50; -yy310: + if (yych == 'd') goto yy481; + if (yych == 'n') goto yy482; + goto yy87; +yy362: yych = *++cursor_; if (yych <= 'n') { - if (yych == 'l') goto yy432; - goto yy50; + if (yych == 'l') goto yy483; + goto yy87; } else { - if (yych <= 'o') goto yy433; - if (yych == 't') goto yy434; - goto yy50; + if (yych <= 'o') goto yy484; + if (yych == 't') goto yy485; + goto yy87; } -yy311: +yy363: yych = *++cursor_; - if (yych == 'i') goto yy435; - goto yy50; -yy312: + if (yych == 'i') goto yy486; + goto yy87; +yy364: yych = *++cursor_; - if (yych == 'q') goto yy436; - goto yy50; -yy313: + if (yych == 'q') goto yy487; + goto yy87; +yy365: yych = *++cursor_; - if (yych == 'e') goto yy438; - if (yych == 't') goto yy439; - goto yy50; -yy314: + if (yych == 'e') goto yy489; + if (yych == 't') goto yy490; + goto yy87; +yy366: yych = *++cursor_; if (yych <= 'n') { - if (yych == 'e') goto yy440; - goto yy50; + if (yych == 'e') goto yy491; + goto yy87; } else { - if (yych <= 'o') goto yy441; - if (yych == 't') goto yy442; - goto yy50; + if (yych <= 'o') goto yy492; + if (yych == 't') goto yy493; + goto yy87; } -yy315: +yy367: yych = *++cursor_; - if (yych == 'u') goto yy443; - goto yy50; -yy316: + if (yych == 'u') goto yy494; + goto yy87; +yy368: yych = *++cursor_; - if (yych == 'e') goto yy444; - goto yy50; -yy317: + if (yych == 'e') goto yy495; + goto yy87; +yy369: yych = *++cursor_; - if (yych == 'r') goto yy446; - goto yy50; -yy318: + if (yych == 'r') goto yy497; + goto yy87; +yy370: yych = *++cursor_; - if (yych == 'o') goto yy448; - goto yy50; -yy319: + if (yych == 'o') goto yy499; + goto yy87; +yy371: yych = *++cursor_; - if (yych == 'e') goto yy449; - if (yych == 'o') goto yy450; - goto yy50; -yy320: + if (yych == 'e') goto yy500; + if (yych == 'o') goto yy501; + goto yy87; +yy372: yych = *++cursor_; if (yych <= 's') { - if (yych == 'h') goto yy451; - goto yy50; + if (yych == 'h') goto yy502; + goto yy87; } else { - if (yych <= 't') goto yy452; - if (yych <= 'u') goto yy453; - goto yy50; + if (yych <= 't') goto yy503; + if (yych <= 'u') goto yy504; + goto yy87; } -yy321: +yy373: yych = *++cursor_; - if (yych == 'r') goto yy454; - goto yy50; -yy322: + if (yych == 'r') goto yy505; + goto yy87; +yy374: yych = *++cursor_; - if (yych == 'r') goto yy455; - goto yy50; -yy323: + if (yych == 'r') goto yy506; + goto yy87; +yy375: yych = *++cursor_; - if (yych == 'o') goto yy456; - goto yy50; -yy324: + if (yych == 'o') goto yy507; + goto yy87; +yy376: yych = *++cursor_; - if (yych == 'd') goto yy457; - if (yych == 'n') goto yy458; - goto yy50; -yy325: + if (yych == 'd') goto yy508; + if (yych == 'n') goto yy509; + goto yy87; +yy377: yych = *++cursor_; if (yych <= 'n') { - if (yych == 'l') goto yy459; - goto yy50; + if (yych == 'l') goto yy510; + goto yy87; } else { - if (yych <= 'o') goto yy460; - if (yych == 't') goto yy461; - goto yy50; + if (yych <= 'o') goto yy511; + if (yych == 't') goto yy512; + goto yy87; } -yy326: +yy378: yych = *++cursor_; - if (yych == 'i') goto yy462; - goto yy50; -yy327: + if (yych == 'i') goto yy513; + goto yy87; +yy379: yych = *++cursor_; - if (yych == 'q') goto yy463; - if (yych == 'x') goto yy465; - goto yy50; -yy328: + if (yych == 'q') goto yy514; + if (yych == 'x') goto yy516; + goto yy87; +yy380: yych = *++cursor_; - if (yych == 'e') goto yy466; - if (yych == 't') goto yy467; - goto yy50; -yy329: + if (yych == 'e') goto yy517; + if (yych == 't') goto yy518; + goto yy87; +yy381: yych = *++cursor_; if (yych <= 'n') { - if (yych == 'e') goto yy468; - goto yy50; + if (yych == 'e') goto yy519; + goto yy87; } else { - if (yych <= 'o') goto yy469; - if (yych == 't') goto yy470; - goto yy50; + if (yych <= 'o') goto yy520; + if (yych == 't') goto yy521; + goto yy87; } -yy330: +yy382: yych = *++cursor_; - if (yych == 'u') goto yy471; - goto yy50; -yy331: + if (yych == 'u') goto yy522; + goto yy87; +yy383: yych = *++cursor_; - if (yych == 'e') goto yy472; - goto yy50; -yy332: + if (yych == 'e') goto yy523; + goto yy87; +yy384: yych = *++cursor_; - if (yych == 'r') goto yy474; - goto yy50; -yy333: + if (yych == 'r') goto yy525; + goto yy87; +yy385: yych = *++cursor_; - if (yych == 'o') goto yy476; - goto yy50; -yy334: + if (yych == 'o') goto yy527; + goto yy87; +yy386: yych = *++cursor_; - if (yych == 'e') goto yy477; - if (yych == 'o') goto yy478; - goto yy50; -yy335: + if (yych == 'e') goto yy528; + if (yych == 'o') goto yy529; + goto yy87; +yy387: yych = *++cursor_; if (yych <= 's') { - if (yych == 'h') goto yy479; - goto yy50; + if (yych == 'h') goto yy530; + goto yy87; } else { - if (yych <= 't') goto yy480; - if (yych <= 'u') goto yy481; - goto yy50; + if (yych <= 't') goto yy531; + if (yych <= 'u') goto yy532; + goto yy87; } -yy336: - yych = *++cursor_; - if (yych == 'r') goto yy482; - goto yy50; -yy337: +yy388: yych = *++cursor_; - if (yych == 'o') goto yy483; - goto yy50; -yy338: + if (yych == 'r') goto yy533; + goto yy87; +yy389: yych = *++cursor_; - if (yych == 't') goto yy484; - goto yy50; -yy339: + if (yych == 'o') goto yy534; + goto yy87; +yy390: yych = *++cursor_; - if (yych == 'i') goto yy486; - goto yy50; -yy340: + if (yych == 't') goto yy535; + goto yy87; +yy391: yych = *++cursor_; - if (yych == 'e') goto yy487; - goto yy50; -yy341: + if (yych == 'e') goto yy537; + goto yy87; +yy392: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 437 "src/wast-lexer.cc" +#line 439 "src/wast-lexer.cc" { RETURN(LOCAL); } -#line 2734 "src/prebuilt/wast-lexer-gen.cc" -yy343: +#line 2767 "src/prebuilt/wast-lexer-gen.cc" +yy394: yych = *++cursor_; - if (yych == 'y') goto yy489; - goto yy50; -yy344: + if (yych == 'y') goto yy539; + goto yy87; +yy395: yych = *++cursor_; - if (yych == 'e') goto yy491; - goto yy50; -yy345: + if (yych == 'e') goto yy541; + goto yy87; +yy396: yych = *++cursor_; - if (yych == 'x') goto yy493; - goto yy50; -yy346: + if (yych == 'x') goto yy543; + goto yy87; +yy397: yych = *++cursor_; - if (yych == 't') goto yy494; - goto yy50; -yy347: + if (yych == 't') goto yy544; + goto yy87; +yy398: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 435 "src/wast-lexer.cc" +#line 437 "src/wast-lexer.cc" { RETURN(PARAM); } -#line 2758 "src/prebuilt/wast-lexer-gen.cc" -yy349: +#line 2791 "src/prebuilt/wast-lexer-gen.cc" +yy400: yych = *++cursor_; - if (yych == 't') goto yy496; - goto yy50; -yy350: + if (yych == 't') goto yy546; + goto yy87; +yy401: yych = *++cursor_; - if (yych == 't') goto yy497; - goto yy50; -yy351: + if (yych == 't') goto yy547; + goto yy87; +yy402: yych = *++cursor_; - if (yych == 'n') goto yy499; - goto yy50; -yy352: + if (yych == 'n') goto yy549; + goto yy87; +yy403: yych = *++cursor_; - if (yych == 't') goto yy501; - goto yy50; -yy353: + if (yych == 't') goto yy551; + goto yy87; +yy404: yych = *++cursor_; - if (yych == 'l') goto yy503; - goto yy50; -yy354: + if (yych == 'l') goto yy553; + goto yy87; +yy405: yych = *++cursor_; - if (yych == 'o') goto yy504; - goto yy50; -yy355: + if (yych == 'o') goto yy554; + goto yy87; +yy406: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 442 "src/wast-lexer.cc" +#line 444 "src/wast-lexer.cc" { RETURN(START); } -#line 2790 "src/prebuilt/wast-lexer-gen.cc" -yy357: +#line 2823 "src/prebuilt/wast-lexer-gen.cc" +yy408: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 440 "src/wast-lexer.cc" +#line 442 "src/wast-lexer.cc" { RETURN(TABLE); } -#line 2798 "src/prebuilt/wast-lexer-gen.cc" -yy359: +#line 2831 "src/prebuilt/wast-lexer-gen.cc" +yy410: yych = *++cursor_; - if (yych == 'o') goto yy505; - goto yy50; -yy360: + if (yych == 'o') goto yy555; + goto yy87; +yy411: yych = *++cursor_; - if (yych == 'c') goto yy506; - goto yy50; -yy361: + if (yych == 'c') goto yy556; + goto yy87; +yy412: yych = *++cursor_; - if (yych <= '/') goto yy50; - if (yych <= '0') goto yy507; - if (yych <= '9') goto yy509; - goto yy50; -yy362: + if (yych <= '/') goto yy87; + if (yych <= '0') goto yy557; + if (yych <= '9') goto yy559; + goto yy87; +yy413: yych = *++cursor_; - if (yych == 'c') goto yy511; - goto yy50; -yy363: + if (yych == 'c') goto yy561; + goto yy87; +yy414: yych = *++cursor_; - if (yych == '_') goto yy513; - goto yy50; -yy364: + if (yych == '_') goto yy563; + goto yy87; +yy415: yych = *++cursor_; - if (yych == 'l') goto yy514; - goto yy50; -yy365: + if (yych == 'l') goto yy564; + goto yy87; +yy416: yych = *++cursor_; - if (yych == 'n') goto yy515; - goto yy50; -yy366: + if (yych == 'n') goto yy565; + goto yy87; +yy417: yych = *++cursor_; - if (yych == 't') goto yy516; - goto yy50; -yy367: + if (yych == 't') goto yy566; + goto yy87; +yy418: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 447 "src/wast-lexer.cc" +#line 449 "src/wast-lexer.cc" { RETURN(EXPORT); } -#line 2840 "src/prebuilt/wast-lexer-gen.cc" -yy369: +#line 2873 "src/prebuilt/wast-lexer-gen.cc" +yy420: yych = *++cursor_; - if (yych == 's') goto yy517; - goto yy50; -yy370: + if (yych == 's') goto yy567; + goto yy87; +yy421: yych = *++cursor_; - if (yych == 'd') goto yy519; - goto yy50; -yy371: + if (yych == 'd') goto yy569; + goto yy87; +yy422: yych = *++cursor_; - if (yych == 'i') goto yy521; - goto yy50; -yy372: + if (yych == 'i') goto yy571; + goto yy87; +yy423: yych = *++cursor_; - if (yych == 'n') goto yy522; - if (yych == 'p') goto yy523; - goto yy50; -yy373: + if (yych == 'n') goto yy572; + if (yych == 'p') goto yy573; + goto yy87; +yy424: yych = *++cursor_; - if (yych == 'm') goto yy524; - goto yy50; -yy374: + if (yych == 'm') goto yy574; + goto yy87; +yy425: yych = *++cursor_; - if (yych == 'v') goto yy525; - goto yy50; -yy375: + if (yych == 'v') goto yy575; + goto yy87; +yy426: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 392 "src/wast-lexer.cc" +#line 394 "src/wast-lexer.cc" { OPCODE(F32Eq); RETURN(COMPARE); } -#line 2873 "src/prebuilt/wast-lexer-gen.cc" -yy377: +#line 2906 "src/prebuilt/wast-lexer-gen.cc" +yy428: yych = *++cursor_; - if (yych == 'o') goto yy527; - goto yy50; -yy378: + if (yych == 'o') goto yy577; + goto yy87; +yy429: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 402 "src/wast-lexer.cc" +#line 404 "src/wast-lexer.cc" { OPCODE(F32Ge); RETURN(COMPARE); } -#line 2885 "src/prebuilt/wast-lexer-gen.cc" -yy380: +#line 2918 "src/prebuilt/wast-lexer-gen.cc" +yy431: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 400 "src/wast-lexer.cc" +#line 402 "src/wast-lexer.cc" { OPCODE(F32Gt); RETURN(COMPARE); } -#line 2893 "src/prebuilt/wast-lexer-gen.cc" -yy382: +#line 2926 "src/prebuilt/wast-lexer-gen.cc" +yy433: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 398 "src/wast-lexer.cc" +#line 400 "src/wast-lexer.cc" { OPCODE(F32Le); RETURN(COMPARE); } -#line 2901 "src/prebuilt/wast-lexer-gen.cc" -yy384: +#line 2934 "src/prebuilt/wast-lexer-gen.cc" +yy435: yych = *++cursor_; - if (yych == 'a') goto yy528; - goto yy50; -yy385: + if (yych == 'a') goto yy578; + goto yy87; +yy436: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 396 "src/wast-lexer.cc" +#line 398 "src/wast-lexer.cc" { OPCODE(F32Lt); RETURN(COMPARE); } -#line 2913 "src/prebuilt/wast-lexer-gen.cc" -yy387: +#line 2946 "src/prebuilt/wast-lexer-gen.cc" +yy438: yych = *++cursor_; - if (yych == 'x') goto yy529; - goto yy50; -yy388: + if (yych == 'x') goto yy579; + goto yy87; +yy439: yych = *++cursor_; - if (yych == 'n') goto yy531; - goto yy50; -yy389: + if (yych == 'n') goto yy581; + goto yy87; +yy440: yych = *++cursor_; - if (yych == 'l') goto yy533; - goto yy50; -yy390: + if (yych == 'l') goto yy583; + goto yy87; +yy441: ++cursor_; - if ((yych = *cursor_) <= '[') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy391; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ':') { + if (yych <= '"') { + if (yych == '!') goto yy86; } else { - if (yych <= ':') { - if (yych != ',') goto yy49; - } else { - if (yych <= ';') goto yy391; - if (yych <= 'Z') goto yy49; - } + if (yych <= '\'') goto yy86; + if (yych >= '*') goto yy86; } } else { - if (yych <= 'g') { - if (yych <= '`') { - if (yych != ']') goto yy49; - } else { - if (yych <= 'a') goto yy535; - if (yych <= 'f') goto yy49; - goto yy536; - } + if (yych <= 'a') { + if (yych <= ';') goto yy442; + if (yych <= '`') goto yy86; + goto yy585; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych == 'g') goto yy586; + if (yych <= '~') goto yy86; } } -yy391: -#line 394 "src/wast-lexer.cc" +yy442: +#line 396 "src/wast-lexer.cc" { OPCODE(F32Ne); RETURN(COMPARE); } -#line 2964 "src/prebuilt/wast-lexer-gen.cc" -yy392: +#line 2981 "src/prebuilt/wast-lexer-gen.cc" +yy443: yych = *++cursor_; - if (yych == 'i') goto yy538; - goto yy50; -yy393: + if (yych == 'i') goto yy588; + goto yy87; +yy444: yych = *++cursor_; - if (yych == 'r') goto yy539; - goto yy50; -yy394: + if (yych == 'r') goto yy589; + goto yy87; +yy445: yych = *++cursor_; - if (yych == 'o') goto yy540; - goto yy50; -yy395: + if (yych == 'o') goto yy590; + goto yy87; +yy446: yych = *++cursor_; - if (yych == 'b') goto yy541; - goto yy50; -yy396: + if (yych == 'b') goto yy591; + goto yy87; +yy447: yych = *++cursor_; - if (yych == 'u') goto yy543; - goto yy50; -yy397: + if (yych == 'u') goto yy593; + goto yy87; +yy448: yych = *++cursor_; - if (yych == 's') goto yy544; - goto yy50; -yy398: + if (yych == 's') goto yy594; + goto yy87; +yy449: yych = *++cursor_; - if (yych == 'd') goto yy546; - goto yy50; -yy399: + if (yych == 'd') goto yy596; + goto yy87; +yy450: yych = *++cursor_; - if (yych == 'i') goto yy548; - goto yy50; -yy400: + if (yych == 'i') goto yy598; + goto yy87; +yy451: yych = *++cursor_; - if (yych == 'n') goto yy549; - if (yych == 'p') goto yy550; - goto yy50; -yy401: + if (yych == 'n') goto yy599; + if (yych == 'p') goto yy600; + goto yy87; +yy452: yych = *++cursor_; - if (yych == 'v') goto yy551; - goto yy50; -yy402: + if (yych == 'v') goto yy601; + goto yy87; +yy453: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 393 "src/wast-lexer.cc" +#line 395 "src/wast-lexer.cc" { OPCODE(F64Eq); RETURN(COMPARE); } -#line 3013 "src/prebuilt/wast-lexer-gen.cc" -yy404: +#line 3030 "src/prebuilt/wast-lexer-gen.cc" +yy455: yych = *++cursor_; - if (yych == 'o') goto yy553; - goto yy50; -yy405: + if (yych == 'o') goto yy603; + goto yy87; +yy456: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 403 "src/wast-lexer.cc" +#line 405 "src/wast-lexer.cc" { OPCODE(F64Ge); RETURN(COMPARE); } -#line 3025 "src/prebuilt/wast-lexer-gen.cc" -yy407: +#line 3042 "src/prebuilt/wast-lexer-gen.cc" +yy458: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 401 "src/wast-lexer.cc" +#line 403 "src/wast-lexer.cc" { OPCODE(F64Gt); RETURN(COMPARE); } -#line 3033 "src/prebuilt/wast-lexer-gen.cc" -yy409: +#line 3050 "src/prebuilt/wast-lexer-gen.cc" +yy460: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 399 "src/wast-lexer.cc" +#line 401 "src/wast-lexer.cc" { OPCODE(F64Le); RETURN(COMPARE); } -#line 3041 "src/prebuilt/wast-lexer-gen.cc" -yy411: +#line 3058 "src/prebuilt/wast-lexer-gen.cc" +yy462: yych = *++cursor_; - if (yych == 'a') goto yy554; - goto yy50; -yy412: + if (yych == 'a') goto yy604; + goto yy87; +yy463: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 397 "src/wast-lexer.cc" +#line 399 "src/wast-lexer.cc" { OPCODE(F64Lt); RETURN(COMPARE); } -#line 3053 "src/prebuilt/wast-lexer-gen.cc" -yy414: +#line 3070 "src/prebuilt/wast-lexer-gen.cc" +yy465: yych = *++cursor_; - if (yych == 'x') goto yy555; - goto yy50; -yy415: + if (yych == 'x') goto yy605; + goto yy87; +yy466: yych = *++cursor_; - if (yych == 'n') goto yy557; - goto yy50; -yy416: + if (yych == 'n') goto yy607; + goto yy87; +yy467: yych = *++cursor_; - if (yych == 'l') goto yy559; - goto yy50; -yy417: + if (yych == 'l') goto yy609; + goto yy87; +yy468: ++cursor_; - if ((yych = *cursor_) <= '[') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy418; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ':') { + if (yych <= '"') { + if (yych == '!') goto yy86; } else { - if (yych <= ':') { - if (yych != ',') goto yy49; - } else { - if (yych <= ';') goto yy418; - if (yych <= 'Z') goto yy49; - } + if (yych <= '\'') goto yy86; + if (yych >= '*') goto yy86; } } else { - if (yych <= 'g') { - if (yych <= '`') { - if (yych != ']') goto yy49; - } else { - if (yych <= 'a') goto yy561; - if (yych <= 'f') goto yy49; - goto yy562; - } + if (yych <= 'a') { + if (yych <= ';') goto yy469; + if (yych <= '`') goto yy86; + goto yy611; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych == 'g') goto yy612; + if (yych <= '~') goto yy86; } } -yy418: -#line 395 "src/wast-lexer.cc" +yy469: +#line 397 "src/wast-lexer.cc" { OPCODE(F64Ne); RETURN(COMPARE); } -#line 3104 "src/prebuilt/wast-lexer-gen.cc" -yy419: +#line 3105 "src/prebuilt/wast-lexer-gen.cc" +yy470: yych = *++cursor_; - if (yych == 'o') goto yy564; - goto yy50; -yy420: + if (yych == 'o') goto yy614; + goto yy87; +yy471: yych = *++cursor_; - if (yych == 'i') goto yy565; - goto yy50; -yy421: + if (yych == 'i') goto yy615; + goto yy87; +yy472: yych = *++cursor_; - if (yych == 'r') goto yy566; - goto yy50; -yy422: + if (yych == 'r') goto yy616; + goto yy87; +yy473: yych = *++cursor_; - if (yych == 'o') goto yy567; - goto yy50; -yy423: + if (yych == 'o') goto yy617; + goto yy87; +yy474: yych = *++cursor_; - if (yych == 'b') goto yy568; - goto yy50; -yy424: + if (yych == 'b') goto yy618; + goto yy87; +yy475: yych = *++cursor_; - if (yych == 'u') goto yy570; - goto yy50; -yy425: + if (yych == 'u') goto yy620; + goto yy87; +yy476: yych = *++cursor_; - if (yych == 'o') goto yy571; - goto yy50; -yy426: + if (yych == 'o') goto yy621; + goto yy87; +yy477: yych = *++cursor_; - if (yych == 'c') goto yy572; - goto yy50; -yy427: + if (yych == 'c') goto yy622; + goto yy87; +yy478: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 438 "src/wast-lexer.cc" +#line 440 "src/wast-lexer.cc" { RETURN(GLOBAL); } -#line 3144 "src/prebuilt/wast-lexer-gen.cc" -yy429: +#line 3145 "src/prebuilt/wast-lexer-gen.cc" +yy480: yych = *++cursor_; - if (yych == 'e') goto yy573; - goto yy50; -yy430: + if (yych == 'e') goto yy623; + goto yy87; +yy481: yych = *++cursor_; - if (yych == 'd') goto yy574; - goto yy50; -yy431: + if (yych == 'd') goto yy624; + goto yy87; +yy482: yych = *++cursor_; - if (yych == 'd') goto yy576; - goto yy50; -yy432: + if (yych == 'd') goto yy626; + goto yy87; +yy483: yych = *++cursor_; - if (yych == 'z') goto yy578; - goto yy50; -yy433: + if (yych == 'z') goto yy628; + goto yy87; +yy484: yych = *++cursor_; - if (yych == 'n') goto yy580; - goto yy50; -yy434: + if (yych == 'n') goto yy630; + goto yy87; +yy485: yych = *++cursor_; - if (yych == 'z') goto yy581; - goto yy50; -yy435: + if (yych == 'z') goto yy631; + goto yy87; +yy486: yych = *++cursor_; - if (yych == 'v') goto yy583; - goto yy50; -yy436: + if (yych == 'v') goto yy633; + goto yy87; +yy487: ++cursor_; - if ((yych = *cursor_) <= 'Z') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy437; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych != ';') goto yy49; - } + if (yych <= '"') goto yy488; + if (yych <= '\'') goto yy86; } } else { - if (yych <= 'z') { - if (yych <= '\\') { - if (yych >= '\\') goto yy49; - } else { - if (yych <= ']') goto yy437; - if (yych <= 'y') goto yy49; - goto yy584; - } + if (yych <= 'y') { + if (yych != ';') goto yy86; } else { - if (yych <= '|') { - if (yych >= '|') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= 'z') goto yy634; + if (yych <= '~') goto yy86; } } -yy437: -#line 372 "src/wast-lexer.cc" +yy488: +#line 374 "src/wast-lexer.cc" { OPCODE(I32Eq); RETURN(COMPARE); } -#line 3210 "src/prebuilt/wast-lexer-gen.cc" -yy438: +#line 3194 "src/prebuilt/wast-lexer-gen.cc" +yy489: yych = *++cursor_; - if (yych == '_') goto yy586; - goto yy50; -yy439: + if (yych == '_') goto yy636; + goto yy87; +yy490: yych = *++cursor_; - if (yych == '_') goto yy587; - goto yy50; -yy440: + if (yych == '_') goto yy637; + goto yy87; +yy491: yych = *++cursor_; - if (yych == '_') goto yy588; - goto yy50; -yy441: + if (yych == '_') goto yy638; + goto yy87; +yy492: yych = *++cursor_; - if (yych == 'a') goto yy589; - goto yy50; -yy442: + if (yych == 'a') goto yy639; + goto yy87; +yy493: yych = *++cursor_; - if (yych == '_') goto yy590; - goto yy50; -yy443: + if (yych == '_') goto yy640; + goto yy87; +yy494: yych = *++cursor_; - if (yych == 'l') goto yy591; - goto yy50; -yy444: + if (yych == 'l') goto yy641; + goto yy87; +yy495: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 374 "src/wast-lexer.cc" +#line 376 "src/wast-lexer.cc" { OPCODE(I32Ne); RETURN(COMPARE); } -#line 3242 "src/prebuilt/wast-lexer-gen.cc" -yy446: +#line 3226 "src/prebuilt/wast-lexer-gen.cc" +yy497: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 344 "src/wast-lexer.cc" +#line 346 "src/wast-lexer.cc" { OPCODE(I32Or); RETURN(BINARY); } -#line 3250 "src/prebuilt/wast-lexer-gen.cc" -yy448: +#line 3234 "src/prebuilt/wast-lexer-gen.cc" +yy499: yych = *++cursor_; - if (yych == 'p') goto yy593; - goto yy50; -yy449: + if (yych == 'p') goto yy643; + goto yy87; +yy500: yych = *++cursor_; - if (yych == 'i') goto yy594; - if (yych == 'm') goto yy595; - goto yy50; -yy450: + if (yych == 'i') goto yy644; + if (yych == 'm') goto yy645; + goto yy87; +yy501: yych = *++cursor_; - if (yych == 't') goto yy596; - goto yy50; -yy451: + if (yych == 't') goto yy646; + goto yy87; +yy502: yych = *++cursor_; - if (yych == 'l') goto yy597; - if (yych == 'r') goto yy599; - goto yy50; -yy452: + if (yych == 'l') goto yy647; + if (yych == 'r') goto yy649; + goto yy87; +yy503: yych = *++cursor_; - if (yych == 'o') goto yy600; - goto yy50; -yy453: + if (yych == 'o') goto yy650; + goto yy87; +yy504: yych = *++cursor_; - if (yych == 'b') goto yy601; - goto yy50; -yy454: + if (yych == 'b') goto yy651; + goto yy87; +yy505: yych = *++cursor_; - if (yych == 'u') goto yy603; - goto yy50; -yy455: + if (yych == 'u') goto yy653; + goto yy87; +yy506: yych = *++cursor_; - if (yych == 'a') goto yy604; - goto yy50; -yy456: + if (yych == 'a') goto yy654; + goto yy87; +yy507: yych = *++cursor_; - if (yych == 'r') goto yy605; - goto yy50; -yy457: + if (yych == 'r') goto yy655; + goto yy87; +yy508: yych = *++cursor_; - if (yych == 'd') goto yy607; - goto yy50; -yy458: + if (yych == 'd') goto yy657; + goto yy87; +yy509: yych = *++cursor_; - if (yych == 'd') goto yy609; - goto yy50; -yy459: + if (yych == 'd') goto yy659; + goto yy87; +yy510: yych = *++cursor_; - if (yych == 'z') goto yy611; - goto yy50; -yy460: + if (yych == 'z') goto yy661; + goto yy87; +yy511: yych = *++cursor_; - if (yych == 'n') goto yy613; - goto yy50; -yy461: + if (yych == 'n') goto yy663; + goto yy87; +yy512: yych = *++cursor_; - if (yych == 'z') goto yy614; - goto yy50; -yy462: + if (yych == 'z') goto yy664; + goto yy87; +yy513: yych = *++cursor_; - if (yych == 'v') goto yy616; - goto yy50; -yy463: + if (yych == 'v') goto yy666; + goto yy87; +yy514: ++cursor_; - if ((yych = *cursor_) <= 'Z') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy464; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych != ';') goto yy49; - } + if (yych <= '"') goto yy515; + if (yych <= '\'') goto yy86; } } else { - if (yych <= 'z') { - if (yych <= '\\') { - if (yych >= '\\') goto yy49; - } else { - if (yych <= ']') goto yy464; - if (yych <= 'y') goto yy49; - goto yy617; - } + if (yych <= 'y') { + if (yych != ';') goto yy86; } else { - if (yych <= '|') { - if (yych >= '|') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= 'z') goto yy667; + if (yych <= '~') goto yy86; } } -yy464: -#line 373 "src/wast-lexer.cc" +yy515: +#line 375 "src/wast-lexer.cc" { OPCODE(I64Eq); RETURN(COMPARE); } -#line 3350 "src/prebuilt/wast-lexer-gen.cc" -yy465: +#line 3317 "src/prebuilt/wast-lexer-gen.cc" +yy516: yych = *++cursor_; - if (yych == 't') goto yy619; - goto yy50; -yy466: + if (yych == 't') goto yy669; + goto yy87; +yy517: yych = *++cursor_; - if (yych == '_') goto yy620; - goto yy50; -yy467: + if (yych == '_') goto yy670; + goto yy87; +yy518: yych = *++cursor_; - if (yych == '_') goto yy621; - goto yy50; -yy468: + if (yych == '_') goto yy671; + goto yy87; +yy519: yych = *++cursor_; - if (yych == '_') goto yy622; - goto yy50; -yy469: + if (yych == '_') goto yy672; + goto yy87; +yy520: yych = *++cursor_; - if (yych == 'a') goto yy623; - goto yy50; -yy470: + if (yych == 'a') goto yy673; + goto yy87; +yy521: yych = *++cursor_; - if (yych == '_') goto yy624; - goto yy50; -yy471: + if (yych == '_') goto yy674; + goto yy87; +yy522: yych = *++cursor_; - if (yych == 'l') goto yy625; - goto yy50; -yy472: + if (yych == 'l') goto yy675; + goto yy87; +yy523: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 375 "src/wast-lexer.cc" +#line 377 "src/wast-lexer.cc" { OPCODE(I64Ne); RETURN(COMPARE); } -#line 3386 "src/prebuilt/wast-lexer-gen.cc" -yy474: +#line 3353 "src/prebuilt/wast-lexer-gen.cc" +yy525: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 345 "src/wast-lexer.cc" +#line 347 "src/wast-lexer.cc" { OPCODE(I64Or); RETURN(BINARY); } -#line 3394 "src/prebuilt/wast-lexer-gen.cc" -yy476: +#line 3361 "src/prebuilt/wast-lexer-gen.cc" +yy527: yych = *++cursor_; - if (yych == 'p') goto yy627; - goto yy50; -yy477: + if (yych == 'p') goto yy677; + goto yy87; +yy528: yych = *++cursor_; - if (yych == 'i') goto yy628; - if (yych == 'm') goto yy629; - goto yy50; -yy478: + if (yych == 'i') goto yy678; + if (yych == 'm') goto yy679; + goto yy87; +yy529: yych = *++cursor_; - if (yych == 't') goto yy630; - goto yy50; -yy479: + if (yych == 't') goto yy680; + goto yy87; +yy530: yych = *++cursor_; - if (yych == 'l') goto yy631; - if (yych == 'r') goto yy633; - goto yy50; -yy480: + if (yych == 'l') goto yy681; + if (yych == 'r') goto yy683; + goto yy87; +yy531: yych = *++cursor_; - if (yych == 'o') goto yy634; - goto yy50; -yy481: + if (yych == 'o') goto yy684; + goto yy87; +yy532: yych = *++cursor_; - if (yych == 'b') goto yy635; - goto yy50; -yy482: + if (yych == 'b') goto yy685; + goto yy87; +yy533: yych = *++cursor_; - if (yych == 'u') goto yy637; - goto yy50; -yy483: + if (yych == 'u') goto yy687; + goto yy87; +yy534: yych = *++cursor_; - if (yych == 'r') goto yy638; - goto yy50; -yy484: + if (yych == 'r') goto yy688; + goto yy87; +yy535: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 446 "src/wast-lexer.cc" +#line 448 "src/wast-lexer.cc" { RETURN(IMPORT); } -#line 3436 "src/prebuilt/wast-lexer-gen.cc" -yy486: - yych = *++cursor_; - if (yych == 't') goto yy640; - goto yy50; -yy487: +#line 3403 "src/prebuilt/wast-lexer-gen.cc" +yy537: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 449 "src/wast-lexer.cc" +#line 451 "src/wast-lexer.cc" { RETURN(INVOKE); } -#line 3448 "src/prebuilt/wast-lexer-gen.cc" -yy489: +#line 3411 "src/prebuilt/wast-lexer-gen.cc" +yy539: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 441 "src/wast-lexer.cc" +#line 443 "src/wast-lexer.cc" { RETURN(MEMORY); } -#line 3456 "src/prebuilt/wast-lexer-gen.cc" -yy491: +#line 3419 "src/prebuilt/wast-lexer-gen.cc" +yy541: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 439 "src/wast-lexer.cc" +#line 441 "src/wast-lexer.cc" { RETURN(MODULE); } -#line 3464 "src/prebuilt/wast-lexer-gen.cc" -yy493: +#line 3427 "src/prebuilt/wast-lexer-gen.cc" +yy543: yych = *++cursor_; if (yych <= '@') { - if (yych <= '/') goto yy50; - if (yych <= '9') goto yy641; - goto yy50; + if (yych <= '/') goto yy87; + if (yych <= '9') goto yy690; + goto yy87; } else { - if (yych <= 'F') goto yy641; - if (yych <= '`') goto yy50; - if (yych <= 'f') goto yy641; - goto yy50; + if (yych <= 'F') goto yy690; + if (yych <= '`') goto yy87; + if (yych <= 'f') goto yy690; + goto yy87; } -yy494: +yy544: ++cursor_; - if ((yych = *cursor_) <= '<') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy495; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych != ';') goto yy49; - } + if (yych <= '"') goto yy545; + if (yych <= '\'') goto yy86; } } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych <= '=') goto yy643; - goto yy49; - } else { - if (yych == '\\') goto yy49; - } + if (yych <= '<') { + if (yych != ';') goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= '=') goto yy692; + if (yych <= '~') goto yy86; } } -yy495: -#line 445 "src/wast-lexer.cc" +yy545: +#line 447 "src/wast-lexer.cc" { RETURN(OFFSET); } -#line 3513 "src/prebuilt/wast-lexer-gen.cc" -yy496: +#line 3460 "src/prebuilt/wast-lexer-gen.cc" +yy546: yych = *++cursor_; - if (yych == 'e') goto yy644; - goto yy50; -yy497: + if (yych == 'e') goto yy693; + goto yy87; +yy547: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 436 "src/wast-lexer.cc" +#line 438 "src/wast-lexer.cc" { RETURN(RESULT); } -#line 3525 "src/prebuilt/wast-lexer-gen.cc" -yy499: +#line 3472 "src/prebuilt/wast-lexer-gen.cc" +yy549: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 271 "src/wast-lexer.cc" +#line 273 "src/wast-lexer.cc" { RETURN(RETURN); } -#line 3533 "src/prebuilt/wast-lexer-gen.cc" -yy501: +#line 3480 "src/prebuilt/wast-lexer-gen.cc" +yy551: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 429 "src/wast-lexer.cc" +#line 431 "src/wast-lexer.cc" { RETURN(SELECT); } -#line 3541 "src/prebuilt/wast-lexer-gen.cc" -yy503: +#line 3488 "src/prebuilt/wast-lexer-gen.cc" +yy553: yych = *++cursor_; - if (yych == 'o') goto yy645; - goto yy50; -yy504: + if (yych == 'o') goto yy694; + goto yy87; +yy554: yych = *++cursor_; - if (yych == 'c') goto yy646; - goto yy50; -yy505: + if (yych == 'c') goto yy695; + goto yy87; +yy555: yych = *++cursor_; - if (yych == 'c') goto yy647; - goto yy50; -yy506: + if (yych == 'c') goto yy696; + goto yy87; +yy556: yych = *++cursor_; - if (yych == 'h') goto yy648; - goto yy50; -yy507: + if (yych == 'h') goto yy697; + goto yy87; +yy557: ++cursor_; - if ((yych = *cursor_) <= ';') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy508; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= '/') { + if (yych <= '"') { + if (yych == '!') goto yy86; } else { - if (yych <= '/') { - if (yych != ',') goto yy49; - } else { - if (yych <= '9') goto yy509; - if (yych <= ':') goto yy49; - } + if (yych <= '\'') goto yy86; + if (yych >= '*') goto yy86; } } else { - if (yych <= 'x') { - if (yych <= '\\') { - if (yych != '[') goto yy49; - } else { - if (yych <= ']') goto yy508; - if (yych <= 'w') goto yy49; - goto yy649; - } + if (yych <= ';') { + if (yych <= '9') goto yy559; + if (yych <= ':') goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych == 'x') goto yy698; + if (yych <= '~') goto yy86; } } -yy508: -#line 301 "src/wast-lexer.cc" +yy558: +#line 303 "src/wast-lexer.cc" { TEXT_AT(6); RETURN(ALIGN_EQ_NAT); } -#line 3596 "src/prebuilt/wast-lexer-gen.cc" -yy509: +#line 3526 "src/prebuilt/wast-lexer-gen.cc" +yy559: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; - if (yych <= ':') { - if (yych <= ')') { - if (yych <= '!') { - if (yych <= ' ') goto yy508; - goto yy49; - } else { - if (yych <= '"') goto yy508; - if (yych <= '\'') goto yy49; - goto yy508; - } + if (yych <= ')') { + if (yych <= '!') { + if (yych <= ' ') goto yy558; + goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - goto yy508; - } else { - if (yych <= '/') goto yy49; - if (yych <= '9') goto yy509; - goto yy49; - } + if (yych <= '"') goto yy558; + if (yych <= '\'') goto yy86; + goto yy558; } } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych <= ';') goto yy508; - goto yy49; - } else { - if (yych == '\\') goto yy49; - goto yy508; - } + if (yych <= ':') { + if (yych <= '/') goto yy86; + if (yych <= '9') goto yy559; + goto yy86; } else { - if (yych <= '|') { - if (yych == '{') goto yy508; - goto yy49; - } else { - if (yych == '~') goto yy49; - goto yy508; - } + if (yych <= ';') goto yy558; + if (yych <= '~') goto yy86; + goto yy558; } } -yy511: +yy561: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 256 "src/wast-lexer.cc" +#line 258 "src/wast-lexer.cc" { RETURN(ANYFUNC); } -#line 3647 "src/prebuilt/wast-lexer-gen.cc" -yy513: +#line 3558 "src/prebuilt/wast-lexer-gen.cc" +yy563: yych = *++cursor_; switch (yych) { - case 'e': goto yy650; - case 'i': goto yy651; - case 'm': goto yy652; - case 'r': goto yy653; - case 't': goto yy654; - case 'u': goto yy655; - default: goto yy50; + case 'e': goto yy699; + case 'i': goto yy700; + case 'm': goto yy701; + case 'r': goto yy702; + case 't': goto yy703; + case 'u': goto yy704; + default: goto yy87; } -yy514: +yy564: yych = *++cursor_; - if (yych == 'e') goto yy656; - goto yy50; -yy515: + if (yych == 'e') goto yy705; + goto yy87; +yy565: yych = *++cursor_; - if (yych == 'd') goto yy658; - goto yy50; -yy516: + if (yych == 'd') goto yy707; + goto yy87; +yy566: yych = *++cursor_; - if (yych == '_') goto yy659; - goto yy50; -yy517: + if (yych == '_') goto yy708; + goto yy87; +yy567: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 316 "src/wast-lexer.cc" +#line 318 "src/wast-lexer.cc" { OPCODE(F32Abs); RETURN(UNARY); } -#line 3678 "src/prebuilt/wast-lexer-gen.cc" -yy519: +#line 3589 "src/prebuilt/wast-lexer-gen.cc" +yy569: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 358 "src/wast-lexer.cc" +#line 360 "src/wast-lexer.cc" { OPCODE(F32Add); RETURN(BINARY); } -#line 3686 "src/prebuilt/wast-lexer-gen.cc" -yy521: +#line 3597 "src/prebuilt/wast-lexer-gen.cc" +yy571: yych = *++cursor_; - if (yych == 'l') goto yy660; - goto yy50; -yy522: + if (yych == 'l') goto yy709; + goto yy87; +yy572: yych = *++cursor_; - if (yych == 's') goto yy662; - if (yych == 'v') goto yy663; - goto yy50; -yy523: + if (yych == 's') goto yy711; + if (yych == 'v') goto yy712; + goto yy87; +yy573: yych = *++cursor_; - if (yych == 'y') goto yy664; - goto yy50; -yy524: + if (yych == 'y') goto yy713; + goto yy87; +yy574: yych = *++cursor_; - if (yych == 'o') goto yy665; - goto yy50; -yy525: + if (yych == 'o') goto yy714; + goto yy87; +yy575: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 364 "src/wast-lexer.cc" +#line 366 "src/wast-lexer.cc" { OPCODE(F32Div); RETURN(BINARY); } -#line 3711 "src/prebuilt/wast-lexer-gen.cc" -yy527: +#line 3622 "src/prebuilt/wast-lexer-gen.cc" +yy577: yych = *++cursor_; - if (yych == 'o') goto yy666; - goto yy50; -yy528: + if (yych == 'o') goto yy715; + goto yy87; +yy578: yych = *++cursor_; - if (yych == 'd') goto yy667; - goto yy50; -yy529: + if (yych == 'd') goto yy716; + goto yy87; +yy579: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 368 "src/wast-lexer.cc" +#line 370 "src/wast-lexer.cc" { OPCODE(F32Max); RETURN(BINARY); } -#line 3727 "src/prebuilt/wast-lexer-gen.cc" -yy531: +#line 3638 "src/prebuilt/wast-lexer-gen.cc" +yy581: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 366 "src/wast-lexer.cc" +#line 368 "src/wast-lexer.cc" { OPCODE(F32Min); RETURN(BINARY); } -#line 3735 "src/prebuilt/wast-lexer-gen.cc" -yy533: +#line 3646 "src/prebuilt/wast-lexer-gen.cc" +yy583: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 362 "src/wast-lexer.cc" +#line 364 "src/wast-lexer.cc" { OPCODE(F32Mul); RETURN(BINARY); } -#line 3743 "src/prebuilt/wast-lexer-gen.cc" -yy535: +#line 3654 "src/prebuilt/wast-lexer-gen.cc" +yy585: yych = *++cursor_; - if (yych == 'r') goto yy669; - goto yy50; -yy536: + if (yych == 'r') goto yy718; + goto yy87; +yy586: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 314 "src/wast-lexer.cc" +#line 316 "src/wast-lexer.cc" { OPCODE(F32Neg); RETURN(UNARY); } -#line 3755 "src/prebuilt/wast-lexer-gen.cc" -yy538: +#line 3666 "src/prebuilt/wast-lexer-gen.cc" +yy588: yych = *++cursor_; - if (yych == 'n') goto yy670; - goto yy50; -yy539: + if (yych == 'n') goto yy719; + goto yy87; +yy589: yych = *++cursor_; - if (yych == 't') goto yy671; - goto yy50; -yy540: + if (yych == 't') goto yy720; + goto yy87; +yy590: yych = *++cursor_; - if (yych == 'r') goto yy673; - goto yy50; -yy541: + if (yych == 'r') goto yy722; + goto yy87; +yy591: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 360 "src/wast-lexer.cc" +#line 362 "src/wast-lexer.cc" { OPCODE(F32Sub); RETURN(BINARY); } -#line 3775 "src/prebuilt/wast-lexer-gen.cc" -yy543: +#line 3686 "src/prebuilt/wast-lexer-gen.cc" +yy593: yych = *++cursor_; - if (yych == 'n') goto yy674; - goto yy50; -yy544: + if (yych == 'n') goto yy723; + goto yy87; +yy594: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 317 "src/wast-lexer.cc" +#line 319 "src/wast-lexer.cc" { OPCODE(F64Abs); RETURN(UNARY); } -#line 3787 "src/prebuilt/wast-lexer-gen.cc" -yy546: +#line 3698 "src/prebuilt/wast-lexer-gen.cc" +yy596: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 359 "src/wast-lexer.cc" +#line 361 "src/wast-lexer.cc" { OPCODE(F64Add); RETURN(BINARY); } -#line 3795 "src/prebuilt/wast-lexer-gen.cc" -yy548: +#line 3706 "src/prebuilt/wast-lexer-gen.cc" +yy598: yych = *++cursor_; - if (yych == 'l') goto yy675; - goto yy50; -yy549: + if (yych == 'l') goto yy724; + goto yy87; +yy599: yych = *++cursor_; - if (yych == 's') goto yy677; - if (yych == 'v') goto yy678; - goto yy50; -yy550: + if (yych == 's') goto yy726; + if (yych == 'v') goto yy727; + goto yy87; +yy600: yych = *++cursor_; - if (yych == 'y') goto yy679; - goto yy50; -yy551: + if (yych == 'y') goto yy728; + goto yy87; +yy601: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 365 "src/wast-lexer.cc" +#line 367 "src/wast-lexer.cc" { OPCODE(F64Div); RETURN(BINARY); } -#line 3816 "src/prebuilt/wast-lexer-gen.cc" -yy553: +#line 3727 "src/prebuilt/wast-lexer-gen.cc" +yy603: yych = *++cursor_; - if (yych == 'o') goto yy680; - goto yy50; -yy554: + if (yych == 'o') goto yy729; + goto yy87; +yy604: yych = *++cursor_; - if (yych == 'd') goto yy681; - goto yy50; -yy555: + if (yych == 'd') goto yy730; + goto yy87; +yy605: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 369 "src/wast-lexer.cc" +#line 371 "src/wast-lexer.cc" { OPCODE(F64Max); RETURN(BINARY); } -#line 3832 "src/prebuilt/wast-lexer-gen.cc" -yy557: +#line 3743 "src/prebuilt/wast-lexer-gen.cc" +yy607: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 367 "src/wast-lexer.cc" +#line 369 "src/wast-lexer.cc" { OPCODE(F64Min); RETURN(BINARY); } -#line 3840 "src/prebuilt/wast-lexer-gen.cc" -yy559: +#line 3751 "src/prebuilt/wast-lexer-gen.cc" +yy609: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 363 "src/wast-lexer.cc" +#line 365 "src/wast-lexer.cc" { OPCODE(F64Mul); RETURN(BINARY); } -#line 3848 "src/prebuilt/wast-lexer-gen.cc" -yy561: +#line 3759 "src/prebuilt/wast-lexer-gen.cc" +yy611: yych = *++cursor_; - if (yych == 'r') goto yy683; - goto yy50; -yy562: + if (yych == 'r') goto yy732; + goto yy87; +yy612: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 315 "src/wast-lexer.cc" +#line 317 "src/wast-lexer.cc" { OPCODE(F64Neg); RETURN(UNARY); } -#line 3860 "src/prebuilt/wast-lexer-gen.cc" -yy564: +#line 3771 "src/prebuilt/wast-lexer-gen.cc" +yy614: yych = *++cursor_; - if (yych == 'm') goto yy684; - goto yy50; -yy565: + if (yych == 'm') goto yy733; + goto yy87; +yy615: yych = *++cursor_; - if (yych == 'n') goto yy685; - goto yy50; -yy566: + if (yych == 'n') goto yy734; + goto yy87; +yy616: yych = *++cursor_; - if (yych == 't') goto yy686; - goto yy50; -yy567: + if (yych == 't') goto yy735; + goto yy87; +yy617: yych = *++cursor_; - if (yych == 'r') goto yy688; - goto yy50; -yy568: + if (yych == 'r') goto yy737; + goto yy87; +yy618: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 361 "src/wast-lexer.cc" +#line 363 "src/wast-lexer.cc" { OPCODE(F64Sub); RETURN(BINARY); } -#line 3884 "src/prebuilt/wast-lexer-gen.cc" -yy570: +#line 3795 "src/prebuilt/wast-lexer-gen.cc" +yy620: yych = *++cursor_; - if (yych == 'n') goto yy689; - goto yy50; -yy571: + if (yych == 'n') goto yy738; + goto yy87; +yy621: yych = *++cursor_; - if (yych == 'b') goto yy690; - goto yy50; -yy572: + if (yych == 'b') goto yy739; + goto yy87; +yy622: yych = *++cursor_; - if (yych == 'a') goto yy691; - goto yy50; -yy573: + if (yych == 'a') goto yy740; + goto yy87; +yy623: yych = *++cursor_; - if (yych == 'm') goto yy692; - goto yy50; -yy574: + if (yych == 'm') goto yy741; + goto yy87; +yy624: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 328 "src/wast-lexer.cc" +#line 330 "src/wast-lexer.cc" { OPCODE(I32Add); RETURN(BINARY); } -#line 3908 "src/prebuilt/wast-lexer-gen.cc" -yy576: +#line 3819 "src/prebuilt/wast-lexer-gen.cc" +yy626: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 342 "src/wast-lexer.cc" +#line 344 "src/wast-lexer.cc" { OPCODE(I32And); RETURN(BINARY); } -#line 3916 "src/prebuilt/wast-lexer-gen.cc" -yy578: +#line 3827 "src/prebuilt/wast-lexer-gen.cc" +yy628: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 308 "src/wast-lexer.cc" +#line 310 "src/wast-lexer.cc" { OPCODE(I32Clz); RETURN(UNARY); } -#line 3924 "src/prebuilt/wast-lexer-gen.cc" -yy580: +#line 3835 "src/prebuilt/wast-lexer-gen.cc" +yy630: yych = *++cursor_; - if (yych == 's') goto yy693; - goto yy50; -yy581: + if (yych == 's') goto yy742; + goto yy87; +yy631: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 310 "src/wast-lexer.cc" +#line 312 "src/wast-lexer.cc" { OPCODE(I32Ctz); RETURN(UNARY); } -#line 3936 "src/prebuilt/wast-lexer-gen.cc" -yy583: +#line 3847 "src/prebuilt/wast-lexer-gen.cc" +yy633: yych = *++cursor_; - if (yych == '_') goto yy694; - goto yy50; -yy584: + if (yych == '_') goto yy743; + goto yy87; +yy634: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 306 "src/wast-lexer.cc" +#line 308 "src/wast-lexer.cc" { OPCODE(I32Eqz); RETURN(CONVERT); } -#line 3948 "src/prebuilt/wast-lexer-gen.cc" -yy586: +#line 3859 "src/prebuilt/wast-lexer-gen.cc" +yy636: yych = *++cursor_; - if (yych == 's') goto yy695; - if (yych == 'u') goto yy697; - goto yy50; -yy587: + if (yych == 's') goto yy744; + if (yych == 'u') goto yy746; + goto yy87; +yy637: yych = *++cursor_; - if (yych == 's') goto yy699; - if (yych == 'u') goto yy701; - goto yy50; -yy588: + if (yych == 's') goto yy748; + if (yych == 'u') goto yy750; + goto yy87; +yy638: yych = *++cursor_; - if (yych == 's') goto yy703; - if (yych == 'u') goto yy705; - goto yy50; -yy589: + if (yych == 's') goto yy752; + if (yych == 'u') goto yy754; + goto yy87; +yy639: yych = *++cursor_; - if (yych == 'd') goto yy707; - goto yy50; -yy590: + if (yych == 'd') goto yy756; + goto yy87; +yy640: yych = *++cursor_; - if (yych == 's') goto yy709; - if (yych == 'u') goto yy711; - goto yy50; -yy591: + if (yych == 's') goto yy758; + if (yych == 'u') goto yy760; + goto yy87; +yy641: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 332 "src/wast-lexer.cc" +#line 334 "src/wast-lexer.cc" { OPCODE(I32Mul); RETURN(BINARY); } -#line 3980 "src/prebuilt/wast-lexer-gen.cc" -yy593: +#line 3891 "src/prebuilt/wast-lexer-gen.cc" +yy643: yych = *++cursor_; - if (yych == 'c') goto yy713; - goto yy50; -yy594: + if (yych == 'c') goto yy762; + goto yy87; +yy644: yych = *++cursor_; - if (yych == 'n') goto yy714; - goto yy50; -yy595: + if (yych == 'n') goto yy763; + goto yy87; +yy645: yych = *++cursor_; - if (yych == '_') goto yy715; - goto yy50; -yy596: + if (yych == '_') goto yy764; + goto yy87; +yy646: yych = *++cursor_; - if (yych == 'l') goto yy716; - if (yych == 'r') goto yy718; - goto yy50; -yy597: + if (yych == 'l') goto yy765; + if (yych == 'r') goto yy767; + goto yy87; +yy647: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 348 "src/wast-lexer.cc" +#line 350 "src/wast-lexer.cc" { OPCODE(I32Shl); RETURN(BINARY); } -#line 4005 "src/prebuilt/wast-lexer-gen.cc" -yy599: +#line 3916 "src/prebuilt/wast-lexer-gen.cc" +yy649: yych = *++cursor_; - if (yych == '_') goto yy720; - goto yy50; -yy600: + if (yych == '_') goto yy769; + goto yy87; +yy650: yych = *++cursor_; - if (yych == 'r') goto yy721; - goto yy50; -yy601: + if (yych == 'r') goto yy770; + goto yy87; +yy651: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 330 "src/wast-lexer.cc" +#line 332 "src/wast-lexer.cc" { OPCODE(I32Sub); RETURN(BINARY); } -#line 4021 "src/prebuilt/wast-lexer-gen.cc" -yy603: +#line 3932 "src/prebuilt/wast-lexer-gen.cc" +yy653: yych = *++cursor_; - if (yych == 'n') goto yy722; - goto yy50; -yy604: + if (yych == 'n') goto yy771; + goto yy87; +yy654: yych = *++cursor_; - if (yych == 'p') goto yy723; - goto yy50; -yy605: + if (yych == 'p') goto yy772; + goto yy87; +yy655: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 346 "src/wast-lexer.cc" +#line 348 "src/wast-lexer.cc" { OPCODE(I32Xor); RETURN(BINARY); } -#line 4037 "src/prebuilt/wast-lexer-gen.cc" -yy607: +#line 3948 "src/prebuilt/wast-lexer-gen.cc" +yy657: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 329 "src/wast-lexer.cc" +#line 331 "src/wast-lexer.cc" { OPCODE(I64Add); RETURN(BINARY); } -#line 4045 "src/prebuilt/wast-lexer-gen.cc" -yy609: +#line 3956 "src/prebuilt/wast-lexer-gen.cc" +yy659: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 343 "src/wast-lexer.cc" +#line 345 "src/wast-lexer.cc" { OPCODE(I64And); RETURN(BINARY); } -#line 4053 "src/prebuilt/wast-lexer-gen.cc" -yy611: +#line 3964 "src/prebuilt/wast-lexer-gen.cc" +yy661: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 309 "src/wast-lexer.cc" +#line 311 "src/wast-lexer.cc" { OPCODE(I64Clz); RETURN(UNARY); } -#line 4061 "src/prebuilt/wast-lexer-gen.cc" -yy613: +#line 3972 "src/prebuilt/wast-lexer-gen.cc" +yy663: yych = *++cursor_; - if (yych == 's') goto yy724; - goto yy50; -yy614: + if (yych == 's') goto yy773; + goto yy87; +yy664: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 311 "src/wast-lexer.cc" +#line 313 "src/wast-lexer.cc" { OPCODE(I64Ctz); RETURN(UNARY); } -#line 4073 "src/prebuilt/wast-lexer-gen.cc" -yy616: +#line 3984 "src/prebuilt/wast-lexer-gen.cc" +yy666: yych = *++cursor_; - if (yych == '_') goto yy725; - goto yy50; -yy617: + if (yych == '_') goto yy774; + goto yy87; +yy667: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 307 "src/wast-lexer.cc" +#line 309 "src/wast-lexer.cc" { OPCODE(I64Eqz); RETURN(CONVERT); } -#line 4085 "src/prebuilt/wast-lexer-gen.cc" -yy619: +#line 3996 "src/prebuilt/wast-lexer-gen.cc" +yy669: yych = *++cursor_; - if (yych == 'e') goto yy726; - goto yy50; -yy620: + if (yych == 'e') goto yy775; + goto yy87; +yy670: yych = *++cursor_; - if (yych == 's') goto yy727; - if (yych == 'u') goto yy729; - goto yy50; -yy621: + if (yych == 's') goto yy776; + if (yych == 'u') goto yy778; + goto yy87; +yy671: yych = *++cursor_; - if (yych == 's') goto yy731; - if (yych == 'u') goto yy733; - goto yy50; -yy622: + if (yych == 's') goto yy780; + if (yych == 'u') goto yy782; + goto yy87; +yy672: yych = *++cursor_; - if (yych == 's') goto yy735; - if (yych == 'u') goto yy737; - goto yy50; -yy623: + if (yych == 's') goto yy784; + if (yych == 'u') goto yy786; + goto yy87; +yy673: yych = *++cursor_; - if (yych == 'd') goto yy739; - goto yy50; -yy624: + if (yych == 'd') goto yy788; + goto yy87; +yy674: yych = *++cursor_; - if (yych == 's') goto yy741; - if (yych == 'u') goto yy743; - goto yy50; -yy625: + if (yych == 's') goto yy790; + if (yych == 'u') goto yy792; + goto yy87; +yy675: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 333 "src/wast-lexer.cc" +#line 335 "src/wast-lexer.cc" { OPCODE(I64Mul); RETURN(BINARY); } -#line 4121 "src/prebuilt/wast-lexer-gen.cc" -yy627: +#line 4032 "src/prebuilt/wast-lexer-gen.cc" +yy677: yych = *++cursor_; - if (yych == 'c') goto yy745; - goto yy50; -yy628: + if (yych == 'c') goto yy794; + goto yy87; +yy678: yych = *++cursor_; - if (yych == 'n') goto yy746; - goto yy50; -yy629: + if (yych == 'n') goto yy795; + goto yy87; +yy679: yych = *++cursor_; - if (yych == '_') goto yy747; - goto yy50; -yy630: + if (yych == '_') goto yy796; + goto yy87; +yy680: yych = *++cursor_; - if (yych == 'l') goto yy748; - if (yych == 'r') goto yy750; - goto yy50; -yy631: + if (yych == 'l') goto yy797; + if (yych == 'r') goto yy799; + goto yy87; +yy681: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 349 "src/wast-lexer.cc" +#line 351 "src/wast-lexer.cc" { OPCODE(I64Shl); RETURN(BINARY); } -#line 4146 "src/prebuilt/wast-lexer-gen.cc" -yy633: +#line 4057 "src/prebuilt/wast-lexer-gen.cc" +yy683: yych = *++cursor_; - if (yych == '_') goto yy752; - goto yy50; -yy634: + if (yych == '_') goto yy801; + goto yy87; +yy684: yych = *++cursor_; - if (yych == 'r') goto yy753; - goto yy50; -yy635: + if (yych == 'r') goto yy802; + goto yy87; +yy685: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 331 "src/wast-lexer.cc" +#line 333 "src/wast-lexer.cc" { OPCODE(I64Sub); RETURN(BINARY); } -#line 4162 "src/prebuilt/wast-lexer-gen.cc" -yy637: +#line 4073 "src/prebuilt/wast-lexer-gen.cc" +yy687: yych = *++cursor_; - if (yych == 'n') goto yy754; - goto yy50; -yy638: + if (yych == 'n') goto yy803; + goto yy87; +yy688: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 347 "src/wast-lexer.cc" +#line 349 "src/wast-lexer.cc" { OPCODE(I64Xor); RETURN(BINARY); } -#line 4174 "src/prebuilt/wast-lexer-gen.cc" -yy640: - yych = *++cursor_; - if (yych == 'y') goto yy755; - goto yy50; -yy641: +#line 4085 "src/prebuilt/wast-lexer-gen.cc" +yy690: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; - if (yych <= '@') { - if (yych <= '+') { - if (yych <= '"') { - if (yych == '!') goto yy49; - goto yy193; - } else { - if (yych <= '\'') goto yy49; - if (yych <= ')') goto yy193; - goto yy49; - } + if (yych <= '9') { + if (yych <= '"') { + if (yych == '!') goto yy86; + goto yy246; } else { - if (yych <= '9') { - if (yych <= ',') goto yy193; - if (yych <= '/') goto yy49; - goto yy641; - } else { - if (yych == ';') goto yy193; - goto yy49; - } + if (yych <= '\'') goto yy86; + if (yych <= ')') goto yy246; + if (yych <= '/') goto yy86; + goto yy690; } } else { - if (yych <= '`') { - if (yych <= '[') { - if (yych <= 'F') goto yy641; - if (yych <= 'Z') goto yy49; - goto yy193; - } else { - if (yych == ']') goto yy193; - goto yy49; - } + if (yych <= 'F') { + if (yych == ';') goto yy246; + if (yych <= '@') goto yy86; + goto yy690; } else { - if (yych <= '{') { - if (yych <= 'f') goto yy641; - if (yych <= 'z') goto yy49; - goto yy193; - } else { - if (yych == '}') goto yy193; - if (yych <= '~') goto yy49; - goto yy193; - } + if (yych <= '`') goto yy86; + if (yych <= 'f') goto yy690; + if (yych <= '~') goto yy86; + goto yy246; } } -yy643: +yy692: yych = *++cursor_; - if (yych <= '/') goto yy50; - if (yych <= '0') goto yy756; - if (yych <= '9') goto yy758; - goto yy50; -yy644: + if (yych <= '/') goto yy87; + if (yych <= '0') goto yy804; + if (yych <= '9') goto yy806; + goto yy87; +yy693: yych = *++cursor_; - if (yych == 'r') goto yy760; - goto yy50; -yy645: + if (yych == 'r') goto yy808; + goto yy87; +yy694: yych = *++cursor_; - if (yych == 'b') goto yy762; - goto yy50; -yy646: + if (yych == 'b') goto yy810; + goto yy87; +yy695: yych = *++cursor_; - if (yych == 'a') goto yy763; - goto yy50; -yy647: + if (yych == 'a') goto yy811; + goto yy87; +yy696: yych = *++cursor_; - if (yych == 'a') goto yy764; - goto yy50; -yy648: + if (yych == 'a') goto yy812; + goto yy87; +yy697: yych = *++cursor_; - if (yych == 'a') goto yy765; - goto yy50; -yy649: + if (yych == 'a') goto yy813; + goto yy87; +yy698: yych = *++cursor_; if (yych <= '@') { - if (yych <= '/') goto yy50; - if (yych <= '9') goto yy766; - goto yy50; + if (yych <= '/') goto yy87; + if (yych <= '9') goto yy814; + goto yy87; } else { - if (yych <= 'F') goto yy766; - if (yych <= '`') goto yy50; - if (yych <= 'f') goto yy766; - goto yy50; + if (yych <= 'F') goto yy814; + if (yych <= '`') goto yy87; + if (yych <= 'f') goto yy814; + goto yy87; } -yy650: +yy699: yych = *++cursor_; - if (yych == 'x') goto yy768; - goto yy50; -yy651: + if (yych == 'x') goto yy816; + goto yy87; +yy700: yych = *++cursor_; - if (yych == 'n') goto yy769; - goto yy50; -yy652: + if (yych == 'n') goto yy817; + goto yy87; +yy701: yych = *++cursor_; - if (yych == 'a') goto yy770; - goto yy50; -yy653: + if (yych == 'a') goto yy818; + goto yy87; +yy702: yych = *++cursor_; - if (yych == 'e') goto yy771; - goto yy50; -yy654: + if (yych == 'e') goto yy819; + goto yy87; +yy703: yych = *++cursor_; - if (yych == 'r') goto yy772; - goto yy50; -yy655: + if (yych == 'r') goto yy820; + goto yy87; +yy704: yych = *++cursor_; - if (yych == 'n') goto yy773; - goto yy50; -yy656: + if (yych == 'n') goto yy821; + goto yy87; +yy705: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 266 "src/wast-lexer.cc" +#line 268 "src/wast-lexer.cc" { RETURN(BR_TABLE); } -#line 4294 "src/prebuilt/wast-lexer-gen.cc" -yy658: +#line 4181 "src/prebuilt/wast-lexer-gen.cc" +yy707: yych = *++cursor_; - if (yych == 'i') goto yy774; - goto yy50; -yy659: + if (yych == 'i') goto yy822; + goto yy87; +yy708: yych = *++cursor_; - if (yych == 'm') goto yy775; - goto yy50; -yy660: + if (yych == 'm') goto yy823; + goto yy87; +yy709: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 320 "src/wast-lexer.cc" +#line 322 "src/wast-lexer.cc" { OPCODE(F32Ceil); RETURN(UNARY); } -#line 4310 "src/prebuilt/wast-lexer-gen.cc" -yy662: +#line 4197 "src/prebuilt/wast-lexer-gen.cc" +yy711: yych = *++cursor_; - if (yych == 't') goto yy776; - goto yy50; -yy663: + if (yych == 't') goto yy824; + goto yy87; +yy712: yych = *++cursor_; - if (yych == 'e') goto yy778; - goto yy50; -yy664: + if (yych == 'e') goto yy826; + goto yy87; +yy713: yych = *++cursor_; - if (yych == 's') goto yy779; - goto yy50; -yy665: + if (yych == 's') goto yy827; + goto yy87; +yy714: yych = *++cursor_; - if (yych == 't') goto yy780; - goto yy50; -yy666: + if (yych == 't') goto yy828; + goto yy87; +yy715: yych = *++cursor_; - if (yych == 'r') goto yy781; - goto yy50; -yy667: + if (yych == 'r') goto yy829; + goto yy87; +yy716: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 279 "src/wast-lexer.cc" +#line 281 "src/wast-lexer.cc" { OPCODE(F32Load); RETURN(LOAD); } -#line 4338 "src/prebuilt/wast-lexer-gen.cc" -yy669: +#line 4225 "src/prebuilt/wast-lexer-gen.cc" +yy718: yych = *++cursor_; - if (yych == 'e') goto yy783; - goto yy50; -yy670: + if (yych == 'e') goto yy831; + goto yy87; +yy719: yych = *++cursor_; - if (yych == 't') goto yy784; - goto yy50; -yy671: + if (yych == 't') goto yy832; + goto yy87; +yy720: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 318 "src/wast-lexer.cc" +#line 320 "src/wast-lexer.cc" { OPCODE(F32Sqrt); RETURN(UNARY); } -#line 4354 "src/prebuilt/wast-lexer-gen.cc" -yy673: +#line 4241 "src/prebuilt/wast-lexer-gen.cc" +yy722: yych = *++cursor_; - if (yych == 'e') goto yy785; - goto yy50; -yy674: + if (yych == 'e') goto yy833; + goto yy87; +yy723: yych = *++cursor_; - if (yych == 'c') goto yy787; - goto yy50; -yy675: + if (yych == 'c') goto yy835; + goto yy87; +yy724: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 321 "src/wast-lexer.cc" +#line 323 "src/wast-lexer.cc" { OPCODE(F64Ceil); RETURN(UNARY); } -#line 4370 "src/prebuilt/wast-lexer-gen.cc" -yy677: +#line 4257 "src/prebuilt/wast-lexer-gen.cc" +yy726: yych = *++cursor_; - if (yych == 't') goto yy789; - goto yy50; -yy678: + if (yych == 't') goto yy837; + goto yy87; +yy727: yych = *++cursor_; - if (yych == 'e') goto yy791; - goto yy50; -yy679: + if (yych == 'e') goto yy839; + goto yy87; +yy728: yych = *++cursor_; - if (yych == 's') goto yy792; - goto yy50; -yy680: + if (yych == 's') goto yy840; + goto yy87; +yy729: yych = *++cursor_; - if (yych == 'r') goto yy793; - goto yy50; -yy681: + if (yych == 'r') goto yy841; + goto yy87; +yy730: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 280 "src/wast-lexer.cc" +#line 282 "src/wast-lexer.cc" { OPCODE(F64Load); RETURN(LOAD); } -#line 4394 "src/prebuilt/wast-lexer-gen.cc" -yy683: +#line 4281 "src/prebuilt/wast-lexer-gen.cc" +yy732: yych = *++cursor_; - if (yych == 'e') goto yy795; - goto yy50; -yy684: + if (yych == 'e') goto yy843; + goto yy87; +yy733: yych = *++cursor_; - if (yych == 'o') goto yy796; - goto yy50; -yy685: + if (yych == 'o') goto yy844; + goto yy87; +yy734: yych = *++cursor_; - if (yych == 't') goto yy797; - goto yy50; -yy686: + if (yych == 't') goto yy845; + goto yy87; +yy735: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 319 "src/wast-lexer.cc" +#line 321 "src/wast-lexer.cc" { OPCODE(F64Sqrt); RETURN(UNARY); } -#line 4414 "src/prebuilt/wast-lexer-gen.cc" -yy688: +#line 4301 "src/prebuilt/wast-lexer-gen.cc" +yy737: yych = *++cursor_; - if (yych == 'e') goto yy798; - goto yy50; -yy689: + if (yych == 'e') goto yy846; + goto yy87; +yy738: yych = *++cursor_; - if (yych == 'c') goto yy800; - goto yy50; -yy690: + if (yych == 'c') goto yy848; + goto yy87; +yy739: yych = *++cursor_; - if (yych == 'a') goto yy802; - goto yy50; -yy691: + if (yych == 'a') goto yy850; + goto yy87; +yy740: yych = *++cursor_; - if (yych == 'l') goto yy803; - goto yy50; -yy692: + if (yych == 'l') goto yy851; + goto yy87; +yy741: yych = *++cursor_; - if (yych == 'o') goto yy805; - goto yy50; -yy693: + if (yych == 'o') goto yy853; + goto yy87; +yy742: yych = *++cursor_; - if (yych == 't') goto yy806; - goto yy50; -yy694: + if (yych == 't') goto yy854; + goto yy87; +yy743: yych = *++cursor_; - if (yych == 's') goto yy808; - if (yych == 'u') goto yy810; - goto yy50; -yy695: + if (yych == 's') goto yy856; + if (yych == 'u') goto yy858; + goto yy87; +yy744: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 388 "src/wast-lexer.cc" +#line 390 "src/wast-lexer.cc" { OPCODE(I32GeS); RETURN(COMPARE); } -#line 4451 "src/prebuilt/wast-lexer-gen.cc" -yy697: +#line 4338 "src/prebuilt/wast-lexer-gen.cc" +yy746: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 390 "src/wast-lexer.cc" +#line 392 "src/wast-lexer.cc" { OPCODE(I32GeU); RETURN(COMPARE); } -#line 4459 "src/prebuilt/wast-lexer-gen.cc" -yy699: +#line 4346 "src/prebuilt/wast-lexer-gen.cc" +yy748: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 384 "src/wast-lexer.cc" +#line 386 "src/wast-lexer.cc" { OPCODE(I32GtS); RETURN(COMPARE); } -#line 4467 "src/prebuilt/wast-lexer-gen.cc" -yy701: +#line 4354 "src/prebuilt/wast-lexer-gen.cc" +yy750: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 386 "src/wast-lexer.cc" +#line 388 "src/wast-lexer.cc" { OPCODE(I32GtU); RETURN(COMPARE); } -#line 4475 "src/prebuilt/wast-lexer-gen.cc" -yy703: +#line 4362 "src/prebuilt/wast-lexer-gen.cc" +yy752: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 380 "src/wast-lexer.cc" +#line 382 "src/wast-lexer.cc" { OPCODE(I32LeS); RETURN(COMPARE); } -#line 4483 "src/prebuilt/wast-lexer-gen.cc" -yy705: +#line 4370 "src/prebuilt/wast-lexer-gen.cc" +yy754: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 382 "src/wast-lexer.cc" +#line 384 "src/wast-lexer.cc" { OPCODE(I32LeU); RETURN(COMPARE); } -#line 4491 "src/prebuilt/wast-lexer-gen.cc" -yy707: +#line 4378 "src/prebuilt/wast-lexer-gen.cc" +yy756: ++cursor_; - if ((yych = *cursor_) <= '8') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy708; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= '0') { + if (yych <= '"') { + if (yych == '!') goto yy86; } else { - if (yych <= '0') { - if (yych != ',') goto yy49; - } else { - if (yych <= '1') goto yy812; - if (yych <= '7') goto yy49; - goto yy813; - } + if (yych <= '\'') goto yy86; + if (yych >= '*') goto yy86; } } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych != ';') goto yy49; - } else { - if (yych == '\\') goto yy49; - } + if (yych <= '8') { + if (yych <= '1') goto yy860; + if (yych <= '7') goto yy86; + goto yy861; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych == ';') goto yy757; + if (yych <= '~') goto yy86; } } -yy708: -#line 277 "src/wast-lexer.cc" +yy757: +#line 279 "src/wast-lexer.cc" { OPCODE(I32Load); RETURN(LOAD); } -#line 4529 "src/prebuilt/wast-lexer-gen.cc" -yy709: +#line 4401 "src/prebuilt/wast-lexer-gen.cc" +yy758: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 376 "src/wast-lexer.cc" +#line 378 "src/wast-lexer.cc" { OPCODE(I32LtS); RETURN(COMPARE); } -#line 4537 "src/prebuilt/wast-lexer-gen.cc" -yy711: +#line 4409 "src/prebuilt/wast-lexer-gen.cc" +yy760: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 378 "src/wast-lexer.cc" +#line 380 "src/wast-lexer.cc" { OPCODE(I32LtU); RETURN(COMPARE); } -#line 4545 "src/prebuilt/wast-lexer-gen.cc" -yy713: +#line 4417 "src/prebuilt/wast-lexer-gen.cc" +yy762: yych = *++cursor_; - if (yych == 'n') goto yy814; - goto yy50; -yy714: + if (yych == 'n') goto yy862; + goto yy87; +yy763: yych = *++cursor_; - if (yych == 't') goto yy815; - goto yy50; -yy715: + if (yych == 't') goto yy863; + goto yy87; +yy764: yych = *++cursor_; - if (yych == 's') goto yy816; - if (yych == 'u') goto yy818; - goto yy50; -yy716: + if (yych == 's') goto yy864; + if (yych == 'u') goto yy866; + goto yy87; +yy765: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 354 "src/wast-lexer.cc" +#line 356 "src/wast-lexer.cc" { OPCODE(I32Rotl); RETURN(BINARY); } -#line 4566 "src/prebuilt/wast-lexer-gen.cc" -yy718: +#line 4438 "src/prebuilt/wast-lexer-gen.cc" +yy767: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 356 "src/wast-lexer.cc" +#line 358 "src/wast-lexer.cc" { OPCODE(I32Rotr); RETURN(BINARY); } -#line 4574 "src/prebuilt/wast-lexer-gen.cc" -yy720: +#line 4446 "src/prebuilt/wast-lexer-gen.cc" +yy769: yych = *++cursor_; - if (yych == 's') goto yy820; - if (yych == 'u') goto yy822; - goto yy50; -yy721: + if (yych == 's') goto yy868; + if (yych == 'u') goto yy870; + goto yy87; +yy770: yych = *++cursor_; - if (yych == 'e') goto yy824; - goto yy50; -yy722: + if (yych == 'e') goto yy872; + goto yy87; +yy771: yych = *++cursor_; - if (yych == 'c') goto yy826; - goto yy50; -yy723: + if (yych == 'c') goto yy874; + goto yy87; +yy772: yych = *++cursor_; - if (yych == '/') goto yy827; - goto yy50; -yy724: + if (yych == '/') goto yy875; + goto yy87; +yy773: yych = *++cursor_; - if (yych == 't') goto yy828; - goto yy50; -yy725: + if (yych == 't') goto yy876; + goto yy87; +yy774: yych = *++cursor_; - if (yych == 's') goto yy830; - if (yych == 'u') goto yy832; - goto yy50; -yy726: + if (yych == 's') goto yy878; + if (yych == 'u') goto yy880; + goto yy87; +yy775: yych = *++cursor_; - if (yych == 'n') goto yy834; - goto yy50; -yy727: + if (yych == 'n') goto yy882; + goto yy87; +yy776: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 389 "src/wast-lexer.cc" +#line 391 "src/wast-lexer.cc" { OPCODE(I64GeS); RETURN(COMPARE); } -#line 4612 "src/prebuilt/wast-lexer-gen.cc" -yy729: +#line 4484 "src/prebuilt/wast-lexer-gen.cc" +yy778: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 391 "src/wast-lexer.cc" +#line 393 "src/wast-lexer.cc" { OPCODE(I64GeU); RETURN(COMPARE); } -#line 4620 "src/prebuilt/wast-lexer-gen.cc" -yy731: +#line 4492 "src/prebuilt/wast-lexer-gen.cc" +yy780: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 385 "src/wast-lexer.cc" +#line 387 "src/wast-lexer.cc" { OPCODE(I64GtS); RETURN(COMPARE); } -#line 4628 "src/prebuilt/wast-lexer-gen.cc" -yy733: +#line 4500 "src/prebuilt/wast-lexer-gen.cc" +yy782: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 387 "src/wast-lexer.cc" +#line 389 "src/wast-lexer.cc" { OPCODE(I64GtU); RETURN(COMPARE); } -#line 4636 "src/prebuilt/wast-lexer-gen.cc" -yy735: +#line 4508 "src/prebuilt/wast-lexer-gen.cc" +yy784: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 381 "src/wast-lexer.cc" +#line 383 "src/wast-lexer.cc" { OPCODE(I64LeS); RETURN(COMPARE); } -#line 4644 "src/prebuilt/wast-lexer-gen.cc" -yy737: +#line 4516 "src/prebuilt/wast-lexer-gen.cc" +yy786: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 383 "src/wast-lexer.cc" +#line 385 "src/wast-lexer.cc" { OPCODE(I64LeU); RETURN(COMPARE); } -#line 4652 "src/prebuilt/wast-lexer-gen.cc" -yy739: +#line 4524 "src/prebuilt/wast-lexer-gen.cc" +yy788: ++cursor_; - if ((yych = *cursor_) <= '7') { - if (yych <= '+') { - if (yych <= '"') { - if (yych == '!') goto yy49; - } else { - if (yych <= '\'') goto yy49; - if (yych >= '*') goto yy49; - } + if ((yych = *cursor_) <= '1') { + if (yych <= '"') { + if (yych == '!') goto yy86; } else { - if (yych <= '1') { - if (yych <= ',') goto yy740; - if (yych <= '0') goto yy49; - goto yy835; - } else { - if (yych == '3') goto yy836; - goto yy49; - } + if (yych <= '\'') goto yy86; + if (yych <= ')') goto yy789; + if (yych <= '0') goto yy86; + goto yy883; } } else { - if (yych <= '\\') { - if (yych <= ';') { - if (yych <= '8') goto yy837; - if (yych <= ':') goto yy49; - } else { - if (yych != '[') goto yy49; - } + if (yych <= '8') { + if (yych == '3') goto yy884; + if (yych <= '7') goto yy86; + goto yy885; } else { - if (yych <= '{') { - if (yych <= ']') goto yy740; - if (yych <= 'z') goto yy49; - } else { - if (yych == '}') goto yy740; - if (yych <= '~') goto yy49; - } + if (yych == ';') goto yy789; + if (yych <= '~') goto yy86; } } -yy740: -#line 278 "src/wast-lexer.cc" +yy789: +#line 280 "src/wast-lexer.cc" { OPCODE(I64Load); RETURN(LOAD); } -#line 4694 "src/prebuilt/wast-lexer-gen.cc" -yy741: +#line 4549 "src/prebuilt/wast-lexer-gen.cc" +yy790: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 377 "src/wast-lexer.cc" +#line 379 "src/wast-lexer.cc" { OPCODE(I64LtS); RETURN(COMPARE); } -#line 4702 "src/prebuilt/wast-lexer-gen.cc" -yy743: +#line 4557 "src/prebuilt/wast-lexer-gen.cc" +yy792: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 379 "src/wast-lexer.cc" +#line 381 "src/wast-lexer.cc" { OPCODE(I64LtU); RETURN(COMPARE); } -#line 4710 "src/prebuilt/wast-lexer-gen.cc" -yy745: +#line 4565 "src/prebuilt/wast-lexer-gen.cc" +yy794: yych = *++cursor_; - if (yych == 'n') goto yy838; - goto yy50; -yy746: + if (yych == 'n') goto yy886; + goto yy87; +yy795: yych = *++cursor_; - if (yych == 't') goto yy839; - goto yy50; -yy747: + if (yych == 't') goto yy887; + goto yy87; +yy796: yych = *++cursor_; - if (yych == 's') goto yy840; - if (yych == 'u') goto yy842; - goto yy50; -yy748: + if (yych == 's') goto yy888; + if (yych == 'u') goto yy890; + goto yy87; +yy797: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 355 "src/wast-lexer.cc" +#line 357 "src/wast-lexer.cc" { OPCODE(I64Rotl); RETURN(BINARY); } -#line 4731 "src/prebuilt/wast-lexer-gen.cc" -yy750: +#line 4586 "src/prebuilt/wast-lexer-gen.cc" +yy799: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 357 "src/wast-lexer.cc" +#line 359 "src/wast-lexer.cc" { OPCODE(I64Rotr); RETURN(BINARY); } -#line 4739 "src/prebuilt/wast-lexer-gen.cc" -yy752: +#line 4594 "src/prebuilt/wast-lexer-gen.cc" +yy801: yych = *++cursor_; - if (yych == 's') goto yy844; - if (yych == 'u') goto yy846; - goto yy50; -yy753: - yych = *++cursor_; - if (yych == 'e') goto yy848; - goto yy50; -yy754: + if (yych == 's') goto yy892; + if (yych == 'u') goto yy894; + goto yy87; +yy802: yych = *++cursor_; - if (yych == 'c') goto yy850; - goto yy50; -yy755: + if (yych == 'e') goto yy896; + goto yy87; +yy803: yych = *++cursor_; - if (yybm[0+yych] & 16) { - goto yy49; - } - goto yy184; -yy756: + if (yych == 'c') goto yy898; + goto yy87; +yy804: ++cursor_; - if ((yych = *cursor_) <= ';') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy757; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= '/') { + if (yych <= '"') { + if (yych == '!') goto yy86; } else { - if (yych <= '/') { - if (yych != ',') goto yy49; - } else { - if (yych <= '9') goto yy758; - if (yych <= ':') goto yy49; - } + if (yych <= '\'') goto yy86; + if (yych >= '*') goto yy86; } } else { - if (yych <= 'x') { - if (yych <= '\\') { - if (yych != '[') goto yy49; - } else { - if (yych <= ']') goto yy757; - if (yych <= 'w') goto yy49; - goto yy851; - } + if (yych <= ';') { + if (yych <= '9') goto yy806; + if (yych <= ':') goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych == 'x') goto yy899; + if (yych <= '~') goto yy86; } } -yy757: -#line 300 "src/wast-lexer.cc" +yy805: +#line 302 "src/wast-lexer.cc" { TEXT_AT(7); RETURN(OFFSET_EQ_NAT); } -#line 4797 "src/prebuilt/wast-lexer-gen.cc" -yy758: +#line 4629 "src/prebuilt/wast-lexer-gen.cc" +yy806: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; - if (yych <= ':') { - if (yych <= ')') { - if (yych <= '!') { - if (yych <= ' ') goto yy757; - goto yy49; - } else { - if (yych <= '"') goto yy757; - if (yych <= '\'') goto yy49; - goto yy757; - } + if (yych <= ')') { + if (yych <= '!') { + if (yych <= ' ') goto yy805; + goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - goto yy757; - } else { - if (yych <= '/') goto yy49; - if (yych <= '9') goto yy758; - goto yy49; - } + if (yych <= '"') goto yy805; + if (yych <= '\'') goto yy86; + goto yy805; } } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych <= ';') goto yy757; - goto yy49; - } else { - if (yych == '\\') goto yy49; - goto yy757; - } + if (yych <= ':') { + if (yych <= '/') goto yy86; + if (yych <= '9') goto yy806; + goto yy86; } else { - if (yych <= '|') { - if (yych == '{') goto yy757; - goto yy49; - } else { - if (yych == '~') goto yy49; - goto yy757; - } + if (yych <= ';') goto yy805; + if (yych <= '~') goto yy86; + goto yy805; } } -yy760: +yy808: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 448 "src/wast-lexer.cc" +#line 450 "src/wast-lexer.cc" { RETURN(REGISTER); } -#line 4848 "src/prebuilt/wast-lexer-gen.cc" -yy762: +#line 4661 "src/prebuilt/wast-lexer-gen.cc" +yy810: yych = *++cursor_; - if (yych == 'a') goto yy852; - goto yy50; -yy763: + if (yych == 'a') goto yy900; + goto yy87; +yy811: yych = *++cursor_; - if (yych == 'l') goto yy853; - goto yy50; -yy764: + if (yych == 'l') goto yy901; + goto yy87; +yy812: yych = *++cursor_; - if (yych == 'l') goto yy855; - goto yy50; -yy765: + if (yych == 'l') goto yy903; + goto yy87; +yy813: yych = *++cursor_; - if (yych == 'b') goto yy857; - goto yy50; -yy766: + if (yych == 'b') goto yy905; + goto yy87; +yy814: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; - if (yych <= '@') { - if (yych <= '+') { - if (yych <= '"') { - if (yych == '!') goto yy49; - goto yy508; - } else { - if (yych <= '\'') goto yy49; - if (yych <= ')') goto yy508; - goto yy49; - } + if (yych <= '9') { + if (yych <= '"') { + if (yych == '!') goto yy86; + goto yy558; } else { - if (yych <= '9') { - if (yych <= ',') goto yy508; - if (yych <= '/') goto yy49; - goto yy766; - } else { - if (yych == ';') goto yy508; - goto yy49; - } + if (yych <= '\'') goto yy86; + if (yych <= ')') goto yy558; + if (yych <= '/') goto yy86; + goto yy814; } } else { - if (yych <= '`') { - if (yych <= '[') { - if (yych <= 'F') goto yy766; - if (yych <= 'Z') goto yy49; - goto yy508; - } else { - if (yych == ']') goto yy508; - goto yy49; - } + if (yych <= 'F') { + if (yych == ';') goto yy558; + if (yych <= '@') goto yy86; + goto yy814; } else { - if (yych <= '{') { - if (yych <= 'f') goto yy766; - if (yych <= 'z') goto yy49; - goto yy508; - } else { - if (yych == '}') goto yy508; - if (yych <= '~') goto yy49; - goto yy508; - } + if (yych <= '`') goto yy86; + if (yych <= 'f') goto yy814; + if (yych <= '~') goto yy86; + goto yy558; } } -yy768: +yy816: yych = *++cursor_; - if (yych == 'h') goto yy858; - goto yy50; -yy769: + if (yych == 'h') goto yy906; + goto yy87; +yy817: yych = *++cursor_; - if (yych == 'v') goto yy859; - goto yy50; -yy770: + if (yych == 'v') goto yy907; + goto yy87; +yy818: yych = *++cursor_; - if (yych == 'l') goto yy860; - goto yy50; -yy771: + if (yych == 'l') goto yy908; + goto yy87; +yy819: yych = *++cursor_; - if (yych == 't') goto yy861; - goto yy50; -yy772: + if (yych == 't') goto yy909; + goto yy87; +yy820: yych = *++cursor_; - if (yych == 'a') goto yy862; - goto yy50; -yy773: + if (yych == 'a') goto yy910; + goto yy87; +yy821: yych = *++cursor_; - if (yych == 'l') goto yy863; - goto yy50; -yy774: + if (yych == 'l') goto yy911; + goto yy87; +yy822: yych = *++cursor_; - if (yych == 'r') goto yy864; - goto yy50; -yy775: + if (yych == 'r') goto yy912; + goto yy87; +yy823: yych = *++cursor_; - if (yych == 'e') goto yy865; - goto yy50; -yy776: + if (yych == 'e') goto yy913; + goto yy87; +yy824: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 304 "src/wast-lexer.cc" +#line 306 "src/wast-lexer.cc" { TYPE(F32); RETURN(CONST); } -#line 4950 "src/prebuilt/wast-lexer-gen.cc" -yy778: +#line 4743 "src/prebuilt/wast-lexer-gen.cc" +yy826: yych = *++cursor_; - if (yych == 'r') goto yy866; - goto yy50; -yy779: + if (yych == 'r') goto yy914; + goto yy87; +yy827: yych = *++cursor_; - if (yych == 'i') goto yy867; - goto yy50; -yy780: + if (yych == 'i') goto yy915; + goto yy87; +yy828: yych = *++cursor_; - if (yych == 'e') goto yy868; - goto yy50; -yy781: + if (yych == 'e') goto yy916; + goto yy87; +yy829: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 322 "src/wast-lexer.cc" +#line 324 "src/wast-lexer.cc" { OPCODE(F32Floor); RETURN(UNARY); } -#line 4970 "src/prebuilt/wast-lexer-gen.cc" -yy783: +#line 4763 "src/prebuilt/wast-lexer-gen.cc" +yy831: yych = *++cursor_; - if (yych == 's') goto yy869; - goto yy50; -yy784: + if (yych == 's') goto yy917; + goto yy87; +yy832: yych = *++cursor_; - if (yych == 'e') goto yy870; - goto yy50; -yy785: + if (yych == 'e') goto yy918; + goto yy87; +yy833: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 283 "src/wast-lexer.cc" +#line 285 "src/wast-lexer.cc" { OPCODE(F32Store); RETURN(STORE); } -#line 4986 "src/prebuilt/wast-lexer-gen.cc" -yy787: +#line 4779 "src/prebuilt/wast-lexer-gen.cc" +yy835: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 324 "src/wast-lexer.cc" +#line 326 "src/wast-lexer.cc" { OPCODE(F32Trunc); RETURN(UNARY); } -#line 4994 "src/prebuilt/wast-lexer-gen.cc" -yy789: +#line 4787 "src/prebuilt/wast-lexer-gen.cc" +yy837: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 305 "src/wast-lexer.cc" +#line 307 "src/wast-lexer.cc" { TYPE(F64); RETURN(CONST); } -#line 5002 "src/prebuilt/wast-lexer-gen.cc" -yy791: +#line 4795 "src/prebuilt/wast-lexer-gen.cc" +yy839: yych = *++cursor_; - if (yych == 'r') goto yy871; - goto yy50; -yy792: + if (yych == 'r') goto yy919; + goto yy87; +yy840: yych = *++cursor_; - if (yych == 'i') goto yy872; - goto yy50; -yy793: + if (yych == 'i') goto yy920; + goto yy87; +yy841: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 323 "src/wast-lexer.cc" +#line 325 "src/wast-lexer.cc" { OPCODE(F64Floor); RETURN(UNARY); } -#line 5018 "src/prebuilt/wast-lexer-gen.cc" -yy795: +#line 4811 "src/prebuilt/wast-lexer-gen.cc" +yy843: yych = *++cursor_; - if (yych == 's') goto yy873; - goto yy50; -yy796: + if (yych == 's') goto yy921; + goto yy87; +yy844: yych = *++cursor_; - if (yych == 't') goto yy874; - goto yy50; -yy797: + if (yych == 't') goto yy922; + goto yy87; +yy845: yych = *++cursor_; - if (yych == 'e') goto yy875; - goto yy50; -yy798: + if (yych == 'e') goto yy923; + goto yy87; +yy846: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 284 "src/wast-lexer.cc" +#line 286 "src/wast-lexer.cc" { OPCODE(F64Store); RETURN(STORE); } -#line 5038 "src/prebuilt/wast-lexer-gen.cc" -yy800: +#line 4831 "src/prebuilt/wast-lexer-gen.cc" +yy848: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 325 "src/wast-lexer.cc" +#line 327 "src/wast-lexer.cc" { OPCODE(F64Trunc); RETURN(UNARY); } -#line 5046 "src/prebuilt/wast-lexer-gen.cc" -yy802: +#line 4839 "src/prebuilt/wast-lexer-gen.cc" +yy850: yych = *++cursor_; - if (yych == 'l') goto yy876; - goto yy50; -yy803: + if (yych == 'l') goto yy924; + goto yy87; +yy851: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 272 "src/wast-lexer.cc" +#line 274 "src/wast-lexer.cc" { RETURN(GET_LOCAL); } -#line 5058 "src/prebuilt/wast-lexer-gen.cc" -yy805: +#line 4851 "src/prebuilt/wast-lexer-gen.cc" +yy853: yych = *++cursor_; - if (yych == 'r') goto yy878; - goto yy50; -yy806: + if (yych == 'r') goto yy926; + goto yy87; +yy854: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 302 "src/wast-lexer.cc" +#line 304 "src/wast-lexer.cc" { TYPE(I32); RETURN(CONST); } -#line 5070 "src/prebuilt/wast-lexer-gen.cc" -yy808: +#line 4863 "src/prebuilt/wast-lexer-gen.cc" +yy856: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 334 "src/wast-lexer.cc" +#line 336 "src/wast-lexer.cc" { OPCODE(I32DivS); RETURN(BINARY); } -#line 5078 "src/prebuilt/wast-lexer-gen.cc" -yy810: +#line 4871 "src/prebuilt/wast-lexer-gen.cc" +yy858: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 336 "src/wast-lexer.cc" +#line 338 "src/wast-lexer.cc" { OPCODE(I32DivU); RETURN(BINARY); } -#line 5086 "src/prebuilt/wast-lexer-gen.cc" -yy812: +#line 4879 "src/prebuilt/wast-lexer-gen.cc" +yy860: yych = *++cursor_; - if (yych == '6') goto yy879; - goto yy50; -yy813: + if (yych == '6') goto yy927; + goto yy87; +yy861: yych = *++cursor_; - if (yych == '_') goto yy880; - goto yy50; -yy814: + if (yych == '_') goto yy928; + goto yy87; +yy862: yych = *++cursor_; - if (yych == 't') goto yy881; - goto yy50; -yy815: + if (yych == 't') goto yy929; + goto yy87; +yy863: yych = *++cursor_; - if (yych == 'e') goto yy883; - goto yy50; -yy816: + if (yych == 'e') goto yy931; + goto yy87; +yy864: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 338 "src/wast-lexer.cc" +#line 340 "src/wast-lexer.cc" { OPCODE(I32RemS); RETURN(BINARY); } -#line 5110 "src/prebuilt/wast-lexer-gen.cc" -yy818: +#line 4903 "src/prebuilt/wast-lexer-gen.cc" +yy866: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 340 "src/wast-lexer.cc" +#line 342 "src/wast-lexer.cc" { OPCODE(I32RemU); RETURN(BINARY); } -#line 5118 "src/prebuilt/wast-lexer-gen.cc" -yy820: +#line 4911 "src/prebuilt/wast-lexer-gen.cc" +yy868: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 350 "src/wast-lexer.cc" +#line 352 "src/wast-lexer.cc" { OPCODE(I32ShrS); RETURN(BINARY); } -#line 5126 "src/prebuilt/wast-lexer-gen.cc" -yy822: +#line 4919 "src/prebuilt/wast-lexer-gen.cc" +yy870: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 352 "src/wast-lexer.cc" +#line 354 "src/wast-lexer.cc" { OPCODE(I32ShrU); RETURN(BINARY); } -#line 5134 "src/prebuilt/wast-lexer-gen.cc" -yy824: +#line 4927 "src/prebuilt/wast-lexer-gen.cc" +yy872: ++cursor_; - if ((yych = *cursor_) <= '8') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy825; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= '0') { + if (yych <= '"') { + if (yych == '!') goto yy86; } else { - if (yych <= '0') { - if (yych != ',') goto yy49; - } else { - if (yych <= '1') goto yy884; - if (yych <= '7') goto yy49; - goto yy885; - } + if (yych <= '\'') goto yy86; + if (yych >= '*') goto yy86; } } else { - if (yych <= ']') { - if (yych <= 'Z') { - if (yych != ';') goto yy49; - } else { - if (yych == '\\') goto yy49; - } + if (yych <= '8') { + if (yych <= '1') goto yy932; + if (yych <= '7') goto yy86; + goto yy933; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych == ';') goto yy873; + if (yych <= '~') goto yy86; } } -yy825: -#line 281 "src/wast-lexer.cc" +yy873: +#line 283 "src/wast-lexer.cc" { OPCODE(I32Store); RETURN(STORE); } -#line 5172 "src/prebuilt/wast-lexer-gen.cc" -yy826: +#line 4950 "src/prebuilt/wast-lexer-gen.cc" +yy874: yych = *++cursor_; - if (yych == '_') goto yy887; - goto yy50; -yy827: + if (yych == '_') goto yy935; + goto yy87; +yy875: yych = *++cursor_; - if (yych == 'i') goto yy888; - goto yy50; -yy828: + if (yych == 'i') goto yy936; + goto yy87; +yy876: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 303 "src/wast-lexer.cc" +#line 305 "src/wast-lexer.cc" { TYPE(I64); RETURN(CONST); } -#line 5188 "src/prebuilt/wast-lexer-gen.cc" -yy830: +#line 4966 "src/prebuilt/wast-lexer-gen.cc" +yy878: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 335 "src/wast-lexer.cc" +#line 337 "src/wast-lexer.cc" { OPCODE(I64DivS); RETURN(BINARY); } -#line 5196 "src/prebuilt/wast-lexer-gen.cc" -yy832: +#line 4974 "src/prebuilt/wast-lexer-gen.cc" +yy880: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 337 "src/wast-lexer.cc" +#line 339 "src/wast-lexer.cc" { OPCODE(I64DivU); RETURN(BINARY); } -#line 5204 "src/prebuilt/wast-lexer-gen.cc" -yy834: +#line 4982 "src/prebuilt/wast-lexer-gen.cc" +yy882: yych = *++cursor_; - if (yych == 'd') goto yy889; - goto yy50; -yy835: + if (yych == 'd') goto yy937; + goto yy87; +yy883: yych = *++cursor_; - if (yych == '6') goto yy890; - goto yy50; -yy836: + if (yych == '6') goto yy938; + goto yy87; +yy884: yych = *++cursor_; - if (yych == '2') goto yy891; - goto yy50; -yy837: + if (yych == '2') goto yy939; + goto yy87; +yy885: yych = *++cursor_; - if (yych == '_') goto yy892; - goto yy50; -yy838: + if (yych == '_') goto yy940; + goto yy87; +yy886: yych = *++cursor_; - if (yych == 't') goto yy893; - goto yy50; -yy839: + if (yych == 't') goto yy941; + goto yy87; +yy887: yych = *++cursor_; - if (yych == 'e') goto yy895; - goto yy50; -yy840: + if (yych == 'e') goto yy943; + goto yy87; +yy888: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 339 "src/wast-lexer.cc" +#line 341 "src/wast-lexer.cc" { OPCODE(I64RemS); RETURN(BINARY); } -#line 5236 "src/prebuilt/wast-lexer-gen.cc" -yy842: +#line 5014 "src/prebuilt/wast-lexer-gen.cc" +yy890: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 341 "src/wast-lexer.cc" +#line 343 "src/wast-lexer.cc" { OPCODE(I64RemU); RETURN(BINARY); } -#line 5244 "src/prebuilt/wast-lexer-gen.cc" -yy844: +#line 5022 "src/prebuilt/wast-lexer-gen.cc" +yy892: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 351 "src/wast-lexer.cc" +#line 353 "src/wast-lexer.cc" { OPCODE(I64ShrS); RETURN(BINARY); } -#line 5252 "src/prebuilt/wast-lexer-gen.cc" -yy846: +#line 5030 "src/prebuilt/wast-lexer-gen.cc" +yy894: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 353 "src/wast-lexer.cc" +#line 355 "src/wast-lexer.cc" { OPCODE(I64ShrU); RETURN(BINARY); } -#line 5260 "src/prebuilt/wast-lexer-gen.cc" -yy848: +#line 5038 "src/prebuilt/wast-lexer-gen.cc" +yy896: ++cursor_; - if ((yych = *cursor_) <= '7') { - if (yych <= '+') { - if (yych <= '"') { - if (yych == '!') goto yy49; - } else { - if (yych <= '\'') goto yy49; - if (yych >= '*') goto yy49; - } + if ((yych = *cursor_) <= '1') { + if (yych <= '"') { + if (yych == '!') goto yy86; } else { - if (yych <= '1') { - if (yych <= ',') goto yy849; - if (yych <= '0') goto yy49; - goto yy896; - } else { - if (yych == '3') goto yy897; - goto yy49; - } + if (yych <= '\'') goto yy86; + if (yych <= ')') goto yy897; + if (yych <= '0') goto yy86; + goto yy944; } } else { - if (yych <= '\\') { - if (yych <= ';') { - if (yych <= '8') goto yy898; - if (yych <= ':') goto yy49; - } else { - if (yych != '[') goto yy49; - } + if (yych <= '8') { + if (yych == '3') goto yy945; + if (yych <= '7') goto yy86; + goto yy946; } else { - if (yych <= '{') { - if (yych <= ']') goto yy849; - if (yych <= 'z') goto yy49; - } else { - if (yych == '}') goto yy849; - if (yych <= '~') goto yy49; - } + if (yych == ';') goto yy897; + if (yych <= '~') goto yy86; } } -yy849: -#line 282 "src/wast-lexer.cc" +yy897: +#line 284 "src/wast-lexer.cc" { OPCODE(I64Store); RETURN(STORE); } -#line 5302 "src/prebuilt/wast-lexer-gen.cc" -yy850: +#line 5063 "src/prebuilt/wast-lexer-gen.cc" +yy898: yych = *++cursor_; - if (yych == '_') goto yy900; - goto yy50; -yy851: + if (yych == '_') goto yy948; + goto yy87; +yy899: yych = *++cursor_; if (yych <= '@') { - if (yych <= '/') goto yy50; - if (yych <= '9') goto yy901; - goto yy50; + if (yych <= '/') goto yy87; + if (yych <= '9') goto yy949; + goto yy87; } else { - if (yych <= 'F') goto yy901; - if (yych <= '`') goto yy50; - if (yych <= 'f') goto yy901; - goto yy50; + if (yych <= 'F') goto yy949; + if (yych <= '`') goto yy87; + if (yych <= 'f') goto yy949; + goto yy87; } -yy852: +yy900: yych = *++cursor_; - if (yych == 'l') goto yy903; - goto yy50; -yy853: + if (yych == 'l') goto yy951; + goto yy87; +yy901: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 273 "src/wast-lexer.cc" +#line 275 "src/wast-lexer.cc" { RETURN(SET_LOCAL); } -#line 5330 "src/prebuilt/wast-lexer-gen.cc" -yy855: +#line 5091 "src/prebuilt/wast-lexer-gen.cc" +yy903: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 274 "src/wast-lexer.cc" +#line 276 "src/wast-lexer.cc" { RETURN(TEE_LOCAL); } -#line 5338 "src/prebuilt/wast-lexer-gen.cc" -yy857: +#line 5099 "src/prebuilt/wast-lexer-gen.cc" +yy905: yych = *++cursor_; - if (yych == 'l') goto yy905; - goto yy50; -yy858: + if (yych == 'l') goto yy953; + goto yy87; +yy906: yych = *++cursor_; - if (yych == 'a') goto yy906; - goto yy50; -yy859: + if (yych == 'a') goto yy954; + goto yy87; +yy907: yych = *++cursor_; - if (yych == 'a') goto yy907; - goto yy50; -yy860: + if (yych == 'a') goto yy955; + goto yy87; +yy908: yych = *++cursor_; - if (yych == 'f') goto yy908; - goto yy50; -yy861: + if (yych == 'f') goto yy956; + goto yy87; +yy909: yych = *++cursor_; - if (yych == 'u') goto yy909; - goto yy50; -yy862: + if (yych == 'u') goto yy957; + goto yy87; +yy910: yych = *++cursor_; - if (yych == 'p') goto yy910; - goto yy50; -yy863: + if (yych == 'p') goto yy958; + goto yy87; +yy911: yych = *++cursor_; - if (yych == 'i') goto yy912; - goto yy50; -yy864: + if (yych == 'i') goto yy960; + goto yy87; +yy912: yych = *++cursor_; - if (yych == 'e') goto yy913; - goto yy50; -yy865: + if (yych == 'e') goto yy961; + goto yy87; +yy913: yych = *++cursor_; - if (yych == 'm') goto yy914; - goto yy50; -yy866: + if (yych == 'm') goto yy962; + goto yy87; +yy914: yych = *++cursor_; - if (yych == 't') goto yy915; - goto yy50; -yy867: + if (yych == 't') goto yy963; + goto yy87; +yy915: yych = *++cursor_; - if (yych == 'g') goto yy916; - goto yy50; -yy868: + if (yych == 'g') goto yy964; + goto yy87; +yy916: yych = *++cursor_; - if (yych == '/') goto yy917; - goto yy50; -yy869: + if (yych == '/') goto yy965; + goto yy87; +yy917: yych = *++cursor_; - if (yych == 't') goto yy918; - goto yy50; -yy870: + if (yych == 't') goto yy966; + goto yy87; +yy918: yych = *++cursor_; - if (yych == 'r') goto yy920; - goto yy50; -yy871: + if (yych == 'r') goto yy968; + goto yy87; +yy919: yych = *++cursor_; - if (yych == 't') goto yy921; - goto yy50; -yy872: + if (yych == 't') goto yy969; + goto yy87; +yy920: yych = *++cursor_; - if (yych == 'g') goto yy922; - goto yy50; -yy873: + if (yych == 'g') goto yy970; + goto yy87; +yy921: yych = *++cursor_; - if (yych == 't') goto yy923; - goto yy50; -yy874: + if (yych == 't') goto yy971; + goto yy87; +yy922: yych = *++cursor_; - if (yych == 'e') goto yy925; - goto yy50; -yy875: + if (yych == 'e') goto yy973; + goto yy87; +yy923: yych = *++cursor_; - if (yych == 'r') goto yy926; - goto yy50; -yy876: + if (yych == 'r') goto yy974; + goto yy87; +yy924: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 275 "src/wast-lexer.cc" +#line 277 "src/wast-lexer.cc" { RETURN(GET_GLOBAL); } -#line 5422 "src/prebuilt/wast-lexer-gen.cc" -yy878: +#line 5183 "src/prebuilt/wast-lexer-gen.cc" +yy926: yych = *++cursor_; - if (yych == 'y') goto yy927; - goto yy50; -yy879: + if (yych == 'y') goto yy975; + goto yy87; +yy927: yych = *++cursor_; - if (yych == '_') goto yy929; - goto yy50; -yy880: + if (yych == '_') goto yy977; + goto yy87; +yy928: yych = *++cursor_; - if (yych == 's') goto yy930; - if (yych == 'u') goto yy932; - goto yy50; -yy881: + if (yych == 's') goto yy978; + if (yych == 'u') goto yy980; + goto yy87; +yy929: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 312 "src/wast-lexer.cc" +#line 314 "src/wast-lexer.cc" { OPCODE(I32Popcnt); RETURN(UNARY); } -#line 5443 "src/prebuilt/wast-lexer-gen.cc" -yy883: +#line 5204 "src/prebuilt/wast-lexer-gen.cc" +yy931: yych = *++cursor_; - if (yych == 'r') goto yy934; - goto yy50; -yy884: + if (yych == 'r') goto yy982; + goto yy87; +yy932: yych = *++cursor_; - if (yych == '6') goto yy935; - goto yy50; -yy885: + if (yych == '6') goto yy983; + goto yy87; +yy933: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 295 "src/wast-lexer.cc" +#line 297 "src/wast-lexer.cc" { OPCODE(I32Store8); RETURN(STORE); } -#line 5459 "src/prebuilt/wast-lexer-gen.cc" -yy887: +#line 5220 "src/prebuilt/wast-lexer-gen.cc" +yy935: yych = *++cursor_; - if (yych == 's') goto yy937; - if (yych == 'u') goto yy938; - goto yy50; -yy888: + if (yych == 's') goto yy985; + if (yych == 'u') goto yy986; + goto yy87; +yy936: yych = *++cursor_; - if (yych == '6') goto yy939; - goto yy50; -yy889: + if (yych == '6') goto yy987; + goto yy87; +yy937: yych = *++cursor_; - if (yych == '_') goto yy940; - goto yy50; -yy890: + if (yych == '_') goto yy988; + goto yy87; +yy938: yych = *++cursor_; - if (yych == '_') goto yy941; - goto yy50; -yy891: + if (yych == '_') goto yy989; + goto yy87; +yy939: yych = *++cursor_; - if (yych == '_') goto yy942; - goto yy50; -yy892: + if (yych == '_') goto yy990; + goto yy87; +yy940: yych = *++cursor_; - if (yych == 's') goto yy943; - if (yych == 'u') goto yy945; - goto yy50; -yy893: + if (yych == 's') goto yy991; + if (yych == 'u') goto yy993; + goto yy87; +yy941: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 313 "src/wast-lexer.cc" +#line 315 "src/wast-lexer.cc" { OPCODE(I64Popcnt); RETURN(UNARY); } -#line 5493 "src/prebuilt/wast-lexer-gen.cc" -yy895: +#line 5254 "src/prebuilt/wast-lexer-gen.cc" +yy943: yych = *++cursor_; - if (yych == 'r') goto yy947; - goto yy50; -yy896: + if (yych == 'r') goto yy995; + goto yy87; +yy944: yych = *++cursor_; - if (yych == '6') goto yy948; - goto yy50; -yy897: + if (yych == '6') goto yy996; + goto yy87; +yy945: yych = *++cursor_; - if (yych == '2') goto yy950; - goto yy50; -yy898: + if (yych == '2') goto yy998; + goto yy87; +yy946: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 296 "src/wast-lexer.cc" +#line 298 "src/wast-lexer.cc" { OPCODE(I64Store8); RETURN(STORE); } -#line 5513 "src/prebuilt/wast-lexer-gen.cc" -yy900: +#line 5274 "src/prebuilt/wast-lexer-gen.cc" +yy948: yych = *++cursor_; - if (yych == 's') goto yy952; - if (yych == 'u') goto yy953; - goto yy50; -yy901: + if (yych == 's') goto yy1000; + if (yych == 'u') goto yy1001; + goto yy87; +yy949: ++cursor_; if (limit_ <= cursor_) FILL(1); yych = *cursor_; - if (yych <= '@') { - if (yych <= '+') { - if (yych <= '"') { - if (yych == '!') goto yy49; - goto yy757; - } else { - if (yych <= '\'') goto yy49; - if (yych <= ')') goto yy757; - goto yy49; - } + if (yych <= '9') { + if (yych <= '"') { + if (yych == '!') goto yy86; + goto yy805; } else { - if (yych <= '9') { - if (yych <= ',') goto yy757; - if (yych <= '/') goto yy49; - goto yy901; - } else { - if (yych == ';') goto yy757; - goto yy49; - } + if (yych <= '\'') goto yy86; + if (yych <= ')') goto yy805; + if (yych <= '/') goto yy86; + goto yy949; } } else { - if (yych <= '`') { - if (yych <= '[') { - if (yych <= 'F') goto yy901; - if (yych <= 'Z') goto yy49; - goto yy757; - } else { - if (yych == ']') goto yy757; - goto yy49; - } + if (yych <= 'F') { + if (yych == ';') goto yy805; + if (yych <= '@') goto yy86; + goto yy949; } else { - if (yych <= '{') { - if (yych <= 'f') goto yy901; - if (yych <= 'z') goto yy49; - goto yy757; - } else { - if (yych == '}') goto yy757; - if (yych <= '~') goto yy49; - goto yy757; - } + if (yych <= '`') goto yy86; + if (yych <= 'f') goto yy949; + if (yych <= '~') goto yy86; + goto yy805; } } -yy903: +yy951: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 276 "src/wast-lexer.cc" +#line 278 "src/wast-lexer.cc" { RETURN(SET_GLOBAL); } -#line 5572 "src/prebuilt/wast-lexer-gen.cc" -yy905: +#line 5313 "src/prebuilt/wast-lexer-gen.cc" +yy953: yych = *++cursor_; - if (yych == 'e') goto yy954; - goto yy50; -yy906: + if (yych == 'e') goto yy1002; + goto yy87; +yy954: yych = *++cursor_; - if (yych == 'u') goto yy956; - goto yy50; -yy907: + if (yych == 'u') goto yy1004; + goto yy87; +yy955: yych = *++cursor_; - if (yych == 'l') goto yy957; - goto yy50; -yy908: + if (yych == 'l') goto yy1005; + goto yy87; +yy956: yych = *++cursor_; - if (yych == 'o') goto yy958; - goto yy50; -yy909: + if (yych == 'o') goto yy1006; + goto yy87; +yy957: yych = *++cursor_; - if (yych == 'r') goto yy959; - goto yy50; -yy910: + if (yych == 'r') goto yy1007; + goto yy87; +yy958: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 459 "src/wast-lexer.cc" +#line 461 "src/wast-lexer.cc" { RETURN(ASSERT_TRAP); } -#line 5600 "src/prebuilt/wast-lexer-gen.cc" -yy912: +#line 5341 "src/prebuilt/wast-lexer-gen.cc" +yy960: yych = *++cursor_; - if (yych == 'n') goto yy960; - goto yy50; -yy913: + if (yych == 'n') goto yy1008; + goto yy87; +yy961: yych = *++cursor_; - if (yych == 'c') goto yy961; - goto yy50; -yy914: + if (yych == 'c') goto yy1009; + goto yy87; +yy962: yych = *++cursor_; - if (yych == 'o') goto yy962; - goto yy50; -yy915: + if (yych == 'o') goto yy1010; + goto yy87; +yy963: yych = *++cursor_; - if (yych == '_') goto yy963; - goto yy50; -yy916: + if (yych == '_') goto yy1011; + goto yy87; +yy964: yych = *++cursor_; - if (yych == 'n') goto yy964; - goto yy50; -yy917: + if (yych == 'n') goto yy1012; + goto yy87; +yy965: yych = *++cursor_; - if (yych == 'f') goto yy966; - goto yy50; -yy918: + if (yych == 'f') goto yy1014; + goto yy87; +yy966: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 326 "src/wast-lexer.cc" +#line 328 "src/wast-lexer.cc" { OPCODE(F32Nearest); RETURN(UNARY); } -#line 5632 "src/prebuilt/wast-lexer-gen.cc" -yy920: +#line 5373 "src/prebuilt/wast-lexer-gen.cc" +yy968: yych = *++cursor_; - if (yych == 'p') goto yy967; - goto yy50; -yy921: + if (yych == 'p') goto yy1015; + goto yy87; +yy969: yych = *++cursor_; - if (yych == '_') goto yy968; - goto yy50; -yy922: + if (yych == '_') goto yy1016; + goto yy87; +yy970: yych = *++cursor_; - if (yych == 'n') goto yy969; - goto yy50; -yy923: + if (yych == 'n') goto yy1017; + goto yy87; +yy971: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 327 "src/wast-lexer.cc" +#line 329 "src/wast-lexer.cc" { OPCODE(F64Nearest); RETURN(UNARY); } -#line 5652 "src/prebuilt/wast-lexer-gen.cc" -yy925: +#line 5393 "src/prebuilt/wast-lexer-gen.cc" +yy973: yych = *++cursor_; - if (yych == '/') goto yy971; - goto yy50; -yy926: + if (yych == '/') goto yy1019; + goto yy87; +yy974: yych = *++cursor_; - if (yych == 'p') goto yy972; - goto yy50; -yy927: + if (yych == 'p') goto yy1020; + goto yy87; +yy975: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 432 "src/wast-lexer.cc" +#line 434 "src/wast-lexer.cc" { RETURN(GROW_MEMORY); } -#line 5668 "src/prebuilt/wast-lexer-gen.cc" -yy929: +#line 5409 "src/prebuilt/wast-lexer-gen.cc" +yy977: yych = *++cursor_; - if (yych == 's') goto yy973; - if (yych == 'u') goto yy975; - goto yy50; -yy930: + if (yych == 's') goto yy1021; + if (yych == 'u') goto yy1023; + goto yy87; +yy978: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 285 "src/wast-lexer.cc" +#line 287 "src/wast-lexer.cc" { OPCODE(I32Load8S); RETURN(LOAD); } -#line 5681 "src/prebuilt/wast-lexer-gen.cc" -yy932: +#line 5422 "src/prebuilt/wast-lexer-gen.cc" +yy980: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 287 "src/wast-lexer.cc" +#line 289 "src/wast-lexer.cc" { OPCODE(I32Load8U); RETURN(LOAD); } -#line 5689 "src/prebuilt/wast-lexer-gen.cc" -yy934: +#line 5430 "src/prebuilt/wast-lexer-gen.cc" +yy982: yych = *++cursor_; - if (yych == 'p') goto yy977; - goto yy50; -yy935: + if (yych == 'p') goto yy1025; + goto yy87; +yy983: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 297 "src/wast-lexer.cc" +#line 299 "src/wast-lexer.cc" { OPCODE(I32Store16); RETURN(STORE); } -#line 5701 "src/prebuilt/wast-lexer-gen.cc" -yy937: +#line 5442 "src/prebuilt/wast-lexer-gen.cc" +yy985: yych = *++cursor_; - if (yych == '/') goto yy978; - goto yy50; -yy938: + if (yych == '/') goto yy1026; + goto yy87; +yy986: yych = *++cursor_; - if (yych == '/') goto yy979; - goto yy50; -yy939: + if (yych == '/') goto yy1027; + goto yy87; +yy987: yych = *++cursor_; - if (yych == '4') goto yy980; - goto yy50; -yy940: + if (yych == '4') goto yy1028; + goto yy87; +yy988: yych = *++cursor_; - if (yych == 's') goto yy982; - if (yych == 'u') goto yy983; - goto yy50; -yy941: + if (yych == 's') goto yy1030; + if (yych == 'u') goto yy1031; + goto yy87; +yy989: yych = *++cursor_; - if (yych == 's') goto yy984; - if (yych == 'u') goto yy986; - goto yy50; -yy942: + if (yych == 's') goto yy1032; + if (yych == 'u') goto yy1034; + goto yy87; +yy990: yych = *++cursor_; - if (yych == 's') goto yy988; - if (yych == 'u') goto yy990; - goto yy50; -yy943: + if (yych == 's') goto yy1036; + if (yych == 'u') goto yy1038; + goto yy87; +yy991: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 286 "src/wast-lexer.cc" +#line 288 "src/wast-lexer.cc" { OPCODE(I64Load8S); RETURN(LOAD); } -#line 5736 "src/prebuilt/wast-lexer-gen.cc" -yy945: +#line 5477 "src/prebuilt/wast-lexer-gen.cc" +yy993: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 288 "src/wast-lexer.cc" +#line 290 "src/wast-lexer.cc" { OPCODE(I64Load8U); RETURN(LOAD); } -#line 5744 "src/prebuilt/wast-lexer-gen.cc" -yy947: +#line 5485 "src/prebuilt/wast-lexer-gen.cc" +yy995: yych = *++cursor_; - if (yych == 'p') goto yy992; - goto yy50; -yy948: + if (yych == 'p') goto yy1040; + goto yy87; +yy996: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 298 "src/wast-lexer.cc" +#line 300 "src/wast-lexer.cc" { OPCODE(I64Store16); RETURN(STORE); } -#line 5756 "src/prebuilt/wast-lexer-gen.cc" -yy950: +#line 5497 "src/prebuilt/wast-lexer-gen.cc" +yy998: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 299 "src/wast-lexer.cc" +#line 301 "src/wast-lexer.cc" { OPCODE(I64Store32); RETURN(STORE); } -#line 5764 "src/prebuilt/wast-lexer-gen.cc" -yy952: +#line 5505 "src/prebuilt/wast-lexer-gen.cc" +yy1000: yych = *++cursor_; - if (yych == '/') goto yy993; - goto yy50; -yy953: + if (yych == '/') goto yy1041; + goto yy87; +yy1001: yych = *++cursor_; - if (yych == '/') goto yy994; - goto yy50; -yy954: + if (yych == '/') goto yy1042; + goto yy87; +yy1002: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 430 "src/wast-lexer.cc" +#line 432 "src/wast-lexer.cc" { RETURN(UNREACHABLE); } -#line 5780 "src/prebuilt/wast-lexer-gen.cc" -yy956: +#line 5521 "src/prebuilt/wast-lexer-gen.cc" +yy1004: yych = *++cursor_; - if (yych == 's') goto yy995; - goto yy50; -yy957: + if (yych == 's') goto yy1043; + goto yy87; +yy1005: yych = *++cursor_; - if (yych == 'i') goto yy996; - goto yy50; -yy958: + if (yych == 'i') goto yy1044; + goto yy87; +yy1006: yych = *++cursor_; - if (yych == 'r') goto yy997; - goto yy50; -yy959: + if (yych == 'r') goto yy1045; + goto yy87; +yy1007: yych = *++cursor_; - if (yych == 'n') goto yy998; - goto yy50; -yy960: + if (yych == 'n') goto yy1046; + goto yy87; +yy1008: yych = *++cursor_; - if (yych == 'k') goto yy1000; - goto yy50; -yy961: + if (yych == 'k') goto yy1048; + goto yy87; +yy1009: yych = *++cursor_; - if (yych == 't') goto yy1001; - goto yy50; -yy962: + if (yych == 't') goto yy1049; + goto yy87; +yy1010: yych = *++cursor_; - if (yych == 'r') goto yy1003; - goto yy50; -yy963: + if (yych == 'r') goto yy1051; + goto yy87; +yy1011: yych = *++cursor_; - if (yych == 's') goto yy1004; - if (yych == 'u') goto yy1005; - goto yy50; -yy964: + if (yych == 's') goto yy1052; + if (yych == 'u') goto yy1053; + goto yy87; +yy1012: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 370 "src/wast-lexer.cc" +#line 372 "src/wast-lexer.cc" { OPCODE(F32Copysign); RETURN(BINARY); } -#line 5821 "src/prebuilt/wast-lexer-gen.cc" -yy966: +#line 5562 "src/prebuilt/wast-lexer-gen.cc" +yy1014: yych = *++cursor_; - if (yych == '6') goto yy1006; - goto yy50; -yy967: + if (yych == '6') goto yy1054; + goto yy87; +yy1015: yych = *++cursor_; - if (yych == 'r') goto yy1007; - goto yy50; -yy968: + if (yych == 'r') goto yy1055; + goto yy87; +yy1016: yych = *++cursor_; - if (yych == 's') goto yy1008; - if (yych == 'u') goto yy1009; - goto yy50; -yy969: + if (yych == 's') goto yy1056; + if (yych == 'u') goto yy1057; + goto yy87; +yy1017: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 371 "src/wast-lexer.cc" +#line 373 "src/wast-lexer.cc" { OPCODE(F64Copysign); RETURN(BINARY); } -#line 5842 "src/prebuilt/wast-lexer-gen.cc" -yy971: +#line 5583 "src/prebuilt/wast-lexer-gen.cc" +yy1019: yych = *++cursor_; - if (yych == 'f') goto yy1010; - goto yy50; -yy972: + if (yych == 'f') goto yy1058; + goto yy87; +yy1020: yych = *++cursor_; - if (yych == 'r') goto yy1011; - goto yy50; -yy973: + if (yych == 'r') goto yy1059; + goto yy87; +yy1021: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 289 "src/wast-lexer.cc" +#line 291 "src/wast-lexer.cc" { OPCODE(I32Load16S); RETURN(LOAD); } -#line 5858 "src/prebuilt/wast-lexer-gen.cc" -yy975: +#line 5599 "src/prebuilt/wast-lexer-gen.cc" +yy1023: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 291 "src/wast-lexer.cc" +#line 293 "src/wast-lexer.cc" { OPCODE(I32Load16U); RETURN(LOAD); } -#line 5866 "src/prebuilt/wast-lexer-gen.cc" -yy977: +#line 5607 "src/prebuilt/wast-lexer-gen.cc" +yy1025: yych = *++cursor_; - if (yych == 'r') goto yy1012; - goto yy50; -yy978: + if (yych == 'r') goto yy1060; + goto yy87; +yy1026: yych = *++cursor_; - if (yych == 'f') goto yy1013; - goto yy50; -yy979: + if (yych == 'f') goto yy1061; + goto yy87; +yy1027: yych = *++cursor_; - if (yych == 'f') goto yy1014; - goto yy50; -yy980: + if (yych == 'f') goto yy1062; + goto yy87; +yy1028: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 406 "src/wast-lexer.cc" +#line 408 "src/wast-lexer.cc" { OPCODE(I32WrapI64); RETURN(CONVERT); } -#line 5886 "src/prebuilt/wast-lexer-gen.cc" -yy982: +#line 5627 "src/prebuilt/wast-lexer-gen.cc" +yy1030: yych = *++cursor_; - if (yych == '/') goto yy1015; - goto yy50; -yy983: + if (yych == '/') goto yy1063; + goto yy87; +yy1031: yych = *++cursor_; - if (yych == '/') goto yy1016; - goto yy50; -yy984: + if (yych == '/') goto yy1064; + goto yy87; +yy1032: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 290 "src/wast-lexer.cc" +#line 292 "src/wast-lexer.cc" { OPCODE(I64Load16S); RETURN(LOAD); } -#line 5902 "src/prebuilt/wast-lexer-gen.cc" -yy986: +#line 5643 "src/prebuilt/wast-lexer-gen.cc" +yy1034: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 292 "src/wast-lexer.cc" +#line 294 "src/wast-lexer.cc" { OPCODE(I64Load16U); RETURN(LOAD); } -#line 5910 "src/prebuilt/wast-lexer-gen.cc" -yy988: +#line 5651 "src/prebuilt/wast-lexer-gen.cc" +yy1036: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 293 "src/wast-lexer.cc" +#line 295 "src/wast-lexer.cc" { OPCODE(I64Load32S); RETURN(LOAD); } -#line 5918 "src/prebuilt/wast-lexer-gen.cc" -yy990: +#line 5659 "src/prebuilt/wast-lexer-gen.cc" +yy1038: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 294 "src/wast-lexer.cc" +#line 296 "src/wast-lexer.cc" { OPCODE(I64Load32U); RETURN(LOAD); } -#line 5926 "src/prebuilt/wast-lexer-gen.cc" -yy992: +#line 5667 "src/prebuilt/wast-lexer-gen.cc" +yy1040: yych = *++cursor_; - if (yych == 'r') goto yy1017; - goto yy50; -yy993: + if (yych == 'r') goto yy1065; + goto yy87; +yy1041: yych = *++cursor_; - if (yych == 'f') goto yy1018; - goto yy50; -yy994: + if (yych == 'f') goto yy1066; + goto yy87; +yy1042: yych = *++cursor_; - if (yych == 'f') goto yy1019; - goto yy50; -yy995: + if (yych == 'f') goto yy1067; + goto yy87; +yy1043: yych = *++cursor_; - if (yych == 't') goto yy1020; - goto yy50; -yy996: + if (yych == 't') goto yy1068; + goto yy87; +yy1044: yych = *++cursor_; - if (yych == 'd') goto yy1021; - goto yy50; -yy997: + if (yych == 'd') goto yy1069; + goto yy87; +yy1045: yych = *++cursor_; - if (yych == 'm') goto yy1023; - goto yy50; -yy998: + if (yych == 'm') goto yy1071; + goto yy87; +yy1046: ++cursor_; - if ((yych = *cursor_) <= 'Z') { - if (yych <= ')') { - if (yych <= '!') { - if (yych >= '!') goto yy49; - } else { - if (yych <= '"') goto yy999; - if (yych <= '\'') goto yy49; - } + if ((yych = *cursor_) <= ')') { + if (yych <= '!') { + if (yych >= '!') goto yy86; } else { - if (yych <= ',') { - if (yych <= '+') goto yy49; - } else { - if (yych != ';') goto yy49; - } + if (yych <= '"') goto yy1047; + if (yych <= '\'') goto yy86; } } else { - if (yych <= '_') { - if (yych <= '\\') { - if (yych >= '\\') goto yy49; - } else { - if (yych <= ']') goto yy999; - if (yych <= '^') goto yy49; - goto yy1024; - } + if (yych <= '^') { + if (yych != ';') goto yy86; } else { - if (yych <= '|') { - if (yych != '{') goto yy49; - } else { - if (yych == '~') goto yy49; - } + if (yych <= '_') goto yy1072; + if (yych <= '~') goto yy86; } } -yy999: -#line 454 "src/wast-lexer.cc" +yy1047: +#line 456 "src/wast-lexer.cc" { RETURN(ASSERT_RETURN); } -#line 5988 "src/prebuilt/wast-lexer-gen.cc" -yy1000: +#line 5712 "src/prebuilt/wast-lexer-gen.cc" +yy1048: yych = *++cursor_; - if (yych == 'a') goto yy1025; - goto yy50; -yy1001: + if (yych == 'a') goto yy1073; + goto yy87; +yy1049: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 268 "src/wast-lexer.cc" +#line 270 "src/wast-lexer.cc" { RETURN(CALL_INDIRECT); } -#line 6000 "src/prebuilt/wast-lexer-gen.cc" -yy1003: +#line 5724 "src/prebuilt/wast-lexer-gen.cc" +yy1051: yych = *++cursor_; - if (yych == 'y') goto yy1026; - goto yy50; -yy1004: + if (yych == 'y') goto yy1074; + goto yy87; +yy1052: yych = *++cursor_; - if (yych == '/') goto yy1028; - goto yy50; -yy1005: + if (yych == '/') goto yy1076; + goto yy87; +yy1053: yych = *++cursor_; - if (yych == '/') goto yy1029; - goto yy50; -yy1006: + if (yych == '/') goto yy1077; + goto yy87; +yy1054: yych = *++cursor_; - if (yych == '4') goto yy1030; - goto yy50; -yy1007: + if (yych == '4') goto yy1078; + goto yy87; +yy1055: yych = *++cursor_; - if (yych == 'e') goto yy1032; - goto yy50; -yy1008: + if (yych == 'e') goto yy1080; + goto yy87; +yy1056: yych = *++cursor_; - if (yych == '/') goto yy1033; - goto yy50; -yy1009: + if (yych == '/') goto yy1081; + goto yy87; +yy1057: yych = *++cursor_; - if (yych == '/') goto yy1034; - goto yy50; -yy1010: + if (yych == '/') goto yy1082; + goto yy87; +yy1058: yych = *++cursor_; - if (yych == '3') goto yy1035; - goto yy50; -yy1011: + if (yych == '3') goto yy1083; + goto yy87; +yy1059: yych = *++cursor_; - if (yych == 'e') goto yy1036; - goto yy50; -yy1012: + if (yych == 'e') goto yy1084; + goto yy87; +yy1060: yych = *++cursor_; - if (yych == 'e') goto yy1037; - goto yy50; -yy1013: + if (yych == 'e') goto yy1085; + goto yy87; +yy1061: yych = *++cursor_; - if (yych == '3') goto yy1038; - if (yych == '6') goto yy1039; - goto yy50; -yy1014: + if (yych == '3') goto yy1086; + if (yych == '6') goto yy1087; + goto yy87; +yy1062: yych = *++cursor_; - if (yych == '3') goto yy1040; - if (yych == '6') goto yy1041; - goto yy50; -yy1015: + if (yych == '3') goto yy1088; + if (yych == '6') goto yy1089; + goto yy87; +yy1063: yych = *++cursor_; - if (yych == 'i') goto yy1042; - goto yy50; -yy1016: + if (yych == 'i') goto yy1090; + goto yy87; +yy1064: yych = *++cursor_; - if (yych == 'i') goto yy1043; - goto yy50; -yy1017: + if (yych == 'i') goto yy1091; + goto yy87; +yy1065: yych = *++cursor_; - if (yych == 'e') goto yy1044; - goto yy50; -yy1018: + if (yych == 'e') goto yy1092; + goto yy87; +yy1066: yych = *++cursor_; - if (yych == '3') goto yy1045; - if (yych == '6') goto yy1046; - goto yy50; -yy1019: + if (yych == '3') goto yy1093; + if (yych == '6') goto yy1094; + goto yy87; +yy1067: yych = *++cursor_; - if (yych == '3') goto yy1047; - if (yych == '6') goto yy1048; - goto yy50; -yy1020: + if (yych == '3') goto yy1095; + if (yych == '6') goto yy1096; + goto yy87; +yy1068: yych = *++cursor_; - if (yych == 'i') goto yy1049; - goto yy50; -yy1021: + if (yych == 'i') goto yy1097; + goto yy87; +yy1069: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 452 "src/wast-lexer.cc" +#line 454 "src/wast-lexer.cc" { RETURN(ASSERT_INVALID); } -#line 6084 "src/prebuilt/wast-lexer-gen.cc" -yy1023: +#line 5808 "src/prebuilt/wast-lexer-gen.cc" +yy1071: yych = *++cursor_; - if (yych == 'e') goto yy1050; - goto yy50; -yy1024: + if (yych == 'e') goto yy1098; + goto yy87; +yy1072: yych = *++cursor_; - if (yych == 'a') goto yy1051; - if (yych == 'c') goto yy1052; - goto yy50; -yy1025: + if (yych == 'a') goto yy1099; + if (yych == 'c') goto yy1100; + goto yy87; +yy1073: yych = *++cursor_; - if (yych == 'b') goto yy1053; - goto yy50; -yy1026: + if (yych == 'b') goto yy1101; + goto yy87; +yy1074: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 431 "src/wast-lexer.cc" +#line 433 "src/wast-lexer.cc" { RETURN(CURRENT_MEMORY); } -#line 6105 "src/prebuilt/wast-lexer-gen.cc" -yy1028: +#line 5829 "src/prebuilt/wast-lexer-gen.cc" +yy1076: yych = *++cursor_; - if (yych == 'i') goto yy1054; - goto yy50; -yy1029: + if (yych == 'i') goto yy1102; + goto yy87; +yy1077: yych = *++cursor_; - if (yych == 'i') goto yy1055; - goto yy50; -yy1030: + if (yych == 'i') goto yy1103; + goto yy87; +yy1078: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 424 "src/wast-lexer.cc" +#line 426 "src/wast-lexer.cc" { OPCODE(F32DemoteF64); RETURN(CONVERT); } -#line 6121 "src/prebuilt/wast-lexer-gen.cc" -yy1032: +#line 5845 "src/prebuilt/wast-lexer-gen.cc" +yy1080: yych = *++cursor_; - if (yych == 't') goto yy1056; - goto yy50; -yy1033: + if (yych == 't') goto yy1104; + goto yy87; +yy1081: yych = *++cursor_; - if (yych == 'i') goto yy1057; - goto yy50; -yy1034: + if (yych == 'i') goto yy1105; + goto yy87; +yy1082: yych = *++cursor_; - if (yych == 'i') goto yy1058; - goto yy50; -yy1035: + if (yych == 'i') goto yy1106; + goto yy87; +yy1083: yych = *++cursor_; - if (yych == '2') goto yy1059; - goto yy50; -yy1036: + if (yych == '2') goto yy1107; + goto yy87; +yy1084: yych = *++cursor_; - if (yych == 't') goto yy1061; - goto yy50; -yy1037: + if (yych == 't') goto yy1109; + goto yy87; +yy1085: yych = *++cursor_; - if (yych == 't') goto yy1062; - goto yy50; -yy1038: + if (yych == 't') goto yy1110; + goto yy87; +yy1086: yych = *++cursor_; - if (yych == '2') goto yy1063; - goto yy50; -yy1039: + if (yych == '2') goto yy1111; + goto yy87; +yy1087: yych = *++cursor_; - if (yych == '4') goto yy1065; - goto yy50; -yy1040: + if (yych == '4') goto yy1113; + goto yy87; +yy1088: yych = *++cursor_; - if (yych == '2') goto yy1067; - goto yy50; -yy1041: + if (yych == '2') goto yy1115; + goto yy87; +yy1089: yych = *++cursor_; - if (yych == '4') goto yy1069; - goto yy50; -yy1042: + if (yych == '4') goto yy1117; + goto yy87; +yy1090: yych = *++cursor_; - if (yych == '3') goto yy1071; - goto yy50; -yy1043: + if (yych == '3') goto yy1119; + goto yy87; +yy1091: yych = *++cursor_; - if (yych == '3') goto yy1072; - goto yy50; -yy1044: + if (yych == '3') goto yy1120; + goto yy87; +yy1092: yych = *++cursor_; - if (yych == 't') goto yy1073; - goto yy50; -yy1045: + if (yych == 't') goto yy1121; + goto yy87; +yy1093: yych = *++cursor_; - if (yych == '2') goto yy1074; - goto yy50; -yy1046: + if (yych == '2') goto yy1122; + goto yy87; +yy1094: yych = *++cursor_; - if (yych == '4') goto yy1076; - goto yy50; -yy1047: + if (yych == '4') goto yy1124; + goto yy87; +yy1095: yych = *++cursor_; - if (yych == '2') goto yy1078; - goto yy50; -yy1048: + if (yych == '2') goto yy1126; + goto yy87; +yy1096: yych = *++cursor_; - if (yych == '4') goto yy1080; - goto yy50; -yy1049: + if (yych == '4') goto yy1128; + goto yy87; +yy1097: yych = *++cursor_; - if (yych == 'o') goto yy1082; - goto yy50; -yy1050: + if (yych == 'o') goto yy1130; + goto yy87; +yy1098: yych = *++cursor_; - if (yych == 'd') goto yy1083; - goto yy50; -yy1051: + if (yych == 'd') goto yy1131; + goto yy87; +yy1099: yych = *++cursor_; - if (yych == 'r') goto yy1085; - goto yy50; -yy1052: + if (yych == 'r') goto yy1133; + goto yy87; +yy1100: yych = *++cursor_; - if (yych == 'a') goto yy1086; - goto yy50; -yy1053: + if (yych == 'a') goto yy1134; + goto yy87; +yy1101: yych = *++cursor_; - if (yych == 'l') goto yy1087; - goto yy50; -yy1054: + if (yych == 'l') goto yy1135; + goto yy87; +yy1102: yych = *++cursor_; - if (yych == '3') goto yy1088; - if (yych == '6') goto yy1089; - goto yy50; -yy1055: + if (yych == '3') goto yy1136; + if (yych == '6') goto yy1137; + goto yy87; +yy1103: yych = *++cursor_; - if (yych == '3') goto yy1090; - if (yych == '6') goto yy1091; - goto yy50; -yy1056: + if (yych == '3') goto yy1138; + if (yych == '6') goto yy1139; + goto yy87; +yy1104: yych = *++cursor_; - if (yych == '/') goto yy1092; - goto yy50; -yy1057: + if (yych == '/') goto yy1140; + goto yy87; +yy1105: yych = *++cursor_; - if (yych == '3') goto yy1093; - if (yych == '6') goto yy1094; - goto yy50; -yy1058: + if (yych == '3') goto yy1141; + if (yych == '6') goto yy1142; + goto yy87; +yy1106: yych = *++cursor_; - if (yych == '3') goto yy1095; - if (yych == '6') goto yy1096; - goto yy50; -yy1059: + if (yych == '3') goto yy1143; + if (yych == '6') goto yy1144; + goto yy87; +yy1107: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 423 "src/wast-lexer.cc" +#line 425 "src/wast-lexer.cc" { OPCODE(F64PromoteF32); RETURN(CONVERT); } -#line 6241 "src/prebuilt/wast-lexer-gen.cc" -yy1061: +#line 5965 "src/prebuilt/wast-lexer-gen.cc" +yy1109: yych = *++cursor_; - if (yych == '/') goto yy1097; - goto yy50; -yy1062: + if (yych == '/') goto yy1145; + goto yy87; +yy1110: yych = *++cursor_; - if (yych == '/') goto yy1098; - goto yy50; -yy1063: + if (yych == '/') goto yy1146; + goto yy87; +yy1111: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 407 "src/wast-lexer.cc" +#line 409 "src/wast-lexer.cc" { OPCODE(I32TruncSF32); RETURN(CONVERT); } -#line 6257 "src/prebuilt/wast-lexer-gen.cc" -yy1065: +#line 5981 "src/prebuilt/wast-lexer-gen.cc" +yy1113: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 409 "src/wast-lexer.cc" +#line 411 "src/wast-lexer.cc" { OPCODE(I32TruncSF64); RETURN(CONVERT); } -#line 6265 "src/prebuilt/wast-lexer-gen.cc" -yy1067: +#line 5989 "src/prebuilt/wast-lexer-gen.cc" +yy1115: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 411 "src/wast-lexer.cc" +#line 413 "src/wast-lexer.cc" { OPCODE(I32TruncUF32); RETURN(CONVERT); } -#line 6273 "src/prebuilt/wast-lexer-gen.cc" -yy1069: +#line 5997 "src/prebuilt/wast-lexer-gen.cc" +yy1117: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 413 "src/wast-lexer.cc" +#line 415 "src/wast-lexer.cc" { OPCODE(I32TruncUF64); RETURN(CONVERT); } -#line 6281 "src/prebuilt/wast-lexer-gen.cc" -yy1071: +#line 6005 "src/prebuilt/wast-lexer-gen.cc" +yy1119: yych = *++cursor_; - if (yych == '2') goto yy1099; - goto yy50; -yy1072: + if (yych == '2') goto yy1147; + goto yy87; +yy1120: yych = *++cursor_; - if (yych == '2') goto yy1101; - goto yy50; -yy1073: + if (yych == '2') goto yy1149; + goto yy87; +yy1121: yych = *++cursor_; - if (yych == '/') goto yy1103; - goto yy50; -yy1074: + if (yych == '/') goto yy1151; + goto yy87; +yy1122: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 408 "src/wast-lexer.cc" +#line 410 "src/wast-lexer.cc" { OPCODE(I64TruncSF32); RETURN(CONVERT); } -#line 6301 "src/prebuilt/wast-lexer-gen.cc" -yy1076: +#line 6025 "src/prebuilt/wast-lexer-gen.cc" +yy1124: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 410 "src/wast-lexer.cc" +#line 412 "src/wast-lexer.cc" { OPCODE(I64TruncSF64); RETURN(CONVERT); } -#line 6309 "src/prebuilt/wast-lexer-gen.cc" -yy1078: +#line 6033 "src/prebuilt/wast-lexer-gen.cc" +yy1126: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 412 "src/wast-lexer.cc" +#line 414 "src/wast-lexer.cc" { OPCODE(I64TruncUF32); RETURN(CONVERT); } -#line 6317 "src/prebuilt/wast-lexer-gen.cc" -yy1080: +#line 6041 "src/prebuilt/wast-lexer-gen.cc" +yy1128: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 414 "src/wast-lexer.cc" +#line 416 "src/wast-lexer.cc" { OPCODE(I64TruncUF64); RETURN(CONVERT); } -#line 6325 "src/prebuilt/wast-lexer-gen.cc" -yy1082: +#line 6049 "src/prebuilt/wast-lexer-gen.cc" +yy1130: yych = *++cursor_; - if (yych == 'n') goto yy1104; - goto yy50; -yy1083: + if (yych == 'n') goto yy1152; + goto yy87; +yy1131: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 451 "src/wast-lexer.cc" +#line 453 "src/wast-lexer.cc" { RETURN(ASSERT_MALFORMED); } -#line 6337 "src/prebuilt/wast-lexer-gen.cc" -yy1085: +#line 6061 "src/prebuilt/wast-lexer-gen.cc" +yy1133: yych = *++cursor_; - if (yych == 'i') goto yy1106; - goto yy50; -yy1086: + if (yych == 'i') goto yy1154; + goto yy87; +yy1134: yych = *++cursor_; - if (yych == 'n') goto yy1107; - goto yy50; -yy1087: + if (yych == 'n') goto yy1155; + goto yy87; +yy1135: yych = *++cursor_; - if (yych == 'e') goto yy1108; - goto yy50; -yy1088: + if (yych == 'e') goto yy1156; + goto yy87; +yy1136: yych = *++cursor_; - if (yych == '2') goto yy1110; - goto yy50; -yy1089: + if (yych == '2') goto yy1158; + goto yy87; +yy1137: yych = *++cursor_; - if (yych == '4') goto yy1112; - goto yy50; -yy1090: + if (yych == '4') goto yy1160; + goto yy87; +yy1138: yych = *++cursor_; - if (yych == '2') goto yy1114; - goto yy50; -yy1091: + if (yych == '2') goto yy1162; + goto yy87; +yy1139: yych = *++cursor_; - if (yych == '4') goto yy1116; - goto yy50; -yy1092: + if (yych == '4') goto yy1164; + goto yy87; +yy1140: yych = *++cursor_; - if (yych == 'i') goto yy1118; - goto yy50; -yy1093: + if (yych == 'i') goto yy1166; + goto yy87; +yy1141: yych = *++cursor_; - if (yych == '2') goto yy1119; - goto yy50; -yy1094: + if (yych == '2') goto yy1167; + goto yy87; +yy1142: yych = *++cursor_; - if (yych == '4') goto yy1121; - goto yy50; -yy1095: + if (yych == '4') goto yy1169; + goto yy87; +yy1143: yych = *++cursor_; - if (yych == '2') goto yy1123; - goto yy50; -yy1096: + if (yych == '2') goto yy1171; + goto yy87; +yy1144: yych = *++cursor_; - if (yych == '4') goto yy1125; - goto yy50; -yy1097: + if (yych == '4') goto yy1173; + goto yy87; +yy1145: yych = *++cursor_; - if (yych == 'i') goto yy1127; - goto yy50; -yy1098: + if (yych == 'i') goto yy1175; + goto yy87; +yy1146: yych = *++cursor_; - if (yych == 'f') goto yy1128; - goto yy50; -yy1099: + if (yych == 'f') goto yy1176; + goto yy87; +yy1147: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 404 "src/wast-lexer.cc" +#line 406 "src/wast-lexer.cc" { OPCODE(I64ExtendSI32); RETURN(CONVERT); } -#line 6401 "src/prebuilt/wast-lexer-gen.cc" -yy1101: +#line 6125 "src/prebuilt/wast-lexer-gen.cc" +yy1149: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 405 "src/wast-lexer.cc" +#line 407 "src/wast-lexer.cc" { OPCODE(I64ExtendUI32); RETURN(CONVERT); } -#line 6409 "src/prebuilt/wast-lexer-gen.cc" -yy1103: +#line 6133 "src/prebuilt/wast-lexer-gen.cc" +yy1151: yych = *++cursor_; - if (yych == 'f') goto yy1129; - goto yy50; -yy1104: + if (yych == 'f') goto yy1177; + goto yy87; +yy1152: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 460 "src/wast-lexer.cc" +#line 462 "src/wast-lexer.cc" { RETURN(ASSERT_EXHAUSTION); } -#line 6421 "src/prebuilt/wast-lexer-gen.cc" -yy1106: +#line 6145 "src/prebuilt/wast-lexer-gen.cc" +yy1154: yych = *++cursor_; - if (yych == 't') goto yy1130; - goto yy50; -yy1107: + if (yych == 't') goto yy1178; + goto yy87; +yy1155: yych = *++cursor_; - if (yych == 'o') goto yy1131; - goto yy50; -yy1108: + if (yych == 'o') goto yy1179; + goto yy87; +yy1156: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 453 "src/wast-lexer.cc" +#line 455 "src/wast-lexer.cc" { RETURN(ASSERT_UNLINKABLE); } -#line 6437 "src/prebuilt/wast-lexer-gen.cc" -yy1110: +#line 6161 "src/prebuilt/wast-lexer-gen.cc" +yy1158: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 415 "src/wast-lexer.cc" +#line 417 "src/wast-lexer.cc" { OPCODE(F32ConvertSI32); RETURN(CONVERT); } -#line 6445 "src/prebuilt/wast-lexer-gen.cc" -yy1112: +#line 6169 "src/prebuilt/wast-lexer-gen.cc" +yy1160: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 417 "src/wast-lexer.cc" +#line 419 "src/wast-lexer.cc" { OPCODE(F32ConvertSI64); RETURN(CONVERT); } -#line 6453 "src/prebuilt/wast-lexer-gen.cc" -yy1114: +#line 6177 "src/prebuilt/wast-lexer-gen.cc" +yy1162: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 419 "src/wast-lexer.cc" +#line 421 "src/wast-lexer.cc" { OPCODE(F32ConvertUI32); RETURN(CONVERT); } -#line 6461 "src/prebuilt/wast-lexer-gen.cc" -yy1116: +#line 6185 "src/prebuilt/wast-lexer-gen.cc" +yy1164: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 421 "src/wast-lexer.cc" +#line 423 "src/wast-lexer.cc" { OPCODE(F32ConvertUI64); RETURN(CONVERT); } -#line 6469 "src/prebuilt/wast-lexer-gen.cc" -yy1118: +#line 6193 "src/prebuilt/wast-lexer-gen.cc" +yy1166: yych = *++cursor_; - if (yych == '3') goto yy1132; - goto yy50; -yy1119: + if (yych == '3') goto yy1180; + goto yy87; +yy1167: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 416 "src/wast-lexer.cc" +#line 418 "src/wast-lexer.cc" { OPCODE(F64ConvertSI32); RETURN(CONVERT); } -#line 6481 "src/prebuilt/wast-lexer-gen.cc" -yy1121: +#line 6205 "src/prebuilt/wast-lexer-gen.cc" +yy1169: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 418 "src/wast-lexer.cc" +#line 420 "src/wast-lexer.cc" { OPCODE(F64ConvertSI64); RETURN(CONVERT); } -#line 6489 "src/prebuilt/wast-lexer-gen.cc" -yy1123: +#line 6213 "src/prebuilt/wast-lexer-gen.cc" +yy1171: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 420 "src/wast-lexer.cc" +#line 422 "src/wast-lexer.cc" { OPCODE(F64ConvertUI32); RETURN(CONVERT); } -#line 6497 "src/prebuilt/wast-lexer-gen.cc" -yy1125: +#line 6221 "src/prebuilt/wast-lexer-gen.cc" +yy1173: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 422 "src/wast-lexer.cc" +#line 424 "src/wast-lexer.cc" { OPCODE(F64ConvertUI64); RETURN(CONVERT); } -#line 6505 "src/prebuilt/wast-lexer-gen.cc" -yy1127: +#line 6229 "src/prebuilt/wast-lexer-gen.cc" +yy1175: yych = *++cursor_; - if (yych == '6') goto yy1133; - goto yy50; -yy1128: + if (yych == '6') goto yy1181; + goto yy87; +yy1176: yych = *++cursor_; - if (yych == '3') goto yy1134; - goto yy50; -yy1129: + if (yych == '3') goto yy1182; + goto yy87; +yy1177: yych = *++cursor_; - if (yych == '6') goto yy1135; - goto yy50; -yy1130: + if (yych == '6') goto yy1183; + goto yy87; +yy1178: yych = *++cursor_; - if (yych == 'h') goto yy1136; - goto yy50; -yy1131: + if (yych == 'h') goto yy1184; + goto yy87; +yy1179: yych = *++cursor_; - if (yych == 'n') goto yy1137; - goto yy50; -yy1132: + if (yych == 'n') goto yy1185; + goto yy87; +yy1180: yych = *++cursor_; - if (yych == '2') goto yy1138; - goto yy50; -yy1133: + if (yych == '2') goto yy1186; + goto yy87; +yy1181: yych = *++cursor_; - if (yych == '4') goto yy1140; - goto yy50; -yy1134: + if (yych == '4') goto yy1188; + goto yy87; +yy1182: yych = *++cursor_; - if (yych == '2') goto yy1142; - goto yy50; -yy1135: + if (yych == '2') goto yy1190; + goto yy87; +yy1183: yych = *++cursor_; - if (yych == '4') goto yy1144; - goto yy50; -yy1136: + if (yych == '4') goto yy1192; + goto yy87; +yy1184: yych = *++cursor_; - if (yych == 'm') goto yy1146; - goto yy50; -yy1137: + if (yych == 'm') goto yy1194; + goto yy87; +yy1185: yych = *++cursor_; - if (yych == 'i') goto yy1147; - goto yy50; -yy1138: + if (yych == 'i') goto yy1195; + goto yy87; +yy1186: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 425 "src/wast-lexer.cc" +#line 427 "src/wast-lexer.cc" { OPCODE(F32ReinterpretI32); RETURN(CONVERT); } -#line 6557 "src/prebuilt/wast-lexer-gen.cc" -yy1140: +#line 6281 "src/prebuilt/wast-lexer-gen.cc" +yy1188: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 427 "src/wast-lexer.cc" +#line 429 "src/wast-lexer.cc" { OPCODE(F64ReinterpretI64); RETURN(CONVERT); } -#line 6565 "src/prebuilt/wast-lexer-gen.cc" -yy1142: +#line 6289 "src/prebuilt/wast-lexer-gen.cc" +yy1190: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 426 "src/wast-lexer.cc" +#line 428 "src/wast-lexer.cc" { OPCODE(I32ReinterpretF32); RETURN(CONVERT); } -#line 6573 "src/prebuilt/wast-lexer-gen.cc" -yy1144: +#line 6297 "src/prebuilt/wast-lexer-gen.cc" +yy1192: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 428 "src/wast-lexer.cc" +#line 430 "src/wast-lexer.cc" { OPCODE(I64ReinterpretF64); RETURN(CONVERT); } -#line 6581 "src/prebuilt/wast-lexer-gen.cc" -yy1146: +#line 6305 "src/prebuilt/wast-lexer-gen.cc" +yy1194: yych = *++cursor_; - if (yych == 'e') goto yy1148; - goto yy50; -yy1147: + if (yych == 'e') goto yy1196; + goto yy87; +yy1195: yych = *++cursor_; - if (yych == 'c') goto yy1149; - goto yy50; -yy1148: + if (yych == 'c') goto yy1197; + goto yy87; +yy1196: yych = *++cursor_; - if (yych == 't') goto yy1150; - goto yy50; -yy1149: + if (yych == 't') goto yy1198; + goto yy87; +yy1197: yych = *++cursor_; - if (yych == 'a') goto yy1151; - goto yy50; -yy1150: + if (yych == 'a') goto yy1199; + goto yy87; +yy1198: yych = *++cursor_; - if (yych == 'i') goto yy1152; - goto yy50; -yy1151: + if (yych == 'i') goto yy1200; + goto yy87; +yy1199: yych = *++cursor_; - if (yych == 'l') goto yy1153; - goto yy50; -yy1152: + if (yych == 'l') goto yy1201; + goto yy87; +yy1200: yych = *++cursor_; - if (yych == 'c') goto yy1154; - goto yy50; -yy1153: + if (yych == 'c') goto yy1202; + goto yy87; +yy1201: yych = *++cursor_; - if (yych == '_') goto yy1155; - goto yy50; -yy1154: + if (yych == '_') goto yy1203; + goto yy87; +yy1202: yych = *++cursor_; - if (yych == '_') goto yy1156; - goto yy50; -yy1155: + if (yych == '_') goto yy1204; + goto yy87; +yy1203: yych = *++cursor_; - if (yych == 'n') goto yy1157; - goto yy50; -yy1156: + if (yych == 'n') goto yy1205; + goto yy87; +yy1204: yych = *++cursor_; - if (yych == 'n') goto yy1158; - goto yy50; -yy1157: + if (yych == 'n') goto yy1206; + goto yy87; +yy1205: yych = *++cursor_; - if (yych == 'a') goto yy1159; - goto yy50; -yy1158: + if (yych == 'a') goto yy1207; + goto yy87; +yy1206: yych = *++cursor_; - if (yych == 'a') goto yy1160; - goto yy50; -yy1159: + if (yych == 'a') goto yy1208; + goto yy87; +yy1207: yych = *++cursor_; - if (yych == 'n') goto yy1161; - goto yy50; -yy1160: + if (yych == 'n') goto yy1209; + goto yy87; +yy1208: yych = *++cursor_; - if (yych == 'n') goto yy1163; - goto yy50; -yy1161: + if (yych == 'n') goto yy1211; + goto yy87; +yy1209: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 455 "src/wast-lexer.cc" +#line 457 "src/wast-lexer.cc" { RETURN(ASSERT_RETURN_CANONICAL_NAN); } -#line 6650 "src/prebuilt/wast-lexer-gen.cc" -yy1163: +#line 6374 "src/prebuilt/wast-lexer-gen.cc" +yy1211: ++cursor_; - if (yybm[0+(yych = *cursor_)] & 16) { - goto yy49; + if (yybm[0+(yych = *cursor_)] & 8) { + goto yy86; } -#line 457 "src/wast-lexer.cc" +#line 459 "src/wast-lexer.cc" { RETURN(ASSERT_RETURN_ARITHMETIC_NAN); } -#line 6659 "src/prebuilt/wast-lexer-gen.cc" +#line 6383 "src/prebuilt/wast-lexer-gen.cc" } } -#line 481 "src/wast-lexer.cc" +#line 483 "src/wast-lexer.cc" } } diff --git a/src/prebuilt/wast-parser-gen.cc b/src/prebuilt/wast-parser-gen.cc index cdea2169..1c48e33a 100644 --- a/src/prebuilt/wast-parser-gen.cc +++ b/src/prebuilt/wast-parser-gen.cc @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.4" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -132,50 +132,6 @@ } \ while (0) -#define APPEND_FIELD_TO_LIST(module, field, Kind, kind, loc_, item) \ - do { \ - field = append_module_field(module); \ - field->loc = loc_; \ - field->type = ModuleFieldType::Kind; \ - field->kind = item; \ - } while (0) - -#define APPEND_ITEM_TO_VECTOR(module, kinds, item_ptr) \ - (module)->kinds.push_back(item_ptr) - -#define INSERT_BINDING(module, kind, kinds, loc_, name) \ - do \ - if ((name).start) { \ - (module)->kind##_bindings.emplace( \ - string_slice_to_string(name), \ - Binding(loc_, (module)->kinds.size() - 1)); \ - } \ - while (0) - -#define APPEND_INLINE_EXPORT(module, Kind, loc_, value, index_) \ - do \ - if ((value)->export_.has_export) { \ - ModuleField* export_field; \ - APPEND_FIELD_TO_LIST(module, export_field, Export, export_, loc_, \ - (value)->export_.export_.release()); \ - export_field->export_->kind = ExternalKind::Kind; \ - export_field->export_->var.loc = loc_; \ - export_field->export_->var.index = index_; \ - APPEND_ITEM_TO_VECTOR(module, exports, export_field->export_); \ - INSERT_BINDING(module, export, exports, export_field->loc, \ - export_field->export_->name); \ - } \ - while (0) - -#define CHECK_IMPORT_ORDERING(module, kind, kinds, loc_) \ - do { \ - if ((module)->kinds.size() != (module)->num_##kind##_imports) { \ - wast_parser_error( \ - &loc_, lexer, parser, \ - "imports must occur before all non-import definitions"); \ - } \ - } while (0) - #define CHECK_END_LABEL(loc, begin_label, end_label) \ do { \ if (!string_slice_is_empty(&(end_label))) { \ @@ -201,23 +157,28 @@ namespace wabt { -ExprList join_exprs1(Location* loc, Expr* expr1); -ExprList join_exprs2(Location* loc, - ExprList* expr1, - Expr* expr2); +static ExprList join_exprs1(Location* loc, Expr* expr1); +static ExprList join_exprs2(Location* loc, ExprList* expr1, Expr* expr2); -Result parse_const(Type type, - LiteralType literal_type, - const char* s, - const char* end, - Const* out); -void dup_text_list(TextList* text_list, char** out_data, size_t* out_size); +static Result parse_const(Type type, + LiteralType literal_type, + const char* s, + const char* end, + Const* out); +static void dup_text_list(TextList* text_list, + char** out_data, + size_t* out_size); -bool is_empty_signature(const FuncSignature* sig); +static void reverse_bindings(TypeVector*, BindingHash*); -void append_implicit_func_declaration(Location*, - Module*, - FuncDeclaration*); +static bool is_empty_signature(const FuncSignature* sig); + +static void check_import_ordering(Location* loc, + WastLexer* lexer, + WastParser* parser, + Module* module, + ModuleField* first); +static void append_module_fields(Module*, ModuleField*); class BinaryErrorHandlerModule : public BinaryErrorHandler { public: @@ -234,7 +195,7 @@ class BinaryErrorHandlerModule : public BinaryErrorHandler { #define wabt_wast_parser_error wast_parser_error -#line 238 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:339 */ +#line 199 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus @@ -379,7 +340,7 @@ int wabt_wast_parser_parse (::wabt::WastLexer* lexer, ::wabt::WastParser* parser /* Copy the second part of user declarations. */ -#line 383 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:358 */ +#line 344 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:358 */ #ifdef short # undef short @@ -621,18 +582,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 10 +#define YYFINAL 49 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 783 +#define YYLAST 823 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 72 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 63 +#define YYNNTS 74 /* YYNRULES -- Number of rules. */ -#define YYNRULES 172 +#define YYNRULES 190 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 405 +#define YYNSTATES 419 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -685,24 +646,26 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 294, 294, 300, 310, 311, 315, 333, 334, 340, - 343, 348, 355, 358, 359, 364, 371, 379, 385, 391, - 396, 403, 409, 420, 424, 428, 435, 440, 447, 448, - 454, 455, 458, 462, 463, 467, 468, 478, 479, 490, - 491, 492, 495, 498, 501, 504, 507, 510, 513, 516, - 519, 522, 525, 528, 531, 534, 537, 540, 543, 546, - 559, 562, 565, 568, 571, 574, 579, 584, 589, 594, - 602, 611, 615, 618, 623, 628, 638, 642, 646, 650, - 654, 658, 665, 666, 674, 675, 683, 688, 689, 695, - 701, 711, 717, 723, 733, 785, 795, 802, 810, 820, - 823, 827, 834, 846, 854, 876, 883, 895, 903, 924, - 946, 954, 967, 975, 983, 989, 995, 1003, 1008, 1016, - 1024, 1030, 1036, 1045, 1053, 1058, 1063, 1068, 1075, 1082, - 1086, 1089, 1101, 1106, 1115, 1119, 1122, 1129, 1138, 1155, - 1172, 1184, 1190, 1196, 1202, 1235, 1245, 1265, 1276, 1298, - 1303, 1311, 1321, 1331, 1337, 1343, 1349, 1355, 1361, 1366, - 1371, 1377, 1386, 1391, 1392, 1397, 1406, 1407, 1414, 1426, - 1427, 1434, 1500 + 0, 241, 241, 247, 257, 258, 262, 280, 281, 287, + 290, 295, 302, 305, 306, 311, 318, 326, 332, 338, + 343, 350, 356, 367, 371, 375, 382, 387, 394, 395, + 401, 402, 405, 409, 410, 414, 415, 425, 426, 437, + 438, 439, 442, 445, 448, 451, 454, 457, 460, 463, + 466, 469, 472, 475, 478, 481, 484, 487, 490, 493, + 506, 509, 512, 515, 518, 521, 526, 531, 536, 541, + 549, 552, 557, 564, 568, 571, 576, 581, 589, 597, + 600, 604, 608, 612, 616, 620, 627, 628, 636, 637, + 645, 650, 664, 671, 676, 686, 694, 705, 712, 713, + 718, 724, 734, 741, 742, 747, 753, 763, 770, 774, + 779, 791, 794, 798, 807, 821, 835, 841, 849, 857, + 876, 885, 899, 913, 918, 926, 934, 957, 971, 977, + 985, 998, 1006, 1014, 1020, 1026, 1035, 1045, 1053, 1058, + 1063, 1068, 1075, 1084, 1094, 1101, 1112, 1120, 1121, 1122, + 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1133, 1134, 1138, + 1143, 1151, 1171, 1182, 1202, 1209, 1214, 1222, 1232, 1242, + 1248, 1254, 1260, 1266, 1272, 1277, 1282, 1288, 1297, 1302, + 1303, 1308, 1317, 1321, 1328, 1340, 1341, 1348, 1351, 1411, + 1423 }; #endif @@ -723,18 +686,21 @@ static const char *const yytname[] = "INVOKE", "GET", "ASSERT_MALFORMED", "ASSERT_INVALID", "ASSERT_UNLINKABLE", "ASSERT_RETURN", "ASSERT_RETURN_CANONICAL_NAN", "ASSERT_RETURN_ARITHMETIC_NAN", "ASSERT_TRAP", "ASSERT_EXHAUSTION", - "LOW", "$accept", "non_empty_text_list", "text_list", "quoted_text", + "LOW", "$accept", "text_list", "text_list_opt", "quoted_text", "value_type_list", "elem_type", "global_type", "func_type", "func_sig", "table_sig", "memory_sig", "limits", "type_use", "nat", "literal", "var", "var_list", "bind_var_opt", "bind_var", "labeling_opt", "offset_opt", - "align_opt", "instr", "plain_instr", "block_instr", "block", "expr", - "expr1", "if_", "instr_list", "expr_list", "const_expr", "func_fields", - "func_body", "func_info", "func", "offset", "elem", "table", "data", - "memory", "global", "import_kind", "import", "inline_import", - "export_kind", "export", "inline_export_opt", "inline_export", - "type_def", "start", "module_fields", "raw_module", "module", - "script_var_opt", "action", "assertion", "cmd", "cmd_list", "const", - "const_list", "script", "script_start", YY_NULLPTR + "align_opt", "instr", "plain_instr", "block_instr", "block_sig", "block", + "expr", "expr1", "if_block", "if_", "instr_list", "expr_list", + "const_expr", "func", "func_fields", "func_fields_import", + "func_fields_import1", "func_fields_body", "func_fields_body1", + "func_body", "func_body1", "offset", "elem", "table", "table_fields", + "data", "memory", "memory_fields", "global", "global_fields", + "import_desc", "import", "inline_import", "export_desc", "export", + "inline_export", "type_def", "start", "module_field", + "module_fields_opt", "module_fields", "raw_module", "module", + "inline_module", "script_var_opt", "action", "assertion", "cmd", + "cmd_list", "const", "const_list", "script", "script_start", YY_NULLPTR }; #endif @@ -754,10 +720,10 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -274 +#define YYPACT_NINF -339 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-274))) + (!!((Yystate) == (-339))) #define YYTABLE_NINF -30 @@ -768,47 +734,48 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - -274, 41, -274, 58, 69, -274, -274, -274, -274, -274, - -274, 37, 73, 82, 82, 101, 101, 101, 111, 111, - 111, 121, 111, -274, 119, -274, -274, 82, -274, 73, - 73, 122, 73, 73, 73, 105, -274, 177, 184, 46, - 73, 73, 73, -274, 118, 227, 186, -274, 203, 205, - 213, 215, 248, -274, -274, 223, 245, 249, -274, -274, - 117, -274, -274, -274, -274, -274, -274, -274, -274, -274, - -274, -274, -274, 252, -274, -274, -274, -274, 187, -274, - -274, -274, -274, -274, 37, 139, 144, 37, 37, 140, - 37, 140, 73, 73, -274, 237, 405, -274, -274, -274, - 256, 222, 264, 268, 89, 270, 328, 271, -274, -274, - 272, 271, 119, 73, 273, -274, -274, -274, 275, 288, - -274, -274, 37, 37, 37, 139, 139, -274, 139, 139, - -274, 139, 139, 139, 139, 139, 243, 243, 237, -274, - -274, -274, -274, -274, -274, -274, -274, 437, 469, -274, - -274, -274, -274, -274, -274, 276, 278, 501, -274, 279, - -274, 280, 6, -274, 469, 99, 99, 200, 284, 67, - -274, 37, 37, 37, 469, 287, 289, -274, 197, 176, - 284, 284, 291, 119, 283, 292, 301, 16, 302, -274, - 139, 37, -274, 37, 73, 73, -274, -274, -274, -274, - -274, -274, 139, -274, -274, -274, -274, -274, -274, -274, - -274, 257, 257, -274, 603, 303, 739, -274, -274, 198, - 318, 319, 565, 437, 329, 221, 330, -274, 285, -274, - 335, 332, 336, 469, 358, 352, 284, -274, 370, 371, - -274, -274, -274, 374, 287, -274, -274, 217, -274, -274, - 119, 375, -274, 376, 321, 377, -274, 35, 378, 139, - 139, 139, 139, -274, 380, 173, 364, 174, 175, 379, - 73, 387, 373, 267, 87, 391, 160, -274, -274, -274, - -274, -274, -274, -274, -274, 388, -274, -274, 417, -274, - -274, 419, -274, -274, -274, 385, -274, -274, 113, -274, - -274, -274, -274, 420, -274, -274, 119, -274, 37, 37, - 37, 37, -274, 449, 451, 452, 467, -274, 437, -274, - 481, 533, 533, 483, 484, -274, -274, 37, 37, 37, - 37, 188, 189, -274, -274, -274, -274, 675, 500, -274, - 513, 515, 278, 99, 284, 284, -274, -274, -274, -274, - -274, 437, 641, -274, -274, 533, -274, -274, -274, 469, - -274, 517, -274, 220, 469, 707, 287, -274, 531, 545, - 547, 548, 563, 564, -274, -274, 567, 532, 580, 595, - 469, -274, -274, -274, -274, -274, -274, -274, 37, -274, - -274, 597, 606, -274, 193, 592, 616, -274, 469, 602, - 618, 469, -274, 633, -274 + 43, 753, -339, -339, -339, -339, -339, -339, -339, -339, + -339, -339, -339, 122, -339, -339, -339, -339, -339, -339, + 140, -339, 153, 152, 232, 67, 152, 152, 152, 157, + 152, 157, 159, 159, 159, 160, 160, 184, 184, 184, + 226, 226, 226, 237, 226, 148, -339, 34, -339, -339, + -339, 422, -339, -339, -339, -339, 215, 193, 249, 242, + 56, 197, 66, 377, 265, -339, -339, 241, 265, 262, + -339, 159, 268, 160, -339, 159, 159, 221, 159, 159, + 159, 17, -339, 270, 271, 6, 159, 159, 159, 337, + -339, -339, 152, 152, 152, 232, 232, -339, 232, 232, + -339, 232, 232, 232, 232, 232, 244, 244, 84, -339, + -339, -339, -339, -339, -339, -339, -339, 454, 486, -339, + -339, -339, -339, 275, -339, -339, -339, -339, 277, 422, + -339, 278, -339, 281, 25, -339, 486, 282, 120, 56, + -339, 235, 283, 122, 55, -339, 279, -339, 280, 284, + 286, 284, 66, 152, 152, 152, 486, 289, 290, -339, + 130, 68, -339, -339, 291, 284, 241, 262, 285, 292, + 294, 103, 297, 304, -339, 305, 306, 309, 311, 206, + -339, -339, 312, 317, 319, 232, 152, -339, 152, 159, + 159, -339, 518, 518, 518, -339, -339, 232, -339, -339, + -339, -339, -339, -339, -339, -339, 263, 263, -339, -339, + -339, -339, 582, -339, 752, -339, -339, 149, 321, -339, + -339, -339, 210, 322, -339, 315, -339, -339, -339, 316, + -339, -339, -339, -339, -339, 273, -339, -339, -339, -339, + -339, 518, 326, 518, 327, 289, -339, -339, 175, -339, + -339, 262, -339, -339, -339, 328, -339, 104, 329, 232, + 232, 232, 232, -339, -339, 261, -339, -339, -339, -339, + 298, -339, -339, -339, -339, -339, 331, 102, 320, 161, + 164, 330, 159, 332, 687, 518, 323, -339, 238, 325, + 246, -339, -339, -339, 152, -339, 218, -339, -339, -339, + -339, 333, -339, -339, 654, 326, 335, -339, -339, -339, + -339, -339, -339, 338, -339, 152, 152, 152, 152, -339, + 339, 340, 341, 349, -339, 84, -339, 454, -339, 351, + 550, 550, 352, 367, -339, -339, -339, 152, 152, 152, + 152, 166, 362, 168, 204, 208, -339, 219, 486, -339, + 720, 289, -339, 379, 120, 284, 284, -339, -339, -339, + -339, 384, -339, 454, 620, -339, -339, 550, -339, 216, + -339, -339, 486, -339, 321, 385, -339, 380, -339, -339, + 389, 486, -339, 214, 407, 408, 418, 419, 420, -339, + -339, -339, -339, 410, -339, 321, 378, 425, 426, -339, + -339, -339, -339, -339, 152, -339, -339, 412, 429, -339, + 217, 486, 414, -339, 434, 486, -339, 436, -339 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -816,71 +783,74 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 166, 171, 172, 0, 0, 148, 164, 162, 163, 167, - 1, 30, 0, 149, 149, 0, 0, 0, 0, 0, - 0, 0, 0, 32, 135, 31, 6, 149, 150, 0, - 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, - 0, 0, 0, 2, 0, 0, 0, 169, 0, 0, - 0, 0, 0, 158, 159, 0, 0, 0, 147, 3, - 0, 146, 140, 141, 138, 142, 139, 137, 144, 145, - 136, 143, 165, 0, 152, 153, 154, 155, 0, 157, - 170, 156, 160, 161, 30, 0, 0, 30, 30, 0, - 30, 0, 0, 0, 151, 0, 82, 22, 27, 26, - 0, 0, 0, 0, 0, 129, 0, 0, 100, 28, - 129, 0, 4, 0, 0, 23, 24, 25, 0, 0, + 187, 0, 151, 152, 149, 153, 150, 148, 155, 156, + 147, 154, 159, 164, 163, 180, 189, 178, 179, 182, + 188, 190, 0, 30, 0, 0, 30, 30, 30, 0, + 30, 0, 0, 0, 0, 165, 165, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 160, 0, 183, 1, + 32, 86, 31, 22, 27, 26, 0, 0, 0, 0, + 0, 157, 0, 0, 0, 112, 28, 0, 0, 4, + 6, 0, 0, 165, 166, 0, 0, 0, 0, 0, + 0, 0, 185, 0, 0, 0, 0, 0, 0, 0, 43, 44, 33, 33, 33, 0, 0, 28, 0, 0, 49, 0, 0, 0, 0, 0, 35, 35, 0, 60, - 61, 62, 63, 45, 42, 64, 65, 82, 82, 39, - 40, 41, 91, 94, 87, 0, 13, 82, 134, 13, - 132, 0, 0, 10, 82, 0, 0, 0, 0, 0, - 130, 33, 33, 33, 82, 84, 0, 28, 0, 0, - 0, 0, 130, 4, 5, 0, 0, 0, 0, 168, - 0, 7, 7, 7, 0, 0, 34, 7, 7, 7, - 46, 47, 0, 50, 51, 52, 53, 54, 55, 56, - 36, 37, 37, 59, 0, 0, 0, 83, 98, 0, - 0, 0, 0, 82, 0, 0, 0, 133, 0, 86, - 0, 0, 0, 82, 0, 0, 19, 9, 0, 0, - 7, 7, 7, 0, 84, 72, 71, 0, 102, 29, - 4, 0, 18, 0, 0, 0, 106, 0, 0, 0, - 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 82, 0, 0, 0, 48, 38, 57, 58, - 96, 7, 7, 119, 118, 0, 97, 12, 0, 111, - 122, 0, 120, 17, 20, 0, 103, 73, 0, 74, - 99, 85, 101, 0, 121, 107, 4, 105, 30, 30, - 30, 30, 117, 0, 0, 0, 0, 21, 82, 8, - 0, 82, 82, 0, 0, 131, 70, 33, 33, 33, - 33, 0, 0, 95, 11, 110, 28, 0, 0, 75, - 0, 0, 13, 0, 0, 0, 124, 127, 125, 126, - 89, 82, 0, 88, 92, 82, 123, 66, 68, 82, - 67, 14, 16, 0, 82, 0, 81, 109, 0, 0, - 0, 0, 0, 0, 90, 93, 0, 0, 0, 0, - 82, 80, 108, 113, 112, 116, 114, 115, 33, 7, - 104, 77, 0, 69, 0, 0, 79, 15, 82, 0, - 0, 82, 76, 0, 78 + 61, 62, 63, 45, 42, 64, 65, 86, 86, 39, + 40, 41, 108, 0, 93, 102, 103, 107, 98, 86, + 146, 13, 144, 0, 0, 10, 86, 0, 0, 0, + 2, 0, 0, 158, 0, 9, 0, 116, 0, 19, + 0, 0, 0, 33, 33, 33, 86, 88, 0, 28, + 0, 0, 123, 18, 0, 0, 0, 4, 5, 0, + 0, 0, 0, 0, 185, 0, 0, 0, 0, 0, + 174, 175, 0, 0, 0, 0, 7, 7, 7, 0, + 0, 34, 86, 86, 86, 46, 47, 0, 50, 51, + 52, 53, 54, 55, 56, 36, 37, 37, 23, 24, + 25, 59, 0, 92, 0, 87, 91, 0, 98, 95, + 97, 96, 0, 0, 145, 0, 90, 128, 127, 0, + 129, 130, 162, 3, 161, 0, 17, 20, 115, 117, + 118, 86, 0, 86, 0, 88, 74, 73, 0, 114, + 29, 4, 122, 124, 125, 0, 121, 0, 0, 0, + 0, 0, 0, 142, 181, 0, 168, 169, 170, 171, + 0, 173, 186, 172, 176, 177, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 86, 0, 72, 0, 0, + 48, 38, 57, 58, 7, 7, 0, 94, 7, 7, + 12, 0, 28, 75, 0, 0, 0, 77, 79, 76, + 111, 89, 113, 0, 120, 30, 30, 30, 30, 136, + 0, 0, 0, 0, 167, 0, 21, 86, 8, 0, + 86, 86, 0, 0, 143, 7, 71, 33, 33, 33, + 33, 0, 0, 0, 0, 0, 11, 0, 86, 78, + 0, 85, 126, 13, 0, 0, 0, 138, 141, 139, + 140, 0, 105, 86, 0, 104, 109, 86, 137, 0, + 66, 68, 86, 67, 98, 0, 99, 14, 16, 119, + 0, 86, 84, 0, 0, 0, 0, 0, 0, 184, + 106, 110, 70, 0, 100, 98, 0, 81, 0, 132, + 131, 135, 133, 134, 33, 101, 7, 0, 83, 69, + 0, 86, 0, 15, 0, 86, 80, 0, 82 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -274, 614, -156, -8, -181, 413, -149, 546, -146, -155, - -150, -145, -151, -140, 512, 26, -118, -45, -11, -116, - 520, 447, -274, -104, -274, -147, -88, -274, -274, -144, - 416, -136, -268, -273, -110, -274, -37, -274, -274, -274, - -274, -274, -274, -274, -42, -274, -274, 566, 15, -274, - -274, -274, 125, -274, 39, 219, -274, -274, -274, -274, - 628, -274, -274 + -339, 368, -136, -26, -154, 293, -129, 397, 117, -138, + -145, -56, -123, -44, 147, 87, -87, 2, -11, -90, + 366, 295, -339, -62, -339, -220, -168, -29, -339, 183, + -339, -112, 259, 364, -339, 376, 318, -338, 417, -289, + 207, -280, 24, -339, -339, 400, -339, -339, 402, -339, + 427, -339, -339, -20, -339, -339, -19, -339, -339, 8, + -339, 508, 99, -339, -339, 20, 191, -339, 564, -339, + -339, 411, -339, -339 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 184, 185, 27, 272, 238, 164, 102, 220, 234, - 251, 235, 147, 99, 118, 249, 178, 24, 196, 197, - 211, 278, 148, 149, 150, 273, 151, 176, 339, 152, - 245, 230, 153, 154, 155, 62, 109, 63, 64, 65, - 66, 67, 258, 68, 156, 188, 69, 169, 157, 70, - 71, 45, 5, 6, 29, 7, 8, 9, 1, 80, - 52, 2, 3 + -1, 168, 169, 71, 277, 146, 136, 58, 223, 147, + 162, 148, 117, 55, 211, 250, 160, 51, 191, 192, + 206, 292, 118, 119, 120, 285, 286, 121, 158, 307, + 308, 122, 246, 227, 2, 123, 219, 220, 124, 125, + 126, 127, 66, 3, 4, 150, 5, 6, 164, 7, + 137, 258, 8, 128, 172, 9, 129, 10, 11, 12, + 142, 13, 14, 15, 16, 75, 17, 18, 19, 20, + 272, 179, 21, 22 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -888,215 +858,224 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 25, 108, 175, 108, 217, 221, 223, 198, 199, 202, - 265, 267, 268, 226, 239, 175, 232, 233, 228, 108, - 229, 47, 48, 108, 49, 50, 51, 255, 236, 236, - 229, 253, 55, 56, 57, 252, 252, 215, 243, 96, - 236, 236, 104, 105, 4, 110, 23, 224, 353, 354, - 350, 274, 275, 30, 112, 240, 241, 242, 10, 247, - 298, 259, 165, 168, 194, 195, 46, 260, 180, 261, - 177, 262, 97, 25, 183, 103, 25, 25, 237, 25, - 308, 26, 375, 374, 113, 114, 309, 244, 310, 229, - 311, 28, 162, 297, 303, 299, 294, 291, 11, 163, - 331, 332, 231, 328, 31, 186, 329, 13, 14, 163, - 175, 100, 175, 285, 35, 107, 337, 111, 175, 166, - 170, 11, 58, 319, 39, 182, 59, 43, 326, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 32, 33, 34, 106, 97, 97, 40, 101, 98, 98, - 341, 200, 201, 23, 203, 204, 244, 205, 206, 207, - 208, 209, 84, 85, 86, -29, 13, 14, 87, -29, - 88, 89, 90, 91, 11, 92, 93, 318, 321, 322, - 266, 53, 269, 319, 319, 319, 270, 271, 54, 372, - 72, 370, 361, 362, 371, 373, 369, 397, 319, 319, - 252, 248, 97, 319, 236, 236, 98, 74, 394, 75, - 338, 357, 358, 359, 360, 376, 264, 76, 363, 77, - 379, 302, 97, 95, 378, 97, 98, 81, 276, 98, - 60, 61, 250, 175, 194, 195, 392, 36, 37, 38, - 41, 42, 115, 116, 117, 190, 281, 282, 175, 82, - 366, 78, 79, 83, 400, 78, 94, 403, 194, 195, - 158, 175, 324, 342, 343, 344, 345, 159, 160, 281, - 282, 101, 393, 167, 106, 179, 187, 210, 381, 189, - 218, 219, 225, 327, 227, 313, 314, 315, 316, 97, - 216, 59, 277, 246, 254, 288, 256, 25, 25, 25, - 25, 120, 121, 171, 257, 172, 263, 280, 173, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 283, 284, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 286, 287, 190, 191, 192, 193, 289, - 290, 120, 121, 171, 228, 172, 194, 195, 173, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 292, 237, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 295, 320, 296, 216, 306, 300, 304, - 305, 307, 312, 319, 317, 174, 120, 121, 122, 323, - 123, 325, 333, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 330, 119, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 120, 121, - 122, 334, 123, 335, 340, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 336, - 214, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 120, 121, 122, 346, 123, 347, 348, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 349, 216, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 120, 121, 122, 351, 123, 355, 356, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 365, 222, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 120, 121, 122, 367, 123, 368, - 377, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 382, 352, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 120, 121, 122, 383, - 123, 384, 385, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 386, 387, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 120, 121, - 171, 389, 172, 388, 390, 173, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 391, - 395, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 396, 398, 190, 191, 192, 193, 120, 121, 171, 399, - 172, 401, 402, 173, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 404, 44, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 293, 161, - 213, 191, 192, 193, 120, 121, 171, 212, 172, 279, - 301, 173, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 73, 181, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 120, 121, - 171, 193, 172, 364, 0, 173, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 0, - 0, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 120, 121, 171, 0, 172, 380, 0, 173, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 0, 0, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 120, 121, 171, 0, 172, 0, 0, 173, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 0, 0, 138, 139, 140, 141, 142, - 143, 144, 145, 146 + 65, 157, 65, 193, 194, 218, 215, 72, 73, 230, + 197, 163, 52, 239, 59, 52, 52, 52, 149, 52, + 253, 46, 305, 149, 226, 288, 289, 157, 60, 61, + 62, 255, 67, 279, 280, 65, 394, 225, 362, 65, + 138, 139, 151, 152, 226, 170, 1, 165, 166, 174, + 175, 366, 176, 177, 178, 69, 76, 405, 27, 134, + 182, 183, 184, 241, 242, 243, 135, 35, 36, 144, + 57, 53, 248, 303, 390, 309, 50, 145, 35, 36, + 287, 287, 287, 189, 190, 305, 27, 391, 159, 208, + 209, 210, 167, 173, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 237, 327, 149, 149, 163, + 163, 56, 328, 189, 190, 313, 64, 336, 68, 138, + 139, 149, 149, 229, 251, 45, 189, 190, 245, 287, + 135, 287, 151, 152, 249, 53, 78, 79, 80, 54, + 341, 343, 86, 47, 344, 345, 165, 166, 259, 315, + 157, 46, 157, 49, 260, 316, 261, 317, 262, 318, + 63, 50, 53, 282, 283, 330, 54, 70, 331, 74, + 374, 328, 376, 287, 328, 278, 328, 281, 328, 312, + 53, 369, 195, 196, 54, 198, 199, 77, 200, 201, + 202, 203, 204, 23, 24, 25, 185, 294, 295, 26, + 45, 28, 29, 30, 31, 140, 32, 33, 377, 270, + 271, 388, 378, 306, 328, 347, 245, 387, 328, 130, + 392, 413, 157, 379, 53, 386, 328, 328, 54, 81, + 385, 82, 83, 84, 87, 88, 380, 53, 131, 232, + 85, 54, 157, 233, 161, 57, 53, 370, 371, 372, + 373, -29, 410, 132, 338, -29, 333, 339, 298, 299, + 393, 185, 298, 299, 270, 324, 294, 295, 63, 398, + 140, 171, 276, 27, 180, 181, 306, 351, 205, 216, + 217, 222, 235, 342, 290, 224, 228, 234, 157, 53, + 238, 145, 214, 233, 247, 252, 256, 257, 291, 414, + 163, 263, 157, 417, 52, 52, 52, 52, 264, 266, + 267, 149, 149, 268, 409, 269, 273, 353, 354, 355, + 356, 274, 382, 275, 296, 301, 300, 302, 225, 304, + 329, 310, 314, 319, 325, 326, 334, 346, 350, 337, + 332, 340, 352, 357, 358, 359, 320, 321, 322, 323, + 90, 91, 153, 360, 154, 363, 367, 155, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 368, 375, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 383, 396, 185, 186, 187, 188, 389, 395, + 90, 91, 153, 397, 154, 189, 190, 155, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 399, 400, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 401, 402, 403, 89, 404, 406, 407, 141, + 408, 411, 412, 415, 156, 90, 91, 92, 416, 93, + 418, 236, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 133, 212, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 90, 91, 92, + 384, 93, 361, 207, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 349, 214, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 90, + 91, 92, 293, 93, 311, 221, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 244, 284, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 90, 91, 92, 213, 93, 297, 365, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 240, 364, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 90, 91, 92, 231, 93, 254, 143, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 48, 265, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 90, 91, 153, 0, 154, + 0, 0, 155, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 0, 0, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 0, 0, 0, + 186, 187, 188, 90, 91, 153, 0, 154, 0, 0, + 155, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 0, 0, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 0, 0, 90, 91, 153, + 188, 154, 348, 0, 155, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 0, 0, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 0, + 90, 91, 153, 335, 154, 0, 0, 155, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 0, 0, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 0, 90, 91, 153, 335, 154, 381, 0, + 155, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 0, 0, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 90, 91, 153, 0, 154, + 0, 0, 155, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 0, 0, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 0, 23, 24, + 25, 0, 0, 0, 26, 27, 28, 29, 30, 31, + 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44 }; static const yytype_int16 yycheck[] = { - 11, 89, 106, 91, 148, 156, 157, 123, 124, 127, - 191, 192, 193, 159, 169, 119, 165, 166, 12, 107, - 164, 29, 30, 111, 32, 33, 34, 183, 168, 169, - 174, 181, 40, 41, 42, 180, 181, 147, 174, 84, - 180, 181, 87, 88, 3, 90, 9, 157, 321, 322, - 318, 198, 199, 14, 91, 171, 172, 173, 0, 177, - 241, 45, 104, 105, 58, 59, 27, 51, 110, 53, - 107, 55, 5, 84, 111, 86, 87, 88, 11, 90, - 45, 8, 355, 351, 92, 93, 51, 175, 53, 233, - 55, 9, 3, 240, 250, 242, 236, 233, 52, 10, - 281, 282, 3, 16, 3, 113, 19, 61, 62, 10, - 214, 85, 216, 223, 3, 89, 3, 91, 222, 104, - 105, 52, 4, 10, 3, 110, 8, 8, 272, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 15, 16, 17, 3, 5, 5, 21, 3, 9, 9, - 306, 125, 126, 9, 128, 129, 244, 131, 132, 133, - 134, 135, 45, 46, 47, 5, 61, 62, 51, 9, - 53, 54, 55, 56, 52, 58, 59, 4, 4, 4, - 191, 4, 193, 10, 10, 10, 194, 195, 4, 344, - 4, 342, 4, 4, 343, 345, 342, 4, 10, 10, - 345, 4, 5, 10, 344, 345, 9, 4, 389, 4, - 298, 327, 328, 329, 330, 359, 190, 4, 336, 4, - 364, 4, 5, 36, 4, 5, 9, 4, 202, 9, - 3, 4, 56, 337, 58, 59, 380, 18, 19, 20, - 21, 22, 5, 6, 7, 47, 48, 49, 352, 4, - 338, 3, 4, 4, 398, 3, 4, 401, 58, 59, - 4, 365, 270, 308, 309, 310, 311, 45, 4, 48, - 49, 3, 388, 3, 3, 3, 3, 34, 366, 4, - 4, 3, 3, 16, 4, 259, 260, 261, 262, 5, - 3, 8, 35, 4, 3, 10, 4, 308, 309, 310, - 311, 13, 14, 15, 3, 17, 4, 4, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 4, 4, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 4, 4, 47, 48, 49, 50, 4, - 4, 13, 14, 15, 12, 17, 58, 59, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 4, 11, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 3, 10, 4, 3, 56, 4, 4, - 4, 4, 4, 10, 4, 57, 13, 14, 15, 10, - 17, 4, 4, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 16, 3, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 13, 14, - 15, 4, 17, 4, 4, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 54, - 3, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 29, 63, 31, 93, 94, 128, 118, 33, 34, 138, + 97, 67, 23, 151, 25, 26, 27, 28, 62, 30, + 165, 13, 242, 67, 136, 193, 194, 89, 26, 27, + 28, 167, 30, 187, 188, 64, 374, 12, 327, 68, + 60, 60, 62, 62, 156, 71, 3, 67, 67, 75, + 76, 331, 78, 79, 80, 31, 36, 395, 52, 3, + 86, 87, 88, 153, 154, 155, 10, 61, 62, 3, + 3, 5, 159, 241, 363, 243, 9, 11, 61, 62, + 192, 193, 194, 58, 59, 305, 52, 367, 64, 5, + 6, 7, 68, 73, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 149, 4, 151, 152, 165, + 166, 24, 10, 58, 59, 251, 29, 285, 31, 139, + 139, 165, 166, 3, 56, 3, 58, 59, 157, 241, + 10, 243, 152, 152, 4, 5, 37, 38, 39, 9, + 294, 295, 43, 3, 298, 299, 166, 166, 45, 45, + 212, 143, 214, 0, 51, 51, 53, 53, 55, 55, + 3, 9, 5, 189, 190, 4, 9, 8, 4, 9, + 4, 10, 4, 285, 10, 186, 10, 188, 10, 4, + 5, 335, 95, 96, 9, 98, 99, 3, 101, 102, + 103, 104, 105, 45, 46, 47, 47, 48, 49, 51, + 3, 53, 54, 55, 56, 8, 58, 59, 4, 3, + 4, 356, 4, 242, 10, 302, 245, 355, 10, 4, + 4, 4, 284, 4, 5, 354, 10, 10, 9, 3, + 353, 40, 41, 42, 43, 44, 348, 5, 45, 4, + 3, 9, 304, 8, 3, 3, 5, 337, 338, 339, + 340, 5, 406, 4, 16, 9, 282, 19, 48, 49, + 372, 47, 48, 49, 3, 4, 48, 49, 3, 381, + 8, 3, 185, 52, 4, 4, 305, 306, 34, 4, + 3, 3, 3, 294, 197, 4, 4, 4, 350, 5, + 4, 11, 3, 8, 4, 4, 4, 3, 35, 411, + 356, 4, 364, 415, 315, 316, 317, 318, 4, 4, + 4, 355, 356, 4, 404, 4, 4, 315, 316, 317, + 318, 4, 351, 4, 3, 10, 4, 54, 12, 3, + 10, 4, 4, 4, 36, 4, 4, 4, 3, 16, + 10, 16, 4, 4, 4, 4, 259, 260, 261, 262, 13, 14, 15, 4, 17, 4, 4, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 4, 3, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 13, 14, 15, 4, 17, 4, 4, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 3, 3, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 13, 14, 15, 4, 17, 4, - 3, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 4, 3, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 13, 14, 15, 4, - 17, 4, 4, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 4, 4, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 13, 14, - 15, 49, 17, 16, 4, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 4, - 3, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 4, 19, 47, 48, 49, 50, 13, 14, 15, 3, - 17, 19, 4, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 4, 24, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 235, 103, - 138, 48, 49, 50, 13, 14, 15, 137, 17, 212, - 244, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 47, 110, 36, 37, 38, - 39, 40, 41, 42, 43, 44, -1, -1, 13, 14, - 15, 50, 17, 18, -1, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 13, 14, 15, -1, 17, 18, -1, 20, 21, 22, + 33, 4, 10, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 3, 3, 47, 48, 49, 50, 4, 4, + 13, 14, 15, 4, 17, 58, 59, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 4, 4, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 4, 4, 4, 3, 16, 49, 3, 61, + 4, 19, 3, 19, 57, 13, 14, 15, 4, 17, + 4, 148, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 59, 3, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 13, 14, 15, + 353, 17, 325, 107, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 305, 3, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 13, + 14, 15, 207, 17, 245, 129, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 156, 3, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 13, 14, 15, 117, 17, 218, 330, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 152, 3, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 13, 14, 15, 139, 17, 166, 61, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 20, 174, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 13, 14, 15, -1, 17, + -1, -1, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, -1, -1, 36, 37, + 38, 39, 40, 41, 42, 43, 44, -1, -1, -1, + 48, 49, 50, 13, 14, 15, -1, 17, -1, -1, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, -1, -1, 36, 37, 38, 39, + 40, 41, 42, 43, 44, -1, -1, 13, 14, 15, + 50, 17, 18, -1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, -1, -1, + 36, 37, 38, 39, 40, 41, 42, 43, 44, -1, + 13, 14, 15, 49, 17, -1, -1, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, -1, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 13, 14, 15, -1, 17, -1, -1, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, -1, -1, 36, 37, 38, 39, 40, - 41, 42, 43, 44 + 43, 44, -1, 13, 14, 15, 49, 17, 18, -1, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, -1, -1, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 13, 14, 15, -1, 17, + -1, -1, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, -1, -1, 36, 37, + 38, 39, 40, 41, 42, 43, 44, -1, 45, 46, + 47, -1, -1, -1, 51, 52, 53, 54, 55, 56, + -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 130, 133, 134, 3, 124, 125, 127, 128, 129, - 0, 52, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 9, 89, 90, 8, 75, 9, 126, - 126, 3, 124, 124, 124, 3, 127, 127, 127, 3, - 124, 127, 127, 8, 73, 123, 126, 75, 75, 75, - 75, 75, 132, 4, 4, 75, 75, 75, 4, 8, - 3, 4, 107, 109, 110, 111, 112, 113, 115, 118, - 121, 122, 4, 132, 4, 4, 4, 4, 3, 4, - 131, 4, 4, 4, 45, 46, 47, 51, 53, 54, - 55, 56, 58, 59, 4, 36, 89, 5, 9, 85, - 87, 3, 79, 90, 89, 89, 3, 87, 98, 108, - 89, 87, 108, 75, 75, 5, 6, 7, 86, 3, + 0, 3, 106, 115, 116, 118, 119, 121, 124, 127, + 129, 130, 131, 133, 134, 135, 136, 138, 139, 140, + 141, 144, 145, 45, 46, 47, 51, 52, 53, 54, + 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 3, 131, 3, 140, 0, + 9, 89, 90, 5, 9, 85, 87, 3, 79, 90, + 89, 89, 89, 3, 87, 99, 114, 89, 87, 114, + 8, 75, 75, 75, 9, 137, 137, 3, 134, 134, + 134, 3, 138, 138, 138, 3, 134, 138, 138, 3, 13, 14, 15, 17, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, 41, 42, 43, 44, 84, 94, 95, - 96, 98, 101, 104, 105, 106, 116, 120, 4, 45, - 4, 79, 3, 10, 78, 116, 120, 3, 116, 119, - 120, 15, 17, 20, 57, 95, 99, 108, 88, 3, - 116, 119, 120, 108, 73, 74, 75, 3, 117, 4, - 47, 48, 49, 50, 58, 59, 90, 91, 91, 91, - 87, 87, 88, 87, 87, 87, 87, 87, 87, 87, - 34, 92, 92, 86, 3, 106, 3, 101, 4, 3, - 80, 84, 3, 84, 106, 3, 80, 4, 12, 101, - 103, 3, 78, 78, 81, 83, 85, 11, 77, 81, - 91, 91, 91, 103, 98, 102, 4, 88, 4, 87, - 56, 82, 83, 82, 3, 74, 4, 3, 114, 45, - 51, 53, 55, 4, 87, 76, 90, 76, 76, 90, - 75, 75, 76, 97, 97, 97, 87, 35, 93, 93, - 4, 48, 49, 4, 4, 106, 4, 4, 10, 4, - 4, 103, 4, 77, 85, 3, 4, 97, 76, 97, - 4, 102, 4, 74, 4, 4, 56, 4, 45, 51, - 53, 55, 4, 87, 87, 87, 87, 4, 4, 10, - 10, 4, 4, 10, 75, 4, 101, 16, 16, 19, - 16, 76, 76, 4, 4, 4, 54, 3, 98, 100, - 4, 74, 89, 89, 89, 89, 4, 4, 4, 4, - 104, 4, 3, 105, 105, 4, 4, 91, 91, 91, - 91, 4, 4, 88, 18, 3, 98, 4, 4, 80, - 84, 78, 81, 82, 104, 105, 101, 3, 4, 101, - 18, 98, 4, 4, 4, 4, 4, 4, 16, 49, - 4, 4, 101, 91, 76, 3, 4, 4, 19, 3, - 101, 19, 4, 101, 4 + 96, 99, 103, 107, 110, 111, 112, 113, 125, 128, + 4, 45, 4, 79, 3, 10, 78, 122, 125, 128, + 8, 73, 132, 133, 3, 11, 77, 81, 83, 85, + 117, 125, 128, 15, 17, 20, 57, 95, 100, 114, + 88, 3, 82, 83, 120, 125, 128, 114, 73, 74, + 75, 3, 126, 137, 75, 75, 75, 75, 75, 143, + 4, 4, 75, 75, 75, 47, 48, 49, 50, 58, + 59, 90, 91, 91, 91, 87, 87, 88, 87, 87, + 87, 87, 87, 87, 87, 34, 92, 92, 5, 6, + 7, 86, 3, 110, 3, 103, 4, 3, 84, 108, + 109, 107, 3, 80, 4, 12, 103, 105, 4, 3, + 78, 122, 4, 8, 4, 3, 77, 85, 4, 81, + 117, 91, 91, 91, 105, 99, 104, 4, 88, 4, + 87, 56, 4, 82, 120, 74, 4, 3, 123, 45, + 51, 53, 55, 4, 4, 143, 4, 4, 4, 4, + 3, 4, 142, 4, 4, 4, 87, 76, 90, 76, + 76, 90, 75, 75, 3, 97, 98, 103, 98, 98, + 87, 35, 93, 93, 48, 49, 3, 108, 48, 49, + 4, 10, 54, 98, 3, 97, 99, 101, 102, 98, + 4, 104, 4, 74, 4, 45, 51, 53, 55, 4, + 87, 87, 87, 87, 4, 36, 4, 4, 10, 10, + 4, 4, 10, 75, 4, 49, 98, 16, 16, 19, + 16, 76, 90, 76, 76, 76, 4, 88, 18, 101, + 3, 99, 4, 89, 89, 89, 89, 4, 4, 4, + 4, 86, 111, 4, 3, 112, 113, 4, 4, 76, + 91, 91, 91, 91, 4, 10, 4, 4, 4, 4, + 103, 18, 99, 3, 80, 84, 78, 81, 82, 4, + 111, 113, 4, 103, 109, 4, 3, 4, 103, 4, + 4, 4, 4, 4, 16, 109, 49, 3, 4, 91, + 76, 19, 3, 4, 103, 19, 4, 103, 4 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1109,17 +1088,19 @@ static const yytype_uint8 yyr1[] = 94, 94, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 96, 96, 96, 96, - 97, 98, 99, 99, 99, 99, 100, 100, 100, 100, - 100, 100, 101, 101, 102, 102, 103, 104, 104, 104, - 104, 105, 105, 105, 106, 107, 107, 107, 107, 108, - 108, 109, 109, 110, 110, 111, 111, 112, 112, 112, - 113, 113, 114, 114, 114, 114, 114, 115, 115, 115, - 115, 115, 115, 116, 117, 117, 117, 117, 118, 119, - 119, 120, 121, 121, 122, 123, 123, 123, 123, 123, - 123, 123, 123, 123, 123, 123, 124, 124, 125, 126, - 126, 127, 127, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 129, 129, 129, 129, 130, 130, 131, 132, - 132, 133, 134 + 97, 98, 98, 99, 100, 100, 100, 100, 101, 101, + 102, 102, 102, 102, 102, 102, 103, 103, 104, 104, + 105, 106, 107, 107, 107, 107, 107, 108, 109, 109, + 109, 109, 110, 111, 111, 111, 111, 112, 113, 113, + 113, 114, 114, 115, 115, 116, 117, 117, 117, 117, + 118, 118, 119, 120, 120, 120, 120, 121, 122, 122, + 122, 123, 123, 123, 123, 123, 124, 125, 126, 126, + 126, 126, 127, 128, 129, 129, 130, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 132, 132, 133, + 133, 134, 134, 135, 136, 137, 137, 138, 138, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 140, 140, + 140, 140, 141, 141, 142, 143, 143, 144, 144, 144, + 145 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1132,17 +1113,19 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 1, 1, 1, 1, 1, 1, 5, 5, 5, 8, - 2, 3, 2, 3, 3, 4, 8, 4, 9, 5, - 3, 2, 0, 2, 0, 2, 1, 1, 5, 5, - 6, 1, 5, 6, 1, 7, 6, 6, 5, 4, - 1, 6, 5, 6, 10, 6, 5, 6, 9, 8, - 7, 6, 5, 5, 5, 5, 5, 6, 6, 6, - 6, 6, 6, 5, 4, 4, 4, 4, 5, 0, - 1, 4, 4, 5, 4, 0, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 5, 5, 1, 0, - 1, 6, 5, 5, 5, 5, 5, 5, 4, 4, - 5, 5, 1, 1, 1, 5, 0, 2, 4, 0, - 2, 1, 1 + 4, 2, 1, 3, 2, 3, 3, 3, 2, 1, + 8, 4, 9, 5, 3, 2, 0, 2, 0, 2, + 1, 5, 2, 1, 3, 2, 2, 1, 0, 4, + 5, 6, 1, 1, 5, 5, 6, 1, 1, 5, + 6, 4, 1, 6, 5, 5, 1, 2, 2, 5, + 6, 5, 5, 1, 2, 2, 4, 5, 2, 2, + 2, 5, 5, 5, 5, 5, 6, 5, 4, 4, + 4, 4, 5, 4, 4, 5, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, + 2, 5, 5, 1, 1, 0, 1, 6, 5, 5, + 5, 5, 5, 5, 4, 4, 5, 5, 1, 1, + 1, 5, 1, 2, 4, 0, 2, 0, 1, 1, + 1 }; @@ -1639,363 +1622,399 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio switch (yytype) { case 5: /* NAT */ -#line 251 "src/wast-parser.y" /* yacc.c:1257 */ +#line 205 "src/wast-parser.y" /* yacc.c:1257 */ {} -#line 1645 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1628 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 6: /* INT */ -#line 251 "src/wast-parser.y" /* yacc.c:1257 */ +#line 205 "src/wast-parser.y" /* yacc.c:1257 */ {} -#line 1651 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1634 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 7: /* FLOAT */ -#line 251 "src/wast-parser.y" /* yacc.c:1257 */ +#line 205 "src/wast-parser.y" /* yacc.c:1257 */ {} -#line 1657 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1640 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 8: /* TEXT */ -#line 251 "src/wast-parser.y" /* yacc.c:1257 */ +#line 205 "src/wast-parser.y" /* yacc.c:1257 */ {} -#line 1663 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1646 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 9: /* VAR */ -#line 251 "src/wast-parser.y" /* yacc.c:1257 */ +#line 205 "src/wast-parser.y" /* yacc.c:1257 */ {} -#line 1669 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1652 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 34: /* OFFSET_EQ_NAT */ -#line 251 "src/wast-parser.y" /* yacc.c:1257 */ +#line 205 "src/wast-parser.y" /* yacc.c:1257 */ {} -#line 1675 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1658 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 35: /* ALIGN_EQ_NAT */ -#line 251 "src/wast-parser.y" /* yacc.c:1257 */ +#line 205 "src/wast-parser.y" /* yacc.c:1257 */ {} -#line 1681 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1664 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 73: /* non_empty_text_list */ -#line 278 "src/wast-parser.y" /* yacc.c:1257 */ + case 73: /* text_list */ +#line 225 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_text_list(&((*yyvaluep).text_list)); } -#line 1687 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1670 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 74: /* text_list */ -#line 278 "src/wast-parser.y" /* yacc.c:1257 */ + case 74: /* text_list_opt */ +#line 225 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_text_list(&((*yyvaluep).text_list)); } -#line 1693 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1676 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 75: /* quoted_text */ -#line 252 "src/wast-parser.y" /* yacc.c:1257 */ +#line 206 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_string_slice(&((*yyvaluep).text)); } -#line 1699 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1682 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 76: /* value_type_list */ -#line 279 "src/wast-parser.y" /* yacc.c:1257 */ +#line 226 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).types); } -#line 1705 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1688 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 78: /* global_type */ -#line 271 "src/wast-parser.y" /* yacc.c:1257 */ +#line 219 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).global); } -#line 1711 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1694 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 79: /* func_type */ -#line 269 "src/wast-parser.y" /* yacc.c:1257 */ +#line 218 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).func_sig); } -#line 1717 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1700 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 80: /* func_sig */ -#line 269 "src/wast-parser.y" /* yacc.c:1257 */ +#line 218 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).func_sig); } -#line 1723 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1706 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 82: /* memory_sig */ -#line 274 "src/wast-parser.y" /* yacc.c:1257 */ +#line 221 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).memory); } -#line 1729 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1712 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 84: /* type_use */ -#line 280 "src/wast-parser.y" /* yacc.c:1257 */ +#line 227 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_var(&((*yyvaluep).var)); } -#line 1735 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1718 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 86: /* literal */ -#line 253 "src/wast-parser.y" /* yacc.c:1257 */ +#line 207 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_string_slice(&((*yyvaluep).literal).text); } -#line 1741 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1724 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 87: /* var */ -#line 280 "src/wast-parser.y" /* yacc.c:1257 */ +#line 227 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_var(&((*yyvaluep).var)); } -#line 1747 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1730 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 88: /* var_list */ -#line 281 "src/wast-parser.y" /* yacc.c:1257 */ +#line 228 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).vars); } -#line 1753 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1736 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 89: /* bind_var_opt */ -#line 252 "src/wast-parser.y" /* yacc.c:1257 */ +#line 206 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_string_slice(&((*yyvaluep).text)); } -#line 1759 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1742 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 90: /* bind_var */ -#line 252 "src/wast-parser.y" /* yacc.c:1257 */ +#line 206 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_string_slice(&((*yyvaluep).text)); } -#line 1765 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1748 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 91: /* labeling_opt */ -#line 252 "src/wast-parser.y" /* yacc.c:1257 */ +#line 206 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_string_slice(&((*yyvaluep).text)); } -#line 1771 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1754 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 94: /* instr */ -#line 266 "src/wast-parser.y" /* yacc.c:1257 */ +#line 215 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_expr_list(((*yyvaluep).expr_list).first); } -#line 1777 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1760 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 95: /* plain_instr */ -#line 265 "src/wast-parser.y" /* yacc.c:1257 */ +#line 214 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).expr); } -#line 1783 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1766 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; case 96: /* block_instr */ -#line 265 "src/wast-parser.y" /* yacc.c:1257 */ +#line 214 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).expr); } -#line 1789 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1772 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + break; + + case 97: /* block_sig */ +#line 226 "src/wast-parser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).types); } +#line 1778 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 97: /* block */ -#line 255 "src/wast-parser.y" /* yacc.c:1257 */ + case 98: /* block */ +#line 209 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).block); } -#line 1795 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1784 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 98: /* expr */ -#line 266 "src/wast-parser.y" /* yacc.c:1257 */ + case 99: /* expr */ +#line 215 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_expr_list(((*yyvaluep).expr_list).first); } -#line 1801 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1790 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 99: /* expr1 */ -#line 266 "src/wast-parser.y" /* yacc.c:1257 */ + case 100: /* expr1 */ +#line 215 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_expr_list(((*yyvaluep).expr_list).first); } -#line 1807 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1796 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 100: /* if_ */ -#line 266 "src/wast-parser.y" /* yacc.c:1257 */ + case 101: /* if_block */ +#line 215 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_expr_list(((*yyvaluep).expr_list).first); } -#line 1813 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1802 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 101: /* instr_list */ -#line 266 "src/wast-parser.y" /* yacc.c:1257 */ + case 102: /* if_ */ +#line 215 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_expr_list(((*yyvaluep).expr_list).first); } -#line 1819 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1808 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 102: /* expr_list */ -#line 266 "src/wast-parser.y" /* yacc.c:1257 */ + case 103: /* instr_list */ +#line 215 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_expr_list(((*yyvaluep).expr_list).first); } -#line 1825 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1814 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 103: /* const_expr */ -#line 266 "src/wast-parser.y" /* yacc.c:1257 */ + case 104: /* expr_list */ +#line 215 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_expr_list(((*yyvaluep).expr_list).first); } -#line 1831 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1820 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + break; + + case 105: /* const_expr */ +#line 215 "src/wast-parser.y" /* yacc.c:1257 */ + { destroy_expr_list(((*yyvaluep).expr_list).first); } +#line 1826 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + break; + + case 106: /* func */ +#line 216 "src/wast-parser.y" /* yacc.c:1257 */ + { destroy_module_field_list(&((*yyvaluep).module_fields)); } +#line 1832 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + break; + + case 107: /* func_fields */ +#line 216 "src/wast-parser.y" /* yacc.c:1257 */ + { destroy_module_field_list(&((*yyvaluep).module_fields)); } +#line 1838 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 104: /* func_fields */ -#line 267 "src/wast-parser.y" /* yacc.c:1257 */ - { destroy_func_fields(((*yyvaluep).func_fields)); } -#line 1837 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 108: /* func_fields_import */ +#line 217 "src/wast-parser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).func); } +#line 1844 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 105: /* func_body */ -#line 267 "src/wast-parser.y" /* yacc.c:1257 */ - { destroy_func_fields(((*yyvaluep).func_fields)); } -#line 1843 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 109: /* func_fields_import1 */ +#line 217 "src/wast-parser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).func); } +#line 1850 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 106: /* func_info */ -#line 268 "src/wast-parser.y" /* yacc.c:1257 */ + case 110: /* func_fields_body */ +#line 217 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).func); } -#line 1849 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1856 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 107: /* func */ -#line 262 "src/wast-parser.y" /* yacc.c:1257 */ - { delete ((*yyvaluep).exported_func); } -#line 1855 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 111: /* func_fields_body1 */ +#line 217 "src/wast-parser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).func); } +#line 1862 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 108: /* offset */ -#line 266 "src/wast-parser.y" /* yacc.c:1257 */ + case 112: /* func_body */ +#line 217 "src/wast-parser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).func); } +#line 1868 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + break; + + case 113: /* func_body1 */ +#line 217 "src/wast-parser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).func); } +#line 1874 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + break; + + case 114: /* offset */ +#line 215 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_expr_list(((*yyvaluep).expr_list).first); } -#line 1861 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1880 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 109: /* elem */ -#line 260 "src/wast-parser.y" /* yacc.c:1257 */ - { delete ((*yyvaluep).elem_segment); } -#line 1867 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 116: /* table */ +#line 216 "src/wast-parser.y" /* yacc.c:1257 */ + { destroy_module_field_list(&((*yyvaluep).module_fields)); } +#line 1886 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 110: /* table */ -#line 264 "src/wast-parser.y" /* yacc.c:1257 */ - { delete ((*yyvaluep).exported_table); } -#line 1873 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 117: /* table_fields */ +#line 216 "src/wast-parser.y" /* yacc.c:1257 */ + { destroy_module_field_list(&((*yyvaluep).module_fields)); } +#line 1892 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 111: /* data */ -#line 259 "src/wast-parser.y" /* yacc.c:1257 */ - { delete ((*yyvaluep).data_segment); } -#line 1879 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 119: /* memory */ +#line 216 "src/wast-parser.y" /* yacc.c:1257 */ + { destroy_module_field_list(&((*yyvaluep).module_fields)); } +#line 1898 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 112: /* memory */ -#line 263 "src/wast-parser.y" /* yacc.c:1257 */ - { delete ((*yyvaluep).exported_memory); } -#line 1885 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 120: /* memory_fields */ +#line 216 "src/wast-parser.y" /* yacc.c:1257 */ + { destroy_module_field_list(&((*yyvaluep).module_fields)); } +#line 1904 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 114: /* import_kind */ -#line 272 "src/wast-parser.y" /* yacc.c:1257 */ - { delete ((*yyvaluep).import); } -#line 1891 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 121: /* global */ +#line 216 "src/wast-parser.y" /* yacc.c:1257 */ + { destroy_module_field_list(&((*yyvaluep).module_fields)); } +#line 1910 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + break; + + case 122: /* global_fields */ +#line 216 "src/wast-parser.y" /* yacc.c:1257 */ + { destroy_module_field_list(&((*yyvaluep).module_fields)); } +#line 1916 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 115: /* import */ -#line 272 "src/wast-parser.y" /* yacc.c:1257 */ + case 123: /* import_desc */ +#line 220 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).import); } -#line 1897 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1922 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 116: /* inline_import */ -#line 272 "src/wast-parser.y" /* yacc.c:1257 */ + case 125: /* inline_import */ +#line 220 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).import); } -#line 1903 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1928 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 117: /* export_kind */ -#line 261 "src/wast-parser.y" /* yacc.c:1257 */ + case 126: /* export_desc */ +#line 213 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).export_); } -#line 1909 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1934 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 118: /* export */ -#line 261 "src/wast-parser.y" /* yacc.c:1257 */ + case 128: /* inline_export */ +#line 213 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).export_); } -#line 1915 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1940 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 119: /* inline_export_opt */ -#line 273 "src/wast-parser.y" /* yacc.c:1257 */ - { delete ((*yyvaluep).optional_export); } -#line 1921 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 131: /* module_field */ +#line 216 "src/wast-parser.y" /* yacc.c:1257 */ + { destroy_module_field_list(&((*yyvaluep).module_fields)); } +#line 1946 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 120: /* inline_export */ -#line 273 "src/wast-parser.y" /* yacc.c:1257 */ - { delete ((*yyvaluep).optional_export); } -#line 1927 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 132: /* module_fields_opt */ +#line 222 "src/wast-parser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).module); } +#line 1952 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 121: /* type_def */ -#line 270 "src/wast-parser.y" /* yacc.c:1257 */ - { delete ((*yyvaluep).func_type); } -#line 1933 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 133: /* module_fields */ +#line 222 "src/wast-parser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).module); } +#line 1958 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 122: /* start */ -#line 280 "src/wast-parser.y" /* yacc.c:1257 */ - { destroy_var(&((*yyvaluep).var)); } -#line 1939 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ + case 134: /* raw_module */ +#line 223 "src/wast-parser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).raw_module); } +#line 1964 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 123: /* module_fields */ -#line 275 "src/wast-parser.y" /* yacc.c:1257 */ + case 135: /* module */ +#line 222 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).module); } -#line 1945 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ - break; - - case 124: /* raw_module */ -#line 276 "src/wast-parser.y" /* yacc.c:1257 */ - { delete ((*yyvaluep).raw_module); } -#line 1951 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1970 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 125: /* module */ -#line 275 "src/wast-parser.y" /* yacc.c:1257 */ + case 136: /* inline_module */ +#line 222 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).module); } -#line 1957 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1976 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 126: /* script_var_opt */ -#line 280 "src/wast-parser.y" /* yacc.c:1257 */ + case 137: /* script_var_opt */ +#line 227 "src/wast-parser.y" /* yacc.c:1257 */ { destroy_var(&((*yyvaluep).var)); } -#line 1963 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1982 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 127: /* action */ -#line 254 "src/wast-parser.y" /* yacc.c:1257 */ + case 138: /* action */ +#line 208 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).action); } -#line 1969 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1988 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 128: /* assertion */ -#line 256 "src/wast-parser.y" /* yacc.c:1257 */ + case 139: /* assertion */ +#line 210 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).command); } -#line 1975 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 1994 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 129: /* cmd */ -#line 256 "src/wast-parser.y" /* yacc.c:1257 */ + case 140: /* cmd */ +#line 210 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).command); } -#line 1981 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 2000 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 130: /* cmd_list */ -#line 257 "src/wast-parser.y" /* yacc.c:1257 */ + case 141: /* cmd_list */ +#line 211 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).commands); } -#line 1987 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 2006 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 132: /* const_list */ -#line 258 "src/wast-parser.y" /* yacc.c:1257 */ + case 143: /* const_list */ +#line 212 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).consts); } -#line 1993 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 2012 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; - case 133: /* script */ -#line 277 "src/wast-parser.y" /* yacc.c:1257 */ + case 144: /* script */ +#line 224 "src/wast-parser.y" /* yacc.c:1257 */ { delete ((*yyvaluep).script); } -#line 1999 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ +#line 2018 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257 */ break; @@ -2287,18 +2306,18 @@ yyreduce: switch (yyn) { case 2: -#line 294 "src/wast-parser.y" /* yacc.c:1646 */ +#line 241 "src/wast-parser.y" /* yacc.c:1646 */ { TextListNode* node = new TextListNode(); DUPTEXT(node->text, (yyvsp[0].text)); node->next = nullptr; (yyval.text_list).first = (yyval.text_list).last = node; } -#line 2298 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2317 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 3: -#line 300 "src/wast-parser.y" /* yacc.c:1646 */ +#line 247 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.text_list) = (yyvsp[-1].text_list); TextListNode* node = new TextListNode(); @@ -2307,17 +2326,17 @@ yyreduce: (yyval.text_list).last->next = node; (yyval.text_list).last = node; } -#line 2311 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2330 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 4: -#line 310 "src/wast-parser.y" /* yacc.c:1646 */ +#line 257 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.text_list).first = (yyval.text_list).last = nullptr; } -#line 2317 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2336 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 6: -#line 315 "src/wast-parser.y" /* yacc.c:1646 */ +#line 262 "src/wast-parser.y" /* yacc.c:1646 */ { TextListNode node; node.text = (yyvsp[0].text); @@ -2331,74 +2350,74 @@ yyreduce: (yyval.text).start = data; (yyval.text).length = size; } -#line 2335 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2354 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 7: -#line 333 "src/wast-parser.y" /* yacc.c:1646 */ +#line 280 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.types) = new TypeVector(); } -#line 2341 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2360 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 8: -#line 334 "src/wast-parser.y" /* yacc.c:1646 */ +#line 281 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.types) = (yyvsp[-1].types); (yyval.types)->push_back((yyvsp[0].type)); } -#line 2350 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2369 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 9: -#line 340 "src/wast-parser.y" /* yacc.c:1646 */ +#line 287 "src/wast-parser.y" /* yacc.c:1646 */ {} -#line 2356 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2375 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 10: -#line 343 "src/wast-parser.y" /* yacc.c:1646 */ +#line 290 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.global) = new Global(); (yyval.global)->type = (yyvsp[0].type); (yyval.global)->mutable_ = false; } -#line 2366 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2385 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 11: -#line 348 "src/wast-parser.y" /* yacc.c:1646 */ +#line 295 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.global) = new Global(); (yyval.global)->type = (yyvsp[-1].type); (yyval.global)->mutable_ = true; } -#line 2376 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2395 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 12: -#line 355 "src/wast-parser.y" /* yacc.c:1646 */ +#line 302 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.func_sig) = (yyvsp[-1].func_sig); } -#line 2382 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2401 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 13: -#line 358 "src/wast-parser.y" /* yacc.c:1646 */ +#line 305 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.func_sig) = new FuncSignature(); } -#line 2388 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2407 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 14: -#line 359 "src/wast-parser.y" /* yacc.c:1646 */ +#line 306 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.func_sig) = new FuncSignature(); (yyval.func_sig)->param_types = std::move(*(yyvsp[-1].types)); delete (yyvsp[-1].types); } -#line 2398 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2417 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 15: -#line 364 "src/wast-parser.y" /* yacc.c:1646 */ +#line 311 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.func_sig) = new FuncSignature(); (yyval.func_sig)->param_types = std::move(*(yyvsp[-5].types)); @@ -2406,65 +2425,65 @@ yyreduce: (yyval.func_sig)->result_types = std::move(*(yyvsp[-1].types)); delete (yyvsp[-1].types); } -#line 2410 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2429 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 16: -#line 371 "src/wast-parser.y" /* yacc.c:1646 */ +#line 318 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.func_sig) = new FuncSignature(); (yyval.func_sig)->result_types = std::move(*(yyvsp[-1].types)); delete (yyvsp[-1].types); } -#line 2420 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2439 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 17: -#line 379 "src/wast-parser.y" /* yacc.c:1646 */ +#line 326 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.table) = new Table(); (yyval.table)->elem_limits = (yyvsp[-1].limits); } -#line 2429 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2448 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 18: -#line 385 "src/wast-parser.y" /* yacc.c:1646 */ +#line 332 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.memory) = new Memory(); (yyval.memory)->page_limits = (yyvsp[0].limits); } -#line 2438 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2457 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 19: -#line 391 "src/wast-parser.y" /* yacc.c:1646 */ +#line 338 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.limits).has_max = false; (yyval.limits).initial = (yyvsp[0].u64); (yyval.limits).max = 0; } -#line 2448 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2467 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 20: -#line 396 "src/wast-parser.y" /* yacc.c:1646 */ +#line 343 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.limits).has_max = true; (yyval.limits).initial = (yyvsp[-1].u64); (yyval.limits).max = (yyvsp[0].u64); } -#line 2458 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2477 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 21: -#line 403 "src/wast-parser.y" /* yacc.c:1646 */ +#line 350 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.var) = (yyvsp[-1].var); } -#line 2464 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2483 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 22: -#line 409 "src/wast-parser.y" /* yacc.c:1646 */ +#line 356 "src/wast-parser.y" /* yacc.c:1646 */ { if (WABT_FAILED(parse_uint64((yyvsp[0].literal).text.start, (yyvsp[0].literal).text.start + (yyvsp[0].literal).text.length, &(yyval.u64)))) { @@ -2473,97 +2492,97 @@ yyreduce: WABT_PRINTF_STRING_SLICE_ARG((yyvsp[0].literal).text)); } } -#line 2477 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2496 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 23: -#line 420 "src/wast-parser.y" /* yacc.c:1646 */ +#line 367 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.literal).type = (yyvsp[0].literal).type; DUPTEXT((yyval.literal).text, (yyvsp[0].literal).text); } -#line 2486 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2505 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 24: -#line 424 "src/wast-parser.y" /* yacc.c:1646 */ +#line 371 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.literal).type = (yyvsp[0].literal).type; DUPTEXT((yyval.literal).text, (yyvsp[0].literal).text); } -#line 2495 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2514 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 25: -#line 428 "src/wast-parser.y" /* yacc.c:1646 */ +#line 375 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.literal).type = (yyvsp[0].literal).type; DUPTEXT((yyval.literal).text, (yyvsp[0].literal).text); } -#line 2504 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2523 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 26: -#line 435 "src/wast-parser.y" /* yacc.c:1646 */ +#line 382 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.var).loc = (yylsp[0]); (yyval.var).type = VarType::Index; (yyval.var).index = (yyvsp[0].u64); } -#line 2514 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2533 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 27: -#line 440 "src/wast-parser.y" /* yacc.c:1646 */ +#line 387 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.var).loc = (yylsp[0]); (yyval.var).type = VarType::Name; DUPTEXT((yyval.var).name, (yyvsp[0].text)); } -#line 2524 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2543 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 28: -#line 447 "src/wast-parser.y" /* yacc.c:1646 */ +#line 394 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.vars) = new VarVector(); } -#line 2530 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2549 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 29: -#line 448 "src/wast-parser.y" /* yacc.c:1646 */ +#line 395 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.vars) = (yyvsp[-1].vars); (yyval.vars)->push_back((yyvsp[0].var)); } -#line 2539 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2558 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 30: -#line 454 "src/wast-parser.y" /* yacc.c:1646 */ +#line 401 "src/wast-parser.y" /* yacc.c:1646 */ { WABT_ZERO_MEMORY((yyval.text)); } -#line 2545 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2564 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 32: -#line 458 "src/wast-parser.y" /* yacc.c:1646 */ +#line 405 "src/wast-parser.y" /* yacc.c:1646 */ { DUPTEXT((yyval.text), (yyvsp[0].text)); } -#line 2551 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2570 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 33: -#line 462 "src/wast-parser.y" /* yacc.c:1646 */ +#line 409 "src/wast-parser.y" /* yacc.c:1646 */ { WABT_ZERO_MEMORY((yyval.text)); } -#line 2557 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2576 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 35: -#line 467 "src/wast-parser.y" /* yacc.c:1646 */ +#line 414 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.u64) = 0; } -#line 2563 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2582 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 36: -#line 468 "src/wast-parser.y" /* yacc.c:1646 */ +#line 415 "src/wast-parser.y" /* yacc.c:1646 */ { if (WABT_FAILED(parse_int64((yyvsp[0].text).start, (yyvsp[0].text).start + (yyvsp[0].text).length, &(yyval.u64), ParseIntType::SignedAndUnsigned))) { @@ -2572,17 +2591,17 @@ yyreduce: WABT_PRINTF_STRING_SLICE_ARG((yyvsp[0].text))); } } -#line 2576 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2595 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 37: -#line 478 "src/wast-parser.y" /* yacc.c:1646 */ +#line 425 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.u32) = USE_NATURAL_ALIGNMENT; } -#line 2582 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2601 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 38: -#line 479 "src/wast-parser.y" /* yacc.c:1646 */ +#line 426 "src/wast-parser.y" /* yacc.c:1646 */ { if (WABT_FAILED(parse_int32((yyvsp[0].text).start, (yyvsp[0].text).start + (yyvsp[0].text).length, &(yyval.u32), ParseIntType::UnsignedOnly))) { @@ -2591,165 +2610,165 @@ yyreduce: WABT_PRINTF_STRING_SLICE_ARG((yyvsp[0].text))); } } -#line 2595 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2614 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 39: -#line 490 "src/wast-parser.y" /* yacc.c:1646 */ +#line 437 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr_list) = join_exprs1(&(yylsp[0]), (yyvsp[0].expr)); } -#line 2601 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2620 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 40: -#line 491 "src/wast-parser.y" /* yacc.c:1646 */ +#line 438 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr_list) = join_exprs1(&(yylsp[0]), (yyvsp[0].expr)); } -#line 2607 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2626 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 41: -#line 492 "src/wast-parser.y" /* yacc.c:1646 */ +#line 439 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr_list) = (yyvsp[0].expr_list); } -#line 2613 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2632 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 42: -#line 495 "src/wast-parser.y" /* yacc.c:1646 */ +#line 442 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateUnreachable(); } -#line 2621 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2640 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 43: -#line 498 "src/wast-parser.y" /* yacc.c:1646 */ +#line 445 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateNop(); } -#line 2629 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2648 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 44: -#line 501 "src/wast-parser.y" /* yacc.c:1646 */ +#line 448 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateDrop(); } -#line 2637 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2656 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 45: -#line 504 "src/wast-parser.y" /* yacc.c:1646 */ +#line 451 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateSelect(); } -#line 2645 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2664 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 46: -#line 507 "src/wast-parser.y" /* yacc.c:1646 */ +#line 454 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateBr((yyvsp[0].var)); } -#line 2653 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2672 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 47: -#line 510 "src/wast-parser.y" /* yacc.c:1646 */ +#line 457 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateBrIf((yyvsp[0].var)); } -#line 2661 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2680 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 48: -#line 513 "src/wast-parser.y" /* yacc.c:1646 */ +#line 460 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateBrTable((yyvsp[-1].vars), (yyvsp[0].var)); } -#line 2669 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2688 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 49: -#line 516 "src/wast-parser.y" /* yacc.c:1646 */ +#line 463 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateReturn(); } -#line 2677 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2696 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 50: -#line 519 "src/wast-parser.y" /* yacc.c:1646 */ +#line 466 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateCall((yyvsp[0].var)); } -#line 2685 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2704 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 51: -#line 522 "src/wast-parser.y" /* yacc.c:1646 */ +#line 469 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateCallIndirect((yyvsp[0].var)); } -#line 2693 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2712 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 52: -#line 525 "src/wast-parser.y" /* yacc.c:1646 */ +#line 472 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateGetLocal((yyvsp[0].var)); } -#line 2701 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2720 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 53: -#line 528 "src/wast-parser.y" /* yacc.c:1646 */ +#line 475 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateSetLocal((yyvsp[0].var)); } -#line 2709 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2728 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 54: -#line 531 "src/wast-parser.y" /* yacc.c:1646 */ +#line 478 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateTeeLocal((yyvsp[0].var)); } -#line 2717 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2736 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 55: -#line 534 "src/wast-parser.y" /* yacc.c:1646 */ +#line 481 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateGetGlobal((yyvsp[0].var)); } -#line 2725 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2744 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 56: -#line 537 "src/wast-parser.y" /* yacc.c:1646 */ +#line 484 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateSetGlobal((yyvsp[0].var)); } -#line 2733 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2752 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 57: -#line 540 "src/wast-parser.y" /* yacc.c:1646 */ +#line 487 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateLoad((yyvsp[-2].opcode), (yyvsp[0].u32), (yyvsp[-1].u64)); } -#line 2741 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2760 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 58: -#line 543 "src/wast-parser.y" /* yacc.c:1646 */ +#line 490 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateStore((yyvsp[-2].opcode), (yyvsp[0].u32), (yyvsp[-1].u64)); } -#line 2749 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2768 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 59: -#line 546 "src/wast-parser.y" /* yacc.c:1646 */ +#line 493 "src/wast-parser.y" /* yacc.c:1646 */ { Const const_; WABT_ZERO_MEMORY(const_); @@ -2763,1014 +2782,990 @@ yyreduce: delete [] (yyvsp[0].literal).text.start; (yyval.expr) = Expr::CreateConst(const_); } -#line 2767 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2786 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 60: -#line 559 "src/wast-parser.y" /* yacc.c:1646 */ +#line 506 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateUnary((yyvsp[0].opcode)); } -#line 2775 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2794 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 61: -#line 562 "src/wast-parser.y" /* yacc.c:1646 */ +#line 509 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateBinary((yyvsp[0].opcode)); } -#line 2783 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2802 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 62: -#line 565 "src/wast-parser.y" /* yacc.c:1646 */ +#line 512 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateCompare((yyvsp[0].opcode)); } -#line 2791 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2810 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 63: -#line 568 "src/wast-parser.y" /* yacc.c:1646 */ +#line 515 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateConvert((yyvsp[0].opcode)); } -#line 2799 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2818 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 64: -#line 571 "src/wast-parser.y" /* yacc.c:1646 */ +#line 518 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateCurrentMemory(); } -#line 2807 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2826 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 65: -#line 574 "src/wast-parser.y" /* yacc.c:1646 */ +#line 521 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateGrowMemory(); } -#line 2815 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2834 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 66: -#line 579 "src/wast-parser.y" /* yacc.c:1646 */ +#line 526 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateBlock((yyvsp[-2].block)); (yyval.expr)->block->label = (yyvsp[-3].text); CHECK_END_LABEL((yylsp[0]), (yyval.expr)->block->label, (yyvsp[0].text)); } -#line 2825 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2844 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 67: -#line 584 "src/wast-parser.y" /* yacc.c:1646 */ +#line 531 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateLoop((yyvsp[-2].block)); (yyval.expr)->loop->label = (yyvsp[-3].text); CHECK_END_LABEL((yylsp[0]), (yyval.expr)->loop->label, (yyvsp[0].text)); } -#line 2835 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2854 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 68: -#line 589 "src/wast-parser.y" /* yacc.c:1646 */ +#line 536 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateIf((yyvsp[-2].block), nullptr); (yyval.expr)->if_.true_->label = (yyvsp[-3].text); CHECK_END_LABEL((yylsp[0]), (yyval.expr)->if_.true_->label, (yyvsp[0].text)); } -#line 2845 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2864 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 69: -#line 594 "src/wast-parser.y" /* yacc.c:1646 */ +#line 541 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::CreateIf((yyvsp[-5].block), (yyvsp[-2].expr_list).first); (yyval.expr)->if_.true_->label = (yyvsp[-6].text); CHECK_END_LABEL((yylsp[-3]), (yyval.expr)->if_.true_->label, (yyvsp[-3].text)); CHECK_END_LABEL((yylsp[0]), (yyval.expr)->if_.true_->label, (yyvsp[0].text)); } -#line 2856 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2875 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 70: -#line 602 "src/wast-parser.y" /* yacc.c:1646 */ +#line 549 "src/wast-parser.y" /* yacc.c:1646 */ + { (yyval.types) = (yyvsp[-1].types); } +#line 2881 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 71: +#line 552 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.block) = new Block(); - (yyval.block)->sig = std::move(*(yyvsp[-1].types)); + (yyval.block) = (yyvsp[0].block); + (yyval.block)->sig.insert((yyval.block)->sig.end(), (yyvsp[-1].types)->begin(), (yyvsp[-1].types)->end()); delete (yyvsp[-1].types); + } +#line 2891 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 72: +#line 557 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.block) = new Block(); (yyval.block)->first = (yyvsp[0].expr_list).first; } -#line 2867 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2900 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 71: -#line 611 "src/wast-parser.y" /* yacc.c:1646 */ + case 73: +#line 564 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr_list) = (yyvsp[-1].expr_list); } -#line 2873 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2906 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 72: -#line 615 "src/wast-parser.y" /* yacc.c:1646 */ + case 74: +#line 568 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr_list) = join_exprs2(&(yylsp[-1]), &(yyvsp[0].expr_list), (yyvsp[-1].expr)); } -#line 2881 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2914 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 73: -#line 618 "src/wast-parser.y" /* yacc.c:1646 */ + case 75: +#line 571 "src/wast-parser.y" /* yacc.c:1646 */ { Expr* expr = Expr::CreateBlock((yyvsp[0].block)); expr->block->label = (yyvsp[-1].text); (yyval.expr_list) = join_exprs1(&(yylsp[-2]), expr); } -#line 2891 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2924 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 74: -#line 623 "src/wast-parser.y" /* yacc.c:1646 */ + case 76: +#line 576 "src/wast-parser.y" /* yacc.c:1646 */ { Expr* expr = Expr::CreateLoop((yyvsp[0].block)); expr->loop->label = (yyvsp[-1].text); (yyval.expr_list) = join_exprs1(&(yylsp[-2]), expr); } -#line 2901 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2934 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 75: -#line 628 "src/wast-parser.y" /* yacc.c:1646 */ + case 77: +#line 581 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr_list) = (yyvsp[0].expr_list); Expr* if_ = (yyvsp[0].expr_list).last; assert(if_->type == ExprType::If); - if_->if_.true_->label = (yyvsp[-2].text); - if_->if_.true_->sig = std::move(*(yyvsp[-1].types)); + if_->if_.true_->label = (yyvsp[-1].text); + } +#line 2945 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 78: +#line 589 "src/wast-parser.y" /* yacc.c:1646 */ + { + Expr* if_ = (yyvsp[0].expr_list).last; + assert(if_->type == ExprType::If); + (yyval.expr_list) = (yyvsp[0].expr_list); + Block* true_ = if_->if_.true_; + true_->sig.insert(true_->sig.end(), (yyvsp[-1].types)->begin(), (yyvsp[-1].types)->end()); delete (yyvsp[-1].types); } -#line 2914 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2958 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 76: -#line 638 "src/wast-parser.y" /* yacc.c:1646 */ + case 80: +#line 600 "src/wast-parser.y" /* yacc.c:1646 */ { Expr* expr = Expr::CreateIf(new Block((yyvsp[-5].expr_list).first), (yyvsp[-1].expr_list).first); (yyval.expr_list) = join_exprs1(&(yylsp[-7]), expr); } -#line 2923 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2967 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 77: -#line 642 "src/wast-parser.y" /* yacc.c:1646 */ + case 81: +#line 604 "src/wast-parser.y" /* yacc.c:1646 */ { Expr* expr = Expr::CreateIf(new Block((yyvsp[-1].expr_list).first), nullptr); (yyval.expr_list) = join_exprs1(&(yylsp[-3]), expr); } -#line 2932 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2976 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 78: -#line 646 "src/wast-parser.y" /* yacc.c:1646 */ + case 82: +#line 608 "src/wast-parser.y" /* yacc.c:1646 */ { Expr* expr = Expr::CreateIf(new Block((yyvsp[-5].expr_list).first), (yyvsp[-1].expr_list).first); (yyval.expr_list) = join_exprs2(&(yylsp[-8]), &(yyvsp[-8].expr_list), expr); } -#line 2941 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2985 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 79: -#line 650 "src/wast-parser.y" /* yacc.c:1646 */ + case 83: +#line 612 "src/wast-parser.y" /* yacc.c:1646 */ { Expr* expr = Expr::CreateIf(new Block((yyvsp[-1].expr_list).first), nullptr); (yyval.expr_list) = join_exprs2(&(yylsp[-4]), &(yyvsp[-4].expr_list), expr); } -#line 2950 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 2994 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 80: -#line 654 "src/wast-parser.y" /* yacc.c:1646 */ + case 84: +#line 616 "src/wast-parser.y" /* yacc.c:1646 */ { Expr* expr = Expr::CreateIf(new Block((yyvsp[-1].expr_list).first), (yyvsp[0].expr_list).first); (yyval.expr_list) = join_exprs2(&(yylsp[-2]), &(yyvsp[-2].expr_list), expr); } -#line 2959 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3003 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 81: -#line 658 "src/wast-parser.y" /* yacc.c:1646 */ + case 85: +#line 620 "src/wast-parser.y" /* yacc.c:1646 */ { Expr* expr = Expr::CreateIf(new Block((yyvsp[0].expr_list).first), nullptr); (yyval.expr_list) = join_exprs2(&(yylsp[-1]), &(yyvsp[-1].expr_list), expr); } -#line 2968 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3012 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 82: -#line 665 "src/wast-parser.y" /* yacc.c:1646 */ + case 86: +#line 627 "src/wast-parser.y" /* yacc.c:1646 */ { WABT_ZERO_MEMORY((yyval.expr_list)); } -#line 2974 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3018 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 83: -#line 666 "src/wast-parser.y" /* yacc.c:1646 */ + case 87: +#line 628 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr_list).first = (yyvsp[-1].expr_list).first; (yyvsp[-1].expr_list).last->next = (yyvsp[0].expr_list).first; (yyval.expr_list).last = (yyvsp[0].expr_list).last ? (yyvsp[0].expr_list).last : (yyvsp[-1].expr_list).last; (yyval.expr_list).size = (yyvsp[-1].expr_list).size + (yyvsp[0].expr_list).size; } -#line 2985 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3029 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 84: -#line 674 "src/wast-parser.y" /* yacc.c:1646 */ + case 88: +#line 636 "src/wast-parser.y" /* yacc.c:1646 */ { WABT_ZERO_MEMORY((yyval.expr_list)); } -#line 2991 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3035 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 85: -#line 675 "src/wast-parser.y" /* yacc.c:1646 */ + case 89: +#line 637 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.expr_list).first = (yyvsp[-1].expr_list).first; (yyvsp[-1].expr_list).last->next = (yyvsp[0].expr_list).first; (yyval.expr_list).last = (yyvsp[0].expr_list).last ? (yyvsp[0].expr_list).last : (yyvsp[-1].expr_list).last; (yyval.expr_list).size = (yyvsp[-1].expr_list).size + (yyvsp[0].expr_list).size; } -#line 3002 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ - break; - - case 88: -#line 689 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.func_fields) = new FuncField(); - (yyval.func_fields)->type = FuncFieldType::ResultTypes; - (yyval.func_fields)->types = (yyvsp[-2].types); - (yyval.func_fields)->next = (yyvsp[0].func_fields); - } -#line 3013 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ - break; - - case 89: -#line 695 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.func_fields) = new FuncField(); - (yyval.func_fields)->type = FuncFieldType::ParamTypes; - (yyval.func_fields)->types = (yyvsp[-2].types); - (yyval.func_fields)->next = (yyvsp[0].func_fields); - } -#line 3024 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ - break; - - case 90: -#line 701 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.func_fields) = new FuncField(); - (yyval.func_fields)->type = FuncFieldType::BoundParam; - (yyval.func_fields)->bound_type.loc = (yylsp[-4]); - (yyval.func_fields)->bound_type.name = (yyvsp[-3].text); - (yyval.func_fields)->bound_type.type = (yyvsp[-2].type); - (yyval.func_fields)->next = (yyvsp[0].func_fields); - } -#line 3037 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3046 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 91: -#line 711 "src/wast-parser.y" /* yacc.c:1646 */ +#line 650 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.func_fields) = new FuncField(); - (yyval.func_fields)->type = FuncFieldType::Exprs; - (yyval.func_fields)->first_expr = (yyvsp[0].expr_list).first; - (yyval.func_fields)->next = nullptr; + (yyval.module_fields) = (yyvsp[-1].module_fields); + ModuleField* main = (yyval.module_fields).first; + main->loc = (yylsp[-3]); + if (main->type == ModuleFieldType::Func) { + main->func->name = (yyvsp[-2].text); + } else { + assert(main->type == ModuleFieldType::Import); + main->import->func->name = (yyvsp[-2].text); + } } -#line 3048 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3062 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 92: -#line 717 "src/wast-parser.y" /* yacc.c:1646 */ +#line 664 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.func_fields) = new FuncField(); - (yyval.func_fields)->type = FuncFieldType::LocalTypes; - (yyval.func_fields)->types = (yyvsp[-2].types); - (yyval.func_fields)->next = (yyvsp[0].func_fields); + ModuleField* field = new ModuleField(ModuleFieldType::Func); + field->func = (yyvsp[0].func); + field->func->decl.has_func_type = true; + field->func->decl.type_var = (yyvsp[-1].var); + (yyval.module_fields).first = (yyval.module_fields).last = field; } -#line 3059 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3074 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 93: -#line 723 "src/wast-parser.y" /* yacc.c:1646 */ +#line 671 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.func_fields) = new FuncField(); - (yyval.func_fields)->type = FuncFieldType::BoundLocal; - (yyval.func_fields)->bound_type.loc = (yylsp[-4]); - (yyval.func_fields)->bound_type.name = (yyvsp[-3].text); - (yyval.func_fields)->bound_type.type = (yyvsp[-2].type); - (yyval.func_fields)->next = (yyvsp[0].func_fields); + ModuleField* field = new ModuleField(ModuleFieldType::Func); + field->func = (yyvsp[0].func); + (yyval.module_fields).first = (yyval.module_fields).last = field; } -#line 3072 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3084 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 94: -#line 733 "src/wast-parser.y" /* yacc.c:1646 */ +#line 676 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.func) = new Func(); - FuncField* field = (yyvsp[0].func_fields); - - while (field) { - FuncField* next = field->next; - switch (field->type) { - case FuncFieldType::Exprs: - (yyval.func)->first_expr = field->first_expr; - field->first_expr = nullptr; - break; - - case FuncFieldType::ParamTypes: - case FuncFieldType::LocalTypes: { - TypeVector& types = field->type == FuncFieldType::ParamTypes - ? (yyval.func)->decl.sig.param_types - : (yyval.func)->local_types; - types.insert(types.end(), field->types->begin(), - field->types->end()); - break; - } - - case FuncFieldType::BoundParam: - case FuncFieldType::BoundLocal: { - TypeVector* types; - BindingHash* bindings; - if (field->type == FuncFieldType::BoundParam) { - types = &(yyval.func)->decl.sig.param_types; - bindings = &(yyval.func)->param_bindings; - } else { - types = &(yyval.func)->local_types; - bindings = &(yyval.func)->local_bindings; - } - - types->push_back(field->bound_type.type); - bindings->emplace( - string_slice_to_string(field->bound_type.name), - Binding(field->bound_type.loc, types->size() - 1)); - break; - } - - case FuncFieldType::ResultTypes: - (yyval.func)->decl.sig.result_types = std::move(*field->types); - break; - } - - delete field; - field = next; - } + ModuleField* field = new ModuleField(ModuleFieldType::Import); + field->loc = (yylsp[-2]); + field->import = (yyvsp[-2].import); + field->import->kind = ExternalKind::Func; + field->import->func = (yyvsp[0].func); + field->import->func->decl.has_func_type = true; + field->import->func->decl.type_var = (yyvsp[-1].var); + (yyval.module_fields).first = (yyval.module_fields).last = field; } -#line 3127 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3099 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 95: -#line 785 "src/wast-parser.y" /* yacc.c:1646 */ +#line 686 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.exported_func) = new ExportedFunc(); - (yyval.exported_func)->func.reset((yyvsp[-1].func)); - (yyval.exported_func)->func->decl.has_func_type = true; - (yyval.exported_func)->func->decl.type_var = (yyvsp[-2].var); - (yyval.exported_func)->func->name = (yyvsp[-4].text); - (yyval.exported_func)->export_ = std::move(*(yyvsp[-3].optional_export)); - delete (yyvsp[-3].optional_export); + ModuleField* field = new ModuleField(ModuleFieldType::Import); + field->loc = (yylsp[-1]); + field->import = (yyvsp[-1].import); + field->import->kind = ExternalKind::Func; + field->import->func = (yyvsp[0].func); + (yyval.module_fields).first = (yyval.module_fields).last = field; } -#line 3141 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3112 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 96: -#line 795 "src/wast-parser.y" /* yacc.c:1646 */ +#line 694 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.exported_func) = new ExportedFunc(); - (yyval.exported_func)->func.reset((yyvsp[-1].func)); - (yyval.exported_func)->func->decl.has_func_type = true; - (yyval.exported_func)->func->decl.type_var = (yyvsp[-2].var); - (yyval.exported_func)->func->name = (yyvsp[-3].text); + ModuleField* field = new ModuleField(ModuleFieldType::Export); + field->loc = (yylsp[-1]); + field->export_ = (yyvsp[-1].export_); + field->export_->kind = ExternalKind::Func; + (yyval.module_fields).first = (yyvsp[0].module_fields).first; + (yyval.module_fields).last = (yyvsp[0].module_fields).last->next = field; } -#line 3153 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3125 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 97: -#line 802 "src/wast-parser.y" /* yacc.c:1646 */ +#line 705 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.exported_func) = new ExportedFunc(); - (yyval.exported_func)->func.reset((yyvsp[-1].func)); - (yyval.exported_func)->func->name = (yyvsp[-3].text); - (yyval.exported_func)->export_ = std::move(*(yyvsp[-2].optional_export)); - delete (yyvsp[-2].optional_export); + (yyval.func) = (yyvsp[0].func); + reverse_bindings(&(yyval.func)->decl.sig.param_types, &(yyval.func)->param_bindings); } -#line 3165 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3134 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 98: -#line 810 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.exported_func) = new ExportedFunc(); - (yyval.exported_func)->func.reset((yyvsp[-1].func)); - (yyval.exported_func)->func->name = (yyvsp[-2].text); - } -#line 3175 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 712 "src/wast-parser.y" /* yacc.c:1646 */ + { (yyval.func) = new Func(); } +#line 3140 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 99: -#line 820 "src/wast-parser.y" /* yacc.c:1646 */ +#line 713 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.expr_list) = (yyvsp[-1].expr_list); + (yyval.func) = new Func(); + (yyval.func)->decl.sig.result_types = std::move(*(yyvsp[-1].types)); + delete (yyvsp[-1].types); } -#line 3183 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3150 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 101: -#line 827 "src/wast-parser.y" /* yacc.c:1646 */ + case 100: +#line 718 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.elem_segment) = new ElemSegment(); - (yyval.elem_segment)->table_var = (yyvsp[-3].var); - (yyval.elem_segment)->offset = (yyvsp[-2].expr_list).first; - (yyval.elem_segment)->vars = std::move(*(yyvsp[-1].vars)); - delete (yyvsp[-1].vars); + (yyval.func) = (yyvsp[0].func); + (yyval.func)->decl.sig.param_types.insert((yyval.func)->decl.sig.param_types.begin(), + (yyvsp[-2].types)->begin(), (yyvsp[-2].types)->end()); + delete (yyvsp[-2].types); } -#line 3195 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3161 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 102: -#line 834 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.elem_segment) = new ElemSegment(); - (yyval.elem_segment)->table_var.loc = (yylsp[-3]); - (yyval.elem_segment)->table_var.type = VarType::Index; - (yyval.elem_segment)->table_var.index = 0; - (yyval.elem_segment)->offset = (yyvsp[-2].expr_list).first; - (yyval.elem_segment)->vars = std::move(*(yyvsp[-1].vars)); - delete (yyvsp[-1].vars); + case 101: +#line 724 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.func) = (yyvsp[0].func); + (yyval.func)->param_bindings.emplace(string_slice_to_string((yyvsp[-3].text)), + Binding((yylsp[-3]), (yyval.func)->decl.sig.param_types.size())); + destroy_string_slice(&(yyvsp[-3].text)); + (yyval.func)->decl.sig.param_types.insert((yyval.func)->decl.sig.param_types.begin(), (yyvsp[-2].type)); } -#line 3209 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3173 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 103: -#line 846 "src/wast-parser.y" /* yacc.c:1646 */ + case 102: +#line 734 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.exported_table) = new ExportedTable(); - (yyval.exported_table)->table.reset((yyvsp[-1].table)); - (yyval.exported_table)->table->name = (yyvsp[-3].text); - (yyval.exported_table)->has_elem_segment = false; - (yyval.exported_table)->export_ = std::move(*(yyvsp[-2].optional_export)); - delete (yyvsp[-2].optional_export); + (yyval.func) = (yyvsp[0].func); + reverse_bindings(&(yyval.func)->decl.sig.param_types, &(yyval.func)->param_bindings); } -#line 3222 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3182 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 104: -#line 855 "src/wast-parser.y" /* yacc.c:1646 */ +#line 742 "src/wast-parser.y" /* yacc.c:1646 */ { - Expr* expr = Expr::CreateConst(Const(Const::I32(), 0)); - expr->loc = (yylsp[-8]); - - (yyval.exported_table) = new ExportedTable(); - (yyval.exported_table)->table.reset(new Table()); - (yyval.exported_table)->table->name = (yyvsp[-7].text); - (yyval.exported_table)->table->elem_limits.initial = (yyvsp[-2].vars)->size(); - (yyval.exported_table)->table->elem_limits.max = (yyvsp[-2].vars)->size(); - (yyval.exported_table)->table->elem_limits.has_max = true; - (yyval.exported_table)->has_elem_segment = true; - (yyval.exported_table)->elem_segment.reset(new ElemSegment()); - (yyval.exported_table)->elem_segment->offset = expr; - (yyval.exported_table)->elem_segment->vars = std::move(*(yyvsp[-2].vars)); - delete (yyvsp[-2].vars); - (yyval.exported_table)->export_ = std::move(*(yyvsp[-6].optional_export)); - delete (yyvsp[-6].optional_export); + (yyval.func) = (yyvsp[0].func); + (yyval.func)->decl.sig.result_types = std::move(*(yyvsp[-2].types)); + delete (yyvsp[-2].types); } -#line 3245 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3192 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 105: -#line 876 "src/wast-parser.y" /* yacc.c:1646 */ +#line 747 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.data_segment) = new DataSegment(); - (yyval.data_segment)->memory_var = (yyvsp[-3].var); - (yyval.data_segment)->offset = (yyvsp[-2].expr_list).first; - dup_text_list(&(yyvsp[-1].text_list), &(yyval.data_segment)->data, &(yyval.data_segment)->size); - destroy_text_list(&(yyvsp[-1].text_list)); + (yyval.func) = (yyvsp[0].func); + (yyval.func)->decl.sig.param_types.insert((yyval.func)->decl.sig.param_types.begin(), + (yyvsp[-2].types)->begin(), (yyvsp[-2].types)->end()); + delete (yyvsp[-2].types); } -#line 3257 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3203 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 106: -#line 883 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.data_segment) = new DataSegment(); - (yyval.data_segment)->memory_var.loc = (yylsp[-3]); - (yyval.data_segment)->memory_var.type = VarType::Index; - (yyval.data_segment)->memory_var.index = 0; - (yyval.data_segment)->offset = (yyvsp[-2].expr_list).first; - dup_text_list(&(yyvsp[-1].text_list), &(yyval.data_segment)->data, &(yyval.data_segment)->size); - destroy_text_list(&(yyvsp[-1].text_list)); +#line 753 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.func) = (yyvsp[0].func); + (yyval.func)->param_bindings.emplace(string_slice_to_string((yyvsp[-3].text)), + Binding((yylsp[-3]), (yyval.func)->decl.sig.param_types.size())); + destroy_string_slice(&(yyvsp[-3].text)); + (yyval.func)->decl.sig.param_types.insert((yyval.func)->decl.sig.param_types.begin(), (yyvsp[-2].type)); } -#line 3271 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3215 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 107: -#line 895 "src/wast-parser.y" /* yacc.c:1646 */ +#line 763 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.exported_memory) = new ExportedMemory(); - (yyval.exported_memory)->memory.reset((yyvsp[-1].memory)); - (yyval.exported_memory)->memory->name = (yyvsp[-3].text); - (yyval.exported_memory)->has_data_segment = false; - (yyval.exported_memory)->export_ = std::move(*(yyvsp[-2].optional_export)); - delete (yyvsp[-2].optional_export); + (yyval.func) = (yyvsp[0].func); + reverse_bindings(&(yyval.func)->local_types, &(yyval.func)->local_bindings); } -#line 3284 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3224 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 108: -#line 903 "src/wast-parser.y" /* yacc.c:1646 */ - { - Expr* expr = Expr::CreateConst(Const(Const::I32(), 0)); - expr->loc = (yylsp[-7]); - - (yyval.exported_memory) = new ExportedMemory(); - (yyval.exported_memory)->has_data_segment = true; - (yyval.exported_memory)->data_segment.reset(new DataSegment()); - (yyval.exported_memory)->data_segment->offset = expr; - dup_text_list(&(yyvsp[-2].text_list), &(yyval.exported_memory)->data_segment->data, &(yyval.exported_memory)->data_segment->size); - destroy_text_list(&(yyvsp[-2].text_list)); - uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE((yyval.exported_memory)->data_segment->size); - uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size); - (yyval.exported_memory)->memory.reset(new Memory()); - (yyval.exported_memory)->memory->name = (yyvsp[-6].text); - (yyval.exported_memory)->memory->page_limits.initial = page_size; - (yyval.exported_memory)->memory->page_limits.max = page_size; - (yyval.exported_memory)->memory->page_limits.has_max = true; - (yyval.exported_memory)->export_ = std::move(*(yyvsp[-5].optional_export)); - delete (yyvsp[-5].optional_export); +#line 770 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.func) = new Func(); + (yyval.func)->first_expr = (yyvsp[0].expr_list).first; } -#line 3309 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3233 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 109: -#line 924 "src/wast-parser.y" /* yacc.c:1646 */ - { - Expr* expr = Expr::CreateConst(Const(Const::I32(), 0)); - expr->loc = (yylsp[-6]); - - (yyval.exported_memory) = new ExportedMemory(); - (yyval.exported_memory)->has_data_segment = true; - (yyval.exported_memory)->data_segment.reset(new DataSegment()); - (yyval.exported_memory)->data_segment->offset = expr; - dup_text_list(&(yyvsp[-2].text_list), &(yyval.exported_memory)->data_segment->data, &(yyval.exported_memory)->data_segment->size); - destroy_text_list(&(yyvsp[-2].text_list)); - uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE((yyval.exported_memory)->data_segment->size); - uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size); - (yyval.exported_memory)->memory.reset(new Memory()); - (yyval.exported_memory)->memory->name = (yyvsp[-5].text); - (yyval.exported_memory)->memory->page_limits.initial = page_size; - (yyval.exported_memory)->memory->page_limits.max = page_size; - (yyval.exported_memory)->memory->page_limits.has_max = true; - (yyval.exported_memory)->export_.has_export = false; +#line 774 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.func) = (yyvsp[0].func); + (yyval.func)->local_types.insert((yyval.func)->local_types.begin(), (yyvsp[-2].types)->begin(), (yyvsp[-2].types)->end()); + delete (yyvsp[-2].types); } -#line 3333 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3243 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 110: -#line 946 "src/wast-parser.y" /* yacc.c:1646 */ +#line 779 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.exported_global) = new ExportedGlobal(); - (yyval.exported_global)->global.reset((yyvsp[-2].global)); - (yyval.exported_global)->global->name = (yyvsp[-4].text); - (yyval.exported_global)->global->init_expr = (yyvsp[-1].expr_list).first; - (yyval.exported_global)->export_ = std::move(*(yyvsp[-3].optional_export)); - delete (yyvsp[-3].optional_export); + (yyval.func) = (yyvsp[0].func); + (yyval.func)->local_bindings.emplace(string_slice_to_string((yyvsp[-3].text)), + Binding((yylsp[-3]), (yyval.func)->local_types.size())); + destroy_string_slice(&(yyvsp[-3].text)); + (yyval.func)->local_types.insert((yyval.func)->local_types.begin(), (yyvsp[-2].type)); } -#line 3346 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3255 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 111: -#line 954 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.exported_global) = new ExportedGlobal(); - (yyval.exported_global)->global.reset((yyvsp[-2].global)); - (yyval.exported_global)->global->name = (yyvsp[-3].text); - (yyval.exported_global)->global->init_expr = (yyvsp[-1].expr_list).first; - (yyval.exported_global)->export_.has_export = false; - } -#line 3358 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ - break; - - case 112: -#line 967 "src/wast-parser.y" /* yacc.c:1646 */ +#line 791 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.import) = new Import(); - (yyval.import)->kind = ExternalKind::Func; - (yyval.import)->func = new Func(); - (yyval.import)->func->name = (yyvsp[-2].text); - (yyval.import)->func->decl.has_func_type = true; - (yyval.import)->func->decl.type_var = (yyvsp[-1].var); + (yyval.expr_list) = (yyvsp[-1].expr_list); } -#line 3371 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3263 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 113: -#line 975 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.import) = new Import(); - (yyval.import)->kind = ExternalKind::Func; - (yyval.import)->func = new Func(); - (yyval.import)->func->name = (yyvsp[-2].text); - (yyval.import)->func->decl.sig = std::move(*(yyvsp[-1].func_sig)); - delete (yyvsp[-1].func_sig); +#line 798 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.module_field) = new ModuleField(ModuleFieldType::ElemSegment); + (yyval.module_field)->loc = (yylsp[-4]); + (yyval.module_field)->elem_segment = new ElemSegment(); + (yyval.module_field)->elem_segment->table_var = (yyvsp[-3].var); + (yyval.module_field)->elem_segment->offset = (yyvsp[-2].expr_list).first; + (yyval.module_field)->elem_segment->vars = std::move(*(yyvsp[-1].vars)); + delete (yyvsp[-1].vars); } -#line 3384 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3277 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 114: -#line 983 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.import) = new Import(); - (yyval.import)->kind = ExternalKind::Table; - (yyval.import)->table = (yyvsp[-1].table); - (yyval.import)->table->name = (yyvsp[-2].text); +#line 807 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.module_field) = new ModuleField(ModuleFieldType::ElemSegment); + (yyval.module_field)->loc = (yylsp[-3]); + (yyval.module_field)->elem_segment = new ElemSegment(); + (yyval.module_field)->elem_segment->table_var.loc = (yylsp[-3]); + (yyval.module_field)->elem_segment->table_var.type = VarType::Index; + (yyval.module_field)->elem_segment->table_var.index = 0; + (yyval.module_field)->elem_segment->offset = (yyvsp[-2].expr_list).first; + (yyval.module_field)->elem_segment->vars = std::move(*(yyvsp[-1].vars)); + delete (yyvsp[-1].vars); } -#line 3395 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3293 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 115: -#line 989 "src/wast-parser.y" /* yacc.c:1646 */ +#line 821 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.import) = new Import(); - (yyval.import)->kind = ExternalKind::Memory; - (yyval.import)->memory = (yyvsp[-1].memory); - (yyval.import)->memory->name = (yyvsp[-2].text); + (yyval.module_fields) = (yyvsp[-1].module_fields); + ModuleField* main = (yyval.module_fields).first; + main->loc = (yylsp[-3]); + if (main->type == ModuleFieldType::Table) { + main->table->name = (yyvsp[-2].text); + } else { + assert(main->type == ModuleFieldType::Import); + main->import->table->name = (yyvsp[-2].text); + } } -#line 3406 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3309 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 116: -#line 995 "src/wast-parser.y" /* yacc.c:1646 */ +#line 835 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.import) = new Import(); - (yyval.import)->kind = ExternalKind::Global; - (yyval.import)->global = (yyvsp[-1].global); - (yyval.import)->global->name = (yyvsp[-2].text); + ModuleField* field = new ModuleField(ModuleFieldType::Table); + field->loc = (yylsp[0]); + field->table = (yyvsp[0].table); + (yyval.module_fields).first = (yyval.module_fields).last = field; } -#line 3417 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3320 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 117: -#line 1003 "src/wast-parser.y" /* yacc.c:1646 */ +#line 841 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.import) = (yyvsp[-1].import); - (yyval.import)->module_name = (yyvsp[-3].text); - (yyval.import)->field_name = (yyvsp[-2].text); + ModuleField* field = new ModuleField(ModuleFieldType::Import); + field->loc = (yylsp[-1]); + field->import = (yyvsp[-1].import); + field->import->kind = ExternalKind::Table; + field->import->table = (yyvsp[0].table); + (yyval.module_fields).first = (yyval.module_fields).last = field; } -#line 3427 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3333 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 118: -#line 1008 "src/wast-parser.y" /* yacc.c:1646 */ +#line 849 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.import) = (yyvsp[-2].import); - (yyval.import)->kind = ExternalKind::Func; - (yyval.import)->func = new Func(); - (yyval.import)->func->name = (yyvsp[-3].text); - (yyval.import)->func->decl.has_func_type = true; - (yyval.import)->func->decl.type_var = (yyvsp[-1].var); + ModuleField* field = new ModuleField(ModuleFieldType::Export); + field->loc = (yylsp[-1]); + field->export_ = (yyvsp[-1].export_); + field->export_->kind = ExternalKind::Table; + (yyval.module_fields).first = (yyvsp[0].module_fields).first; + (yyval.module_fields).last = (yyvsp[0].module_fields).last->next = field; } -#line 3440 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3346 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 119: -#line 1016 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.import) = (yyvsp[-2].import); - (yyval.import)->kind = ExternalKind::Func; - (yyval.import)->func = new Func(); - (yyval.import)->func->name = (yyvsp[-3].text); - (yyval.import)->func->decl.sig = std::move(*(yyvsp[-1].func_sig)); - delete (yyvsp[-1].func_sig); +#line 857 "src/wast-parser.y" /* yacc.c:1646 */ + { + ModuleField* table_field = new ModuleField(ModuleFieldType::Table); + Table* table = table_field->table = new Table(); + table->elem_limits.initial = (yyvsp[-1].vars)->size(); + table->elem_limits.max = (yyvsp[-1].vars)->size(); + table->elem_limits.has_max = true; + ModuleField* elem_field = new ModuleField(ModuleFieldType::ElemSegment); + elem_field->loc = (yylsp[-2]); + ElemSegment* elem_segment = elem_field->elem_segment = new ElemSegment(); + elem_segment->offset = Expr::CreateConst(Const(Const::I32(), 0)); + elem_segment->offset->loc = (yylsp[-2]); + elem_segment->vars = std::move(*(yyvsp[-1].vars)); + delete (yyvsp[-1].vars); + (yyval.module_fields).first = table_field; + (yyval.module_fields).last = table_field->next = elem_field; } -#line 3453 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3367 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 120: -#line 1024 "src/wast-parser.y" /* yacc.c:1646 */ +#line 876 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.import) = (yyvsp[-2].import); - (yyval.import)->kind = ExternalKind::Table; - (yyval.import)->table = (yyvsp[-1].table); - (yyval.import)->table->name = (yyvsp[-3].text); + (yyval.module_field) = new ModuleField(ModuleFieldType::DataSegment); + (yyval.module_field)->loc = (yylsp[-4]); + (yyval.module_field)->data_segment = new DataSegment(); + (yyval.module_field)->data_segment->memory_var = (yyvsp[-3].var); + (yyval.module_field)->data_segment->offset = (yyvsp[-2].expr_list).first; + dup_text_list(&(yyvsp[-1].text_list), &(yyval.module_field)->data_segment->data, &(yyval.module_field)->data_segment->size); + destroy_text_list(&(yyvsp[-1].text_list)); } -#line 3464 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3381 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 121: -#line 1030 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.import) = (yyvsp[-2].import); - (yyval.import)->kind = ExternalKind::Memory; - (yyval.import)->memory = (yyvsp[-1].memory); - (yyval.import)->memory->name = (yyvsp[-3].text); +#line 885 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.module_field) = new ModuleField(ModuleFieldType::DataSegment); + (yyval.module_field)->loc = (yylsp[-3]); + (yyval.module_field)->data_segment = new DataSegment(); + (yyval.module_field)->data_segment->memory_var.loc = (yylsp[-3]); + (yyval.module_field)->data_segment->memory_var.type = VarType::Index; + (yyval.module_field)->data_segment->memory_var.index = 0; + (yyval.module_field)->data_segment->offset = (yyvsp[-2].expr_list).first; + dup_text_list(&(yyvsp[-1].text_list), &(yyval.module_field)->data_segment->data, &(yyval.module_field)->data_segment->size); + destroy_text_list(&(yyvsp[-1].text_list)); } -#line 3475 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3397 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 122: -#line 1036 "src/wast-parser.y" /* yacc.c:1646 */ +#line 899 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.import) = (yyvsp[-2].import); - (yyval.import)->kind = ExternalKind::Global; - (yyval.import)->global = (yyvsp[-1].global); - (yyval.import)->global->name = (yyvsp[-3].text); + (yyval.module_fields) = (yyvsp[-1].module_fields); + ModuleField* main = (yyval.module_fields).first; + main->loc = (yylsp[-3]); + if (main->type == ModuleFieldType::Memory) { + main->memory->name = (yyvsp[-2].text); + } else { + assert(main->type == ModuleFieldType::Import); + main->import->memory->name = (yyvsp[-2].text); + } } -#line 3486 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3413 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 123: -#line 1045 "src/wast-parser.y" /* yacc.c:1646 */ +#line 913 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.import) = new Import(); - (yyval.import)->module_name = (yyvsp[-2].text); - (yyval.import)->field_name = (yyvsp[-1].text); + ModuleField* field = new ModuleField(ModuleFieldType::Memory); + field->memory = (yyvsp[0].memory); + (yyval.module_fields).first = (yyval.module_fields).last = field; } -#line 3496 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3423 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 124: -#line 1053 "src/wast-parser.y" /* yacc.c:1646 */ +#line 918 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.export_) = new Export(); - (yyval.export_)->kind = ExternalKind::Func; - (yyval.export_)->var = (yyvsp[-1].var); + ModuleField* field = new ModuleField(ModuleFieldType::Import); + field->loc = (yylsp[-1]); + field->import = (yyvsp[-1].import); + field->import->kind = ExternalKind::Memory; + field->import->memory = (yyvsp[0].memory); + (yyval.module_fields).first = (yyval.module_fields).last = field; } -#line 3506 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3436 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 125: -#line 1058 "src/wast-parser.y" /* yacc.c:1646 */ +#line 926 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.export_) = new Export(); - (yyval.export_)->kind = ExternalKind::Table; - (yyval.export_)->var = (yyvsp[-1].var); + ModuleField* field = new ModuleField(ModuleFieldType::Export); + field->loc = (yylsp[-1]); + field->export_ = (yyvsp[-1].export_); + field->export_->kind = ExternalKind::Memory; + (yyval.module_fields).first = (yyvsp[0].module_fields).first; + (yyval.module_fields).last = (yyvsp[0].module_fields).last->next = field; } -#line 3516 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3449 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 126: -#line 1063 "src/wast-parser.y" /* yacc.c:1646 */ - { - (yyval.export_) = new Export(); - (yyval.export_)->kind = ExternalKind::Memory; - (yyval.export_)->var = (yyvsp[-1].var); +#line 934 "src/wast-parser.y" /* yacc.c:1646 */ + { + ModuleField* data_field = new ModuleField(ModuleFieldType::DataSegment); + data_field->loc = (yylsp[-2]); + DataSegment* data_segment = data_field->data_segment = new DataSegment(); + data_segment->offset = Expr::CreateConst(Const(Const::I32(), 0)); + data_segment->offset->loc = (yylsp[-2]); + dup_text_list(&(yyvsp[-1].text_list), &data_segment->data, &data_segment->size); + destroy_text_list(&(yyvsp[-1].text_list)); + uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE(data_segment->size); + uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size); + + ModuleField* memory_field = new ModuleField(ModuleFieldType::Memory); + memory_field->loc = (yylsp[-2]); + Memory* memory = memory_field->memory = new Memory(); + memory->page_limits.initial = page_size; + memory->page_limits.max = page_size; + memory->page_limits.has_max = true; + (yyval.module_fields).first = memory_field; + (yyval.module_fields).last = memory_field->next = data_field; } -#line 3526 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3474 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 127: -#line 1068 "src/wast-parser.y" /* yacc.c:1646 */ +#line 957 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.export_) = new Export(); - (yyval.export_)->kind = ExternalKind::Global; - (yyval.export_)->var = (yyvsp[-1].var); + (yyval.module_fields) = (yyvsp[-1].module_fields); + ModuleField* main = (yyval.module_fields).first; + main->loc = (yylsp[-3]); + if (main->type == ModuleFieldType::Global) { + main->global->name = (yyvsp[-2].text); + } else { + assert(main->type == ModuleFieldType::Import); + main->import->global->name = (yyvsp[-2].text); + } } -#line 3536 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3490 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 128: -#line 1075 "src/wast-parser.y" /* yacc.c:1646 */ +#line 971 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.export_) = (yyvsp[-1].export_); - (yyval.export_)->name = (yyvsp[-2].text); + ModuleField* field = new ModuleField(ModuleFieldType::Global); + field->global = (yyvsp[-1].global); + field->global->init_expr = (yyvsp[0].expr_list).first; + (yyval.module_fields).first = (yyval.module_fields).last = field; } -#line 3545 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3501 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 129: -#line 1082 "src/wast-parser.y" /* yacc.c:1646 */ +#line 977 "src/wast-parser.y" /* yacc.c:1646 */ + { + ModuleField* field = new ModuleField(ModuleFieldType::Import); + field->loc = (yylsp[-1]); + field->import = (yyvsp[-1].import); + field->import->kind = ExternalKind::Global; + field->import->global = (yyvsp[0].global); + (yyval.module_fields).first = (yyval.module_fields).last = field; + } +#line 3514 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 130: +#line 985 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.optional_export) = new OptionalExport(); - (yyval.optional_export)->has_export = false; + ModuleField* field = new ModuleField(ModuleFieldType::Export); + field->loc = (yylsp[-1]); + field->export_ = (yyvsp[-1].export_); + field->export_->kind = ExternalKind::Global; + (yyval.module_fields).first = (yyvsp[0].module_fields).first; + (yyval.module_fields).last = (yyvsp[0].module_fields).last->next = field; } -#line 3554 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3527 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 131: -#line 1089 "src/wast-parser.y" /* yacc.c:1646 */ +#line 998 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.optional_export) = new OptionalExport(); - (yyval.optional_export)->has_export = true; - (yyval.optional_export)->export_.reset(new Export()); - (yyval.optional_export)->export_->name = (yyvsp[-1].text); + (yyval.import) = new Import(); + (yyval.import)->kind = ExternalKind::Func; + (yyval.import)->func = new Func(); + (yyval.import)->func->name = (yyvsp[-2].text); + (yyval.import)->func->decl.has_func_type = true; + (yyval.import)->func->decl.type_var = (yyvsp[-1].var); } -#line 3565 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3540 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 132: -#line 1101 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1006 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.func_type) = new FuncType(); - (yyval.func_type)->sig = std::move(*(yyvsp[-1].func_sig)); + (yyval.import) = new Import(); + (yyval.import)->kind = ExternalKind::Func; + (yyval.import)->func = new Func(); + (yyval.import)->func->name = (yyvsp[-2].text); + (yyval.import)->func->decl.sig = std::move(*(yyvsp[-1].func_sig)); delete (yyvsp[-1].func_sig); } -#line 3575 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3553 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 133: -#line 1106 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1014 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.func_type) = new FuncType(); - (yyval.func_type)->name = (yyvsp[-2].text); - (yyval.func_type)->sig = std::move(*(yyvsp[-1].func_sig)); - delete (yyvsp[-1].func_sig); + (yyval.import) = new Import(); + (yyval.import)->kind = ExternalKind::Table; + (yyval.import)->table = (yyvsp[-1].table); + (yyval.import)->table->name = (yyvsp[-2].text); } -#line 3586 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3564 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 134: -#line 1115 "src/wast-parser.y" /* yacc.c:1646 */ - { (yyval.var) = (yyvsp[-1].var); } -#line 3592 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 1020 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.import) = new Import(); + (yyval.import)->kind = ExternalKind::Memory; + (yyval.import)->memory = (yyvsp[-1].memory); + (yyval.import)->memory->name = (yyvsp[-2].text); + } +#line 3575 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 135: -#line 1119 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1026 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.module) = new Module(); + (yyval.import) = new Import(); + (yyval.import)->kind = ExternalKind::Global; + (yyval.import)->global = (yyvsp[-1].global); + (yyval.import)->global->name = (yyvsp[-2].text); } -#line 3600 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3586 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 136: -#line 1122 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1035 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.module) = (yyvsp[-1].module); - ModuleField* field; - APPEND_FIELD_TO_LIST((yyval.module), field, FuncType, func_type, (yylsp[0]), (yyvsp[0].func_type)); - APPEND_ITEM_TO_VECTOR((yyval.module), func_types, field->func_type); - INSERT_BINDING((yyval.module), func_type, func_types, (yylsp[0]), (yyvsp[0].func_type)->name); + (yyval.module_field) = new ModuleField(ModuleFieldType::Import); + (yyval.module_field)->loc = (yylsp[-4]); + (yyval.module_field)->import = (yyvsp[-1].import); + (yyval.module_field)->import->module_name = (yyvsp[-3].text); + (yyval.module_field)->import->field_name = (yyvsp[-2].text); } -#line 3612 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3598 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 137: -#line 1129 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1045 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.module) = (yyvsp[-1].module); - ModuleField* field; - APPEND_FIELD_TO_LIST((yyval.module), field, Global, global, (yylsp[0]), (yyvsp[0].exported_global)->global.release()); - APPEND_ITEM_TO_VECTOR((yyval.module), globals, field->global); - INSERT_BINDING((yyval.module), global, globals, (yylsp[0]), field->global->name); - APPEND_INLINE_EXPORT((yyval.module), Global, (yylsp[0]), (yyvsp[0].exported_global), (yyval.module)->globals.size() - 1); - delete (yyvsp[0].exported_global); + (yyval.import) = new Import(); + (yyval.import)->module_name = (yyvsp[-2].text); + (yyval.import)->field_name = (yyvsp[-1].text); } -#line 3626 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3608 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 138: -#line 1138 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1053 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.module) = (yyvsp[-1].module); - ModuleField* field; - APPEND_FIELD_TO_LIST((yyval.module), field, Table, table, (yylsp[0]), (yyvsp[0].exported_table)->table.release()); - APPEND_ITEM_TO_VECTOR((yyval.module), tables, field->table); - INSERT_BINDING((yyval.module), table, tables, (yylsp[0]), field->table->name); - APPEND_INLINE_EXPORT((yyval.module), Table, (yylsp[0]), (yyvsp[0].exported_table), (yyval.module)->tables.size() - 1); - - if ((yyvsp[0].exported_table)->has_elem_segment) { - ModuleField* elem_segment_field; - APPEND_FIELD_TO_LIST((yyval.module), elem_segment_field, ElemSegment, elem_segment, - (yylsp[0]), (yyvsp[0].exported_table)->elem_segment.release()); - APPEND_ITEM_TO_VECTOR((yyval.module), elem_segments, - elem_segment_field->elem_segment); - } - delete (yyvsp[0].exported_table); + (yyval.export_) = new Export(); + (yyval.export_)->kind = ExternalKind::Func; + (yyval.export_)->var = (yyvsp[-1].var); } -#line 3648 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3618 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 139: -#line 1155 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1058 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.module) = (yyvsp[-1].module); - ModuleField* field; - APPEND_FIELD_TO_LIST((yyval.module), field, Memory, memory, (yylsp[0]), (yyvsp[0].exported_memory)->memory.release()); - APPEND_ITEM_TO_VECTOR((yyval.module), memories, field->memory); - INSERT_BINDING((yyval.module), memory, memories, (yylsp[0]), field->memory->name); - APPEND_INLINE_EXPORT((yyval.module), Memory, (yylsp[0]), (yyvsp[0].exported_memory), (yyval.module)->memories.size() - 1); - - if ((yyvsp[0].exported_memory)->has_data_segment) { - ModuleField* data_segment_field; - APPEND_FIELD_TO_LIST((yyval.module), data_segment_field, DataSegment, data_segment, - (yylsp[0]), (yyvsp[0].exported_memory)->data_segment.release()); - APPEND_ITEM_TO_VECTOR((yyval.module), data_segments, - data_segment_field->data_segment); - } - delete (yyvsp[0].exported_memory); + (yyval.export_) = new Export(); + (yyval.export_)->kind = ExternalKind::Table; + (yyval.export_)->var = (yyvsp[-1].var); } -#line 3670 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3628 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 140: -#line 1172 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1063 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.module) = (yyvsp[-1].module); - ModuleField* field; - // Append the implicit func declaration first so it occurs before the - // func definition when serialized out to the text format. - append_implicit_func_declaration(&(yylsp[0]), (yyval.module), &(yyvsp[0].exported_func)->func->decl); - APPEND_FIELD_TO_LIST((yyval.module), field, Func, func, (yylsp[0]), (yyvsp[0].exported_func)->func.release()); - APPEND_ITEM_TO_VECTOR((yyval.module), funcs, field->func); - INSERT_BINDING((yyval.module), func, funcs, (yylsp[0]), field->func->name); - APPEND_INLINE_EXPORT((yyval.module), Func, (yylsp[0]), (yyvsp[0].exported_func), (yyval.module)->funcs.size() - 1); - delete (yyvsp[0].exported_func); + (yyval.export_) = new Export(); + (yyval.export_)->kind = ExternalKind::Memory; + (yyval.export_)->var = (yyvsp[-1].var); } -#line 3687 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3638 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 141: -#line 1184 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1068 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.module) = (yyvsp[-1].module); - ModuleField* field; - APPEND_FIELD_TO_LIST((yyval.module), field, ElemSegment, elem_segment, (yylsp[0]), (yyvsp[0].elem_segment)); - APPEND_ITEM_TO_VECTOR((yyval.module), elem_segments, field->elem_segment); + (yyval.export_) = new Export(); + (yyval.export_)->kind = ExternalKind::Global; + (yyval.export_)->var = (yyvsp[-1].var); } -#line 3698 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3648 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 142: -#line 1190 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1075 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.module) = (yyvsp[-1].module); - ModuleField* field; - APPEND_FIELD_TO_LIST((yyval.module), field, DataSegment, data_segment, (yylsp[0]), (yyvsp[0].data_segment)); - APPEND_ITEM_TO_VECTOR((yyval.module), data_segments, field->data_segment); + (yyval.module_field) = new ModuleField(ModuleFieldType::Export); + (yyval.module_field)->loc = (yylsp[-3]); + (yyval.module_field)->export_ = (yyvsp[-1].export_); + (yyval.module_field)->export_->name = (yyvsp[-2].text); } -#line 3709 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3659 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 143: -#line 1196 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1084 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.module) = (yyvsp[-1].module); - ModuleField* field; - APPEND_FIELD_TO_LIST((yyval.module), field, Start, start, (yylsp[0]), (yyvsp[0].var)); - (yyval.module)->start = &field->start; + (yyval.export_) = new Export(); + (yyval.export_)->name = (yyvsp[-1].text); } -#line 3720 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3668 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 144: -#line 1202 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1094 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.module) = (yyvsp[-1].module); - ModuleField* field; - APPEND_FIELD_TO_LIST((yyval.module), field, Import, import, (yylsp[0]), (yyvsp[0].import)); - CHECK_IMPORT_ORDERING((yyval.module), func, funcs, (yylsp[0])); - CHECK_IMPORT_ORDERING((yyval.module), table, tables, (yylsp[0])); - CHECK_IMPORT_ORDERING((yyval.module), memory, memories, (yylsp[0])); - CHECK_IMPORT_ORDERING((yyval.module), global, globals, (yylsp[0])); - switch ((yyvsp[0].import)->kind) { - case ExternalKind::Func: - append_implicit_func_declaration(&(yylsp[0]), (yyval.module), &field->import->func->decl); - APPEND_ITEM_TO_VECTOR((yyval.module), funcs, field->import->func); - INSERT_BINDING((yyval.module), func, funcs, (yylsp[0]), field->import->func->name); - (yyval.module)->num_func_imports++; - break; - case ExternalKind::Table: - APPEND_ITEM_TO_VECTOR((yyval.module), tables, field->import->table); - INSERT_BINDING((yyval.module), table, tables, (yylsp[0]), field->import->table->name); - (yyval.module)->num_table_imports++; - break; - case ExternalKind::Memory: - APPEND_ITEM_TO_VECTOR((yyval.module), memories, field->import->memory); - INSERT_BINDING((yyval.module), memory, memories, (yylsp[0]), field->import->memory->name); - (yyval.module)->num_memory_imports++; - break; - case ExternalKind::Global: - APPEND_ITEM_TO_VECTOR((yyval.module), globals, field->import->global); - INSERT_BINDING((yyval.module), global, globals, (yylsp[0]), field->import->global->name); - (yyval.module)->num_global_imports++; - break; - } - APPEND_ITEM_TO_VECTOR((yyval.module), imports, field->import); + (yyval.module_field) = new ModuleField(ModuleFieldType::FuncType); + (yyval.module_field)->loc = (yylsp[-2]); + (yyval.module_field)->func_type = new FuncType(); + (yyval.module_field)->func_type->sig = std::move(*(yyvsp[-1].func_sig)); + delete (yyvsp[-1].func_sig); } -#line 3758 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3680 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 145: -#line 1235 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1101 "src/wast-parser.y" /* yacc.c:1646 */ { - (yyval.module) = (yyvsp[-1].module); - ModuleField* field; - APPEND_FIELD_TO_LIST((yyval.module), field, Export, export_, (yylsp[0]), (yyvsp[0].export_)); - APPEND_ITEM_TO_VECTOR((yyval.module), exports, field->export_); - INSERT_BINDING((yyval.module), export, exports, (yylsp[0]), field->export_->name); + (yyval.module_field) = new ModuleField(ModuleFieldType::FuncType); + (yyval.module_field)->loc = (yylsp[-3]); + (yyval.module_field)->func_type = new FuncType(); + (yyval.module_field)->func_type->name = (yyvsp[-2].text); + (yyval.module_field)->func_type->sig = std::move(*(yyvsp[-1].func_sig)); + delete (yyvsp[-1].func_sig); } -#line 3770 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3693 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; case 146: -#line 1245 "src/wast-parser.y" /* yacc.c:1646 */ +#line 1112 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.module_field) = new ModuleField(ModuleFieldType::Start); + (yyval.module_field)->loc = (yylsp[-2]); + (yyval.module_field)->start = (yyvsp[-1].var); + } +#line 3703 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 147: +#line 1120 "src/wast-parser.y" /* yacc.c:1646 */ + { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); } +#line 3709 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 152: +#line 1125 "src/wast-parser.y" /* yacc.c:1646 */ + { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); } +#line 3715 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 153: +#line 1126 "src/wast-parser.y" /* yacc.c:1646 */ + { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); } +#line 3721 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 154: +#line 1127 "src/wast-parser.y" /* yacc.c:1646 */ + { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); } +#line 3727 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 155: +#line 1128 "src/wast-parser.y" /* yacc.c:1646 */ + { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); } +#line 3733 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 156: +#line 1129 "src/wast-parser.y" /* yacc.c:1646 */ + { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); } +#line 3739 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 157: +#line 1133 "src/wast-parser.y" /* yacc.c:1646 */ + { (yyval.module) = new Module(); } +#line 3745 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 159: +#line 1138 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.module) = new Module(); + check_import_ordering(&(yylsp[0]), lexer, parser, (yyval.module), (yyvsp[0].module_fields).first); + append_module_fields((yyval.module), (yyvsp[0].module_fields).first); + } +#line 3755 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 160: +#line 1143 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.module) = (yyvsp[-1].module); + check_import_ordering(&(yylsp[0]), lexer, parser, (yyval.module), (yyvsp[0].module_fields).first); + append_module_fields((yyval.module), (yyvsp[0].module_fields).first); + } +#line 3765 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 161: +#line 1151 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.raw_module) = new RawModule(); (yyval.raw_module)->type = RawModuleType::Text; @@ -3791,11 +3786,11 @@ yyreduce: } } } -#line 3795 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3790 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 147: -#line 1265 "src/wast-parser.y" /* yacc.c:1646 */ + case 162: +#line 1171 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.raw_module) = new RawModule(); (yyval.raw_module)->type = RawModuleType::Binary; @@ -3804,11 +3799,11 @@ yyreduce: dup_text_list(&(yyvsp[-1].text_list), &(yyval.raw_module)->binary.data, &(yyval.raw_module)->binary.size); destroy_text_list(&(yyvsp[-1].text_list)); } -#line 3808 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3803 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 148: -#line 1276 "src/wast-parser.y" /* yacc.c:1646 */ + case 163: +#line 1182 "src/wast-parser.y" /* yacc.c:1646 */ { if ((yyvsp[0].raw_module)->type == RawModuleType::Text) { (yyval.module) = (yyvsp[0].raw_module)->text; @@ -3826,31 +3821,31 @@ yyreduce: } delete (yyvsp[0].raw_module); } -#line 3830 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3825 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 149: -#line 1298 "src/wast-parser.y" /* yacc.c:1646 */ + case 165: +#line 1209 "src/wast-parser.y" /* yacc.c:1646 */ { WABT_ZERO_MEMORY((yyval.var)); (yyval.var).type = VarType::Index; (yyval.var).index = kInvalidIndex; } -#line 3840 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3835 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 150: -#line 1303 "src/wast-parser.y" /* yacc.c:1646 */ + case 166: +#line 1214 "src/wast-parser.y" /* yacc.c:1646 */ { WABT_ZERO_MEMORY((yyval.var)); (yyval.var).type = VarType::Name; DUPTEXT((yyval.var).name, (yyvsp[0].text)); } -#line 3850 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3845 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 151: -#line 1311 "src/wast-parser.y" /* yacc.c:1646 */ + case 167: +#line 1222 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.action) = new Action(); (yyval.action)->loc = (yylsp[-4]); @@ -3861,11 +3856,11 @@ yyreduce: (yyval.action)->invoke->args = std::move(*(yyvsp[-1].consts)); delete (yyvsp[-1].consts); } -#line 3865 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3860 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 152: -#line 1321 "src/wast-parser.y" /* yacc.c:1646 */ + case 168: +#line 1232 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.action) = new Action(); (yyval.action)->loc = (yylsp[-3]); @@ -3873,128 +3868,128 @@ yyreduce: (yyval.action)->type = ActionType::Get; (yyval.action)->name = (yyvsp[-1].text); } -#line 3877 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3872 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 153: -#line 1331 "src/wast-parser.y" /* yacc.c:1646 */ + case 169: +#line 1242 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::AssertMalformed; (yyval.command)->assert_malformed.module = (yyvsp[-2].raw_module); (yyval.command)->assert_malformed.text = (yyvsp[-1].text); } -#line 3888 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3883 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 154: -#line 1337 "src/wast-parser.y" /* yacc.c:1646 */ + case 170: +#line 1248 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::AssertInvalid; (yyval.command)->assert_invalid.module = (yyvsp[-2].raw_module); (yyval.command)->assert_invalid.text = (yyvsp[-1].text); } -#line 3899 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3894 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 155: -#line 1343 "src/wast-parser.y" /* yacc.c:1646 */ + case 171: +#line 1254 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::AssertUnlinkable; (yyval.command)->assert_unlinkable.module = (yyvsp[-2].raw_module); (yyval.command)->assert_unlinkable.text = (yyvsp[-1].text); } -#line 3910 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3905 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 156: -#line 1349 "src/wast-parser.y" /* yacc.c:1646 */ + case 172: +#line 1260 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::AssertUninstantiable; (yyval.command)->assert_uninstantiable.module = (yyvsp[-2].raw_module); (yyval.command)->assert_uninstantiable.text = (yyvsp[-1].text); } -#line 3921 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3916 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 157: -#line 1355 "src/wast-parser.y" /* yacc.c:1646 */ + case 173: +#line 1266 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::AssertReturn; (yyval.command)->assert_return.action = (yyvsp[-2].action); (yyval.command)->assert_return.expected = (yyvsp[-1].consts); } -#line 3932 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3927 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 158: -#line 1361 "src/wast-parser.y" /* yacc.c:1646 */ + case 174: +#line 1272 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::AssertReturnCanonicalNan; (yyval.command)->assert_return_canonical_nan.action = (yyvsp[-1].action); } -#line 3942 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3937 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 159: -#line 1366 "src/wast-parser.y" /* yacc.c:1646 */ + case 175: +#line 1277 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::AssertReturnArithmeticNan; (yyval.command)->assert_return_arithmetic_nan.action = (yyvsp[-1].action); } -#line 3952 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3947 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 160: -#line 1371 "src/wast-parser.y" /* yacc.c:1646 */ + case 176: +#line 1282 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::AssertTrap; (yyval.command)->assert_trap.action = (yyvsp[-2].action); (yyval.command)->assert_trap.text = (yyvsp[-1].text); } -#line 3963 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3958 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 161: -#line 1377 "src/wast-parser.y" /* yacc.c:1646 */ + case 177: +#line 1288 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::AssertExhaustion; (yyval.command)->assert_trap.action = (yyvsp[-2].action); (yyval.command)->assert_trap.text = (yyvsp[-1].text); } -#line 3974 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3969 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 162: -#line 1386 "src/wast-parser.y" /* yacc.c:1646 */ + case 178: +#line 1297 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::Action; (yyval.command)->action = (yyvsp[0].action); } -#line 3984 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3979 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 164: -#line 1392 "src/wast-parser.y" /* yacc.c:1646 */ + case 180: +#line 1303 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::Module; (yyval.command)->module = (yyvsp[0].module); } -#line 3994 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 3989 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 165: -#line 1397 "src/wast-parser.y" /* yacc.c:1646 */ + case 181: +#line 1308 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new Command(); (yyval.command)->type = CommandType::Register; @@ -4002,26 +3997,29 @@ yyreduce: (yyval.command)->register_.var = (yyvsp[-1].var); (yyval.command)->register_.var.loc = (yylsp[-1]); } -#line 4006 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 4001 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 166: -#line 1406 "src/wast-parser.y" /* yacc.c:1646 */ - { (yyval.commands) = new CommandPtrVector(); } -#line 4012 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + case 182: +#line 1317 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.commands) = new CommandPtrVector(); + (yyval.commands)->emplace_back((yyvsp[0].command)); + } +#line 4010 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 167: -#line 1407 "src/wast-parser.y" /* yacc.c:1646 */ + case 183: +#line 1321 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.commands) = (yyvsp[-1].commands); (yyval.commands)->emplace_back((yyvsp[0].command)); } -#line 4021 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 4019 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 168: -#line 1414 "src/wast-parser.y" /* yacc.c:1646 */ + case 184: +#line 1328 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.const_).loc = (yylsp[-2]); if (WABT_FAILED(parse_const((yyvsp[-2].type), (yyvsp[-1].literal).type, (yyvsp[-1].literal).text.start, @@ -4032,26 +4030,34 @@ yyreduce: } delete [] (yyvsp[-1].literal).text.start; } -#line 4036 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 4034 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 169: -#line 1426 "src/wast-parser.y" /* yacc.c:1646 */ + case 185: +#line 1340 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.consts) = new ConstVector(); } -#line 4042 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 4040 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 170: -#line 1427 "src/wast-parser.y" /* yacc.c:1646 */ + case 186: +#line 1341 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.consts) = (yyvsp[-1].consts); (yyval.consts)->push_back((yyvsp[0].const_)); } -#line 4051 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 4049 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; - case 171: -#line 1434 "src/wast-parser.y" /* yacc.c:1646 */ + case 187: +#line 1348 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.script) = new Script(); + } +#line 4057 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 188: +#line 1351 "src/wast-parser.y" /* yacc.c:1646 */ { (yyval.script) = new Script(); (yyval.script)->commands = std::move(*(yyvsp[0].commands)); @@ -4111,13 +4117,30 @@ yyreduce: break; } } - parser->script = (yyval.script); } -#line 4117 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ +#line 4122 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; + + case 189: +#line 1411 "src/wast-parser.y" /* yacc.c:1646 */ + { + (yyval.script) = new Script(); + Command* command = new Command(); + command->type = CommandType::Module; + command->module = (yyvsp[0].module); + (yyval.script)->commands.emplace_back(command); + } +#line 4134 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ break; + case 190: +#line 1423 "src/wast-parser.y" /* yacc.c:1646 */ + { parser->script = (yyvsp[0].script); } +#line 4140 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + break; -#line 4121 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ + +#line 4144 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4352,7 +4375,7 @@ yyreturn: #endif return yyresult; } -#line 1503 "src/wast-parser.y" /* yacc.c:1906 */ +#line 1426 "src/wast-parser.y" /* yacc.c:1906 */ void append_expr_list(ExprList* expr_list, ExprList* expr) { @@ -4427,6 +4450,9 @@ size_t copy_string_contents(StringSlice* text, char* dest) { case 'n': *dest++ = '\n'; break; + case 'r': + *dest++ = '\r'; + break; case 't': *dest++ = '\t'; break; @@ -4440,8 +4466,8 @@ size_t copy_string_contents(StringSlice* text, char* dest) { *dest++ = '\"'; break; default: { - /* The string should be validated already, so we know this is a hex - * sequence */ + // The string should be validated already, so we know this is a hex + // sequence. uint32_t hi; uint32_t lo; if (WABT_SUCCEEDED(parse_hexdigit(src[0], &hi)) && @@ -4485,6 +4511,12 @@ void dup_text_list(TextList* text_list, char** out_data, size_t* out_size) { *out_size = dest - result; } +void reverse_bindings(TypeVector* types, BindingHash* bindings) { + for (auto& pair : *bindings) { + pair.second.index = types->size() - pair.second.index - 1; + } +} + bool is_empty_signature(const FuncSignature* sig) { return sig->result_types.empty() && sig->param_types.empty(); } @@ -4503,6 +4535,160 @@ void append_implicit_func_declaration(Location* loc, } } +void check_import_ordering(Location* loc, WastLexer* lexer, WastParser* parser, + Module* module, ModuleField* first) { + for (ModuleField* field = first; field; field = field->next) { + if (field->type == ModuleFieldType::Import) { + if (module->funcs.size() != module->num_func_imports || + module->tables.size() != module->num_table_imports || + module->memories.size() != module->num_memory_imports || + module->globals.size() != module->num_global_imports) { + wast_parser_error( + loc, lexer, parser, + "imports must occur before all non-import definitions"); + } + } + } +} + +void append_module_fields(Module* module, ModuleField* first) { + ModuleField* main_field = first; + Index main_index = kInvalidIndex; + + for (ModuleField* field = first; field; field = field->next) { + StringSlice* name = nullptr; + BindingHash* bindings = nullptr; + Index index = kInvalidIndex; + + switch (field->type) { + case ModuleFieldType::Func: + append_implicit_func_declaration(&field->loc, module, + &field->func->decl); + name = &field->func->name; + bindings = &module->func_bindings; + index = module->funcs.size(); + module->funcs.push_back(field->func); + break; + + case ModuleFieldType::Global: + name = &field->global->name; + bindings = &module->global_bindings; + index = module->globals.size(); + module->globals.push_back(field->global); + break; + + case ModuleFieldType::Import: + switch (field->import->kind) { + case ExternalKind::Func: + append_implicit_func_declaration(&field->loc, module, + &field->import->func->decl); + name = &field->import->func->name; + bindings = &module->func_bindings; + index = module->funcs.size(); + module->funcs.push_back(field->import->func); + ++module->num_func_imports; + break; + case ExternalKind::Table: + name = &field->import->table->name; + bindings = &module->table_bindings; + index = module->tables.size(); + module->tables.push_back(field->import->table); + ++module->num_table_imports; + break; + case ExternalKind::Memory: + name = &field->import->memory->name; + bindings = &module->memory_bindings; + index = module->memories.size(); + module->memories.push_back(field->import->memory); + ++module->num_memory_imports; + break; + case ExternalKind::Global: + name = &field->import->global->name; + bindings = &module->global_bindings; + index = module->globals.size(); + module->globals.push_back(field->import->global); + ++module->num_global_imports; + break; + } + module->imports.push_back(field->import); + break; + + case ModuleFieldType::Export: + if (field != main_field) { + // If this is not the main field, it must be an inline export. + field->export_->var.type = VarType::Index; + field->export_->var.index = main_index; + } + name = &field->export_->name; + bindings = &module->export_bindings; + index = module->exports.size(); + module->exports.push_back(field->export_); + break; + + case ModuleFieldType::FuncType: + name = &field->func_type->name; + bindings = &module->func_type_bindings; + index = module->func_types.size(); + module->func_types.push_back(field->func_type); + break; + + case ModuleFieldType::Table: + name = &field->table->name; + bindings = &module->table_bindings; + index = module->tables.size(); + module->tables.push_back(field->table); + break; + + case ModuleFieldType::ElemSegment: + if (field != main_field) { + // If this is not the main field, it must be an inline elem segment. + field->elem_segment->table_var.type = VarType::Index; + field->elem_segment->table_var.index = main_index; + } + module->elem_segments.push_back(field->elem_segment); + break; + + case ModuleFieldType::Memory: + name = &field->memory->name; + bindings = &module->memory_bindings; + index = module->memories.size(); + module->memories.push_back(field->memory); + break; + + case ModuleFieldType::DataSegment: + if (field != main_field) { + // If this is not the main field, it must be an inline data segment. + field->data_segment->memory_var.type = VarType::Index; + field->data_segment->memory_var.index = main_index; + } + module->data_segments.push_back(field->data_segment); + break; + + case ModuleFieldType::Start: + module->start = &field->start; + break; + } + + if (field == main_field) + main_index = index; + + if (module->last_field) + module->last_field->next = field; + else + module->first_field = field; + module->last_field = field; + + if (name && bindings) { + // Exported names are allowed to be empty; other names aren't. + if (bindings == &module->export_bindings || + !string_slice_is_empty(name)) { + bindings->emplace(string_slice_to_string(*name), + Binding(field->loc, index)); + } + } + } +} + Result parse_wast(WastLexer* lexer, Script** out_script, SourceErrorHandler* error_handler) { WastParser parser; diff --git a/src/prebuilt/wast-parser-gen.hh b/src/prebuilt/wast-parser-gen.hh index 68e6da21..39ebe5a8 100644 --- a/src/prebuilt/wast-parser-gen.hh +++ b/src/prebuilt/wast-parser-gen.hh @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/prebuilt/wast-parser-gen.output b/src/prebuilt/wast-parser-gen.output index 6b3a7c8a..60e37fe7 100644 --- a/src/prebuilt/wast-parser-gen.output +++ b/src/prebuilt/wast-parser-gen.output @@ -2,11 +2,11 @@ Grammar 0 $accept: script_start "EOF" - 1 non_empty_text_list: TEXT - 2 | non_empty_text_list TEXT + 1 text_list: TEXT + 2 | text_list TEXT - 3 text_list: %empty - 4 | non_empty_text_list + 3 text_list_opt: %empty + 4 | text_list 5 quoted_text: TEXT @@ -94,176 +94,205 @@ Grammar 67 | IF labeling_opt block END labeling_opt 68 | IF labeling_opt block ELSE labeling_opt instr_list END labeling_opt - 69 block: value_type_list instr_list + 69 block_sig: "(" RESULT value_type_list ")" - 70 expr: "(" expr1 ")" + 70 block: block_sig block + 71 | instr_list - 71 expr1: plain_instr expr_list - 72 | BLOCK labeling_opt block - 73 | LOOP labeling_opt block - 74 | IF labeling_opt value_type_list if_ + 72 expr: "(" expr1 ")" - 75 if_: "(" THEN instr_list ")" "(" ELSE instr_list ")" - 76 | "(" THEN instr_list ")" - 77 | expr "(" THEN instr_list ")" "(" ELSE instr_list ")" - 78 | expr "(" THEN instr_list ")" - 79 | expr expr expr - 80 | expr expr + 73 expr1: plain_instr expr_list + 74 | BLOCK labeling_opt block + 75 | LOOP labeling_opt block + 76 | IF labeling_opt if_block - 81 instr_list: %empty - 82 | instr instr_list + 77 if_block: block_sig if_block + 78 | if_ - 83 expr_list: %empty - 84 | expr expr_list + 79 if_: "(" THEN instr_list ")" "(" ELSE instr_list ")" + 80 | "(" THEN instr_list ")" + 81 | expr "(" THEN instr_list ")" "(" ELSE instr_list ")" + 82 | expr "(" THEN instr_list ")" + 83 | expr expr expr + 84 | expr expr - 85 const_expr: instr_list + 85 instr_list: %empty + 86 | instr instr_list - 86 func_fields: func_body - 87 | "(" RESULT value_type_list ")" func_body - 88 | "(" PARAM value_type_list ")" func_fields - 89 | "(" PARAM bind_var VALUE_TYPE ")" func_fields + 87 expr_list: %empty + 88 | expr expr_list - 90 func_body: instr_list - 91 | "(" LOCAL value_type_list ")" func_body - 92 | "(" LOCAL bind_var VALUE_TYPE ")" func_body + 89 const_expr: instr_list - 93 func_info: func_fields + 90 func: "(" FUNC bind_var_opt func_fields ")" - 94 func: "(" FUNC bind_var_opt inline_export type_use func_info ")" - 95 | "(" FUNC bind_var_opt type_use func_info ")" - 96 | "(" FUNC bind_var_opt inline_export func_info ")" - 97 | "(" FUNC bind_var_opt func_info ")" + 91 func_fields: type_use func_fields_body + 92 | func_fields_body + 93 | inline_import type_use func_fields_import + 94 | inline_import func_fields_import + 95 | inline_export func_fields - 98 offset: "(" OFFSET const_expr ")" - 99 | expr + 96 func_fields_import: func_fields_import1 - 100 elem: "(" ELEM var offset var_list ")" - 101 | "(" ELEM offset var_list ")" + 97 func_fields_import1: %empty + 98 | "(" RESULT value_type_list ")" + 99 | "(" PARAM value_type_list ")" func_fields_import1 + 100 | "(" PARAM bind_var VALUE_TYPE ")" func_fields_import1 - 102 table: "(" TABLE bind_var_opt inline_export_opt table_sig ")" - 103 | "(" TABLE bind_var_opt inline_export_opt elem_type "(" ELEM var_list ")" ")" + 101 func_fields_body: func_fields_body1 - 104 data: "(" DATA var offset text_list ")" - 105 | "(" DATA offset text_list ")" + 102 func_fields_body1: func_body + 103 | "(" RESULT value_type_list ")" func_body + 104 | "(" PARAM value_type_list ")" func_fields_body1 + 105 | "(" PARAM bind_var VALUE_TYPE ")" func_fields_body1 - 106 memory: "(" MEMORY bind_var_opt inline_export_opt memory_sig ")" - 107 | "(" MEMORY bind_var_opt inline_export "(" DATA text_list ")" ")" - 108 | "(" MEMORY bind_var_opt "(" DATA text_list ")" ")" + 106 func_body: func_body1 - 109 global: "(" GLOBAL bind_var_opt inline_export global_type const_expr ")" - 110 | "(" GLOBAL bind_var_opt global_type const_expr ")" + 107 func_body1: instr_list + 108 | "(" LOCAL value_type_list ")" func_body1 + 109 | "(" LOCAL bind_var VALUE_TYPE ")" func_body1 - 111 import_kind: "(" FUNC bind_var_opt type_use ")" - 112 | "(" FUNC bind_var_opt func_sig ")" - 113 | "(" TABLE bind_var_opt table_sig ")" - 114 | "(" MEMORY bind_var_opt memory_sig ")" - 115 | "(" GLOBAL bind_var_opt global_type ")" + 110 offset: "(" OFFSET const_expr ")" + 111 | expr - 116 import: "(" IMPORT quoted_text quoted_text import_kind ")" - 117 | "(" FUNC bind_var_opt inline_import type_use ")" - 118 | "(" FUNC bind_var_opt inline_import func_sig ")" - 119 | "(" TABLE bind_var_opt inline_import table_sig ")" - 120 | "(" MEMORY bind_var_opt inline_import memory_sig ")" - 121 | "(" GLOBAL bind_var_opt inline_import global_type ")" + 112 elem: "(" ELEM var offset var_list ")" + 113 | "(" ELEM offset var_list ")" - 122 inline_import: "(" IMPORT quoted_text quoted_text ")" + 114 table: "(" TABLE bind_var_opt table_fields ")" - 123 export_kind: "(" FUNC var ")" - 124 | "(" TABLE var ")" - 125 | "(" MEMORY var ")" - 126 | "(" GLOBAL var ")" + 115 table_fields: table_sig + 116 | inline_import table_sig + 117 | inline_export table_fields + 118 | elem_type "(" ELEM var_list ")" - 127 export: "(" EXPORT quoted_text export_kind ")" + 119 data: "(" DATA var offset text_list_opt ")" + 120 | "(" DATA offset text_list_opt ")" - 128 inline_export_opt: %empty - 129 | inline_export + 121 memory: "(" MEMORY bind_var_opt memory_fields ")" - 130 inline_export: "(" EXPORT quoted_text ")" + 122 memory_fields: memory_sig + 123 | inline_import memory_sig + 124 | inline_export memory_fields + 125 | "(" DATA text_list_opt ")" - 131 type_def: "(" TYPE func_type ")" - 132 | "(" TYPE bind_var func_type ")" + 126 global: "(" GLOBAL bind_var_opt global_fields ")" - 133 start: "(" START var ")" + 127 global_fields: global_type const_expr + 128 | inline_import global_type + 129 | inline_export global_fields - 134 module_fields: %empty - 135 | module_fields type_def - 136 | module_fields global - 137 | module_fields table - 138 | module_fields memory - 139 | module_fields func - 140 | module_fields elem - 141 | module_fields data - 142 | module_fields start - 143 | module_fields import - 144 | module_fields export + 130 import_desc: "(" FUNC bind_var_opt type_use ")" + 131 | "(" FUNC bind_var_opt func_sig ")" + 132 | "(" TABLE bind_var_opt table_sig ")" + 133 | "(" MEMORY bind_var_opt memory_sig ")" + 134 | "(" GLOBAL bind_var_opt global_type ")" - 145 raw_module: "(" MODULE bind_var_opt module_fields ")" - 146 | "(" MODULE bind_var_opt non_empty_text_list ")" + 135 import: "(" IMPORT quoted_text quoted_text import_desc ")" - 147 module: raw_module + 136 inline_import: "(" IMPORT quoted_text quoted_text ")" - 148 script_var_opt: %empty - 149 | VAR + 137 export_desc: "(" FUNC var ")" + 138 | "(" TABLE var ")" + 139 | "(" MEMORY var ")" + 140 | "(" GLOBAL var ")" - 150 action: "(" INVOKE script_var_opt quoted_text const_list ")" - 151 | "(" GET script_var_opt quoted_text ")" + 141 export: "(" EXPORT quoted_text export_desc ")" - 152 assertion: "(" ASSERT_MALFORMED raw_module quoted_text ")" - 153 | "(" ASSERT_INVALID raw_module quoted_text ")" - 154 | "(" ASSERT_UNLINKABLE raw_module quoted_text ")" - 155 | "(" ASSERT_TRAP raw_module quoted_text ")" - 156 | "(" ASSERT_RETURN action const_list ")" - 157 | "(" ASSERT_RETURN_CANONICAL_NAN action ")" - 158 | "(" ASSERT_RETURN_ARITHMETIC_NAN action ")" - 159 | "(" ASSERT_TRAP action quoted_text ")" - 160 | "(" ASSERT_EXHAUSTION action quoted_text ")" + 142 inline_export: "(" EXPORT quoted_text ")" - 161 cmd: action - 162 | assertion - 163 | module - 164 | "(" REGISTER quoted_text script_var_opt ")" + 143 type_def: "(" TYPE func_type ")" + 144 | "(" TYPE bind_var func_type ")" - 165 cmd_list: %empty - 166 | cmd_list cmd + 145 start: "(" START var ")" - 167 const: "(" CONST literal ")" + 146 module_field: type_def + 147 | global + 148 | table + 149 | memory + 150 | func + 151 | elem + 152 | data + 153 | start + 154 | import + 155 | export - 168 const_list: %empty - 169 | const_list const + 156 module_fields_opt: %empty + 157 | module_fields - 170 script: cmd_list + 158 module_fields: module_field + 159 | module_fields module_field - 171 script_start: script + 160 raw_module: "(" MODULE bind_var_opt module_fields_opt ")" + 161 | "(" MODULE bind_var_opt text_list ")" + + 162 module: raw_module + + 163 inline_module: module_fields + + 164 script_var_opt: %empty + 165 | VAR + + 166 action: "(" INVOKE script_var_opt quoted_text const_list ")" + 167 | "(" GET script_var_opt quoted_text ")" + + 168 assertion: "(" ASSERT_MALFORMED raw_module quoted_text ")" + 169 | "(" ASSERT_INVALID raw_module quoted_text ")" + 170 | "(" ASSERT_UNLINKABLE raw_module quoted_text ")" + 171 | "(" ASSERT_TRAP raw_module quoted_text ")" + 172 | "(" ASSERT_RETURN action const_list ")" + 173 | "(" ASSERT_RETURN_CANONICAL_NAN action ")" + 174 | "(" ASSERT_RETURN_ARITHMETIC_NAN action ")" + 175 | "(" ASSERT_TRAP action quoted_text ")" + 176 | "(" ASSERT_EXHAUSTION action quoted_text ")" + + 177 cmd: action + 178 | assertion + 179 | module + 180 | "(" REGISTER quoted_text script_var_opt ")" + + 181 cmd_list: cmd + 182 | cmd_list cmd + + 183 const: "(" CONST literal ")" + + 184 const_list: %empty + 185 | const_list const + + 186 script: %empty + 187 | cmd_list + 188 | inline_module + + 189 script_start: script Terminals, with rules where they appear "EOF" (0) 0 error (256) -"(" (258) 10 11 13 14 15 20 70 75 76 77 78 87 88 89 91 92 94 95 96 - 97 98 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 - 115 116 117 118 119 120 121 122 123 124 125 126 127 130 131 132 - 133 145 146 150 151 152 153 154 155 156 157 158 159 160 164 167 -")" (259) 10 11 13 14 15 20 70 75 76 77 78 87 88 89 91 92 94 95 96 - 97 98 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 - 115 116 117 118 119 120 121 122 123 124 125 126 127 130 131 132 - 133 145 146 150 151 152 153 154 155 156 157 158 159 160 164 167 +"(" (258) 10 11 13 14 15 20 69 72 79 80 81 82 90 98 99 100 103 104 + 105 108 109 110 112 113 114 118 119 120 121 125 126 130 131 132 + 133 134 135 136 137 138 139 140 141 142 143 144 145 160 161 166 + 167 168 169 170 171 172 173 174 175 176 180 183 +")" (259) 10 11 13 14 15 20 69 72 79 80 81 82 90 98 99 100 103 104 + 105 108 109 110 112 113 114 118 119 120 121 125 126 130 131 132 + 133 134 135 136 137 138 139 140 141 142 143 144 145 160 161 166 + 167 168 169 170 171 172 173 174 175 176 180 183 NAT (260) 21 22 INT (261) 23 FLOAT (262) 24 TEXT (263) 1 2 5 -VAR (264) 26 31 149 -VALUE_TYPE (265) 7 9 10 89 92 +VAR (264) 26 31 165 +VALUE_TYPE (265) 7 9 10 100 105 109 ANYFUNC (266) 8 MUT (267) 10 NOP (268) 42 DROP (269) 43 -BLOCK (270) 65 72 +BLOCK (270) 65 74 END (271) 65 66 67 68 -IF (272) 67 68 74 -THEN (273) 75 76 77 78 -ELSE (274) 68 75 77 -LOOP (275) 66 73 +IF (272) 67 68 76 +THEN (273) 79 80 81 82 +ELSE (274) 68 79 81 +LOOP (275) 66 75 BR (276) 45 BR_IF (277) 46 BR_TABLE (278) 47 @@ -279,7 +308,7 @@ LOAD (287) 56 STORE (288) 57 OFFSET_EQ_NAT (289) 35 ALIGN_EQ_NAT (290) 37 -CONST (291) 58 167 +CONST (291) 58 183 UNARY (292) 59 BINARY (293) 60 COMPARE (294) 61 @@ -288,32 +317,32 @@ SELECT (296) 44 UNREACHABLE (297) 41 CURRENT_MEMORY (298) 63 GROW_MEMORY (299) 64 -FUNC (300) 11 94 95 96 97 111 112 117 118 123 -START (301) 133 -TYPE (302) 20 131 132 -PARAM (303) 13 14 88 89 -RESULT (304) 14 15 87 -LOCAL (305) 91 92 -GLOBAL (306) 109 110 115 121 126 -MODULE (307) 145 146 -TABLE (308) 102 103 113 119 124 -ELEM (309) 100 101 103 -MEMORY (310) 106 107 108 114 120 125 -DATA (311) 104 105 107 108 -OFFSET (312) 98 -IMPORT (313) 116 122 -EXPORT (314) 127 130 -REGISTER (315) 164 -INVOKE (316) 150 -GET (317) 151 -ASSERT_MALFORMED (318) 152 -ASSERT_INVALID (319) 153 -ASSERT_UNLINKABLE (320) 154 -ASSERT_RETURN (321) 156 -ASSERT_RETURN_CANONICAL_NAN (322) 157 -ASSERT_RETURN_ARITHMETIC_NAN (323) 158 -ASSERT_TRAP (324) 155 159 -ASSERT_EXHAUSTION (325) 160 +FUNC (300) 11 90 130 131 137 +START (301) 145 +TYPE (302) 20 143 144 +PARAM (303) 13 14 99 100 104 105 +RESULT (304) 14 15 69 98 103 +LOCAL (305) 108 109 +GLOBAL (306) 126 134 140 +MODULE (307) 160 161 +TABLE (308) 114 132 138 +ELEM (309) 112 113 118 +MEMORY (310) 121 133 139 +DATA (311) 119 120 125 +OFFSET (312) 110 +IMPORT (313) 135 136 +EXPORT (314) 141 142 +REGISTER (315) 180 +INVOKE (316) 166 +GET (317) 167 +ASSERT_MALFORMED (318) 168 +ASSERT_INVALID (319) 169 +ASSERT_UNLINKABLE (320) 170 +ASSERT_RETURN (321) 172 +ASSERT_RETURN_CANONICAL_NAN (322) 173 +ASSERT_RETURN_ARITHMETIC_NAN (323) 174 +ASSERT_TRAP (324) 171 175 +ASSERT_EXHAUSTION (325) 176 LOW (326) @@ -321,4619 +350,4940 @@ Nonterminals, with rules where they appear $accept (72) on left: 0 -non_empty_text_list (73) - on left: 1 2, on right: 2 4 146 -text_list (74) - on left: 3 4, on right: 104 105 107 108 +text_list (73) + on left: 1 2, on right: 2 4 161 +text_list_opt (74) + on left: 3 4, on right: 119 120 125 quoted_text (75) - on left: 5, on right: 116 122 127 130 150 151 152 153 154 155 159 - 160 164 + on left: 5, on right: 135 136 141 142 166 167 168 169 170 171 175 + 176 180 value_type_list (76) - on left: 6 7, on right: 7 13 14 15 69 74 87 88 91 + on left: 6 7, on right: 7 13 14 15 69 98 99 103 104 108 elem_type (77) - on left: 8, on right: 16 103 + on left: 8, on right: 16 118 global_type (78) - on left: 9 10, on right: 109 110 115 121 + on left: 9 10, on right: 127 128 134 func_type (79) - on left: 11, on right: 131 132 + on left: 11, on right: 143 144 func_sig (80) - on left: 12 13 14 15, on right: 11 112 118 + on left: 12 13 14 15, on right: 11 131 table_sig (81) - on left: 16, on right: 102 113 119 + on left: 16, on right: 115 116 132 memory_sig (82) - on left: 17, on right: 106 114 120 + on left: 17, on right: 122 123 133 limits (83) on left: 18 19, on right: 16 17 type_use (84) - on left: 20, on right: 94 95 111 117 + on left: 20, on right: 91 93 130 nat (85) on left: 21, on right: 18 19 25 literal (86) - on left: 22 23 24, on right: 58 167 + on left: 22 23 24, on right: 58 183 var (87) - on left: 25 26, on right: 20 28 45 46 47 49 50 51 52 53 54 55 100 - 104 123 124 125 126 133 + on left: 25 26, on right: 20 28 45 46 47 49 50 51 52 53 54 55 112 + 119 137 138 139 140 145 var_list (88) - on left: 27 28, on right: 28 47 100 101 103 + on left: 27 28, on right: 28 47 112 113 118 bind_var_opt (89) - on left: 29 30, on right: 94 95 96 97 102 103 106 107 108 109 110 - 111 112 113 114 115 117 118 119 120 121 145 146 + on left: 29 30, on right: 90 114 121 126 130 131 132 133 134 160 + 161 bind_var (90) - on left: 31, on right: 30 33 89 92 132 + on left: 31, on right: 30 33 100 105 109 144 labeling_opt (91) - on left: 32 33, on right: 65 66 67 68 72 73 74 + on left: 32 33, on right: 65 66 67 68 74 75 76 offset_opt (92) on left: 34 35, on right: 56 57 align_opt (93) on left: 36 37, on right: 56 57 instr (94) - on left: 38 39 40, on right: 82 + on left: 38 39 40, on right: 86 plain_instr (95) on left: 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 - 59 60 61 62 63 64, on right: 38 71 + 59 60 61 62 63 64, on right: 38 73 block_instr (96) on left: 65 66 67 68, on right: 39 -block (97) - on left: 69, on right: 65 66 67 68 72 73 -expr (98) - on left: 70, on right: 40 77 78 79 80 84 99 -expr1 (99) - on left: 71 72 73 74, on right: 70 -if_ (100) - on left: 75 76 77 78 79 80, on right: 74 -instr_list (101) - on left: 81 82, on right: 68 69 75 76 77 78 82 85 90 -expr_list (102) - on left: 83 84, on right: 71 84 -const_expr (103) - on left: 85, on right: 98 109 110 -func_fields (104) - on left: 86 87 88 89, on right: 88 89 93 -func_body (105) - on left: 90 91 92, on right: 86 87 91 92 -func_info (106) - on left: 93, on right: 94 95 96 97 -func (107) - on left: 94 95 96 97, on right: 139 -offset (108) - on left: 98 99, on right: 100 101 104 105 -elem (109) - on left: 100 101, on right: 140 -table (110) - on left: 102 103, on right: 137 -data (111) - on left: 104 105, on right: 141 -memory (112) - on left: 106 107 108, on right: 138 -global (113) - on left: 109 110, on right: 136 -import_kind (114) - on left: 111 112 113 114 115, on right: 116 -import (115) - on left: 116 117 118 119 120 121, on right: 143 -inline_import (116) - on left: 122, on right: 117 118 119 120 121 -export_kind (117) - on left: 123 124 125 126, on right: 127 -export (118) - on left: 127, on right: 144 -inline_export_opt (119) - on left: 128 129, on right: 102 103 106 -inline_export (120) - on left: 130, on right: 94 96 107 109 129 -type_def (121) - on left: 131 132, on right: 135 -start (122) - on left: 133, on right: 142 -module_fields (123) - on left: 134 135 136 137 138 139 140 141 142 143 144, on right: - 135 136 137 138 139 140 141 142 143 144 145 -raw_module (124) - on left: 145 146, on right: 147 152 153 154 155 -module (125) - on left: 147, on right: 163 -script_var_opt (126) - on left: 148 149, on right: 150 151 164 -action (127) - on left: 150 151, on right: 156 157 158 159 160 161 -assertion (128) - on left: 152 153 154 155 156 157 158 159 160, on right: 162 -cmd (129) - on left: 161 162 163 164, on right: 166 -cmd_list (130) - on left: 165 166, on right: 166 170 -const (131) - on left: 167, on right: 169 -const_list (132) - on left: 168 169, on right: 150 156 169 -script (133) - on left: 170, on right: 171 -script_start (134) - on left: 171, on right: 0 +block_sig (97) + on left: 69, on right: 70 77 +block (98) + on left: 70 71, on right: 65 66 67 68 70 74 75 +expr (99) + on left: 72, on right: 40 81 82 83 84 88 111 +expr1 (100) + on left: 73 74 75 76, on right: 72 +if_block (101) + on left: 77 78, on right: 76 77 +if_ (102) + on left: 79 80 81 82 83 84, on right: 78 +instr_list (103) + on left: 85 86, on right: 68 71 79 80 81 82 86 89 107 +expr_list (104) + on left: 87 88, on right: 73 88 +const_expr (105) + on left: 89, on right: 110 127 +func (106) + on left: 90, on right: 150 +func_fields (107) + on left: 91 92 93 94 95, on right: 90 95 +func_fields_import (108) + on left: 96, on right: 93 94 +func_fields_import1 (109) + on left: 97 98 99 100, on right: 96 99 100 +func_fields_body (110) + on left: 101, on right: 91 92 +func_fields_body1 (111) + on left: 102 103 104 105, on right: 101 104 105 +func_body (112) + on left: 106, on right: 102 103 +func_body1 (113) + on left: 107 108 109, on right: 106 108 109 +offset (114) + on left: 110 111, on right: 112 113 119 120 +elem (115) + on left: 112 113, on right: 151 +table (116) + on left: 114, on right: 148 +table_fields (117) + on left: 115 116 117 118, on right: 114 117 +data (118) + on left: 119 120, on right: 152 +memory (119) + on left: 121, on right: 149 +memory_fields (120) + on left: 122 123 124 125, on right: 121 124 +global (121) + on left: 126, on right: 147 +global_fields (122) + on left: 127 128 129, on right: 126 129 +import_desc (123) + on left: 130 131 132 133 134, on right: 135 +import (124) + on left: 135, on right: 154 +inline_import (125) + on left: 136, on right: 93 94 116 123 128 +export_desc (126) + on left: 137 138 139 140, on right: 141 +export (127) + on left: 141, on right: 155 +inline_export (128) + on left: 142, on right: 95 117 124 129 +type_def (129) + on left: 143 144, on right: 146 +start (130) + on left: 145, on right: 153 +module_field (131) + on left: 146 147 148 149 150 151 152 153 154 155, on right: 158 + 159 +module_fields_opt (132) + on left: 156 157, on right: 160 +module_fields (133) + on left: 158 159, on right: 157 159 163 +raw_module (134) + on left: 160 161, on right: 162 168 169 170 171 +module (135) + on left: 162, on right: 179 +inline_module (136) + on left: 163, on right: 188 +script_var_opt (137) + on left: 164 165, on right: 166 167 180 +action (138) + on left: 166 167, on right: 172 173 174 175 176 177 +assertion (139) + on left: 168 169 170 171 172 173 174 175 176, on right: 178 +cmd (140) + on left: 177 178 179 180, on right: 181 182 +cmd_list (141) + on left: 181 182, on right: 182 187 +const (142) + on left: 183, on right: 185 +const_list (143) + on left: 184 185, on right: 166 172 185 +script (144) + on left: 186 187 188, on right: 189 +script_start (145) + on left: 189, on right: 0 State 0 0 $accept: . script_start "EOF" - $default reduce using rule 165 (cmd_list) - - cmd_list go to state 1 - script go to state 2 - script_start go to state 3 + "(" shift, and go to state 1 + + $default reduce using rule 186 (script) + + func go to state 2 + elem go to state 3 + table go to state 4 + data go to state 5 + memory go to state 6 + global go to state 7 + import go to state 8 + export go to state 9 + type_def go to state 10 + start go to state 11 + module_field go to state 12 + module_fields go to state 13 + raw_module go to state 14 + module go to state 15 + inline_module go to state 16 + action go to state 17 + assertion go to state 18 + cmd go to state 19 + cmd_list go to state 20 + script go to state 21 + script_start go to state 22 State 1 - 166 cmd_list: cmd_list . cmd - 170 script: cmd_list . - - "(" shift, and go to state 4 - - $default reduce using rule 170 (script) - - raw_module go to state 5 - module go to state 6 - action go to state 7 - assertion go to state 8 - cmd go to state 9 + 90 func: "(" . FUNC bind_var_opt func_fields ")" + 112 elem: "(" . ELEM var offset var_list ")" + 113 | "(" . ELEM offset var_list ")" + 114 table: "(" . TABLE bind_var_opt table_fields ")" + 119 data: "(" . DATA var offset text_list_opt ")" + 120 | "(" . DATA offset text_list_opt ")" + 121 memory: "(" . MEMORY bind_var_opt memory_fields ")" + 126 global: "(" . GLOBAL bind_var_opt global_fields ")" + 135 import: "(" . IMPORT quoted_text quoted_text import_desc ")" + 141 export: "(" . EXPORT quoted_text export_desc ")" + 143 type_def: "(" . TYPE func_type ")" + 144 | "(" . TYPE bind_var func_type ")" + 145 start: "(" . START var ")" + 160 raw_module: "(" . MODULE bind_var_opt module_fields_opt ")" + 161 | "(" . MODULE bind_var_opt text_list ")" + 166 action: "(" . INVOKE script_var_opt quoted_text const_list ")" + 167 | "(" . GET script_var_opt quoted_text ")" + 168 assertion: "(" . ASSERT_MALFORMED raw_module quoted_text ")" + 169 | "(" . ASSERT_INVALID raw_module quoted_text ")" + 170 | "(" . ASSERT_UNLINKABLE raw_module quoted_text ")" + 171 | "(" . ASSERT_TRAP raw_module quoted_text ")" + 172 | "(" . ASSERT_RETURN action const_list ")" + 173 | "(" . ASSERT_RETURN_CANONICAL_NAN action ")" + 174 | "(" . ASSERT_RETURN_ARITHMETIC_NAN action ")" + 175 | "(" . ASSERT_TRAP action quoted_text ")" + 176 | "(" . ASSERT_EXHAUSTION action quoted_text ")" + 180 cmd: "(" . REGISTER quoted_text script_var_opt ")" + + FUNC shift, and go to state 23 + START shift, and go to state 24 + TYPE shift, and go to state 25 + GLOBAL shift, and go to state 26 + MODULE shift, and go to state 27 + TABLE shift, and go to state 28 + ELEM shift, and go to state 29 + MEMORY shift, and go to state 30 + DATA shift, and go to state 31 + IMPORT shift, and go to state 32 + EXPORT shift, and go to state 33 + REGISTER shift, and go to state 34 + INVOKE shift, and go to state 35 + GET shift, and go to state 36 + ASSERT_MALFORMED shift, and go to state 37 + ASSERT_INVALID shift, and go to state 38 + ASSERT_UNLINKABLE shift, and go to state 39 + ASSERT_RETURN shift, and go to state 40 + ASSERT_RETURN_CANONICAL_NAN shift, and go to state 41 + ASSERT_RETURN_ARITHMETIC_NAN shift, and go to state 42 + ASSERT_TRAP shift, and go to state 43 + ASSERT_EXHAUSTION shift, and go to state 44 State 2 - 171 script_start: script . + 150 module_field: func . - $default reduce using rule 171 (script_start) + $default reduce using rule 150 (module_field) State 3 - 0 $accept: script_start . "EOF" + 151 module_field: elem . - "EOF" shift, and go to state 10 + $default reduce using rule 151 (module_field) State 4 - 145 raw_module: "(" . MODULE bind_var_opt module_fields ")" - 146 | "(" . MODULE bind_var_opt non_empty_text_list ")" - 150 action: "(" . INVOKE script_var_opt quoted_text const_list ")" - 151 | "(" . GET script_var_opt quoted_text ")" - 152 assertion: "(" . ASSERT_MALFORMED raw_module quoted_text ")" - 153 | "(" . ASSERT_INVALID raw_module quoted_text ")" - 154 | "(" . ASSERT_UNLINKABLE raw_module quoted_text ")" - 155 | "(" . ASSERT_TRAP raw_module quoted_text ")" - 156 | "(" . ASSERT_RETURN action const_list ")" - 157 | "(" . ASSERT_RETURN_CANONICAL_NAN action ")" - 158 | "(" . ASSERT_RETURN_ARITHMETIC_NAN action ")" - 159 | "(" . ASSERT_TRAP action quoted_text ")" - 160 | "(" . ASSERT_EXHAUSTION action quoted_text ")" - 164 cmd: "(" . REGISTER quoted_text script_var_opt ")" - - MODULE shift, and go to state 11 - REGISTER shift, and go to state 12 - INVOKE shift, and go to state 13 - GET shift, and go to state 14 - ASSERT_MALFORMED shift, and go to state 15 - ASSERT_INVALID shift, and go to state 16 - ASSERT_UNLINKABLE shift, and go to state 17 - ASSERT_RETURN shift, and go to state 18 - ASSERT_RETURN_CANONICAL_NAN shift, and go to state 19 - ASSERT_RETURN_ARITHMETIC_NAN shift, and go to state 20 - ASSERT_TRAP shift, and go to state 21 - ASSERT_EXHAUSTION shift, and go to state 22 + 148 module_field: table . + + $default reduce using rule 148 (module_field) State 5 - 147 module: raw_module . + 152 module_field: data . - $default reduce using rule 147 (module) + $default reduce using rule 152 (module_field) State 6 - 163 cmd: module . + 149 module_field: memory . - $default reduce using rule 163 (cmd) + $default reduce using rule 149 (module_field) State 7 - 161 cmd: action . + 147 module_field: global . - $default reduce using rule 161 (cmd) + $default reduce using rule 147 (module_field) State 8 - 162 cmd: assertion . + 154 module_field: import . - $default reduce using rule 162 (cmd) + $default reduce using rule 154 (module_field) State 9 - 166 cmd_list: cmd_list cmd . + 155 module_field: export . - $default reduce using rule 166 (cmd_list) + $default reduce using rule 155 (module_field) State 10 - 0 $accept: script_start "EOF" . + 146 module_field: type_def . - $default accept + $default reduce using rule 146 (module_field) State 11 - 145 raw_module: "(" MODULE . bind_var_opt module_fields ")" - 146 | "(" MODULE . bind_var_opt non_empty_text_list ")" - - VAR shift, and go to state 23 - - $default reduce using rule 29 (bind_var_opt) + 153 module_field: start . - bind_var_opt go to state 24 - bind_var go to state 25 + $default reduce using rule 153 (module_field) State 12 - 164 cmd: "(" REGISTER . quoted_text script_var_opt ")" + 158 module_fields: module_field . - TEXT shift, and go to state 26 - - quoted_text go to state 27 + $default reduce using rule 158 (module_fields) State 13 - 150 action: "(" INVOKE . script_var_opt quoted_text const_list ")" + 159 module_fields: module_fields . module_field + 163 inline_module: module_fields . - VAR shift, and go to state 28 + "(" shift, and go to state 45 - $default reduce using rule 148 (script_var_opt) + $default reduce using rule 163 (inline_module) - script_var_opt go to state 29 + func go to state 2 + elem go to state 3 + table go to state 4 + data go to state 5 + memory go to state 6 + global go to state 7 + import go to state 8 + export go to state 9 + type_def go to state 10 + start go to state 11 + module_field go to state 46 State 14 - 151 action: "(" GET . script_var_opt quoted_text ")" - - VAR shift, and go to state 28 + 162 module: raw_module . - $default reduce using rule 148 (script_var_opt) - - script_var_opt go to state 30 + $default reduce using rule 162 (module) State 15 - 152 assertion: "(" ASSERT_MALFORMED . raw_module quoted_text ")" - - "(" shift, and go to state 31 + 179 cmd: module . - raw_module go to state 32 + $default reduce using rule 179 (cmd) State 16 - 153 assertion: "(" ASSERT_INVALID . raw_module quoted_text ")" + 188 script: inline_module . - "(" shift, and go to state 31 - - raw_module go to state 33 + $default reduce using rule 188 (script) State 17 - 154 assertion: "(" ASSERT_UNLINKABLE . raw_module quoted_text ")" - - "(" shift, and go to state 31 + 177 cmd: action . - raw_module go to state 34 + $default reduce using rule 177 (cmd) State 18 - 156 assertion: "(" ASSERT_RETURN . action const_list ")" - - "(" shift, and go to state 35 + 178 cmd: assertion . - action go to state 36 + $default reduce using rule 178 (cmd) State 19 - 157 assertion: "(" ASSERT_RETURN_CANONICAL_NAN . action ")" + 181 cmd_list: cmd . - "(" shift, and go to state 35 - - action go to state 37 + $default reduce using rule 181 (cmd_list) State 20 - 158 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN . action ")" + 182 cmd_list: cmd_list . cmd + 187 script: cmd_list . - "(" shift, and go to state 35 + "(" shift, and go to state 47 - action go to state 38 + $default reduce using rule 187 (script) + raw_module go to state 14 + module go to state 15 + action go to state 17 + assertion go to state 18 + cmd go to state 48 -State 21 - 155 assertion: "(" ASSERT_TRAP . raw_module quoted_text ")" - 159 | "(" ASSERT_TRAP . action quoted_text ")" +State 21 - "(" shift, and go to state 39 + 189 script_start: script . - raw_module go to state 40 - action go to state 41 + $default reduce using rule 189 (script_start) State 22 - 160 assertion: "(" ASSERT_EXHAUSTION . action quoted_text ")" - - "(" shift, and go to state 35 + 0 $accept: script_start . "EOF" - action go to state 42 + "EOF" shift, and go to state 49 State 23 - 31 bind_var: VAR . + 90 func: "(" FUNC . bind_var_opt func_fields ")" - $default reduce using rule 31 (bind_var) + VAR shift, and go to state 50 + $default reduce using rule 29 (bind_var_opt) -State 24 + bind_var_opt go to state 51 + bind_var go to state 52 - 145 raw_module: "(" MODULE bind_var_opt . module_fields ")" - 146 | "(" MODULE bind_var_opt . non_empty_text_list ")" - TEXT shift, and go to state 43 +State 24 + + 145 start: "(" START . var ")" - $default reduce using rule 134 (module_fields) + NAT shift, and go to state 53 + VAR shift, and go to state 54 - non_empty_text_list go to state 44 - module_fields go to state 45 + nat go to state 55 + var go to state 56 State 25 - 30 bind_var_opt: bind_var . + 143 type_def: "(" TYPE . func_type ")" + 144 | "(" TYPE . bind_var func_type ")" - $default reduce using rule 30 (bind_var_opt) + "(" shift, and go to state 57 + VAR shift, and go to state 50 + + func_type go to state 58 + bind_var go to state 59 State 26 - 5 quoted_text: TEXT . + 126 global: "(" GLOBAL . bind_var_opt global_fields ")" - $default reduce using rule 5 (quoted_text) + VAR shift, and go to state 50 + + $default reduce using rule 29 (bind_var_opt) + + bind_var_opt go to state 60 + bind_var go to state 52 State 27 - 164 cmd: "(" REGISTER quoted_text . script_var_opt ")" + 160 raw_module: "(" MODULE . bind_var_opt module_fields_opt ")" + 161 | "(" MODULE . bind_var_opt text_list ")" - VAR shift, and go to state 28 + VAR shift, and go to state 50 - $default reduce using rule 148 (script_var_opt) + $default reduce using rule 29 (bind_var_opt) - script_var_opt go to state 46 + bind_var_opt go to state 61 + bind_var go to state 52 State 28 - 149 script_var_opt: VAR . + 114 table: "(" TABLE . bind_var_opt table_fields ")" + + VAR shift, and go to state 50 - $default reduce using rule 149 (script_var_opt) + $default reduce using rule 29 (bind_var_opt) + + bind_var_opt go to state 62 + bind_var go to state 52 State 29 - 150 action: "(" INVOKE script_var_opt . quoted_text const_list ")" + 112 elem: "(" ELEM . var offset var_list ")" + 113 | "(" ELEM . offset var_list ")" - TEXT shift, and go to state 26 + "(" shift, and go to state 63 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - quoted_text go to state 47 + nat go to state 55 + var go to state 64 + expr go to state 65 + offset go to state 66 State 30 - 151 action: "(" GET script_var_opt . quoted_text ")" + 121 memory: "(" MEMORY . bind_var_opt memory_fields ")" - TEXT shift, and go to state 26 + VAR shift, and go to state 50 + + $default reduce using rule 29 (bind_var_opt) - quoted_text go to state 48 + bind_var_opt go to state 67 + bind_var go to state 52 State 31 - 145 raw_module: "(" . MODULE bind_var_opt module_fields ")" - 146 | "(" . MODULE bind_var_opt non_empty_text_list ")" + 119 data: "(" DATA . var offset text_list_opt ")" + 120 | "(" DATA . offset text_list_opt ")" - MODULE shift, and go to state 11 + "(" shift, and go to state 63 + NAT shift, and go to state 53 + VAR shift, and go to state 54 + + nat go to state 55 + var go to state 68 + expr go to state 65 + offset go to state 69 State 32 - 152 assertion: "(" ASSERT_MALFORMED raw_module . quoted_text ")" + 135 import: "(" IMPORT . quoted_text quoted_text import_desc ")" - TEXT shift, and go to state 26 + TEXT shift, and go to state 70 - quoted_text go to state 49 + quoted_text go to state 71 State 33 - 153 assertion: "(" ASSERT_INVALID raw_module . quoted_text ")" + 141 export: "(" EXPORT . quoted_text export_desc ")" - TEXT shift, and go to state 26 + TEXT shift, and go to state 70 - quoted_text go to state 50 + quoted_text go to state 72 State 34 - 154 assertion: "(" ASSERT_UNLINKABLE raw_module . quoted_text ")" + 180 cmd: "(" REGISTER . quoted_text script_var_opt ")" - TEXT shift, and go to state 26 + TEXT shift, and go to state 70 - quoted_text go to state 51 + quoted_text go to state 73 State 35 - 150 action: "(" . INVOKE script_var_opt quoted_text const_list ")" - 151 | "(" . GET script_var_opt quoted_text ")" + 166 action: "(" INVOKE . script_var_opt quoted_text const_list ")" + + VAR shift, and go to state 74 + + $default reduce using rule 164 (script_var_opt) - INVOKE shift, and go to state 13 - GET shift, and go to state 14 + script_var_opt go to state 75 State 36 - 156 assertion: "(" ASSERT_RETURN action . const_list ")" + 167 action: "(" GET . script_var_opt quoted_text ")" - $default reduce using rule 168 (const_list) + VAR shift, and go to state 74 - const_list go to state 52 + $default reduce using rule 164 (script_var_opt) + + script_var_opt go to state 76 State 37 - 157 assertion: "(" ASSERT_RETURN_CANONICAL_NAN action . ")" + 168 assertion: "(" ASSERT_MALFORMED . raw_module quoted_text ")" + + "(" shift, and go to state 77 - ")" shift, and go to state 53 + raw_module go to state 78 State 38 - 158 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN action . ")" + 169 assertion: "(" ASSERT_INVALID . raw_module quoted_text ")" - ")" shift, and go to state 54 + "(" shift, and go to state 77 + + raw_module go to state 79 State 39 - 145 raw_module: "(" . MODULE bind_var_opt module_fields ")" - 146 | "(" . MODULE bind_var_opt non_empty_text_list ")" - 150 action: "(" . INVOKE script_var_opt quoted_text const_list ")" - 151 | "(" . GET script_var_opt quoted_text ")" + 170 assertion: "(" ASSERT_UNLINKABLE . raw_module quoted_text ")" + + "(" shift, and go to state 77 - MODULE shift, and go to state 11 - INVOKE shift, and go to state 13 - GET shift, and go to state 14 + raw_module go to state 80 State 40 - 155 assertion: "(" ASSERT_TRAP raw_module . quoted_text ")" + 172 assertion: "(" ASSERT_RETURN . action const_list ")" - TEXT shift, and go to state 26 + "(" shift, and go to state 81 - quoted_text go to state 55 + action go to state 82 State 41 - 159 assertion: "(" ASSERT_TRAP action . quoted_text ")" + 173 assertion: "(" ASSERT_RETURN_CANONICAL_NAN . action ")" - TEXT shift, and go to state 26 + "(" shift, and go to state 81 - quoted_text go to state 56 + action go to state 83 State 42 - 160 assertion: "(" ASSERT_EXHAUSTION action . quoted_text ")" + 174 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN . action ")" - TEXT shift, and go to state 26 + "(" shift, and go to state 81 - quoted_text go to state 57 + action go to state 84 State 43 - 1 non_empty_text_list: TEXT . + 171 assertion: "(" ASSERT_TRAP . raw_module quoted_text ")" + 175 | "(" ASSERT_TRAP . action quoted_text ")" - $default reduce using rule 1 (non_empty_text_list) + "(" shift, and go to state 85 + + raw_module go to state 86 + action go to state 87 State 44 - 2 non_empty_text_list: non_empty_text_list . TEXT - 146 raw_module: "(" MODULE bind_var_opt non_empty_text_list . ")" + 176 assertion: "(" ASSERT_EXHAUSTION . action quoted_text ")" + + "(" shift, and go to state 81 - ")" shift, and go to state 58 - TEXT shift, and go to state 59 + action go to state 88 State 45 - 135 module_fields: module_fields . type_def - 136 | module_fields . global - 137 | module_fields . table - 138 | module_fields . memory - 139 | module_fields . func - 140 | module_fields . elem - 141 | module_fields . data - 142 | module_fields . start - 143 | module_fields . import - 144 | module_fields . export - 145 raw_module: "(" MODULE bind_var_opt module_fields . ")" - - "(" shift, and go to state 60 - ")" shift, and go to state 61 - - func go to state 62 - elem go to state 63 - table go to state 64 - data go to state 65 - memory go to state 66 - global go to state 67 - import go to state 68 - export go to state 69 - type_def go to state 70 - start go to state 71 + 90 func: "(" . FUNC bind_var_opt func_fields ")" + 112 elem: "(" . ELEM var offset var_list ")" + 113 | "(" . ELEM offset var_list ")" + 114 table: "(" . TABLE bind_var_opt table_fields ")" + 119 data: "(" . DATA var offset text_list_opt ")" + 120 | "(" . DATA offset text_list_opt ")" + 121 memory: "(" . MEMORY bind_var_opt memory_fields ")" + 126 global: "(" . GLOBAL bind_var_opt global_fields ")" + 135 import: "(" . IMPORT quoted_text quoted_text import_desc ")" + 141 export: "(" . EXPORT quoted_text export_desc ")" + 143 type_def: "(" . TYPE func_type ")" + 144 | "(" . TYPE bind_var func_type ")" + 145 start: "(" . START var ")" + + FUNC shift, and go to state 23 + START shift, and go to state 24 + TYPE shift, and go to state 25 + GLOBAL shift, and go to state 26 + TABLE shift, and go to state 28 + ELEM shift, and go to state 29 + MEMORY shift, and go to state 30 + DATA shift, and go to state 31 + IMPORT shift, and go to state 32 + EXPORT shift, and go to state 33 State 46 - 164 cmd: "(" REGISTER quoted_text script_var_opt . ")" + 159 module_fields: module_fields module_field . - ")" shift, and go to state 72 + $default reduce using rule 159 (module_fields) State 47 - 150 action: "(" INVOKE script_var_opt quoted_text . const_list ")" - - $default reduce using rule 168 (const_list) - - const_list go to state 73 + 160 raw_module: "(" . MODULE bind_var_opt module_fields_opt ")" + 161 | "(" . MODULE bind_var_opt text_list ")" + 166 action: "(" . INVOKE script_var_opt quoted_text const_list ")" + 167 | "(" . GET script_var_opt quoted_text ")" + 168 assertion: "(" . ASSERT_MALFORMED raw_module quoted_text ")" + 169 | "(" . ASSERT_INVALID raw_module quoted_text ")" + 170 | "(" . ASSERT_UNLINKABLE raw_module quoted_text ")" + 171 | "(" . ASSERT_TRAP raw_module quoted_text ")" + 172 | "(" . ASSERT_RETURN action const_list ")" + 173 | "(" . ASSERT_RETURN_CANONICAL_NAN action ")" + 174 | "(" . ASSERT_RETURN_ARITHMETIC_NAN action ")" + 175 | "(" . ASSERT_TRAP action quoted_text ")" + 176 | "(" . ASSERT_EXHAUSTION action quoted_text ")" + 180 cmd: "(" . REGISTER quoted_text script_var_opt ")" + + MODULE shift, and go to state 27 + REGISTER shift, and go to state 34 + INVOKE shift, and go to state 35 + GET shift, and go to state 36 + ASSERT_MALFORMED shift, and go to state 37 + ASSERT_INVALID shift, and go to state 38 + ASSERT_UNLINKABLE shift, and go to state 39 + ASSERT_RETURN shift, and go to state 40 + ASSERT_RETURN_CANONICAL_NAN shift, and go to state 41 + ASSERT_RETURN_ARITHMETIC_NAN shift, and go to state 42 + ASSERT_TRAP shift, and go to state 43 + ASSERT_EXHAUSTION shift, and go to state 44 State 48 - 151 action: "(" GET script_var_opt quoted_text . ")" + 182 cmd_list: cmd_list cmd . - ")" shift, and go to state 74 + $default reduce using rule 182 (cmd_list) State 49 - 152 assertion: "(" ASSERT_MALFORMED raw_module quoted_text . ")" + 0 $accept: script_start "EOF" . - ")" shift, and go to state 75 + $default accept State 50 - 153 assertion: "(" ASSERT_INVALID raw_module quoted_text . ")" + 31 bind_var: VAR . - ")" shift, and go to state 76 + $default reduce using rule 31 (bind_var) State 51 - 154 assertion: "(" ASSERT_UNLINKABLE raw_module quoted_text . ")" - - ")" shift, and go to state 77 + 90 func: "(" FUNC bind_var_opt . func_fields ")" + + "(" shift, and go to state 89 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + type_use go to state 117 + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 122 + func_fields go to state 123 + func_fields_body go to state 124 + func_fields_body1 go to state 125 + func_body go to state 126 + func_body1 go to state 127 + inline_import go to state 128 + inline_export go to state 129 State 52 - 156 assertion: "(" ASSERT_RETURN action const_list . ")" - 169 const_list: const_list . const - - "(" shift, and go to state 78 - ")" shift, and go to state 79 + 30 bind_var_opt: bind_var . - const go to state 80 + $default reduce using rule 30 (bind_var_opt) State 53 - 157 assertion: "(" ASSERT_RETURN_CANONICAL_NAN action ")" . + 21 nat: NAT . - $default reduce using rule 157 (assertion) + $default reduce using rule 21 (nat) State 54 - 158 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN action ")" . + 26 var: VAR . - $default reduce using rule 158 (assertion) + $default reduce using rule 26 (var) State 55 - 155 assertion: "(" ASSERT_TRAP raw_module quoted_text . ")" + 25 var: nat . - ")" shift, and go to state 81 + $default reduce using rule 25 (var) State 56 - 159 assertion: "(" ASSERT_TRAP action quoted_text . ")" + 145 start: "(" START var . ")" - ")" shift, and go to state 82 + ")" shift, and go to state 130 State 57 - 160 assertion: "(" ASSERT_EXHAUSTION action quoted_text . ")" + 11 func_type: "(" . FUNC func_sig ")" - ")" shift, and go to state 83 + FUNC shift, and go to state 131 State 58 - 146 raw_module: "(" MODULE bind_var_opt non_empty_text_list ")" . + 143 type_def: "(" TYPE func_type . ")" - $default reduce using rule 146 (raw_module) + ")" shift, and go to state 132 State 59 - 2 non_empty_text_list: non_empty_text_list TEXT . + 144 type_def: "(" TYPE bind_var . func_type ")" + + "(" shift, and go to state 57 - $default reduce using rule 2 (non_empty_text_list) + func_type go to state 133 State 60 - 94 func: "(" . FUNC bind_var_opt inline_export type_use func_info ")" - 95 | "(" . FUNC bind_var_opt type_use func_info ")" - 96 | "(" . FUNC bind_var_opt inline_export func_info ")" - 97 | "(" . FUNC bind_var_opt func_info ")" - 100 elem: "(" . ELEM var offset var_list ")" - 101 | "(" . ELEM offset var_list ")" - 102 table: "(" . TABLE bind_var_opt inline_export_opt table_sig ")" - 103 | "(" . TABLE bind_var_opt inline_export_opt elem_type "(" ELEM var_list ")" ")" - 104 data: "(" . DATA var offset text_list ")" - 105 | "(" . DATA offset text_list ")" - 106 memory: "(" . MEMORY bind_var_opt inline_export_opt memory_sig ")" - 107 | "(" . MEMORY bind_var_opt inline_export "(" DATA text_list ")" ")" - 108 | "(" . MEMORY bind_var_opt "(" DATA text_list ")" ")" - 109 global: "(" . GLOBAL bind_var_opt inline_export global_type const_expr ")" - 110 | "(" . GLOBAL bind_var_opt global_type const_expr ")" - 116 import: "(" . IMPORT quoted_text quoted_text import_kind ")" - 117 | "(" . FUNC bind_var_opt inline_import type_use ")" - 118 | "(" . FUNC bind_var_opt inline_import func_sig ")" - 119 | "(" . TABLE bind_var_opt inline_import table_sig ")" - 120 | "(" . MEMORY bind_var_opt inline_import memory_sig ")" - 121 | "(" . GLOBAL bind_var_opt inline_import global_type ")" - 127 export: "(" . EXPORT quoted_text export_kind ")" - 131 type_def: "(" . TYPE func_type ")" - 132 | "(" . TYPE bind_var func_type ")" - 133 start: "(" . START var ")" - - FUNC shift, and go to state 84 - START shift, and go to state 85 - TYPE shift, and go to state 86 - GLOBAL shift, and go to state 87 - TABLE shift, and go to state 88 - ELEM shift, and go to state 89 - MEMORY shift, and go to state 90 - DATA shift, and go to state 91 - IMPORT shift, and go to state 92 - EXPORT shift, and go to state 93 + 126 global: "(" GLOBAL bind_var_opt . global_fields ")" + + "(" shift, and go to state 134 + VALUE_TYPE shift, and go to state 135 + + global_type go to state 136 + global_fields go to state 137 + inline_import go to state 138 + inline_export go to state 139 State 61 - 145 raw_module: "(" MODULE bind_var_opt module_fields ")" . + 160 raw_module: "(" MODULE bind_var_opt . module_fields_opt ")" + 161 | "(" MODULE bind_var_opt . text_list ")" - $default reduce using rule 145 (raw_module) + "(" shift, and go to state 45 + TEXT shift, and go to state 140 + + $default reduce using rule 156 (module_fields_opt) + + text_list go to state 141 + func go to state 2 + elem go to state 3 + table go to state 4 + data go to state 5 + memory go to state 6 + global go to state 7 + import go to state 8 + export go to state 9 + type_def go to state 10 + start go to state 11 + module_field go to state 12 + module_fields_opt go to state 142 + module_fields go to state 143 State 62 - 139 module_fields: module_fields func . + 114 table: "(" TABLE bind_var_opt . table_fields ")" - $default reduce using rule 139 (module_fields) + "(" shift, and go to state 144 + NAT shift, and go to state 53 + ANYFUNC shift, and go to state 145 + elem_type go to state 146 + table_sig go to state 147 + limits go to state 148 + nat go to state 149 + table_fields go to state 150 + inline_import go to state 151 + inline_export go to state 152 -State 63 - 140 module_fields: module_fields elem . +State 63 - $default reduce using rule 140 (module_fields) + 72 expr: "(" . expr1 ")" + 110 offset: "(" . OFFSET const_expr ")" + + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 153 + IF shift, and go to state 154 + LOOP shift, and go to state 155 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + OFFSET shift, and go to state 156 + + plain_instr go to state 157 + expr1 go to state 158 State 64 - 137 module_fields: module_fields table . + 112 elem: "(" ELEM var . offset var_list ")" + + "(" shift, and go to state 63 - $default reduce using rule 137 (module_fields) + expr go to state 65 + offset go to state 159 State 65 - 141 module_fields: module_fields data . + 111 offset: expr . - $default reduce using rule 141 (module_fields) + $default reduce using rule 111 (offset) State 66 - 138 module_fields: module_fields memory . + 113 elem: "(" ELEM offset . var_list ")" + + $default reduce using rule 27 (var_list) - $default reduce using rule 138 (module_fields) + var_list go to state 160 State 67 - 136 module_fields: module_fields global . + 121 memory: "(" MEMORY bind_var_opt . memory_fields ")" - $default reduce using rule 136 (module_fields) + "(" shift, and go to state 161 + NAT shift, and go to state 53 + + memory_sig go to state 162 + limits go to state 163 + nat go to state 149 + memory_fields go to state 164 + inline_import go to state 165 + inline_export go to state 166 State 68 - 143 module_fields: module_fields import . + 119 data: "(" DATA var . offset text_list_opt ")" - $default reduce using rule 143 (module_fields) + "(" shift, and go to state 63 + + expr go to state 65 + offset go to state 167 State 69 - 144 module_fields: module_fields export . + 120 data: "(" DATA offset . text_list_opt ")" + + TEXT shift, and go to state 140 - $default reduce using rule 144 (module_fields) + $default reduce using rule 3 (text_list_opt) + + text_list go to state 168 + text_list_opt go to state 169 State 70 - 135 module_fields: module_fields type_def . + 5 quoted_text: TEXT . - $default reduce using rule 135 (module_fields) + $default reduce using rule 5 (quoted_text) State 71 - 142 module_fields: module_fields start . + 135 import: "(" IMPORT quoted_text . quoted_text import_desc ")" + + TEXT shift, and go to state 70 - $default reduce using rule 142 (module_fields) + quoted_text go to state 170 State 72 - 164 cmd: "(" REGISTER quoted_text script_var_opt ")" . + 141 export: "(" EXPORT quoted_text . export_desc ")" + + "(" shift, and go to state 171 - $default reduce using rule 164 (cmd) + export_desc go to state 172 State 73 - 150 action: "(" INVOKE script_var_opt quoted_text const_list . ")" - 169 const_list: const_list . const + 180 cmd: "(" REGISTER quoted_text . script_var_opt ")" - "(" shift, and go to state 78 - ")" shift, and go to state 94 + VAR shift, and go to state 74 - const go to state 80 + $default reduce using rule 164 (script_var_opt) + + script_var_opt go to state 173 State 74 - 151 action: "(" GET script_var_opt quoted_text ")" . + 165 script_var_opt: VAR . - $default reduce using rule 151 (action) + $default reduce using rule 165 (script_var_opt) State 75 - 152 assertion: "(" ASSERT_MALFORMED raw_module quoted_text ")" . + 166 action: "(" INVOKE script_var_opt . quoted_text const_list ")" + + TEXT shift, and go to state 70 - $default reduce using rule 152 (assertion) + quoted_text go to state 174 State 76 - 153 assertion: "(" ASSERT_INVALID raw_module quoted_text ")" . + 167 action: "(" GET script_var_opt . quoted_text ")" - $default reduce using rule 153 (assertion) + TEXT shift, and go to state 70 + + quoted_text go to state 175 State 77 - 154 assertion: "(" ASSERT_UNLINKABLE raw_module quoted_text ")" . + 160 raw_module: "(" . MODULE bind_var_opt module_fields_opt ")" + 161 | "(" . MODULE bind_var_opt text_list ")" - $default reduce using rule 154 (assertion) + MODULE shift, and go to state 27 State 78 - 167 const: "(" . CONST literal ")" + 168 assertion: "(" ASSERT_MALFORMED raw_module . quoted_text ")" + + TEXT shift, and go to state 70 - CONST shift, and go to state 95 + quoted_text go to state 176 State 79 - 156 assertion: "(" ASSERT_RETURN action const_list ")" . + 169 assertion: "(" ASSERT_INVALID raw_module . quoted_text ")" - $default reduce using rule 156 (assertion) + TEXT shift, and go to state 70 + + quoted_text go to state 177 State 80 - 169 const_list: const_list const . + 170 assertion: "(" ASSERT_UNLINKABLE raw_module . quoted_text ")" + + TEXT shift, and go to state 70 - $default reduce using rule 169 (const_list) + quoted_text go to state 178 State 81 - 155 assertion: "(" ASSERT_TRAP raw_module quoted_text ")" . + 166 action: "(" . INVOKE script_var_opt quoted_text const_list ")" + 167 | "(" . GET script_var_opt quoted_text ")" - $default reduce using rule 155 (assertion) + INVOKE shift, and go to state 35 + GET shift, and go to state 36 State 82 - 159 assertion: "(" ASSERT_TRAP action quoted_text ")" . + 172 assertion: "(" ASSERT_RETURN action . const_list ")" + + $default reduce using rule 184 (const_list) - $default reduce using rule 159 (assertion) + const_list go to state 179 State 83 - 160 assertion: "(" ASSERT_EXHAUSTION action quoted_text ")" . + 173 assertion: "(" ASSERT_RETURN_CANONICAL_NAN action . ")" - $default reduce using rule 160 (assertion) + ")" shift, and go to state 180 State 84 - 94 func: "(" FUNC . bind_var_opt inline_export type_use func_info ")" - 95 | "(" FUNC . bind_var_opt type_use func_info ")" - 96 | "(" FUNC . bind_var_opt inline_export func_info ")" - 97 | "(" FUNC . bind_var_opt func_info ")" - 117 import: "(" FUNC . bind_var_opt inline_import type_use ")" - 118 | "(" FUNC . bind_var_opt inline_import func_sig ")" + 174 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN action . ")" - VAR shift, and go to state 23 - - $default reduce using rule 29 (bind_var_opt) - - bind_var_opt go to state 96 - bind_var go to state 25 + ")" shift, and go to state 181 State 85 - 133 start: "(" START . var ")" - - NAT shift, and go to state 97 - VAR shift, and go to state 98 + 160 raw_module: "(" . MODULE bind_var_opt module_fields_opt ")" + 161 | "(" . MODULE bind_var_opt text_list ")" + 166 action: "(" . INVOKE script_var_opt quoted_text const_list ")" + 167 | "(" . GET script_var_opt quoted_text ")" - nat go to state 99 - var go to state 100 + MODULE shift, and go to state 27 + INVOKE shift, and go to state 35 + GET shift, and go to state 36 State 86 - 131 type_def: "(" TYPE . func_type ")" - 132 | "(" TYPE . bind_var func_type ")" + 171 assertion: "(" ASSERT_TRAP raw_module . quoted_text ")" - "(" shift, and go to state 101 - VAR shift, and go to state 23 + TEXT shift, and go to state 70 - func_type go to state 102 - bind_var go to state 103 + quoted_text go to state 182 State 87 - 109 global: "(" GLOBAL . bind_var_opt inline_export global_type const_expr ")" - 110 | "(" GLOBAL . bind_var_opt global_type const_expr ")" - 121 import: "(" GLOBAL . bind_var_opt inline_import global_type ")" + 175 assertion: "(" ASSERT_TRAP action . quoted_text ")" - VAR shift, and go to state 23 + TEXT shift, and go to state 70 - $default reduce using rule 29 (bind_var_opt) - - bind_var_opt go to state 104 - bind_var go to state 25 + quoted_text go to state 183 State 88 - 102 table: "(" TABLE . bind_var_opt inline_export_opt table_sig ")" - 103 | "(" TABLE . bind_var_opt inline_export_opt elem_type "(" ELEM var_list ")" ")" - 119 import: "(" TABLE . bind_var_opt inline_import table_sig ")" + 176 assertion: "(" ASSERT_EXHAUSTION action . quoted_text ")" - VAR shift, and go to state 23 + TEXT shift, and go to state 70 - $default reduce using rule 29 (bind_var_opt) - - bind_var_opt go to state 105 - bind_var go to state 25 + quoted_text go to state 184 State 89 - 100 elem: "(" ELEM . var offset var_list ")" - 101 | "(" ELEM . offset var_list ")" - - "(" shift, and go to state 106 - NAT shift, and go to state 97 - VAR shift, and go to state 98 - - nat go to state 99 - var go to state 107 - expr go to state 108 - offset go to state 109 + 20 type_use: "(" . TYPE var ")" + 72 expr: "(" . expr1 ")" + 103 func_fields_body1: "(" . RESULT value_type_list ")" func_body + 104 | "(" . PARAM value_type_list ")" func_fields_body1 + 105 | "(" . PARAM bind_var VALUE_TYPE ")" func_fields_body1 + 108 func_body1: "(" . LOCAL value_type_list ")" func_body1 + 109 | "(" . LOCAL bind_var VALUE_TYPE ")" func_body1 + 136 inline_import: "(" . IMPORT quoted_text quoted_text ")" + 142 inline_export: "(" . EXPORT quoted_text ")" + + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 153 + IF shift, and go to state 154 + LOOP shift, and go to state 155 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + TYPE shift, and go to state 185 + PARAM shift, and go to state 186 + RESULT shift, and go to state 187 + LOCAL shift, and go to state 188 + IMPORT shift, and go to state 189 + EXPORT shift, and go to state 190 + + plain_instr go to state 157 + expr1 go to state 158 State 90 - 106 memory: "(" MEMORY . bind_var_opt inline_export_opt memory_sig ")" - 107 | "(" MEMORY . bind_var_opt inline_export "(" DATA text_list ")" ")" - 108 | "(" MEMORY . bind_var_opt "(" DATA text_list ")" ")" - 120 import: "(" MEMORY . bind_var_opt inline_import memory_sig ")" - - VAR shift, and go to state 23 - - $default reduce using rule 29 (bind_var_opt) + 42 plain_instr: NOP . - bind_var_opt go to state 110 - bind_var go to state 25 + $default reduce using rule 42 (plain_instr) State 91 - 104 data: "(" DATA . var offset text_list ")" - 105 | "(" DATA . offset text_list ")" - - "(" shift, and go to state 106 - NAT shift, and go to state 97 - VAR shift, and go to state 98 + 43 plain_instr: DROP . - nat go to state 99 - var go to state 111 - expr go to state 108 - offset go to state 112 + $default reduce using rule 43 (plain_instr) State 92 - 116 import: "(" IMPORT . quoted_text quoted_text import_kind ")" + 65 block_instr: BLOCK . labeling_opt block END labeling_opt + + VAR shift, and go to state 50 - TEXT shift, and go to state 26 + $default reduce using rule 32 (labeling_opt) - quoted_text go to state 113 + bind_var go to state 191 + labeling_opt go to state 192 State 93 - 127 export: "(" EXPORT . quoted_text export_kind ")" + 67 block_instr: IF . labeling_opt block END labeling_opt + 68 | IF . labeling_opt block ELSE labeling_opt instr_list END labeling_opt - TEXT shift, and go to state 26 + VAR shift, and go to state 50 + + $default reduce using rule 32 (labeling_opt) - quoted_text go to state 114 + bind_var go to state 191 + labeling_opt go to state 193 State 94 - 150 action: "(" INVOKE script_var_opt quoted_text const_list ")" . + 66 block_instr: LOOP . labeling_opt block END labeling_opt + + VAR shift, and go to state 50 + + $default reduce using rule 32 (labeling_opt) - $default reduce using rule 150 (action) + bind_var go to state 191 + labeling_opt go to state 194 State 95 - 167 const: "(" CONST . literal ")" + 45 plain_instr: BR . var - NAT shift, and go to state 115 - INT shift, and go to state 116 - FLOAT shift, and go to state 117 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - literal go to state 118 + nat go to state 55 + var go to state 195 State 96 - 94 func: "(" FUNC bind_var_opt . inline_export type_use func_info ")" - 95 | "(" FUNC bind_var_opt . type_use func_info ")" - 96 | "(" FUNC bind_var_opt . inline_export func_info ")" - 97 | "(" FUNC bind_var_opt . func_info ")" - 117 import: "(" FUNC bind_var_opt . inline_import type_use ")" - 118 | "(" FUNC bind_var_opt . inline_import func_sig ")" - - "(" shift, and go to state 119 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - type_use go to state 147 - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 152 - func_fields go to state 153 - func_body go to state 154 - func_info go to state 155 - inline_import go to state 156 - inline_export go to state 157 + 46 plain_instr: BR_IF . var + + NAT shift, and go to state 53 + VAR shift, and go to state 54 + + nat go to state 55 + var go to state 196 State 97 - 21 nat: NAT . + 47 plain_instr: BR_TABLE . var_list var - $default reduce using rule 21 (nat) + $default reduce using rule 27 (var_list) + + var_list go to state 197 State 98 - 26 var: VAR . + 49 plain_instr: CALL . var - $default reduce using rule 26 (var) + NAT shift, and go to state 53 + VAR shift, and go to state 54 + + nat go to state 55 + var go to state 198 State 99 - 25 var: nat . + 50 plain_instr: CALL_INDIRECT . var - $default reduce using rule 25 (var) + NAT shift, and go to state 53 + VAR shift, and go to state 54 + + nat go to state 55 + var go to state 199 State 100 - 133 start: "(" START var . ")" + 48 plain_instr: RETURN . - ")" shift, and go to state 158 + $default reduce using rule 48 (plain_instr) State 101 - 11 func_type: "(" . FUNC func_sig ")" + 51 plain_instr: GET_LOCAL . var + + NAT shift, and go to state 53 + VAR shift, and go to state 54 - FUNC shift, and go to state 159 + nat go to state 55 + var go to state 200 State 102 - 131 type_def: "(" TYPE func_type . ")" + 52 plain_instr: SET_LOCAL . var - ")" shift, and go to state 160 + NAT shift, and go to state 53 + VAR shift, and go to state 54 + + nat go to state 55 + var go to state 201 State 103 - 132 type_def: "(" TYPE bind_var . func_type ")" + 53 plain_instr: TEE_LOCAL . var - "(" shift, and go to state 101 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - func_type go to state 161 + nat go to state 55 + var go to state 202 State 104 - 109 global: "(" GLOBAL bind_var_opt . inline_export global_type const_expr ")" - 110 | "(" GLOBAL bind_var_opt . global_type const_expr ")" - 121 import: "(" GLOBAL bind_var_opt . inline_import global_type ")" + 54 plain_instr: GET_GLOBAL . var - "(" shift, and go to state 162 - VALUE_TYPE shift, and go to state 163 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - global_type go to state 164 - inline_import go to state 165 - inline_export go to state 166 + nat go to state 55 + var go to state 203 State 105 - 102 table: "(" TABLE bind_var_opt . inline_export_opt table_sig ")" - 103 | "(" TABLE bind_var_opt . inline_export_opt elem_type "(" ELEM var_list ")" ")" - 119 import: "(" TABLE bind_var_opt . inline_import table_sig ")" - - "(" shift, and go to state 167 + 55 plain_instr: SET_GLOBAL . var - $default reduce using rule 128 (inline_export_opt) + NAT shift, and go to state 53 + VAR shift, and go to state 54 - inline_import go to state 168 - inline_export_opt go to state 169 - inline_export go to state 170 + nat go to state 55 + var go to state 204 State 106 - 70 expr: "(" . expr1 ")" - 98 offset: "(" . OFFSET const_expr ")" - - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 171 - IF shift, and go to state 172 - LOOP shift, and go to state 173 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - OFFSET shift, and go to state 174 - - plain_instr go to state 175 - expr1 go to state 176 + 56 plain_instr: LOAD . offset_opt align_opt + + OFFSET_EQ_NAT shift, and go to state 205 + + $default reduce using rule 34 (offset_opt) + + offset_opt go to state 206 State 107 - 100 elem: "(" ELEM var . offset var_list ")" + 57 plain_instr: STORE . offset_opt align_opt + + OFFSET_EQ_NAT shift, and go to state 205 - "(" shift, and go to state 106 + $default reduce using rule 34 (offset_opt) - expr go to state 108 - offset go to state 177 + offset_opt go to state 207 State 108 - 99 offset: expr . + 58 plain_instr: CONST . literal + + NAT shift, and go to state 208 + INT shift, and go to state 209 + FLOAT shift, and go to state 210 - $default reduce using rule 99 (offset) + literal go to state 211 State 109 - 101 elem: "(" ELEM offset . var_list ")" - - $default reduce using rule 27 (var_list) + 59 plain_instr: UNARY . - var_list go to state 178 + $default reduce using rule 59 (plain_instr) State 110 - 106 memory: "(" MEMORY bind_var_opt . inline_export_opt memory_sig ")" - 107 | "(" MEMORY bind_var_opt . inline_export "(" DATA text_list ")" ")" - 108 | "(" MEMORY bind_var_opt . "(" DATA text_list ")" ")" - 120 import: "(" MEMORY bind_var_opt . inline_import memory_sig ")" - - "(" shift, and go to state 179 - - $default reduce using rule 128 (inline_export_opt) + 60 plain_instr: BINARY . - inline_import go to state 180 - inline_export_opt go to state 181 - inline_export go to state 182 + $default reduce using rule 60 (plain_instr) State 111 - 104 data: "(" DATA var . offset text_list ")" - - "(" shift, and go to state 106 + 61 plain_instr: COMPARE . - expr go to state 108 - offset go to state 183 + $default reduce using rule 61 (plain_instr) State 112 - 105 data: "(" DATA offset . text_list ")" - - TEXT shift, and go to state 43 - - $default reduce using rule 3 (text_list) + 62 plain_instr: CONVERT . - non_empty_text_list go to state 184 - text_list go to state 185 + $default reduce using rule 62 (plain_instr) State 113 - 116 import: "(" IMPORT quoted_text . quoted_text import_kind ")" - - TEXT shift, and go to state 26 + 44 plain_instr: SELECT . - quoted_text go to state 186 + $default reduce using rule 44 (plain_instr) State 114 - 127 export: "(" EXPORT quoted_text . export_kind ")" - - "(" shift, and go to state 187 + 41 plain_instr: UNREACHABLE . - export_kind go to state 188 + $default reduce using rule 41 (plain_instr) State 115 - 22 literal: NAT . + 63 plain_instr: CURRENT_MEMORY . - $default reduce using rule 22 (literal) + $default reduce using rule 63 (plain_instr) State 116 - 23 literal: INT . + 64 plain_instr: GROW_MEMORY . - $default reduce using rule 23 (literal) + $default reduce using rule 64 (plain_instr) State 117 - 24 literal: FLOAT . - - $default reduce using rule 24 (literal) + 91 func_fields: type_use . func_fields_body + + "(" shift, and go to state 212 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 122 + func_fields_body go to state 213 + func_fields_body1 go to state 125 + func_body go to state 126 + func_body1 go to state 127 State 118 - 167 const: "(" CONST literal . ")" + 86 instr_list: instr . instr_list - ")" shift, and go to state 189 + "(" shift, and go to state 214 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 215 State 119 - 20 type_use: "(" . TYPE var ")" - 70 expr: "(" . expr1 ")" - 87 func_fields: "(" . RESULT value_type_list ")" func_body - 88 | "(" . PARAM value_type_list ")" func_fields - 89 | "(" . PARAM bind_var VALUE_TYPE ")" func_fields - 91 func_body: "(" . LOCAL value_type_list ")" func_body - 92 | "(" . LOCAL bind_var VALUE_TYPE ")" func_body - 122 inline_import: "(" . IMPORT quoted_text quoted_text ")" - 130 inline_export: "(" . EXPORT quoted_text ")" - - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 171 - IF shift, and go to state 172 - LOOP shift, and go to state 173 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - TYPE shift, and go to state 190 - PARAM shift, and go to state 191 - RESULT shift, and go to state 192 - LOCAL shift, and go to state 193 - IMPORT shift, and go to state 194 - EXPORT shift, and go to state 195 - - plain_instr go to state 175 - expr1 go to state 176 + 38 instr: plain_instr . + + $default reduce using rule 38 (instr) State 120 - 42 plain_instr: NOP . + 39 instr: block_instr . - $default reduce using rule 42 (plain_instr) + $default reduce using rule 39 (instr) State 121 - 43 plain_instr: DROP . + 40 instr: expr . - $default reduce using rule 43 (plain_instr) + $default reduce using rule 40 (instr) State 122 - 65 block_instr: BLOCK . labeling_opt block END labeling_opt + 107 func_body1: instr_list . - VAR shift, and go to state 23 - - $default reduce using rule 32 (labeling_opt) - - bind_var go to state 196 - labeling_opt go to state 197 + $default reduce using rule 107 (func_body1) State 123 - 67 block_instr: IF . labeling_opt block END labeling_opt - 68 | IF . labeling_opt block ELSE labeling_opt instr_list END labeling_opt - - VAR shift, and go to state 23 - - $default reduce using rule 32 (labeling_opt) + 90 func: "(" FUNC bind_var_opt func_fields . ")" - bind_var go to state 196 - labeling_opt go to state 198 + ")" shift, and go to state 216 State 124 - 66 block_instr: LOOP . labeling_opt block END labeling_opt - - VAR shift, and go to state 23 - - $default reduce using rule 32 (labeling_opt) + 92 func_fields: func_fields_body . - bind_var go to state 196 - labeling_opt go to state 199 + $default reduce using rule 92 (func_fields) State 125 - 45 plain_instr: BR . var - - NAT shift, and go to state 97 - VAR shift, and go to state 98 + 101 func_fields_body: func_fields_body1 . - nat go to state 99 - var go to state 200 + $default reduce using rule 101 (func_fields_body) State 126 - 46 plain_instr: BR_IF . var - - NAT shift, and go to state 97 - VAR shift, and go to state 98 + 102 func_fields_body1: func_body . - nat go to state 99 - var go to state 201 + $default reduce using rule 102 (func_fields_body1) State 127 - 47 plain_instr: BR_TABLE . var_list var + 106 func_body: func_body1 . - $default reduce using rule 27 (var_list) - - var_list go to state 202 + $default reduce using rule 106 (func_body) State 128 - 49 plain_instr: CALL . var - - NAT shift, and go to state 97 - VAR shift, and go to state 98 + 93 func_fields: inline_import . type_use func_fields_import + 94 | inline_import . func_fields_import - nat go to state 99 - var go to state 203 + "(" shift, and go to state 217 + $default reduce using rule 97 (func_fields_import1) -State 129 + type_use go to state 218 + func_fields_import go to state 219 + func_fields_import1 go to state 220 - 50 plain_instr: CALL_INDIRECT . var - NAT shift, and go to state 97 - VAR shift, and go to state 98 +State 129 - nat go to state 99 - var go to state 204 + 95 func_fields: inline_export . func_fields + + "(" shift, and go to state 89 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + type_use go to state 117 + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 122 + func_fields go to state 221 + func_fields_body go to state 124 + func_fields_body1 go to state 125 + func_body go to state 126 + func_body1 go to state 127 + inline_import go to state 128 + inline_export go to state 129 State 130 - 48 plain_instr: RETURN . + 145 start: "(" START var ")" . - $default reduce using rule 48 (plain_instr) + $default reduce using rule 145 (start) State 131 - 51 plain_instr: GET_LOCAL . var + 11 func_type: "(" FUNC . func_sig ")" - NAT shift, and go to state 97 - VAR shift, and go to state 98 + "(" shift, and go to state 222 - nat go to state 99 - var go to state 205 + $default reduce using rule 12 (func_sig) + func_sig go to state 223 -State 132 - 52 plain_instr: SET_LOCAL . var +State 132 - NAT shift, and go to state 97 - VAR shift, and go to state 98 + 143 type_def: "(" TYPE func_type ")" . - nat go to state 99 - var go to state 206 + $default reduce using rule 143 (type_def) State 133 - 53 plain_instr: TEE_LOCAL . var - - NAT shift, and go to state 97 - VAR shift, and go to state 98 + 144 type_def: "(" TYPE bind_var func_type . ")" - nat go to state 99 - var go to state 207 + ")" shift, and go to state 224 State 134 - 54 plain_instr: GET_GLOBAL . var - - NAT shift, and go to state 97 - VAR shift, and go to state 98 + 10 global_type: "(" . MUT VALUE_TYPE ")" + 136 inline_import: "(" . IMPORT quoted_text quoted_text ")" + 142 inline_export: "(" . EXPORT quoted_text ")" - nat go to state 99 - var go to state 208 + MUT shift, and go to state 225 + IMPORT shift, and go to state 189 + EXPORT shift, and go to state 190 State 135 - 55 plain_instr: SET_GLOBAL . var - - NAT shift, and go to state 97 - VAR shift, and go to state 98 + 9 global_type: VALUE_TYPE . - nat go to state 99 - var go to state 209 + $default reduce using rule 9 (global_type) State 136 - 56 plain_instr: LOAD . offset_opt align_opt - - OFFSET_EQ_NAT shift, and go to state 210 + 127 global_fields: global_type . const_expr - $default reduce using rule 34 (offset_opt) - - offset_opt go to state 211 + "(" shift, and go to state 214 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 226 + const_expr go to state 227 State 137 - 57 plain_instr: STORE . offset_opt align_opt - - OFFSET_EQ_NAT shift, and go to state 210 - - $default reduce using rule 34 (offset_opt) + 126 global: "(" GLOBAL bind_var_opt global_fields . ")" - offset_opt go to state 212 + ")" shift, and go to state 228 State 138 - 58 plain_instr: CONST . literal + 128 global_fields: inline_import . global_type - NAT shift, and go to state 115 - INT shift, and go to state 116 - FLOAT shift, and go to state 117 + "(" shift, and go to state 229 + VALUE_TYPE shift, and go to state 135 - literal go to state 213 + global_type go to state 230 State 139 - 59 plain_instr: UNARY . + 129 global_fields: inline_export . global_fields - $default reduce using rule 59 (plain_instr) + "(" shift, and go to state 134 + VALUE_TYPE shift, and go to state 135 + + global_type go to state 136 + global_fields go to state 231 + inline_import go to state 138 + inline_export go to state 139 State 140 - 60 plain_instr: BINARY . + 1 text_list: TEXT . - $default reduce using rule 60 (plain_instr) + $default reduce using rule 1 (text_list) State 141 - 61 plain_instr: COMPARE . + 2 text_list: text_list . TEXT + 161 raw_module: "(" MODULE bind_var_opt text_list . ")" - $default reduce using rule 61 (plain_instr) + ")" shift, and go to state 232 + TEXT shift, and go to state 233 State 142 - 62 plain_instr: CONVERT . + 160 raw_module: "(" MODULE bind_var_opt module_fields_opt . ")" - $default reduce using rule 62 (plain_instr) + ")" shift, and go to state 234 State 143 - 44 plain_instr: SELECT . + 157 module_fields_opt: module_fields . + 159 module_fields: module_fields . module_field - $default reduce using rule 44 (plain_instr) + "(" shift, and go to state 45 + + $default reduce using rule 157 (module_fields_opt) + + func go to state 2 + elem go to state 3 + table go to state 4 + data go to state 5 + memory go to state 6 + global go to state 7 + import go to state 8 + export go to state 9 + type_def go to state 10 + start go to state 11 + module_field go to state 46 State 144 - 41 plain_instr: UNREACHABLE . + 136 inline_import: "(" . IMPORT quoted_text quoted_text ")" + 142 inline_export: "(" . EXPORT quoted_text ")" - $default reduce using rule 41 (plain_instr) + IMPORT shift, and go to state 189 + EXPORT shift, and go to state 190 State 145 - 63 plain_instr: CURRENT_MEMORY . + 8 elem_type: ANYFUNC . - $default reduce using rule 63 (plain_instr) + $default reduce using rule 8 (elem_type) State 146 - 64 plain_instr: GROW_MEMORY . + 118 table_fields: elem_type . "(" ELEM var_list ")" - $default reduce using rule 64 (plain_instr) + "(" shift, and go to state 235 State 147 - 95 func: "(" FUNC bind_var_opt type_use . func_info ")" + 115 table_fields: table_sig . - "(" shift, and go to state 214 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 152 - func_fields go to state 153 - func_body go to state 154 - func_info go to state 215 + $default reduce using rule 115 (table_fields) State 148 - 82 instr_list: instr . instr_list - - "(" shift, and go to state 216 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 217 + 16 table_sig: limits . elem_type + + ANYFUNC shift, and go to state 145 + + elem_type go to state 236 State 149 - 38 instr: plain_instr . + 18 limits: nat . + 19 | nat . nat - $default reduce using rule 38 (instr) + NAT shift, and go to state 53 + + $default reduce using rule 18 (limits) + + nat go to state 237 State 150 - 39 instr: block_instr . + 114 table: "(" TABLE bind_var_opt table_fields . ")" - $default reduce using rule 39 (instr) + ")" shift, and go to state 238 State 151 - 40 instr: expr . + 116 table_fields: inline_import . table_sig - $default reduce using rule 40 (instr) + NAT shift, and go to state 53 + + table_sig go to state 239 + limits go to state 148 + nat go to state 149 State 152 - 90 func_body: instr_list . + 117 table_fields: inline_export . table_fields + + "(" shift, and go to state 144 + NAT shift, and go to state 53 + ANYFUNC shift, and go to state 145 - $default reduce using rule 90 (func_body) + elem_type go to state 146 + table_sig go to state 147 + limits go to state 148 + nat go to state 149 + table_fields go to state 240 + inline_import go to state 151 + inline_export go to state 152 State 153 - 93 func_info: func_fields . + 74 expr1: BLOCK . labeling_opt block - $default reduce using rule 93 (func_info) + VAR shift, and go to state 50 + + $default reduce using rule 32 (labeling_opt) + + bind_var go to state 191 + labeling_opt go to state 241 State 154 - 86 func_fields: func_body . + 76 expr1: IF . labeling_opt if_block + + VAR shift, and go to state 50 - $default reduce using rule 86 (func_fields) + $default reduce using rule 32 (labeling_opt) + + bind_var go to state 191 + labeling_opt go to state 242 State 155 - 97 func: "(" FUNC bind_var_opt func_info . ")" + 75 expr1: LOOP . labeling_opt block - ")" shift, and go to state 218 + VAR shift, and go to state 50 + $default reduce using rule 32 (labeling_opt) -State 156 + bind_var go to state 191 + labeling_opt go to state 243 - 117 import: "(" FUNC bind_var_opt inline_import . type_use ")" - 118 | "(" FUNC bind_var_opt inline_import . func_sig ")" - "(" shift, and go to state 219 +State 156 - $default reduce using rule 12 (func_sig) + 110 offset: "(" OFFSET . const_expr ")" - func_sig go to state 220 - type_use go to state 221 + "(" shift, and go to state 214 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 226 + const_expr go to state 244 State 157 - 94 func: "(" FUNC bind_var_opt inline_export . type_use func_info ")" - 96 | "(" FUNC bind_var_opt inline_export . func_info ")" - - "(" shift, and go to state 222 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - type_use go to state 223 - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 152 - func_fields go to state 153 - func_body go to state 154 - func_info go to state 224 + 73 expr1: plain_instr . expr_list + + "(" shift, and go to state 214 + + $default reduce using rule 87 (expr_list) + + expr go to state 245 + expr_list go to state 246 State 158 - 133 start: "(" START var ")" . + 72 expr: "(" expr1 . ")" - $default reduce using rule 133 (start) + ")" shift, and go to state 247 State 159 - 11 func_type: "(" FUNC . func_sig ")" - - "(" shift, and go to state 225 + 112 elem: "(" ELEM var offset . var_list ")" - $default reduce using rule 12 (func_sig) + $default reduce using rule 27 (var_list) - func_sig go to state 226 + var_list go to state 248 State 160 - 131 type_def: "(" TYPE func_type ")" . + 28 var_list: var_list . var + 113 elem: "(" ELEM offset var_list . ")" + + ")" shift, and go to state 249 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - $default reduce using rule 131 (type_def) + nat go to state 55 + var go to state 250 State 161 - 132 type_def: "(" TYPE bind_var func_type . ")" + 125 memory_fields: "(" . DATA text_list_opt ")" + 136 inline_import: "(" . IMPORT quoted_text quoted_text ")" + 142 inline_export: "(" . EXPORT quoted_text ")" - ")" shift, and go to state 227 + DATA shift, and go to state 251 + IMPORT shift, and go to state 189 + EXPORT shift, and go to state 190 State 162 - 10 global_type: "(" . MUT VALUE_TYPE ")" - 122 inline_import: "(" . IMPORT quoted_text quoted_text ")" - 130 inline_export: "(" . EXPORT quoted_text ")" + 122 memory_fields: memory_sig . - MUT shift, and go to state 228 - IMPORT shift, and go to state 194 - EXPORT shift, and go to state 195 + $default reduce using rule 122 (memory_fields) State 163 - 9 global_type: VALUE_TYPE . + 17 memory_sig: limits . - $default reduce using rule 9 (global_type) + $default reduce using rule 17 (memory_sig) State 164 - 110 global: "(" GLOBAL bind_var_opt global_type . const_expr ")" - - "(" shift, and go to state 216 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 229 - const_expr go to state 230 + 121 memory: "(" MEMORY bind_var_opt memory_fields . ")" + + ")" shift, and go to state 252 State 165 - 121 import: "(" GLOBAL bind_var_opt inline_import . global_type ")" + 123 memory_fields: inline_import . memory_sig - "(" shift, and go to state 231 - VALUE_TYPE shift, and go to state 163 + NAT shift, and go to state 53 - global_type go to state 232 + memory_sig go to state 253 + limits go to state 163 + nat go to state 149 State 166 - 109 global: "(" GLOBAL bind_var_opt inline_export . global_type const_expr ")" + 124 memory_fields: inline_export . memory_fields - "(" shift, and go to state 231 - VALUE_TYPE shift, and go to state 163 + "(" shift, and go to state 161 + NAT shift, and go to state 53 - global_type go to state 233 + memory_sig go to state 162 + limits go to state 163 + nat go to state 149 + memory_fields go to state 254 + inline_import go to state 165 + inline_export go to state 166 State 167 - 122 inline_import: "(" . IMPORT quoted_text quoted_text ")" - 130 inline_export: "(" . EXPORT quoted_text ")" + 119 data: "(" DATA var offset . text_list_opt ")" - IMPORT shift, and go to state 194 - EXPORT shift, and go to state 195 + TEXT shift, and go to state 140 + + $default reduce using rule 3 (text_list_opt) + + text_list go to state 168 + text_list_opt go to state 255 State 168 - 119 import: "(" TABLE bind_var_opt inline_import . table_sig ")" + 2 text_list: text_list . TEXT + 4 text_list_opt: text_list . - NAT shift, and go to state 97 + TEXT shift, and go to state 233 - table_sig go to state 234 - limits go to state 235 - nat go to state 236 + $default reduce using rule 4 (text_list_opt) State 169 - 102 table: "(" TABLE bind_var_opt inline_export_opt . table_sig ")" - 103 | "(" TABLE bind_var_opt inline_export_opt . elem_type "(" ELEM var_list ")" ")" - - NAT shift, and go to state 97 - ANYFUNC shift, and go to state 237 + 120 data: "(" DATA offset text_list_opt . ")" - elem_type go to state 238 - table_sig go to state 239 - limits go to state 235 - nat go to state 236 + ")" shift, and go to state 256 State 170 - 129 inline_export_opt: inline_export . + 135 import: "(" IMPORT quoted_text quoted_text . import_desc ")" - $default reduce using rule 129 (inline_export_opt) + "(" shift, and go to state 257 + import_desc go to state 258 -State 171 - 72 expr1: BLOCK . labeling_opt block - - VAR shift, and go to state 23 +State 171 - $default reduce using rule 32 (labeling_opt) + 137 export_desc: "(" . FUNC var ")" + 138 | "(" . TABLE var ")" + 139 | "(" . MEMORY var ")" + 140 | "(" . GLOBAL var ")" - bind_var go to state 196 - labeling_opt go to state 240 + FUNC shift, and go to state 259 + GLOBAL shift, and go to state 260 + TABLE shift, and go to state 261 + MEMORY shift, and go to state 262 State 172 - 74 expr1: IF . labeling_opt value_type_list if_ - - VAR shift, and go to state 23 - - $default reduce using rule 32 (labeling_opt) + 141 export: "(" EXPORT quoted_text export_desc . ")" - bind_var go to state 196 - labeling_opt go to state 241 + ")" shift, and go to state 263 State 173 - 73 expr1: LOOP . labeling_opt block + 180 cmd: "(" REGISTER quoted_text script_var_opt . ")" - VAR shift, and go to state 23 - - $default reduce using rule 32 (labeling_opt) - - bind_var go to state 196 - labeling_opt go to state 242 + ")" shift, and go to state 264 State 174 - 98 offset: "(" OFFSET . const_expr ")" - - "(" shift, and go to state 216 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 229 - const_expr go to state 243 + 166 action: "(" INVOKE script_var_opt quoted_text . const_list ")" + $default reduce using rule 184 (const_list) -State 175 + const_list go to state 265 - 71 expr1: plain_instr . expr_list - "(" shift, and go to state 216 +State 175 - $default reduce using rule 83 (expr_list) + 167 action: "(" GET script_var_opt quoted_text . ")" - expr go to state 244 - expr_list go to state 245 + ")" shift, and go to state 266 State 176 - 70 expr: "(" expr1 . ")" + 168 assertion: "(" ASSERT_MALFORMED raw_module quoted_text . ")" - ")" shift, and go to state 246 + ")" shift, and go to state 267 State 177 - 100 elem: "(" ELEM var offset . var_list ")" - - $default reduce using rule 27 (var_list) + 169 assertion: "(" ASSERT_INVALID raw_module quoted_text . ")" - var_list go to state 247 + ")" shift, and go to state 268 State 178 - 28 var_list: var_list . var - 101 elem: "(" ELEM offset var_list . ")" + 170 assertion: "(" ASSERT_UNLINKABLE raw_module quoted_text . ")" - ")" shift, and go to state 248 - NAT shift, and go to state 97 - VAR shift, and go to state 98 - - nat go to state 99 - var go to state 249 + ")" shift, and go to state 269 State 179 - 108 memory: "(" MEMORY bind_var_opt "(" . DATA text_list ")" ")" - 122 inline_import: "(" . IMPORT quoted_text quoted_text ")" - 130 inline_export: "(" . EXPORT quoted_text ")" + 172 assertion: "(" ASSERT_RETURN action const_list . ")" + 185 const_list: const_list . const - DATA shift, and go to state 250 - IMPORT shift, and go to state 194 - EXPORT shift, and go to state 195 + "(" shift, and go to state 270 + ")" shift, and go to state 271 + const go to state 272 -State 180 - 120 import: "(" MEMORY bind_var_opt inline_import . memory_sig ")" +State 180 - NAT shift, and go to state 97 + 173 assertion: "(" ASSERT_RETURN_CANONICAL_NAN action ")" . - memory_sig go to state 251 - limits go to state 252 - nat go to state 236 + $default reduce using rule 173 (assertion) State 181 - 106 memory: "(" MEMORY bind_var_opt inline_export_opt . memory_sig ")" + 174 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN action ")" . - NAT shift, and go to state 97 - - memory_sig go to state 253 - limits go to state 252 - nat go to state 236 + $default reduce using rule 174 (assertion) State 182 - 107 memory: "(" MEMORY bind_var_opt inline_export . "(" DATA text_list ")" ")" - 129 inline_export_opt: inline_export . + 171 assertion: "(" ASSERT_TRAP raw_module quoted_text . ")" - "(" shift, and go to state 254 - - $default reduce using rule 129 (inline_export_opt) + ")" shift, and go to state 273 State 183 - 104 data: "(" DATA var offset . text_list ")" - - TEXT shift, and go to state 43 + 175 assertion: "(" ASSERT_TRAP action quoted_text . ")" - $default reduce using rule 3 (text_list) - - non_empty_text_list go to state 184 - text_list go to state 255 + ")" shift, and go to state 274 State 184 - 2 non_empty_text_list: non_empty_text_list . TEXT - 4 text_list: non_empty_text_list . - - TEXT shift, and go to state 59 + 176 assertion: "(" ASSERT_EXHAUSTION action quoted_text . ")" - $default reduce using rule 4 (text_list) + ")" shift, and go to state 275 State 185 - 105 data: "(" DATA offset text_list . ")" - - ")" shift, and go to state 256 - - -State 186 - - 116 import: "(" IMPORT quoted_text quoted_text . import_kind ")" - - "(" shift, and go to state 257 - - import_kind go to state 258 - - -State 187 - - 123 export_kind: "(" . FUNC var ")" - 124 | "(" . TABLE var ")" - 125 | "(" . MEMORY var ")" - 126 | "(" . GLOBAL var ")" - - FUNC shift, and go to state 259 - GLOBAL shift, and go to state 260 - TABLE shift, and go to state 261 - MEMORY shift, and go to state 262 - - -State 188 - - 127 export: "(" EXPORT quoted_text export_kind . ")" - - ")" shift, and go to state 263 - - -State 189 - - 167 const: "(" CONST literal ")" . - - $default reduce using rule 167 (const) - - -State 190 - 20 type_use: "(" TYPE . var ")" - NAT shift, and go to state 97 - VAR shift, and go to state 98 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - nat go to state 99 - var go to state 264 + nat go to state 55 + var go to state 276 -State 191 +State 186 - 88 func_fields: "(" PARAM . value_type_list ")" func_fields - 89 | "(" PARAM . bind_var VALUE_TYPE ")" func_fields + 104 func_fields_body1: "(" PARAM . value_type_list ")" func_fields_body1 + 105 | "(" PARAM . bind_var VALUE_TYPE ")" func_fields_body1 - VAR shift, and go to state 23 + VAR shift, and go to state 50 $default reduce using rule 6 (value_type_list) - value_type_list go to state 265 - bind_var go to state 266 + value_type_list go to state 277 + bind_var go to state 278 -State 192 +State 187 - 87 func_fields: "(" RESULT . value_type_list ")" func_body + 103 func_fields_body1: "(" RESULT . value_type_list ")" func_body $default reduce using rule 6 (value_type_list) - value_type_list go to state 267 + value_type_list go to state 279 -State 193 +State 188 - 91 func_body: "(" LOCAL . value_type_list ")" func_body - 92 | "(" LOCAL . bind_var VALUE_TYPE ")" func_body + 108 func_body1: "(" LOCAL . value_type_list ")" func_body1 + 109 | "(" LOCAL . bind_var VALUE_TYPE ")" func_body1 - VAR shift, and go to state 23 + VAR shift, and go to state 50 $default reduce using rule 6 (value_type_list) - value_type_list go to state 268 - bind_var go to state 269 + value_type_list go to state 280 + bind_var go to state 281 -State 194 +State 189 - 122 inline_import: "(" IMPORT . quoted_text quoted_text ")" + 136 inline_import: "(" IMPORT . quoted_text quoted_text ")" - TEXT shift, and go to state 26 + TEXT shift, and go to state 70 - quoted_text go to state 270 + quoted_text go to state 282 -State 195 +State 190 - 130 inline_export: "(" EXPORT . quoted_text ")" + 142 inline_export: "(" EXPORT . quoted_text ")" - TEXT shift, and go to state 26 + TEXT shift, and go to state 70 - quoted_text go to state 271 + quoted_text go to state 283 -State 196 +State 191 33 labeling_opt: bind_var . $default reduce using rule 33 (labeling_opt) -State 197 +State 192 65 block_instr: BLOCK labeling_opt . block END labeling_opt - $default reduce using rule 6 (value_type_list) - - value_type_list go to state 272 - block go to state 273 + "(" shift, and go to state 284 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + block_sig go to state 285 + block go to state 286 + expr go to state 121 + instr_list go to state 287 -State 198 +State 193 67 block_instr: IF labeling_opt . block END labeling_opt 68 | IF labeling_opt . block ELSE labeling_opt instr_list END labeling_opt - $default reduce using rule 6 (value_type_list) - - value_type_list go to state 272 - block go to state 274 + "(" shift, and go to state 284 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + block_sig go to state 285 + block go to state 288 + expr go to state 121 + instr_list go to state 287 -State 199 +State 194 66 block_instr: LOOP labeling_opt . block END labeling_opt - $default reduce using rule 6 (value_type_list) - - value_type_list go to state 272 - block go to state 275 + "(" shift, and go to state 284 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + block_sig go to state 285 + block go to state 289 + expr go to state 121 + instr_list go to state 287 -State 200 +State 195 45 plain_instr: BR var . $default reduce using rule 45 (plain_instr) -State 201 +State 196 46 plain_instr: BR_IF var . $default reduce using rule 46 (plain_instr) -State 202 +State 197 28 var_list: var_list . var 47 plain_instr: BR_TABLE var_list . var - NAT shift, and go to state 97 - VAR shift, and go to state 98 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - nat go to state 99 - var go to state 276 + nat go to state 55 + var go to state 290 -State 203 +State 198 49 plain_instr: CALL var . $default reduce using rule 49 (plain_instr) -State 204 +State 199 50 plain_instr: CALL_INDIRECT var . $default reduce using rule 50 (plain_instr) -State 205 +State 200 51 plain_instr: GET_LOCAL var . $default reduce using rule 51 (plain_instr) -State 206 +State 201 52 plain_instr: SET_LOCAL var . $default reduce using rule 52 (plain_instr) -State 207 +State 202 53 plain_instr: TEE_LOCAL var . $default reduce using rule 53 (plain_instr) -State 208 +State 203 54 plain_instr: GET_GLOBAL var . $default reduce using rule 54 (plain_instr) -State 209 +State 204 55 plain_instr: SET_GLOBAL var . $default reduce using rule 55 (plain_instr) -State 210 +State 205 35 offset_opt: OFFSET_EQ_NAT . $default reduce using rule 35 (offset_opt) -State 211 +State 206 56 plain_instr: LOAD offset_opt . align_opt - ALIGN_EQ_NAT shift, and go to state 277 + ALIGN_EQ_NAT shift, and go to state 291 $default reduce using rule 36 (align_opt) - align_opt go to state 278 + align_opt go to state 292 -State 212 +State 207 57 plain_instr: STORE offset_opt . align_opt - ALIGN_EQ_NAT shift, and go to state 277 + ALIGN_EQ_NAT shift, and go to state 291 $default reduce using rule 36 (align_opt) - align_opt go to state 279 + align_opt go to state 293 -State 213 +State 208 + + 22 literal: NAT . + + $default reduce using rule 22 (literal) + + +State 209 + + 23 literal: INT . + + $default reduce using rule 23 (literal) + + +State 210 + + 24 literal: FLOAT . + + $default reduce using rule 24 (literal) + + +State 211 58 plain_instr: CONST literal . $default reduce using rule 58 (plain_instr) +State 212 + + 72 expr: "(" . expr1 ")" + 103 func_fields_body1: "(" . RESULT value_type_list ")" func_body + 104 | "(" . PARAM value_type_list ")" func_fields_body1 + 105 | "(" . PARAM bind_var VALUE_TYPE ")" func_fields_body1 + 108 func_body1: "(" . LOCAL value_type_list ")" func_body1 + 109 | "(" . LOCAL bind_var VALUE_TYPE ")" func_body1 + + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 153 + IF shift, and go to state 154 + LOOP shift, and go to state 155 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + PARAM shift, and go to state 186 + RESULT shift, and go to state 187 + LOCAL shift, and go to state 188 + + plain_instr go to state 157 + expr1 go to state 158 + + +State 213 + + 91 func_fields: type_use func_fields_body . + + $default reduce using rule 91 (func_fields) + + State 214 - 70 expr: "(" . expr1 ")" - 87 func_fields: "(" . RESULT value_type_list ")" func_body - 88 | "(" . PARAM value_type_list ")" func_fields - 89 | "(" . PARAM bind_var VALUE_TYPE ")" func_fields - 91 func_body: "(" . LOCAL value_type_list ")" func_body - 92 | "(" . LOCAL bind_var VALUE_TYPE ")" func_body - - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 171 - IF shift, and go to state 172 - LOOP shift, and go to state 173 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - PARAM shift, and go to state 191 - RESULT shift, and go to state 192 - LOCAL shift, and go to state 193 - - plain_instr go to state 175 - expr1 go to state 176 + 72 expr: "(" . expr1 ")" + + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 153 + IF shift, and go to state 154 + LOOP shift, and go to state 155 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + plain_instr go to state 157 + expr1 go to state 158 State 215 - 95 func: "(" FUNC bind_var_opt type_use func_info . ")" + 86 instr_list: instr instr_list . - ")" shift, and go to state 280 + $default reduce using rule 86 (instr_list) State 216 - 70 expr: "(" . expr1 ")" - - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 171 - IF shift, and go to state 172 - LOOP shift, and go to state 173 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - plain_instr go to state 175 - expr1 go to state 176 + 90 func: "(" FUNC bind_var_opt func_fields ")" . + + $default reduce using rule 90 (func) State 217 - 82 instr_list: instr instr_list . + 20 type_use: "(" . TYPE var ")" + 98 func_fields_import1: "(" . RESULT value_type_list ")" + 99 | "(" . PARAM value_type_list ")" func_fields_import1 + 100 | "(" . PARAM bind_var VALUE_TYPE ")" func_fields_import1 - $default reduce using rule 82 (instr_list) + TYPE shift, and go to state 185 + PARAM shift, and go to state 294 + RESULT shift, and go to state 295 State 218 - 97 func: "(" FUNC bind_var_opt func_info ")" . + 93 func_fields: inline_import type_use . func_fields_import + + "(" shift, and go to state 296 + + $default reduce using rule 97 (func_fields_import1) - $default reduce using rule 97 (func) + func_fields_import go to state 297 + func_fields_import1 go to state 220 State 219 - 13 func_sig: "(" . PARAM value_type_list ")" - 14 | "(" . PARAM value_type_list ")" "(" RESULT value_type_list ")" - 15 | "(" . RESULT value_type_list ")" - 20 type_use: "(" . TYPE var ")" + 94 func_fields: inline_import func_fields_import . - TYPE shift, and go to state 190 - PARAM shift, and go to state 281 - RESULT shift, and go to state 282 + $default reduce using rule 94 (func_fields) State 220 - 118 import: "(" FUNC bind_var_opt inline_import func_sig . ")" + 96 func_fields_import: func_fields_import1 . - ")" shift, and go to state 283 + $default reduce using rule 96 (func_fields_import) State 221 - 117 import: "(" FUNC bind_var_opt inline_import type_use . ")" + 95 func_fields: inline_export func_fields . - ")" shift, and go to state 284 + $default reduce using rule 95 (func_fields) State 222 - 20 type_use: "(" . TYPE var ")" - 70 expr: "(" . expr1 ")" - 87 func_fields: "(" . RESULT value_type_list ")" func_body - 88 | "(" . PARAM value_type_list ")" func_fields - 89 | "(" . PARAM bind_var VALUE_TYPE ")" func_fields - 91 func_body: "(" . LOCAL value_type_list ")" func_body - 92 | "(" . LOCAL bind_var VALUE_TYPE ")" func_body - - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 171 - IF shift, and go to state 172 - LOOP shift, and go to state 173 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - TYPE shift, and go to state 190 - PARAM shift, and go to state 191 - RESULT shift, and go to state 192 - LOCAL shift, and go to state 193 - - plain_instr go to state 175 - expr1 go to state 176 + 13 func_sig: "(" . PARAM value_type_list ")" + 14 | "(" . PARAM value_type_list ")" "(" RESULT value_type_list ")" + 15 | "(" . RESULT value_type_list ")" + + PARAM shift, and go to state 298 + RESULT shift, and go to state 299 State 223 - 94 func: "(" FUNC bind_var_opt inline_export type_use . func_info ")" + 11 func_type: "(" FUNC func_sig . ")" - "(" shift, and go to state 214 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 152 - func_fields go to state 153 - func_body go to state 154 - func_info go to state 285 + ")" shift, and go to state 300 State 224 - 96 func: "(" FUNC bind_var_opt inline_export func_info . ")" + 144 type_def: "(" TYPE bind_var func_type ")" . - ")" shift, and go to state 286 + $default reduce using rule 144 (type_def) State 225 - 13 func_sig: "(" . PARAM value_type_list ")" - 14 | "(" . PARAM value_type_list ")" "(" RESULT value_type_list ")" - 15 | "(" . RESULT value_type_list ")" + 10 global_type: "(" MUT . VALUE_TYPE ")" - PARAM shift, and go to state 281 - RESULT shift, and go to state 282 + VALUE_TYPE shift, and go to state 301 State 226 - 11 func_type: "(" FUNC func_sig . ")" + 89 const_expr: instr_list . - ")" shift, and go to state 287 + $default reduce using rule 89 (const_expr) State 227 - 132 type_def: "(" TYPE bind_var func_type ")" . + 127 global_fields: global_type const_expr . - $default reduce using rule 132 (type_def) + $default reduce using rule 127 (global_fields) State 228 - 10 global_type: "(" MUT . VALUE_TYPE ")" + 126 global: "(" GLOBAL bind_var_opt global_fields ")" . - VALUE_TYPE shift, and go to state 288 + $default reduce using rule 126 (global) State 229 - 85 const_expr: instr_list . + 10 global_type: "(" . MUT VALUE_TYPE ")" - $default reduce using rule 85 (const_expr) + MUT shift, and go to state 225 State 230 - 110 global: "(" GLOBAL bind_var_opt global_type const_expr . ")" + 128 global_fields: inline_import global_type . - ")" shift, and go to state 289 + $default reduce using rule 128 (global_fields) State 231 - 10 global_type: "(" . MUT VALUE_TYPE ")" + 129 global_fields: inline_export global_fields . - MUT shift, and go to state 228 + $default reduce using rule 129 (global_fields) State 232 - 121 import: "(" GLOBAL bind_var_opt inline_import global_type . ")" + 161 raw_module: "(" MODULE bind_var_opt text_list ")" . - ")" shift, and go to state 290 + $default reduce using rule 161 (raw_module) State 233 - 109 global: "(" GLOBAL bind_var_opt inline_export global_type . const_expr ")" - - "(" shift, and go to state 216 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 229 - const_expr go to state 291 + 2 text_list: text_list TEXT . + + $default reduce using rule 2 (text_list) State 234 - 119 import: "(" TABLE bind_var_opt inline_import table_sig . ")" + 160 raw_module: "(" MODULE bind_var_opt module_fields_opt ")" . - ")" shift, and go to state 292 + $default reduce using rule 160 (raw_module) State 235 - 16 table_sig: limits . elem_type - - ANYFUNC shift, and go to state 237 + 118 table_fields: elem_type "(" . ELEM var_list ")" - elem_type go to state 293 + ELEM shift, and go to state 302 State 236 - 18 limits: nat . - 19 | nat . nat - - NAT shift, and go to state 97 - - $default reduce using rule 18 (limits) + 16 table_sig: limits elem_type . - nat go to state 294 + $default reduce using rule 16 (table_sig) State 237 - 8 elem_type: ANYFUNC . + 19 limits: nat nat . - $default reduce using rule 8 (elem_type) + $default reduce using rule 19 (limits) State 238 - 103 table: "(" TABLE bind_var_opt inline_export_opt elem_type . "(" ELEM var_list ")" ")" + 114 table: "(" TABLE bind_var_opt table_fields ")" . - "(" shift, and go to state 295 + $default reduce using rule 114 (table) State 239 - 102 table: "(" TABLE bind_var_opt inline_export_opt table_sig . ")" + 116 table_fields: inline_import table_sig . - ")" shift, and go to state 296 + $default reduce using rule 116 (table_fields) State 240 - 72 expr1: BLOCK labeling_opt . block - - $default reduce using rule 6 (value_type_list) + 117 table_fields: inline_export table_fields . - value_type_list go to state 272 - block go to state 297 + $default reduce using rule 117 (table_fields) State 241 - 74 expr1: IF labeling_opt . value_type_list if_ - - $default reduce using rule 6 (value_type_list) - - value_type_list go to state 298 + 74 expr1: BLOCK labeling_opt . block + + "(" shift, and go to state 284 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + block_sig go to state 285 + block go to state 303 + expr go to state 121 + instr_list go to state 287 State 242 - 73 expr1: LOOP labeling_opt . block + 76 expr1: IF labeling_opt . if_block - $default reduce using rule 6 (value_type_list) + "(" shift, and go to state 304 - value_type_list go to state 272 - block go to state 299 + block_sig go to state 305 + expr go to state 306 + if_block go to state 307 + if_ go to state 308 State 243 - 98 offset: "(" OFFSET const_expr . ")" - - ")" shift, and go to state 300 + 75 expr1: LOOP labeling_opt . block + + "(" shift, and go to state 284 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + block_sig go to state 285 + block go to state 309 + expr go to state 121 + instr_list go to state 287 State 244 - 84 expr_list: expr . expr_list + 110 offset: "(" OFFSET const_expr . ")" - "(" shift, and go to state 216 + ")" shift, and go to state 310 - $default reduce using rule 83 (expr_list) - expr go to state 244 - expr_list go to state 301 +State 245 + 88 expr_list: expr . expr_list -State 245 + "(" shift, and go to state 214 - 71 expr1: plain_instr expr_list . + $default reduce using rule 87 (expr_list) - $default reduce using rule 71 (expr1) + expr go to state 245 + expr_list go to state 311 State 246 - 70 expr: "(" expr1 ")" . + 73 expr1: plain_instr expr_list . - $default reduce using rule 70 (expr) + $default reduce using rule 73 (expr1) State 247 - 28 var_list: var_list . var - 100 elem: "(" ELEM var offset var_list . ")" + 72 expr: "(" expr1 ")" . - ")" shift, and go to state 302 - NAT shift, and go to state 97 - VAR shift, and go to state 98 - - nat go to state 99 - var go to state 249 + $default reduce using rule 72 (expr) State 248 - 101 elem: "(" ELEM offset var_list ")" . + 28 var_list: var_list . var + 112 elem: "(" ELEM var offset var_list . ")" + + ")" shift, and go to state 312 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - $default reduce using rule 101 (elem) + nat go to state 55 + var go to state 250 State 249 - 28 var_list: var_list var . + 113 elem: "(" ELEM offset var_list ")" . - $default reduce using rule 28 (var_list) + $default reduce using rule 113 (elem) State 250 - 108 memory: "(" MEMORY bind_var_opt "(" DATA . text_list ")" ")" + 28 var_list: var_list var . - TEXT shift, and go to state 43 + $default reduce using rule 28 (var_list) - $default reduce using rule 3 (text_list) - non_empty_text_list go to state 184 - text_list go to state 303 +State 251 + 125 memory_fields: "(" DATA . text_list_opt ")" -State 251 + TEXT shift, and go to state 140 - 120 import: "(" MEMORY bind_var_opt inline_import memory_sig . ")" + $default reduce using rule 3 (text_list_opt) - ")" shift, and go to state 304 + text_list go to state 168 + text_list_opt go to state 313 State 252 - 17 memory_sig: limits . + 121 memory: "(" MEMORY bind_var_opt memory_fields ")" . - $default reduce using rule 17 (memory_sig) + $default reduce using rule 121 (memory) State 253 - 106 memory: "(" MEMORY bind_var_opt inline_export_opt memory_sig . ")" + 123 memory_fields: inline_import memory_sig . - ")" shift, and go to state 305 + $default reduce using rule 123 (memory_fields) State 254 - 107 memory: "(" MEMORY bind_var_opt inline_export "(" . DATA text_list ")" ")" + 124 memory_fields: inline_export memory_fields . - DATA shift, and go to state 306 + $default reduce using rule 124 (memory_fields) State 255 - 104 data: "(" DATA var offset text_list . ")" + 119 data: "(" DATA var offset text_list_opt . ")" - ")" shift, and go to state 307 + ")" shift, and go to state 314 State 256 - 105 data: "(" DATA offset text_list ")" . + 120 data: "(" DATA offset text_list_opt ")" . - $default reduce using rule 105 (data) + $default reduce using rule 120 (data) State 257 - 111 import_kind: "(" . FUNC bind_var_opt type_use ")" - 112 | "(" . FUNC bind_var_opt func_sig ")" - 113 | "(" . TABLE bind_var_opt table_sig ")" - 114 | "(" . MEMORY bind_var_opt memory_sig ")" - 115 | "(" . GLOBAL bind_var_opt global_type ")" + 130 import_desc: "(" . FUNC bind_var_opt type_use ")" + 131 | "(" . FUNC bind_var_opt func_sig ")" + 132 | "(" . TABLE bind_var_opt table_sig ")" + 133 | "(" . MEMORY bind_var_opt memory_sig ")" + 134 | "(" . GLOBAL bind_var_opt global_type ")" - FUNC shift, and go to state 308 - GLOBAL shift, and go to state 309 - TABLE shift, and go to state 310 - MEMORY shift, and go to state 311 + FUNC shift, and go to state 315 + GLOBAL shift, and go to state 316 + TABLE shift, and go to state 317 + MEMORY shift, and go to state 318 State 258 - 116 import: "(" IMPORT quoted_text quoted_text import_kind . ")" + 135 import: "(" IMPORT quoted_text quoted_text import_desc . ")" - ")" shift, and go to state 312 + ")" shift, and go to state 319 State 259 - 123 export_kind: "(" FUNC . var ")" + 137 export_desc: "(" FUNC . var ")" - NAT shift, and go to state 97 - VAR shift, and go to state 98 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - nat go to state 99 - var go to state 313 + nat go to state 55 + var go to state 320 State 260 - 126 export_kind: "(" GLOBAL . var ")" + 140 export_desc: "(" GLOBAL . var ")" - NAT shift, and go to state 97 - VAR shift, and go to state 98 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - nat go to state 99 - var go to state 314 + nat go to state 55 + var go to state 321 State 261 - 124 export_kind: "(" TABLE . var ")" + 138 export_desc: "(" TABLE . var ")" - NAT shift, and go to state 97 - VAR shift, and go to state 98 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - nat go to state 99 - var go to state 315 + nat go to state 55 + var go to state 322 State 262 - 125 export_kind: "(" MEMORY . var ")" + 139 export_desc: "(" MEMORY . var ")" - NAT shift, and go to state 97 - VAR shift, and go to state 98 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - nat go to state 99 - var go to state 316 + nat go to state 55 + var go to state 323 State 263 - 127 export: "(" EXPORT quoted_text export_kind ")" . + 141 export: "(" EXPORT quoted_text export_desc ")" . - $default reduce using rule 127 (export) + $default reduce using rule 141 (export) State 264 - 20 type_use: "(" TYPE var . ")" + 180 cmd: "(" REGISTER quoted_text script_var_opt ")" . - ")" shift, and go to state 317 + $default reduce using rule 180 (cmd) State 265 - 7 value_type_list: value_type_list . VALUE_TYPE - 88 func_fields: "(" PARAM value_type_list . ")" func_fields + 166 action: "(" INVOKE script_var_opt quoted_text const_list . ")" + 185 const_list: const_list . const + + "(" shift, and go to state 270 + ")" shift, and go to state 324 - ")" shift, and go to state 318 - VALUE_TYPE shift, and go to state 319 + const go to state 272 State 266 - 89 func_fields: "(" PARAM bind_var . VALUE_TYPE ")" func_fields + 167 action: "(" GET script_var_opt quoted_text ")" . - VALUE_TYPE shift, and go to state 320 + $default reduce using rule 167 (action) State 267 - 7 value_type_list: value_type_list . VALUE_TYPE - 87 func_fields: "(" RESULT value_type_list . ")" func_body + 168 assertion: "(" ASSERT_MALFORMED raw_module quoted_text ")" . - ")" shift, and go to state 321 - VALUE_TYPE shift, and go to state 319 + $default reduce using rule 168 (assertion) State 268 - 7 value_type_list: value_type_list . VALUE_TYPE - 91 func_body: "(" LOCAL value_type_list . ")" func_body + 169 assertion: "(" ASSERT_INVALID raw_module quoted_text ")" . - ")" shift, and go to state 322 - VALUE_TYPE shift, and go to state 319 + $default reduce using rule 169 (assertion) State 269 - 92 func_body: "(" LOCAL bind_var . VALUE_TYPE ")" func_body + 170 assertion: "(" ASSERT_UNLINKABLE raw_module quoted_text ")" . - VALUE_TYPE shift, and go to state 323 + $default reduce using rule 170 (assertion) State 270 - 122 inline_import: "(" IMPORT quoted_text . quoted_text ")" + 183 const: "(" . CONST literal ")" - TEXT shift, and go to state 26 - - quoted_text go to state 324 + CONST shift, and go to state 325 State 271 - 130 inline_export: "(" EXPORT quoted_text . ")" + 172 assertion: "(" ASSERT_RETURN action const_list ")" . - ")" shift, and go to state 325 + $default reduce using rule 172 (assertion) State 272 - 7 value_type_list: value_type_list . VALUE_TYPE - 69 block: value_type_list . instr_list - - "(" shift, and go to state 216 - VALUE_TYPE shift, and go to state 319 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 326 + 185 const_list: const_list const . + + $default reduce using rule 185 (const_list) State 273 - 65 block_instr: BLOCK labeling_opt block . END labeling_opt + 171 assertion: "(" ASSERT_TRAP raw_module quoted_text ")" . - END shift, and go to state 327 + $default reduce using rule 171 (assertion) State 274 - 67 block_instr: IF labeling_opt block . END labeling_opt - 68 | IF labeling_opt block . ELSE labeling_opt instr_list END labeling_opt + 175 assertion: "(" ASSERT_TRAP action quoted_text ")" . - END shift, and go to state 328 - ELSE shift, and go to state 329 + $default reduce using rule 175 (assertion) State 275 - 66 block_instr: LOOP labeling_opt block . END labeling_opt + 176 assertion: "(" ASSERT_EXHAUSTION action quoted_text ")" . - END shift, and go to state 330 + $default reduce using rule 176 (assertion) State 276 - 28 var_list: var_list var . - 47 plain_instr: BR_TABLE var_list var . + 20 type_use: "(" TYPE var . ")" - NAT reduce using rule 28 (var_list) - VAR reduce using rule 28 (var_list) - $default reduce using rule 47 (plain_instr) + ")" shift, and go to state 326 State 277 - 37 align_opt: ALIGN_EQ_NAT . + 7 value_type_list: value_type_list . VALUE_TYPE + 104 func_fields_body1: "(" PARAM value_type_list . ")" func_fields_body1 - $default reduce using rule 37 (align_opt) + ")" shift, and go to state 327 + VALUE_TYPE shift, and go to state 328 State 278 - 56 plain_instr: LOAD offset_opt align_opt . + 105 func_fields_body1: "(" PARAM bind_var . VALUE_TYPE ")" func_fields_body1 - $default reduce using rule 56 (plain_instr) + VALUE_TYPE shift, and go to state 329 State 279 - 57 plain_instr: STORE offset_opt align_opt . + 7 value_type_list: value_type_list . VALUE_TYPE + 103 func_fields_body1: "(" RESULT value_type_list . ")" func_body - $default reduce using rule 57 (plain_instr) + ")" shift, and go to state 330 + VALUE_TYPE shift, and go to state 328 State 280 - 95 func: "(" FUNC bind_var_opt type_use func_info ")" . + 7 value_type_list: value_type_list . VALUE_TYPE + 108 func_body1: "(" LOCAL value_type_list . ")" func_body1 - $default reduce using rule 95 (func) + ")" shift, and go to state 331 + VALUE_TYPE shift, and go to state 328 State 281 - 13 func_sig: "(" PARAM . value_type_list ")" - 14 | "(" PARAM . value_type_list ")" "(" RESULT value_type_list ")" + 109 func_body1: "(" LOCAL bind_var . VALUE_TYPE ")" func_body1 - $default reduce using rule 6 (value_type_list) - - value_type_list go to state 331 + VALUE_TYPE shift, and go to state 332 State 282 - 15 func_sig: "(" RESULT . value_type_list ")" + 136 inline_import: "(" IMPORT quoted_text . quoted_text ")" - $default reduce using rule 6 (value_type_list) + TEXT shift, and go to state 70 - value_type_list go to state 332 + quoted_text go to state 333 State 283 - 118 import: "(" FUNC bind_var_opt inline_import func_sig ")" . + 142 inline_export: "(" EXPORT quoted_text . ")" - $default reduce using rule 118 (import) + ")" shift, and go to state 334 State 284 - 117 import: "(" FUNC bind_var_opt inline_import type_use ")" . - - $default reduce using rule 117 (import) + 69 block_sig: "(" . RESULT value_type_list ")" + 72 expr: "(" . expr1 ")" + + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 153 + IF shift, and go to state 154 + LOOP shift, and go to state 155 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + RESULT shift, and go to state 335 + + plain_instr go to state 157 + expr1 go to state 158 State 285 - 94 func: "(" FUNC bind_var_opt inline_export type_use func_info . ")" - - ")" shift, and go to state 333 + 70 block: block_sig . block + + "(" shift, and go to state 284 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + block_sig go to state 285 + block go to state 336 + expr go to state 121 + instr_list go to state 287 State 286 - 96 func: "(" FUNC bind_var_opt inline_export func_info ")" . + 65 block_instr: BLOCK labeling_opt block . END labeling_opt - $default reduce using rule 96 (func) + END shift, and go to state 337 State 287 - 11 func_type: "(" FUNC func_sig ")" . + 71 block: instr_list . - $default reduce using rule 11 (func_type) + $default reduce using rule 71 (block) State 288 - 10 global_type: "(" MUT VALUE_TYPE . ")" + 67 block_instr: IF labeling_opt block . END labeling_opt + 68 | IF labeling_opt block . ELSE labeling_opt instr_list END labeling_opt - ")" shift, and go to state 334 + END shift, and go to state 338 + ELSE shift, and go to state 339 State 289 - 110 global: "(" GLOBAL bind_var_opt global_type const_expr ")" . + 66 block_instr: LOOP labeling_opt block . END labeling_opt - $default reduce using rule 110 (global) + END shift, and go to state 340 State 290 - 121 import: "(" GLOBAL bind_var_opt inline_import global_type ")" . + 28 var_list: var_list var . + 47 plain_instr: BR_TABLE var_list var . - $default reduce using rule 121 (import) + NAT reduce using rule 28 (var_list) + VAR reduce using rule 28 (var_list) + $default reduce using rule 47 (plain_instr) State 291 - 109 global: "(" GLOBAL bind_var_opt inline_export global_type const_expr . ")" + 37 align_opt: ALIGN_EQ_NAT . - ")" shift, and go to state 335 + $default reduce using rule 37 (align_opt) State 292 - 119 import: "(" TABLE bind_var_opt inline_import table_sig ")" . + 56 plain_instr: LOAD offset_opt align_opt . - $default reduce using rule 119 (import) + $default reduce using rule 56 (plain_instr) State 293 - 16 table_sig: limits elem_type . + 57 plain_instr: STORE offset_opt align_opt . - $default reduce using rule 16 (table_sig) + $default reduce using rule 57 (plain_instr) State 294 - 19 limits: nat nat . + 99 func_fields_import1: "(" PARAM . value_type_list ")" func_fields_import1 + 100 | "(" PARAM . bind_var VALUE_TYPE ")" func_fields_import1 - $default reduce using rule 19 (limits) + VAR shift, and go to state 50 + + $default reduce using rule 6 (value_type_list) + + value_type_list go to state 341 + bind_var go to state 342 State 295 - 103 table: "(" TABLE bind_var_opt inline_export_opt elem_type "(" . ELEM var_list ")" ")" + 98 func_fields_import1: "(" RESULT . value_type_list ")" + + $default reduce using rule 6 (value_type_list) - ELEM shift, and go to state 336 + value_type_list go to state 343 State 296 - 102 table: "(" TABLE bind_var_opt inline_export_opt table_sig ")" . + 98 func_fields_import1: "(" . RESULT value_type_list ")" + 99 | "(" . PARAM value_type_list ")" func_fields_import1 + 100 | "(" . PARAM bind_var VALUE_TYPE ")" func_fields_import1 - $default reduce using rule 102 (table) + PARAM shift, and go to state 294 + RESULT shift, and go to state 295 State 297 - 72 expr1: BLOCK labeling_opt block . + 93 func_fields: inline_import type_use func_fields_import . - $default reduce using rule 72 (expr1) + $default reduce using rule 93 (func_fields) State 298 - 7 value_type_list: value_type_list . VALUE_TYPE - 74 expr1: IF labeling_opt value_type_list . if_ + 13 func_sig: "(" PARAM . value_type_list ")" + 14 | "(" PARAM . value_type_list ")" "(" RESULT value_type_list ")" - "(" shift, and go to state 337 - VALUE_TYPE shift, and go to state 319 + $default reduce using rule 6 (value_type_list) - expr go to state 338 - if_ go to state 339 + value_type_list go to state 344 State 299 - 73 expr1: LOOP labeling_opt block . + 15 func_sig: "(" RESULT . value_type_list ")" - $default reduce using rule 73 (expr1) + $default reduce using rule 6 (value_type_list) + + value_type_list go to state 345 State 300 - 98 offset: "(" OFFSET const_expr ")" . + 11 func_type: "(" FUNC func_sig ")" . - $default reduce using rule 98 (offset) + $default reduce using rule 11 (func_type) State 301 - 84 expr_list: expr expr_list . + 10 global_type: "(" MUT VALUE_TYPE . ")" - $default reduce using rule 84 (expr_list) + ")" shift, and go to state 346 State 302 - 100 elem: "(" ELEM var offset var_list ")" . + 118 table_fields: elem_type "(" ELEM . var_list ")" + + $default reduce using rule 27 (var_list) - $default reduce using rule 100 (elem) + var_list go to state 347 State 303 - 108 memory: "(" MEMORY bind_var_opt "(" DATA text_list . ")" ")" + 74 expr1: BLOCK labeling_opt block . - ")" shift, and go to state 340 + $default reduce using rule 74 (expr1) State 304 - 120 import: "(" MEMORY bind_var_opt inline_import memory_sig ")" . - - $default reduce using rule 120 (import) + 69 block_sig: "(" . RESULT value_type_list ")" + 72 expr: "(" . expr1 ")" + 79 if_: "(" . THEN instr_list ")" "(" ELSE instr_list ")" + 80 | "(" . THEN instr_list ")" + + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 153 + IF shift, and go to state 154 + THEN shift, and go to state 348 + LOOP shift, and go to state 155 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + RESULT shift, and go to state 335 + + plain_instr go to state 157 + expr1 go to state 158 State 305 - 106 memory: "(" MEMORY bind_var_opt inline_export_opt memory_sig ")" . + 77 if_block: block_sig . if_block - $default reduce using rule 106 (memory) + "(" shift, and go to state 304 + block_sig go to state 305 + expr go to state 306 + if_block go to state 349 + if_ go to state 308 -State 306 - 107 memory: "(" MEMORY bind_var_opt inline_export "(" DATA . text_list ")" ")" +State 306 - TEXT shift, and go to state 43 + 81 if_: expr . "(" THEN instr_list ")" "(" ELSE instr_list ")" + 82 | expr . "(" THEN instr_list ")" + 83 | expr . expr expr + 84 | expr . expr - $default reduce using rule 3 (text_list) + "(" shift, and go to state 350 - non_empty_text_list go to state 184 - text_list go to state 341 + expr go to state 351 State 307 - 104 data: "(" DATA var offset text_list ")" . + 76 expr1: IF labeling_opt if_block . - $default reduce using rule 104 (data) + $default reduce using rule 76 (expr1) State 308 - 111 import_kind: "(" FUNC . bind_var_opt type_use ")" - 112 | "(" FUNC . bind_var_opt func_sig ")" + 78 if_block: if_ . - VAR shift, and go to state 23 - - $default reduce using rule 29 (bind_var_opt) - - bind_var_opt go to state 342 - bind_var go to state 25 + $default reduce using rule 78 (if_block) State 309 - 115 import_kind: "(" GLOBAL . bind_var_opt global_type ")" + 75 expr1: LOOP labeling_opt block . - VAR shift, and go to state 23 - - $default reduce using rule 29 (bind_var_opt) - - bind_var_opt go to state 343 - bind_var go to state 25 + $default reduce using rule 75 (expr1) State 310 - 113 import_kind: "(" TABLE . bind_var_opt table_sig ")" - - VAR shift, and go to state 23 + 110 offset: "(" OFFSET const_expr ")" . - $default reduce using rule 29 (bind_var_opt) - - bind_var_opt go to state 344 - bind_var go to state 25 + $default reduce using rule 110 (offset) State 311 - 114 import_kind: "(" MEMORY . bind_var_opt memory_sig ")" + 88 expr_list: expr expr_list . - VAR shift, and go to state 23 - - $default reduce using rule 29 (bind_var_opt) - - bind_var_opt go to state 345 - bind_var go to state 25 + $default reduce using rule 88 (expr_list) State 312 - 116 import: "(" IMPORT quoted_text quoted_text import_kind ")" . + 112 elem: "(" ELEM var offset var_list ")" . - $default reduce using rule 116 (import) + $default reduce using rule 112 (elem) State 313 - 123 export_kind: "(" FUNC var . ")" + 125 memory_fields: "(" DATA text_list_opt . ")" - ")" shift, and go to state 346 + ")" shift, and go to state 352 State 314 - 126 export_kind: "(" GLOBAL var . ")" + 119 data: "(" DATA var offset text_list_opt ")" . - ")" shift, and go to state 347 + $default reduce using rule 119 (data) State 315 - 124 export_kind: "(" TABLE var . ")" + 130 import_desc: "(" FUNC . bind_var_opt type_use ")" + 131 | "(" FUNC . bind_var_opt func_sig ")" + + VAR shift, and go to state 50 - ")" shift, and go to state 348 + $default reduce using rule 29 (bind_var_opt) + + bind_var_opt go to state 353 + bind_var go to state 52 State 316 - 125 export_kind: "(" MEMORY var . ")" + 134 import_desc: "(" GLOBAL . bind_var_opt global_type ")" - ")" shift, and go to state 349 + VAR shift, and go to state 50 + + $default reduce using rule 29 (bind_var_opt) + + bind_var_opt go to state 354 + bind_var go to state 52 State 317 - 20 type_use: "(" TYPE var ")" . + 132 import_desc: "(" TABLE . bind_var_opt table_sig ")" - $default reduce using rule 20 (type_use) + VAR shift, and go to state 50 + + $default reduce using rule 29 (bind_var_opt) + + bind_var_opt go to state 355 + bind_var go to state 52 State 318 - 88 func_fields: "(" PARAM value_type_list ")" . func_fields + 133 import_desc: "(" MEMORY . bind_var_opt memory_sig ")" - "(" shift, and go to state 214 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 152 - func_fields go to state 350 - func_body go to state 154 + VAR shift, and go to state 50 + + $default reduce using rule 29 (bind_var_opt) + + bind_var_opt go to state 356 + bind_var go to state 52 State 319 - 7 value_type_list: value_type_list VALUE_TYPE . + 135 import: "(" IMPORT quoted_text quoted_text import_desc ")" . - $default reduce using rule 7 (value_type_list) + $default reduce using rule 135 (import) State 320 - 89 func_fields: "(" PARAM bind_var VALUE_TYPE . ")" func_fields + 137 export_desc: "(" FUNC var . ")" - ")" shift, and go to state 351 + ")" shift, and go to state 357 State 321 - 87 func_fields: "(" RESULT value_type_list ")" . func_body - - "(" shift, and go to state 352 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 152 - func_body go to state 353 + 140 export_desc: "(" GLOBAL var . ")" + + ")" shift, and go to state 358 State 322 - 91 func_body: "(" LOCAL value_type_list ")" . func_body - - "(" shift, and go to state 352 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 152 - func_body go to state 354 + 138 export_desc: "(" TABLE var . ")" + + ")" shift, and go to state 359 State 323 - 92 func_body: "(" LOCAL bind_var VALUE_TYPE . ")" func_body + 139 export_desc: "(" MEMORY var . ")" - ")" shift, and go to state 355 + ")" shift, and go to state 360 State 324 - 122 inline_import: "(" IMPORT quoted_text quoted_text . ")" + 166 action: "(" INVOKE script_var_opt quoted_text const_list ")" . - ")" shift, and go to state 356 + $default reduce using rule 166 (action) State 325 - 130 inline_export: "(" EXPORT quoted_text ")" . + 183 const: "(" CONST . literal ")" - $default reduce using rule 130 (inline_export) + NAT shift, and go to state 208 + INT shift, and go to state 209 + FLOAT shift, and go to state 210 + + literal go to state 361 State 326 - 69 block: value_type_list instr_list . + 20 type_use: "(" TYPE var ")" . - $default reduce using rule 69 (block) + $default reduce using rule 20 (type_use) State 327 - 65 block_instr: BLOCK labeling_opt block END . labeling_opt - - VAR shift, and go to state 23 - - $default reduce using rule 32 (labeling_opt) - - bind_var go to state 196 - labeling_opt go to state 357 + 104 func_fields_body1: "(" PARAM value_type_list ")" . func_fields_body1 + + "(" shift, and go to state 212 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 122 + func_fields_body1 go to state 362 + func_body go to state 126 + func_body1 go to state 127 State 328 - 67 block_instr: IF labeling_opt block END . labeling_opt - - VAR shift, and go to state 23 - - $default reduce using rule 32 (labeling_opt) + 7 value_type_list: value_type_list VALUE_TYPE . - bind_var go to state 196 - labeling_opt go to state 358 + $default reduce using rule 7 (value_type_list) State 329 - 68 block_instr: IF labeling_opt block ELSE . labeling_opt instr_list END labeling_opt - - VAR shift, and go to state 23 - - $default reduce using rule 32 (labeling_opt) + 105 func_fields_body1: "(" PARAM bind_var VALUE_TYPE . ")" func_fields_body1 - bind_var go to state 196 - labeling_opt go to state 359 + ")" shift, and go to state 363 State 330 - 66 block_instr: LOOP labeling_opt block END . labeling_opt - - VAR shift, and go to state 23 - - $default reduce using rule 32 (labeling_opt) - - bind_var go to state 196 - labeling_opt go to state 360 + 103 func_fields_body1: "(" RESULT value_type_list ")" . func_body + + "(" shift, and go to state 364 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 122 + func_body go to state 365 + func_body1 go to state 127 State 331 - 7 value_type_list: value_type_list . VALUE_TYPE - 13 func_sig: "(" PARAM value_type_list . ")" - 14 | "(" PARAM value_type_list . ")" "(" RESULT value_type_list ")" - - ")" shift, and go to state 361 - VALUE_TYPE shift, and go to state 319 + 108 func_body1: "(" LOCAL value_type_list ")" . func_body1 + + "(" shift, and go to state 364 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 122 + func_body1 go to state 366 State 332 - 7 value_type_list: value_type_list . VALUE_TYPE - 15 func_sig: "(" RESULT value_type_list . ")" + 109 func_body1: "(" LOCAL bind_var VALUE_TYPE . ")" func_body1 - ")" shift, and go to state 362 - VALUE_TYPE shift, and go to state 319 + ")" shift, and go to state 367 State 333 - 94 func: "(" FUNC bind_var_opt inline_export type_use func_info ")" . + 136 inline_import: "(" IMPORT quoted_text quoted_text . ")" - $default reduce using rule 94 (func) + ")" shift, and go to state 368 State 334 - 10 global_type: "(" MUT VALUE_TYPE ")" . + 142 inline_export: "(" EXPORT quoted_text ")" . - $default reduce using rule 10 (global_type) + $default reduce using rule 142 (inline_export) State 335 - 109 global: "(" GLOBAL bind_var_opt inline_export global_type const_expr ")" . + 69 block_sig: "(" RESULT . value_type_list ")" + + $default reduce using rule 6 (value_type_list) - $default reduce using rule 109 (global) + value_type_list go to state 369 State 336 - 103 table: "(" TABLE bind_var_opt inline_export_opt elem_type "(" ELEM . var_list ")" ")" + 70 block: block_sig block . - $default reduce using rule 27 (var_list) - - var_list go to state 363 + $default reduce using rule 70 (block) State 337 - 70 expr: "(" . expr1 ")" - 75 if_: "(" . THEN instr_list ")" "(" ELSE instr_list ")" - 76 | "(" . THEN instr_list ")" - - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 171 - IF shift, and go to state 172 - THEN shift, and go to state 364 - LOOP shift, and go to state 173 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - plain_instr go to state 175 - expr1 go to state 176 + 65 block_instr: BLOCK labeling_opt block END . labeling_opt + + VAR shift, and go to state 50 + + $default reduce using rule 32 (labeling_opt) + + bind_var go to state 191 + labeling_opt go to state 370 State 338 - 77 if_: expr . "(" THEN instr_list ")" "(" ELSE instr_list ")" - 78 | expr . "(" THEN instr_list ")" - 79 | expr . expr expr - 80 | expr . expr + 67 block_instr: IF labeling_opt block END . labeling_opt - "(" shift, and go to state 365 + VAR shift, and go to state 50 - expr go to state 366 + $default reduce using rule 32 (labeling_opt) + + bind_var go to state 191 + labeling_opt go to state 371 State 339 - 74 expr1: IF labeling_opt value_type_list if_ . + 68 block_instr: IF labeling_opt block ELSE . labeling_opt instr_list END labeling_opt + + VAR shift, and go to state 50 - $default reduce using rule 74 (expr1) + $default reduce using rule 32 (labeling_opt) + + bind_var go to state 191 + labeling_opt go to state 372 State 340 - 108 memory: "(" MEMORY bind_var_opt "(" DATA text_list ")" . ")" + 66 block_instr: LOOP labeling_opt block END . labeling_opt - ")" shift, and go to state 367 + VAR shift, and go to state 50 + $default reduce using rule 32 (labeling_opt) -State 341 + bind_var go to state 191 + labeling_opt go to state 373 - 107 memory: "(" MEMORY bind_var_opt inline_export "(" DATA text_list . ")" ")" - ")" shift, and go to state 368 +State 341 + 7 value_type_list: value_type_list . VALUE_TYPE + 99 func_fields_import1: "(" PARAM value_type_list . ")" func_fields_import1 -State 342 + ")" shift, and go to state 374 + VALUE_TYPE shift, and go to state 328 - 111 import_kind: "(" FUNC bind_var_opt . type_use ")" - 112 | "(" FUNC bind_var_opt . func_sig ")" - "(" shift, and go to state 219 +State 342 - $default reduce using rule 12 (func_sig) + 100 func_fields_import1: "(" PARAM bind_var . VALUE_TYPE ")" func_fields_import1 - func_sig go to state 369 - type_use go to state 370 + VALUE_TYPE shift, and go to state 375 State 343 - 115 import_kind: "(" GLOBAL bind_var_opt . global_type ")" - - "(" shift, and go to state 231 - VALUE_TYPE shift, and go to state 163 + 7 value_type_list: value_type_list . VALUE_TYPE + 98 func_fields_import1: "(" RESULT value_type_list . ")" - global_type go to state 371 + ")" shift, and go to state 376 + VALUE_TYPE shift, and go to state 328 State 344 - 113 import_kind: "(" TABLE bind_var_opt . table_sig ")" - - NAT shift, and go to state 97 + 7 value_type_list: value_type_list . VALUE_TYPE + 13 func_sig: "(" PARAM value_type_list . ")" + 14 | "(" PARAM value_type_list . ")" "(" RESULT value_type_list ")" - table_sig go to state 372 - limits go to state 235 - nat go to state 236 + ")" shift, and go to state 377 + VALUE_TYPE shift, and go to state 328 State 345 - 114 import_kind: "(" MEMORY bind_var_opt . memory_sig ")" - - NAT shift, and go to state 97 + 7 value_type_list: value_type_list . VALUE_TYPE + 15 func_sig: "(" RESULT value_type_list . ")" - memory_sig go to state 373 - limits go to state 252 - nat go to state 236 + ")" shift, and go to state 378 + VALUE_TYPE shift, and go to state 328 State 346 - 123 export_kind: "(" FUNC var ")" . + 10 global_type: "(" MUT VALUE_TYPE ")" . - $default reduce using rule 123 (export_kind) + $default reduce using rule 10 (global_type) State 347 - 126 export_kind: "(" GLOBAL var ")" . + 28 var_list: var_list . var + 118 table_fields: elem_type "(" ELEM var_list . ")" + + ")" shift, and go to state 379 + NAT shift, and go to state 53 + VAR shift, and go to state 54 - $default reduce using rule 126 (export_kind) + nat go to state 55 + var go to state 250 State 348 - 124 export_kind: "(" TABLE var ")" . + 79 if_: "(" THEN . instr_list ")" "(" ELSE instr_list ")" + 80 | "(" THEN . instr_list ")" - $default reduce using rule 124 (export_kind) + "(" shift, and go to state 214 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 380 State 349 - 125 export_kind: "(" MEMORY var ")" . + 77 if_block: block_sig if_block . - $default reduce using rule 125 (export_kind) + $default reduce using rule 77 (if_block) State 350 - 88 func_fields: "(" PARAM value_type_list ")" func_fields . - - $default reduce using rule 88 (func_fields) + 72 expr: "(" . expr1 ")" + 81 if_: expr "(" . THEN instr_list ")" "(" ELSE instr_list ")" + 82 | expr "(" . THEN instr_list ")" + + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 153 + IF shift, and go to state 154 + THEN shift, and go to state 381 + LOOP shift, and go to state 155 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + plain_instr go to state 157 + expr1 go to state 158 State 351 - 89 func_fields: "(" PARAM bind_var VALUE_TYPE ")" . func_fields + 83 if_: expr expr . expr + 84 | expr expr . - "(" shift, and go to state 214 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 152 - func_fields go to state 374 - func_body go to state 154 + "(" shift, and go to state 214 + + $default reduce using rule 84 (if_) + + expr go to state 382 State 352 - 70 expr: "(" . expr1 ")" - 91 func_body: "(" . LOCAL value_type_list ")" func_body - 92 | "(" . LOCAL bind_var VALUE_TYPE ")" func_body - - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 171 - IF shift, and go to state 172 - LOOP shift, and go to state 173 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - LOCAL shift, and go to state 193 - - plain_instr go to state 175 - expr1 go to state 176 + 125 memory_fields: "(" DATA text_list_opt ")" . + + $default reduce using rule 125 (memory_fields) State 353 - 87 func_fields: "(" RESULT value_type_list ")" func_body . + 130 import_desc: "(" FUNC bind_var_opt . type_use ")" + 131 | "(" FUNC bind_var_opt . func_sig ")" + + "(" shift, and go to state 383 + + $default reduce using rule 12 (func_sig) - $default reduce using rule 87 (func_fields) + func_sig go to state 384 + type_use go to state 385 State 354 - 91 func_body: "(" LOCAL value_type_list ")" func_body . + 134 import_desc: "(" GLOBAL bind_var_opt . global_type ")" + + "(" shift, and go to state 229 + VALUE_TYPE shift, and go to state 135 - $default reduce using rule 91 (func_body) + global_type go to state 386 State 355 - 92 func_body: "(" LOCAL bind_var VALUE_TYPE ")" . func_body - - "(" shift, and go to state 352 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 152 - func_body go to state 375 + 132 import_desc: "(" TABLE bind_var_opt . table_sig ")" + + NAT shift, and go to state 53 + + table_sig go to state 387 + limits go to state 148 + nat go to state 149 State 356 - 122 inline_import: "(" IMPORT quoted_text quoted_text ")" . + 133 import_desc: "(" MEMORY bind_var_opt . memory_sig ")" - $default reduce using rule 122 (inline_import) + NAT shift, and go to state 53 + + memory_sig go to state 388 + limits go to state 163 + nat go to state 149 State 357 - 65 block_instr: BLOCK labeling_opt block END labeling_opt . + 137 export_desc: "(" FUNC var ")" . - $default reduce using rule 65 (block_instr) + $default reduce using rule 137 (export_desc) State 358 - 67 block_instr: IF labeling_opt block END labeling_opt . + 140 export_desc: "(" GLOBAL var ")" . - $default reduce using rule 67 (block_instr) + $default reduce using rule 140 (export_desc) State 359 - 68 block_instr: IF labeling_opt block ELSE labeling_opt . instr_list END labeling_opt + 138 export_desc: "(" TABLE var ")" . - "(" shift, and go to state 216 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 376 + $default reduce using rule 138 (export_desc) State 360 - 66 block_instr: LOOP labeling_opt block END labeling_opt . + 139 export_desc: "(" MEMORY var ")" . - $default reduce using rule 66 (block_instr) + $default reduce using rule 139 (export_desc) State 361 - 13 func_sig: "(" PARAM value_type_list ")" . - 14 | "(" PARAM value_type_list ")" . "(" RESULT value_type_list ")" - - "(" shift, and go to state 377 + 183 const: "(" CONST literal . ")" - $default reduce using rule 13 (func_sig) + ")" shift, and go to state 389 State 362 - 15 func_sig: "(" RESULT value_type_list ")" . + 104 func_fields_body1: "(" PARAM value_type_list ")" func_fields_body1 . - $default reduce using rule 15 (func_sig) + $default reduce using rule 104 (func_fields_body1) State 363 - 28 var_list: var_list . var - 103 table: "(" TABLE bind_var_opt inline_export_opt elem_type "(" ELEM var_list . ")" ")" - - ")" shift, and go to state 378 - NAT shift, and go to state 97 - VAR shift, and go to state 98 - - nat go to state 99 - var go to state 249 + 105 func_fields_body1: "(" PARAM bind_var VALUE_TYPE ")" . func_fields_body1 + + "(" shift, and go to state 212 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 122 + func_fields_body1 go to state 390 + func_body go to state 126 + func_body1 go to state 127 State 364 - 75 if_: "(" THEN . instr_list ")" "(" ELSE instr_list ")" - 76 | "(" THEN . instr_list ")" - - "(" shift, and go to state 216 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 379 + 72 expr: "(" . expr1 ")" + 108 func_body1: "(" . LOCAL value_type_list ")" func_body1 + 109 | "(" . LOCAL bind_var VALUE_TYPE ")" func_body1 + + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 153 + IF shift, and go to state 154 + LOOP shift, and go to state 155 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + LOCAL shift, and go to state 188 + + plain_instr go to state 157 + expr1 go to state 158 State 365 - 70 expr: "(" . expr1 ")" - 77 if_: expr "(" . THEN instr_list ")" "(" ELSE instr_list ")" - 78 | expr "(" . THEN instr_list ")" - - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 171 - IF shift, and go to state 172 - THEN shift, and go to state 380 - LOOP shift, and go to state 173 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - plain_instr go to state 175 - expr1 go to state 176 + 103 func_fields_body1: "(" RESULT value_type_list ")" func_body . + $default reduce using rule 103 (func_fields_body1) -State 366 - - 79 if_: expr expr . expr - 80 | expr expr . - "(" shift, and go to state 216 +State 366 - $default reduce using rule 80 (if_) + 108 func_body1: "(" LOCAL value_type_list ")" func_body1 . - expr go to state 381 + $default reduce using rule 108 (func_body1) State 367 - 108 memory: "(" MEMORY bind_var_opt "(" DATA text_list ")" ")" . - - $default reduce using rule 108 (memory) + 109 func_body1: "(" LOCAL bind_var VALUE_TYPE ")" . func_body1 + + "(" shift, and go to state 364 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 122 + func_body1 go to state 391 State 368 - 107 memory: "(" MEMORY bind_var_opt inline_export "(" DATA text_list ")" . ")" + 136 inline_import: "(" IMPORT quoted_text quoted_text ")" . - ")" shift, and go to state 382 + $default reduce using rule 136 (inline_import) State 369 - 112 import_kind: "(" FUNC bind_var_opt func_sig . ")" + 7 value_type_list: value_type_list . VALUE_TYPE + 69 block_sig: "(" RESULT value_type_list . ")" - ")" shift, and go to state 383 + ")" shift, and go to state 392 + VALUE_TYPE shift, and go to state 328 State 370 - 111 import_kind: "(" FUNC bind_var_opt type_use . ")" + 65 block_instr: BLOCK labeling_opt block END labeling_opt . - ")" shift, and go to state 384 + $default reduce using rule 65 (block_instr) State 371 - 115 import_kind: "(" GLOBAL bind_var_opt global_type . ")" + 67 block_instr: IF labeling_opt block END labeling_opt . - ")" shift, and go to state 385 + $default reduce using rule 67 (block_instr) State 372 - 113 import_kind: "(" TABLE bind_var_opt table_sig . ")" + 68 block_instr: IF labeling_opt block ELSE labeling_opt . instr_list END labeling_opt - ")" shift, and go to state 386 + "(" shift, and go to state 214 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 393 State 373 - 114 import_kind: "(" MEMORY bind_var_opt memory_sig . ")" + 66 block_instr: LOOP labeling_opt block END labeling_opt . - ")" shift, and go to state 387 + $default reduce using rule 66 (block_instr) State 374 - 89 func_fields: "(" PARAM bind_var VALUE_TYPE ")" func_fields . + 99 func_fields_import1: "(" PARAM value_type_list ")" . func_fields_import1 + + "(" shift, and go to state 296 - $default reduce using rule 89 (func_fields) + $default reduce using rule 97 (func_fields_import1) + + func_fields_import1 go to state 394 State 375 - 92 func_body: "(" LOCAL bind_var VALUE_TYPE ")" func_body . + 100 func_fields_import1: "(" PARAM bind_var VALUE_TYPE . ")" func_fields_import1 - $default reduce using rule 92 (func_body) + ")" shift, and go to state 395 State 376 - 68 block_instr: IF labeling_opt block ELSE labeling_opt instr_list . END labeling_opt + 98 func_fields_import1: "(" RESULT value_type_list ")" . - END shift, and go to state 388 + $default reduce using rule 98 (func_fields_import1) State 377 - 14 func_sig: "(" PARAM value_type_list ")" "(" . RESULT value_type_list ")" + 13 func_sig: "(" PARAM value_type_list ")" . + 14 | "(" PARAM value_type_list ")" . "(" RESULT value_type_list ")" + + "(" shift, and go to state 396 - RESULT shift, and go to state 389 + $default reduce using rule 13 (func_sig) State 378 - 103 table: "(" TABLE bind_var_opt inline_export_opt elem_type "(" ELEM var_list ")" . ")" + 15 func_sig: "(" RESULT value_type_list ")" . - ")" shift, and go to state 390 + $default reduce using rule 15 (func_sig) State 379 - 75 if_: "(" THEN instr_list . ")" "(" ELSE instr_list ")" - 76 | "(" THEN instr_list . ")" + 118 table_fields: elem_type "(" ELEM var_list ")" . - ")" shift, and go to state 391 + $default reduce using rule 118 (table_fields) State 380 - 77 if_: expr "(" THEN . instr_list ")" "(" ELSE instr_list ")" - 78 | expr "(" THEN . instr_list ")" - - "(" shift, and go to state 216 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 392 + 79 if_: "(" THEN instr_list . ")" "(" ELSE instr_list ")" + 80 | "(" THEN instr_list . ")" + + ")" shift, and go to state 397 State 381 - 79 if_: expr expr expr . + 81 if_: expr "(" THEN . instr_list ")" "(" ELSE instr_list ")" + 82 | expr "(" THEN . instr_list ")" - $default reduce using rule 79 (if_) + "(" shift, and go to state 214 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 398 State 382 - 107 memory: "(" MEMORY bind_var_opt inline_export "(" DATA text_list ")" ")" . + 83 if_: expr expr expr . - $default reduce using rule 107 (memory) + $default reduce using rule 83 (if_) State 383 - 112 import_kind: "(" FUNC bind_var_opt func_sig ")" . + 13 func_sig: "(" . PARAM value_type_list ")" + 14 | "(" . PARAM value_type_list ")" "(" RESULT value_type_list ")" + 15 | "(" . RESULT value_type_list ")" + 20 type_use: "(" . TYPE var ")" - $default reduce using rule 112 (import_kind) + TYPE shift, and go to state 185 + PARAM shift, and go to state 298 + RESULT shift, and go to state 299 State 384 - 111 import_kind: "(" FUNC bind_var_opt type_use ")" . + 131 import_desc: "(" FUNC bind_var_opt func_sig . ")" - $default reduce using rule 111 (import_kind) + ")" shift, and go to state 399 State 385 - 115 import_kind: "(" GLOBAL bind_var_opt global_type ")" . + 130 import_desc: "(" FUNC bind_var_opt type_use . ")" - $default reduce using rule 115 (import_kind) + ")" shift, and go to state 400 State 386 - 113 import_kind: "(" TABLE bind_var_opt table_sig ")" . + 134 import_desc: "(" GLOBAL bind_var_opt global_type . ")" - $default reduce using rule 113 (import_kind) + ")" shift, and go to state 401 State 387 - 114 import_kind: "(" MEMORY bind_var_opt memory_sig ")" . + 132 import_desc: "(" TABLE bind_var_opt table_sig . ")" - $default reduce using rule 114 (import_kind) + ")" shift, and go to state 402 State 388 - 68 block_instr: IF labeling_opt block ELSE labeling_opt instr_list END . labeling_opt - - VAR shift, and go to state 23 - - $default reduce using rule 32 (labeling_opt) + 133 import_desc: "(" MEMORY bind_var_opt memory_sig . ")" - bind_var go to state 196 - labeling_opt go to state 393 + ")" shift, and go to state 403 State 389 - 14 func_sig: "(" PARAM value_type_list ")" "(" RESULT . value_type_list ")" - - $default reduce using rule 6 (value_type_list) + 183 const: "(" CONST literal ")" . - value_type_list go to state 394 + $default reduce using rule 183 (const) State 390 - 103 table: "(" TABLE bind_var_opt inline_export_opt elem_type "(" ELEM var_list ")" ")" . + 105 func_fields_body1: "(" PARAM bind_var VALUE_TYPE ")" func_fields_body1 . - $default reduce using rule 103 (table) + $default reduce using rule 105 (func_fields_body1) State 391 - 75 if_: "(" THEN instr_list ")" . "(" ELSE instr_list ")" - 76 | "(" THEN instr_list ")" . - - "(" shift, and go to state 395 + 109 func_body1: "(" LOCAL bind_var VALUE_TYPE ")" func_body1 . - $default reduce using rule 76 (if_) + $default reduce using rule 109 (func_body1) State 392 - 77 if_: expr "(" THEN instr_list . ")" "(" ELSE instr_list ")" - 78 | expr "(" THEN instr_list . ")" + 69 block_sig: "(" RESULT value_type_list ")" . - ")" shift, and go to state 396 + $default reduce using rule 69 (block_sig) State 393 - 68 block_instr: IF labeling_opt block ELSE labeling_opt instr_list END labeling_opt . + 68 block_instr: IF labeling_opt block ELSE labeling_opt instr_list . END labeling_opt - $default reduce using rule 68 (block_instr) + END shift, and go to state 404 State 394 - 7 value_type_list: value_type_list . VALUE_TYPE - 14 func_sig: "(" PARAM value_type_list ")" "(" RESULT value_type_list . ")" + 99 func_fields_import1: "(" PARAM value_type_list ")" func_fields_import1 . - ")" shift, and go to state 397 - VALUE_TYPE shift, and go to state 319 + $default reduce using rule 99 (func_fields_import1) State 395 - 75 if_: "(" THEN instr_list ")" "(" . ELSE instr_list ")" + 100 func_fields_import1: "(" PARAM bind_var VALUE_TYPE ")" . func_fields_import1 - ELSE shift, and go to state 398 + "(" shift, and go to state 296 + $default reduce using rule 97 (func_fields_import1) -State 396 + func_fields_import1 go to state 405 - 77 if_: expr "(" THEN instr_list ")" . "(" ELSE instr_list ")" - 78 | expr "(" THEN instr_list ")" . - "(" shift, and go to state 399 +State 396 - $default reduce using rule 78 (if_) + 14 func_sig: "(" PARAM value_type_list ")" "(" . RESULT value_type_list ")" + + RESULT shift, and go to state 406 State 397 - 14 func_sig: "(" PARAM value_type_list ")" "(" RESULT value_type_list ")" . + 79 if_: "(" THEN instr_list ")" . "(" ELSE instr_list ")" + 80 | "(" THEN instr_list ")" . - $default reduce using rule 14 (func_sig) + "(" shift, and go to state 407 + + $default reduce using rule 80 (if_) State 398 - 75 if_: "(" THEN instr_list ")" "(" ELSE . instr_list ")" - - "(" shift, and go to state 216 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 400 + 81 if_: expr "(" THEN instr_list . ")" "(" ELSE instr_list ")" + 82 | expr "(" THEN instr_list . ")" + + ")" shift, and go to state 408 State 399 - 77 if_: expr "(" THEN instr_list ")" "(" . ELSE instr_list ")" + 131 import_desc: "(" FUNC bind_var_opt func_sig ")" . - ELSE shift, and go to state 401 + $default reduce using rule 131 (import_desc) State 400 - 75 if_: "(" THEN instr_list ")" "(" ELSE instr_list . ")" + 130 import_desc: "(" FUNC bind_var_opt type_use ")" . - ")" shift, and go to state 402 + $default reduce using rule 130 (import_desc) State 401 - 77 if_: expr "(" THEN instr_list ")" "(" ELSE . instr_list ")" - - "(" shift, and go to state 216 - NOP shift, and go to state 120 - DROP shift, and go to state 121 - BLOCK shift, and go to state 122 - IF shift, and go to state 123 - LOOP shift, and go to state 124 - BR shift, and go to state 125 - BR_IF shift, and go to state 126 - BR_TABLE shift, and go to state 127 - CALL shift, and go to state 128 - CALL_INDIRECT shift, and go to state 129 - RETURN shift, and go to state 130 - GET_LOCAL shift, and go to state 131 - SET_LOCAL shift, and go to state 132 - TEE_LOCAL shift, and go to state 133 - GET_GLOBAL shift, and go to state 134 - SET_GLOBAL shift, and go to state 135 - LOAD shift, and go to state 136 - STORE shift, and go to state 137 - CONST shift, and go to state 138 - UNARY shift, and go to state 139 - BINARY shift, and go to state 140 - COMPARE shift, and go to state 141 - CONVERT shift, and go to state 142 - SELECT shift, and go to state 143 - UNREACHABLE shift, and go to state 144 - CURRENT_MEMORY shift, and go to state 145 - GROW_MEMORY shift, and go to state 146 - - $default reduce using rule 81 (instr_list) - - instr go to state 148 - plain_instr go to state 149 - block_instr go to state 150 - expr go to state 151 - instr_list go to state 403 + 134 import_desc: "(" GLOBAL bind_var_opt global_type ")" . + + $default reduce using rule 134 (import_desc) State 402 - 75 if_: "(" THEN instr_list ")" "(" ELSE instr_list ")" . + 132 import_desc: "(" TABLE bind_var_opt table_sig ")" . - $default reduce using rule 75 (if_) + $default reduce using rule 132 (import_desc) State 403 - 77 if_: expr "(" THEN instr_list ")" "(" ELSE instr_list . ")" + 133 import_desc: "(" MEMORY bind_var_opt memory_sig ")" . - ")" shift, and go to state 404 + $default reduce using rule 133 (import_desc) State 404 - 77 if_: expr "(" THEN instr_list ")" "(" ELSE instr_list ")" . + 68 block_instr: IF labeling_opt block ELSE labeling_opt instr_list END . labeling_opt + + VAR shift, and go to state 50 + + $default reduce using rule 32 (labeling_opt) + + bind_var go to state 191 + labeling_opt go to state 409 + + +State 405 + + 100 func_fields_import1: "(" PARAM bind_var VALUE_TYPE ")" func_fields_import1 . + + $default reduce using rule 100 (func_fields_import1) + + +State 406 + + 14 func_sig: "(" PARAM value_type_list ")" "(" RESULT . value_type_list ")" + + $default reduce using rule 6 (value_type_list) + + value_type_list go to state 410 + + +State 407 + + 79 if_: "(" THEN instr_list ")" "(" . ELSE instr_list ")" + + ELSE shift, and go to state 411 + + +State 408 + + 81 if_: expr "(" THEN instr_list ")" . "(" ELSE instr_list ")" + 82 | expr "(" THEN instr_list ")" . + + "(" shift, and go to state 412 + + $default reduce using rule 82 (if_) + + +State 409 + + 68 block_instr: IF labeling_opt block ELSE labeling_opt instr_list END labeling_opt . + + $default reduce using rule 68 (block_instr) + + +State 410 + + 7 value_type_list: value_type_list . VALUE_TYPE + 14 func_sig: "(" PARAM value_type_list ")" "(" RESULT value_type_list . ")" + + ")" shift, and go to state 413 + VALUE_TYPE shift, and go to state 328 + + +State 411 + + 79 if_: "(" THEN instr_list ")" "(" ELSE . instr_list ")" + + "(" shift, and go to state 214 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 414 + + +State 412 + + 81 if_: expr "(" THEN instr_list ")" "(" . ELSE instr_list ")" + + ELSE shift, and go to state 415 + + +State 413 + + 14 func_sig: "(" PARAM value_type_list ")" "(" RESULT value_type_list ")" . + + $default reduce using rule 14 (func_sig) + + +State 414 + + 79 if_: "(" THEN instr_list ")" "(" ELSE instr_list . ")" + + ")" shift, and go to state 416 + + +State 415 + + 81 if_: expr "(" THEN instr_list ")" "(" ELSE . instr_list ")" + + "(" shift, and go to state 214 + NOP shift, and go to state 90 + DROP shift, and go to state 91 + BLOCK shift, and go to state 92 + IF shift, and go to state 93 + LOOP shift, and go to state 94 + BR shift, and go to state 95 + BR_IF shift, and go to state 96 + BR_TABLE shift, and go to state 97 + CALL shift, and go to state 98 + CALL_INDIRECT shift, and go to state 99 + RETURN shift, and go to state 100 + GET_LOCAL shift, and go to state 101 + SET_LOCAL shift, and go to state 102 + TEE_LOCAL shift, and go to state 103 + GET_GLOBAL shift, and go to state 104 + SET_GLOBAL shift, and go to state 105 + LOAD shift, and go to state 106 + STORE shift, and go to state 107 + CONST shift, and go to state 108 + UNARY shift, and go to state 109 + BINARY shift, and go to state 110 + COMPARE shift, and go to state 111 + CONVERT shift, and go to state 112 + SELECT shift, and go to state 113 + UNREACHABLE shift, and go to state 114 + CURRENT_MEMORY shift, and go to state 115 + GROW_MEMORY shift, and go to state 116 + + $default reduce using rule 85 (instr_list) + + instr go to state 118 + plain_instr go to state 119 + block_instr go to state 120 + expr go to state 121 + instr_list go to state 417 + + +State 416 + + 79 if_: "(" THEN instr_list ")" "(" ELSE instr_list ")" . + + $default reduce using rule 79 (if_) + + +State 417 + + 81 if_: expr "(" THEN instr_list ")" "(" ELSE instr_list . ")" + + ")" shift, and go to state 418 + + +State 418 + + 81 if_: expr "(" THEN instr_list ")" "(" ELSE instr_list ")" . - $default reduce using rule 77 (if_) + $default reduce using rule 81 (if_) diff --git a/src/wast-lexer.cc b/src/wast-lexer.cc index 8586d925..7ae2b4cd 100644 --- a/src/wast-lexer.cc +++ b/src/wast-lexer.cc @@ -48,18 +48,20 @@ YY_USER_ACTION; \ wast_parser_error(loc, this, parser, __VA_ARGS__) -#define BEGIN(c) \ - do { \ - cond = c; \ - } while (0) -#define FILL(n) \ - do { \ - if (WABT_FAILED(Fill(loc, parser, n))) { \ - RETURN(EOF); \ - continue; \ - } \ +#define BEGIN(c) cond = (c) +#define FILL(n) \ + do { \ + if (WABT_FAILED(Fill(loc, parser, (n)))) { \ + RETURN(EOF); \ + } \ } while (0) +#define MAYBE_MALFORMED_UTF8(desc) \ + if (!(eof_ && limit_ - cursor_ <= YYMAXFILL)) { \ + ERROR("malformed utf-8%s", desc); \ + } \ + continue + #define yytext (token_) #define yyleng (cursor_ - token_) @@ -174,7 +176,8 @@ Result WastLexer::Fill(Location* loc, WastParser* parser, size_t need) { // http://re2c.org/examples/example_03.html. if (limit_ < buffer_ + buffer_size_ - YYMAXFILL) { eof_ = true; - memset(limit_, 0, YYMAXFILL); + // Fill with 0xff, since that is an invalid utf-8 byte. + memset(limit_, 0xff, YYMAXFILL); limit_ += YYMAXFILL; } return Result::Ok; @@ -203,30 +206,29 @@ int WastLexer::GetToken(Token* lval, Location* loc, WastParser* parser) { re2c:define:YYGETCONDITION:naked = 1; re2c:define:YYSETCONDITION = "BEGIN"; - space = [ \t]; digit = [0-9]; - digits = [0-9]+; hexdigit = [0-9a-fA-F]; + num = digit+; + hexnum = hexdigit+; letter = [a-zA-Z]; - symbol = [+\-*\/\\\^~=<>!?@#$%&|:`.]; - tick = "'"; - escape = [nt\\'"]; - character = [^"\\\x00-\x1f\x7f] | "\\" escape | "\\" hexdigit hexdigit; + symbol = [+\-*\/\\\^~=<>!?@#$%&|:`.']; + character = [^"\\\x00-\x1f] + | "\\" [nrt\\'"] + | "\\" hexdigit hexdigit; sign = [+-]; - num = digit+; - hexnum = "0x" hexdigit+; - nat = num | hexnum; + nat = num | "0x" hexnum; int = sign nat; - float0 = sign? num "." digit*; - float1 = sign? num ("." digit*)? [eE] sign? num; - hexfloat = sign? "0x" hexdigit+ "."? hexdigit* "p" sign? digit+; - infinity = sign? ("inf" | "infinity"); - nan = sign? "nan" | sign? "nan:0x" hexdigit+; - float = float0 | float1; + hexfloat = sign? "0x" hexnum ("." hexdigit*)? "p" sign? num; + infinity = sign? "inf"; + nan = sign? "nan" + | sign? "nan:0x" hexnum; + float = sign? num "." digit* + | sign? num ("." digit*)? [eE] sign? num; text = '"' character* '"'; - atom = (letter | digit | "_" | tick | symbol)+; - name = "$" atom; - EOF = "\x00"; + name = "$" (letter | digit | "_" | symbol)+; + + // Should be ([\x21-\x7e] \ [()"; ])+ , but re2c doesn't like this... + reserved = [\x21\x23-\x27\x2a-\x3a\x3c-\x7e]+; <i> "(" { RETURN(LPAR); } <i> ")" { RETURN(RPAR); } @@ -246,9 +248,9 @@ int WastLexer::GetToken(Token* lval, Location* loc, WastParser* parser) { static_cast<int>(yyleng), yytext); continue; } <BAD_TEXT> '"' => i { TEXT; RETURN(TEXT); } - <BAD_TEXT> EOF { ERROR("unexpected EOF"); RETURN(EOF); } <BAD_TEXT> [^] { ERROR("illegal character in string"); continue; } + <BAD_TEXT> * { MAYBE_MALFORMED_UTF8(" in string"); } <i> "i32" { TYPE(I32); RETURN(VALUE_TYPE); } <i> "i64" { TYPE(I64); RETURN(VALUE_TYPE); } <i> "f32" { TYPE(F32); RETURN(VALUE_TYPE); } @@ -469,15 +471,15 @@ int WastLexer::GetToken(Token* lval, Location* loc, WastParser* parser) { BEGIN(YYCOND_INIT); continue; } <BLOCK_COMMENT> "\n" { NEWLINE; continue; } - <BLOCK_COMMENT> EOF { ERROR("unexpected EOF"); RETURN(EOF); } <BLOCK_COMMENT> [^] { continue; } + <BLOCK_COMMENT> * { MAYBE_MALFORMED_UTF8(" in block comment"); } <i> "\n" { NEWLINE; continue; } <i> [ \t\r]+ { continue; } - <i> atom { ERROR("unexpected token \"%.*s\"", + <i> reserved { ERROR("unexpected token \"%.*s\"", static_cast<int>(yyleng), yytext); continue; } - <*> EOF { RETURN(EOF); } <*> [^] { ERROR("unexpected char"); continue; } + <*> * { MAYBE_MALFORMED_UTF8(""); } */ } } diff --git a/src/wast-parser-lexer-shared.cc b/src/wast-parser-lexer-shared.cc index fe785fe8..34bf7ebe 100644 --- a/src/wast-parser-lexer-shared.cc +++ b/src/wast-parser-lexer-shared.cc @@ -77,34 +77,12 @@ void destroy_text_list(TextList* text_list) { } } -FuncField::FuncField() - : type(FuncFieldType::Exprs), first_expr(nullptr), next(nullptr) {} - -FuncField::~FuncField() { - switch (type) { - case FuncFieldType::Exprs: - destroy_expr_list(first_expr); - break; - - case FuncFieldType::ParamTypes: - case FuncFieldType::LocalTypes: - case FuncFieldType::ResultTypes: - delete types; - break; - - case FuncFieldType::BoundParam: - case FuncFieldType::BoundLocal: - destroy_string_slice(&bound_type.name); - break; - } -} - -void destroy_func_fields(FuncField* func_field) { - /* destroy the entire linked-list */ - while (func_field) { - FuncField* next_func_field = func_field->next; - delete func_field; - func_field = next_func_field; +void destroy_module_field_list(ModuleFieldList* fields) { + ModuleField* field = fields->first; + while (field) { + ModuleField* next = field->next; + delete field; + field = next; } } diff --git a/src/wast-parser-lexer-shared.h b/src/wast-parser-lexer-shared.h index e8e0acbb..4b36a917 100644 --- a/src/wast-parser-lexer-shared.h +++ b/src/wast-parser-lexer-shared.h @@ -30,8 +30,6 @@ #define YYSTYPE WABT_WAST_PARSER_STYPE #define YYLTYPE WABT_WAST_PARSER_LTYPE -#define WABT_INVALID_LINE_OFFSET (static_cast<size_t>(~0)) - namespace wabt { struct ExprList { @@ -50,66 +48,9 @@ struct TextList { TextListNode* last; }; -struct OptionalExport { - std::unique_ptr<Export> export_; - bool has_export; -}; - -struct ExportedFunc { - std::unique_ptr<Func> func; - OptionalExport export_; -}; - -struct ExportedGlobal { - std::unique_ptr<Global> global; - OptionalExport export_; -}; - -struct ExportedTable { - std::unique_ptr<Table> table; - std::unique_ptr<ElemSegment> elem_segment; - OptionalExport export_; - bool has_elem_segment; -}; - -struct ExportedMemory { - std::unique_ptr<Memory> memory; - std::unique_ptr<DataSegment> data_segment; - OptionalExport export_; - bool has_data_segment; -}; - -enum class FuncFieldType { - Exprs, - ParamTypes, - BoundParam, - ResultTypes, - LocalTypes, - BoundLocal, -}; - -struct BoundType { - WABT_DISALLOW_COPY_AND_ASSIGN(BoundType); - BoundType(); - ~BoundType(); - - Location loc; - StringSlice name; - Type type; -}; - -struct FuncField { - WABT_DISALLOW_COPY_AND_ASSIGN(FuncField); - FuncField(); - ~FuncField(); - - FuncFieldType type; - union { - Expr* first_expr; /* WABT_FUNC_FIELD_TYPE_EXPRS */ - TypeVector* types; /* WABT_FUNC_FIELD_TYPE_*_TYPES */ - BoundType bound_type; /* WABT_FUNC_FIELD_TYPE_BOUND_{LOCAL, PARAM} */ - }; - struct FuncField* next; +struct ModuleFieldList { + ModuleField* first; + ModuleField* last; }; union Token { @@ -131,22 +72,18 @@ union Token { DataSegment* data_segment; ElemSegment* elem_segment; Export* export_; - ExportedFunc* exported_func; - ExportedGlobal* exported_global; - ExportedMemory* exported_memory; - ExportedTable* exported_table; Expr* expr; ExprList expr_list; - FuncField* func_fields; Func* func; FuncSignature* func_sig; FuncType* func_type; Global* global; Import* import; Limits limits; - OptionalExport* optional_export; Memory* memory; Module* module; + ModuleField* module_field; + ModuleFieldList module_fields; RawModule* raw_module; Script* script; Table* table; @@ -182,8 +119,8 @@ void wast_format_error(SourceErrorHandler*, WastLexer*, const char* format, va_list); -void destroy_func_fields(FuncField*); void destroy_text_list(TextList*); +void destroy_module_field_list(ModuleFieldList*); } // namespace wabt diff --git a/src/wast-parser.y b/src/wast-parser.y index 9f9879a1..2443c94a 100644 --- a/src/wast-parser.y +++ b/src/wast-parser.y @@ -75,50 +75,6 @@ } \ while (0) -#define APPEND_FIELD_TO_LIST(module, field, Kind, kind, loc_, item) \ - do { \ - field = append_module_field(module); \ - field->loc = loc_; \ - field->type = ModuleFieldType::Kind; \ - field->kind = item; \ - } while (0) - -#define APPEND_ITEM_TO_VECTOR(module, kinds, item_ptr) \ - (module)->kinds.push_back(item_ptr) - -#define INSERT_BINDING(module, kind, kinds, loc_, name) \ - do \ - if ((name).start) { \ - (module)->kind##_bindings.emplace( \ - string_slice_to_string(name), \ - Binding(loc_, (module)->kinds.size() - 1)); \ - } \ - while (0) - -#define APPEND_INLINE_EXPORT(module, Kind, loc_, value, index_) \ - do \ - if ((value)->export_.has_export) { \ - ModuleField* export_field; \ - APPEND_FIELD_TO_LIST(module, export_field, Export, export_, loc_, \ - (value)->export_.export_.release()); \ - export_field->export_->kind = ExternalKind::Kind; \ - export_field->export_->var.loc = loc_; \ - export_field->export_->var.index = index_; \ - APPEND_ITEM_TO_VECTOR(module, exports, export_field->export_); \ - INSERT_BINDING(module, export, exports, export_field->loc, \ - export_field->export_->name); \ - } \ - while (0) - -#define CHECK_IMPORT_ORDERING(module, kind, kinds, loc_) \ - do { \ - if ((module)->kinds.size() != (module)->num_##kind##_imports) { \ - wast_parser_error( \ - &loc_, lexer, parser, \ - "imports must occur before all non-import definitions"); \ - } \ - } while (0) - #define CHECK_END_LABEL(loc, begin_label, end_label) \ do { \ if (!string_slice_is_empty(&(end_label))) { \ @@ -144,23 +100,28 @@ namespace wabt { -ExprList join_exprs1(Location* loc, Expr* expr1); -ExprList join_exprs2(Location* loc, - ExprList* expr1, - Expr* expr2); +static ExprList join_exprs1(Location* loc, Expr* expr1); +static ExprList join_exprs2(Location* loc, ExprList* expr1, Expr* expr2); -Result parse_const(Type type, - LiteralType literal_type, - const char* s, - const char* end, - Const* out); -void dup_text_list(TextList* text_list, char** out_data, size_t* out_size); +static Result parse_const(Type type, + LiteralType literal_type, + const char* s, + const char* end, + Const* out); +static void dup_text_list(TextList* text_list, + char** out_data, + size_t* out_size); -bool is_empty_signature(const FuncSignature* sig); +static void reverse_bindings(TypeVector*, BindingHash*); -void append_implicit_func_declaration(Location*, - Module*, - FuncDeclaration*); +static bool is_empty_signature(const FuncSignature* sig); + +static void check_import_ordering(Location* loc, + WastLexer* lexer, + WastParser* parser, + Module* module, + ModuleField* first); +static void append_module_fields(Module*, ModuleField*); class BinaryErrorHandlerModule : public BinaryErrorHandler { public: @@ -215,36 +176,29 @@ class BinaryErrorHandlerModule : public BinaryErrorHandler { %type<commands> cmd_list %type<const_> const %type<consts> const_list -%type<data_segment> data -%type<elem_segment> elem -%type<export_> export export_kind -%type<exported_func> func -%type<exported_global> global -%type<exported_table> table -%type<exported_memory> memory +%type<export_> export_desc inline_export %type<expr> plain_instr block_instr -%type<expr_list> instr instr_list expr expr1 expr_list if_ const_expr offset -%type<func_fields> func_fields func_body -%type<func> func_info +%type<expr_list> instr instr_list expr expr1 expr_list if_ if_block const_expr offset +%type<func> func_fields_body func_fields_body1 func_body func_body1 func_fields_import func_fields_import1 %type<func_sig> func_sig func_type -%type<func_type> type_def %type<global> global_type -%type<import> import import_kind inline_import +%type<import> import_desc inline_import %type<limits> limits %type<memory> memory_sig -%type<module> module module_fields -%type<optional_export> inline_export inline_export_opt +%type<module> module module_fields_opt module_fields inline_module +%type<module_field> type_def start data elem import export +%type<module_fields> func func_fields table table_fields memory memory_fields global global_fields module_field %type<raw_module> raw_module %type<literal> literal %type<script> script %type<table> table_sig %type<text> bind_var bind_var_opt labeling_opt quoted_text -%type<text_list> non_empty_text_list text_list -%type<types> value_type_list +%type<text_list> text_list text_list_opt +%type<types> block_sig value_type_list %type<u32> align_opt %type<u64> nat offset_opt %type<vars> var_list -%type<var> start type_use var script_var_opt +%type<var> type_use var script_var_opt /* These non-terminals use the types below that have destructors, but the * memory is shared with the lexer, so should not be destroyed. */ @@ -256,21 +210,14 @@ class BinaryErrorHandlerModule : public BinaryErrorHandler { %destructor { delete $$; } <command> %destructor { delete $$; } <commands> %destructor { delete $$; } <consts> -%destructor { delete $$; } <data_segment> -%destructor { delete $$; } <elem_segment> %destructor { delete $$; } <export_> -%destructor { delete $$; } <exported_func> -%destructor { delete $$; } <exported_memory> -%destructor { delete $$; } <exported_table> %destructor { delete $$; } <expr> %destructor { destroy_expr_list($$.first); } <expr_list> -%destructor { destroy_func_fields($$); } <func_fields> +%destructor { destroy_module_field_list(&$$); } <module_fields> %destructor { delete $$; } <func> %destructor { delete $$; } <func_sig> -%destructor { delete $$; } <func_type> %destructor { delete $$; } <global> %destructor { delete $$; } <import> -%destructor { delete $$; } <optional_export> %destructor { delete $$; } <memory> %destructor { delete $$; } <module> %destructor { delete $$; } <raw_module> @@ -290,14 +237,14 @@ class BinaryErrorHandlerModule : public BinaryErrorHandler { /* Auxiliaries */ -non_empty_text_list : +text_list : TEXT { TextListNode* node = new TextListNode(); DUPTEXT(node->text, $1); node->next = nullptr; $$.first = $$.last = node; } - | non_empty_text_list TEXT { + | text_list TEXT { $$ = $1; TextListNode* node = new TextListNode(); DUPTEXT(node->text, $2); @@ -306,9 +253,9 @@ non_empty_text_list : $$.last = node; } ; -text_list : +text_list_opt : /* empty */ { $$.first = $$.last = nullptr; } - | non_empty_text_list + | text_list ; quoted_text : @@ -598,12 +545,18 @@ block_instr : CHECK_END_LABEL(@8, $$->if_.true_->label, $8); } ; +block_sig : + LPAR RESULT value_type_list RPAR { $$ = $3; } +; block : - value_type_list instr_list { - $$ = new Block(); - $$->sig = std::move(*$1); + block_sig block { + $$ = $2; + $$->sig.insert($$->sig.end(), $1->begin(), $1->end()); delete $1; - $$->first = $2.first; + } + | instr_list { + $$ = new Block(); + $$->first = $1.first; } ; @@ -625,15 +578,24 @@ expr1 : expr->loop->label = $2; $$ = join_exprs1(&@1, expr); } - | IF labeling_opt value_type_list if_ { - $$ = $4; - Expr* if_ = $4.last; + | IF labeling_opt if_block { + $$ = $3; + Expr* if_ = $3.last; assert(if_->type == ExprType::If); if_->if_.true_->label = $2; - if_->if_.true_->sig = std::move(*$3); - delete $3; } ; +if_block : + block_sig if_block { + Expr* if_ = $2.last; + assert(if_->type == ExprType::If); + $$ = $2; + Block* true_ = if_->if_.true_; + true_->sig.insert(true_->sig.end(), $1->begin(), $1->end()); + delete $1; + } + | if_ +; if_ : LPAR THEN instr_list RPAR LPAR ELSE instr_list RPAR { Expr* expr = Expr::CreateIf(new Block($3.first), $7.first); @@ -684,133 +646,142 @@ const_expr : ; /* Functions */ +func : + LPAR FUNC bind_var_opt func_fields RPAR { + $$ = $4; + ModuleField* main = $$.first; + main->loc = @2; + if (main->type == ModuleFieldType::Func) { + main->func->name = $3; + } else { + assert(main->type == ModuleFieldType::Import); + main->import->func->name = $3; + } + } +; + func_fields : - func_body - | LPAR RESULT value_type_list RPAR func_body { - $$ = new FuncField(); - $$->type = FuncFieldType::ResultTypes; - $$->types = $3; - $$->next = $5; - } - | LPAR PARAM value_type_list RPAR func_fields { - $$ = new FuncField(); - $$->type = FuncFieldType::ParamTypes; - $$->types = $3; - $$->next = $5; - } - | LPAR PARAM bind_var VALUE_TYPE RPAR func_fields { - $$ = new FuncField(); - $$->type = FuncFieldType::BoundParam; - $$->bound_type.loc = @2; - $$->bound_type.name = $3; - $$->bound_type.type = $4; - $$->next = $6; + type_use func_fields_body { + ModuleField* field = new ModuleField(ModuleFieldType::Func); + field->func = $2; + field->func->decl.has_func_type = true; + field->func->decl.type_var = $1; + $$.first = $$.last = field; + } + | func_fields_body { + ModuleField* field = new ModuleField(ModuleFieldType::Func); + field->func = $1; + $$.first = $$.last = field; + } + | inline_import type_use func_fields_import { + ModuleField* field = new ModuleField(ModuleFieldType::Import); + field->loc = @1; + field->import = $1; + field->import->kind = ExternalKind::Func; + field->import->func = $3; + field->import->func->decl.has_func_type = true; + field->import->func->decl.type_var = $2; + $$.first = $$.last = field; + } + | inline_import func_fields_import { + ModuleField* field = new ModuleField(ModuleFieldType::Import); + field->loc = @1; + field->import = $1; + field->import->kind = ExternalKind::Func; + field->import->func = $2; + $$.first = $$.last = field; + } + | inline_export func_fields { + ModuleField* field = new ModuleField(ModuleFieldType::Export); + field->loc = @1; + field->export_ = $1; + field->export_->kind = ExternalKind::Func; + $$.first = $2.first; + $$.last = $2.last->next = field; } ; -func_body : - instr_list { - $$ = new FuncField(); - $$->type = FuncFieldType::Exprs; - $$->first_expr = $1.first; - $$->next = nullptr; + +func_fields_import : + func_fields_import1 { + $$ = $1; + reverse_bindings(&$$->decl.sig.param_types, &$$->param_bindings); } - | LPAR LOCAL value_type_list RPAR func_body { - $$ = new FuncField(); - $$->type = FuncFieldType::LocalTypes; - $$->types = $3; - $$->next = $5; +; + +func_fields_import1 : + /* empty */ { $$ = new Func(); } + | LPAR RESULT value_type_list RPAR { + $$ = new Func(); + $$->decl.sig.result_types = std::move(*$3); + delete $3; } - | LPAR LOCAL bind_var VALUE_TYPE RPAR func_body { - $$ = new FuncField(); - $$->type = FuncFieldType::BoundLocal; - $$->bound_type.loc = @2; - $$->bound_type.name = $3; - $$->bound_type.type = $4; - $$->next = $6; + | LPAR PARAM value_type_list RPAR func_fields_import1 { + $$ = $5; + $$->decl.sig.param_types.insert($$->decl.sig.param_types.begin(), + $3->begin(), $3->end()); + delete $3; + } + | LPAR PARAM bind_var VALUE_TYPE RPAR func_fields_import1 { + $$ = $6; + $$->param_bindings.emplace(string_slice_to_string($3), + Binding(@3, $$->decl.sig.param_types.size())); + destroy_string_slice(&$3); + $$->decl.sig.param_types.insert($$->decl.sig.param_types.begin(), $4); } ; -func_info : - func_fields { - $$ = new Func(); - FuncField* field = $1; - - while (field) { - FuncField* next = field->next; - switch (field->type) { - case FuncFieldType::Exprs: - $$->first_expr = field->first_expr; - field->first_expr = nullptr; - break; - - case FuncFieldType::ParamTypes: - case FuncFieldType::LocalTypes: { - TypeVector& types = field->type == FuncFieldType::ParamTypes - ? $$->decl.sig.param_types - : $$->local_types; - types.insert(types.end(), field->types->begin(), - field->types->end()); - break; - } - case FuncFieldType::BoundParam: - case FuncFieldType::BoundLocal: { - TypeVector* types; - BindingHash* bindings; - if (field->type == FuncFieldType::BoundParam) { - types = &$$->decl.sig.param_types; - bindings = &$$->param_bindings; - } else { - types = &$$->local_types; - bindings = &$$->local_bindings; - } - - types->push_back(field->bound_type.type); - bindings->emplace( - string_slice_to_string(field->bound_type.name), - Binding(field->bound_type.loc, types->size() - 1)); - break; - } - - case FuncFieldType::ResultTypes: - $$->decl.sig.result_types = std::move(*field->types); - break; - } +func_fields_body : + func_fields_body1 { + $$ = $1; + reverse_bindings(&$$->decl.sig.param_types, &$$->param_bindings); + } +; - delete field; - field = next; - } +func_fields_body1 : + func_body + | LPAR RESULT value_type_list RPAR func_body { + $$ = $5; + $$->decl.sig.result_types = std::move(*$3); + delete $3; + } + | LPAR PARAM value_type_list RPAR func_fields_body1 { + $$ = $5; + $$->decl.sig.param_types.insert($$->decl.sig.param_types.begin(), + $3->begin(), $3->end()); + delete $3; + } + | LPAR PARAM bind_var VALUE_TYPE RPAR func_fields_body1 { + $$ = $6; + $$->param_bindings.emplace(string_slice_to_string($3), + Binding(@3, $$->decl.sig.param_types.size())); + destroy_string_slice(&$3); + $$->decl.sig.param_types.insert($$->decl.sig.param_types.begin(), $4); } ; -func : - LPAR FUNC bind_var_opt inline_export type_use func_info RPAR { - $$ = new ExportedFunc(); - $$->func.reset($6); - $$->func->decl.has_func_type = true; - $$->func->decl.type_var = $5; - $$->func->name = $3; - $$->export_ = std::move(*$4); - delete $4; + +func_body : + func_body1 { + $$ = $1; + reverse_bindings(&$$->local_types, &$$->local_bindings); } - /* Duplicate above for empty inline_export_opt to avoid LR(1) conflict. */ - | LPAR FUNC bind_var_opt type_use func_info RPAR { - $$ = new ExportedFunc(); - $$->func.reset($5); - $$->func->decl.has_func_type = true; - $$->func->decl.type_var = $4; - $$->func->name = $3; +; + +func_body1 : + instr_list { + $$ = new Func(); + $$->first_expr = $1.first; } - | LPAR FUNC bind_var_opt inline_export func_info RPAR { - $$ = new ExportedFunc(); - $$->func.reset($5); - $$->func->name = $3; - $$->export_ = std::move(*$4); - delete $4; + | LPAR LOCAL value_type_list RPAR func_body1 { + $$ = $5; + $$->local_types.insert($$->local_types.begin(), $3->begin(), $3->end()); + delete $3; } - /* Duplicate above for empty inline_export_opt to avoid LR(1) conflict. */ - | LPAR FUNC bind_var_opt func_info RPAR { - $$ = new ExportedFunc(); - $$->func.reset($4); - $$->func->name = $3; + | LPAR LOCAL bind_var VALUE_TYPE RPAR func_body1 { + $$ = $6; + $$->local_bindings.emplace(string_slice_to_string($3), + Binding(@3, $$->local_types.size())); + destroy_string_slice(&$3); + $$->local_types.insert($$->local_types.begin(), $4); } ; @@ -825,145 +796,205 @@ offset : elem : LPAR ELEM var offset var_list RPAR { - $$ = new ElemSegment(); - $$->table_var = $3; - $$->offset = $4.first; - $$->vars = std::move(*$5); + $$ = new ModuleField(ModuleFieldType::ElemSegment); + $$->loc = @2; + $$->elem_segment = new ElemSegment(); + $$->elem_segment->table_var = $3; + $$->elem_segment->offset = $4.first; + $$->elem_segment->vars = std::move(*$5); delete $5; } | LPAR ELEM offset var_list RPAR { - $$ = new ElemSegment(); - $$->table_var.loc = @2; - $$->table_var.type = VarType::Index; - $$->table_var.index = 0; - $$->offset = $3.first; - $$->vars = std::move(*$4); + $$ = new ModuleField(ModuleFieldType::ElemSegment); + $$->loc = @2; + $$->elem_segment = new ElemSegment(); + $$->elem_segment->table_var.loc = @2; + $$->elem_segment->table_var.type = VarType::Index; + $$->elem_segment->table_var.index = 0; + $$->elem_segment->offset = $3.first; + $$->elem_segment->vars = std::move(*$4); delete $4; } ; table : - LPAR TABLE bind_var_opt inline_export_opt table_sig RPAR { - $$ = new ExportedTable(); - $$->table.reset($5); - $$->table->name = $3; - $$->has_elem_segment = false; - $$->export_ = std::move(*$4); - delete $4; + LPAR TABLE bind_var_opt table_fields RPAR { + $$ = $4; + ModuleField* main = $$.first; + main->loc = @2; + if (main->type == ModuleFieldType::Table) { + main->table->name = $3; + } else { + assert(main->type == ModuleFieldType::Import); + main->import->table->name = $3; + } } - | LPAR TABLE bind_var_opt inline_export_opt elem_type - LPAR ELEM var_list RPAR RPAR { - Expr* expr = Expr::CreateConst(Const(Const::I32(), 0)); - expr->loc = @2; +; - $$ = new ExportedTable(); - $$->table.reset(new Table()); - $$->table->name = $3; - $$->table->elem_limits.initial = $8->size(); - $$->table->elem_limits.max = $8->size(); - $$->table->elem_limits.has_max = true; - $$->has_elem_segment = true; - $$->elem_segment.reset(new ElemSegment()); - $$->elem_segment->offset = expr; - $$->elem_segment->vars = std::move(*$8); - delete $8; - $$->export_ = std::move(*$4); +table_fields : + table_sig { + ModuleField* field = new ModuleField(ModuleFieldType::Table); + field->loc = @1; + field->table = $1; + $$.first = $$.last = field; + } + | inline_import table_sig { + ModuleField* field = new ModuleField(ModuleFieldType::Import); + field->loc = @1; + field->import = $1; + field->import->kind = ExternalKind::Table; + field->import->table = $2; + $$.first = $$.last = field; + } + | inline_export table_fields { + ModuleField* field = new ModuleField(ModuleFieldType::Export); + field->loc = @1; + field->export_ = $1; + field->export_->kind = ExternalKind::Table; + $$.first = $2.first; + $$.last = $2.last->next = field; + } + | elem_type LPAR ELEM var_list RPAR { + ModuleField* table_field = new ModuleField(ModuleFieldType::Table); + Table* table = table_field->table = new Table(); + table->elem_limits.initial = $4->size(); + table->elem_limits.max = $4->size(); + table->elem_limits.has_max = true; + ModuleField* elem_field = new ModuleField(ModuleFieldType::ElemSegment); + elem_field->loc = @3; + ElemSegment* elem_segment = elem_field->elem_segment = new ElemSegment(); + elem_segment->offset = Expr::CreateConst(Const(Const::I32(), 0)); + elem_segment->offset->loc = @3; + elem_segment->vars = std::move(*$4); delete $4; + $$.first = table_field; + $$.last = table_field->next = elem_field; } ; data : - LPAR DATA var offset text_list RPAR { - $$ = new DataSegment(); - $$->memory_var = $3; - $$->offset = $4.first; - dup_text_list(&$5, &$$->data, &$$->size); + LPAR DATA var offset text_list_opt RPAR { + $$ = new ModuleField(ModuleFieldType::DataSegment); + $$->loc = @2; + $$->data_segment = new DataSegment(); + $$->data_segment->memory_var = $3; + $$->data_segment->offset = $4.first; + dup_text_list(&$5, &$$->data_segment->data, &$$->data_segment->size); destroy_text_list(&$5); } - | LPAR DATA offset text_list RPAR { - $$ = new DataSegment(); - $$->memory_var.loc = @2; - $$->memory_var.type = VarType::Index; - $$->memory_var.index = 0; - $$->offset = $3.first; - dup_text_list(&$4, &$$->data, &$$->size); + | LPAR DATA offset text_list_opt RPAR { + $$ = new ModuleField(ModuleFieldType::DataSegment); + $$->loc = @2; + $$->data_segment = new DataSegment(); + $$->data_segment->memory_var.loc = @2; + $$->data_segment->memory_var.type = VarType::Index; + $$->data_segment->memory_var.index = 0; + $$->data_segment->offset = $3.first; + dup_text_list(&$4, &$$->data_segment->data, &$$->data_segment->size); destroy_text_list(&$4); } ; memory : - LPAR MEMORY bind_var_opt inline_export_opt memory_sig RPAR { - $$ = new ExportedMemory(); - $$->memory.reset($5); - $$->memory->name = $3; - $$->has_data_segment = false; - $$->export_ = std::move(*$4); - delete $4; - } - | LPAR MEMORY bind_var_opt inline_export LPAR DATA text_list RPAR RPAR { - Expr* expr = Expr::CreateConst(Const(Const::I32(), 0)); - expr->loc = @2; - - $$ = new ExportedMemory(); - $$->has_data_segment = true; - $$->data_segment.reset(new DataSegment()); - $$->data_segment->offset = expr; - dup_text_list(&$7, &$$->data_segment->data, &$$->data_segment->size); - destroy_text_list(&$7); - uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE($$->data_segment->size); - uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size); - $$->memory.reset(new Memory()); - $$->memory->name = $3; - $$->memory->page_limits.initial = page_size; - $$->memory->page_limits.max = page_size; - $$->memory->page_limits.has_max = true; - $$->export_ = std::move(*$4); - delete $4; + LPAR MEMORY bind_var_opt memory_fields RPAR { + $$ = $4; + ModuleField* main = $$.first; + main->loc = @2; + if (main->type == ModuleFieldType::Memory) { + main->memory->name = $3; + } else { + assert(main->type == ModuleFieldType::Import); + main->import->memory->name = $3; + } } - /* Duplicate above for empty inline_export_opt to avoid LR(1) conflict. */ - | LPAR MEMORY bind_var_opt LPAR DATA text_list RPAR RPAR { - Expr* expr = Expr::CreateConst(Const(Const::I32(), 0)); - expr->loc = @2; - - $$ = new ExportedMemory(); - $$->has_data_segment = true; - $$->data_segment.reset(new DataSegment()); - $$->data_segment->offset = expr; - dup_text_list(&$6, &$$->data_segment->data, &$$->data_segment->size); - destroy_text_list(&$6); - uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE($$->data_segment->size); +; + +memory_fields : + memory_sig { + ModuleField* field = new ModuleField(ModuleFieldType::Memory); + field->memory = $1; + $$.first = $$.last = field; + } + | inline_import memory_sig { + ModuleField* field = new ModuleField(ModuleFieldType::Import); + field->loc = @1; + field->import = $1; + field->import->kind = ExternalKind::Memory; + field->import->memory = $2; + $$.first = $$.last = field; + } + | inline_export memory_fields { + ModuleField* field = new ModuleField(ModuleFieldType::Export); + field->loc = @1; + field->export_ = $1; + field->export_->kind = ExternalKind::Memory; + $$.first = $2.first; + $$.last = $2.last->next = field; + } + | LPAR DATA text_list_opt RPAR { + ModuleField* data_field = new ModuleField(ModuleFieldType::DataSegment); + data_field->loc = @2; + DataSegment* data_segment = data_field->data_segment = new DataSegment(); + data_segment->offset = Expr::CreateConst(Const(Const::I32(), 0)); + data_segment->offset->loc = @2; + dup_text_list(&$3, &data_segment->data, &data_segment->size); + destroy_text_list(&$3); + uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE(data_segment->size); uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size); - $$->memory.reset(new Memory()); - $$->memory->name = $3; - $$->memory->page_limits.initial = page_size; - $$->memory->page_limits.max = page_size; - $$->memory->page_limits.has_max = true; - $$->export_.has_export = false; + + ModuleField* memory_field = new ModuleField(ModuleFieldType::Memory); + memory_field->loc = @2; + Memory* memory = memory_field->memory = new Memory(); + memory->page_limits.initial = page_size; + memory->page_limits.max = page_size; + memory->page_limits.has_max = true; + $$.first = memory_field; + $$.last = memory_field->next = data_field; } ; global : - LPAR GLOBAL bind_var_opt inline_export global_type const_expr RPAR { - $$ = new ExportedGlobal(); - $$->global.reset($5); - $$->global->name = $3; - $$->global->init_expr = $6.first; - $$->export_ = std::move(*$4); - delete $4; - } - | LPAR GLOBAL bind_var_opt global_type const_expr RPAR { - $$ = new ExportedGlobal(); - $$->global.reset($4); - $$->global->name = $3; - $$->global->init_expr = $5.first; - $$->export_.has_export = false; + LPAR GLOBAL bind_var_opt global_fields RPAR { + $$ = $4; + ModuleField* main = $$.first; + main->loc = @2; + if (main->type == ModuleFieldType::Global) { + main->global->name = $3; + } else { + assert(main->type == ModuleFieldType::Import); + main->import->global->name = $3; + } } ; +global_fields : + global_type const_expr { + ModuleField* field = new ModuleField(ModuleFieldType::Global); + field->global = $1; + field->global->init_expr = $2.first; + $$.first = $$.last = field; + } + | inline_import global_type { + ModuleField* field = new ModuleField(ModuleFieldType::Import); + field->loc = @1; + field->import = $1; + field->import->kind = ExternalKind::Global; + field->import->global = $2; + $$.first = $$.last = field; + } + | inline_export global_fields { + ModuleField* field = new ModuleField(ModuleFieldType::Export); + field->loc = @1; + field->export_ = $1; + field->export_->kind = ExternalKind::Global; + $$.first = $2.first; + $$.last = $2.last->next = field; + } +; /* Imports & Exports */ -import_kind : +import_desc : LPAR FUNC bind_var_opt type_use RPAR { $$ = new Import(); $$->kind = ExternalKind::Func; @@ -999,45 +1030,14 @@ import_kind : $$->global->name = $3; } ; + import : - LPAR IMPORT quoted_text quoted_text import_kind RPAR { - $$ = $5; - $$->module_name = $3; - $$->field_name = $4; - } - | LPAR FUNC bind_var_opt inline_import type_use RPAR { - $$ = $4; - $$->kind = ExternalKind::Func; - $$->func = new Func(); - $$->func->name = $3; - $$->func->decl.has_func_type = true; - $$->func->decl.type_var = $5; - } - | LPAR FUNC bind_var_opt inline_import func_sig RPAR { - $$ = $4; - $$->kind = ExternalKind::Func; - $$->func = new Func(); - $$->func->name = $3; - $$->func->decl.sig = std::move(*$5); - delete $5; - } - | LPAR TABLE bind_var_opt inline_import table_sig RPAR { - $$ = $4; - $$->kind = ExternalKind::Table; - $$->table = $5; - $$->table->name = $3; - } - | LPAR MEMORY bind_var_opt inline_import memory_sig RPAR { - $$ = $4; - $$->kind = ExternalKind::Memory; - $$->memory = $5; - $$->memory->name = $3; - } - | LPAR GLOBAL bind_var_opt inline_import global_type RPAR { - $$ = $4; - $$->kind = ExternalKind::Global; - $$->global = $5; - $$->global->name = $3; + LPAR IMPORT quoted_text quoted_text import_desc RPAR { + $$ = new ModuleField(ModuleFieldType::Import); + $$->loc = @2; + $$->import = $5; + $$->import->module_name = $3; + $$->import->field_name = $4; } ; @@ -1049,7 +1049,7 @@ inline_import : } ; -export_kind : +export_desc : LPAR FUNC var RPAR { $$ = new Export(); $$->kind = ExternalKind::Func; @@ -1072,25 +1072,18 @@ export_kind : } ; export : - LPAR EXPORT quoted_text export_kind RPAR { - $$ = $4; - $$->name = $3; + LPAR EXPORT quoted_text export_desc RPAR { + $$ = new ModuleField(ModuleFieldType::Export); + $$->loc = @2; + $$->export_ = $4; + $$->export_->name = $3; } ; -inline_export_opt : - /* empty */ { - $$ = new OptionalExport(); - $$->has_export = false; - } - | inline_export -; inline_export : LPAR EXPORT quoted_text RPAR { - $$ = new OptionalExport(); - $$->has_export = true; - $$->export_.reset(new Export()); - $$->export_->name = $3; + $$ = new Export(); + $$->name = $3; } ; @@ -1099,150 +1092,63 @@ inline_export : type_def : LPAR TYPE func_type RPAR { - $$ = new FuncType(); - $$->sig = std::move(*$3); + $$ = new ModuleField(ModuleFieldType::FuncType); + $$->loc = @2; + $$->func_type = new FuncType(); + $$->func_type->sig = std::move(*$3); delete $3; } | LPAR TYPE bind_var func_type RPAR { - $$ = new FuncType(); - $$->name = $3; - $$->sig = std::move(*$4); + $$ = new ModuleField(ModuleFieldType::FuncType); + $$->loc = @2; + $$->func_type = new FuncType(); + $$->func_type->name = $3; + $$->func_type->sig = std::move(*$4); delete $4; } ; start : - LPAR START var RPAR { $$ = $3; } + LPAR START var RPAR { + $$ = new ModuleField(ModuleFieldType::Start); + $$->loc = @2; + $$->start = $3; + } +; + +module_field : + type_def { $$.first = $$.last = $1; } + | global + | table + | memory + | func + | elem { $$.first = $$.last = $1; } + | data { $$.first = $$.last = $1; } + | start { $$.first = $$.last = $1; } + | import { $$.first = $$.last = $1; } + | export { $$.first = $$.last = $1; } +; + +module_fields_opt : + /* empty */ { $$ = new Module(); } + | module_fields ; module_fields : - /* empty */ { + module_field { $$ = new Module(); + check_import_ordering(&@1, lexer, parser, $$, $1.first); + append_module_fields($$, $1.first); } - | module_fields type_def { + | module_fields module_field { $$ = $1; - ModuleField* field; - APPEND_FIELD_TO_LIST($$, field, FuncType, func_type, @2, $2); - APPEND_ITEM_TO_VECTOR($$, func_types, field->func_type); - INSERT_BINDING($$, func_type, func_types, @2, $2->name); - } - | module_fields global { - $$ = $1; - ModuleField* field; - APPEND_FIELD_TO_LIST($$, field, Global, global, @2, $2->global.release()); - APPEND_ITEM_TO_VECTOR($$, globals, field->global); - INSERT_BINDING($$, global, globals, @2, field->global->name); - APPEND_INLINE_EXPORT($$, Global, @2, $2, $$->globals.size() - 1); - delete $2; - } - | module_fields table { - $$ = $1; - ModuleField* field; - APPEND_FIELD_TO_LIST($$, field, Table, table, @2, $2->table.release()); - APPEND_ITEM_TO_VECTOR($$, tables, field->table); - INSERT_BINDING($$, table, tables, @2, field->table->name); - APPEND_INLINE_EXPORT($$, Table, @2, $2, $$->tables.size() - 1); - - if ($2->has_elem_segment) { - ModuleField* elem_segment_field; - APPEND_FIELD_TO_LIST($$, elem_segment_field, ElemSegment, elem_segment, - @2, $2->elem_segment.release()); - APPEND_ITEM_TO_VECTOR($$, elem_segments, - elem_segment_field->elem_segment); - } - delete $2; - } - | module_fields memory { - $$ = $1; - ModuleField* field; - APPEND_FIELD_TO_LIST($$, field, Memory, memory, @2, $2->memory.release()); - APPEND_ITEM_TO_VECTOR($$, memories, field->memory); - INSERT_BINDING($$, memory, memories, @2, field->memory->name); - APPEND_INLINE_EXPORT($$, Memory, @2, $2, $$->memories.size() - 1); - - if ($2->has_data_segment) { - ModuleField* data_segment_field; - APPEND_FIELD_TO_LIST($$, data_segment_field, DataSegment, data_segment, - @2, $2->data_segment.release()); - APPEND_ITEM_TO_VECTOR($$, data_segments, - data_segment_field->data_segment); - } - delete $2; - } - | module_fields func { - $$ = $1; - ModuleField* field; - // Append the implicit func declaration first so it occurs before the - // func definition when serialized out to the text format. - append_implicit_func_declaration(&@2, $$, &$2->func->decl); - APPEND_FIELD_TO_LIST($$, field, Func, func, @2, $2->func.release()); - APPEND_ITEM_TO_VECTOR($$, funcs, field->func); - INSERT_BINDING($$, func, funcs, @2, field->func->name); - APPEND_INLINE_EXPORT($$, Func, @2, $2, $$->funcs.size() - 1); - delete $2; - } - | module_fields elem { - $$ = $1; - ModuleField* field; - APPEND_FIELD_TO_LIST($$, field, ElemSegment, elem_segment, @2, $2); - APPEND_ITEM_TO_VECTOR($$, elem_segments, field->elem_segment); - } - | module_fields data { - $$ = $1; - ModuleField* field; - APPEND_FIELD_TO_LIST($$, field, DataSegment, data_segment, @2, $2); - APPEND_ITEM_TO_VECTOR($$, data_segments, field->data_segment); - } - | module_fields start { - $$ = $1; - ModuleField* field; - APPEND_FIELD_TO_LIST($$, field, Start, start, @2, $2); - $$->start = &field->start; - } - | module_fields import { - $$ = $1; - ModuleField* field; - APPEND_FIELD_TO_LIST($$, field, Import, import, @2, $2); - CHECK_IMPORT_ORDERING($$, func, funcs, @2); - CHECK_IMPORT_ORDERING($$, table, tables, @2); - CHECK_IMPORT_ORDERING($$, memory, memories, @2); - CHECK_IMPORT_ORDERING($$, global, globals, @2); - switch ($2->kind) { - case ExternalKind::Func: - append_implicit_func_declaration(&@2, $$, &field->import->func->decl); - APPEND_ITEM_TO_VECTOR($$, funcs, field->import->func); - INSERT_BINDING($$, func, funcs, @2, field->import->func->name); - $$->num_func_imports++; - break; - case ExternalKind::Table: - APPEND_ITEM_TO_VECTOR($$, tables, field->import->table); - INSERT_BINDING($$, table, tables, @2, field->import->table->name); - $$->num_table_imports++; - break; - case ExternalKind::Memory: - APPEND_ITEM_TO_VECTOR($$, memories, field->import->memory); - INSERT_BINDING($$, memory, memories, @2, field->import->memory->name); - $$->num_memory_imports++; - break; - case ExternalKind::Global: - APPEND_ITEM_TO_VECTOR($$, globals, field->import->global); - INSERT_BINDING($$, global, globals, @2, field->import->global->name); - $$->num_global_imports++; - break; - } - APPEND_ITEM_TO_VECTOR($$, imports, field->import); - } - | module_fields export { - $$ = $1; - ModuleField* field; - APPEND_FIELD_TO_LIST($$, field, Export, export_, @2, $2); - APPEND_ITEM_TO_VECTOR($$, exports, field->export_); - INSERT_BINDING($$, export, exports, @2, field->export_->name); + check_import_ordering(&@2, lexer, parser, $$, $2.first); + append_module_fields($$, $2.first); } ; raw_module : - LPAR MODULE bind_var_opt module_fields RPAR { + LPAR MODULE bind_var_opt module_fields_opt RPAR { $$ = new RawModule(); $$->type = RawModuleType::Text; $$->text = $4; @@ -1262,7 +1168,7 @@ raw_module : } } } - | LPAR MODULE bind_var_opt non_empty_text_list RPAR { + | LPAR MODULE bind_var_opt text_list RPAR { $$ = new RawModule(); $$->type = RawModuleType::Binary; $$->binary.name = $3; @@ -1292,6 +1198,11 @@ module : } ; +inline_module : + module_fields +; + + /* Scripts */ script_var_opt : @@ -1403,7 +1314,10 @@ cmd : } ; cmd_list : - /* empty */ { $$ = new CommandPtrVector(); } + cmd { + $$ = new CommandPtrVector(); + $$->emplace_back($1); + } | cmd_list cmd { $$ = $1; $$->emplace_back($2); @@ -1431,7 +1345,10 @@ const_list : ; script : - cmd_list { + /* empty */ { + $$ = new Script(); + } + | cmd_list { $$ = new Script(); $$->commands = std::move(*$1); delete $1; @@ -1490,14 +1407,20 @@ script : break; } } - parser->script = $$; + } + | inline_module { + $$ = new Script(); + Command* command = new Command(); + command->type = CommandType::Module; + command->module = $1; + $$->commands.emplace_back(command); } ; /* bison destroys the start symbol even on a successful parse. We want to keep script from being destroyed, so create a dummy start symbol. */ script_start : - script + script { parser->script = $1; } ; %% @@ -1574,6 +1497,9 @@ size_t copy_string_contents(StringSlice* text, char* dest) { case 'n': *dest++ = '\n'; break; + case 'r': + *dest++ = '\r'; + break; case 't': *dest++ = '\t'; break; @@ -1587,8 +1513,8 @@ size_t copy_string_contents(StringSlice* text, char* dest) { *dest++ = '\"'; break; default: { - /* The string should be validated already, so we know this is a hex - * sequence */ + // The string should be validated already, so we know this is a hex + // sequence. uint32_t hi; uint32_t lo; if (WABT_SUCCEEDED(parse_hexdigit(src[0], &hi)) && @@ -1632,6 +1558,12 @@ void dup_text_list(TextList* text_list, char** out_data, size_t* out_size) { *out_size = dest - result; } +void reverse_bindings(TypeVector* types, BindingHash* bindings) { + for (auto& pair : *bindings) { + pair.second.index = types->size() - pair.second.index - 1; + } +} + bool is_empty_signature(const FuncSignature* sig) { return sig->result_types.empty() && sig->param_types.empty(); } @@ -1650,6 +1582,160 @@ void append_implicit_func_declaration(Location* loc, } } +void check_import_ordering(Location* loc, WastLexer* lexer, WastParser* parser, + Module* module, ModuleField* first) { + for (ModuleField* field = first; field; field = field->next) { + if (field->type == ModuleFieldType::Import) { + if (module->funcs.size() != module->num_func_imports || + module->tables.size() != module->num_table_imports || + module->memories.size() != module->num_memory_imports || + module->globals.size() != module->num_global_imports) { + wast_parser_error( + loc, lexer, parser, + "imports must occur before all non-import definitions"); + } + } + } +} + +void append_module_fields(Module* module, ModuleField* first) { + ModuleField* main_field = first; + Index main_index = kInvalidIndex; + + for (ModuleField* field = first; field; field = field->next) { + StringSlice* name = nullptr; + BindingHash* bindings = nullptr; + Index index = kInvalidIndex; + + switch (field->type) { + case ModuleFieldType::Func: + append_implicit_func_declaration(&field->loc, module, + &field->func->decl); + name = &field->func->name; + bindings = &module->func_bindings; + index = module->funcs.size(); + module->funcs.push_back(field->func); + break; + + case ModuleFieldType::Global: + name = &field->global->name; + bindings = &module->global_bindings; + index = module->globals.size(); + module->globals.push_back(field->global); + break; + + case ModuleFieldType::Import: + switch (field->import->kind) { + case ExternalKind::Func: + append_implicit_func_declaration(&field->loc, module, + &field->import->func->decl); + name = &field->import->func->name; + bindings = &module->func_bindings; + index = module->funcs.size(); + module->funcs.push_back(field->import->func); + ++module->num_func_imports; + break; + case ExternalKind::Table: + name = &field->import->table->name; + bindings = &module->table_bindings; + index = module->tables.size(); + module->tables.push_back(field->import->table); + ++module->num_table_imports; + break; + case ExternalKind::Memory: + name = &field->import->memory->name; + bindings = &module->memory_bindings; + index = module->memories.size(); + module->memories.push_back(field->import->memory); + ++module->num_memory_imports; + break; + case ExternalKind::Global: + name = &field->import->global->name; + bindings = &module->global_bindings; + index = module->globals.size(); + module->globals.push_back(field->import->global); + ++module->num_global_imports; + break; + } + module->imports.push_back(field->import); + break; + + case ModuleFieldType::Export: + if (field != main_field) { + // If this is not the main field, it must be an inline export. + field->export_->var.type = VarType::Index; + field->export_->var.index = main_index; + } + name = &field->export_->name; + bindings = &module->export_bindings; + index = module->exports.size(); + module->exports.push_back(field->export_); + break; + + case ModuleFieldType::FuncType: + name = &field->func_type->name; + bindings = &module->func_type_bindings; + index = module->func_types.size(); + module->func_types.push_back(field->func_type); + break; + + case ModuleFieldType::Table: + name = &field->table->name; + bindings = &module->table_bindings; + index = module->tables.size(); + module->tables.push_back(field->table); + break; + + case ModuleFieldType::ElemSegment: + if (field != main_field) { + // If this is not the main field, it must be an inline elem segment. + field->elem_segment->table_var.type = VarType::Index; + field->elem_segment->table_var.index = main_index; + } + module->elem_segments.push_back(field->elem_segment); + break; + + case ModuleFieldType::Memory: + name = &field->memory->name; + bindings = &module->memory_bindings; + index = module->memories.size(); + module->memories.push_back(field->memory); + break; + + case ModuleFieldType::DataSegment: + if (field != main_field) { + // If this is not the main field, it must be an inline data segment. + field->data_segment->memory_var.type = VarType::Index; + field->data_segment->memory_var.index = main_index; + } + module->data_segments.push_back(field->data_segment); + break; + + case ModuleFieldType::Start: + module->start = &field->start; + break; + } + + if (field == main_field) + main_index = index; + + if (module->last_field) + module->last_field->next = field; + else + module->first_field = field; + module->last_field = field; + + if (name && bindings) { + // Exported names are allowed to be empty; other names aren't. + if (bindings == &module->export_bindings || + !string_slice_is_empty(name)) { + bindings->emplace(string_slice_to_string(*name), + Binding(field->loc, index)); + } + } + } +} + Result parse_wast(WastLexer* lexer, Script** out_script, SourceErrorHandler* error_handler) { WastParser parser; diff --git a/src/wat-writer.cc b/src/wat-writer.cc index 9eadcce7..1f6d59df 100644 --- a/src/wat-writer.cc +++ b/src/wat-writer.cc @@ -395,7 +395,7 @@ void WatWriter::WriteBeginBlock(LabelType label_type, const char* text) { WritePutsSpace(text); bool has_label = WriteStringSliceOpt(&block->label, NextChar::Space); - WriteTypes(block->sig, nullptr); + WriteTypes(block->sig, "result"); if (!has_label) Writef(" ;; label = @%" PRIindex, GetLabelStackSize()); WriteNewline(FORCE_NEWLINE); |