From bd41dc7a8cfdfa087ffbaa700aa32caf1b18883c Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Mon, 14 Dec 2015 14:21:13 +0000 Subject: [PATCH] Dropped the difference between left and right default rule (thanks to states reordering). Bootstrap lexer changed a lot: this change is caused by commit a4c192f27ae8806e67a8ff311eeff53d74dacb71: "Reordered states in DFA.". Changes in parser by this commit triggered lexer regeneration. --- re2c/bootstrap/src/parse/lex.cc | 2284 +++++++++-------- re2c/bootstrap/src/parse/parser.cc | 4 +- re2c/src/parse/parser.ypp | 4 +- re2c/src/parse/spec.h | 7 +- re2c/test/php20150211_json_scanner.igc.c | 4 +- ....c--emit-dot--flex-syntax--case-inverted.c | 6 +- ...scanner.igcd--flex-syntax--case-inverted.c | 6 +- ...cd--skeleton--flex-syntax--case-inverted.c | 6 +- ...zend_ini_scanner_trimmed.ic--flex-syntax.c | 6 +- ...nd_ini_scanner_trimmed.icwb--flex-syntax.c | 6 +- 10 files changed, 1252 insertions(+), 1081 deletions(-) diff --git a/re2c/bootstrap/src/parse/lex.cc b/re2c/bootstrap/src/parse/lex.cc index 9169c2a9..b1ae28d0 100644 --- a/re2c/bootstrap/src/parse/lex.cc +++ b/re2c/bootstrap/src/parse/lex.cc @@ -1,4 +1,4 @@ -/* Generated by re2c 0.15.3 on Wed Dec 2 12:10:03 2015 */ +/* Generated by re2c 0.15.3 on Mon Dec 14 14:15:20 2015 */ #line 1 "../src/parse/lex.re" #include "src/util/c99_stdint.h" #include @@ -141,9 +141,9 @@ yy6: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yybm[0+yych] & 32) { - goto yy89; + goto yy11; } - if (yych == '#') goto yy91; + if (yych == '#') goto yy14; yy7: #line 189 "../src/parse/lex.re" { @@ -162,19 +162,26 @@ yy7: #line 163 "src/parse/lex.cc" yy8: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '{') goto yy32; + if (yych == '{') goto yy16; goto yy5; yy9: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '/') goto yy84; + if (yych == '/') goto yy18; goto yy5; yy10: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych != '*') goto yy5; - yych = (YYCTYPE)*++YYCURSOR; - if (yych == '!') goto yy13; -yy12: + if (yych == '*') goto yy20; + goto yy5; +yy11: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = (YYCTYPE)*YYCURSOR; + if (yybm[0+yych] & 32) { + goto yy11; + } + if (yych == '#') goto yy14; +yy13: YYCURSOR = YYMARKER; if (yyaccept <= 1) { if (yyaccept == 0) { @@ -183,84 +190,21 @@ yy12: goto yy5; } } else { - goto yy85; - } -yy13: - yych = (YYCTYPE)*++YYCURSOR; - switch (yych) { - case 'g': goto yy16; - case 'i': goto yy15; - case 'm': goto yy17; - case 'r': goto yy19; - case 't': goto yy14; - case 'u': goto yy18; - default: goto yy12; + goto yy19; } yy14: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'y') goto yy74; - goto yy12; -yy15: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'g') goto yy63; - goto yy12; -yy16: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'e') goto yy50; - goto yy12; -yy17: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'a') goto yy42; - goto yy12; -yy18: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == 's') goto yy34; - goto yy12; -yy19: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'e') goto yy20; - if (yych == 'u') goto yy21; - goto yy12; -yy20: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == '2') goto yy31; - goto yy12; -yy21: - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'l') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != ':') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != '2') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy12; ++YYCURSOR; -#line 93 "../src/parse/lex.re" - { - if (opts->rFlag) - { - opts.reset_mapCodeName (); - } - else - { - fatal("found 'rules:re2c' block without -r flag"); - } - tok = cur; - return Rules; - } -#line 260 "src/parse/lex.cc" -yy31: - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy12; -yy32: + if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); + yych = (YYCTYPE)*YYCURSOR; + if (yych <= 0x1F) { + if (yych == '\t') goto yy14; + goto yy13; + } else { + if (yych <= ' ') goto yy14; + if (yych == 'l') goto yy21; + goto yy13; + } +yy16: ++YYCURSOR; #line 78 "../src/parse/lex.re" { @@ -278,158 +222,13 @@ yy32: tok = cur; return Parse; } -#line 282 "src/parse/lex.cc" -yy34: - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != ':') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != '2') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy12; - ++YYCURSOR; -#line 105 "../src/parse/lex.re" - { - if (!opts->rFlag) - { - fatal("found 'use:re2c' block without -r flag"); - } - reuse(); - if (opts->target == opt_t::CODE) - { - const size_t lexeme_len = sizeof ("/*!use:re2c") - 1; - out.wraw(tok, tok_len () - lexeme_len); - } - tok = cur; - return Reuse; - } -#line 312 "src/parse/lex.cc" -yy42: - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'x') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != ':') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != '2') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy12; - ++YYCURSOR; -#line 119 "../src/parse/lex.re" - { - if (opts->target != opt_t::DOT) - { - out.wdelay_yymaxfill (); - } - tok = pos = cur; - ignore_eoc = true; - goto echo; - } -#line 337 "src/parse/lex.cc" -yy50: - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'a') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 't') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != ':') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != '2') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy12; - ++YYCURSOR; -#line 128 "../src/parse/lex.re" - { - tok = pos = cur; - out.wdelay_state_goto (opts->topIndent); - ignore_eoc = true; - goto echo; - } -#line 369 "src/parse/lex.cc" -yy63: - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'o') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != ':') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != '2') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy12; - ++YYCURSOR; -#line 134 "../src/parse/lex.re" - { - tok = pos = cur; - ignore_eoc = true; - goto echo; - } -#line 396 "src/parse/lex.cc" -yy74: - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'p') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 's') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != ':') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'r') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != '2') goto yy12; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'c') goto yy12; - ++YYCURSOR; -#line 139 "../src/parse/lex.re" - { - tok = pos = cur; - ignore_eoc = true; - if (opts->target != opt_t::DOT) - { - out.wdelay_line_info ().ws("\n") - .wdelay_types ().ws("\n") - .wline_info (cline, get_fname ().c_str ()); - } - goto echo; - } -#line 427 "src/parse/lex.cc" -yy84: +#line 226 "src/parse/lex.cc" +yy18: yyaccept = 2; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == '\n') goto yy87; - if (yych == '\r') goto yy86; -yy85: + if (yych == '\n') goto yy22; + if (yych == '\r') goto yy24; +yy19: #line 168 "../src/parse/lex.re" { if (ignore_eoc) @@ -448,11 +247,16 @@ yy85: tok = pos = cur; goto echo; } -#line 452 "src/parse/lex.cc" -yy86: +#line 251 "src/parse/lex.cc" +yy20: yych = (YYCTYPE)*++YYCURSOR; - if (yych != '\n') goto yy12; -yy87: + if (yych == '!') goto yy25; + goto yy13; +yy21: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'i') goto yy26; + goto yy13; +yy22: ++YYCURSOR; #line 150 "../src/parse/lex.re" { @@ -473,79 +277,209 @@ yy87: tok = pos = cur; goto echo; } -#line 477 "src/parse/lex.cc" -yy89: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = (YYCTYPE)*YYCURSOR; - if (yybm[0+yych] & 32) { - goto yy89; - } - if (yych != '#') goto yy12; -yy91: - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); - yych = (YYCTYPE)*YYCURSOR; - if (yych <= 0x1F) { - if (yych == '\t') goto yy91; - goto yy12; - } else { - if (yych <= ' ') goto yy91; - if (yych != 'l') goto yy12; - } +#line 281 "src/parse/lex.cc" +yy24: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy12; + if (yych == '\n') goto yy22; + goto yy13; +yy25: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy12; + switch (yych) { + case 'g': goto yy27; + case 'i': goto yy28; + case 'm': goto yy29; + case 'r': goto yy30; + case 't': goto yy31; + case 'u': goto yy32; + default: goto yy13; + } +yy26: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'n') goto yy33; + goto yy13; +yy27: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy34; + goto yy13; +yy28: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'g') goto yy35; + goto yy13; +yy29: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'a') goto yy36; + goto yy13; +yy30: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy37; + if (yych == 'u') goto yy38; + goto yy13; +yy31: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy12; + if (yych == 'y') goto yy39; + goto yy13; +yy32: yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '0') goto yy98; - if (yych <= '9') goto yy12; - goto yy98; -yy97: + if (yych == 's') goto yy40; + goto yy13; +yy33: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy41; + goto yy13; +yy34: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 't') goto yy42; + goto yy13; +yy35: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'n') goto yy43; + goto yy13; +yy36: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'x') goto yy44; + goto yy13; +yy37: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '2') goto yy45; + goto yy13; +yy38: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'l') goto yy46; + goto yy13; +yy39: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'p') goto yy47; + goto yy13; +yy40: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy48; + goto yy13; +yy41: + yych = (YYCTYPE)*++YYCURSOR; + if (yych <= '0') goto yy50; + if (yych <= '9') goto yy13; + goto yy50; +yy42: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 's') goto yy51; + goto yy13; +yy43: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'o') goto yy52; + goto yy13; +yy44: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == ':') goto yy53; + goto yy13; +yy45: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'c') goto yy16; + goto yy13; +yy46: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy54; + goto yy13; +yy47: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy55; + goto yy13; +yy48: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == ':') goto yy56; + goto yy13; +yy49: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy98: +yy50: if (yych <= 0x1F) { - if (yych == '\t') goto yy97; - goto yy12; + if (yych == '\t') goto yy49; + goto yy13; } else { - if (yych <= ' ') goto yy97; - if (yych <= '0') goto yy12; - if (yych >= ':') goto yy12; + if (yych <= ' ') goto yy49; + if (yych <= '0') goto yy13; + if (yych <= '9') goto yy57; + goto yy13; } -yy99: +yy51: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 't') goto yy59; + goto yy13; +yy52: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'r') goto yy60; + goto yy13; +yy53: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'r') goto yy61; + goto yy13; +yy54: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 's') goto yy62; + goto yy13; +yy55: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 's') goto yy63; + goto yy13; +yy56: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'r') goto yy64; + goto yy13; +yy57: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 64) { - goto yy99; + goto yy57; } if (yych <= '\f') { - if (yych <= 0x08) goto yy12; - if (yych <= '\t') goto yy101; - if (yych <= '\n') goto yy103; - goto yy12; + if (yych <= 0x08) goto yy13; + if (yych <= '\t') goto yy65; + if (yych <= '\n') goto yy67; + goto yy13; } else { - if (yych <= '\r') goto yy105; - if (yych != ' ') goto yy12; + if (yych <= '\r') goto yy69; + if (yych == ' ') goto yy65; + goto yy13; } -yy101: +yy59: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'a') goto yy70; + goto yy13; +yy60: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy71; + goto yy13; +yy61: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy72; + goto yy13; +yy62: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == ':') goto yy73; + goto yy13; +yy63: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == ':') goto yy74; + goto yy13; +yy64: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy75; + goto yy13; +yy65: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy101; - goto yy12; + if (yych == '\t') goto yy65; + goto yy13; } else { - if (yych <= ' ') goto yy101; - if (yych == '"') goto yy106; - goto yy12; + if (yych <= ' ') goto yy65; + if (yych == '"') goto yy76; + goto yy13; } -yy103: +yy67: ++YYCURSOR; YYCURSOR = YYCTXMARKER; #line 185 "../src/parse/lex.re" @@ -553,30 +487,207 @@ yy103: set_sourceline (); goto echo; } -#line 557 "src/parse/lex.cc" -yy105: +#line 491 "src/parse/lex.cc" +yy69: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy103; - goto yy12; -yy106: + if (yych == '\n') goto yy67; + goto yy13; +yy70: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 't') goto yy78; + goto yy13; +yy71: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == ':') goto yy79; + goto yy13; +yy72: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '2') goto yy80; + goto yy13; +yy73: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'r') goto yy81; + goto yy13; +yy74: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'r') goto yy82; + goto yy13; +yy75: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '2') goto yy83; + goto yy13; +yy76: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 128) { - goto yy106; + goto yy76; } - if (yych <= '\n') goto yy12; - if (yych <= '"') goto yy109; + if (yych <= '\n') goto yy13; + if (yych <= '"') goto yy84; + goto yy85; +yy78: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy86; + goto yy13; +yy79: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'r') goto yy87; + goto yy13; +yy80: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'c') goto yy88; + goto yy13; +yy81: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy90; + goto yy13; +yy82: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy91; + goto yy13; +yy83: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'c') goto yy92; + goto yy13; +yy84: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '\n') goto yy67; + if (yych == '\r') goto yy69; + goto yy13; +yy85: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy12; - goto yy106; -yy109: + if (yych == '\n') goto yy13; + goto yy76; +yy86: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == ':') goto yy94; + goto yy13; +yy87: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy95; + goto yy13; +yy88: + ++YYCURSOR; +#line 119 "../src/parse/lex.re" + { + if (opts->target != opt_t::DOT) + { + out.wdelay_yymaxfill (); + } + tok = pos = cur; + ignore_eoc = true; + goto echo; + } +#line 585 "src/parse/lex.cc" +yy90: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '2') goto yy96; + goto yy13; +yy91: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '2') goto yy97; + goto yy13; +yy92: + ++YYCURSOR; +#line 105 "../src/parse/lex.re" + { + if (!opts->rFlag) + { + fatal("found 'use:re2c' block without -r flag"); + } + reuse(); + if (opts->target == opt_t::CODE) + { + const size_t lexeme_len = sizeof ("/*!use:re2c") - 1; + out.wraw(tok, tok_len () - lexeme_len); + } + tok = cur; + return Reuse; + } +#line 611 "src/parse/lex.cc" +yy94: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'r') goto yy98; + goto yy13; +yy95: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '2') goto yy99; + goto yy13; +yy96: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'c') goto yy100; + goto yy13; +yy97: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'c') goto yy102; + goto yy13; +yy98: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy104; + goto yy13; +yy99: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'c') goto yy105; + goto yy13; +yy100: + ++YYCURSOR; +#line 93 "../src/parse/lex.re" + { + if (opts->rFlag) + { + opts.reset_mapCodeName (); + } + else + { + fatal("found 'rules:re2c' block without -r flag"); + } + tok = cur; + return Rules; + } +#line 651 "src/parse/lex.cc" +yy102: + ++YYCURSOR; +#line 139 "../src/parse/lex.re" + { + tok = pos = cur; + ignore_eoc = true; + if (opts->target != opt_t::DOT) + { + out.wdelay_line_info ().ws("\n") + .wdelay_types ().ws("\n") + .wline_info (cline, get_fname ().c_str ()); + } + goto echo; + } +#line 666 "src/parse/lex.cc" +yy104: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '2') goto yy107; + goto yy13; +yy105: + ++YYCURSOR; +#line 134 "../src/parse/lex.re" + { + tok = pos = cur; + ignore_eoc = true; + goto echo; + } +#line 679 "src/parse/lex.cc" +yy107: + yych = (YYCTYPE)*++YYCURSOR; + if (yych != 'c') goto yy13; ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '\n') goto yy103; - if (yych == '\r') goto yy105; - goto yy12; +#line 128 "../src/parse/lex.re" + { + tok = pos = cur; + out.wdelay_state_goto (opts->topIndent); + ignore_eoc = true; + goto echo; + } +#line 691 "src/parse/lex.cc" } #line 216 "../src/parse/lex.re" @@ -598,19 +709,19 @@ scan: start: -#line 602 "src/parse/lex.cc" +#line 713 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; static const unsigned char yybm[] = { 128, 128, 128, 128, 128, 128, 128, 128, - 128, 192, 0, 128, 128, 128, 128, 128, + 128, 144, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 192, 128, 0, 128, 128, 128, 128, 128, + 144, 128, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 128, 128, 128, 128, 128, 128, + 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 128, 128, 128, 128, 128, 128, 128, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, @@ -718,25 +829,25 @@ yy113: fatalf("unexpected character: '%c'", *tok); goto scan; } -#line 722 "src/parse/lex.cc" +#line 833 "src/parse/lex.cc" yy114: ++YYCURSOR; yych = (YYCTYPE)*YYCURSOR; - goto yy220; + goto yy142; yy115: #line 372 "../src/parse/lex.re" { goto scan; } -#line 732 "src/parse/lex.cc" +#line 843 "src/parse/lex.cc" yy116: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= 0x1F) { - if (yych == '\t') goto yy198; + if (yych == '\t') goto yy143; } else { - if (yych <= ' ') goto yy198; - if (yych == '#') goto yy200; + if (yych <= ' ') goto yy143; + if (yych == '#') goto yy146; } yy117: #line 381 "../src/parse/lex.re" @@ -746,25 +857,25 @@ yy117: cline++; goto scan; } -#line 750 "src/parse/lex.cc" +#line 861 "src/parse/lex.cc" yy118: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy197; + if (yych == '\n') goto yy148; goto yy113; yy119: ++YYCURSOR; #line 265 "../src/parse/lex.re" { yylval.regexp = lex_str('"', opts->bCaseInsensitive || opts->bCaseInverted); return TOKEN_REGEXP; } -#line 759 "src/parse/lex.cc" +#line 870 "src/parse/lex.cc" yy121: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '}') goto yy195; + if (yych == '}') goto yy149; goto yy113; yy122: ++YYCURSOR; #line 264 "../src/parse/lex.re" { yylval.regexp = lex_str('\'', opts->bCaseInsensitive || !opts->bCaseInverted); return TOKEN_REGEXP; } -#line 768 "src/parse/lex.cc" +#line 879 "src/parse/lex.cc" yy124: ++YYCURSOR; yy125: @@ -772,16 +883,16 @@ yy125: { return *tok; } -#line 776 "src/parse/lex.cc" +#line 887 "src/parse/lex.cc" yy126: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '/') goto yy195; + if ((yych = (YYCTYPE)*YYCURSOR) == '/') goto yy149; #line 279 "../src/parse/lex.re" { yylval.op = *tok; return TOKEN_STAR; } -#line 785 "src/parse/lex.cc" +#line 896 "src/parse/lex.cc" yy128: ++YYCURSOR; #line 283 "../src/parse/lex.re" @@ -789,7 +900,7 @@ yy128: yylval.op = *tok; return TOKEN_CLOSE; } -#line 793 "src/parse/lex.cc" +#line 904 "src/parse/lex.cc" yy130: ++YYCURSOR; #line 367 "../src/parse/lex.re" @@ -797,53 +908,53 @@ yy130: yylval.regexp = mkDot(); return TOKEN_REGEXP; } -#line 801 "src/parse/lex.cc" +#line 912 "src/parse/lex.cc" yy132: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '*') goto yy191; - if (yych == '/') goto yy193; + if (yych == '*') goto yy151; + if (yych == '/') goto yy153; goto yy125; yy133: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - goto yy165; + goto yy161; yy134: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych == '=') goto yy187; + if (yych == '=') goto yy162; goto yy113; yy135: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == '!') goto yy178; - if (yych == '>') goto yy180; + if (yych == '!') goto yy164; + if (yych == '>') goto yy166; goto yy125; yy136: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '^') goto yy176; + if ((yych = (YYCTYPE)*YYCURSOR) == '^') goto yy167; #line 266 "../src/parse/lex.re" { yylval.regexp = lex_cls(false); return TOKEN_REGEXP; } -#line 827 "src/parse/lex.cc" +#line 938 "src/parse/lex.cc" yy138: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych == 'e') goto yy166; - goto yy165; + if (yych == 'e') goto yy169; + goto yy161; yy139: yyaccept = 2; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy141; + if (yybm[0+yych] & 64) { + goto yy172; } if (yych <= 'Z') { - if (yych == ',') goto yy146; - if (yych >= 'A') goto yy144; + if (yych == ',') goto yy170; + if (yych >= 'A') goto yy174; } else { if (yych <= '_') { - if (yych >= '_') goto yy144; + if (yych >= '_') goto yy174; } else { if (yych <= '`') goto yy140; - if (yych <= 'z') goto yy144; + if (yych <= 'z') goto yy174; } } yy140: @@ -852,29 +963,27 @@ yy140: depth = 1; goto code; } -#line 856 "src/parse/lex.cc" +#line 967 "src/parse/lex.cc" yy141: ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; +yy142: if (yybm[0+yych] & 16) { goto yy141; } - if (yych <= '^') { - if (yych <= ',') { - if (yych >= ',') goto yy152; - } else { - if (yych <= '@') goto yy143; - if (yych <= 'Z') goto yy144; - } + goto yy115; +yy143: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = (YYCTYPE)*YYCURSOR; + if (yych <= 0x1F) { + if (yych == '\t') goto yy143; } else { - if (yych <= 'z') { - if (yych != '`') goto yy144; - } else { - if (yych == '}') goto yy150; - } + if (yych <= ' ') goto yy143; + if (yych == '#') goto yy146; } -yy143: +yy145: YYCURSOR = YYMARKER; if (yyaccept <= 1) { if (yyaccept == 0) { @@ -886,89 +995,56 @@ yy143: if (yyaccept == 2) { goto yy140; } else { - goto yy147; + goto yy171; } } -yy144: +yy146: ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); + if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = (YYCTYPE)*YYCURSOR; - if (yybm[0+yych] & 32) { - goto yy144; + if (yych <= 0x1F) { + if (yych == '\t') goto yy146; + goto yy145; + } else { + if (yych <= ' ') goto yy146; + if (yych == 'l') goto yy176; + goto yy145; } - if (yych == '}') goto yy148; - goto yy143; -yy146: - ++YYCURSOR; -yy147: -#line 319 "../src/parse/lex.re" - { - fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"); - } -#line 909 "src/parse/lex.cc" yy148: + yyaccept = 0; + yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); + if (yych <= 0x1F) { + if (yych == '\t') goto yy143; + goto yy117; + } else { + if (yych <= ' ') goto yy143; + if (yych == '#') goto yy146; + goto yy117; + } +yy149: ++YYCURSOR; -#line 323 "../src/parse/lex.re" +#line 259 "../src/parse/lex.re" { - if (!opts->FFlag) { - fatal("curly braces for names only allowed with -F switch"); - } - yylval.str = new std::string (tok + 1, tok_len () - 2); // -2 to omit braces - return TOKEN_ID; + tok = cur; + return 0; } -#line 920 "src/parse/lex.cc" -yy150: +#line 1032 "src/parse/lex.cc" +yy151: ++YYCURSOR; -#line 288 "../src/parse/lex.re" +#line 253 "../src/parse/lex.re" { - if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.extop.min)) - { - fatal ("repetition count overflow"); - } - yylval.extop.max = yylval.extop.min; - return TOKEN_CLOSESIZE; + depth = 1; + goto comment; } -#line 932 "src/parse/lex.cc" -yy152: - yyaccept = 3; - yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy147; - if (yych <= '9') goto yy155; - if (yych != '}') goto yy147; +#line 1040 "src/parse/lex.cc" +yy153: ++YYCURSOR; -#line 310 "../src/parse/lex.re" +#line 250 "../src/parse/lex.re" { - if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.extop.min)) - { - fatal ("repetition lower bound overflow"); - } - yylval.extop.max = std::numeric_limits::max(); - return TOKEN_CLOSESIZE; - } -#line 949 "src/parse/lex.cc" + goto nextLine; + } +#line 1047 "src/parse/lex.cc" yy155: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = (YYCTYPE)*YYCURSOR; - if (yych <= '/') goto yy143; - if (yych <= '9') goto yy155; - if (yych != '}') goto yy143; - ++YYCURSOR; -#line 297 "../src/parse/lex.re" - { - const char * p = strchr (tok, ','); - if (!s_to_u32_unsafe (tok + 1, p, yylval.extop.min)) - { - fatal ("repetition lower bound overflow"); - } - if (!s_to_u32_unsafe (p + 1, cur - 1, yylval.extop.max)) - { - fatal ("repetition upper bound overflow"); - } - return TOKEN_CLOSESIZE; - } -#line 971 "src/parse/lex.cc" -yy159: ++YYCURSOR; YYCURSOR = YYCTXMARKER; #line 351 "../src/parse/lex.re" @@ -987,68 +1063,132 @@ yy159: return TOKEN_REGEXP; } } -#line 991 "src/parse/lex.cc" -yy161: +#line 1067 "src/parse/lex.cc" +yy157: yych = (YYCTYPE)*++YYCURSOR; - goto yy174; -yy162: + goto yy180; +yy158: ++YYCURSOR; -yy163: +yy159: YYCURSOR = YYCTXMARKER; #line 346 "../src/parse/lex.re" { yylval.str = new std::string (tok, tok_len ()); return TOKEN_ID; } -#line 1004 "src/parse/lex.cc" -yy164: +#line 1080 "src/parse/lex.cc" +yy160: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy165: - if (yych <= '9') { - if (yych <= ' ') { - if (yych == '\t') goto yy161; - if (yych <= 0x1F) goto yy159; - goto yy161; - } else { - if (yych == ',') goto yy162; - if (yych <= '/') goto yy159; - goto yy164; - } +yy161: + if (yybm[0+yych] & 32) { + goto yy160; + } + if (yych <= ' ') { + if (yych == '\t') goto yy157; + if (yych <= 0x1F) goto yy155; + goto yy157; } else { - if (yych <= 'Z') { - if (yych <= '<') goto yy159; - if (yych <= '>') goto yy162; - if (yych <= '@') goto yy159; - goto yy164; + if (yych <= ',') { + if (yych <= '+') goto yy155; + goto yy158; } else { - if (yych <= '_') { - if (yych <= '^') goto yy159; - goto yy164; - } else { - if (yych <= '`') goto yy159; - if (yych <= 'z') goto yy164; - goto yy159; - } + if (yych <= '<') goto yy155; + if (yych <= '>') goto yy158; + goto yy155; } } +yy162: + ++YYCURSOR; + if ((yych = (YYCTYPE)*YYCURSOR) == '>') goto yy182; +#line 244 "../src/parse/lex.re" + { + tok += 2; /* skip ":=" */ + depth = 0; + goto code; + } +#line 1113 "src/parse/lex.cc" +yy164: + ++YYCURSOR; +#line 272 "../src/parse/lex.re" + { + return TOKEN_SETUP; + } +#line 1120 "src/parse/lex.cc" yy166: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych != '2') goto yy165; - yych = (YYCTYPE)*++YYCURSOR; - YYCTXMARKER = YYCURSOR; - if (yych != 'c') goto yy165; + goto yy185; +yy167: + ++YYCURSOR; +#line 267 "../src/parse/lex.re" + { yylval.regexp = lex_cls(true); return TOKEN_REGEXP; } +#line 1129 "src/parse/lex.cc" +yy169: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych != ':') goto yy165; + if (yych == '2') goto yy190; + goto yy161; +yy170: ++YYCURSOR; -#line 331 "../src/parse/lex.re" - { lex_conf (); return TOKEN_CONF; } -#line 1051 "src/parse/lex.cc" yy171: +#line 319 "../src/parse/lex.re" + { + fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"); + } +#line 1142 "src/parse/lex.cc" +yy172: + ++YYCURSOR; + if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = (YYCTYPE)*YYCURSOR; + if (yybm[0+yych] & 64) { + goto yy172; + } + if (yych <= '^') { + if (yych <= ',') { + if (yych <= '+') goto yy145; + goto yy191; + } else { + if (yych <= '@') goto yy145; + if (yych >= '[') goto yy145; + } + } else { + if (yych <= 'z') { + if (yych == '`') goto yy145; + } else { + if (yych == '}') goto yy192; + goto yy145; + } + } +yy174: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = (YYCTYPE)*YYCURSOR; + if (yych <= '^') { + if (yych <= '9') { + if (yych <= '/') goto yy145; + goto yy174; + } else { + if (yych <= '@') goto yy145; + if (yych <= 'Z') goto yy174; + goto yy145; + } + } else { + if (yych <= 'z') { + if (yych == '`') goto yy145; + goto yy174; + } else { + if (yych == '}') goto yy194; + goto yy145; + } + } +yy176: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'i') goto yy196; + goto yy145; +yy177: ++YYCURSOR; YYCURSOR = YYCTXMARKER; #line 333 "../src/parse/lex.re" @@ -1064,206 +1204,214 @@ yy171: return TOKEN_ID; } } -#line 1068 "src/parse/lex.cc" -yy173: +#line 1208 "src/parse/lex.cc" +yy179: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; -yy174: - if (yybm[0+yych] & 64) { - goto yy173; +yy180: + if (yych <= ' ') { + if (yych == '\t') goto yy179; + if (yych <= 0x1F) goto yy177; + goto yy179; + } else { + if (yych <= ',') { + if (yych <= '+') goto yy177; + } else { + if (yych <= '<') goto yy177; + if (yych >= '?') goto yy177; + } } - if (yych == ',') goto yy175; - if (yych <= '<') goto yy171; - if (yych >= '?') goto yy171; -yy175: yych = (YYCTYPE)*++YYCURSOR; - goto yy163; -yy176: - ++YYCURSOR; -#line 267 "../src/parse/lex.re" - { yylval.regexp = lex_cls(true); return TOKEN_REGEXP; } -#line 1087 "src/parse/lex.cc" -yy178: + goto yy159; +yy182: ++YYCURSOR; -#line 272 "../src/parse/lex.re" + YYCURSOR = YYCTXMARKER; +#line 240 "../src/parse/lex.re" { - return TOKEN_SETUP; + return *tok; } -#line 1094 "src/parse/lex.cc" -yy180: - yych = (YYCTYPE)*++YYCURSOR; - YYCTXMARKER = YYCURSOR; - goto yy182; -yy181: +#line 1235 "src/parse/lex.cc" +yy184: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; -yy182: +yy185: if (yych <= '9') { if (yych <= '\t') { - if (yych <= 0x08) goto yy143; - goto yy181; + if (yych <= 0x08) goto yy145; + goto yy184; } else { - if (yych == ' ') goto yy181; - goto yy143; + if (yych == ' ') goto yy184; + goto yy145; } } else { if (yych <= '=') { - if (yych <= ':') goto yy186; - if (yych <= '<') goto yy143; - goto yy185; - } else { - if (yych != '{') goto yy143; - } - } -yy183: - ++YYCURSOR; - YYCURSOR = YYCTXMARKER; -#line 269 "../src/parse/lex.re" - { - return TOKEN_NOCOND; - } -#line 1128 "src/parse/lex.cc" -yy185: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == '>') goto yy183; - goto yy143; + if (yych <= ':') goto yy186; + if (yych <= '<') goto yy145; + goto yy187; + } else { + if (yych == '{') goto yy188; + goto yy145; + } + } yy186: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '=') goto yy183; - goto yy143; + if (yych == '=') goto yy188; + goto yy145; yy187: - ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '>') goto yy189; -#line 244 "../src/parse/lex.re" - { - tok += 2; /* skip ":=" */ - depth = 0; - goto code; - } -#line 1146 "src/parse/lex.cc" -yy189: + yych = (YYCTYPE)*++YYCURSOR; + if (yych != '>') goto yy145; +yy188: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 240 "../src/parse/lex.re" +#line 269 "../src/parse/lex.re" { - return *tok; + return TOKEN_NOCOND; } -#line 1154 "src/parse/lex.cc" +#line 1273 "src/parse/lex.cc" +yy190: + yych = (YYCTYPE)*++YYCURSOR; + YYCTXMARKER = YYCURSOR; + if (yych == 'c') goto yy197; + goto yy161; yy191: + yyaccept = 3; + yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); + if (yych <= '/') goto yy171; + if (yych <= '9') goto yy198; + if (yych == '}') goto yy200; + goto yy171; +yy192: ++YYCURSOR; -#line 253 "../src/parse/lex.re" +#line 288 "../src/parse/lex.re" { - depth = 1; - goto comment; + if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.extop.min)) + { + fatal ("repetition count overflow"); + } + yylval.extop.max = yylval.extop.min; + return TOKEN_CLOSESIZE; } -#line 1162 "src/parse/lex.cc" -yy193: - ++YYCURSOR; -#line 250 "../src/parse/lex.re" - { - goto nextLine; - } -#line 1169 "src/parse/lex.cc" -yy195: +#line 1297 "src/parse/lex.cc" +yy194: ++YYCURSOR; -#line 259 "../src/parse/lex.re" +#line 323 "../src/parse/lex.re" { - tok = cur; - return 0; + if (!opts->FFlag) { + fatal("curly braces for names only allowed with -F switch"); + } + yylval.str = new std::string (tok + 1, tok_len () - 2); // -2 to omit braces + return TOKEN_ID; } -#line 1177 "src/parse/lex.cc" +#line 1308 "src/parse/lex.cc" +yy196: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'n') goto yy202; + goto yy145; yy197: - yyaccept = 0; - yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych <= 0x1F) { - if (yych != '\t') goto yy117; - } else { - if (yych <= ' ') goto yy198; - if (yych == '#') goto yy200; - goto yy117; - } + yych = (YYCTYPE)*++YYCURSOR; + YYCTXMARKER = YYCURSOR; + if (yych == ':') goto yy203; + goto yy161; yy198: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych <= 0x1F) { - if (yych == '\t') goto yy198; - goto yy143; - } else { - if (yych <= ' ') goto yy198; - if (yych != '#') goto yy143; - } + if (yych <= '/') goto yy145; + if (yych <= '9') goto yy198; + if (yych == '}') goto yy205; + goto yy145; yy200: ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); - yych = (YYCTYPE)*YYCURSOR; - if (yych <= 0x1F) { - if (yych == '\t') goto yy200; - goto yy143; - } else { - if (yych <= ' ') goto yy200; - if (yych != 'l') goto yy143; - } - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy143; - yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy143; +#line 310 "../src/parse/lex.re" + { + if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.extop.min)) + { + fatal ("repetition lower bound overflow"); + } + yylval.extop.max = std::numeric_limits::max(); + return TOKEN_CLOSESIZE; + } +#line 1337 "src/parse/lex.cc" +yy202: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy143; + if (yych == 'e') goto yy207; + goto yy145; +yy203: + ++YYCURSOR; +#line 331 "../src/parse/lex.re" + { lex_conf (); return TOKEN_CONF; } +#line 1346 "src/parse/lex.cc" +yy205: + ++YYCURSOR; +#line 297 "../src/parse/lex.re" + { + const char * p = strchr (tok, ','); + if (!s_to_u32_unsafe (tok + 1, p, yylval.extop.min)) + { + fatal ("repetition lower bound overflow"); + } + if (!s_to_u32_unsafe (p + 1, cur - 1, yylval.extop.max)) + { + fatal ("repetition upper bound overflow"); + } + return TOKEN_CLOSESIZE; + } +#line 1362 "src/parse/lex.cc" +yy207: yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '0') goto yy207; - if (yych <= '9') goto yy143; - goto yy207; -yy206: + if (yych <= '0') goto yy209; + if (yych <= '9') goto yy145; + goto yy209; +yy208: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy207: +yy209: if (yych <= 0x1F) { - if (yych == '\t') goto yy206; - goto yy143; + if (yych == '\t') goto yy208; + goto yy145; } else { - if (yych <= ' ') goto yy206; - if (yych <= '0') goto yy143; - if (yych >= ':') goto yy143; + if (yych <= ' ') goto yy208; + if (yych <= '0') goto yy145; + if (yych >= ':') goto yy145; } -yy208: +yy210: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yych <= '\r') { if (yych <= '\t') { - if (yych <= 0x08) goto yy143; + if (yych <= 0x08) goto yy145; } else { - if (yych <= '\n') goto yy212; - if (yych <= '\f') goto yy143; - goto yy214; + if (yych <= '\n') goto yy214; + if (yych <= '\f') goto yy145; + goto yy216; } } else { if (yych <= ' ') { - if (yych <= 0x1F) goto yy143; + if (yych <= 0x1F) goto yy145; } else { - if (yych <= '/') goto yy143; - if (yych <= '9') goto yy208; - goto yy143; + if (yych <= '/') goto yy145; + if (yych <= '9') goto yy210; + goto yy145; } } -yy210: +yy212: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy210; - goto yy143; + if (yych == '\t') goto yy212; + goto yy145; } else { - if (yych <= ' ') goto yy210; - if (yych == '"') goto yy215; - goto yy143; + if (yych <= ' ') goto yy212; + if (yych == '"') goto yy217; + goto yy145; } -yy212: +yy214: ++YYCURSOR; YYCURSOR = YYCTXMARKER; #line 376 "../src/parse/lex.re" @@ -1271,45 +1419,37 @@ yy212: set_sourceline (); goto scan; } -#line 1275 "src/parse/lex.cc" -yy214: +#line 1423 "src/parse/lex.cc" +yy216: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy212; - goto yy143; -yy215: + if (yych == '\n') goto yy214; + goto yy145; +yy217: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 128) { - goto yy215; + goto yy217; } - if (yych <= '\n') goto yy143; - if (yych <= '"') goto yy218; - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy143; - goto yy215; -yy218: + if (yych <= '\n') goto yy145; + if (yych >= '#') goto yy220; yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy212; - if (yych == '\r') goto yy214; - goto yy143; -yy219: + if (yych == '\n') goto yy214; + if (yych == '\r') goto yy216; + goto yy145; +yy220: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; -yy220: - if (yych == '\t') goto yy219; - if (yych == ' ') goto yy219; - goto yy115; + if (yych == '\n') goto yy145; + goto yy217; } #line 392 "../src/parse/lex.re" flex_name: -#line 1313 "src/parse/lex.cc" +#line 1453 "src/parse/lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -1323,7 +1463,7 @@ yy224: YYCURSOR = tok; goto start; } -#line 1327 "src/parse/lex.cc" +#line 1467 "src/parse/lex.cc" yy225: ++YYCURSOR; yy226: @@ -1333,7 +1473,7 @@ yy226: lexer_state = LEX_NORMAL; return TOKEN_FID_END; } -#line 1337 "src/parse/lex.cc" +#line 1477 "src/parse/lex.cc" yy227: yych = (YYCTYPE)*++YYCURSOR; if (yych != '\n') goto yy224; @@ -1346,43 +1486,43 @@ yy227: code: -#line 1350 "src/parse/lex.cc" +#line 1490 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; static const unsigned char yybm[] = { - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 112, 0, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 112, 48, 16, 48, 48, 48, 48, 32, - 48, 48, 48, 48, 48, 48, 48, 48, - 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 0, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 112, 0, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 112, 96, 64, 96, 96, 96, 96, 32, + 96, 96, 96, 96, 96, 96, 96, 96, + 224, 224, 224, 224, 224, 224, 224, 224, + 224, 224, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 0, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 96, 96, 96, 96, }; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = (YYCTYPE)*YYCURSOR; @@ -1419,7 +1559,7 @@ yy231: } goto code; } -#line 1423 "src/parse/lex.cc" +#line 1563 "src/parse/lex.cc" yy233: ++YYCURSOR; yy234: @@ -1427,23 +1567,23 @@ yy234: { goto code; } -#line 1431 "src/parse/lex.cc" +#line 1571 "src/parse/lex.cc" yy235: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); YYCTXMARKER = YYCURSOR; if (yych <= '\r') { if (yych <= '\t') { - if (yych >= '\t') goto yy252; + if (yych >= '\t') goto yy243; } else { - if (yych <= '\n') goto yy254; - if (yych >= '\r') goto yy254; + if (yych <= '\n') goto yy245; + if (yych >= '\r') goto yy245; } } else { if (yych <= ' ') { - if (yych >= ' ') goto yy252; + if (yych >= ' ') goto yy243; } else { - if (yych == '#') goto yy255; + if (yych == '#') goto yy246; } } yy236: @@ -1467,7 +1607,7 @@ yy236: cline++; goto code; } -#line 1471 "src/parse/lex.cc" +#line 1611 "src/parse/lex.cc" yy237: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -1477,7 +1617,7 @@ yy238: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych == '\n') goto yy234; - goto yy244; + goto yy255; yy239: ++YYCURSOR; #line 423 "../src/parse/lex.re" @@ -1492,7 +1632,7 @@ yy239: } goto code; } -#line 1496 "src/parse/lex.cc" +#line 1636 "src/parse/lex.cc" yy241: ++YYCURSOR; #line 411 "../src/parse/lex.re" @@ -1508,19 +1648,45 @@ yy241: } goto code; } -#line 1512 "src/parse/lex.cc" +#line 1652 "src/parse/lex.cc" yy243: + yyaccept = 2; + yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); + if (yych <= 0x1F) { + if (yych == '\t') goto yy257; + } else { + if (yych <= ' ') goto yy257; + if (yych == '#') goto yy246; + } +yy244: + YYCURSOR = YYCTXMARKER; +#line 438 "../src/parse/lex.re" + { + if (depth == 0) + { + goto code; + } + else if (cur == eof) + { + fatal("missing '}'"); + } + pos = cur; + cline++; + goto code; + } +#line 1678 "src/parse/lex.cc" +yy245: + yych = (YYCTYPE)*++YYCURSOR; + goto yy244; +yy246: ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); + if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = (YYCTYPE)*YYCURSOR; -yy244: if (yybm[0+yych] & 16) { - goto yy243; + goto yy246; } - if (yych <= '\n') goto yy245; - if (yych <= '\'') goto yy247; - goto yy246; -yy245: + if (yych == 'l') goto yy259; +yy248: YYCURSOR = YYMARKER; if (yyaccept <= 1) { if (yyaccept == 0) { @@ -1529,126 +1695,112 @@ yy245: goto yy234; } } else { - goto yy253; + goto yy244; } -yy246: +yy249: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy245; - goto yy243; -yy247: +yy250: + if (yybm[0+yych] & 32) { + goto yy249; + } + if (yych <= '\n') goto yy248; + if (yych >= '#') goto yy253; +yy251: ++YYCURSOR; #line 481 "../src/parse/lex.re" { goto code; } -#line 1547 "src/parse/lex.cc" -yy249: +#line 1717 "src/parse/lex.cc" +yy253: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; -yy250: - if (yybm[0+yych] & 32) { - goto yy249; - } - if (yych <= '\n') goto yy245; - if (yych <= '"') goto yy247; + if (yych == '\n') goto yy248; + goto yy249; +yy254: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy245; - goto yy249; -yy252: - yyaccept = 2; - yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy274; - } else { - if (yych <= ' ') goto yy274; - if (yych == '#') goto yy255; - } -yy253: - YYCURSOR = YYCTXMARKER; -#line 438 "../src/parse/lex.re" - { - if (depth == 0) - { - goto code; - } - else if (cur == eof) - { - fatal("missing '}'"); - } - pos = cur; - cline++; - goto code; - } -#line 1588 "src/parse/lex.cc" -yy254: - yych = (YYCTYPE)*++YYCURSOR; - goto yy253; yy255: + if (yybm[0+yych] & 64) { + goto yy254; + } + if (yych <= '\n') goto yy248; + if (yych <= '\'') goto yy251; ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); + if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yybm[0+yych] & 64) { - goto yy255; + if (yych == '\n') goto yy248; + goto yy254; +yy257: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = (YYCTYPE)*YYCURSOR; + if (yych <= 0x1F) { + if (yych == '\t') goto yy257; + goto yy248; + } else { + if (yych <= ' ') goto yy257; + if (yych == '#') goto yy246; + goto yy248; } - if (yych != 'l') goto yy245; +yy259: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy245; + if (yych != 'i') goto yy248; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy245; + if (yych != 'n') goto yy248; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy245; + if (yych != 'e') goto yy248; yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '0') goto yy262; - if (yych <= '9') goto yy245; - goto yy262; -yy261: + if (yych <= '0') goto yy264; + if (yych <= '9') goto yy248; + goto yy264; +yy263: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy262: +yy264: if (yych <= 0x1F) { - if (yych == '\t') goto yy261; - goto yy245; + if (yych == '\t') goto yy263; + goto yy248; } else { - if (yych <= ' ') goto yy261; - if (yych <= '0') goto yy245; - if (yych >= ':') goto yy245; + if (yych <= ' ') goto yy263; + if (yych <= '0') goto yy248; + if (yych >= ':') goto yy248; } -yy263: +yy265: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 128) { - goto yy263; + goto yy265; } if (yych <= '\f') { - if (yych <= 0x08) goto yy245; - if (yych <= '\t') goto yy265; - if (yych <= '\n') goto yy267; - goto yy245; + if (yych <= 0x08) goto yy248; + if (yych <= '\t') goto yy267; + if (yych <= '\n') goto yy269; + goto yy248; } else { - if (yych <= '\r') goto yy269; - if (yych != ' ') goto yy245; + if (yych <= '\r') goto yy271; + if (yych != ' ') goto yy248; } -yy265: +yy267: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy265; - goto yy245; + if (yych == '\t') goto yy267; + goto yy248; } else { - if (yych <= ' ') goto yy265; - if (yych == '"') goto yy270; - goto yy245; + if (yych <= ' ') goto yy267; + if (yych == '"') goto yy272; + goto yy248; } -yy267: +yy269: ++YYCURSOR; YYCURSOR = YYCTXMARKER; #line 434 "../src/parse/lex.re" @@ -1656,51 +1808,41 @@ yy267: set_sourceline (); goto code; } -#line 1660 "src/parse/lex.cc" -yy269: +#line 1812 "src/parse/lex.cc" +yy271: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy267; - goto yy245; -yy270: + if (yych == '\n') goto yy269; + goto yy248; +yy272: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = (YYCTYPE)*YYCURSOR; if (yych <= '!') { - if (yych == '\n') goto yy245; - goto yy270; + if (yych == '\n') goto yy248; + goto yy272; } else { - if (yych <= '"') goto yy273; - if (yych != '\\') goto yy270; + if (yych <= '"') goto yy274; + if (yych == '\\') goto yy275; + goto yy272; } - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy245; - goto yy270; -yy273: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy267; - if (yych == '\r') goto yy269; - goto yy245; yy274: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '\n') goto yy269; + if (yych == '\r') goto yy271; + goto yy248; +yy275: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych <= 0x1F) { - if (yych == '\t') goto yy274; - goto yy245; - } else { - if (yych <= ' ') goto yy274; - if (yych == '#') goto yy255; - goto yy245; - } + if (yych == '\n') goto yy248; + goto yy272; } #line 487 "../src/parse/lex.re" comment: -#line 1704 "src/parse/lex.cc" +#line 1846 "src/parse/lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1755,13 +1897,13 @@ yy279: } goto comment; } -#line 1759 "src/parse/lex.cc" +#line 1901 "src/parse/lex.cc" yy280: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yybm[0+yych] & 32) { - goto yy288; + goto yy284; } - if (yych == '#') goto yy291; + if (yych == '#') goto yy287; yy281: #line 510 "../src/parse/lex.re" { @@ -1773,23 +1915,39 @@ yy281: cline++; goto comment; } -#line 1777 "src/parse/lex.cc" +#line 1919 "src/parse/lex.cc" yy282: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '/') goto yy286; + if (yych == '/') goto yy289; goto yy279; yy283: yych = (YYCTYPE)*++YYCURSOR; - if (yych != '*') goto yy279; + if (yych == '*') goto yy291; + goto yy279; +yy284: ++YYCURSOR; -#line 501 "../src/parse/lex.re" - { - ++depth; - fatal("ambiguous /* found"); - goto comment; - } -#line 1792 "src/parse/lex.cc" + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = (YYCTYPE)*YYCURSOR; + if (yybm[0+yych] & 32) { + goto yy284; + } + if (yych == '#') goto yy287; yy286: + YYCURSOR = YYMARKER; + goto yy281; +yy287: + ++YYCURSOR; + if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); + yych = (YYCTYPE)*YYCURSOR; + if (yych <= 0x1F) { + if (yych == '\t') goto yy287; + goto yy286; + } else { + if (yych <= ' ') goto yy287; + if (yych == 'l') goto yy293; + goto yy286; + } +yy289: ++YYCURSOR; #line 491 "../src/parse/lex.re" { @@ -1802,38 +1960,26 @@ yy286: goto comment; } } -#line 1806 "src/parse/lex.cc" -yy288: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = (YYCTYPE)*YYCURSOR; - if (yybm[0+yych] & 32) { - goto yy288; - } - if (yych == '#') goto yy291; -yy290: - YYCURSOR = YYMARKER; - goto yy281; +#line 1964 "src/parse/lex.cc" yy291: ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); - yych = (YYCTYPE)*YYCURSOR; - if (yych <= 0x1F) { - if (yych == '\t') goto yy291; - goto yy290; - } else { - if (yych <= ' ') goto yy291; - if (yych != 'l') goto yy290; - } +#line 501 "../src/parse/lex.re" + { + ++depth; + fatal("ambiguous /* found"); + goto comment; + } +#line 1973 "src/parse/lex.cc" +yy293: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy290; + if (yych != 'i') goto yy286; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy290; + if (yych != 'n') goto yy286; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy290; + if (yych != 'e') goto yy286; yych = (YYCTYPE)*++YYCURSOR; if (yych <= '0') goto yy298; - if (yych <= '9') goto yy290; + if (yych <= '9') goto yy286; goto yy298; yy297: ++YYCURSOR; @@ -1843,11 +1989,11 @@ yy297: yy298: if (yych <= 0x1F) { if (yych == '\t') goto yy297; - goto yy290; + goto yy286; } else { if (yych <= ' ') goto yy297; - if (yych <= '0') goto yy290; - if (yych >= ':') goto yy290; + if (yych <= '0') goto yy286; + if (yych >= ':') goto yy286; } yy299: ++YYCURSOR; @@ -1857,13 +2003,13 @@ yy299: goto yy299; } if (yych <= '\f') { - if (yych <= 0x08) goto yy290; + if (yych <= 0x08) goto yy286; if (yych <= '\t') goto yy301; if (yych <= '\n') goto yy303; - goto yy290; + goto yy286; } else { if (yych <= '\r') goto yy305; - if (yych != ' ') goto yy290; + if (yych != ' ') goto yy286; } yy301: ++YYCURSOR; @@ -1871,11 +2017,11 @@ yy301: yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { if (yych == '\t') goto yy301; - goto yy290; + goto yy286; } else { if (yych <= ' ') goto yy301; if (yych == '"') goto yy306; - goto yy290; + goto yy286; } yy303: ++YYCURSOR; @@ -1885,11 +2031,11 @@ yy303: set_sourceline (); goto comment; } -#line 1889 "src/parse/lex.cc" +#line 2035 "src/parse/lex.cc" yy305: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy303; - goto yy290; + goto yy286; yy306: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); @@ -1897,25 +2043,25 @@ yy306: if (yybm[0+yych] & 128) { goto yy306; } - if (yych <= '\n') goto yy290; - if (yych <= '"') goto yy309; + if (yych <= '\n') goto yy286; + if (yych >= '#') goto yy309; + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '\n') goto yy303; + if (yych == '\r') goto yy305; + goto yy286; +yy309: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy290; + if (yych == '\n') goto yy286; goto yy306; -yy309: - ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '\n') goto yy303; - if (yych == '\r') goto yy305; - goto yy290; } #line 526 "../src/parse/lex.re" nextLine: -#line 1919 "src/parse/lex.cc" +#line 2065 "src/parse/lex.cc" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1928,7 +2074,7 @@ nextLine: } goto nextLine; } -#line 1932 "src/parse/lex.cc" +#line 2078 "src/parse/lex.cc" yy314: ++YYCURSOR; #line 530 "../src/parse/lex.re" @@ -1939,7 +2085,7 @@ yy314: cline++; goto scan; } -#line 1943 "src/parse/lex.cc" +#line 2089 "src/parse/lex.cc" } #line 542 "../src/parse/lex.re" @@ -1965,7 +2111,7 @@ RegExp *Scanner::lex_cls(bool neg) uint32_t u, l; fst: -#line 1969 "src/parse/lex.cc" +#line 2115 "src/parse/lex.cc" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1973,18 +2119,18 @@ fst: if (yych == ']') goto yy319; #line 566 "../src/parse/lex.re" { l = lex_cls_chr(); goto snd; } -#line 1977 "src/parse/lex.cc" +#line 2123 "src/parse/lex.cc" yy319: ++YYCURSOR; #line 565 "../src/parse/lex.re" { goto end; } -#line 1982 "src/parse/lex.cc" +#line 2128 "src/parse/lex.cc" } #line 567 "../src/parse/lex.re" snd: -#line 1988 "src/parse/lex.cc" +#line 2134 "src/parse/lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -1993,7 +2139,7 @@ snd: yy323: #line 570 "../src/parse/lex.re" { u = l; goto add; } -#line 1997 "src/parse/lex.cc" +#line 2143 "src/parse/lex.cc" yy324: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; @@ -2012,7 +2158,7 @@ yy326: } goto add; } -#line 2016 "src/parse/lex.cc" +#line 2162 "src/parse/lex.cc" } #line 579 "../src/parse/lex.re" @@ -2033,7 +2179,7 @@ uint32_t Scanner::lex_cls_chr() { tok = cur; -#line 2037 "src/parse/lex.cc" +#line 2183 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -2044,12 +2190,12 @@ uint32_t Scanner::lex_cls_chr() ++YYCURSOR; #line 602 "../src/parse/lex.re" { return static_cast(tok[0]); } -#line 2048 "src/parse/lex.cc" +#line 2194 "src/parse/lex.cc" yy332: ++YYCURSOR; #line 597 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error"); } -#line 2053 "src/parse/lex.cc" +#line 2199 "src/parse/lex.cc" yy334: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= '`') { @@ -2100,7 +2246,7 @@ yy334: } #line 600 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in escape sequence"); } -#line 2104 "src/parse/lex.cc" +#line 2250 "src/parse/lex.cc" yy336: ++YYCURSOR; #line 615 "../src/parse/lex.re" @@ -2108,21 +2254,21 @@ yy336: warn.useless_escape(tline, tok - pos, tok[1]); return static_cast(tok[1]); } -#line 2112 "src/parse/lex.cc" +#line 2258 "src/parse/lex.cc" yy338: ++YYCURSOR; #line 613 "../src/parse/lex.re" { return static_cast('-'); } -#line 2117 "src/parse/lex.cc" +#line 2263 "src/parse/lex.cc" yy340: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '/') goto yy341; - if (yych <= '7') goto yy379; + if (yych <= '7') goto yy365; yy341: #line 599 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); } -#line 2126 "src/parse/lex.cc" +#line 2272 "src/parse/lex.cc" yy342: yych = (YYCTYPE)*++YYCURSOR; goto yy341; @@ -2131,95 +2277,91 @@ yy343: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { if (yych <= '/') goto yy344; - if (yych <= '9') goto yy372; + if (yych <= '9') goto yy367; } else { - if (yych <= 'F') goto yy372; + if (yych <= 'F') goto yy367; if (yych <= '`') goto yy344; - if (yych <= 'f') goto yy372; + if (yych <= 'f') goto yy367; } yy344: #line 598 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); } -#line 2144 "src/parse/lex.cc" +#line 2290 "src/parse/lex.cc" yy345: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { if (yych <= '/') goto yy344; - if (yych <= '9') goto yy369; + if (yych <= '9') goto yy368; goto yy344; } else { - if (yych <= 'F') goto yy369; + if (yych <= 'F') goto yy368; if (yych <= '`') goto yy344; - if (yych <= 'f') goto yy369; + if (yych <= 'f') goto yy368; goto yy344; } yy346: ++YYCURSOR; #line 612 "../src/parse/lex.re" { return static_cast('\\'); } -#line 2162 "src/parse/lex.cc" +#line 2308 "src/parse/lex.cc" yy348: ++YYCURSOR; #line 614 "../src/parse/lex.re" { return static_cast(']'); } -#line 2167 "src/parse/lex.cc" +#line 2313 "src/parse/lex.cc" yy350: ++YYCURSOR; #line 605 "../src/parse/lex.re" { return static_cast('\a'); } -#line 2172 "src/parse/lex.cc" +#line 2318 "src/parse/lex.cc" yy352: ++YYCURSOR; #line 606 "../src/parse/lex.re" { return static_cast('\b'); } -#line 2177 "src/parse/lex.cc" +#line 2323 "src/parse/lex.cc" yy354: ++YYCURSOR; #line 607 "../src/parse/lex.re" { return static_cast('\f'); } -#line 2182 "src/parse/lex.cc" +#line 2328 "src/parse/lex.cc" yy356: ++YYCURSOR; #line 608 "../src/parse/lex.re" { return static_cast('\n'); } -#line 2187 "src/parse/lex.cc" +#line 2333 "src/parse/lex.cc" yy358: ++YYCURSOR; #line 609 "../src/parse/lex.re" { return static_cast('\r'); } -#line 2192 "src/parse/lex.cc" +#line 2338 "src/parse/lex.cc" yy360: ++YYCURSOR; #line 610 "../src/parse/lex.re" { return static_cast('\t'); } -#line 2197 "src/parse/lex.cc" +#line 2343 "src/parse/lex.cc" yy362: ++YYCURSOR; #line 611 "../src/parse/lex.re" { return static_cast('\v'); } -#line 2202 "src/parse/lex.cc" +#line 2348 "src/parse/lex.cc" yy364: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { if (yych <= '/') goto yy344; - if (yych >= ':') goto yy344; + if (yych <= '9') goto yy369; + goto yy344; } else { - if (yych <= 'F') goto yy365; + if (yych <= 'F') goto yy369; if (yych <= '`') goto yy344; - if (yych >= 'g') goto yy344; + if (yych <= 'f') goto yy369; + goto yy344; } yy365: yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '@') { - if (yych <= '/') goto yy366; - if (yych <= '9') goto yy367; - } else { - if (yych <= 'F') goto yy367; - if (yych <= '`') goto yy366; - if (yych <= 'f') goto yy367; - } + if (yych <= '/') goto yy366; + if (yych <= '7') goto yy370; yy366: YYCURSOR = YYMARKER; if (yyaccept == 0) { @@ -2228,122 +2370,141 @@ yy366: goto yy344; } yy367: - ++YYCURSOR; -#line 603 "../src/parse/lex.re" - { return unesc_hex(tok, cur); } -#line 2235 "src/parse/lex.cc" -yy369: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy366; - if (yych >= ':') goto yy366; + if (yych <= '9') goto yy372; + goto yy366; } else { - if (yych <= 'F') goto yy370; + if (yych <= 'F') goto yy372; if (yych <= '`') goto yy366; - if (yych >= 'g') goto yy366; + if (yych <= 'f') goto yy372; + goto yy366; } -yy370: +yy368: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy366; - if (yych >= ':') goto yy366; + if (yych <= '9') goto yy373; + goto yy366; } else { - if (yych <= 'F') goto yy371; + if (yych <= 'F') goto yy373; if (yych <= '`') goto yy366; - if (yych >= 'g') goto yy366; + if (yych <= 'f') goto yy373; + goto yy366; } -yy371: +yy369: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy366; - if (yych <= '9') goto yy367; + if (yych <= '9') goto yy374; goto yy366; } else { - if (yych <= 'F') goto yy367; + if (yych <= 'F') goto yy374; if (yych <= '`') goto yy366; - if (yych <= 'f') goto yy367; + if (yych <= 'f') goto yy374; goto yy366; } +yy370: + ++YYCURSOR; +#line 604 "../src/parse/lex.re" + { return unesc_oct(tok, cur); } +#line 2413 "src/parse/lex.cc" yy372: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy366; - if (yych >= ':') goto yy366; + if (yych <= '9') goto yy376; + goto yy366; } else { - if (yych <= 'F') goto yy373; + if (yych <= 'F') goto yy376; if (yych <= '`') goto yy366; - if (yych >= 'g') goto yy366; + if (yych <= 'f') goto yy376; + goto yy366; } yy373: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy366; - if (yych >= ':') goto yy366; + if (yych <= '9') goto yy377; + goto yy366; } else { - if (yych <= 'F') goto yy374; + if (yych <= 'F') goto yy377; if (yych <= '`') goto yy366; - if (yych >= 'g') goto yy366; + if (yych <= 'f') goto yy377; + goto yy366; } yy374: + ++YYCURSOR; +#line 603 "../src/parse/lex.re" + { return unesc_hex(tok, cur); } +#line 2442 "src/parse/lex.cc" +yy376: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy366; - if (yych >= ':') goto yy366; + if (yych <= '9') goto yy378; + goto yy366; } else { - if (yych <= 'F') goto yy375; + if (yych <= 'F') goto yy378; if (yych <= '`') goto yy366; - if (yych >= 'g') goto yy366; + if (yych <= 'f') goto yy378; + goto yy366; } -yy375: +yy377: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy366; - if (yych >= ':') goto yy366; + if (yych <= '9') goto yy374; + goto yy366; } else { - if (yych <= 'F') goto yy376; + if (yych <= 'F') goto yy374; if (yych <= '`') goto yy366; - if (yych >= 'g') goto yy366; + if (yych <= 'f') goto yy374; + goto yy366; } -yy376: +yy378: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy366; if (yych >= ':') goto yy366; } else { - if (yych <= 'F') goto yy377; + if (yych <= 'F') goto yy379; if (yych <= '`') goto yy366; if (yych >= 'g') goto yy366; } -yy377: +yy379: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy366; if (yych >= ':') goto yy366; } else { - if (yych <= 'F') goto yy378; + if (yych <= 'F') goto yy380; if (yych <= '`') goto yy366; if (yych >= 'g') goto yy366; } -yy378: +yy380: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy366; - if (yych <= '9') goto yy367; + if (yych >= ':') goto yy366; + } else { + if (yych <= 'F') goto yy381; + if (yych <= '`') goto yy366; + if (yych >= 'g') goto yy366; + } +yy381: + ++YYCURSOR; + if ((yych = (YYCTYPE)*YYCURSOR) <= '@') { + if (yych <= '/') goto yy366; + if (yych <= '9') goto yy374; goto yy366; } else { - if (yych <= 'F') goto yy367; + if (yych <= 'F') goto yy374; if (yych <= '`') goto yy366; - if (yych <= 'f') goto yy367; + if (yych <= 'f') goto yy374; goto yy366; } -yy379: - yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '/') goto yy366; - if (yych >= '8') goto yy366; - ++YYCURSOR; -#line 604 "../src/parse/lex.re" - { return unesc_oct(tok, cur); } -#line 2347 "src/parse/lex.cc" } #line 619 "../src/parse/lex.re" @@ -2354,7 +2515,7 @@ uint32_t Scanner::lex_str_chr(char quote, bool &end) end = false; tok = cur; -#line 2358 "src/parse/lex.cc" +#line 2519 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -2368,12 +2529,12 @@ uint32_t Scanner::lex_str_chr(char quote, bool &end) end = tok[0] == quote; return static_cast(tok[0]); } -#line 2372 "src/parse/lex.cc" +#line 2533 "src/parse/lex.cc" yy386: ++YYCURSOR; #line 627 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error"); } -#line 2377 "src/parse/lex.cc" +#line 2538 "src/parse/lex.cc" yy388: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= 'a') { @@ -2421,7 +2582,7 @@ yy388: } #line 630 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in escape sequence"); } -#line 2425 "src/parse/lex.cc" +#line 2586 "src/parse/lex.cc" yy390: ++YYCURSOR; #line 646 "../src/parse/lex.re" @@ -2431,16 +2592,16 @@ yy390: } return static_cast(tok[1]); } -#line 2435 "src/parse/lex.cc" +#line 2596 "src/parse/lex.cc" yy392: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '/') goto yy393; - if (yych <= '7') goto yy429; + if (yych <= '7') goto yy415; yy393: #line 629 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); } -#line 2444 "src/parse/lex.cc" +#line 2605 "src/parse/lex.cc" yy394: yych = (YYCTYPE)*++YYCURSOR; goto yy393; @@ -2449,90 +2610,86 @@ yy395: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { if (yych <= '/') goto yy396; - if (yych <= '9') goto yy422; + if (yych <= '9') goto yy417; } else { - if (yych <= 'F') goto yy422; + if (yych <= 'F') goto yy417; if (yych <= '`') goto yy396; - if (yych <= 'f') goto yy422; + if (yych <= 'f') goto yy417; } yy396: #line 628 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); } -#line 2462 "src/parse/lex.cc" +#line 2623 "src/parse/lex.cc" yy397: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { if (yych <= '/') goto yy396; - if (yych <= '9') goto yy419; + if (yych <= '9') goto yy418; goto yy396; } else { - if (yych <= 'F') goto yy419; + if (yych <= 'F') goto yy418; if (yych <= '`') goto yy396; - if (yych <= 'f') goto yy419; + if (yych <= 'f') goto yy418; goto yy396; } yy398: ++YYCURSOR; #line 645 "../src/parse/lex.re" { return static_cast('\\'); } -#line 2480 "src/parse/lex.cc" +#line 2641 "src/parse/lex.cc" yy400: ++YYCURSOR; #line 638 "../src/parse/lex.re" { return static_cast('\a'); } -#line 2485 "src/parse/lex.cc" +#line 2646 "src/parse/lex.cc" yy402: ++YYCURSOR; #line 639 "../src/parse/lex.re" { return static_cast('\b'); } -#line 2490 "src/parse/lex.cc" +#line 2651 "src/parse/lex.cc" yy404: ++YYCURSOR; #line 640 "../src/parse/lex.re" { return static_cast('\f'); } -#line 2495 "src/parse/lex.cc" +#line 2656 "src/parse/lex.cc" yy406: ++YYCURSOR; #line 641 "../src/parse/lex.re" { return static_cast('\n'); } -#line 2500 "src/parse/lex.cc" +#line 2661 "src/parse/lex.cc" yy408: ++YYCURSOR; #line 642 "../src/parse/lex.re" { return static_cast('\r'); } -#line 2505 "src/parse/lex.cc" +#line 2666 "src/parse/lex.cc" yy410: ++YYCURSOR; #line 643 "../src/parse/lex.re" { return static_cast('\t'); } -#line 2510 "src/parse/lex.cc" +#line 2671 "src/parse/lex.cc" yy412: ++YYCURSOR; #line 644 "../src/parse/lex.re" { return static_cast('\v'); } -#line 2515 "src/parse/lex.cc" +#line 2676 "src/parse/lex.cc" yy414: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { if (yych <= '/') goto yy396; - if (yych >= ':') goto yy396; + if (yych <= '9') goto yy419; + goto yy396; } else { - if (yych <= 'F') goto yy415; + if (yych <= 'F') goto yy419; if (yych <= '`') goto yy396; - if (yych >= 'g') goto yy396; + if (yych <= 'f') goto yy419; + goto yy396; } yy415: yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '@') { - if (yych <= '/') goto yy416; - if (yych <= '9') goto yy417; - } else { - if (yych <= 'F') goto yy417; - if (yych <= '`') goto yy416; - if (yych <= 'f') goto yy417; - } + if (yych <= '/') goto yy416; + if (yych <= '7') goto yy420; yy416: YYCURSOR = YYMARKER; if (yyaccept == 0) { @@ -2541,122 +2698,141 @@ yy416: goto yy396; } yy417: - ++YYCURSOR; -#line 636 "../src/parse/lex.re" - { return unesc_hex(tok, cur); } -#line 2548 "src/parse/lex.cc" -yy419: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy416; - if (yych >= ':') goto yy416; + if (yych <= '9') goto yy422; + goto yy416; } else { - if (yych <= 'F') goto yy420; + if (yych <= 'F') goto yy422; if (yych <= '`') goto yy416; - if (yych >= 'g') goto yy416; + if (yych <= 'f') goto yy422; + goto yy416; } -yy420: +yy418: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy416; - if (yych >= ':') goto yy416; + if (yych <= '9') goto yy423; + goto yy416; } else { - if (yych <= 'F') goto yy421; + if (yych <= 'F') goto yy423; if (yych <= '`') goto yy416; - if (yych >= 'g') goto yy416; + if (yych <= 'f') goto yy423; + goto yy416; } -yy421: +yy419: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy416; - if (yych <= '9') goto yy417; + if (yych <= '9') goto yy424; goto yy416; } else { - if (yych <= 'F') goto yy417; + if (yych <= 'F') goto yy424; if (yych <= '`') goto yy416; - if (yych <= 'f') goto yy417; + if (yych <= 'f') goto yy424; goto yy416; } +yy420: + ++YYCURSOR; +#line 637 "../src/parse/lex.re" + { return unesc_oct(tok, cur); } +#line 2741 "src/parse/lex.cc" yy422: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy416; - if (yych >= ':') goto yy416; + if (yych <= '9') goto yy426; + goto yy416; } else { - if (yych <= 'F') goto yy423; + if (yych <= 'F') goto yy426; if (yych <= '`') goto yy416; - if (yych >= 'g') goto yy416; + if (yych <= 'f') goto yy426; + goto yy416; } yy423: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy416; - if (yych >= ':') goto yy416; + if (yych <= '9') goto yy427; + goto yy416; } else { - if (yych <= 'F') goto yy424; + if (yych <= 'F') goto yy427; if (yych <= '`') goto yy416; - if (yych >= 'g') goto yy416; + if (yych <= 'f') goto yy427; + goto yy416; } yy424: + ++YYCURSOR; +#line 636 "../src/parse/lex.re" + { return unesc_hex(tok, cur); } +#line 2770 "src/parse/lex.cc" +yy426: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy416; - if (yych >= ':') goto yy416; + if (yych <= '9') goto yy428; + goto yy416; } else { - if (yych <= 'F') goto yy425; + if (yych <= 'F') goto yy428; if (yych <= '`') goto yy416; - if (yych >= 'g') goto yy416; + if (yych <= 'f') goto yy428; + goto yy416; } -yy425: +yy427: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy416; - if (yych >= ':') goto yy416; + if (yych <= '9') goto yy424; + goto yy416; } else { - if (yych <= 'F') goto yy426; + if (yych <= 'F') goto yy424; if (yych <= '`') goto yy416; - if (yych >= 'g') goto yy416; + if (yych <= 'f') goto yy424; + goto yy416; } -yy426: +yy428: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy416; if (yych >= ':') goto yy416; } else { - if (yych <= 'F') goto yy427; + if (yych <= 'F') goto yy429; if (yych <= '`') goto yy416; if (yych >= 'g') goto yy416; } -yy427: +yy429: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy416; if (yych >= ':') goto yy416; } else { - if (yych <= 'F') goto yy428; + if (yych <= 'F') goto yy430; if (yych <= '`') goto yy416; if (yych >= 'g') goto yy416; } -yy428: +yy430: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { if (yych <= '/') goto yy416; - if (yych <= '9') goto yy417; + if (yych >= ':') goto yy416; + } else { + if (yych <= 'F') goto yy431; + if (yych <= '`') goto yy416; + if (yych >= 'g') goto yy416; + } +yy431: + ++YYCURSOR; + if ((yych = (YYCTYPE)*YYCURSOR) <= '@') { + if (yych <= '/') goto yy416; + if (yych <= '9') goto yy424; goto yy416; } else { - if (yych <= 'F') goto yy417; + if (yych <= 'F') goto yy424; if (yych <= '`') goto yy416; - if (yych <= 'f') goto yy417; + if (yych <= 'f') goto yy424; goto yy416; } -yy429: - yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '/') goto yy416; - if (yych >= '8') goto yy416; - ++YYCURSOR; -#line 637 "../src/parse/lex.re" - { return unesc_oct(tok, cur); } -#line 2660 "src/parse/lex.cc" } #line 652 "../src/parse/lex.re" @@ -2679,42 +2855,42 @@ void Scanner::set_sourceline () sourceline: tok = cur; -#line 2683 "src/parse/lex.cc" +#line 2859 "src/parse/lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 0, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 0, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 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, 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, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, + 192, 192, 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, 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, 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 ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; @@ -2732,7 +2908,7 @@ yy435: { goto sourceline; } -#line 2736 "src/parse/lex.cc" +#line 2912 "src/parse/lex.cc" yy436: ++YYCURSOR; #line 683 "../src/parse/lex.re" @@ -2748,15 +2924,15 @@ yy436: tok = cur; return; } -#line 2752 "src/parse/lex.cc" +#line 2928 "src/parse/lex.cc" yy438: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych == '\n') goto yy435; - goto yy444; + goto yy442; yy439: ++YYCURSOR; yych = (YYCTYPE)*YYCURSOR; - goto yy442; + goto yy448; yy440: #line 672 "../src/parse/lex.re" { @@ -2766,7 +2942,7 @@ yy440: } goto sourceline; } -#line 2770 "src/parse/lex.cc" +#line 2946 "src/parse/lex.cc" yy441: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -2775,35 +2951,35 @@ yy442: if (yybm[0+yych] & 64) { goto yy441; } - goto yy440; -yy443: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = (YYCTYPE)*YYCURSOR; -yy444: - if (yybm[0+yych] & 128) { - goto yy443; - } - if (yych <= '\n') goto yy445; - if (yych <= '"') goto yy447; + if (yych <= '\n') goto yy443; + if (yych <= '"') goto yy444; goto yy446; -yy445: +yy443: YYCURSOR = YYMARKER; goto yy435; -yy446: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy445; - goto yy443; -yy447: +yy444: ++YYCURSOR; #line 679 "../src/parse/lex.re" { escape (in.file_name, std::string (tok + 1, tok_len () - 2)); // -2 to omit quotes goto sourceline; } -#line 2807 "src/parse/lex.cc" +#line 2968 "src/parse/lex.cc" +yy446: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = (YYCTYPE)*YYCURSOR; + if (yych == '\n') goto yy443; + goto yy441; +yy447: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = (YYCTYPE)*YYCURSOR; +yy448: + if (yybm[0+yych] & 128) { + goto yy447; + } + goto yy440; } #line 698 "../src/parse/lex.re" diff --git a/re2c/bootstrap/src/parse/parser.cc b/re2c/bootstrap/src/parse/parser.cc index 13190ce3..38246020 100644 --- a/re2c/bootstrap/src/parse/parser.cc +++ b/re2c/bootstrap/src/parse/parser.cc @@ -2364,11 +2364,11 @@ void parse(Scanner& i, Output & o) { for (RuleOpList::const_iterator itOp = specStar.begin(); itOp != specStar.end(); ++itOp) { - it->second.addl (*itOp); + it->second.add (*itOp); } if (star_default) { - it->second.addl (star_default); + it->second.add_def (star_default); } } diff --git a/re2c/src/parse/parser.ypp b/re2c/src/parse/parser.ypp index bf746b3b..2968fc0c 100644 --- a/re2c/src/parse/parser.ypp +++ b/re2c/src/parse/parser.ypp @@ -676,11 +676,11 @@ void parse(Scanner& i, Output & o) { for (RuleOpList::const_iterator itOp = specStar.begin(); itOp != specStar.end(); ++itOp) { - it->second.addl (*itOp); + it->second.add (*itOp); } if (star_default) { - it->second.addl (star_default); + it->second.add_def (star_default); } } diff --git a/re2c/src/parse/spec.h b/re2c/src/parse/spec.h index 141d6de5..0b68af74 100644 --- a/re2c/src/parse/spec.h +++ b/re2c/src/parse/spec.h @@ -34,7 +34,7 @@ struct Spec } else { - addl (r); + add (r); return true; } } @@ -43,11 +43,6 @@ struct Spec rules[r->rank].line = r->loc.line; re = mkAlt (re, r); } - void addl (RuleOp * r) - { - rules[r->rank].line = r->loc.line; - re = mkAlt (r, re); - } void clear () { re = NULL; diff --git a/re2c/test/php20150211_json_scanner.igc.c b/re2c/test/php20150211_json_scanner.igc.c index 377b03e5..726573c9 100644 --- a/re2c/test/php20150211_json_scanner.igc.c +++ b/re2c/test/php20150211_json_scanner.igc.c @@ -1333,6 +1333,6 @@ yy153: } -re2c: warning: line 336: unreachable rule in condition 'STR_P1' (shadowed by rules at lines 204, 228, 232, 254, 255) [-Wunreachable-rules] -re2c: warning: line 336: unreachable rule in condition 'STR_P2' (shadowed by rules at lines 297, 330, 334) [-Wunreachable-rules] +re2c: warning: line 336: unreachable rule in condition 'STR_P1' (shadowed by rule at line 255) [-Wunreachable-rules] +re2c: warning: line 336: unreachable rule in condition 'STR_P2' (shadowed by rule at line 334) [-Wunreachable-rules] re2c: warning: line 340: looks like you use hardcoded numbers instead of autogenerated condition names: better add '/*!types:re2c*/' directive or '-t, --type-header' option and don't rely on fixed condition order. [-Wcondition-order] diff --git a/re2c/test/php20150211_zend_ini_scanner.c--emit-dot--flex-syntax--case-inverted.c b/re2c/test/php20150211_zend_ini_scanner.c--emit-dot--flex-syntax--case-inverted.c index 399a6e5d..6ef53f98 100644 --- a/re2c/test/php20150211_zend_ini_scanner.c--emit-dot--flex-syntax--case-inverted.c +++ b/re2c/test/php20150211_zend_ini_scanner.c--emit-dot--flex-syntax--case-inverted.c @@ -724,8 +724,8 @@ re2c: warning: line 384: column 13: escape has no effect: '\.' [-Wuseless-escape re2c: warning: line 384: column 32: escape has no effect: '\.' [-Wuseless-escape] re2c: warning: line 391: column 27: escape has no effect: '\[' [-Wuseless-escape] re2c: warning: line 392: column 11: escape has no effect: '\[' [-Wuseless-escape] -re2c: warning: line 648: unreachable rule in condition 'ST_DOUBLE_QUOTES' (shadowed by rules at lines 582, 587) [-Wunreachable-rules] +re2c: warning: line 648: unreachable rule in condition 'ST_DOUBLE_QUOTES' (shadowed by rule at line 587) [-Wunreachable-rules] re2c: warning: line 623: unreachable rule in condition 'ST_OFFSET' (shadowed by rule at line 573) [-Wunreachable-rules] -re2c: warning: line 648: unreachable rule in condition 'ST_RAW' (shadowed by rules at lines 500, 541, 643) [-Wunreachable-rules] +re2c: warning: line 648: unreachable rule in condition 'ST_RAW' (shadowed by rule at line 643) [-Wunreachable-rules] re2c: warning: line 623: unreachable rule in condition 'ST_SECTION_VALUE' (shadowed by rule at line 573) [-Wunreachable-rules] -re2c: warning: line 648: unreachable rule in condition 'ST_VALUE' (shadowed by rules at lines 541, 547, 551, 559, 563, 569, 577, 623, 643) [-Wunreachable-rules] +re2c: warning: line 648: unreachable rule in condition 'ST_VALUE' (shadowed by rule at line 643) [-Wunreachable-rules] diff --git a/re2c/test/php20150211_zend_ini_scanner.igcd--flex-syntax--case-inverted.c b/re2c/test/php20150211_zend_ini_scanner.igcd--flex-syntax--case-inverted.c index c640f2d0..82314876 100644 --- a/re2c/test/php20150211_zend_ini_scanner.igcd--flex-syntax--case-inverted.c +++ b/re2c/test/php20150211_zend_ini_scanner.igcd--flex-syntax--case-inverted.c @@ -4698,9 +4698,9 @@ re2c: warning: line 384: column 13: escape has no effect: '\.' [-Wuseless-escape re2c: warning: line 384: column 32: escape has no effect: '\.' [-Wuseless-escape] re2c: warning: line 391: column 27: escape has no effect: '\[' [-Wuseless-escape] re2c: warning: line 392: column 11: escape has no effect: '\[' [-Wuseless-escape] -re2c: warning: line 648: unreachable rule in condition 'ST_DOUBLE_QUOTES' (shadowed by rules at lines 582, 587) [-Wunreachable-rules] +re2c: warning: line 648: unreachable rule in condition 'ST_DOUBLE_QUOTES' (shadowed by rule at line 587) [-Wunreachable-rules] re2c: warning: line 623: unreachable rule in condition 'ST_OFFSET' (shadowed by rule at line 573) [-Wunreachable-rules] -re2c: warning: line 648: unreachable rule in condition 'ST_RAW' (shadowed by rules at lines 500, 541, 643) [-Wunreachable-rules] +re2c: warning: line 648: unreachable rule in condition 'ST_RAW' (shadowed by rule at line 643) [-Wunreachable-rules] re2c: warning: line 623: unreachable rule in condition 'ST_SECTION_VALUE' (shadowed by rule at line 573) [-Wunreachable-rules] -re2c: warning: line 648: unreachable rule in condition 'ST_VALUE' (shadowed by rules at lines 541, 547, 551, 559, 563, 569, 577, 623, 643) [-Wunreachable-rules] +re2c: warning: line 648: unreachable rule in condition 'ST_VALUE' (shadowed by rule at line 643) [-Wunreachable-rules] re2c: warning: line 652: looks like you use hardcoded numbers instead of autogenerated condition names: better add '/*!types:re2c*/' directive or '-t, --type-header' option and don't rely on fixed condition order. [-Wcondition-order] diff --git a/re2c/test/php20150211_zend_ini_scanner.igcd--skeleton--flex-syntax--case-inverted.c b/re2c/test/php20150211_zend_ini_scanner.igcd--skeleton--flex-syntax--case-inverted.c index e2be4eaa..79336bcc 100644 --- a/re2c/test/php20150211_zend_ini_scanner.igcd--skeleton--flex-syntax--case-inverted.c +++ b/re2c/test/php20150211_zend_ini_scanner.igcd--skeleton--flex-syntax--case-inverted.c @@ -8883,8 +8883,8 @@ u v!w"x$y&z() re2c: warning: line 384: column 32: escape has no effect: '\.' [-Wuseless-escape] re2c: warning: line 391: column 27: escape has no effect: '\[' [-Wuseless-escape] re2c: warning: line 392: column 11: escape has no effect: '\[' [-Wuseless-escape] -re2c: warning: line 648: unreachable rule in condition 'ST_DOUBLE_QUOTES' (shadowed by rules at lines 582, 587) [-Wunreachable-rules] +re2c: warning: line 648: unreachable rule in condition 'ST_DOUBLE_QUOTES' (shadowed by rule at line 587) [-Wunreachable-rules] re2c: warning: line 623: unreachable rule in condition 'ST_OFFSET' (shadowed by rule at line 573) [-Wunreachable-rules] -re2c: warning: line 648: unreachable rule in condition 'ST_RAW' (shadowed by rules at lines 500, 541, 643) [-Wunreachable-rules] +re2c: warning: line 648: unreachable rule in condition 'ST_RAW' (shadowed by rule at line 643) [-Wunreachable-rules] re2c: warning: line 623: unreachable rule in condition 'ST_SECTION_VALUE' (shadowed by rule at line 573) [-Wunreachable-rules] -re2c: warning: line 648: unreachable rule in condition 'ST_VALUE' (shadowed by rules at lines 541, 547, 551, 559, 563, 569, 577, 623, 643) [-Wunreachable-rules] +re2c: warning: line 648: unreachable rule in condition 'ST_VALUE' (shadowed by rule at line 643) [-Wunreachable-rules] diff --git a/re2c/test/php20150211_zend_ini_scanner_trimmed.ic--flex-syntax.c b/re2c/test/php20150211_zend_ini_scanner_trimmed.ic--flex-syntax.c index dc1f3d94..c1a8ab6c 100644 --- a/re2c/test/php20150211_zend_ini_scanner_trimmed.ic--flex-syntax.c +++ b/re2c/test/php20150211_zend_ini_scanner_trimmed.ic--flex-syntax.c @@ -4150,8 +4150,8 @@ re2c: warning: line 4: column 13: escape has no effect: '\.' [-Wuseless-escape] re2c: warning: line 4: column 32: escape has no effect: '\.' [-Wuseless-escape] re2c: warning: line 11: column 27: escape has no effect: '\[' [-Wuseless-escape] re2c: warning: line 12: column 11: escape has no effect: '\[' [-Wuseless-escape] -re2c: warning: line 55: unreachable rule in condition 'ST_DOUBLE_QUOTES' (shadowed by rules at lines 48, 49) [-Wunreachable-rules] +re2c: warning: line 55: unreachable rule in condition 'ST_DOUBLE_QUOTES' (shadowed by rule at line 49) [-Wunreachable-rules] re2c: warning: line 50: unreachable rule in condition 'ST_OFFSET' (shadowed by rule at line 46) [-Wunreachable-rules] -re2c: warning: line 55: unreachable rule in condition 'ST_RAW' (shadowed by rules at lines 37, 39, 54) [-Wunreachable-rules] +re2c: warning: line 55: unreachable rule in condition 'ST_RAW' (shadowed by rule at line 54) [-Wunreachable-rules] re2c: warning: line 50: unreachable rule in condition 'ST_SECTION_VALUE' (shadowed by rule at line 46) [-Wunreachable-rules] -re2c: warning: line 55: unreachable rule in condition 'ST_VALUE' (shadowed by rules at lines 39, 40, 41, 43, 44, 45, 47, 50, 54) [-Wunreachable-rules] +re2c: warning: line 55: unreachable rule in condition 'ST_VALUE' (shadowed by rule at line 54) [-Wunreachable-rules] diff --git a/re2c/test/php20150211_zend_ini_scanner_trimmed.icwb--flex-syntax.c b/re2c/test/php20150211_zend_ini_scanner_trimmed.icwb--flex-syntax.c index 36fa62bf..5522e56d 100644 --- a/re2c/test/php20150211_zend_ini_scanner_trimmed.icwb--flex-syntax.c +++ b/re2c/test/php20150211_zend_ini_scanner_trimmed.icwb--flex-syntax.c @@ -3670,9 +3670,9 @@ re2c: warning: line 4: column 13: escape has no effect: '\.' [-Wuseless-escape] re2c: warning: line 4: column 32: escape has no effect: '\.' [-Wuseless-escape] re2c: warning: line 11: column 27: escape has no effect: '\[' [-Wuseless-escape] re2c: warning: line 12: column 11: escape has no effect: '\[' [-Wuseless-escape] -re2c: warning: line 55: unreachable rule in condition 'ST_DOUBLE_QUOTES' (shadowed by rules at lines 48, 49) [-Wunreachable-rules] +re2c: warning: line 55: unreachable rule in condition 'ST_DOUBLE_QUOTES' (shadowed by rule at line 49) [-Wunreachable-rules] re2c: warning: line 50: unreachable rule in condition 'ST_OFFSET' (shadowed by rule at line 46) [-Wunreachable-rules] -re2c: warning: line 55: unreachable rule in condition 'ST_RAW' (shadowed by rules at lines 37, 39, 54) [-Wunreachable-rules] +re2c: warning: line 55: unreachable rule in condition 'ST_RAW' (shadowed by rule at line 54) [-Wunreachable-rules] re2c: warning: line 50: unreachable rule in condition 'ST_SECTION_VALUE' (shadowed by rule at line 46) [-Wunreachable-rules] -re2c: warning: line 55: unreachable rule in condition 'ST_VALUE' (shadowed by rules at lines 39, 40, 41, 43, 44, 45, 47, 50, 54) [-Wunreachable-rules] +re2c: warning: line 55: unreachable rule in condition 'ST_VALUE' (shadowed by rule at line 54) [-Wunreachable-rules] re2c: warning: line 56: looks like you use hardcoded numbers instead of autogenerated condition names: better add '/*!types:re2c*/' directive or '-t, --type-header' option and don't rely on fixed condition order. [-Wcondition-order] -- 2.40.0