From: Ulya Trofimovich Date: Sat, 2 Apr 2016 17:16:55 +0000 (+0100) Subject: Lexer: moved 'end of comment' sublexer to a separate function. X-Git-Tag: 1.0~39^2~334 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=877c375b0c3b79c4970ecd314b9f3ee1b24eeb19;p=re2c Lexer: moved 'end of comment' sublexer to a separate function. --- diff --git a/re2c/bootstrap/src/parse/lex.cc b/re2c/bootstrap/src/parse/lex.cc index 4dda0a6f..9354b434 100644 --- a/re2c/bootstrap/src/parse/lex.cc +++ b/re2c/bootstrap/src/parse/lex.cc @@ -1,4 +1,4 @@ -/* Generated by re2c 0.16 on Sat Apr 2 17:18:35 2016 */ +/* Generated by re2c 0.16 on Sat Apr 2 18:46:12 2016 */ #line 1 "../src/parse/lex.re" #include "src/util/c99_stdint.h" #include @@ -46,8 +46,6 @@ namespace re2c Scanner::ParseMode Scanner::echo() { - uint32_t ignored = 0; - if (eof && cur == eof) // Catch EOF { return Stop; @@ -58,7 +56,7 @@ echo: const char *start = cur; -#line 62 "src/parse/lex.cc" +#line 60 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -116,7 +114,7 @@ echo: } } ++YYCURSOR; -#line 157 "../src/parse/lex.re" +#line 154 "../src/parse/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start); @@ -125,13 +123,13 @@ echo: return Stop; } } -#line 129 "src/parse/lex.cc" +#line 127 "src/parse/lex.cc" yy4: ++YYCURSOR; yy5: -#line 177 "../src/parse/lex.re" +#line 174 "../src/parse/lex.re" { goto echo; } -#line 135 "src/parse/lex.cc" +#line 133 "src/parse/lex.cc" yy6: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); @@ -140,13 +138,13 @@ yy6: } if (yych == '#') goto yy14; yy7: -#line 171 "../src/parse/lex.re" +#line 168 "../src/parse/lex.re" { cline++; pos = cur; goto echo; } -#line 150 "src/parse/lex.cc" +#line 148 "src/parse/lex.cc" yy8: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy6; @@ -189,7 +187,7 @@ yy14: } yy16: ++YYCURSOR; -#line 78 "../src/parse/lex.re" +#line 76 "../src/parse/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start); @@ -199,7 +197,7 @@ yy16: } return Parse; } -#line 203 "src/parse/lex.cc" +#line 201 "src/parse/lex.cc" yy18: yych = (YYCTYPE)*++YYCURSOR; if (yych == '!') goto yy20; @@ -429,12 +427,12 @@ yy65: yy67: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 166 "../src/parse/lex.re" +#line 163 "../src/parse/lex.re" { set_sourceline(); goto echo; } -#line 438 "src/parse/lex.cc" +#line 436 "src/parse/lex.cc" yy69: yych = (YYCTYPE)*++YYCURSOR; if (yych == '\n') goto yy67; @@ -530,15 +528,16 @@ yy90: goto yy13; yy91: ++YYCURSOR; -#line 118 "../src/parse/lex.re" +#line 117 "../src/parse/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start) .wdelay_yymaxfill(); } - goto eoc; + lex_end_of_comment(); + goto echo; } -#line 542 "src/parse/lex.cc" +#line 541 "src/parse/lex.cc" yy93: yych = (YYCTYPE)*++YYCURSOR; if (yych == '2') goto yy100; @@ -549,7 +548,7 @@ yy94: goto yy13; yy95: ++YYCURSOR; -#line 100 "../src/parse/lex.re" +#line 98 "../src/parse/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start); @@ -560,7 +559,7 @@ yy95: reuse(); return Reuse; } -#line 564 "src/parse/lex.cc" +#line 563 "src/parse/lex.cc" yy97: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'r') goto yy102; @@ -595,7 +594,7 @@ yy104: goto yy13; yy105: ++YYCURSOR; -#line 88 "../src/parse/lex.re" +#line 86 "../src/parse/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start); @@ -607,10 +606,10 @@ yy105: } return Rules; } -#line 611 "src/parse/lex.cc" +#line 610 "src/parse/lex.cc" yy107: ++YYCURSOR; -#line 134 "../src/parse/lex.re" +#line 135 "../src/parse/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start) @@ -618,7 +617,8 @@ yy107: .wdelay_types().ws("\n") .wline_info(cline, get_fname().c_str()); } - goto eoc; + lex_end_of_comment(); + goto echo; } #line 624 "src/parse/lex.cc" yy109: @@ -631,14 +631,15 @@ yy110: goto yy13; yy111: ++YYCURSOR; -#line 111 "../src/parse/lex.re" +#line 109 "../src/parse/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start); } - goto eoc; + lex_end_of_comment(); + goto echo; } -#line 642 "src/parse/lex.cc" +#line 643 "src/parse/lex.cc" yy113: yych = (YYCTYPE)*++YYCURSOR; if (yych == 'c') goto yy115; @@ -649,20 +650,15 @@ yy114: goto yy13; yy115: ++YYCURSOR; -#line 144 "../src/parse/lex.re" +#line 146 "../src/parse/lex.re" { if (opts->target == opt_t::CODE) { out.wraw(tok, start); } - ConfContexts *conf = new ConfContexts; - lex_conf_contexts(*conf); - if (opts->target == opt_t::CODE) { - out.wdelay_contexts(opts->topIndent, conf); - } - tok = pos = cur; + lex_contexts(); goto echo; } -#line 666 "src/parse/lex.cc" +#line 662 "src/parse/lex.cc" yy117: ++YYCURSOR; #line 126 "../src/parse/lex.re" @@ -671,15 +667,19 @@ yy117: out.wraw(tok, start) .wdelay_state_goto(opts->topIndent); } - goto eoc; + lex_end_of_comment(); + goto echo; } -#line 677 "src/parse/lex.cc" +#line 674 "src/parse/lex.cc" } -#line 178 "../src/parse/lex.re" - +#line 175 "../src/parse/lex.re" -eoc: +} +void Scanner::lex_end_of_comment() +{ + uint32_t ignored = 0; + for (;;) { #line 684 "src/parse/lex.cc" { YYCTYPE yych; @@ -702,13 +702,13 @@ yy121: yy123: ++YYCURSOR; yy124: -#line 183 "../src/parse/lex.re" - { goto eoc; } +#line 184 "../src/parse/lex.re" + { continue; } #line 708 "src/parse/lex.cc" yy125: ++YYCURSOR; -#line 184 "../src/parse/lex.re" - { ++ignored; goto eoc; } +#line 185 "../src/parse/lex.re" + { ++ignored; continue; } #line 713 "src/parse/lex.cc" yy127: yych = (YYCTYPE)*++YYCURSOR; @@ -718,20 +718,156 @@ yy128: yych = (YYCTYPE)*++YYCURSOR; if (yych != '/') goto yy124; ++YYCURSOR; -#line 185 "../src/parse/lex.re" +#line 186 "../src/parse/lex.re" { - if (ignored > 0) { - cline += ignored; - ignored = 0; - out.ws("\n").wline_info(cline, get_fname().c_str()); + if (ignored > 0) { + cline += ignored; + out.ws("\n").wline_info(cline, get_fname().c_str()); + } + tok = pos = cur; + return; } - tok = pos = cur; - goto echo; - } -#line 732 "src/parse/lex.cc" +#line 731 "src/parse/lex.cc" } #line 194 "../src/parse/lex.re" +} +} +void Scanner::lex_contexts() +{ + ConfContexts conf; + for (;;) { +#line 741 "src/parse/lex.cc" +{ + YYCTYPE yych; + static const unsigned char yybm[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 128, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 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, 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 ((YYLIMIT - YYCURSOR) < 4) YYFILL(4); + yych = (YYCTYPE)*YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy135; + } + if (yych <= ')') { + if (yych <= '\n') { + if (yych >= '\t') goto yy138; + } else { + if (yych == '\r') goto yy140; + } + } else { + if (yych <= 'l') { + if (yych <= '*') goto yy141; + if (yych >= 'l') goto yy142; + } else { + if (yych == 's') goto yy143; + } + } + ++YYCURSOR; +yy134: +#line 201 "../src/parse/lex.re" + { fatal("unrecognized configuration"); } +#line 801 "src/parse/lex.cc" +yy135: + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = (YYCTYPE)*YYCURSOR; + if (yybm[0+yych] & 128) { + goto yy135; + } +#line 206 "../src/parse/lex.re" + { continue; } +#line 811 "src/parse/lex.cc" +yy138: + ++YYCURSOR; +#line 207 "../src/parse/lex.re" + { ++cline; continue; } +#line 816 "src/parse/lex.cc" +yy140: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '\n') goto yy138; + goto yy134; +yy141: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == '/') goto yy144; + goto yy134; +yy142: + yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); + if (yych == 'i') goto yy146; + goto yy134; +yy143: + yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); + if (yych == 'e') goto yy148; + goto yy134; +yy144: + ++YYCURSOR; +#line 208 "../src/parse/lex.re" + { + if (opts->target == opt_t::CODE) { + out.wdelay_contexts(opts->topIndent, + new ConfContexts(conf)); + } + tok = pos = cur; + return; + } +#line 844 "src/parse/lex.cc" +yy146: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'n') goto yy149; +yy147: + YYCURSOR = YYMARKER; + goto yy134; +yy148: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'p') goto yy150; + goto yy147; +yy149: + yych = (YYCTYPE)*++YYCURSOR; + if (yych == 'e') goto yy152; + goto yy147; +yy150: + ++YYCURSOR; +#line 204 "../src/parse/lex.re" + { conf.sep = lex_conf_string(); continue; } +#line 863 "src/parse/lex.cc" +yy152: + ++YYCURSOR; +#line 203 "../src/parse/lex.re" + { conf.line = lex_conf_string(); continue; } +#line 868 "src/parse/lex.cc" +} +#line 216 "../src/parse/lex.re" +} } int Scanner::scan() @@ -750,7 +886,7 @@ scan: start: -#line 754 "src/parse/lex.cc" +#line 890 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -791,293 +927,293 @@ start: if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 16) { - goto yy135; + goto yy158; } if (yych <= '9') { if (yych <= '&') { if (yych <= '\r') { - if (yych <= 0x08) goto yy133; - if (yych <= '\n') goto yy138; - if (yych >= '\r') goto yy140; + if (yych <= 0x08) goto yy156; + if (yych <= '\n') goto yy161; + if (yych >= '\r') goto yy163; } else { if (yych <= '"') { - if (yych >= '"') goto yy141; + if (yych >= '"') goto yy164; } else { - if (yych == '%') goto yy143; + if (yych == '%') goto yy166; } } } else { if (yych <= '+') { - if (yych <= '\'') goto yy144; - if (yych <= ')') goto yy146; - if (yych <= '*') goto yy148; - goto yy150; + if (yych <= '\'') goto yy167; + if (yych <= ')') goto yy169; + if (yych <= '*') goto yy171; + goto yy173; } else { if (yych <= '-') { - if (yych <= ',') goto yy146; + if (yych <= ',') goto yy169; } else { - if (yych <= '.') goto yy152; - if (yych <= '/') goto yy154; - goto yy155; + if (yych <= '.') goto yy175; + if (yych <= '/') goto yy177; + goto yy178; } } } } else { if (yych <= '\\') { if (yych <= '>') { - if (yych <= ':') goto yy156; - if (yych == '<') goto yy157; - goto yy146; + if (yych <= ':') goto yy179; + if (yych == '<') goto yy180; + goto yy169; } else { if (yych <= '@') { - if (yych <= '?') goto yy150; - goto yy158; + if (yych <= '?') goto yy173; + goto yy181; } else { - if (yych <= 'Z') goto yy155; - if (yych <= '[') goto yy159; - goto yy146; + if (yych <= 'Z') goto yy178; + if (yych <= '[') goto yy182; + goto yy169; } } } else { if (yych <= 'q') { - if (yych == '_') goto yy155; - if (yych >= 'a') goto yy155; + if (yych == '_') goto yy178; + if (yych >= 'a') goto yy178; } else { if (yych <= 'z') { - if (yych <= 'r') goto yy161; - goto yy155; + if (yych <= 'r') goto yy184; + goto yy178; } else { - if (yych <= '{') goto yy162; - if (yych <= '|') goto yy146; + if (yych <= '{') goto yy185; + if (yych <= '|') goto yy169; } } } } -yy133: +yy156: ++YYCURSOR; -yy134: -#line 372 "../src/parse/lex.re" +yy157: +#line 394 "../src/parse/lex.re" { fatalf("unexpected character: '%c'", *tok); goto scan; } -#line 865 "src/parse/lex.cc" -yy135: +#line 1001 "src/parse/lex.cc" +yy158: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 16) { - goto yy135; + goto yy158; } -#line 356 "../src/parse/lex.re" +#line 378 "../src/parse/lex.re" { goto scan; } -#line 877 "src/parse/lex.cc" -yy138: +#line 1013 "src/parse/lex.cc" +yy161: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= 0x1F) { - if (yych == '\t') goto yy164; + if (yych == '\t') goto yy187; } else { - if (yych <= ' ') goto yy164; - if (yych == '#') goto yy167; + if (yych <= ' ') goto yy187; + if (yych == '#') goto yy190; } -yy139: -#line 365 "../src/parse/lex.re" +yy162: +#line 387 "../src/parse/lex.re" { if (cur == eof) return 0; pos = cur; cline++; goto scan; } -#line 895 "src/parse/lex.cc" -yy140: +#line 1031 "src/parse/lex.cc" +yy163: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy138; - goto yy134; -yy141: + if (yych == '\n') goto yy161; + goto yy157; +yy164: ++YYCURSOR; -#line 243 "../src/parse/lex.re" +#line 265 "../src/parse/lex.re" { yylval.regexp = lex_str('"', opts->bCaseInsensitive || opts->bCaseInverted); return TOKEN_REGEXP; } -#line 904 "src/parse/lex.cc" -yy143: +#line 1040 "src/parse/lex.cc" +yy166: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '}') goto yy169; - goto yy134; -yy144: + if (yych == '}') goto yy192; + goto yy157; +yy167: ++YYCURSOR; -#line 242 "../src/parse/lex.re" +#line 264 "../src/parse/lex.re" { yylval.regexp = lex_str('\'', opts->bCaseInsensitive || !opts->bCaseInverted); return TOKEN_REGEXP; } -#line 913 "src/parse/lex.cc" -yy146: +#line 1049 "src/parse/lex.cc" +yy169: ++YYCURSOR; -yy147: -#line 259 "../src/parse/lex.re" +yy170: +#line 281 "../src/parse/lex.re" { return *tok; } -#line 921 "src/parse/lex.cc" -yy148: +#line 1057 "src/parse/lex.cc" +yy171: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '/') goto yy169; -#line 263 "../src/parse/lex.re" + if ((yych = (YYCTYPE)*YYCURSOR) == '/') goto yy192; +#line 285 "../src/parse/lex.re" { yylval.op = *tok; return TOKEN_STAR; } -#line 930 "src/parse/lex.cc" -yy150: +#line 1066 "src/parse/lex.cc" +yy173: ++YYCURSOR; -#line 267 "../src/parse/lex.re" +#line 289 "../src/parse/lex.re" { yylval.op = *tok; return TOKEN_CLOSE; } -#line 938 "src/parse/lex.cc" -yy152: +#line 1074 "src/parse/lex.cc" +yy175: ++YYCURSOR; -#line 351 "../src/parse/lex.re" +#line 373 "../src/parse/lex.re" { yylval.regexp = mkDot(); return TOKEN_REGEXP; } -#line 946 "src/parse/lex.cc" -yy154: +#line 1082 "src/parse/lex.cc" +yy177: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '*') goto yy171; - if (yych == '/') goto yy173; - goto yy147; -yy155: + if (yych == '*') goto yy194; + if (yych == '/') goto yy196; + goto yy170; +yy178: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - goto yy181; -yy156: + goto yy204; +yy179: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '=') goto yy182; - goto yy134; -yy157: + if (yych == '=') goto yy205; + goto yy157; +yy180: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == '!') goto yy184; - if (yych == '>') goto yy186; - goto yy147; -yy158: + if (yych == '!') goto yy207; + if (yych == '>') goto yy209; + goto yy170; +yy181: yych = (YYCTYPE)*++YYCURSOR; if (yych <= 'Z') { - if (yych <= '/') goto yy134; - if (yych <= '9') goto yy187; - if (yych <= '@') goto yy134; - goto yy187; + if (yych <= '/') goto yy157; + if (yych <= '9') goto yy210; + if (yych <= '@') goto yy157; + goto yy210; } else { if (yych <= '_') { - if (yych <= '^') goto yy134; - goto yy187; + if (yych <= '^') goto yy157; + goto yy210; } else { - if (yych <= '`') goto yy134; - if (yych <= 'z') goto yy187; - goto yy134; + if (yych <= '`') goto yy157; + if (yych <= 'z') goto yy210; + goto yy157; } } -yy159: +yy182: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '^') goto yy190; -#line 244 "../src/parse/lex.re" + if ((yych = (YYCTYPE)*YYCURSOR) == '^') goto yy213; +#line 266 "../src/parse/lex.re" { yylval.regexp = lex_cls(false); return TOKEN_REGEXP; } -#line 988 "src/parse/lex.cc" -yy161: +#line 1124 "src/parse/lex.cc" +yy184: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych == 'e') goto yy192; - goto yy181; -yy162: + if (yych == 'e') goto yy215; + goto yy204; +yy185: yyaccept = 2; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yybm[0+yych] & 64) { - goto yy195; + goto yy218; } if (yych <= 'Z') { - if (yych == ',') goto yy193; - if (yych >= 'A') goto yy197; + if (yych == ',') goto yy216; + if (yych >= 'A') goto yy220; } else { if (yych <= '_') { - if (yych >= '_') goto yy197; + if (yych >= '_') goto yy220; } else { - if (yych <= '`') goto yy163; - if (yych <= 'z') goto yy197; + if (yych <= '`') goto yy186; + if (yych <= 'z') goto yy220; } } -yy163: -#line 213 "../src/parse/lex.re" +yy186: +#line 235 "../src/parse/lex.re" { depth = 1; goto code; } -#line 1017 "src/parse/lex.cc" -yy164: +#line 1153 "src/parse/lex.cc" +yy187: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy164; + if (yych == '\t') goto yy187; } else { - if (yych <= ' ') goto yy164; - if (yych == '#') goto yy167; + if (yych <= ' ') goto yy187; + if (yych == '#') goto yy190; } -yy166: +yy189: YYCURSOR = YYMARKER; if (yyaccept <= 1) { if (yyaccept == 0) { - goto yy139; + goto yy162; } else { - goto yy147; + goto yy170; } } else { if (yyaccept == 2) { - goto yy163; + goto yy186; } else { - goto yy194; + goto yy217; } } -yy167: +yy190: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy167; - goto yy166; + if (yych == '\t') goto yy190; + goto yy189; } else { - if (yych <= ' ') goto yy167; - if (yych == 'l') goto yy199; - goto yy166; + if (yych <= ' ') goto yy190; + if (yych == 'l') goto yy222; + goto yy189; } -yy169: +yy192: ++YYCURSOR; -#line 237 "../src/parse/lex.re" +#line 259 "../src/parse/lex.re" { tok = cur; return 0; } -#line 1062 "src/parse/lex.cc" -yy171: +#line 1198 "src/parse/lex.cc" +yy194: ++YYCURSOR; -#line 231 "../src/parse/lex.re" +#line 253 "../src/parse/lex.re" { depth = 1; goto comment; } -#line 1070 "src/parse/lex.cc" -yy173: +#line 1206 "src/parse/lex.cc" +yy196: ++YYCURSOR; -#line 228 "../src/parse/lex.re" +#line 250 "../src/parse/lex.re" { goto nextLine; } -#line 1077 "src/parse/lex.cc" -yy175: +#line 1213 "src/parse/lex.cc" +yy198: ++YYCURSOR; YYCURSOR -= 1; -#line 335 "../src/parse/lex.re" +#line 357 "../src/parse/lex.re" { if (!opts->FFlag) { yylval.str = new std::string (tok, tok_len()); @@ -1093,157 +1229,157 @@ yy175: return TOKEN_REGEXP; } } -#line 1097 "src/parse/lex.cc" -yy177: +#line 1233 "src/parse/lex.cc" +yy200: yych = (YYCTYPE)*++YYCURSOR; - goto yy203; -yy178: + goto yy226; +yy201: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 330 "../src/parse/lex.re" +#line 352 "../src/parse/lex.re" { yylval.str = new std::string (tok, tok_len ()); return TOKEN_ID; } -#line 1109 "src/parse/lex.cc" -yy180: +#line 1245 "src/parse/lex.cc" +yy203: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy181: +yy204: if (yybm[0+yych] & 32) { - goto yy180; + goto yy203; } if (yych <= ' ') { - if (yych == '\t') goto yy177; - if (yych <= 0x1F) goto yy175; - goto yy177; + if (yych == '\t') goto yy200; + if (yych <= 0x1F) goto yy198; + goto yy200; } else { if (yych <= ',') { - if (yych <= '+') goto yy175; - goto yy178; + if (yych <= '+') goto yy198; + goto yy201; } else { - if (yych <= '<') goto yy175; - if (yych <= '>') goto yy178; - goto yy175; + if (yych <= '<') goto yy198; + if (yych <= '>') goto yy201; + goto yy198; } } -yy182: +yy205: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '>') goto yy204; -#line 222 "../src/parse/lex.re" + if ((yych = (YYCTYPE)*YYCURSOR) == '>') goto yy227; +#line 244 "../src/parse/lex.re" { tok += 2; /* skip ":=" */ depth = 0; goto code; } -#line 1142 "src/parse/lex.cc" -yy184: +#line 1278 "src/parse/lex.cc" +yy207: ++YYCURSOR; -#line 250 "../src/parse/lex.re" +#line 272 "../src/parse/lex.re" { return TOKEN_SETUP; } -#line 1149 "src/parse/lex.cc" -yy186: +#line 1285 "src/parse/lex.cc" +yy209: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - goto yy207; -yy187: + goto yy230; +yy210: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 'Z') { - if (yych <= '/') goto yy189; - if (yych <= '9') goto yy187; - if (yych >= 'A') goto yy187; + if (yych <= '/') goto yy212; + if (yych <= '9') goto yy210; + if (yych >= 'A') goto yy210; } else { if (yych <= '_') { - if (yych >= '_') goto yy187; + if (yych >= '_') goto yy210; } else { - if (yych <= '`') goto yy189; - if (yych <= 'z') goto yy187; + if (yych <= '`') goto yy212; + if (yych <= 'z') goto yy210; } } -yy189: -#line 254 "../src/parse/lex.re" +yy212: +#line 276 "../src/parse/lex.re" { yylval.str = new std::string(tok + 1, tok_len() - 1); return TOKEN_CTX; } -#line 1176 "src/parse/lex.cc" -yy190: +#line 1312 "src/parse/lex.cc" +yy213: ++YYCURSOR; -#line 245 "../src/parse/lex.re" +#line 267 "../src/parse/lex.re" { yylval.regexp = lex_cls(true); return TOKEN_REGEXP; } -#line 1181 "src/parse/lex.cc" -yy192: +#line 1317 "src/parse/lex.cc" +yy215: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych == '2') goto yy212; - goto yy181; -yy193: + if (yych == '2') goto yy235; + goto yy204; +yy216: ++YYCURSOR; -yy194: -#line 303 "../src/parse/lex.re" +yy217: +#line 325 "../src/parse/lex.re" { fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"); } -#line 1194 "src/parse/lex.cc" -yy195: +#line 1330 "src/parse/lex.cc" +yy218: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 64) { - goto yy195; + goto yy218; } if (yych <= '^') { if (yych <= ',') { - if (yych <= '+') goto yy166; - goto yy213; + if (yych <= '+') goto yy189; + goto yy236; } else { - if (yych <= '@') goto yy166; - if (yych >= '[') goto yy166; + if (yych <= '@') goto yy189; + if (yych >= '[') goto yy189; } } else { if (yych <= 'z') { - if (yych == '`') goto yy166; + if (yych == '`') goto yy189; } else { - if (yych == '}') goto yy214; - goto yy166; + if (yych == '}') goto yy237; + goto yy189; } } -yy197: +yy220: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= '^') { if (yych <= '9') { - if (yych <= '/') goto yy166; - goto yy197; + if (yych <= '/') goto yy189; + goto yy220; } else { - if (yych <= '@') goto yy166; - if (yych <= 'Z') goto yy197; - goto yy166; + if (yych <= '@') goto yy189; + if (yych <= 'Z') goto yy220; + goto yy189; } } else { if (yych <= 'z') { - if (yych == '`') goto yy166; - goto yy197; + if (yych == '`') goto yy189; + goto yy220; } else { - if (yych == '}') goto yy216; - goto yy166; + if (yych == '}') goto yy239; + goto yy189; } } -yy199: +yy222: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'i') goto yy218; - goto yy166; -yy200: + if (yych == 'i') goto yy241; + goto yy189; +yy223: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 317 "../src/parse/lex.re" +#line 339 "../src/parse/lex.re" { yylval.str = new std::string (tok, tok_len ()); if (opts->FFlag) @@ -1256,87 +1392,87 @@ yy200: return TOKEN_ID; } } -#line 1260 "src/parse/lex.cc" -yy202: +#line 1396 "src/parse/lex.cc" +yy225: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; -yy203: +yy226: if (yych <= ' ') { - if (yych == '\t') goto yy202; - if (yych <= 0x1F) goto yy200; - goto yy202; + if (yych == '\t') goto yy225; + if (yych <= 0x1F) goto yy223; + goto yy225; } else { if (yych <= ',') { - if (yych <= '+') goto yy200; - goto yy178; + if (yych <= '+') goto yy223; + goto yy201; } else { - if (yych <= '<') goto yy200; - if (yych <= '>') goto yy178; - goto yy200; + if (yych <= '<') goto yy223; + if (yych <= '>') goto yy201; + goto yy223; } } -yy204: +yy227: ++YYCURSOR; YYCURSOR -= 2; -#line 218 "../src/parse/lex.re" +#line 240 "../src/parse/lex.re" { return *tok; } -#line 1287 "src/parse/lex.cc" -yy206: +#line 1423 "src/parse/lex.cc" +yy229: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; -yy207: +yy230: if (yych <= '9') { if (yych <= '\t') { - if (yych <= 0x08) goto yy166; - goto yy206; + if (yych <= 0x08) goto yy189; + goto yy229; } else { - if (yych == ' ') goto yy206; - goto yy166; + if (yych == ' ') goto yy229; + goto yy189; } } else { if (yych <= '=') { - if (yych <= ':') goto yy208; - if (yych <= '<') goto yy166; - goto yy209; + if (yych <= ':') goto yy231; + if (yych <= '<') goto yy189; + goto yy232; } else { - if (yych == '{') goto yy210; - goto yy166; + if (yych == '{') goto yy233; + goto yy189; } } -yy208: +yy231: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '=') goto yy210; - goto yy166; -yy209: + if (yych == '=') goto yy233; + goto yy189; +yy232: yych = (YYCTYPE)*++YYCURSOR; - if (yych != '>') goto yy166; -yy210: + if (yych != '>') goto yy189; +yy233: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 247 "../src/parse/lex.re" +#line 269 "../src/parse/lex.re" { return TOKEN_NOCOND; } -#line 1325 "src/parse/lex.cc" -yy212: +#line 1461 "src/parse/lex.cc" +yy235: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych == 'c') goto yy219; - goto yy181; -yy213: + if (yych == 'c') goto yy242; + goto yy204; +yy236: yyaccept = 3; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy194; - if (yych <= '9') goto yy220; - if (yych == '}') goto yy222; - goto yy194; -yy214: + if (yych <= '/') goto yy217; + if (yych <= '9') goto yy243; + if (yych == '}') goto yy245; + goto yy217; +yy237: ++YYCURSOR; -#line 272 "../src/parse/lex.re" +#line 294 "../src/parse/lex.re" { if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.extop.min)) { @@ -1345,10 +1481,10 @@ yy214: yylval.extop.max = yylval.extop.min; return TOKEN_CLOSESIZE; } -#line 1349 "src/parse/lex.cc" -yy216: +#line 1485 "src/parse/lex.cc" +yy239: ++YYCURSOR; -#line 307 "../src/parse/lex.re" +#line 329 "../src/parse/lex.re" { if (!opts->FFlag) { fatal("curly braces for names only allowed with -F switch"); @@ -1356,27 +1492,27 @@ yy216: yylval.str = new std::string (tok + 1, tok_len () - 2); // -2 to omit braces return TOKEN_ID; } -#line 1360 "src/parse/lex.cc" -yy218: +#line 1496 "src/parse/lex.cc" +yy241: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'n') goto yy224; - goto yy166; -yy219: + if (yych == 'n') goto yy247; + goto yy189; +yy242: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych == ':') goto yy225; - goto yy181; -yy220: + if (yych == ':') goto yy248; + goto yy204; +yy243: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych <= '/') goto yy166; - if (yych <= '9') goto yy220; - if (yych == '}') goto yy227; - goto yy166; -yy222: + if (yych <= '/') goto yy189; + if (yych <= '9') goto yy243; + if (yych == '}') goto yy250; + goto yy189; +yy245: ++YYCURSOR; -#line 294 "../src/parse/lex.re" +#line 316 "../src/parse/lex.re" { if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.extop.min)) { @@ -1385,19 +1521,19 @@ yy222: yylval.extop.max = std::numeric_limits::max(); return TOKEN_CLOSESIZE; } -#line 1389 "src/parse/lex.cc" -yy224: +#line 1525 "src/parse/lex.cc" +yy247: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'e') goto yy229; - goto yy166; -yy225: + if (yych == 'e') goto yy252; + goto yy189; +yy248: ++YYCURSOR; -#line 315 "../src/parse/lex.re" +#line 337 "../src/parse/lex.re" { lex_conf (); return TOKEN_CONF; } -#line 1398 "src/parse/lex.cc" -yy227: +#line 1534 "src/parse/lex.cc" +yy250: ++YYCURSOR; -#line 281 "../src/parse/lex.re" +#line 303 "../src/parse/lex.re" { const char * p = strchr (tok, ','); if (!s_to_u32_unsafe (tok + 1, p, yylval.extop.min)) @@ -1410,132 +1546,132 @@ yy227: } return TOKEN_CLOSESIZE; } -#line 1414 "src/parse/lex.cc" -yy229: +#line 1550 "src/parse/lex.cc" +yy252: yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '0') goto yy231; - if (yych <= '9') goto yy166; - goto yy231; -yy230: + if (yych <= '0') goto yy254; + if (yych <= '9') goto yy189; + goto yy254; +yy253: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy231: +yy254: if (yych <= 0x1F) { - if (yych == '\t') goto yy230; - goto yy166; + if (yych == '\t') goto yy253; + goto yy189; } else { - if (yych <= ' ') goto yy230; - if (yych <= '0') goto yy166; - if (yych >= ':') goto yy166; + if (yych <= ' ') goto yy253; + if (yych <= '0') goto yy189; + if (yych >= ':') goto yy189; } -yy232: +yy255: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yych <= '\r') { if (yych <= '\t') { - if (yych <= 0x08) goto yy166; + if (yych <= 0x08) goto yy189; } else { - if (yych <= '\n') goto yy236; - if (yych <= '\f') goto yy166; - goto yy238; + if (yych <= '\n') goto yy259; + if (yych <= '\f') goto yy189; + goto yy261; } } else { if (yych <= ' ') { - if (yych <= 0x1F) goto yy166; + if (yych <= 0x1F) goto yy189; } else { - if (yych <= '/') goto yy166; - if (yych <= '9') goto yy232; - goto yy166; + if (yych <= '/') goto yy189; + if (yych <= '9') goto yy255; + goto yy189; } } -yy234: +yy257: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy234; - goto yy166; + if (yych == '\t') goto yy257; + goto yy189; } else { - if (yych <= ' ') goto yy234; - if (yych == '"') goto yy239; - goto yy166; + if (yych <= ' ') goto yy257; + if (yych == '"') goto yy262; + goto yy189; } -yy236: +yy259: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 360 "../src/parse/lex.re" +#line 382 "../src/parse/lex.re" { set_sourceline (); goto scan; } -#line 1475 "src/parse/lex.cc" -yy238: +#line 1611 "src/parse/lex.cc" +yy261: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy236; - goto yy166; -yy239: + if (yych == '\n') goto yy259; + goto yy189; +yy262: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 128) { - goto yy239; + goto yy262; } - if (yych <= '\n') goto yy166; - if (yych >= '#') goto yy242; + if (yych <= '\n') goto yy189; + if (yych >= '#') goto yy265; yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy236; - if (yych == '\r') goto yy238; - goto yy166; -yy242: + if (yych == '\n') goto yy259; + if (yych == '\r') goto yy261; + goto yy189; +yy265: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy166; - goto yy239; + if (yych == '\n') goto yy189; + goto yy262; } -#line 376 "../src/parse/lex.re" +#line 398 "../src/parse/lex.re" flex_name: -#line 1505 "src/parse/lex.cc" +#line 1641 "src/parse/lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy247; - if (yych == '\r') goto yy249; + if (yych == '\n') goto yy270; + if (yych == '\r') goto yy272; ++YYCURSOR; -yy246: -#line 387 "../src/parse/lex.re" +yy269: +#line 409 "../src/parse/lex.re" { YYCURSOR = tok; goto start; } -#line 1519 "src/parse/lex.cc" -yy247: +#line 1655 "src/parse/lex.cc" +yy270: ++YYCURSOR; -#line 381 "../src/parse/lex.re" +#line 403 "../src/parse/lex.re" { YYCURSOR = tok; lexer_state = LEX_NORMAL; return TOKEN_FID_END; } -#line 1528 "src/parse/lex.cc" -yy249: +#line 1664 "src/parse/lex.cc" +yy272: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '\n') goto yy247; - goto yy246; + if ((yych = (YYCTYPE)*YYCURSOR) == '\n') goto yy270; + goto yy269; } -#line 391 "../src/parse/lex.re" +#line 413 "../src/parse/lex.re" code: -#line 1539 "src/parse/lex.cc" +#line 1675 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -1577,26 +1713,26 @@ code: yych = (YYCTYPE)*YYCURSOR; if (yych <= '&') { if (yych <= '\n') { - if (yych <= 0x00) goto yy252; - if (yych <= '\t') goto yy254; - goto yy256; + if (yych <= 0x00) goto yy275; + if (yych <= '\t') goto yy277; + goto yy279; } else { - if (yych == '"') goto yy258; - goto yy254; + if (yych == '"') goto yy281; + goto yy277; } } else { if (yych <= '{') { - if (yych <= '\'') goto yy259; - if (yych <= 'z') goto yy254; - goto yy260; + if (yych <= '\'') goto yy282; + if (yych <= 'z') goto yy277; + goto yy283; } else { - if (yych == '}') goto yy262; - goto yy254; + if (yych == '}') goto yy285; + goto yy277; } } -yy252: +yy275: ++YYCURSOR; -#line 454 "../src/parse/lex.re" +#line 476 "../src/parse/lex.re" { if (cur == eof) { @@ -1608,34 +1744,34 @@ yy252: } goto code; } -#line 1612 "src/parse/lex.cc" -yy254: +#line 1748 "src/parse/lex.cc" +yy277: ++YYCURSOR; -yy255: -#line 468 "../src/parse/lex.re" +yy278: +#line 490 "../src/parse/lex.re" { goto code; } -#line 1620 "src/parse/lex.cc" -yy256: +#line 1756 "src/parse/lex.cc" +yy279: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '\r') { if (yych <= '\t') { - if (yych >= '\t') goto yy264; + if (yych >= '\t') goto yy287; } else { - if (yych <= '\n') goto yy266; - if (yych >= '\r') goto yy266; + if (yych <= '\n') goto yy289; + if (yych >= '\r') goto yy289; } } else { if (yych <= ' ') { - if (yych >= ' ') goto yy264; + if (yych >= ' ') goto yy287; } else { - if (yych == '#') goto yy267; + if (yych == '#') goto yy290; } } -yy257: -#line 435 "../src/parse/lex.re" +yy280: +#line 457 "../src/parse/lex.re" { if (depth == 0) { @@ -1655,20 +1791,20 @@ yy257: cline++; goto code; } -#line 1659 "src/parse/lex.cc" -yy258: +#line 1795 "src/parse/lex.cc" +yy281: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == '\n') goto yy255; - goto yy271; -yy259: + if (yych == '\n') goto yy278; + goto yy294; +yy282: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == '\n') goto yy255; - goto yy276; -yy260: + if (yych == '\n') goto yy278; + goto yy299; +yy283: ++YYCURSOR; -#line 407 "../src/parse/lex.re" +#line 429 "../src/parse/lex.re" { if (depth == 0) { @@ -1680,10 +1816,10 @@ yy260: } goto code; } -#line 1684 "src/parse/lex.cc" -yy262: +#line 1820 "src/parse/lex.cc" +yy285: ++YYCURSOR; -#line 395 "../src/parse/lex.re" +#line 417 "../src/parse/lex.re" { if (depth == 0) { @@ -1696,19 +1832,19 @@ yy262: } goto code; } -#line 1700 "src/parse/lex.cc" -yy264: +#line 1836 "src/parse/lex.cc" +yy287: yyaccept = 2; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= 0x1F) { - if (yych == '\t') goto yy278; + if (yych == '\t') goto yy301; } else { - if (yych <= ' ') goto yy278; - if (yych == '#') goto yy267; + if (yych <= ' ') goto yy301; + if (yych == '#') goto yy290; } -yy265: +yy288: YYCURSOR -= 1; -#line 422 "../src/parse/lex.re" +#line 444 "../src/parse/lex.re" { if (depth == 0) { @@ -1722,175 +1858,175 @@ yy265: cline++; goto code; } -#line 1726 "src/parse/lex.cc" -yy266: +#line 1862 "src/parse/lex.cc" +yy289: yych = (YYCTYPE)*++YYCURSOR; - goto yy265; -yy267: + goto yy288; +yy290: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 16) { - goto yy267; + goto yy290; } - if (yych == 'l') goto yy280; -yy269: + if (yych == 'l') goto yy303; +yy292: YYCURSOR = YYMARKER; if (yyaccept <= 1) { if (yyaccept == 0) { - goto yy257; + goto yy280; } else { - goto yy255; + goto yy278; } } else { - goto yy265; + goto yy288; } -yy270: +yy293: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; -yy271: +yy294: if (yybm[0+yych] & 32) { - goto yy270; + goto yy293; } - if (yych <= '\n') goto yy269; - if (yych >= '#') goto yy274; -yy272: + if (yych <= '\n') goto yy292; + if (yych >= '#') goto yy297; +yy295: ++YYCURSOR; -#line 465 "../src/parse/lex.re" +#line 487 "../src/parse/lex.re" { goto code; } -#line 1765 "src/parse/lex.cc" -yy274: +#line 1901 "src/parse/lex.cc" +yy297: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy269; - goto yy270; -yy275: + if (yych == '\n') goto yy292; + goto yy293; +yy298: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; -yy276: +yy299: if (yybm[0+yych] & 64) { - goto yy275; + goto yy298; } - if (yych <= '\n') goto yy269; - if (yych <= '\'') goto yy272; + if (yych <= '\n') goto yy292; + if (yych <= '\'') goto yy295; ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy269; - goto yy275; -yy278: + if (yych == '\n') goto yy292; + goto yy298; +yy301: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy278; - goto yy269; + if (yych == '\t') goto yy301; + goto yy292; } else { - if (yych <= ' ') goto yy278; - if (yych == '#') goto yy267; - goto yy269; + if (yych <= ' ') goto yy301; + if (yych == '#') goto yy290; + goto yy292; } -yy280: +yy303: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy269; + if (yych != 'i') goto yy292; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy269; + if (yych != 'n') goto yy292; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy269; + if (yych != 'e') goto yy292; yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '0') goto yy285; - if (yych <= '9') goto yy269; - goto yy285; -yy284: + if (yych <= '0') goto yy308; + if (yych <= '9') goto yy292; + goto yy308; +yy307: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy285: +yy308: if (yych <= 0x1F) { - if (yych == '\t') goto yy284; - goto yy269; + if (yych == '\t') goto yy307; + goto yy292; } else { - if (yych <= ' ') goto yy284; - if (yych <= '0') goto yy269; - if (yych >= ':') goto yy269; + if (yych <= ' ') goto yy307; + if (yych <= '0') goto yy292; + if (yych >= ':') goto yy292; } -yy286: +yy309: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 128) { - goto yy286; + goto yy309; } if (yych <= '\f') { - if (yych <= 0x08) goto yy269; - if (yych <= '\t') goto yy288; - if (yych <= '\n') goto yy290; - goto yy269; + if (yych <= 0x08) goto yy292; + if (yych <= '\t') goto yy311; + if (yych <= '\n') goto yy313; + goto yy292; } else { - if (yych <= '\r') goto yy292; - if (yych != ' ') goto yy269; + if (yych <= '\r') goto yy315; + if (yych != ' ') goto yy292; } -yy288: +yy311: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy288; - goto yy269; + if (yych == '\t') goto yy311; + goto yy292; } else { - if (yych <= ' ') goto yy288; - if (yych == '"') goto yy293; - goto yy269; + if (yych <= ' ') goto yy311; + if (yych == '"') goto yy316; + goto yy292; } -yy290: +yy313: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 418 "../src/parse/lex.re" +#line 440 "../src/parse/lex.re" { set_sourceline (); goto code; } -#line 1860 "src/parse/lex.cc" -yy292: +#line 1996 "src/parse/lex.cc" +yy315: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy290; - goto yy269; -yy293: + if (yych == '\n') goto yy313; + goto yy292; +yy316: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = (YYCTYPE)*YYCURSOR; if (yych <= '!') { - if (yych == '\n') goto yy269; - goto yy293; + if (yych == '\n') goto yy292; + goto yy316; } else { - if (yych <= '"') goto yy295; - if (yych == '\\') goto yy296; - goto yy293; + if (yych <= '"') goto yy318; + if (yych == '\\') goto yy319; + goto yy316; } -yy295: +yy318: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy290; - if (yych == '\r') goto yy292; - goto yy269; -yy296: + if (yych == '\n') goto yy313; + if (yych == '\r') goto yy315; + goto yy292; +yy319: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy269; - goto yy293; + if (yych == '\n') goto yy292; + goto yy316; } -#line 471 "../src/parse/lex.re" +#line 493 "../src/parse/lex.re" comment: -#line 1894 "src/parse/lex.cc" +#line 2030 "src/parse/lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1930,14 +2066,14 @@ comment: if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yych <= ')') { - if (yych == '\n') goto yy301; + if (yych == '\n') goto yy324; } else { - if (yych <= '*') goto yy303; - if (yych == '/') goto yy304; + if (yych <= '*') goto yy326; + if (yych == '/') goto yy327; } ++YYCURSOR; -yy300: -#line 503 "../src/parse/lex.re" +yy323: +#line 525 "../src/parse/lex.re" { if (cur == eof) { @@ -1945,15 +2081,15 @@ yy300: } goto comment; } -#line 1949 "src/parse/lex.cc" -yy301: +#line 2085 "src/parse/lex.cc" +yy324: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yybm[0+yych] & 32) { - goto yy305; + goto yy328; } - if (yych == '#') goto yy308; -yy302: -#line 494 "../src/parse/lex.re" + if (yych == '#') goto yy331; +yy325: +#line 516 "../src/parse/lex.re" { if (cur == eof) { @@ -1963,41 +2099,41 @@ yy302: cline++; goto comment; } -#line 1967 "src/parse/lex.cc" -yy303: +#line 2103 "src/parse/lex.cc" +yy326: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '/') goto yy310; - goto yy300; -yy304: + if (yych == '/') goto yy333; + goto yy323; +yy327: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '*') goto yy312; - goto yy300; -yy305: + if (yych == '*') goto yy335; + goto yy323; +yy328: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 32) { - goto yy305; + goto yy328; } - if (yych == '#') goto yy308; -yy307: + if (yych == '#') goto yy331; +yy330: YYCURSOR = YYMARKER; - goto yy302; -yy308: + goto yy325; +yy331: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy308; - goto yy307; + if (yych == '\t') goto yy331; + goto yy330; } else { - if (yych <= ' ') goto yy308; - if (yych == 'l') goto yy314; - goto yy307; + if (yych <= ' ') goto yy331; + if (yych == 'l') goto yy337; + goto yy330; } -yy310: +yy333: ++YYCURSOR; -#line 475 "../src/parse/lex.re" +#line 497 "../src/parse/lex.re" { if (--depth == 0) { @@ -2008,124 +2144,124 @@ yy310: goto comment; } } -#line 2012 "src/parse/lex.cc" -yy312: +#line 2148 "src/parse/lex.cc" +yy335: ++YYCURSOR; -#line 485 "../src/parse/lex.re" +#line 507 "../src/parse/lex.re" { ++depth; fatal("ambiguous /* found"); goto comment; } -#line 2021 "src/parse/lex.cc" -yy314: +#line 2157 "src/parse/lex.cc" +yy337: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy307; + if (yych != 'i') goto yy330; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy307; + if (yych != 'n') goto yy330; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy307; + if (yych != 'e') goto yy330; yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '0') goto yy319; - if (yych <= '9') goto yy307; - goto yy319; -yy318: + if (yych <= '0') goto yy342; + if (yych <= '9') goto yy330; + goto yy342; +yy341: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy319: +yy342: if (yych <= 0x1F) { - if (yych == '\t') goto yy318; - goto yy307; + if (yych == '\t') goto yy341; + goto yy330; } else { - if (yych <= ' ') goto yy318; - if (yych <= '0') goto yy307; - if (yych >= ':') goto yy307; + if (yych <= ' ') goto yy341; + if (yych <= '0') goto yy330; + if (yych >= ':') goto yy330; } -yy320: +yy343: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 64) { - goto yy320; + goto yy343; } if (yych <= '\f') { - if (yych <= 0x08) goto yy307; - if (yych <= '\t') goto yy322; - if (yych <= '\n') goto yy324; - goto yy307; + if (yych <= 0x08) goto yy330; + if (yych <= '\t') goto yy345; + if (yych <= '\n') goto yy347; + goto yy330; } else { - if (yych <= '\r') goto yy326; - if (yych != ' ') goto yy307; + if (yych <= '\r') goto yy349; + if (yych != ' ') goto yy330; } -yy322: +yy345: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy322; - goto yy307; + if (yych == '\t') goto yy345; + goto yy330; } else { - if (yych <= ' ') goto yy322; - if (yych == '"') goto yy327; - goto yy307; + if (yych <= ' ') goto yy345; + if (yych == '"') goto yy350; + goto yy330; } -yy324: +yy347: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 490 "../src/parse/lex.re" +#line 512 "../src/parse/lex.re" { set_sourceline (); goto comment; } -#line 2083 "src/parse/lex.cc" -yy326: +#line 2219 "src/parse/lex.cc" +yy349: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy324; - goto yy307; -yy327: + if (yych == '\n') goto yy347; + goto yy330; +yy350: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 128) { - goto yy327; + goto yy350; } - if (yych <= '\n') goto yy307; - if (yych >= '#') goto yy330; + if (yych <= '\n') goto yy330; + if (yych >= '#') goto yy353; yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy324; - if (yych == '\r') goto yy326; - goto yy307; -yy330: + if (yych == '\n') goto yy347; + if (yych == '\r') goto yy349; + goto yy330; +yy353: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy307; - goto yy327; + if (yych == '\n') goto yy330; + goto yy350; } -#line 510 "../src/parse/lex.re" +#line 532 "../src/parse/lex.re" nextLine: -#line 2113 "src/parse/lex.cc" +#line 2249 "src/parse/lex.cc" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy335; + if (yych == '\n') goto yy358; ++YYCURSOR; -#line 521 "../src/parse/lex.re" +#line 543 "../src/parse/lex.re" { if(cur == eof) { return 0; } goto nextLine; } -#line 2126 "src/parse/lex.cc" -yy335: +#line 2262 "src/parse/lex.cc" +yy358: ++YYCURSOR; -#line 514 "../src/parse/lex.re" +#line 536 "../src/parse/lex.re" { if(cur == eof) { return 0; } @@ -2133,9 +2269,9 @@ yy335: cline++; goto scan; } -#line 2137 "src/parse/lex.cc" +#line 2273 "src/parse/lex.cc" } -#line 526 "../src/parse/lex.re" +#line 548 "../src/parse/lex.re" } @@ -2159,44 +2295,44 @@ const RegExp *Scanner::lex_cls(bool neg) uint32_t u, l; fst: -#line 2163 "src/parse/lex.cc" +#line 2299 "src/parse/lex.cc" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == ']') goto yy340; -#line 550 "../src/parse/lex.re" + if (yych == ']') goto yy363; +#line 572 "../src/parse/lex.re" { l = lex_cls_chr(); goto snd; } -#line 2171 "src/parse/lex.cc" -yy340: +#line 2307 "src/parse/lex.cc" +yy363: ++YYCURSOR; -#line 549 "../src/parse/lex.re" +#line 571 "../src/parse/lex.re" { goto end; } -#line 2176 "src/parse/lex.cc" +#line 2312 "src/parse/lex.cc" } -#line 551 "../src/parse/lex.re" +#line 573 "../src/parse/lex.re" snd: -#line 2182 "src/parse/lex.cc" +#line 2318 "src/parse/lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*(YYMARKER = YYCURSOR); - if (yych == '-') goto yy345; -yy344: -#line 554 "../src/parse/lex.re" + if (yych == '-') goto yy368; +yy367: +#line 576 "../src/parse/lex.re" { u = l; goto add; } -#line 2191 "src/parse/lex.cc" -yy345: +#line 2327 "src/parse/lex.cc" +yy368: yych = (YYCTYPE)*++YYCURSOR; - if (yych != ']') goto yy347; + if (yych != ']') goto yy370; YYCURSOR = YYMARKER; - goto yy344; -yy347: + goto yy367; +yy370: ++YYCURSOR; YYCURSOR -= 1; -#line 555 "../src/parse/lex.re" +#line 577 "../src/parse/lex.re" { u = lex_cls_chr(); if (l > u) { @@ -2205,9 +2341,9 @@ yy347: } goto add; } -#line 2209 "src/parse/lex.cc" +#line 2345 "src/parse/lex.cc" } -#line 563 "../src/parse/lex.re" +#line 585 "../src/parse/lex.re" add: if (!(s = opts->encoding.encodeRange(l, u))) { @@ -2226,290 +2362,290 @@ uint32_t Scanner::lex_cls_chr() { tok = cur; -#line 2230 "src/parse/lex.cc" +#line 2366 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy353; - if (yych == '\\') goto yy355; + if (yych == '\n') goto yy376; + if (yych == '\\') goto yy378; ++YYCURSOR; -#line 586 "../src/parse/lex.re" +#line 608 "../src/parse/lex.re" { return static_cast(tok[0]); } -#line 2241 "src/parse/lex.cc" -yy353: +#line 2377 "src/parse/lex.cc" +yy376: ++YYCURSOR; -#line 581 "../src/parse/lex.re" +#line 603 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error"); } -#line 2246 "src/parse/lex.cc" -yy355: +#line 2382 "src/parse/lex.cc" +yy378: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= '`') { if (yych <= '7') { if (yych <= ',') { - if (yych != '\n') goto yy357; + if (yych != '\n') goto yy380; } else { - if (yych <= '-') goto yy359; - if (yych <= '/') goto yy357; - if (yych <= '3') goto yy361; - goto yy363; + if (yych <= '-') goto yy382; + if (yych <= '/') goto yy380; + if (yych <= '3') goto yy384; + goto yy386; } } else { if (yych <= 'X') { - if (yych == 'U') goto yy364; - if (yych <= 'W') goto yy357; - goto yy366; + if (yych == 'U') goto yy387; + if (yych <= 'W') goto yy380; + goto yy389; } else { - if (yych <= '[') goto yy357; - if (yych <= '\\') goto yy367; - if (yych <= ']') goto yy369; - goto yy357; + if (yych <= '[') goto yy380; + if (yych <= '\\') goto yy390; + if (yych <= ']') goto yy392; + goto yy380; } } } else { if (yych <= 'q') { if (yych <= 'e') { - if (yych <= 'a') goto yy371; - if (yych <= 'b') goto yy373; - goto yy357; + if (yych <= 'a') goto yy394; + if (yych <= 'b') goto yy396; + goto yy380; } else { - if (yych <= 'f') goto yy375; - if (yych == 'n') goto yy377; - goto yy357; + if (yych <= 'f') goto yy398; + if (yych == 'n') goto yy400; + goto yy380; } } else { if (yych <= 'u') { - if (yych <= 'r') goto yy379; - if (yych <= 's') goto yy357; - if (yych <= 't') goto yy381; - goto yy366; + if (yych <= 'r') goto yy402; + if (yych <= 's') goto yy380; + if (yych <= 't') goto yy404; + goto yy389; } else { - if (yych <= 'v') goto yy383; - if (yych == 'x') goto yy385; - goto yy357; + if (yych <= 'v') goto yy406; + if (yych == 'x') goto yy408; + goto yy380; } } } -#line 584 "../src/parse/lex.re" +#line 606 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in escape sequence"); } -#line 2297 "src/parse/lex.cc" -yy357: +#line 2433 "src/parse/lex.cc" +yy380: ++YYCURSOR; -#line 599 "../src/parse/lex.re" +#line 621 "../src/parse/lex.re" { warn.useless_escape(tline, tok - pos, tok[1]); return static_cast(tok[1]); } -#line 2305 "src/parse/lex.cc" -yy359: +#line 2441 "src/parse/lex.cc" +yy382: ++YYCURSOR; -#line 597 "../src/parse/lex.re" +#line 619 "../src/parse/lex.re" { return static_cast('-'); } -#line 2310 "src/parse/lex.cc" -yy361: +#line 2446 "src/parse/lex.cc" +yy384: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy362; - if (yych <= '7') goto yy386; -yy362: -#line 583 "../src/parse/lex.re" + if (yych <= '/') goto yy385; + if (yych <= '7') goto yy409; +yy385: +#line 605 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); } -#line 2319 "src/parse/lex.cc" -yy363: +#line 2455 "src/parse/lex.cc" +yy386: yych = (YYCTYPE)*++YYCURSOR; - goto yy362; -yy364: + goto yy385; +yy387: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy365; - if (yych <= '9') goto yy388; + if (yych <= '/') goto yy388; + if (yych <= '9') goto yy411; } else { - if (yych <= 'F') goto yy388; - if (yych <= '`') goto yy365; - if (yych <= 'f') goto yy388; + if (yych <= 'F') goto yy411; + if (yych <= '`') goto yy388; + if (yych <= 'f') goto yy411; } -yy365: -#line 582 "../src/parse/lex.re" +yy388: +#line 604 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); } -#line 2337 "src/parse/lex.cc" -yy366: +#line 2473 "src/parse/lex.cc" +yy389: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy365; - if (yych <= '9') goto yy389; - goto yy365; + if (yych <= '/') goto yy388; + if (yych <= '9') goto yy412; + goto yy388; } else { - if (yych <= 'F') goto yy389; - if (yych <= '`') goto yy365; - if (yych <= 'f') goto yy389; - goto yy365; + if (yych <= 'F') goto yy412; + if (yych <= '`') goto yy388; + if (yych <= 'f') goto yy412; + goto yy388; } -yy367: +yy390: ++YYCURSOR; -#line 596 "../src/parse/lex.re" +#line 618 "../src/parse/lex.re" { return static_cast('\\'); } -#line 2355 "src/parse/lex.cc" -yy369: +#line 2491 "src/parse/lex.cc" +yy392: ++YYCURSOR; -#line 598 "../src/parse/lex.re" +#line 620 "../src/parse/lex.re" { return static_cast(']'); } -#line 2360 "src/parse/lex.cc" -yy371: +#line 2496 "src/parse/lex.cc" +yy394: ++YYCURSOR; -#line 589 "../src/parse/lex.re" +#line 611 "../src/parse/lex.re" { return static_cast('\a'); } -#line 2365 "src/parse/lex.cc" -yy373: +#line 2501 "src/parse/lex.cc" +yy396: ++YYCURSOR; -#line 590 "../src/parse/lex.re" +#line 612 "../src/parse/lex.re" { return static_cast('\b'); } -#line 2370 "src/parse/lex.cc" -yy375: +#line 2506 "src/parse/lex.cc" +yy398: ++YYCURSOR; -#line 591 "../src/parse/lex.re" +#line 613 "../src/parse/lex.re" { return static_cast('\f'); } -#line 2375 "src/parse/lex.cc" -yy377: +#line 2511 "src/parse/lex.cc" +yy400: ++YYCURSOR; -#line 592 "../src/parse/lex.re" +#line 614 "../src/parse/lex.re" { return static_cast('\n'); } -#line 2380 "src/parse/lex.cc" -yy379: +#line 2516 "src/parse/lex.cc" +yy402: ++YYCURSOR; -#line 593 "../src/parse/lex.re" +#line 615 "../src/parse/lex.re" { return static_cast('\r'); } -#line 2385 "src/parse/lex.cc" -yy381: +#line 2521 "src/parse/lex.cc" +yy404: ++YYCURSOR; -#line 594 "../src/parse/lex.re" +#line 616 "../src/parse/lex.re" { return static_cast('\t'); } -#line 2390 "src/parse/lex.cc" -yy383: +#line 2526 "src/parse/lex.cc" +yy406: ++YYCURSOR; -#line 595 "../src/parse/lex.re" +#line 617 "../src/parse/lex.re" { return static_cast('\v'); } -#line 2395 "src/parse/lex.cc" -yy385: +#line 2531 "src/parse/lex.cc" +yy408: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy365; - if (yych <= '9') goto yy390; - goto yy365; + if (yych <= '/') goto yy388; + if (yych <= '9') goto yy413; + goto yy388; } else { - if (yych <= 'F') goto yy390; - if (yych <= '`') goto yy365; - if (yych <= 'f') goto yy390; - goto yy365; + if (yych <= 'F') goto yy413; + if (yych <= '`') goto yy388; + if (yych <= 'f') goto yy413; + goto yy388; } -yy386: +yy409: yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '/') goto yy387; - if (yych <= '7') goto yy391; -yy387: + if (yych <= '/') goto yy410; + if (yych <= '7') goto yy414; +yy410: YYCURSOR = YYMARKER; if (yyaccept == 0) { - goto yy362; + goto yy385; } else { - goto yy365; + goto yy388; } -yy388: +yy411: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy387; - if (yych <= '9') goto yy393; - goto yy387; + if (yych <= '/') goto yy410; + if (yych <= '9') goto yy416; + goto yy410; } else { - if (yych <= 'F') goto yy393; - if (yych <= '`') goto yy387; - if (yych <= 'f') goto yy393; - goto yy387; + if (yych <= 'F') goto yy416; + if (yych <= '`') goto yy410; + if (yych <= 'f') goto yy416; + goto yy410; } -yy389: +yy412: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy387; - if (yych <= '9') goto yy394; - goto yy387; + if (yych <= '/') goto yy410; + if (yych <= '9') goto yy417; + goto yy410; } else { - if (yych <= 'F') goto yy394; - if (yych <= '`') goto yy387; - if (yych <= 'f') goto yy394; - goto yy387; + if (yych <= 'F') goto yy417; + if (yych <= '`') goto yy410; + if (yych <= 'f') goto yy417; + goto yy410; } -yy390: +yy413: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy387; - if (yych <= '9') goto yy395; - goto yy387; + if (yych <= '/') goto yy410; + if (yych <= '9') goto yy418; + goto yy410; } else { - if (yych <= 'F') goto yy395; - if (yych <= '`') goto yy387; - if (yych <= 'f') goto yy395; - goto yy387; + if (yych <= 'F') goto yy418; + if (yych <= '`') goto yy410; + if (yych <= 'f') goto yy418; + goto yy410; } -yy391: +yy414: ++YYCURSOR; -#line 588 "../src/parse/lex.re" +#line 610 "../src/parse/lex.re" { return unesc_oct(tok, cur); } -#line 2460 "src/parse/lex.cc" -yy393: +#line 2596 "src/parse/lex.cc" +yy416: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy387; - if (yych <= '9') goto yy397; - goto yy387; + if (yych <= '/') goto yy410; + if (yych <= '9') goto yy420; + goto yy410; } else { - if (yych <= 'F') goto yy397; - if (yych <= '`') goto yy387; - if (yych <= 'f') goto yy397; - goto yy387; + if (yych <= 'F') goto yy420; + if (yych <= '`') goto yy410; + if (yych <= 'f') goto yy420; + goto yy410; } -yy394: +yy417: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy387; - if (yych <= '9') goto yy390; - goto yy387; + if (yych <= '/') goto yy410; + if (yych <= '9') goto yy413; + goto yy410; } else { - if (yych <= 'F') goto yy390; - if (yych <= '`') goto yy387; - if (yych <= 'f') goto yy390; - goto yy387; + if (yych <= 'F') goto yy413; + if (yych <= '`') goto yy410; + if (yych <= 'f') goto yy413; + goto yy410; } -yy395: +yy418: ++YYCURSOR; -#line 587 "../src/parse/lex.re" +#line 609 "../src/parse/lex.re" { return unesc_hex(tok, cur); } -#line 2489 "src/parse/lex.cc" -yy397: +#line 2625 "src/parse/lex.cc" +yy420: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy387; - if (yych >= ':') goto yy387; + if (yych <= '/') goto yy410; + if (yych >= ':') goto yy410; } else { - if (yych <= 'F') goto yy398; - if (yych <= '`') goto yy387; - if (yych >= 'g') goto yy387; + if (yych <= 'F') goto yy421; + if (yych <= '`') goto yy410; + if (yych >= 'g') goto yy410; } -yy398: +yy421: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= '@') { - if (yych <= '/') goto yy387; - if (yych <= '9') goto yy389; - goto yy387; + if (yych <= '/') goto yy410; + if (yych <= '9') goto yy412; + goto yy410; } else { - if (yych <= 'F') goto yy389; - if (yych <= '`') goto yy387; - if (yych <= 'f') goto yy389; - goto yy387; + if (yych <= 'F') goto yy412; + if (yych <= '`') goto yy410; + if (yych <= 'f') goto yy412; + goto yy410; } } -#line 603 "../src/parse/lex.re" +#line 625 "../src/parse/lex.re" } @@ -2518,282 +2654,282 @@ uint32_t Scanner::lex_str_chr(char quote, bool &end) end = false; tok = cur; -#line 2522 "src/parse/lex.cc" +#line 2658 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy403; - if (yych == '\\') goto yy405; + if (yych == '\n') goto yy426; + if (yych == '\\') goto yy428; ++YYCURSOR; -#line 616 "../src/parse/lex.re" +#line 638 "../src/parse/lex.re" { end = tok[0] == quote; return static_cast(tok[0]); } -#line 2536 "src/parse/lex.cc" -yy403: +#line 2672 "src/parse/lex.cc" +yy426: ++YYCURSOR; -#line 611 "../src/parse/lex.re" +#line 633 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error"); } -#line 2541 "src/parse/lex.cc" -yy405: +#line 2677 "src/parse/lex.cc" +yy428: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= 'a') { if (yych <= 'T') { if (yych <= '/') { - if (yych != '\n') goto yy407; + if (yych != '\n') goto yy430; } else { - if (yych <= '3') goto yy409; - if (yych <= '7') goto yy411; - goto yy407; + if (yych <= '3') goto yy432; + if (yych <= '7') goto yy434; + goto yy430; } } else { if (yych <= 'X') { - if (yych <= 'U') goto yy412; - if (yych <= 'W') goto yy407; - goto yy414; + if (yych <= 'U') goto yy435; + if (yych <= 'W') goto yy430; + goto yy437; } else { - if (yych == '\\') goto yy415; - if (yych <= '`') goto yy407; - goto yy417; + if (yych == '\\') goto yy438; + if (yych <= '`') goto yy430; + goto yy440; } } } else { if (yych <= 'r') { if (yych <= 'f') { - if (yych <= 'b') goto yy419; - if (yych <= 'e') goto yy407; - goto yy421; + if (yych <= 'b') goto yy442; + if (yych <= 'e') goto yy430; + goto yy444; } else { - if (yych == 'n') goto yy423; - if (yych <= 'q') goto yy407; - goto yy425; + if (yych == 'n') goto yy446; + if (yych <= 'q') goto yy430; + goto yy448; } } else { if (yych <= 'u') { - if (yych <= 's') goto yy407; - if (yych <= 't') goto yy427; - goto yy414; + if (yych <= 's') goto yy430; + if (yych <= 't') goto yy450; + goto yy437; } else { - if (yych <= 'v') goto yy429; - if (yych == 'x') goto yy431; - goto yy407; + if (yych <= 'v') goto yy452; + if (yych == 'x') goto yy454; + goto yy430; } } } -#line 614 "../src/parse/lex.re" +#line 636 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in escape sequence"); } -#line 2589 "src/parse/lex.cc" -yy407: +#line 2725 "src/parse/lex.cc" +yy430: ++YYCURSOR; -#line 630 "../src/parse/lex.re" +#line 652 "../src/parse/lex.re" { if (tok[1] != quote) { warn.useless_escape(tline, tok - pos, tok[1]); } return static_cast(tok[1]); } -#line 2599 "src/parse/lex.cc" -yy409: +#line 2735 "src/parse/lex.cc" +yy432: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy410; - if (yych <= '7') goto yy432; -yy410: -#line 613 "../src/parse/lex.re" + if (yych <= '/') goto yy433; + if (yych <= '7') goto yy455; +yy433: +#line 635 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); } -#line 2608 "src/parse/lex.cc" -yy411: +#line 2744 "src/parse/lex.cc" +yy434: yych = (YYCTYPE)*++YYCURSOR; - goto yy410; -yy412: + goto yy433; +yy435: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy413; - if (yych <= '9') goto yy434; + if (yych <= '/') goto yy436; + if (yych <= '9') goto yy457; } else { - if (yych <= 'F') goto yy434; - if (yych <= '`') goto yy413; - if (yych <= 'f') goto yy434; + if (yych <= 'F') goto yy457; + if (yych <= '`') goto yy436; + if (yych <= 'f') goto yy457; } -yy413: -#line 612 "../src/parse/lex.re" +yy436: +#line 634 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); } -#line 2626 "src/parse/lex.cc" -yy414: +#line 2762 "src/parse/lex.cc" +yy437: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy413; - if (yych <= '9') goto yy435; - goto yy413; + if (yych <= '/') goto yy436; + if (yych <= '9') goto yy458; + goto yy436; } else { - if (yych <= 'F') goto yy435; - if (yych <= '`') goto yy413; - if (yych <= 'f') goto yy435; - goto yy413; + if (yych <= 'F') goto yy458; + if (yych <= '`') goto yy436; + if (yych <= 'f') goto yy458; + goto yy436; } -yy415: +yy438: ++YYCURSOR; -#line 629 "../src/parse/lex.re" +#line 651 "../src/parse/lex.re" { return static_cast('\\'); } -#line 2644 "src/parse/lex.cc" -yy417: +#line 2780 "src/parse/lex.cc" +yy440: ++YYCURSOR; -#line 622 "../src/parse/lex.re" +#line 644 "../src/parse/lex.re" { return static_cast('\a'); } -#line 2649 "src/parse/lex.cc" -yy419: +#line 2785 "src/parse/lex.cc" +yy442: ++YYCURSOR; -#line 623 "../src/parse/lex.re" +#line 645 "../src/parse/lex.re" { return static_cast('\b'); } -#line 2654 "src/parse/lex.cc" -yy421: +#line 2790 "src/parse/lex.cc" +yy444: ++YYCURSOR; -#line 624 "../src/parse/lex.re" +#line 646 "../src/parse/lex.re" { return static_cast('\f'); } -#line 2659 "src/parse/lex.cc" -yy423: +#line 2795 "src/parse/lex.cc" +yy446: ++YYCURSOR; -#line 625 "../src/parse/lex.re" +#line 647 "../src/parse/lex.re" { return static_cast('\n'); } -#line 2664 "src/parse/lex.cc" -yy425: +#line 2800 "src/parse/lex.cc" +yy448: ++YYCURSOR; -#line 626 "../src/parse/lex.re" +#line 648 "../src/parse/lex.re" { return static_cast('\r'); } -#line 2669 "src/parse/lex.cc" -yy427: +#line 2805 "src/parse/lex.cc" +yy450: ++YYCURSOR; -#line 627 "../src/parse/lex.re" +#line 649 "../src/parse/lex.re" { return static_cast('\t'); } -#line 2674 "src/parse/lex.cc" -yy429: +#line 2810 "src/parse/lex.cc" +yy452: ++YYCURSOR; -#line 628 "../src/parse/lex.re" +#line 650 "../src/parse/lex.re" { return static_cast('\v'); } -#line 2679 "src/parse/lex.cc" -yy431: +#line 2815 "src/parse/lex.cc" +yy454: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy413; - if (yych <= '9') goto yy436; - goto yy413; + if (yych <= '/') goto yy436; + if (yych <= '9') goto yy459; + goto yy436; } else { - if (yych <= 'F') goto yy436; - if (yych <= '`') goto yy413; - if (yych <= 'f') goto yy436; - goto yy413; + if (yych <= 'F') goto yy459; + if (yych <= '`') goto yy436; + if (yych <= 'f') goto yy459; + goto yy436; } -yy432: +yy455: yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '/') goto yy433; - if (yych <= '7') goto yy437; -yy433: + if (yych <= '/') goto yy456; + if (yych <= '7') goto yy460; +yy456: YYCURSOR = YYMARKER; if (yyaccept == 0) { - goto yy410; + goto yy433; } else { - goto yy413; + goto yy436; } -yy434: +yy457: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy433; - if (yych <= '9') goto yy439; - goto yy433; + if (yych <= '/') goto yy456; + if (yych <= '9') goto yy462; + goto yy456; } else { - if (yych <= 'F') goto yy439; - if (yych <= '`') goto yy433; - if (yych <= 'f') goto yy439; - goto yy433; + if (yych <= 'F') goto yy462; + if (yych <= '`') goto yy456; + if (yych <= 'f') goto yy462; + goto yy456; } -yy435: +yy458: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy433; - if (yych <= '9') goto yy440; - goto yy433; + if (yych <= '/') goto yy456; + if (yych <= '9') goto yy463; + goto yy456; } else { - if (yych <= 'F') goto yy440; - if (yych <= '`') goto yy433; - if (yych <= 'f') goto yy440; - goto yy433; + if (yych <= 'F') goto yy463; + if (yych <= '`') goto yy456; + if (yych <= 'f') goto yy463; + goto yy456; } -yy436: +yy459: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy433; - if (yych <= '9') goto yy441; - goto yy433; + if (yych <= '/') goto yy456; + if (yych <= '9') goto yy464; + goto yy456; } else { - if (yych <= 'F') goto yy441; - if (yych <= '`') goto yy433; - if (yych <= 'f') goto yy441; - goto yy433; + if (yych <= 'F') goto yy464; + if (yych <= '`') goto yy456; + if (yych <= 'f') goto yy464; + goto yy456; } -yy437: +yy460: ++YYCURSOR; -#line 621 "../src/parse/lex.re" +#line 643 "../src/parse/lex.re" { return unesc_oct(tok, cur); } -#line 2744 "src/parse/lex.cc" -yy439: +#line 2880 "src/parse/lex.cc" +yy462: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy433; - if (yych <= '9') goto yy443; - goto yy433; + if (yych <= '/') goto yy456; + if (yych <= '9') goto yy466; + goto yy456; } else { - if (yych <= 'F') goto yy443; - if (yych <= '`') goto yy433; - if (yych <= 'f') goto yy443; - goto yy433; + if (yych <= 'F') goto yy466; + if (yych <= '`') goto yy456; + if (yych <= 'f') goto yy466; + goto yy456; } -yy440: +yy463: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy433; - if (yych <= '9') goto yy436; - goto yy433; + if (yych <= '/') goto yy456; + if (yych <= '9') goto yy459; + goto yy456; } else { - if (yych <= 'F') goto yy436; - if (yych <= '`') goto yy433; - if (yych <= 'f') goto yy436; - goto yy433; + if (yych <= 'F') goto yy459; + if (yych <= '`') goto yy456; + if (yych <= 'f') goto yy459; + goto yy456; } -yy441: +yy464: ++YYCURSOR; -#line 620 "../src/parse/lex.re" +#line 642 "../src/parse/lex.re" { return unesc_hex(tok, cur); } -#line 2773 "src/parse/lex.cc" -yy443: +#line 2909 "src/parse/lex.cc" +yy466: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy433; - if (yych >= ':') goto yy433; + if (yych <= '/') goto yy456; + if (yych >= ':') goto yy456; } else { - if (yych <= 'F') goto yy444; - if (yych <= '`') goto yy433; - if (yych >= 'g') goto yy433; + if (yych <= 'F') goto yy467; + if (yych <= '`') goto yy456; + if (yych >= 'g') goto yy456; } -yy444: +yy467: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= '@') { - if (yych <= '/') goto yy433; - if (yych <= '9') goto yy435; - goto yy433; + if (yych <= '/') goto yy456; + if (yych <= '9') goto yy458; + goto yy456; } else { - if (yych <= 'F') goto yy435; - if (yych <= '`') goto yy433; - if (yych <= 'f') goto yy435; - goto yy433; + if (yych <= 'F') goto yy458; + if (yych <= '`') goto yy456; + if (yych <= 'f') goto yy458; + goto yy456; } } -#line 636 "../src/parse/lex.re" +#line 658 "../src/parse/lex.re" } @@ -2814,7 +2950,7 @@ void Scanner::set_sourceline () sourceline: tok = cur; -#line 2818 "src/parse/lex.cc" +#line 2954 "src/parse/lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -2854,23 +2990,23 @@ sourceline: if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yych <= '!') { - if (yych == '\n') goto yy449; + if (yych == '\n') goto yy472; } else { - if (yych <= '"') goto yy451; - if (yych <= '0') goto yy447; - if (yych <= '9') goto yy452; + if (yych <= '"') goto yy474; + if (yych <= '0') goto yy470; + if (yych <= '9') goto yy475; } -yy447: +yy470: ++YYCURSOR; -yy448: -#line 679 "../src/parse/lex.re" +yy471: +#line 701 "../src/parse/lex.re" { goto sourceline; } -#line 2871 "src/parse/lex.cc" -yy449: +#line 3007 "src/parse/lex.cc" +yy472: ++YYCURSOR; -#line 667 "../src/parse/lex.re" +#line 689 "../src/parse/lex.re" { if (cur == eof) { @@ -2883,19 +3019,19 @@ yy449: tok = cur; return; } -#line 2887 "src/parse/lex.cc" -yy451: +#line 3023 "src/parse/lex.cc" +yy474: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == '\n') goto yy448; - goto yy456; -yy452: + if (yych == '\n') goto yy471; + goto yy479; +yy475: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 64) { - goto yy452; + goto yy475; } -#line 656 "../src/parse/lex.re" +#line 678 "../src/parse/lex.re" { if (!s_to_u32_unsafe (tok, cur, cline)) { @@ -2903,37 +3039,37 @@ yy452: } goto sourceline; } -#line 2907 "src/parse/lex.cc" -yy455: +#line 3043 "src/parse/lex.cc" +yy478: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; -yy456: +yy479: if (yybm[0+yych] & 128) { - goto yy455; + goto yy478; } - if (yych <= '\n') goto yy457; - if (yych <= '"') goto yy458; - goto yy460; -yy457: + if (yych <= '\n') goto yy480; + if (yych <= '"') goto yy481; + goto yy483; +yy480: YYCURSOR = YYMARKER; - goto yy448; -yy458: + goto yy471; +yy481: ++YYCURSOR; -#line 663 "../src/parse/lex.re" +#line 685 "../src/parse/lex.re" { escape (in.file_name, std::string (tok + 1, tok_len () - 2)); // -2 to omit quotes goto sourceline; } -#line 2929 "src/parse/lex.cc" -yy460: +#line 3065 "src/parse/lex.cc" +yy483: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy457; - goto yy455; + if (yych == '\n') goto yy480; + goto yy478; } -#line 682 "../src/parse/lex.re" +#line 704 "../src/parse/lex.re" } diff --git a/re2c/bootstrap/src/parse/lex_conf.cc b/re2c/bootstrap/src/parse/lex_conf.cc index 851a4dda..dc04017e 100644 --- a/re2c/bootstrap/src/parse/lex_conf.cc +++ b/re2c/bootstrap/src/parse/lex_conf.cc @@ -1,4 +1,4 @@ -/* Generated by re2c 0.16 on Sat Apr 2 11:23:34 2016 */ +/* Generated by re2c 0.16 on Sat Apr 2 18:14:17 2016 */ #line 1 "../src/parse/lex_conf.re" #include "src/util/c99_stdint.h" #include @@ -14,7 +14,7 @@ namespace re2c { // global re2c config (affects the whole file) -#line 38 "../src/parse/lex_conf.re" +#line 36 "../src/parse/lex_conf.re" void Scanner::lex_conf () @@ -75,7 +75,7 @@ void Scanner::lex_conf () yy2: ++cur; yy3: -#line 44 "../src/parse/lex_conf.re" +#line 42 "../src/parse/lex_conf.re" { fatal ((tok - pos) - tchar, "unrecognized configuration"); } #line 81 "src/parse/lex_conf.cc" yy4: @@ -489,7 +489,7 @@ yy85: goto yy13; yy86: ++cur; -#line 47 "../src/parse/lex_conf.re" +#line 45 "../src/parse/lex_conf.re" { Enc::type_t enc = Enc::ASCII; switch (cur[-1]) @@ -629,7 +629,7 @@ yy113: goto yy13; yy114: ++cur; -#line 97 "../src/parse/lex_conf.re" +#line 95 "../src/parse/lex_conf.re" { opts.set_yybmHexTable (lex_conf_number () != 0); return; } #line 635 "src/parse/lex_conf.cc" yy116: @@ -665,7 +665,7 @@ yy123: yych = (unsigned char)*(ptr = ++cur); if (yych == '@') goto yy146; yy124: -#line 81 "../src/parse/lex_conf.re" +#line 79 "../src/parse/lex_conf.re" { opts.set_condGoto (lex_conf_string ()); return; } #line 671 "src/parse/lex_conf.cc" yy125: @@ -738,7 +738,7 @@ yy138: goto yy13; yy139: ++cur; -#line 145 "../src/parse/lex_conf.re" +#line 143 "../src/parse/lex_conf.re" { opts.set_bEmitYYCh (lex_conf_number () != 0); return; } #line 744 "src/parse/lex_conf.cc" yy141: @@ -771,7 +771,7 @@ yy147: goto yy13; yy148: ++cur; -#line 77 "../src/parse/lex_conf.re" +#line 75 "../src/parse/lex_conf.re" { opts.set_condPrefix (lex_conf_string ()); return; } #line 777 "src/parse/lex_conf.cc" yy150: @@ -837,7 +837,7 @@ yy162: goto yy13; yy163: ++cur; -#line 130 "../src/parse/lex_conf.re" +#line 128 "../src/parse/lex_conf.re" { const int32_t n = lex_conf_number (); if (n < 0) @@ -869,7 +869,7 @@ yy168: } if (yych == '=') goto yy205; yy169: -#line 158 "../src/parse/lex_conf.re" +#line 156 "../src/parse/lex_conf.re" { out.set_user_start_label (lex_conf_string ()); return; } #line 875 "src/parse/lex_conf.cc" yy170: @@ -1000,7 +1000,7 @@ yy200: goto yy13; yy201: ++cur; -#line 154 "../src/parse/lex_conf.re" +#line 152 "../src/parse/lex_conf.re" { opts.set_labelPrefix (lex_conf_string ()); return; } #line 1006 "src/parse/lex_conf.cc" yy203: @@ -1035,7 +1035,7 @@ yy205: } yy207: ++cur; -#line 92 "../src/parse/lex_conf.re" +#line 90 "../src/parse/lex_conf.re" { opts.set_bUseStateAbort (lex_conf_number () != 0); return; } #line 1041 "src/parse/lex_conf.cc" yy209: @@ -1080,7 +1080,7 @@ yy216: yych = (unsigned char)*(ptr = ++cur); if (yych == '@') goto yy260; yy217: -#line 79 "../src/parse/lex_conf.re" +#line 77 "../src/parse/lex_conf.re" { opts.set_condDivider (lex_conf_string ()); return; } #line 1086 "src/parse/lex_conf.cc" yy218: @@ -1112,7 +1112,7 @@ yy224: yych = (unsigned char)*(ptr = ++cur); if (yych == 'M') goto yy268; yy225: -#line 122 "../src/parse/lex_conf.re" +#line 120 "../src/parse/lex_conf.re" { opts.set_yyctx (lex_conf_string ()); return; } #line 1118 "src/parse/lex_conf.cc" yy226: @@ -1179,7 +1179,7 @@ yy240: goto yy13; yy241: ++cur; -#line 91 "../src/parse/lex_conf.re" +#line 89 "../src/parse/lex_conf.re" { opts.set_yynext (lex_conf_string ()); return; } #line 1185 "src/parse/lex_conf.cc" yy243: @@ -1191,7 +1191,7 @@ yy244: ++cur; yy245: cur = ctx; -#line 157 "../src/parse/lex_conf.re" +#line 155 "../src/parse/lex_conf.re" { out.set_force_start_label (lex_conf_number () != 0); return; } #line 1197 "src/parse/lex_conf.cc" yy246: @@ -1233,7 +1233,7 @@ yy254: goto yy13; yy255: ++cur; -#line 152 "../src/parse/lex_conf.re" +#line 150 "../src/parse/lex_conf.re" { opts.set_fill_check (lex_conf_number () != 0); return; } #line 1239 "src/parse/lex_conf.cc" yy257: @@ -1262,7 +1262,7 @@ yy262: goto yy13; yy263: ++cur; -#line 126 "../src/parse/lex_conf.re" +#line 124 "../src/parse/lex_conf.re" { opts.set_contexts_expr (lex_conf_string ()); return; } #line 1268 "src/parse/lex_conf.cc" yy265: @@ -1295,7 +1295,7 @@ yy271: goto yy13; yy272: ++cur; -#line 123 "../src/parse/lex_conf.re" +#line 121 "../src/parse/lex_conf.re" { opts.set_yydist (lex_conf_string ()); return; } #line 1301 "src/parse/lex_conf.cc" yy274: @@ -1304,7 +1304,7 @@ yy274: if (yych == ':') goto yy319; if (yych == '@') goto yy320; yy275: -#line 147 "../src/parse/lex_conf.re" +#line 145 "../src/parse/lex_conf.re" { opts.set_fill (lex_conf_string ()); return; } #line 1310 "src/parse/lex_conf.cc" yy276: @@ -1329,7 +1329,7 @@ yy280: goto yy13; yy281: ++cur; -#line 115 "../src/parse/lex_conf.re" +#line 113 "../src/parse/lex_conf.re" { opts.set_yypeek (lex_conf_string ()); return; } #line 1335 "src/parse/lex_conf.cc" yy283: @@ -1346,12 +1346,12 @@ yy285: goto yy13; yy286: ++cur; -#line 116 "../src/parse/lex_conf.re" +#line 114 "../src/parse/lex_conf.re" { opts.set_yyskip (lex_conf_string ()); return; } #line 1352 "src/parse/lex_conf.cc" yy288: ++cur; -#line 128 "../src/parse/lex_conf.re" +#line 126 "../src/parse/lex_conf.re" { opts.set_indString (lex_conf_string ()); return; } #line 1357 "src/parse/lex_conf.cc" yy290: @@ -1368,12 +1368,12 @@ yy292: goto yy13; yy293: ++cur; -#line 96 "../src/parse/lex_conf.re" +#line 94 "../src/parse/lex_conf.re" { opts.set_yybm (lex_conf_string ()); return; } #line 1374 "src/parse/lex_conf.cc" yy295: ++cur; -#line 143 "../src/parse/lex_conf.re" +#line 141 "../src/parse/lex_conf.re" { opts.set_yych (lex_conf_string ()); return; } #line 1379 "src/parse/lex_conf.cc" yy297: @@ -1394,7 +1394,7 @@ yy300: goto yy13; yy301: ++cur; -#line 148 "../src/parse/lex_conf.re" +#line 146 "../src/parse/lex_conf.re" { opts.set_fill_use (lex_conf_number () != 0); return; } #line 1400 "src/parse/lex_conf.cc" yy303: @@ -1411,12 +1411,12 @@ yy305: goto yy13; yy306: ++cur; -#line 82 "../src/parse/lex_conf.re" +#line 80 "../src/parse/lex_conf.re" { opts.set_condGotoParam (lex_conf_string ()); return; } #line 1417 "src/parse/lex_conf.cc" yy308: ++cur; -#line 78 "../src/parse/lex_conf.re" +#line 76 "../src/parse/lex_conf.re" { opts.set_condEnumPrefix (lex_conf_string ()); return; } #line 1422 "src/parse/lex_conf.cc" yy310: @@ -1437,7 +1437,7 @@ yy313: goto yy13; yy314: ++cur; -#line 142 "../src/parse/lex_conf.re" +#line 140 "../src/parse/lex_conf.re" { opts.set_yyctype (lex_conf_string ()); return; } #line 1443 "src/parse/lex_conf.cc" yy316: @@ -1446,7 +1446,7 @@ yy316: goto yy13; yy317: ++cur; -#line 140 "../src/parse/lex_conf.re" +#line 138 "../src/parse/lex_conf.re" { opts.set_yydebug (lex_conf_string ()); return; } #line 1452 "src/parse/lex_conf.cc" yy319: @@ -1471,7 +1471,7 @@ yy323: goto yy13; yy324: ++cur; -#line 113 "../src/parse/lex_conf.re" +#line 111 "../src/parse/lex_conf.re" { opts.set_yylimit (lex_conf_string ()); return; } #line 1477 "src/parse/lex_conf.cc" yy326: @@ -1524,7 +1524,7 @@ yy337: goto yy13; yy338: ++cur; -#line 99 "../src/parse/lex_conf.re" +#line 97 "../src/parse/lex_conf.re" { const int32_t n = lex_conf_number (); if (n < 0) @@ -1541,7 +1541,7 @@ yy340: goto yy13; yy341: ++cur; -#line 125 "../src/parse/lex_conf.re" +#line 123 "../src/parse/lex_conf.re" { opts.set_contexts_prefix(lex_conf_string ()); return; } #line 1547 "src/parse/lex_conf.cc" yy343: @@ -1549,7 +1549,7 @@ yy343: yych = (unsigned char)*(ptr = ++cur); if (yych == 'C') goto yy370; yy344: -#line 117 "../src/parse/lex_conf.re" +#line 115 "../src/parse/lex_conf.re" { opts.set_yybackup (lex_conf_string ()); return; } #line 1555 "src/parse/lex_conf.cc" yy345: @@ -1562,7 +1562,7 @@ yy346: goto yy13; yy347: ++cur; -#line 110 "../src/parse/lex_conf.re" +#line 108 "../src/parse/lex_conf.re" { opts.set_yycursor (lex_conf_string ()); return; } #line 1568 "src/parse/lex_conf.cc" yy349: @@ -1587,7 +1587,7 @@ yy353: goto yy13; yy354: ++cur; -#line 111 "../src/parse/lex_conf.re" +#line 109 "../src/parse/lex_conf.re" { opts.set_yymarker (lex_conf_string ()); return; } #line 1593 "src/parse/lex_conf.cc" yy356: @@ -1608,7 +1608,7 @@ yy359: goto yy13; yy360: ++cur; -#line 93 "../src/parse/lex_conf.re" +#line 91 "../src/parse/lex_conf.re" { opts.set_bUseStateNext (lex_conf_number () != 0); return; } #line 1614 "src/parse/lex_conf.cc" yy362: @@ -1629,7 +1629,7 @@ yy365: goto yy13; yy366: ++cur; -#line 144 "../src/parse/lex_conf.re" +#line 142 "../src/parse/lex_conf.re" { opts.set_yychConversion (lex_conf_number () != 0); return; } #line 1635 "src/parse/lex_conf.cc" yy368: @@ -1677,7 +1677,7 @@ yy378: yych = (unsigned char)*(ptr = ++cur); if (yych == 'C') goto yy403; yy379: -#line 119 "../src/parse/lex_conf.re" +#line 117 "../src/parse/lex_conf.re" { opts.set_yyrestore (lex_conf_string ()); return; } #line 1683 "src/parse/lex_conf.cc" yy380: @@ -1710,12 +1710,12 @@ yy386: goto yy13; yy387: ++cur; -#line 150 "../src/parse/lex_conf.re" +#line 148 "../src/parse/lex_conf.re" { opts.set_fill_arg_use (lex_conf_number () != 0); return; } #line 1716 "src/parse/lex_conf.cc" yy389: ++cur; -#line 80 "../src/parse/lex_conf.re" +#line 78 "../src/parse/lex_conf.re" { opts.set_condDividerParam (lex_conf_string ()); return; } #line 1721 "src/parse/lex_conf.cc" yy391: @@ -1724,7 +1724,7 @@ yy391: goto yy13; yy392: ++cur; -#line 71 "../src/parse/lex_conf.re" +#line 69 "../src/parse/lex_conf.re" { opts.set_yycondtype (lex_conf_string ()); return; } #line 1730 "src/parse/lex_conf.cc" yy394: @@ -1737,7 +1737,7 @@ yy395: goto yy13; yy396: ++cur; -#line 149 "../src/parse/lex_conf.re" +#line 147 "../src/parse/lex_conf.re" { opts.set_fill_arg (lex_conf_string ()); return; } #line 1743 "src/parse/lex_conf.cc" yy398: @@ -1749,12 +1749,12 @@ yy399: yych = (unsigned char)*(ptr = ++cur); if (yych == ':') goto yy423; yy400: -#line 85 "../src/parse/lex_conf.re" +#line 83 "../src/parse/lex_conf.re" { opts.set_state_get (lex_conf_string ()); return; } #line 1755 "src/parse/lex_conf.cc" yy401: ++cur; -#line 121 "../src/parse/lex_conf.re" +#line 119 "../src/parse/lex_conf.re" { opts.set_yylessthan (lex_conf_string ()); return; } #line 1760 "src/parse/lex_conf.cc" yy403: @@ -1771,42 +1771,42 @@ yy405: if (yych == ':') goto yy426; if (yych == '@') goto yy427; yy406: -#line 87 "../src/parse/lex_conf.re" +#line 85 "../src/parse/lex_conf.re" { opts.set_state_set (lex_conf_string ()); return; } #line 1777 "src/parse/lex_conf.cc" yy407: ++cur; -#line 90 "../src/parse/lex_conf.re" +#line 88 "../src/parse/lex_conf.re" { opts.set_yyfilllabel (lex_conf_string ()); return; } #line 1782 "src/parse/lex_conf.cc" yy409: ++cur; -#line 94 "../src/parse/lex_conf.re" +#line 92 "../src/parse/lex_conf.re" { opts.set_yyaccept (lex_conf_string ()); return; } #line 1787 "src/parse/lex_conf.cc" yy411: ++cur; -#line 83 "../src/parse/lex_conf.re" +#line 81 "../src/parse/lex_conf.re" { opts.set_yyctable (lex_conf_string ()); return; } #line 1792 "src/parse/lex_conf.cc" yy413: ++cur; -#line 161 "../src/parse/lex_conf.re" +#line 159 "../src/parse/lex_conf.re" { lex_conf_string (); return; } #line 1797 "src/parse/lex_conf.cc" yy415: ++cur; -#line 108 "../src/parse/lex_conf.re" +#line 106 "../src/parse/lex_conf.re" { opts.set_yytarget (lex_conf_string ()); return; } #line 1802 "src/parse/lex_conf.cc" yy417: ++cur; -#line 118 "../src/parse/lex_conf.re" +#line 116 "../src/parse/lex_conf.re" { opts.set_yybackupctx (lex_conf_string ()); return; } #line 1807 "src/parse/lex_conf.cc" yy419: ++cur; -#line 112 "../src/parse/lex_conf.re" +#line 110 "../src/parse/lex_conf.re" { opts.set_yyctxmarker (lex_conf_string ()); return; } #line 1812 "src/parse/lex_conf.cc" yy421: @@ -1839,7 +1839,7 @@ yy427: goto yy13; yy428: ++cur; -#line 151 "../src/parse/lex_conf.re" +#line 149 "../src/parse/lex_conf.re" { opts.set_fill_naked (lex_conf_number () != 0); return; } #line 1845 "src/parse/lex_conf.cc" yy430: @@ -1852,7 +1852,7 @@ yy431: goto yy13; yy432: ++cur; -#line 120 "../src/parse/lex_conf.re" +#line 118 "../src/parse/lex_conf.re" { opts.set_yyrestorectx (lex_conf_string ()); return; } #line 1858 "src/parse/lex_conf.cc" yy434: @@ -1892,7 +1892,7 @@ yy442: yych = (unsigned char)*(ptr = ++cur); if (yych == ':') goto yy449; yy443: -#line 72 "../src/parse/lex_conf.re" +#line 70 "../src/parse/lex_conf.re" { opts.set_cond_get (lex_conf_string ()); return; } #line 1898 "src/parse/lex_conf.cc" yy444: @@ -1905,7 +1905,7 @@ yy445: if (yych == ':') goto yy451; if (yych == '@') goto yy452; yy446: -#line 74 "../src/parse/lex_conf.re" +#line 72 "../src/parse/lex_conf.re" { opts.set_cond_set (lex_conf_string ()); return; } #line 1911 "src/parse/lex_conf.cc" yy447: @@ -1946,7 +1946,7 @@ yy455: goto yy13; yy456: ++cur; -#line 86 "../src/parse/lex_conf.re" +#line 84 "../src/parse/lex_conf.re" { opts.set_state_get_naked (lex_conf_number () != 0); return; } #line 1952 "src/parse/lex_conf.cc" yy458: @@ -1959,12 +1959,12 @@ yy459: goto yy13; yy460: ++cur; -#line 88 "../src/parse/lex_conf.re" +#line 86 "../src/parse/lex_conf.re" { opts.set_state_set_naked (lex_conf_number () != 0); return; } #line 1965 "src/parse/lex_conf.cc" yy462: ++cur; -#line 89 "../src/parse/lex_conf.re" +#line 87 "../src/parse/lex_conf.re" { opts.set_state_set_arg (lex_conf_string ()); return; } #line 1970 "src/parse/lex_conf.cc" yy464: @@ -2001,159 +2001,28 @@ yy471: goto yy13; yy472: ++cur; -#line 75 "../src/parse/lex_conf.re" +#line 73 "../src/parse/lex_conf.re" { opts.set_cond_set_arg (lex_conf_string ()); return; } #line 2007 "src/parse/lex_conf.cc" yy474: ++cur; -#line 73 "../src/parse/lex_conf.re" +#line 71 "../src/parse/lex_conf.re" { opts.set_cond_get_naked (lex_conf_number () != 0); return; } #line 2012 "src/parse/lex_conf.cc" yy476: ++cur; -#line 76 "../src/parse/lex_conf.re" +#line 74 "../src/parse/lex_conf.re" { opts.set_cond_set_naked (lex_conf_number () != 0); return; } #line 2017 "src/parse/lex_conf.cc" } -#line 162 "../src/parse/lex_conf.re" +#line 160 "../src/parse/lex_conf.re" } -void Scanner::lex_conf_contexts(ConfContexts &conf) -{ - for (;;) { - -#line 2027 "src/parse/lex_conf.cc" -{ - unsigned char yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 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, 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 ((lim - cur) < 4) fill(4); - yych = (unsigned char)*cur; - if (yybm[0+yych] & 128) { - goto yy482; - } - if (yych <= ')') { - if (yych <= '\n') { - if (yych >= '\t') goto yy485; - } else { - if (yych == '\r') goto yy487; - } - } else { - if (yych <= 'l') { - if (yych <= '*') goto yy488; - if (yych >= 'l') goto yy489; - } else { - if (yych == 's') goto yy490; - } - } - ++cur; -yy481: -#line 169 "../src/parse/lex_conf.re" - { fatal("unrecognized configuration"); } -#line 2087 "src/parse/lex_conf.cc" -yy482: - ++cur; - if (lim <= cur) fill(1); - yych = (unsigned char)*cur; - if (yybm[0+yych] & 128) { - goto yy482; - } -#line 171 "../src/parse/lex_conf.re" - { continue; } -#line 2097 "src/parse/lex_conf.cc" -yy485: - ++cur; -#line 172 "../src/parse/lex_conf.re" - { ++cline; continue; } -#line 2102 "src/parse/lex_conf.cc" -yy487: - yych = (unsigned char)*++cur; - if (yych == '\n') goto yy485; - goto yy481; -yy488: - yych = (unsigned char)*++cur; - if (yych == '/') goto yy491; - goto yy481; -yy489: - yych = (unsigned char)*(ptr = ++cur); - if (yych == 'i') goto yy493; - goto yy481; -yy490: - yych = (unsigned char)*(ptr = ++cur); - if (yych == 'e') goto yy495; - goto yy481; -yy491: - ++cur; -#line 173 "../src/parse/lex_conf.re" - { return; } -#line 2123 "src/parse/lex_conf.cc" -yy493: - yych = (unsigned char)*++cur; - if (yych == 'n') goto yy496; -yy494: - cur = ptr; - goto yy481; -yy495: - yych = (unsigned char)*++cur; - if (yych == 'p') goto yy497; - goto yy494; -yy496: - yych = (unsigned char)*++cur; - if (yych == 'e') goto yy499; - goto yy494; -yy497: - ++cur; -#line 176 "../src/parse/lex_conf.re" - { conf.sep = lex_conf_string(); continue; } -#line 2142 "src/parse/lex_conf.cc" -yy499: - ++cur; -#line 175 "../src/parse/lex_conf.re" - { conf.line = lex_conf_string(); continue; } -#line 2147 "src/parse/lex_conf.cc" -} -#line 177 "../src/parse/lex_conf.re" - - } -} - void Scanner::lex_conf_assign () { -#line 2157 "src/parse/lex_conf.cc" +#line 2026 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -2193,56 +2062,56 @@ void Scanner::lex_conf_assign () if ((lim - cur) < 2) fill(2); yych = (unsigned char)*cur; if (yych <= 0x1F) { - if (yych == '\t') goto yy505; + if (yych == '\t') goto yy482; } else { - if (yych <= ' ') goto yy505; - if (yych == '=') goto yy506; + if (yych <= ' ') goto yy482; + if (yych == '=') goto yy483; } ++cur; -yy504: -#line 184 "../src/parse/lex_conf.re" +yy481: +#line 166 "../src/parse/lex_conf.re" { fatal ("missing '=' in configuration"); } -#line 2206 "src/parse/lex_conf.cc" -yy505: +#line 2075 "src/parse/lex_conf.cc" +yy482: yych = (unsigned char)*(ptr = ++cur); if (yych <= 0x1F) { - if (yych == '\t') goto yy509; - goto yy504; + if (yych == '\t') goto yy486; + goto yy481; } else { - if (yych <= ' ') goto yy509; - if (yych != '=') goto yy504; + if (yych <= ' ') goto yy486; + if (yych != '=') goto yy481; } -yy506: +yy483: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yybm[0+yych] & 128) { - goto yy506; + goto yy483; } -#line 185 "../src/parse/lex_conf.re" +#line 167 "../src/parse/lex_conf.re" { return; } -#line 2225 "src/parse/lex_conf.cc" -yy509: +#line 2094 "src/parse/lex_conf.cc" +yy486: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yych <= 0x1F) { - if (yych == '\t') goto yy509; + if (yych == '\t') goto yy486; } else { - if (yych <= ' ') goto yy509; - if (yych == '=') goto yy506; + if (yych <= ' ') goto yy486; + if (yych == '=') goto yy483; } cur = ptr; - goto yy504; + goto yy481; } -#line 186 "../src/parse/lex_conf.re" +#line 168 "../src/parse/lex_conf.re" } void Scanner::lex_conf_semicolon () { -#line 2246 "src/parse/lex_conf.cc" +#line 2115 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -2282,39 +2151,39 @@ void Scanner::lex_conf_semicolon () if ((lim - cur) < 2) fill(2); yych = (unsigned char)*cur; if (yych <= 0x1F) { - if (yych == '\t') goto yy516; + if (yych == '\t') goto yy493; } else { - if (yych <= ' ') goto yy516; - if (yych == ';') goto yy517; + if (yych <= ' ') goto yy493; + if (yych == ';') goto yy494; } ++cur; -yy515: -#line 192 "../src/parse/lex_conf.re" +yy492: +#line 174 "../src/parse/lex_conf.re" { fatal ("missing ending ';' in configuration"); } -#line 2295 "src/parse/lex_conf.cc" -yy516: +#line 2164 "src/parse/lex_conf.cc" +yy493: yych = (unsigned char)*(ptr = ++cur); if (yybm[0+yych] & 128) { - goto yy519; + goto yy496; } - if (yych != ';') goto yy515; -yy517: + if (yych != ';') goto yy492; +yy494: ++cur; -#line 193 "../src/parse/lex_conf.re" +#line 175 "../src/parse/lex_conf.re" { return; } -#line 2306 "src/parse/lex_conf.cc" -yy519: +#line 2175 "src/parse/lex_conf.cc" +yy496: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yybm[0+yych] & 128) { - goto yy519; + goto yy496; } - if (yych == ';') goto yy517; + if (yych == ';') goto yy494; cur = ptr; - goto yy515; + goto yy492; } -#line 194 "../src/parse/lex_conf.re" +#line 176 "../src/parse/lex_conf.re" } @@ -2323,7 +2192,7 @@ int32_t Scanner::lex_conf_number () lex_conf_assign (); tok = cur; -#line 2327 "src/parse/lex_conf.cc" +#line 2196 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -2363,21 +2232,21 @@ int32_t Scanner::lex_conf_number () if ((lim - cur) < 2) fill(2); yych = (unsigned char)*cur; if (yych <= '/') { - if (yych == '-') goto yy525; + if (yych == '-') goto yy502; } else { - if (yych <= '0') goto yy526; - if (yych <= '9') goto yy528; + if (yych <= '0') goto yy503; + if (yych <= '9') goto yy505; } -yy524: -yy525: +yy501: +yy502: yych = (unsigned char)*++cur; - if (yych <= '0') goto yy524; - if (yych <= '9') goto yy528; - goto yy524; -yy526: + if (yych <= '0') goto yy501; + if (yych <= '9') goto yy505; + goto yy501; +yy503: ++cur; -yy527: -#line 203 "../src/parse/lex_conf.re" +yy504: +#line 185 "../src/parse/lex_conf.re" { int32_t n = 0; if (!s_to_i32_unsafe (tok, cur, n)) @@ -2387,17 +2256,17 @@ yy527: lex_conf_semicolon (); return n; } -#line 2391 "src/parse/lex_conf.cc" -yy528: +#line 2260 "src/parse/lex_conf.cc" +yy505: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yybm[0+yych] & 128) { - goto yy528; + goto yy505; } - goto yy527; + goto yy504; } -#line 212 "../src/parse/lex_conf.re" +#line 194 "../src/parse/lex_conf.re" } @@ -2407,7 +2276,7 @@ std::string Scanner::lex_conf_string () std::string s; tok = cur; -#line 2411 "src/parse/lex_conf.cc" +#line 2280 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -2448,38 +2317,38 @@ std::string Scanner::lex_conf_string () yych = (unsigned char)*cur; if (yych <= '!') { if (yych <= '\n') { - if (yych <= 0x08) goto yy533; + if (yych <= 0x08) goto yy510; } else { - if (yych != ' ') goto yy533; + if (yych != ' ') goto yy510; } } else { if (yych <= '\'') { - if (yych <= '"') goto yy536; - if (yych <= '&') goto yy533; - goto yy536; + if (yych <= '"') goto yy513; + if (yych <= '&') goto yy510; + goto yy513; } else { - if (yych != ';') goto yy533; + if (yych != ';') goto yy510; } } -#line 239 "../src/parse/lex_conf.re" +#line 221 "../src/parse/lex_conf.re" { goto end; } -#line 2467 "src/parse/lex_conf.cc" -yy533: +#line 2336 "src/parse/lex_conf.cc" +yy510: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yybm[0+yych] & 128) { - goto yy533; + goto yy510; } -#line 235 "../src/parse/lex_conf.re" +#line 217 "../src/parse/lex_conf.re" { s = std::string(tok, tok_len()); goto end; } -#line 2480 "src/parse/lex_conf.cc" -yy536: +#line 2349 "src/parse/lex_conf.cc" +yy513: ++cur; -#line 221 "../src/parse/lex_conf.re" +#line 203 "../src/parse/lex_conf.re" { const char quote = tok[0]; for (bool end;;) { @@ -2494,9 +2363,9 @@ yy536: } } } -#line 2498 "src/parse/lex_conf.cc" +#line 2367 "src/parse/lex_conf.cc" } -#line 240 "../src/parse/lex_conf.re" +#line 222 "../src/parse/lex_conf.re" end: lex_conf_semicolon (); diff --git a/re2c/src/parse/lex.re b/re2c/src/parse/lex.re index f199cf04..23768f00 100644 --- a/re2c/src/parse/lex.re +++ b/re2c/src/parse/lex.re @@ -63,8 +63,6 @@ lineinf = lineno (space+ dstring)? eol; Scanner::ParseMode Scanner::echo() { - uint32_t ignored = 0; - if (eof && cur == eof) // Catch EOF { return Stop; @@ -112,7 +110,8 @@ echo: if (opts->target == opt_t::CODE) { out.wraw(tok, start); } - goto eoc; + lex_end_of_comment(); + goto echo; } "/*!max:re2c" { @@ -120,7 +119,8 @@ echo: out.wraw(tok, start) .wdelay_yymaxfill(); } - goto eoc; + lex_end_of_comment(); + goto echo; } "/*!getstate:re2c" { @@ -128,7 +128,8 @@ echo: out.wraw(tok, start) .wdelay_state_goto(opts->topIndent); } - goto eoc; + lex_end_of_comment(); + goto echo; } "/*!types:re2c" { @@ -138,19 +139,15 @@ echo: .wdelay_types().ws("\n") .wline_info(cline, get_fname().c_str()); } - goto eoc; + lex_end_of_comment(); + goto echo; } "/*!contexts:re2c" { if (opts->target == opt_t::CODE) { out.wraw(tok, start); } - ConfContexts *conf = new ConfContexts; - lex_conf_contexts(*conf); - if (opts->target == opt_t::CODE) { - out.wdelay_contexts(opts->topIndent, conf); - } - tok = pos = cur; + lex_contexts(); goto echo; } @@ -176,22 +173,47 @@ echo: * { goto echo; } */ +} -eoc: -/*!re2c - zero { fatal("expected end of block"); } - * { goto eoc; } - eol { ++ignored; goto eoc; } - eoc { - if (ignored > 0) { - cline += ignored; - ignored = 0; - out.ws("\n").wline_info(cline, get_fname().c_str()); +void Scanner::lex_end_of_comment() +{ + uint32_t ignored = 0; + for (;;) {/*!re2c + zero { fatal("expected end of block"); } + + * { continue; } + eol { ++ignored; continue; } + eoc { + if (ignored > 0) { + cline += ignored; + out.ws("\n").wline_info(cline, get_fname().c_str()); + } + tok = pos = cur; + return; } - tok = pos = cur; - goto echo; - } -*/ + */} +} + +void Scanner::lex_contexts() +{ + ConfContexts conf; + for (;;) {/*!re2c + * { fatal("unrecognized configuration"); } + + "line" { conf.line = lex_conf_string(); continue; } + "sep" { conf.sep = lex_conf_string(); continue; } + + space+ { continue; } + eol { ++cline; continue; } + eoc { + if (opts->target == opt_t::CODE) { + out.wdelay_contexts(opts->topIndent, + new ConfContexts(conf)); + } + tok = pos = cur; + return; + } + */} } int Scanner::scan() diff --git a/re2c/src/parse/lex_conf.re b/re2c/src/parse/lex_conf.re index 27b0df43..0f906c60 100644 --- a/re2c/src/parse/lex_conf.re +++ b/re2c/src/parse/lex_conf.re @@ -26,8 +26,6 @@ namespace re2c re2c:yych:conversion = 1; space = [ \t]; - eol = "\r"? "\n"; - eoc = "*" "/"; conf_assign = space* "=" space*; @@ -162,22 +160,6 @@ void Scanner::lex_conf () */ } -void Scanner::lex_conf_contexts(ConfContexts &conf) -{ - for (;;) { - /*!re2c - * { fatal("unrecognized configuration"); } - - space+ { continue; } - eol { ++cline; continue; } - eoc { return; } - - "line" { conf.line = lex_conf_string(); continue; } - "sep" { conf.sep = lex_conf_string(); continue; } - */ - } -} - void Scanner::lex_conf_assign () { /*!re2c diff --git a/re2c/src/parse/scanner.h b/re2c/src/parse/scanner.h index 9fdfceb2..bf592975 100644 --- a/re2c/src/parse/scanner.h +++ b/re2c/src/parse/scanner.h @@ -15,7 +15,6 @@ namespace re2c class Range; class RegExp; struct OutputFile; -struct ConfContexts; struct ScannerState { @@ -60,6 +59,8 @@ public: private: void fill (uint32_t); + void lex_end_of_comment(); + void lex_contexts(); void set_sourceline (); uint32_t lex_cls_chr(); uint32_t lex_str_chr(char quote, bool &end); @@ -70,7 +71,6 @@ private: const RegExp *cls(const Range *r) const; void lex_conf (); - void lex_conf_contexts(ConfContexts &conf); void lex_conf_assign (); void lex_conf_semicolon (); int32_t lex_conf_number ();