From 0ba58e2afd99fb920f8035c4f3179cc5976a3dab Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Sat, 2 Apr 2016 15:07:59 +0100 Subject: [PATCH] Lexer: don't care if end of comment is followed by a newline. re2c used to swallow newline that immediately followes end of directive: for most of the directives re2c generates code block that ends with a newline, so the generated code looks better if the newline is not doubled. However, this unnecessarily complicates the lexer. --- re2c/bootstrap/src/parse/lex.cc | 1894 ++++++++--------- re2c/src/parse/lex.re | 10 - re2c/test/bug1163046.c | 1 + re2c/test/calc_001.c | 20 +- re2c/test/calc_001.dei.c | 2 + re2c/test/calc_001.ei.c | 2 + re2c/test/calc_002.c | 20 +- re2c/test/calc_003.c | 20 +- re2c/test/calc_004.c | 18 +- re2c/test/calc_005.c | 18 +- re2c/test/calc_006.s.c | 20 +- re2c/test/calc_007.b.c | 20 +- re2c/test/calc_008.b--skeleton.c | Bin 21928 -> 21929 bytes re2c/test/calc_008.b.c | 20 +- re2c/test/condition_06.cs.c | 47 +- re2c/test/condition_07.cbi.c | 1 + re2c/test/condition_08.cbi.c | 1 + re2c/test/condition_08.cbif.c | 1 + re2c/test/condition_09.cbif.c | 2 + re2c/test/condition_09.cgif.c | 2 + re2c/test/condition_10.cgif.c | 2 + re2c/test/condition_12.cgif.c | 2 + re2c/test/condition_14.cbif.c | 2 + re2c/test/condition_14.cgif.c | 2 + re2c/test/condition_14.cif.c | 2 + re2c/test/condition_14.csif.c | 2 + re2c/test/condition_15.csif.c | 2 + re2c/test/condtype_decl.c.c | 7 +- re2c/test/condtype_decl.cg.c | 7 +- re2c/test/condtype_decl.cs.c | 7 +- re2c/test/condtype_forwdecl.cg.c | 1 + re2c/test/condtype_forwdecl.cs.c | 1 + re2c/test/config4f.f.c | 7 +- re2c/test/config4g.ifs.c | 1 + re2c/test/config5.c | 18 +- re2c/test/ctx.b.c | 1 + re2c/test/ctx.c | 1 + re2c/test/ctx.s.c | 1 + re2c/test/error13.1.c | 9 +- re2c/test/error13.c | 9 +- re2c/test/error14.1.c | 2 + re2c/test/error14.c | 2 + re2c/test/main.b.c | 32 +- re2c/test/parse_date.b.c | 1 + re2c/test/parse_date.c | 1 + re2c/test/parse_date.db.c | 1 + re2c/test/parse_date.g.c | 1 + re2c/test/parse_date.s.c | 1 + re2c/test/parse_date_1_78.db.c | 1 + ..._zend_language_scanner.igcd--flex-syntax.c | 1 + ..._language_scanner_crlf.igcd--flex-syntax.c | 1 + re2c/test/php20150211_parse_date.ig.c | 1 + re2c/test/php20150211_parse_date_crlf.ig.c | 1 + .../test/php20150211_parse_iso_intervals.ig.c | 1 + ...scanner.igcd--flex-syntax--case-inverted.c | 1 + ...scanner.igcd--flex-syntax--case-inverted.c | 1 + re2c/test/repeat-01.cgir.c | 1 + re2c/test/repeat-02.cgir.c | 1 + re2c/test/repeat-03.cgir.c | 1 + re2c/test/reuse_conds_default_1.cgir.c | 1 + re2c/test/strip_001.s.c | 25 +- re2c/test/strip_002.s.c | 33 +- re2c/test/strip_003.b--skeleton.c | 1 + re2c/test/strip_003.b.c | 37 +- re2c/test/yyaccept_missing.bci.c | 1 + 65 files changed, 1208 insertions(+), 1145 deletions(-) diff --git a/re2c/bootstrap/src/parse/lex.cc b/re2c/bootstrap/src/parse/lex.cc index cb8dd2d5..ee35bfc1 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 11:23:34 2016 */ +/* Generated by re2c 0.16 on Sat Apr 2 11:45:18 2016 */ #line 1 "../src/parse/lex.re" #include "src/util/c99_stdint.h" #include @@ -707,7 +707,7 @@ eoc: #line 708 "src/parse/lex.cc" { YYCTYPE yych; - if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4); + if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yych <= '\f') { if (yych <= 0x00) goto yy124; @@ -741,10 +741,7 @@ yy130: yy131: yych = (YYCTYPE)*++YYCURSOR; if (yych != '/') goto yy127; - yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == '\n') goto yy134; - if (yych == '\r') goto yy136; -yy133: + ++YYCURSOR; #line 198 "../src/parse/lex.re" { if (ignored > 0) { @@ -755,28 +752,9 @@ yy133: tok = pos = cur; goto echo; } -#line 759 "src/parse/lex.cc" -yy134: - ++YYCURSOR; -#line 207 "../src/parse/lex.re" - { - ++cline; - if (ignored > 0) { - cline += ignored; - ignored = 0; - out.wline_info(cline, get_fname().c_str()); - } - tok = pos = cur; - goto echo; - } -#line 773 "src/parse/lex.cc" -yy136: - yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy134; - YYCURSOR = YYMARKER; - goto yy133; +#line 756 "src/parse/lex.cc" } -#line 217 "../src/parse/lex.re" +#line 207 "../src/parse/lex.re" } @@ -796,7 +774,7 @@ scan: start: -#line 800 "src/parse/lex.cc" +#line 778 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -837,293 +815,293 @@ start: if ((YYLIMIT - YYCURSOR) < 6) YYFILL(6); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 16) { - goto yy142; + goto yy138; } if (yych <= '9') { if (yych <= '&') { if (yych <= '\r') { - if (yych <= 0x08) goto yy140; - if (yych <= '\n') goto yy145; - if (yych >= '\r') goto yy147; + if (yych <= 0x08) goto yy136; + if (yych <= '\n') goto yy141; + if (yych >= '\r') goto yy143; } else { if (yych <= '"') { - if (yych >= '"') goto yy148; + if (yych >= '"') goto yy144; } else { - if (yych == '%') goto yy150; + if (yych == '%') goto yy146; } } } else { if (yych <= '+') { - if (yych <= '\'') goto yy151; - if (yych <= ')') goto yy153; - if (yych <= '*') goto yy155; - goto yy157; + if (yych <= '\'') goto yy147; + if (yych <= ')') goto yy149; + if (yych <= '*') goto yy151; + goto yy153; } else { if (yych <= '-') { - if (yych <= ',') goto yy153; + if (yych <= ',') goto yy149; } else { - if (yych <= '.') goto yy159; - if (yych <= '/') goto yy161; - goto yy162; + if (yych <= '.') goto yy155; + if (yych <= '/') goto yy157; + goto yy158; } } } } else { if (yych <= '\\') { if (yych <= '>') { - if (yych <= ':') goto yy163; - if (yych == '<') goto yy164; - goto yy153; + if (yych <= ':') goto yy159; + if (yych == '<') goto yy160; + goto yy149; } else { if (yych <= '@') { - if (yych <= '?') goto yy157; - goto yy165; + if (yych <= '?') goto yy153; + goto yy161; } else { - if (yych <= 'Z') goto yy162; - if (yych <= '[') goto yy166; - goto yy153; + if (yych <= 'Z') goto yy158; + if (yych <= '[') goto yy162; + goto yy149; } } } else { if (yych <= 'q') { - if (yych == '_') goto yy162; - if (yych >= 'a') goto yy162; + if (yych == '_') goto yy158; + if (yych >= 'a') goto yy158; } else { if (yych <= 'z') { - if (yych <= 'r') goto yy168; - goto yy162; + if (yych <= 'r') goto yy164; + goto yy158; } else { - if (yych <= '{') goto yy169; - if (yych <= '|') goto yy153; + if (yych <= '{') goto yy165; + if (yych <= '|') goto yy149; } } } } -yy140: +yy136: ++YYCURSOR; -yy141: -#line 395 "../src/parse/lex.re" +yy137: +#line 385 "../src/parse/lex.re" { fatalf("unexpected character: '%c'", *tok); goto scan; } -#line 911 "src/parse/lex.cc" -yy142: +#line 889 "src/parse/lex.cc" +yy138: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 16) { - goto yy142; + goto yy138; } -#line 379 "../src/parse/lex.re" +#line 369 "../src/parse/lex.re" { goto scan; } -#line 923 "src/parse/lex.cc" -yy145: +#line 901 "src/parse/lex.cc" +yy141: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= 0x1F) { - if (yych == '\t') goto yy171; + if (yych == '\t') goto yy167; } else { - if (yych <= ' ') goto yy171; - if (yych == '#') goto yy174; + if (yych <= ' ') goto yy167; + if (yych == '#') goto yy170; } -yy146: -#line 388 "../src/parse/lex.re" +yy142: +#line 378 "../src/parse/lex.re" { if (cur == eof) return 0; pos = cur; cline++; goto scan; } -#line 941 "src/parse/lex.cc" -yy147: +#line 919 "src/parse/lex.cc" +yy143: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy145; - goto yy141; -yy148: + if (yych == '\n') goto yy141; + goto yy137; +yy144: ++YYCURSOR; -#line 266 "../src/parse/lex.re" +#line 256 "../src/parse/lex.re" { yylval.regexp = lex_str('"', opts->bCaseInsensitive || opts->bCaseInverted); return TOKEN_REGEXP; } -#line 950 "src/parse/lex.cc" -yy150: +#line 928 "src/parse/lex.cc" +yy146: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '}') goto yy176; - goto yy141; -yy151: + if (yych == '}') goto yy172; + goto yy137; +yy147: ++YYCURSOR; -#line 265 "../src/parse/lex.re" +#line 255 "../src/parse/lex.re" { yylval.regexp = lex_str('\'', opts->bCaseInsensitive || !opts->bCaseInverted); return TOKEN_REGEXP; } -#line 959 "src/parse/lex.cc" -yy153: +#line 937 "src/parse/lex.cc" +yy149: ++YYCURSOR; -yy154: -#line 282 "../src/parse/lex.re" +yy150: +#line 272 "../src/parse/lex.re" { return *tok; } -#line 967 "src/parse/lex.cc" -yy155: +#line 945 "src/parse/lex.cc" +yy151: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '/') goto yy176; -#line 286 "../src/parse/lex.re" + if ((yych = (YYCTYPE)*YYCURSOR) == '/') goto yy172; +#line 276 "../src/parse/lex.re" { yylval.op = *tok; return TOKEN_STAR; } -#line 976 "src/parse/lex.cc" -yy157: +#line 954 "src/parse/lex.cc" +yy153: ++YYCURSOR; -#line 290 "../src/parse/lex.re" +#line 280 "../src/parse/lex.re" { yylval.op = *tok; return TOKEN_CLOSE; } -#line 984 "src/parse/lex.cc" -yy159: +#line 962 "src/parse/lex.cc" +yy155: ++YYCURSOR; -#line 374 "../src/parse/lex.re" +#line 364 "../src/parse/lex.re" { yylval.regexp = mkDot(); return TOKEN_REGEXP; } -#line 992 "src/parse/lex.cc" -yy161: +#line 970 "src/parse/lex.cc" +yy157: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '*') goto yy178; - if (yych == '/') goto yy180; - goto yy154; -yy162: + if (yych == '*') goto yy174; + if (yych == '/') goto yy176; + goto yy150; +yy158: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - goto yy188; -yy163: + goto yy184; +yy159: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '=') goto yy189; - goto yy141; -yy164: + if (yych == '=') goto yy185; + goto yy137; +yy160: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == '!') goto yy191; - if (yych == '>') goto yy193; - goto yy154; -yy165: + if (yych == '!') goto yy187; + if (yych == '>') goto yy189; + goto yy150; +yy161: yych = (YYCTYPE)*++YYCURSOR; if (yych <= 'Z') { - if (yych <= '/') goto yy141; - if (yych <= '9') goto yy194; - if (yych <= '@') goto yy141; - goto yy194; + if (yych <= '/') goto yy137; + if (yych <= '9') goto yy190; + if (yych <= '@') goto yy137; + goto yy190; } else { if (yych <= '_') { - if (yych <= '^') goto yy141; - goto yy194; + if (yych <= '^') goto yy137; + goto yy190; } else { - if (yych <= '`') goto yy141; - if (yych <= 'z') goto yy194; - goto yy141; + if (yych <= '`') goto yy137; + if (yych <= 'z') goto yy190; + goto yy137; } } -yy166: +yy162: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '^') goto yy197; -#line 267 "../src/parse/lex.re" + if ((yych = (YYCTYPE)*YYCURSOR) == '^') goto yy193; +#line 257 "../src/parse/lex.re" { yylval.regexp = lex_cls(false); return TOKEN_REGEXP; } -#line 1034 "src/parse/lex.cc" -yy168: +#line 1012 "src/parse/lex.cc" +yy164: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych == 'e') goto yy199; - goto yy188; -yy169: + if (yych == 'e') goto yy195; + goto yy184; +yy165: yyaccept = 2; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yybm[0+yych] & 64) { - goto yy202; + goto yy198; } if (yych <= 'Z') { - if (yych == ',') goto yy200; - if (yych >= 'A') goto yy204; + if (yych == ',') goto yy196; + if (yych >= 'A') goto yy200; } else { if (yych <= '_') { - if (yych >= '_') goto yy204; + if (yych >= '_') goto yy200; } else { - if (yych <= '`') goto yy170; - if (yych <= 'z') goto yy204; + if (yych <= '`') goto yy166; + if (yych <= 'z') goto yy200; } } -yy170: -#line 236 "../src/parse/lex.re" +yy166: +#line 226 "../src/parse/lex.re" { depth = 1; goto code; } -#line 1063 "src/parse/lex.cc" -yy171: +#line 1041 "src/parse/lex.cc" +yy167: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy171; + if (yych == '\t') goto yy167; } else { - if (yych <= ' ') goto yy171; - if (yych == '#') goto yy174; + if (yych <= ' ') goto yy167; + if (yych == '#') goto yy170; } -yy173: +yy169: YYCURSOR = YYMARKER; if (yyaccept <= 1) { if (yyaccept == 0) { - goto yy146; + goto yy142; } else { - goto yy154; + goto yy150; } } else { if (yyaccept == 2) { - goto yy170; + goto yy166; } else { - goto yy201; + goto yy197; } } -yy174: +yy170: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy174; - goto yy173; + if (yych == '\t') goto yy170; + goto yy169; } else { - if (yych <= ' ') goto yy174; - if (yych == 'l') goto yy206; - goto yy173; + if (yych <= ' ') goto yy170; + if (yych == 'l') goto yy202; + goto yy169; } -yy176: +yy172: ++YYCURSOR; -#line 260 "../src/parse/lex.re" +#line 250 "../src/parse/lex.re" { tok = cur; return 0; } -#line 1108 "src/parse/lex.cc" -yy178: +#line 1086 "src/parse/lex.cc" +yy174: ++YYCURSOR; -#line 254 "../src/parse/lex.re" +#line 244 "../src/parse/lex.re" { depth = 1; goto comment; } -#line 1116 "src/parse/lex.cc" -yy180: +#line 1094 "src/parse/lex.cc" +yy176: ++YYCURSOR; -#line 251 "../src/parse/lex.re" +#line 241 "../src/parse/lex.re" { goto nextLine; } -#line 1123 "src/parse/lex.cc" -yy182: +#line 1101 "src/parse/lex.cc" +yy178: ++YYCURSOR; YYCURSOR -= 1; -#line 358 "../src/parse/lex.re" +#line 348 "../src/parse/lex.re" { if (!opts->FFlag) { yylval.str = new std::string (tok, tok_len()); @@ -1139,157 +1117,157 @@ yy182: return TOKEN_REGEXP; } } -#line 1143 "src/parse/lex.cc" -yy184: +#line 1121 "src/parse/lex.cc" +yy180: yych = (YYCTYPE)*++YYCURSOR; - goto yy210; -yy185: + goto yy206; +yy181: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 353 "../src/parse/lex.re" +#line 343 "../src/parse/lex.re" { yylval.str = new std::string (tok, tok_len ()); return TOKEN_ID; } -#line 1155 "src/parse/lex.cc" -yy187: +#line 1133 "src/parse/lex.cc" +yy183: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy188: +yy184: if (yybm[0+yych] & 32) { - goto yy187; + goto yy183; } if (yych <= ' ') { - if (yych == '\t') goto yy184; - if (yych <= 0x1F) goto yy182; - goto yy184; + if (yych == '\t') goto yy180; + if (yych <= 0x1F) goto yy178; + goto yy180; } else { if (yych <= ',') { - if (yych <= '+') goto yy182; - goto yy185; + if (yych <= '+') goto yy178; + goto yy181; } else { - if (yych <= '<') goto yy182; - if (yych <= '>') goto yy185; - goto yy182; + if (yych <= '<') goto yy178; + if (yych <= '>') goto yy181; + goto yy178; } } -yy189: +yy185: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '>') goto yy211; -#line 245 "../src/parse/lex.re" + if ((yych = (YYCTYPE)*YYCURSOR) == '>') goto yy207; +#line 235 "../src/parse/lex.re" { tok += 2; /* skip ":=" */ depth = 0; goto code; } -#line 1188 "src/parse/lex.cc" -yy191: +#line 1166 "src/parse/lex.cc" +yy187: ++YYCURSOR; -#line 273 "../src/parse/lex.re" +#line 263 "../src/parse/lex.re" { return TOKEN_SETUP; } -#line 1195 "src/parse/lex.cc" -yy193: +#line 1173 "src/parse/lex.cc" +yy189: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - goto yy214; -yy194: + goto yy210; +yy190: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 'Z') { - if (yych <= '/') goto yy196; - if (yych <= '9') goto yy194; - if (yych >= 'A') goto yy194; + if (yych <= '/') goto yy192; + if (yych <= '9') goto yy190; + if (yych >= 'A') goto yy190; } else { if (yych <= '_') { - if (yych >= '_') goto yy194; + if (yych >= '_') goto yy190; } else { - if (yych <= '`') goto yy196; - if (yych <= 'z') goto yy194; + if (yych <= '`') goto yy192; + if (yych <= 'z') goto yy190; } } -yy196: -#line 277 "../src/parse/lex.re" +yy192: +#line 267 "../src/parse/lex.re" { yylval.str = new std::string(tok + 1, tok_len() - 1); return TOKEN_CTX; } -#line 1222 "src/parse/lex.cc" -yy197: +#line 1200 "src/parse/lex.cc" +yy193: ++YYCURSOR; -#line 268 "../src/parse/lex.re" +#line 258 "../src/parse/lex.re" { yylval.regexp = lex_cls(true); return TOKEN_REGEXP; } -#line 1227 "src/parse/lex.cc" -yy199: +#line 1205 "src/parse/lex.cc" +yy195: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych == '2') goto yy219; - goto yy188; -yy200: + if (yych == '2') goto yy215; + goto yy184; +yy196: ++YYCURSOR; -yy201: -#line 326 "../src/parse/lex.re" +yy197: +#line 316 "../src/parse/lex.re" { fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"); } -#line 1240 "src/parse/lex.cc" -yy202: +#line 1218 "src/parse/lex.cc" +yy198: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 64) { - goto yy202; + goto yy198; } if (yych <= '^') { if (yych <= ',') { - if (yych <= '+') goto yy173; - goto yy220; + if (yych <= '+') goto yy169; + goto yy216; } else { - if (yych <= '@') goto yy173; - if (yych >= '[') goto yy173; + if (yych <= '@') goto yy169; + if (yych >= '[') goto yy169; } } else { if (yych <= 'z') { - if (yych == '`') goto yy173; + if (yych == '`') goto yy169; } else { - if (yych == '}') goto yy221; - goto yy173; + if (yych == '}') goto yy217; + goto yy169; } } -yy204: +yy200: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= '^') { if (yych <= '9') { - if (yych <= '/') goto yy173; - goto yy204; + if (yych <= '/') goto yy169; + goto yy200; } else { - if (yych <= '@') goto yy173; - if (yych <= 'Z') goto yy204; - goto yy173; + if (yych <= '@') goto yy169; + if (yych <= 'Z') goto yy200; + goto yy169; } } else { if (yych <= 'z') { - if (yych == '`') goto yy173; - goto yy204; + if (yych == '`') goto yy169; + goto yy200; } else { - if (yych == '}') goto yy223; - goto yy173; + if (yych == '}') goto yy219; + goto yy169; } } -yy206: +yy202: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'i') goto yy225; - goto yy173; -yy207: + if (yych == 'i') goto yy221; + goto yy169; +yy203: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 340 "../src/parse/lex.re" +#line 330 "../src/parse/lex.re" { yylval.str = new std::string (tok, tok_len ()); if (opts->FFlag) @@ -1302,87 +1280,87 @@ yy207: return TOKEN_ID; } } -#line 1306 "src/parse/lex.cc" -yy209: +#line 1284 "src/parse/lex.cc" +yy205: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; -yy210: +yy206: if (yych <= ' ') { - if (yych == '\t') goto yy209; - if (yych <= 0x1F) goto yy207; - goto yy209; + if (yych == '\t') goto yy205; + if (yych <= 0x1F) goto yy203; + goto yy205; } else { if (yych <= ',') { - if (yych <= '+') goto yy207; - goto yy185; + if (yych <= '+') goto yy203; + goto yy181; } else { - if (yych <= '<') goto yy207; - if (yych <= '>') goto yy185; - goto yy207; + if (yych <= '<') goto yy203; + if (yych <= '>') goto yy181; + goto yy203; } } -yy211: +yy207: ++YYCURSOR; YYCURSOR -= 2; -#line 241 "../src/parse/lex.re" +#line 231 "../src/parse/lex.re" { return *tok; } -#line 1333 "src/parse/lex.cc" -yy213: +#line 1311 "src/parse/lex.cc" +yy209: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; -yy214: +yy210: if (yych <= '9') { if (yych <= '\t') { - if (yych <= 0x08) goto yy173; - goto yy213; + if (yych <= 0x08) goto yy169; + goto yy209; } else { - if (yych == ' ') goto yy213; - goto yy173; + if (yych == ' ') goto yy209; + goto yy169; } } else { if (yych <= '=') { - if (yych <= ':') goto yy215; - if (yych <= '<') goto yy173; - goto yy216; + if (yych <= ':') goto yy211; + if (yych <= '<') goto yy169; + goto yy212; } else { - if (yych == '{') goto yy217; - goto yy173; + if (yych == '{') goto yy213; + goto yy169; } } -yy215: +yy211: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '=') goto yy217; - goto yy173; -yy216: + if (yych == '=') goto yy213; + goto yy169; +yy212: yych = (YYCTYPE)*++YYCURSOR; - if (yych != '>') goto yy173; -yy217: + if (yych != '>') goto yy169; +yy213: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 270 "../src/parse/lex.re" +#line 260 "../src/parse/lex.re" { return TOKEN_NOCOND; } -#line 1371 "src/parse/lex.cc" -yy219: +#line 1349 "src/parse/lex.cc" +yy215: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych == 'c') goto yy226; - goto yy188; -yy220: + if (yych == 'c') goto yy222; + goto yy184; +yy216: yyaccept = 3; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy201; - if (yych <= '9') goto yy227; - if (yych == '}') goto yy229; - goto yy201; -yy221: + if (yych <= '/') goto yy197; + if (yych <= '9') goto yy223; + if (yych == '}') goto yy225; + goto yy197; +yy217: ++YYCURSOR; -#line 295 "../src/parse/lex.re" +#line 285 "../src/parse/lex.re" { if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.extop.min)) { @@ -1391,10 +1369,10 @@ yy221: yylval.extop.max = yylval.extop.min; return TOKEN_CLOSESIZE; } -#line 1395 "src/parse/lex.cc" -yy223: +#line 1373 "src/parse/lex.cc" +yy219: ++YYCURSOR; -#line 330 "../src/parse/lex.re" +#line 320 "../src/parse/lex.re" { if (!opts->FFlag) { fatal("curly braces for names only allowed with -F switch"); @@ -1402,27 +1380,27 @@ yy223: yylval.str = new std::string (tok + 1, tok_len () - 2); // -2 to omit braces return TOKEN_ID; } -#line 1406 "src/parse/lex.cc" -yy225: +#line 1384 "src/parse/lex.cc" +yy221: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'n') goto yy231; - goto yy173; -yy226: + if (yych == 'n') goto yy227; + goto yy169; +yy222: yych = (YYCTYPE)*++YYCURSOR; YYCTXMARKER = YYCURSOR; - if (yych == ':') goto yy232; - goto yy188; -yy227: + if (yych == ':') goto yy228; + goto yy184; +yy223: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych <= '/') goto yy173; - if (yych <= '9') goto yy227; - if (yych == '}') goto yy234; - goto yy173; -yy229: + if (yych <= '/') goto yy169; + if (yych <= '9') goto yy223; + if (yych == '}') goto yy230; + goto yy169; +yy225: ++YYCURSOR; -#line 317 "../src/parse/lex.re" +#line 307 "../src/parse/lex.re" { if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.extop.min)) { @@ -1431,19 +1409,19 @@ yy229: yylval.extop.max = std::numeric_limits::max(); return TOKEN_CLOSESIZE; } -#line 1435 "src/parse/lex.cc" -yy231: +#line 1413 "src/parse/lex.cc" +yy227: yych = (YYCTYPE)*++YYCURSOR; - if (yych == 'e') goto yy236; - goto yy173; -yy232: + if (yych == 'e') goto yy232; + goto yy169; +yy228: ++YYCURSOR; -#line 338 "../src/parse/lex.re" +#line 328 "../src/parse/lex.re" { lex_conf (); return TOKEN_CONF; } -#line 1444 "src/parse/lex.cc" -yy234: +#line 1422 "src/parse/lex.cc" +yy230: ++YYCURSOR; -#line 304 "../src/parse/lex.re" +#line 294 "../src/parse/lex.re" { const char * p = strchr (tok, ','); if (!s_to_u32_unsafe (tok + 1, p, yylval.extop.min)) @@ -1456,132 +1434,132 @@ yy234: } return TOKEN_CLOSESIZE; } -#line 1460 "src/parse/lex.cc" -yy236: +#line 1438 "src/parse/lex.cc" +yy232: yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '0') goto yy238; - if (yych <= '9') goto yy173; - goto yy238; -yy237: + if (yych <= '0') goto yy234; + if (yych <= '9') goto yy169; + goto yy234; +yy233: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy238: +yy234: if (yych <= 0x1F) { - if (yych == '\t') goto yy237; - goto yy173; + if (yych == '\t') goto yy233; + goto yy169; } else { - if (yych <= ' ') goto yy237; - if (yych <= '0') goto yy173; - if (yych >= ':') goto yy173; + if (yych <= ' ') goto yy233; + if (yych <= '0') goto yy169; + if (yych >= ':') goto yy169; } -yy239: +yy235: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yych <= '\r') { if (yych <= '\t') { - if (yych <= 0x08) goto yy173; + if (yych <= 0x08) goto yy169; } else { - if (yych <= '\n') goto yy243; - if (yych <= '\f') goto yy173; - goto yy245; + if (yych <= '\n') goto yy239; + if (yych <= '\f') goto yy169; + goto yy241; } } else { if (yych <= ' ') { - if (yych <= 0x1F) goto yy173; + if (yych <= 0x1F) goto yy169; } else { - if (yych <= '/') goto yy173; - if (yych <= '9') goto yy239; - goto yy173; + if (yych <= '/') goto yy169; + if (yych <= '9') goto yy235; + goto yy169; } } -yy241: +yy237: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy241; - goto yy173; + if (yych == '\t') goto yy237; + goto yy169; } else { - if (yych <= ' ') goto yy241; - if (yych == '"') goto yy246; - goto yy173; + if (yych <= ' ') goto yy237; + if (yych == '"') goto yy242; + goto yy169; } -yy243: +yy239: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 383 "../src/parse/lex.re" +#line 373 "../src/parse/lex.re" { set_sourceline (); goto scan; } -#line 1521 "src/parse/lex.cc" -yy245: +#line 1499 "src/parse/lex.cc" +yy241: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy243; - goto yy173; -yy246: + if (yych == '\n') goto yy239; + goto yy169; +yy242: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 128) { - goto yy246; + goto yy242; } - if (yych <= '\n') goto yy173; - if (yych >= '#') goto yy249; + if (yych <= '\n') goto yy169; + if (yych >= '#') goto yy245; yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy243; - if (yych == '\r') goto yy245; - goto yy173; -yy249: + if (yych == '\n') goto yy239; + if (yych == '\r') goto yy241; + goto yy169; +yy245: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy173; - goto yy246; + if (yych == '\n') goto yy169; + goto yy242; } -#line 399 "../src/parse/lex.re" +#line 389 "../src/parse/lex.re" flex_name: -#line 1551 "src/parse/lex.cc" +#line 1529 "src/parse/lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy254; - if (yych == '\r') goto yy256; + if (yych == '\n') goto yy250; + if (yych == '\r') goto yy252; ++YYCURSOR; -yy253: -#line 410 "../src/parse/lex.re" +yy249: +#line 400 "../src/parse/lex.re" { YYCURSOR = tok; goto start; } -#line 1565 "src/parse/lex.cc" -yy254: +#line 1543 "src/parse/lex.cc" +yy250: ++YYCURSOR; -#line 404 "../src/parse/lex.re" +#line 394 "../src/parse/lex.re" { YYCURSOR = tok; lexer_state = LEX_NORMAL; return TOKEN_FID_END; } -#line 1574 "src/parse/lex.cc" -yy256: +#line 1552 "src/parse/lex.cc" +yy252: ++YYCURSOR; - if ((yych = (YYCTYPE)*YYCURSOR) == '\n') goto yy254; - goto yy253; + if ((yych = (YYCTYPE)*YYCURSOR) == '\n') goto yy250; + goto yy249; } -#line 414 "../src/parse/lex.re" +#line 404 "../src/parse/lex.re" code: -#line 1585 "src/parse/lex.cc" +#line 1563 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -1623,26 +1601,26 @@ code: yych = (YYCTYPE)*YYCURSOR; if (yych <= '&') { if (yych <= '\n') { - if (yych <= 0x00) goto yy259; - if (yych <= '\t') goto yy261; - goto yy263; + if (yych <= 0x00) goto yy255; + if (yych <= '\t') goto yy257; + goto yy259; } else { - if (yych == '"') goto yy265; - goto yy261; + if (yych == '"') goto yy261; + goto yy257; } } else { if (yych <= '{') { - if (yych <= '\'') goto yy266; - if (yych <= 'z') goto yy261; - goto yy267; + if (yych <= '\'') goto yy262; + if (yych <= 'z') goto yy257; + goto yy263; } else { - if (yych == '}') goto yy269; - goto yy261; + if (yych == '}') goto yy265; + goto yy257; } } -yy259: +yy255: ++YYCURSOR; -#line 477 "../src/parse/lex.re" +#line 467 "../src/parse/lex.re" { if (cur == eof) { @@ -1654,34 +1632,34 @@ yy259: } goto code; } -#line 1658 "src/parse/lex.cc" -yy261: +#line 1636 "src/parse/lex.cc" +yy257: ++YYCURSOR; -yy262: -#line 491 "../src/parse/lex.re" +yy258: +#line 481 "../src/parse/lex.re" { goto code; } -#line 1666 "src/parse/lex.cc" -yy263: +#line 1644 "src/parse/lex.cc" +yy259: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '\r') { if (yych <= '\t') { - if (yych >= '\t') goto yy271; + if (yych >= '\t') goto yy267; } else { - if (yych <= '\n') goto yy273; - if (yych >= '\r') goto yy273; + if (yych <= '\n') goto yy269; + if (yych >= '\r') goto yy269; } } else { if (yych <= ' ') { - if (yych >= ' ') goto yy271; + if (yych >= ' ') goto yy267; } else { - if (yych == '#') goto yy274; + if (yych == '#') goto yy270; } } -yy264: -#line 458 "../src/parse/lex.re" +yy260: +#line 448 "../src/parse/lex.re" { if (depth == 0) { @@ -1701,20 +1679,20 @@ yy264: cline++; goto code; } -#line 1705 "src/parse/lex.cc" -yy265: +#line 1683 "src/parse/lex.cc" +yy261: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == '\n') goto yy262; - goto yy278; -yy266: + if (yych == '\n') goto yy258; + goto yy274; +yy262: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == '\n') goto yy262; - goto yy283; -yy267: + if (yych == '\n') goto yy258; + goto yy279; +yy263: ++YYCURSOR; -#line 430 "../src/parse/lex.re" +#line 420 "../src/parse/lex.re" { if (depth == 0) { @@ -1726,10 +1704,10 @@ yy267: } goto code; } -#line 1730 "src/parse/lex.cc" -yy269: +#line 1708 "src/parse/lex.cc" +yy265: ++YYCURSOR; -#line 418 "../src/parse/lex.re" +#line 408 "../src/parse/lex.re" { if (depth == 0) { @@ -1742,19 +1720,19 @@ yy269: } goto code; } -#line 1746 "src/parse/lex.cc" -yy271: +#line 1724 "src/parse/lex.cc" +yy267: yyaccept = 2; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= 0x1F) { - if (yych == '\t') goto yy285; + if (yych == '\t') goto yy281; } else { - if (yych <= ' ') goto yy285; - if (yych == '#') goto yy274; + if (yych <= ' ') goto yy281; + if (yych == '#') goto yy270; } -yy272: +yy268: YYCURSOR -= 1; -#line 445 "../src/parse/lex.re" +#line 435 "../src/parse/lex.re" { if (depth == 0) { @@ -1768,175 +1746,175 @@ yy272: cline++; goto code; } -#line 1772 "src/parse/lex.cc" -yy273: +#line 1750 "src/parse/lex.cc" +yy269: yych = (YYCTYPE)*++YYCURSOR; - goto yy272; -yy274: + goto yy268; +yy270: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 16) { - goto yy274; + goto yy270; } - if (yych == 'l') goto yy287; -yy276: + if (yych == 'l') goto yy283; +yy272: YYCURSOR = YYMARKER; if (yyaccept <= 1) { if (yyaccept == 0) { - goto yy264; + goto yy260; } else { - goto yy262; + goto yy258; } } else { - goto yy272; + goto yy268; } -yy277: +yy273: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; -yy278: +yy274: if (yybm[0+yych] & 32) { - goto yy277; + goto yy273; } - if (yych <= '\n') goto yy276; - if (yych >= '#') goto yy281; -yy279: + if (yych <= '\n') goto yy272; + if (yych >= '#') goto yy277; +yy275: ++YYCURSOR; -#line 488 "../src/parse/lex.re" +#line 478 "../src/parse/lex.re" { goto code; } -#line 1811 "src/parse/lex.cc" -yy281: +#line 1789 "src/parse/lex.cc" +yy277: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy276; - goto yy277; -yy282: + if (yych == '\n') goto yy272; + goto yy273; +yy278: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; -yy283: +yy279: if (yybm[0+yych] & 64) { - goto yy282; + goto yy278; } - if (yych <= '\n') goto yy276; - if (yych <= '\'') goto yy279; + if (yych <= '\n') goto yy272; + if (yych <= '\'') goto yy275; ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy276; - goto yy282; -yy285: + if (yych == '\n') goto yy272; + goto yy278; +yy281: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy285; - goto yy276; + if (yych == '\t') goto yy281; + goto yy272; } else { - if (yych <= ' ') goto yy285; - if (yych == '#') goto yy274; - goto yy276; + if (yych <= ' ') goto yy281; + if (yych == '#') goto yy270; + goto yy272; } -yy287: +yy283: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy276; + if (yych != 'i') goto yy272; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy276; + if (yych != 'n') goto yy272; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy276; + if (yych != 'e') goto yy272; yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '0') goto yy292; - if (yych <= '9') goto yy276; - goto yy292; -yy291: + if (yych <= '0') goto yy288; + if (yych <= '9') goto yy272; + goto yy288; +yy287: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy292: +yy288: if (yych <= 0x1F) { - if (yych == '\t') goto yy291; - goto yy276; + if (yych == '\t') goto yy287; + goto yy272; } else { - if (yych <= ' ') goto yy291; - if (yych <= '0') goto yy276; - if (yych >= ':') goto yy276; + if (yych <= ' ') goto yy287; + if (yych <= '0') goto yy272; + if (yych >= ':') goto yy272; } -yy293: +yy289: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 128) { - goto yy293; + goto yy289; } if (yych <= '\f') { - if (yych <= 0x08) goto yy276; - if (yych <= '\t') goto yy295; - if (yych <= '\n') goto yy297; - goto yy276; + if (yych <= 0x08) goto yy272; + if (yych <= '\t') goto yy291; + if (yych <= '\n') goto yy293; + goto yy272; } else { - if (yych <= '\r') goto yy299; - if (yych != ' ') goto yy276; + if (yych <= '\r') goto yy295; + if (yych != ' ') goto yy272; } -yy295: +yy291: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy295; - goto yy276; + if (yych == '\t') goto yy291; + goto yy272; } else { - if (yych <= ' ') goto yy295; - if (yych == '"') goto yy300; - goto yy276; + if (yych <= ' ') goto yy291; + if (yych == '"') goto yy296; + goto yy272; } -yy297: +yy293: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 441 "../src/parse/lex.re" +#line 431 "../src/parse/lex.re" { set_sourceline (); goto code; } -#line 1906 "src/parse/lex.cc" -yy299: +#line 1884 "src/parse/lex.cc" +yy295: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy297; - goto yy276; -yy300: + if (yych == '\n') goto yy293; + goto yy272; +yy296: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = (YYCTYPE)*YYCURSOR; if (yych <= '!') { - if (yych == '\n') goto yy276; - goto yy300; + if (yych == '\n') goto yy272; + goto yy296; } else { - if (yych <= '"') goto yy302; - if (yych == '\\') goto yy303; - goto yy300; + if (yych <= '"') goto yy298; + if (yych == '\\') goto yy299; + goto yy296; } -yy302: +yy298: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy297; - if (yych == '\r') goto yy299; - goto yy276; -yy303: + if (yych == '\n') goto yy293; + if (yych == '\r') goto yy295; + goto yy272; +yy299: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy276; - goto yy300; + if (yych == '\n') goto yy272; + goto yy296; } -#line 494 "../src/parse/lex.re" +#line 484 "../src/parse/lex.re" comment: -#line 1940 "src/parse/lex.cc" +#line 1918 "src/parse/lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1976,14 +1954,14 @@ comment: if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yych <= ')') { - if (yych == '\n') goto yy308; + if (yych == '\n') goto yy304; } else { - if (yych <= '*') goto yy310; - if (yych == '/') goto yy311; + if (yych <= '*') goto yy306; + if (yych == '/') goto yy307; } ++YYCURSOR; -yy307: -#line 526 "../src/parse/lex.re" +yy303: +#line 516 "../src/parse/lex.re" { if (cur == eof) { @@ -1991,15 +1969,15 @@ yy307: } goto comment; } -#line 1995 "src/parse/lex.cc" -yy308: +#line 1973 "src/parse/lex.cc" +yy304: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yybm[0+yych] & 32) { - goto yy312; + goto yy308; } - if (yych == '#') goto yy315; -yy309: -#line 517 "../src/parse/lex.re" + if (yych == '#') goto yy311; +yy305: +#line 507 "../src/parse/lex.re" { if (cur == eof) { @@ -2009,41 +1987,41 @@ yy309: cline++; goto comment; } -#line 2013 "src/parse/lex.cc" -yy310: +#line 1991 "src/parse/lex.cc" +yy306: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '/') goto yy317; - goto yy307; -yy311: + if (yych == '/') goto yy313; + goto yy303; +yy307: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '*') goto yy319; - goto yy307; -yy312: + if (yych == '*') goto yy315; + goto yy303; +yy308: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 32) { - goto yy312; + goto yy308; } - if (yych == '#') goto yy315; -yy314: + if (yych == '#') goto yy311; +yy310: YYCURSOR = YYMARKER; - goto yy309; -yy315: + goto yy305; +yy311: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy315; - goto yy314; + if (yych == '\t') goto yy311; + goto yy310; } else { - if (yych <= ' ') goto yy315; - if (yych == 'l') goto yy321; - goto yy314; + if (yych <= ' ') goto yy311; + if (yych == 'l') goto yy317; + goto yy310; } -yy317: +yy313: ++YYCURSOR; -#line 498 "../src/parse/lex.re" +#line 488 "../src/parse/lex.re" { if (--depth == 0) { @@ -2054,124 +2032,124 @@ yy317: goto comment; } } -#line 2058 "src/parse/lex.cc" -yy319: +#line 2036 "src/parse/lex.cc" +yy315: ++YYCURSOR; -#line 508 "../src/parse/lex.re" +#line 498 "../src/parse/lex.re" { ++depth; fatal("ambiguous /* found"); goto comment; } -#line 2067 "src/parse/lex.cc" -yy321: +#line 2045 "src/parse/lex.cc" +yy317: yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'i') goto yy314; + if (yych != 'i') goto yy310; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'n') goto yy314; + if (yych != 'n') goto yy310; yych = (YYCTYPE)*++YYCURSOR; - if (yych != 'e') goto yy314; + if (yych != 'e') goto yy310; yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '0') goto yy326; - if (yych <= '9') goto yy314; - goto yy326; -yy325: + if (yych <= '0') goto yy322; + if (yych <= '9') goto yy310; + goto yy322; +yy321: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; YYCTXMARKER = YYCURSOR; -yy326: +yy322: if (yych <= 0x1F) { - if (yych == '\t') goto yy325; - goto yy314; + if (yych == '\t') goto yy321; + goto yy310; } else { - if (yych <= ' ') goto yy325; - if (yych <= '0') goto yy314; - if (yych >= ':') goto yy314; + if (yych <= ' ') goto yy321; + if (yych <= '0') goto yy310; + if (yych >= ':') goto yy310; } -yy327: +yy323: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 64) { - goto yy327; + goto yy323; } if (yych <= '\f') { - if (yych <= 0x08) goto yy314; - if (yych <= '\t') goto yy329; - if (yych <= '\n') goto yy331; - goto yy314; + if (yych <= 0x08) goto yy310; + if (yych <= '\t') goto yy325; + if (yych <= '\n') goto yy327; + goto yy310; } else { - if (yych <= '\r') goto yy333; - if (yych != ' ') goto yy314; + if (yych <= '\r') goto yy329; + if (yych != ' ') goto yy310; } -yy329: +yy325: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yych <= 0x1F) { - if (yych == '\t') goto yy329; - goto yy314; + if (yych == '\t') goto yy325; + goto yy310; } else { - if (yych <= ' ') goto yy329; - if (yych == '"') goto yy334; - goto yy314; + if (yych <= ' ') goto yy325; + if (yych == '"') goto yy330; + goto yy310; } -yy331: +yy327: ++YYCURSOR; YYCURSOR = YYCTXMARKER; -#line 513 "../src/parse/lex.re" +#line 503 "../src/parse/lex.re" { set_sourceline (); goto comment; } -#line 2129 "src/parse/lex.cc" -yy333: +#line 2107 "src/parse/lex.cc" +yy329: yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy331; - goto yy314; -yy334: + if (yych == '\n') goto yy327; + goto yy310; +yy330: ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 128) { - goto yy334; + goto yy330; } - if (yych <= '\n') goto yy314; - if (yych >= '#') goto yy337; + if (yych <= '\n') goto yy310; + if (yych >= '#') goto yy333; yych = (YYCTYPE)*++YYCURSOR; - if (yych == '\n') goto yy331; - if (yych == '\r') goto yy333; - goto yy314; -yy337: + if (yych == '\n') goto yy327; + if (yych == '\r') goto yy329; + goto yy310; +yy333: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy314; - goto yy334; + if (yych == '\n') goto yy310; + goto yy330; } -#line 533 "../src/parse/lex.re" +#line 523 "../src/parse/lex.re" nextLine: -#line 2159 "src/parse/lex.cc" +#line 2137 "src/parse/lex.cc" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy342; + if (yych == '\n') goto yy338; ++YYCURSOR; -#line 544 "../src/parse/lex.re" +#line 534 "../src/parse/lex.re" { if(cur == eof) { return 0; } goto nextLine; } -#line 2172 "src/parse/lex.cc" -yy342: +#line 2150 "src/parse/lex.cc" +yy338: ++YYCURSOR; -#line 537 "../src/parse/lex.re" +#line 527 "../src/parse/lex.re" { if(cur == eof) { return 0; } @@ -2179,9 +2157,9 @@ yy342: cline++; goto scan; } -#line 2183 "src/parse/lex.cc" +#line 2161 "src/parse/lex.cc" } -#line 549 "../src/parse/lex.re" +#line 539 "../src/parse/lex.re" } @@ -2205,44 +2183,44 @@ const RegExp *Scanner::lex_cls(bool neg) uint32_t u, l; fst: -#line 2209 "src/parse/lex.cc" +#line 2187 "src/parse/lex.cc" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == ']') goto yy347; -#line 573 "../src/parse/lex.re" + if (yych == ']') goto yy343; +#line 563 "../src/parse/lex.re" { l = lex_cls_chr(); goto snd; } -#line 2217 "src/parse/lex.cc" -yy347: +#line 2195 "src/parse/lex.cc" +yy343: ++YYCURSOR; -#line 572 "../src/parse/lex.re" +#line 562 "../src/parse/lex.re" { goto end; } -#line 2222 "src/parse/lex.cc" +#line 2200 "src/parse/lex.cc" } -#line 574 "../src/parse/lex.re" +#line 564 "../src/parse/lex.re" snd: -#line 2228 "src/parse/lex.cc" +#line 2206 "src/parse/lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*(YYMARKER = YYCURSOR); - if (yych == '-') goto yy352; -yy351: -#line 577 "../src/parse/lex.re" + if (yych == '-') goto yy348; +yy347: +#line 567 "../src/parse/lex.re" { u = l; goto add; } -#line 2237 "src/parse/lex.cc" -yy352: +#line 2215 "src/parse/lex.cc" +yy348: yych = (YYCTYPE)*++YYCURSOR; - if (yych != ']') goto yy354; + if (yych != ']') goto yy350; YYCURSOR = YYMARKER; - goto yy351; -yy354: + goto yy347; +yy350: ++YYCURSOR; YYCURSOR -= 1; -#line 578 "../src/parse/lex.re" +#line 568 "../src/parse/lex.re" { u = lex_cls_chr(); if (l > u) { @@ -2251,9 +2229,9 @@ yy354: } goto add; } -#line 2255 "src/parse/lex.cc" +#line 2233 "src/parse/lex.cc" } -#line 586 "../src/parse/lex.re" +#line 576 "../src/parse/lex.re" add: if (!(s = opts->encoding.encodeRange(l, u))) { @@ -2272,290 +2250,290 @@ uint32_t Scanner::lex_cls_chr() { tok = cur; -#line 2276 "src/parse/lex.cc" +#line 2254 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy360; - if (yych == '\\') goto yy362; + if (yych == '\n') goto yy356; + if (yych == '\\') goto yy358; ++YYCURSOR; -#line 609 "../src/parse/lex.re" +#line 599 "../src/parse/lex.re" { return static_cast(tok[0]); } -#line 2287 "src/parse/lex.cc" -yy360: +#line 2265 "src/parse/lex.cc" +yy356: ++YYCURSOR; -#line 604 "../src/parse/lex.re" +#line 594 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error"); } -#line 2292 "src/parse/lex.cc" -yy362: +#line 2270 "src/parse/lex.cc" +yy358: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= '`') { if (yych <= '7') { if (yych <= ',') { - if (yych != '\n') goto yy364; + if (yych != '\n') goto yy360; } else { - if (yych <= '-') goto yy366; - if (yych <= '/') goto yy364; - if (yych <= '3') goto yy368; - goto yy370; + if (yych <= '-') goto yy362; + if (yych <= '/') goto yy360; + if (yych <= '3') goto yy364; + goto yy366; } } else { if (yych <= 'X') { - if (yych == 'U') goto yy371; - if (yych <= 'W') goto yy364; - goto yy373; + if (yych == 'U') goto yy367; + if (yych <= 'W') goto yy360; + goto yy369; } else { - if (yych <= '[') goto yy364; - if (yych <= '\\') goto yy374; - if (yych <= ']') goto yy376; - goto yy364; + if (yych <= '[') goto yy360; + if (yych <= '\\') goto yy370; + if (yych <= ']') goto yy372; + goto yy360; } } } else { if (yych <= 'q') { if (yych <= 'e') { - if (yych <= 'a') goto yy378; - if (yych <= 'b') goto yy380; - goto yy364; + if (yych <= 'a') goto yy374; + if (yych <= 'b') goto yy376; + goto yy360; } else { - if (yych <= 'f') goto yy382; - if (yych == 'n') goto yy384; - goto yy364; + if (yych <= 'f') goto yy378; + if (yych == 'n') goto yy380; + goto yy360; } } else { if (yych <= 'u') { - if (yych <= 'r') goto yy386; - if (yych <= 's') goto yy364; - if (yych <= 't') goto yy388; - goto yy373; + if (yych <= 'r') goto yy382; + if (yych <= 's') goto yy360; + if (yych <= 't') goto yy384; + goto yy369; } else { - if (yych <= 'v') goto yy390; - if (yych == 'x') goto yy392; - goto yy364; + if (yych <= 'v') goto yy386; + if (yych == 'x') goto yy388; + goto yy360; } } } -#line 607 "../src/parse/lex.re" +#line 597 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in escape sequence"); } -#line 2343 "src/parse/lex.cc" -yy364: +#line 2321 "src/parse/lex.cc" +yy360: ++YYCURSOR; -#line 622 "../src/parse/lex.re" +#line 612 "../src/parse/lex.re" { warn.useless_escape(tline, tok - pos, tok[1]); return static_cast(tok[1]); } -#line 2351 "src/parse/lex.cc" -yy366: +#line 2329 "src/parse/lex.cc" +yy362: ++YYCURSOR; -#line 620 "../src/parse/lex.re" +#line 610 "../src/parse/lex.re" { return static_cast('-'); } -#line 2356 "src/parse/lex.cc" -yy368: +#line 2334 "src/parse/lex.cc" +yy364: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy369; - if (yych <= '7') goto yy393; -yy369: -#line 606 "../src/parse/lex.re" + if (yych <= '/') goto yy365; + if (yych <= '7') goto yy389; +yy365: +#line 596 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); } -#line 2365 "src/parse/lex.cc" -yy370: +#line 2343 "src/parse/lex.cc" +yy366: yych = (YYCTYPE)*++YYCURSOR; - goto yy369; -yy371: + goto yy365; +yy367: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy372; - if (yych <= '9') goto yy395; + if (yych <= '/') goto yy368; + if (yych <= '9') goto yy391; } else { - if (yych <= 'F') goto yy395; - if (yych <= '`') goto yy372; - if (yych <= 'f') goto yy395; + if (yych <= 'F') goto yy391; + if (yych <= '`') goto yy368; + if (yych <= 'f') goto yy391; } -yy372: -#line 605 "../src/parse/lex.re" +yy368: +#line 595 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); } -#line 2383 "src/parse/lex.cc" -yy373: +#line 2361 "src/parse/lex.cc" +yy369: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy372; - if (yych <= '9') goto yy396; - goto yy372; + if (yych <= '/') goto yy368; + if (yych <= '9') goto yy392; + goto yy368; } else { - if (yych <= 'F') goto yy396; - if (yych <= '`') goto yy372; - if (yych <= 'f') goto yy396; - goto yy372; + if (yych <= 'F') goto yy392; + if (yych <= '`') goto yy368; + if (yych <= 'f') goto yy392; + goto yy368; } -yy374: +yy370: ++YYCURSOR; -#line 619 "../src/parse/lex.re" +#line 609 "../src/parse/lex.re" { return static_cast('\\'); } -#line 2401 "src/parse/lex.cc" -yy376: +#line 2379 "src/parse/lex.cc" +yy372: ++YYCURSOR; -#line 621 "../src/parse/lex.re" +#line 611 "../src/parse/lex.re" { return static_cast(']'); } -#line 2406 "src/parse/lex.cc" -yy378: +#line 2384 "src/parse/lex.cc" +yy374: ++YYCURSOR; -#line 612 "../src/parse/lex.re" +#line 602 "../src/parse/lex.re" { return static_cast('\a'); } -#line 2411 "src/parse/lex.cc" -yy380: +#line 2389 "src/parse/lex.cc" +yy376: ++YYCURSOR; -#line 613 "../src/parse/lex.re" +#line 603 "../src/parse/lex.re" { return static_cast('\b'); } -#line 2416 "src/parse/lex.cc" -yy382: +#line 2394 "src/parse/lex.cc" +yy378: ++YYCURSOR; -#line 614 "../src/parse/lex.re" +#line 604 "../src/parse/lex.re" { return static_cast('\f'); } -#line 2421 "src/parse/lex.cc" -yy384: +#line 2399 "src/parse/lex.cc" +yy380: ++YYCURSOR; -#line 615 "../src/parse/lex.re" +#line 605 "../src/parse/lex.re" { return static_cast('\n'); } -#line 2426 "src/parse/lex.cc" -yy386: +#line 2404 "src/parse/lex.cc" +yy382: ++YYCURSOR; -#line 616 "../src/parse/lex.re" +#line 606 "../src/parse/lex.re" { return static_cast('\r'); } -#line 2431 "src/parse/lex.cc" -yy388: +#line 2409 "src/parse/lex.cc" +yy384: ++YYCURSOR; -#line 617 "../src/parse/lex.re" +#line 607 "../src/parse/lex.re" { return static_cast('\t'); } -#line 2436 "src/parse/lex.cc" -yy390: +#line 2414 "src/parse/lex.cc" +yy386: ++YYCURSOR; -#line 618 "../src/parse/lex.re" +#line 608 "../src/parse/lex.re" { return static_cast('\v'); } -#line 2441 "src/parse/lex.cc" -yy392: +#line 2419 "src/parse/lex.cc" +yy388: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy372; - if (yych <= '9') goto yy397; - goto yy372; + if (yych <= '/') goto yy368; + if (yych <= '9') goto yy393; + goto yy368; } else { - if (yych <= 'F') goto yy397; - if (yych <= '`') goto yy372; - if (yych <= 'f') goto yy397; - goto yy372; + if (yych <= 'F') goto yy393; + if (yych <= '`') goto yy368; + if (yych <= 'f') goto yy393; + goto yy368; } -yy393: +yy389: yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '/') goto yy394; - if (yych <= '7') goto yy398; -yy394: + if (yych <= '/') goto yy390; + if (yych <= '7') goto yy394; +yy390: YYCURSOR = YYMARKER; if (yyaccept == 0) { - goto yy369; + goto yy365; } else { - goto yy372; + goto yy368; } -yy395: +yy391: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy394; - if (yych <= '9') goto yy400; - goto yy394; + if (yych <= '/') goto yy390; + if (yych <= '9') goto yy396; + goto yy390; } else { - if (yych <= 'F') goto yy400; - if (yych <= '`') goto yy394; - if (yych <= 'f') goto yy400; - goto yy394; + if (yych <= 'F') goto yy396; + if (yych <= '`') goto yy390; + if (yych <= 'f') goto yy396; + goto yy390; } -yy396: +yy392: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy394; - if (yych <= '9') goto yy401; - goto yy394; + if (yych <= '/') goto yy390; + if (yych <= '9') goto yy397; + goto yy390; } else { - if (yych <= 'F') goto yy401; - if (yych <= '`') goto yy394; - if (yych <= 'f') goto yy401; - goto yy394; + if (yych <= 'F') goto yy397; + if (yych <= '`') goto yy390; + if (yych <= 'f') goto yy397; + goto yy390; } -yy397: +yy393: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy394; - if (yych <= '9') goto yy402; - goto yy394; + if (yych <= '/') goto yy390; + if (yych <= '9') goto yy398; + goto yy390; } else { - if (yych <= 'F') goto yy402; - if (yych <= '`') goto yy394; - if (yych <= 'f') goto yy402; - goto yy394; + if (yych <= 'F') goto yy398; + if (yych <= '`') goto yy390; + if (yych <= 'f') goto yy398; + goto yy390; } -yy398: +yy394: ++YYCURSOR; -#line 611 "../src/parse/lex.re" +#line 601 "../src/parse/lex.re" { return unesc_oct(tok, cur); } -#line 2506 "src/parse/lex.cc" -yy400: +#line 2484 "src/parse/lex.cc" +yy396: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy394; - if (yych <= '9') goto yy404; - goto yy394; + if (yych <= '/') goto yy390; + if (yych <= '9') goto yy400; + goto yy390; } else { - if (yych <= 'F') goto yy404; - if (yych <= '`') goto yy394; - if (yych <= 'f') goto yy404; - goto yy394; + if (yych <= 'F') goto yy400; + if (yych <= '`') goto yy390; + if (yych <= 'f') goto yy400; + goto yy390; } -yy401: +yy397: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy394; - if (yych <= '9') goto yy397; - goto yy394; + if (yych <= '/') goto yy390; + if (yych <= '9') goto yy393; + goto yy390; } else { - if (yych <= 'F') goto yy397; - if (yych <= '`') goto yy394; - if (yych <= 'f') goto yy397; - goto yy394; + if (yych <= 'F') goto yy393; + if (yych <= '`') goto yy390; + if (yych <= 'f') goto yy393; + goto yy390; } -yy402: +yy398: ++YYCURSOR; -#line 610 "../src/parse/lex.re" +#line 600 "../src/parse/lex.re" { return unesc_hex(tok, cur); } -#line 2535 "src/parse/lex.cc" -yy404: +#line 2513 "src/parse/lex.cc" +yy400: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy394; - if (yych >= ':') goto yy394; + if (yych <= '/') goto yy390; + if (yych >= ':') goto yy390; } else { - if (yych <= 'F') goto yy405; - if (yych <= '`') goto yy394; - if (yych >= 'g') goto yy394; + if (yych <= 'F') goto yy401; + if (yych <= '`') goto yy390; + if (yych >= 'g') goto yy390; } -yy405: +yy401: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= '@') { - if (yych <= '/') goto yy394; - if (yych <= '9') goto yy396; - goto yy394; + if (yych <= '/') goto yy390; + if (yych <= '9') goto yy392; + goto yy390; } else { - if (yych <= 'F') goto yy396; - if (yych <= '`') goto yy394; - if (yych <= 'f') goto yy396; - goto yy394; + if (yych <= 'F') goto yy392; + if (yych <= '`') goto yy390; + if (yych <= 'f') goto yy392; + goto yy390; } } -#line 626 "../src/parse/lex.re" +#line 616 "../src/parse/lex.re" } @@ -2564,282 +2542,282 @@ uint32_t Scanner::lex_str_chr(char quote, bool &end) end = false; tok = cur; -#line 2568 "src/parse/lex.cc" +#line 2546 "src/parse/lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy410; - if (yych == '\\') goto yy412; + if (yych == '\n') goto yy406; + if (yych == '\\') goto yy408; ++YYCURSOR; -#line 639 "../src/parse/lex.re" +#line 629 "../src/parse/lex.re" { end = tok[0] == quote; return static_cast(tok[0]); } -#line 2582 "src/parse/lex.cc" -yy410: +#line 2560 "src/parse/lex.cc" +yy406: ++YYCURSOR; -#line 634 "../src/parse/lex.re" +#line 624 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error"); } -#line 2587 "src/parse/lex.cc" -yy412: +#line 2565 "src/parse/lex.cc" +yy408: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= 'a') { if (yych <= 'T') { if (yych <= '/') { - if (yych != '\n') goto yy414; + if (yych != '\n') goto yy410; } else { - if (yych <= '3') goto yy416; - if (yych <= '7') goto yy418; - goto yy414; + if (yych <= '3') goto yy412; + if (yych <= '7') goto yy414; + goto yy410; } } else { if (yych <= 'X') { - if (yych <= 'U') goto yy419; - if (yych <= 'W') goto yy414; - goto yy421; + if (yych <= 'U') goto yy415; + if (yych <= 'W') goto yy410; + goto yy417; } else { - if (yych == '\\') goto yy422; - if (yych <= '`') goto yy414; - goto yy424; + if (yych == '\\') goto yy418; + if (yych <= '`') goto yy410; + goto yy420; } } } else { if (yych <= 'r') { if (yych <= 'f') { - if (yych <= 'b') goto yy426; - if (yych <= 'e') goto yy414; - goto yy428; + if (yych <= 'b') goto yy422; + if (yych <= 'e') goto yy410; + goto yy424; } else { - if (yych == 'n') goto yy430; - if (yych <= 'q') goto yy414; - goto yy432; + if (yych == 'n') goto yy426; + if (yych <= 'q') goto yy410; + goto yy428; } } else { if (yych <= 'u') { - if (yych <= 's') goto yy414; - if (yych <= 't') goto yy434; - goto yy421; + if (yych <= 's') goto yy410; + if (yych <= 't') goto yy430; + goto yy417; } else { - if (yych <= 'v') goto yy436; - if (yych == 'x') goto yy438; - goto yy414; + if (yych <= 'v') goto yy432; + if (yych == 'x') goto yy434; + goto yy410; } } } -#line 637 "../src/parse/lex.re" +#line 627 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in escape sequence"); } -#line 2635 "src/parse/lex.cc" -yy414: +#line 2613 "src/parse/lex.cc" +yy410: ++YYCURSOR; -#line 653 "../src/parse/lex.re" +#line 643 "../src/parse/lex.re" { if (tok[1] != quote) { warn.useless_escape(tline, tok - pos, tok[1]); } return static_cast(tok[1]); } -#line 2645 "src/parse/lex.cc" -yy416: +#line 2623 "src/parse/lex.cc" +yy412: yyaccept = 0; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy417; - if (yych <= '7') goto yy439; -yy417: -#line 636 "../src/parse/lex.re" + if (yych <= '/') goto yy413; + if (yych <= '7') goto yy435; +yy413: +#line 626 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); } -#line 2654 "src/parse/lex.cc" -yy418: +#line 2632 "src/parse/lex.cc" +yy414: yych = (YYCTYPE)*++YYCURSOR; - goto yy417; -yy419: + goto yy413; +yy415: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy420; - if (yych <= '9') goto yy441; + if (yych <= '/') goto yy416; + if (yych <= '9') goto yy437; } else { - if (yych <= 'F') goto yy441; - if (yych <= '`') goto yy420; - if (yych <= 'f') goto yy441; + if (yych <= 'F') goto yy437; + if (yych <= '`') goto yy416; + if (yych <= 'f') goto yy437; } -yy420: -#line 635 "../src/parse/lex.re" +yy416: +#line 625 "../src/parse/lex.re" { fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); } -#line 2672 "src/parse/lex.cc" -yy421: +#line 2650 "src/parse/lex.cc" +yy417: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy420; - if (yych <= '9') goto yy442; - goto yy420; + if (yych <= '/') goto yy416; + if (yych <= '9') goto yy438; + goto yy416; } else { - if (yych <= 'F') goto yy442; - if (yych <= '`') goto yy420; - if (yych <= 'f') goto yy442; - goto yy420; + if (yych <= 'F') goto yy438; + if (yych <= '`') goto yy416; + if (yych <= 'f') goto yy438; + goto yy416; } -yy422: +yy418: ++YYCURSOR; -#line 652 "../src/parse/lex.re" +#line 642 "../src/parse/lex.re" { return static_cast('\\'); } -#line 2690 "src/parse/lex.cc" -yy424: +#line 2668 "src/parse/lex.cc" +yy420: ++YYCURSOR; -#line 645 "../src/parse/lex.re" +#line 635 "../src/parse/lex.re" { return static_cast('\a'); } -#line 2695 "src/parse/lex.cc" -yy426: +#line 2673 "src/parse/lex.cc" +yy422: ++YYCURSOR; -#line 646 "../src/parse/lex.re" +#line 636 "../src/parse/lex.re" { return static_cast('\b'); } -#line 2700 "src/parse/lex.cc" -yy428: +#line 2678 "src/parse/lex.cc" +yy424: ++YYCURSOR; -#line 647 "../src/parse/lex.re" +#line 637 "../src/parse/lex.re" { return static_cast('\f'); } -#line 2705 "src/parse/lex.cc" -yy430: +#line 2683 "src/parse/lex.cc" +yy426: ++YYCURSOR; -#line 648 "../src/parse/lex.re" +#line 638 "../src/parse/lex.re" { return static_cast('\n'); } -#line 2710 "src/parse/lex.cc" -yy432: +#line 2688 "src/parse/lex.cc" +yy428: ++YYCURSOR; -#line 649 "../src/parse/lex.re" +#line 639 "../src/parse/lex.re" { return static_cast('\r'); } -#line 2715 "src/parse/lex.cc" -yy434: +#line 2693 "src/parse/lex.cc" +yy430: ++YYCURSOR; -#line 650 "../src/parse/lex.re" +#line 640 "../src/parse/lex.re" { return static_cast('\t'); } -#line 2720 "src/parse/lex.cc" -yy436: +#line 2698 "src/parse/lex.cc" +yy432: ++YYCURSOR; -#line 651 "../src/parse/lex.re" +#line 641 "../src/parse/lex.re" { return static_cast('\v'); } -#line 2725 "src/parse/lex.cc" -yy438: +#line 2703 "src/parse/lex.cc" +yy434: yyaccept = 1; yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych <= '/') goto yy420; - if (yych <= '9') goto yy443; - goto yy420; + if (yych <= '/') goto yy416; + if (yych <= '9') goto yy439; + goto yy416; } else { - if (yych <= 'F') goto yy443; - if (yych <= '`') goto yy420; - if (yych <= 'f') goto yy443; - goto yy420; + if (yych <= 'F') goto yy439; + if (yych <= '`') goto yy416; + if (yych <= 'f') goto yy439; + goto yy416; } -yy439: +yy435: yych = (YYCTYPE)*++YYCURSOR; - if (yych <= '/') goto yy440; - if (yych <= '7') goto yy444; -yy440: + if (yych <= '/') goto yy436; + if (yych <= '7') goto yy440; +yy436: YYCURSOR = YYMARKER; if (yyaccept == 0) { - goto yy417; + goto yy413; } else { - goto yy420; + goto yy416; } -yy441: +yy437: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy440; - if (yych <= '9') goto yy446; - goto yy440; + if (yych <= '/') goto yy436; + if (yych <= '9') goto yy442; + goto yy436; } else { - if (yych <= 'F') goto yy446; - if (yych <= '`') goto yy440; - if (yych <= 'f') goto yy446; - goto yy440; + if (yych <= 'F') goto yy442; + if (yych <= '`') goto yy436; + if (yych <= 'f') goto yy442; + goto yy436; } -yy442: +yy438: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy440; - if (yych <= '9') goto yy447; - goto yy440; + if (yych <= '/') goto yy436; + if (yych <= '9') goto yy443; + goto yy436; } else { - if (yych <= 'F') goto yy447; - if (yych <= '`') goto yy440; - if (yych <= 'f') goto yy447; - goto yy440; + if (yych <= 'F') goto yy443; + if (yych <= '`') goto yy436; + if (yych <= 'f') goto yy443; + goto yy436; } -yy443: +yy439: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy440; - if (yych <= '9') goto yy448; - goto yy440; + if (yych <= '/') goto yy436; + if (yych <= '9') goto yy444; + goto yy436; } else { - if (yych <= 'F') goto yy448; - if (yych <= '`') goto yy440; - if (yych <= 'f') goto yy448; - goto yy440; + if (yych <= 'F') goto yy444; + if (yych <= '`') goto yy436; + if (yych <= 'f') goto yy444; + goto yy436; } -yy444: +yy440: ++YYCURSOR; -#line 644 "../src/parse/lex.re" +#line 634 "../src/parse/lex.re" { return unesc_oct(tok, cur); } -#line 2790 "src/parse/lex.cc" -yy446: +#line 2768 "src/parse/lex.cc" +yy442: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy440; - if (yych <= '9') goto yy450; - goto yy440; + if (yych <= '/') goto yy436; + if (yych <= '9') goto yy446; + goto yy436; } else { - if (yych <= 'F') goto yy450; - if (yych <= '`') goto yy440; - if (yych <= 'f') goto yy450; - goto yy440; + if (yych <= 'F') goto yy446; + if (yych <= '`') goto yy436; + if (yych <= 'f') goto yy446; + goto yy436; } -yy447: +yy443: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy440; - if (yych <= '9') goto yy443; - goto yy440; + if (yych <= '/') goto yy436; + if (yych <= '9') goto yy439; + goto yy436; } else { - if (yych <= 'F') goto yy443; - if (yych <= '`') goto yy440; - if (yych <= 'f') goto yy443; - goto yy440; + if (yych <= 'F') goto yy439; + if (yych <= '`') goto yy436; + if (yych <= 'f') goto yy439; + goto yy436; } -yy448: +yy444: ++YYCURSOR; -#line 643 "../src/parse/lex.re" +#line 633 "../src/parse/lex.re" { return unesc_hex(tok, cur); } -#line 2819 "src/parse/lex.cc" -yy450: +#line 2797 "src/parse/lex.cc" +yy446: yych = (YYCTYPE)*++YYCURSOR; if (yych <= '@') { - if (yych <= '/') goto yy440; - if (yych >= ':') goto yy440; + if (yych <= '/') goto yy436; + if (yych >= ':') goto yy436; } else { - if (yych <= 'F') goto yy451; - if (yych <= '`') goto yy440; - if (yych >= 'g') goto yy440; + if (yych <= 'F') goto yy447; + if (yych <= '`') goto yy436; + if (yych >= 'g') goto yy436; } -yy451: +yy447: ++YYCURSOR; if ((yych = (YYCTYPE)*YYCURSOR) <= '@') { - if (yych <= '/') goto yy440; - if (yych <= '9') goto yy442; - goto yy440; + if (yych <= '/') goto yy436; + if (yych <= '9') goto yy438; + goto yy436; } else { - if (yych <= 'F') goto yy442; - if (yych <= '`') goto yy440; - if (yych <= 'f') goto yy442; - goto yy440; + if (yych <= 'F') goto yy438; + if (yych <= '`') goto yy436; + if (yych <= 'f') goto yy438; + goto yy436; } } -#line 659 "../src/parse/lex.re" +#line 649 "../src/parse/lex.re" } @@ -2860,7 +2838,7 @@ void Scanner::set_sourceline () sourceline: tok = cur; -#line 2864 "src/parse/lex.cc" +#line 2842 "src/parse/lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -2900,23 +2878,23 @@ sourceline: if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = (YYCTYPE)*YYCURSOR; if (yych <= '!') { - if (yych == '\n') goto yy456; + if (yych == '\n') goto yy452; } else { - if (yych <= '"') goto yy458; - if (yych <= '0') goto yy454; - if (yych <= '9') goto yy459; + if (yych <= '"') goto yy454; + if (yych <= '0') goto yy450; + if (yych <= '9') goto yy455; } -yy454: +yy450: ++YYCURSOR; -yy455: -#line 702 "../src/parse/lex.re" +yy451: +#line 692 "../src/parse/lex.re" { goto sourceline; } -#line 2917 "src/parse/lex.cc" -yy456: +#line 2895 "src/parse/lex.cc" +yy452: ++YYCURSOR; -#line 690 "../src/parse/lex.re" +#line 680 "../src/parse/lex.re" { if (cur == eof) { @@ -2929,19 +2907,19 @@ yy456: tok = cur; return; } -#line 2933 "src/parse/lex.cc" -yy458: +#line 2911 "src/parse/lex.cc" +yy454: yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR); - if (yych == '\n') goto yy455; - goto yy463; -yy459: + if (yych == '\n') goto yy451; + goto yy459; +yy455: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; if (yybm[0+yych] & 64) { - goto yy459; + goto yy455; } -#line 679 "../src/parse/lex.re" +#line 669 "../src/parse/lex.re" { if (!s_to_u32_unsafe (tok, cur, cline)) { @@ -2949,37 +2927,37 @@ yy459: } goto sourceline; } -#line 2953 "src/parse/lex.cc" -yy462: +#line 2931 "src/parse/lex.cc" +yy458: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; -yy463: +yy459: if (yybm[0+yych] & 128) { - goto yy462; + goto yy458; } - if (yych <= '\n') goto yy464; - if (yych <= '"') goto yy465; - goto yy467; -yy464: + if (yych <= '\n') goto yy460; + if (yych <= '"') goto yy461; + goto yy463; +yy460: YYCURSOR = YYMARKER; - goto yy455; -yy465: + goto yy451; +yy461: ++YYCURSOR; -#line 686 "../src/parse/lex.re" +#line 676 "../src/parse/lex.re" { escape (in.file_name, std::string (tok + 1, tok_len () - 2)); // -2 to omit quotes goto sourceline; } -#line 2975 "src/parse/lex.cc" -yy467: +#line 2953 "src/parse/lex.cc" +yy463: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = (YYCTYPE)*YYCURSOR; - if (yych == '\n') goto yy464; - goto yy462; + if (yych == '\n') goto yy460; + goto yy458; } -#line 705 "../src/parse/lex.re" +#line 695 "../src/parse/lex.re" } diff --git a/re2c/src/parse/lex.re b/re2c/src/parse/lex.re index f0e64bab..82e6ff86 100644 --- a/re2c/src/parse/lex.re +++ b/re2c/src/parse/lex.re @@ -204,16 +204,6 @@ eoc: tok = pos = cur; goto echo; } - eoc eol { - ++cline; - if (ignored > 0) { - cline += ignored; - ignored = 0; - out.wline_info(cline, get_fname().c_str()); - } - tok = pos = cur; - goto echo; - } */ } diff --git a/re2c/test/bug1163046.c b/re2c/test/bug1163046.c index 7794fc98..4ae1138b 100644 --- a/re2c/test/bug1163046.c +++ b/re2c/test/bug1163046.c @@ -358,6 +358,7 @@ yy51: #define YYMAXFILL 45 + int main(int,void**) { int res, result = 0; diff --git a/re2c/test/calc_001.c b/re2c/test/calc_001.c index fc6b3164..59732797 100644 --- a/re2c/test/calc_001.c +++ b/re2c/test/calc_001.c @@ -1,7 +1,9 @@ /* Generated by re2c */ #line 1 "calc_001.re" /* re2c lesson 001_upn_calculator, calc_001, (c) M. Boerger 2006 - 2007 */ -#line 43 "calc_001.re" + +#line 42 "calc_001.re" + #include #include @@ -20,7 +22,7 @@ int scan(char *s, int l) for(;;) { -#line 24 "calc_001.c" +#line 26 "calc_001.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -45,22 +47,22 @@ yy2: ++YYCURSOR; #line 67 "calc_001.re" { printf("EOF\n"); return 0; } -#line 49 "calc_001.c" +#line 51 "calc_001.c" yy4: ++YYCURSOR; #line 68 "calc_001.re" { printf("ERR\n"); return 1; } -#line 54 "calc_001.c" +#line 56 "calc_001.c" yy6: ++YYCURSOR; #line 65 "calc_001.re" { printf("+\n"); continue; } -#line 59 "calc_001.c" +#line 61 "calc_001.c" yy8: ++YYCURSOR; #line 66 "calc_001.re" { printf("-\n"); continue; } -#line 64 "calc_001.c" +#line 66 "calc_001.c" yy10: ++YYCURSOR; switch ((yych = *YYCURSOR)) { @@ -79,7 +81,7 @@ yy10: yy11: #line 64 "calc_001.re" { printf("Num\n"); continue; } -#line 83 "calc_001.c" +#line 85 "calc_001.c" yy12: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -100,7 +102,7 @@ yy12: yy14: #line 63 "calc_001.re" { printf("Num\n"); continue; } -#line 104 "calc_001.c" +#line 106 "calc_001.c" yy15: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -121,7 +123,7 @@ yy15: yy17: #line 62 "calc_001.re" { printf("Oct\n"); continue; } -#line 125 "calc_001.c" +#line 127 "calc_001.c" } #line 69 "calc_001.re" diff --git a/re2c/test/calc_001.dei.c b/re2c/test/calc_001.dei.c index f57254fe..3bf3045b 100644 --- a/re2c/test/calc_001.dei.c +++ b/re2c/test/calc_001.dei.c @@ -1,6 +1,8 @@ /* Generated by re2c */ /* re2c lesson 001_upn_calculator, calc_001, (c) M. Boerger 2006 - 2007 */ + + #include #include #include diff --git a/re2c/test/calc_001.ei.c b/re2c/test/calc_001.ei.c index ac1bfa96..010a5902 100644 --- a/re2c/test/calc_001.ei.c +++ b/re2c/test/calc_001.ei.c @@ -1,6 +1,8 @@ /* Generated by re2c */ /* re2c lesson 001_upn_calculator, calc_001, (c) M. Boerger 2006 - 2007 */ + + #include #include #include diff --git a/re2c/test/calc_002.c b/re2c/test/calc_002.c index ee4e5429..f298565c 100644 --- a/re2c/test/calc_002.c +++ b/re2c/test/calc_002.c @@ -1,7 +1,9 @@ /* Generated by re2c */ #line 1 "calc_002.re" /* re2c lesson 001_upn_calculator, calc_002, (c) M. Boerger 2006 - 2007 */ -#line 19 "calc_002.re" + +#line 18 "calc_002.re" + #include #include @@ -28,7 +30,7 @@ int scan(char *s) for(;;) { -#line 32 "calc_002.c" +#line 34 "calc_002.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -53,22 +55,22 @@ yy2: ++YYCURSOR; #line 51 "calc_002.re" { printf("EOF\n"); return 0; } -#line 57 "calc_002.c" +#line 59 "calc_002.c" yy4: ++YYCURSOR; #line 52 "calc_002.re" { printf("ERR\n"); return 1; } -#line 62 "calc_002.c" +#line 64 "calc_002.c" yy6: ++YYCURSOR; #line 49 "calc_002.re" { printf("+\n"); continue; } -#line 67 "calc_002.c" +#line 69 "calc_002.c" yy8: ++YYCURSOR; #line 50 "calc_002.re" { printf("+\n"); continue; } -#line 72 "calc_002.c" +#line 74 "calc_002.c" yy10: ++YYCURSOR; switch ((yych = *YYCURSOR)) { @@ -87,7 +89,7 @@ yy10: yy11: #line 48 "calc_002.re" { printf("Num\n"); continue; } -#line 91 "calc_002.c" +#line 93 "calc_002.c" yy12: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -108,7 +110,7 @@ yy12: yy14: #line 47 "calc_002.re" { printf("Num\n"); continue; } -#line 112 "calc_002.c" +#line 114 "calc_002.c" yy15: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -129,7 +131,7 @@ yy15: yy17: #line 46 "calc_002.re" { printf("Oct\n"); continue; } -#line 133 "calc_002.c" +#line 135 "calc_002.c" } #line 53 "calc_002.re" diff --git a/re2c/test/calc_003.c b/re2c/test/calc_003.c index 0b36f286..d3067ae1 100644 --- a/re2c/test/calc_003.c +++ b/re2c/test/calc_003.c @@ -1,7 +1,9 @@ /* Generated by re2c */ #line 1 "calc_003.re" /* re2c lesson 001_upn_calculator, calc_003, (c) M. Boerger 2006 - 2007 */ -#line 19 "calc_003.re" + +#line 18 "calc_003.re" + #include #include @@ -20,7 +22,7 @@ int scan(char *s, int l) for(;;) { -#line 24 "calc_003.c" +#line 26 "calc_003.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -45,22 +47,22 @@ yy2: ++YYCURSOR; #line 43 "calc_003.re" { printf("EOF\n"); return 0; } -#line 49 "calc_003.c" +#line 51 "calc_003.c" yy4: ++YYCURSOR; #line 44 "calc_003.re" { printf("ERR\n"); return 1; } -#line 54 "calc_003.c" +#line 56 "calc_003.c" yy6: ++YYCURSOR; #line 41 "calc_003.re" { printf("+\n"); continue; } -#line 59 "calc_003.c" +#line 61 "calc_003.c" yy8: ++YYCURSOR; #line 42 "calc_003.re" { printf("+\n"); continue; } -#line 64 "calc_003.c" +#line 66 "calc_003.c" yy10: ++YYCURSOR; switch ((yych = *YYCURSOR)) { @@ -79,7 +81,7 @@ yy10: yy11: #line 40 "calc_003.re" { printf("Num\n"); continue; } -#line 83 "calc_003.c" +#line 85 "calc_003.c" yy12: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -100,7 +102,7 @@ yy12: yy14: #line 39 "calc_003.re" { printf("Num\n"); continue; } -#line 104 "calc_003.c" +#line 106 "calc_003.c" yy15: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -121,7 +123,7 @@ yy15: yy17: #line 38 "calc_003.re" { printf("Oct\n"); continue; } -#line 125 "calc_003.c" +#line 127 "calc_003.c" } #line 45 "calc_003.re" diff --git a/re2c/test/calc_004.c b/re2c/test/calc_004.c index 3246dc99..a984288f 100644 --- a/re2c/test/calc_004.c +++ b/re2c/test/calc_004.c @@ -1,7 +1,9 @@ /* Generated by re2c */ #line 1 "calc_004.re" /* re2c lesson 001_upn_calculator, calc_004, (c) M. Boerger 2006 - 2007 */ -#line 20 "calc_004.re" + +#line 19 "calc_004.re" + #include #include @@ -32,7 +34,7 @@ int scan(char *s, int l) { t = p; -#line 36 "calc_004.c" +#line 38 "calc_004.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -57,22 +59,22 @@ yy2: ++YYCURSOR; #line 60 "calc_004.re" { printf("EOF\n"); return 0; } -#line 61 "calc_004.c" +#line 63 "calc_004.c" yy4: ++YYCURSOR; #line 61 "calc_004.re" { printf("ERR\n"); return 1; } -#line 66 "calc_004.c" +#line 68 "calc_004.c" yy6: ++YYCURSOR; #line 58 "calc_004.re" { printf("+\n"); continue; } -#line 71 "calc_004.c" +#line 73 "calc_004.c" yy8: ++YYCURSOR; #line 59 "calc_004.re" { printf("+\n"); continue; } -#line 76 "calc_004.c" +#line 78 "calc_004.c" yy10: ++YYCURSOR; switch ((yych = *YYCURSOR)) { @@ -91,7 +93,7 @@ yy10: yy11: #line 57 "calc_004.re" { t = tokendup(t, p); printf("Num: %s\n", t); free(t); continue; } -#line 95 "calc_004.c" +#line 97 "calc_004.c" yy12: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -129,7 +131,7 @@ yy14: yy16: #line 56 "calc_004.re" { t = tokendup(t, p); printf("Oct: %s\n", t); free(t); continue; } -#line 133 "calc_004.c" +#line 135 "calc_004.c" } #line 62 "calc_004.re" diff --git a/re2c/test/calc_005.c b/re2c/test/calc_005.c index 2f3951aa..1739a9c0 100644 --- a/re2c/test/calc_005.c +++ b/re2c/test/calc_005.c @@ -1,7 +1,9 @@ /* Generated by re2c */ #line 1 "calc_005.re" /* re2c lesson 001_upn_calculator, calc_005, (c) M. Boerger 2006 - 2007 */ -#line 19 "calc_005.re" + +#line 18 "calc_005.re" + #include #include @@ -67,7 +69,7 @@ int scan(char *s, int l) { t = p; -#line 71 "calc_005.c" +#line 73 "calc_005.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -93,7 +95,7 @@ yy2: ++YYCURSOR; #line 96 "calc_005.re" { res = 1; continue; } -#line 97 "calc_005.c" +#line 99 "calc_005.c" yy4: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -106,17 +108,17 @@ yy4: yy6: #line 91 "calc_005.re" { continue; } -#line 110 "calc_005.c" +#line 112 "calc_005.c" yy7: ++YYCURSOR; #line 94 "calc_005.re" { res = stack_add(); continue; } -#line 115 "calc_005.c" +#line 117 "calc_005.c" yy9: ++YYCURSOR; #line 95 "calc_005.re" { res = stack_sub(); continue; } -#line 120 "calc_005.c" +#line 122 "calc_005.c" yy11: ++YYCURSOR; switch ((yych = *YYCURSOR)) { @@ -135,7 +137,7 @@ yy11: yy12: #line 93 "calc_005.re" { res = push_num(t, p, 10); continue; } -#line 139 "calc_005.c" +#line 141 "calc_005.c" yy13: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -173,7 +175,7 @@ yy15: yy17: #line 92 "calc_005.re" { res = push_num(t, p, 8); continue; } -#line 177 "calc_005.c" +#line 179 "calc_005.c" } #line 97 "calc_005.re" diff --git a/re2c/test/calc_006.s.c b/re2c/test/calc_006.s.c index 3a92f30f..ebcb8e4e 100644 --- a/re2c/test/calc_006.s.c +++ b/re2c/test/calc_006.s.c @@ -1,7 +1,9 @@ /* Generated by re2c */ #line 1 "calc_006.s.re" /* re2c lesson 001_upn_calculator, calc_006, (c) M. Boerger 2006 - 2007 */ -#line 36 "calc_006.s.re" + +#line 35 "calc_006.s.re" + #include #include @@ -65,7 +67,7 @@ int scan(char *s) { t = p; -#line 69 "calc_006.s.c" +#line 71 "calc_006.s.c" { YYCTYPE yych; yych = *YYCURSOR; @@ -94,12 +96,12 @@ yy2: ++YYCURSOR; #line 112 "calc_006.s.re" { res = depth == 1 ? 0 : 2; break; } -#line 98 "calc_006.s.c" +#line 100 "calc_006.s.c" yy4: ++YYCURSOR; #line 113 "calc_006.s.re" { res = 1; continue; } -#line 103 "calc_006.s.c" +#line 105 "calc_006.s.c" yy6: ++YYCURSOR; yych = *YYCURSOR; @@ -107,17 +109,17 @@ yy6: if (yych == ' ') goto yy6; #line 107 "calc_006.s.re" { continue; } -#line 111 "calc_006.s.c" +#line 113 "calc_006.s.c" yy9: ++YYCURSOR; #line 110 "calc_006.s.re" { res = stack_add(); continue; } -#line 116 "calc_006.s.c" +#line 118 "calc_006.s.c" yy11: ++YYCURSOR; #line 111 "calc_006.s.re" { res = stack_sub(); continue; } -#line 121 "calc_006.s.c" +#line 123 "calc_006.s.c" yy13: ++YYCURSOR; if ((yych = *YYCURSOR) <= '/') goto yy14; @@ -125,7 +127,7 @@ yy13: yy14: #line 109 "calc_006.s.re" { res = push_num(t, p, 10); continue; } -#line 129 "calc_006.s.c" +#line 131 "calc_006.s.c" yy15: ++YYCURSOR; yych = *YYCURSOR; @@ -140,7 +142,7 @@ yy17: yy19: #line 108 "calc_006.s.re" { res = push_num(t, p, 8); continue; } -#line 144 "calc_006.s.c" +#line 146 "calc_006.s.c" } #line 114 "calc_006.s.re" diff --git a/re2c/test/calc_007.b.c b/re2c/test/calc_007.b.c index 5dd2979f..82319660 100644 --- a/re2c/test/calc_007.b.c +++ b/re2c/test/calc_007.b.c @@ -1,7 +1,9 @@ /* Generated by re2c */ #line 1 "calc_007.b.re" /* re2c lesson 001_upn_calculator, calc_007, (c) M. Boerger 2006 - 2007 */ -#line 9 "calc_007.b.re" + +#line 8 "calc_007.b.re" + #include #include @@ -65,7 +67,7 @@ int scan(char *s) { t = p; -#line 69 "calc_007.b.c" +#line 71 "calc_007.b.c" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -124,12 +126,12 @@ yy2: ++YYCURSOR; #line 85 "calc_007.b.re" { res = depth == 1 ? 0 : 2; break; } -#line 128 "calc_007.b.c" +#line 130 "calc_007.b.c" yy4: ++YYCURSOR; #line 86 "calc_007.b.re" { res = 1; continue; } -#line 133 "calc_007.b.c" +#line 135 "calc_007.b.c" yy6: ++YYCURSOR; yych = *YYCURSOR; @@ -138,17 +140,17 @@ yy6: } #line 80 "calc_007.b.re" { continue; } -#line 142 "calc_007.b.c" +#line 144 "calc_007.b.c" yy9: ++YYCURSOR; #line 83 "calc_007.b.re" { res = stack_add(); continue; } -#line 147 "calc_007.b.c" +#line 149 "calc_007.b.c" yy11: ++YYCURSOR; #line 84 "calc_007.b.re" { res = stack_sub(); continue; } -#line 152 "calc_007.b.c" +#line 154 "calc_007.b.c" yy13: ++YYCURSOR; if ((yych = *YYCURSOR) <= '/') goto yy14; @@ -156,7 +158,7 @@ yy13: yy14: #line 82 "calc_007.b.re" { res = push_num(t, p, 10); continue; } -#line 160 "calc_007.b.c" +#line 162 "calc_007.b.c" yy15: ++YYCURSOR; yych = *YYCURSOR; @@ -172,7 +174,7 @@ yy17: yy19: #line 81 "calc_007.b.re" { res = push_num(t, p, 8); continue; } -#line 176 "calc_007.b.c" +#line 178 "calc_007.b.c" } #line 87 "calc_007.b.re" diff --git a/re2c/test/calc_008.b--skeleton.c b/re2c/test/calc_008.b--skeleton.c index a42e3aad4798f7f132ed6c9cdb6fd47941aa3862..5b9f9f83880ebd4c6855ceac78adcc6cf88611ae 100644 GIT binary patch delta 14 WcmZ3nnsMc7#to~OH?L&=9|!<4rUteE delta 14 WcmZ3vnsLQy#to~OH?L;?7YG0{uLidO diff --git a/re2c/test/calc_008.b.c b/re2c/test/calc_008.b.c index a30d2257..875935b1 100644 --- a/re2c/test/calc_008.b.c +++ b/re2c/test/calc_008.b.c @@ -1,7 +1,9 @@ /* Generated by re2c */ #line 1 "calc_008.b.re" /* re2c lesson 001_upn_calculator, calc_008, (c) M. Boerger 2006 - 2007 */ -#line 31 "calc_008.b.re" + +#line 30 "calc_008.b.re" + #include #include @@ -61,7 +63,7 @@ int scan(char *p) { t = p; -#line 65 "calc_008.b.c" +#line 67 "calc_008.b.c" { unsigned char curr; static const unsigned char yybm[] = { @@ -120,12 +122,12 @@ scan2: ++p; #line 108 "calc_008.b.re" { res = depth == 1 ? 0 : 2; break; } -#line 124 "calc_008.b.c" +#line 126 "calc_008.b.c" scan4: ++p; #line 109 "calc_008.b.re" { res = 1; continue; } -#line 129 "calc_008.b.c" +#line 131 "calc_008.b.c" scan6: ++p; curr = (unsigned char)*p; @@ -134,17 +136,17 @@ scan6: } #line 103 "calc_008.b.re" { continue; } -#line 138 "calc_008.b.c" +#line 140 "calc_008.b.c" scan9: ++p; #line 106 "calc_008.b.re" { res = stack_add(); continue; } -#line 143 "calc_008.b.c" +#line 145 "calc_008.b.c" scan11: ++p; #line 107 "calc_008.b.re" { res = stack_sub(); continue; } -#line 148 "calc_008.b.c" +#line 150 "calc_008.b.c" scan13: ++p; if ((curr = (unsigned char)*p) <= '/') goto scan14; @@ -152,7 +154,7 @@ scan13: scan14: #line 105 "calc_008.b.re" { res = push_num(t, p, 10); continue; } -#line 156 "calc_008.b.c" +#line 158 "calc_008.b.c" scan15: ++p; curr = (unsigned char)*p; @@ -168,7 +170,7 @@ scan17: scan19: #line 104 "calc_008.b.re" { res = push_num(t, p, 8); continue; } -#line 172 "calc_008.b.c" +#line 174 "calc_008.b.c" } #line 110 "calc_008.b.re" diff --git a/re2c/test/condition_06.cs.c b/re2c/test/condition_06.cs.c index 511c3b52..7a2096e1 100644 --- a/re2c/test/condition_06.cs.c +++ b/re2c/test/condition_06.cs.c @@ -64,6 +64,7 @@ enum YYCONDTYPE { #line 54 "condition_06.cs.re" + void scan(Scanner *s) { int cond = EStateNormal; @@ -74,7 +75,7 @@ void scan(Scanner *s) { s->tok = s->cur; -#line 78 "condition_06.cs.c" +#line 79 "condition_06.cs.c" { unsigned char yych; if (cond < 2) { @@ -101,7 +102,7 @@ yy4: { goto yyc_Comment; } -#line 105 "condition_06.cs.c" +#line 106 "condition_06.cs.c" yy5: yych = *++s->cur; if (yych != '/') goto yy4; @@ -110,7 +111,7 @@ yy5: { continue; } -#line 114 "condition_06.cs.c" +#line 115 "condition_06.cs.c" /* *********************************** */ yyc_Normal: if ((s->lim - s->cur) < 3) { if(fill(s, 3) >= 0) break; } @@ -128,7 +129,7 @@ yy11: fputc(*s->tok, stdout); continue; } -#line 132 "condition_06.cs.c" +#line 133 "condition_06.cs.c" yy12: ++s->cur; #line 134 "condition_06.cs.re" @@ -137,7 +138,7 @@ yy12: state = EStateString; continue; } -#line 141 "condition_06.cs.c" +#line 142 "condition_06.cs.c" yy14: yych = *++s->cur; if (yych == '*') goto yy16; @@ -153,14 +154,14 @@ yy16: { goto yyc_Comment; } -#line 157 "condition_06.cs.c" +#line 158 "condition_06.cs.c" yy18: ++s->cur; #line 130 "condition_06.cs.re" { goto yyc_Skiptoeol; } -#line 164 "condition_06.cs.c" +#line 165 "condition_06.cs.c" yy20: yych = *++s->cur; switch (yych) { @@ -185,7 +186,7 @@ yy22: fputc('|', stdout); continue; } -#line 189 "condition_06.cs.c" +#line 190 "condition_06.cs.c" yy24: ++s->cur; #line 111 "condition_06.cs.re" @@ -193,7 +194,7 @@ yy24: fputc('^', stdout); continue; } -#line 197 "condition_06.cs.c" +#line 198 "condition_06.cs.c" yy26: ++s->cur; #line 81 "condition_06.cs.re" @@ -201,7 +202,7 @@ yy26: fputc('[', stdout); continue; } -#line 205 "condition_06.cs.c" +#line 206 "condition_06.cs.c" yy28: ++s->cur; #line 86 "condition_06.cs.re" @@ -209,7 +210,7 @@ yy28: fputc(']', stdout); continue; } -#line 213 "condition_06.cs.c" +#line 214 "condition_06.cs.c" yy30: ++s->cur; #line 121 "condition_06.cs.re" @@ -217,7 +218,7 @@ yy30: fputc('~', stdout); continue; } -#line 221 "condition_06.cs.c" +#line 222 "condition_06.cs.c" yy32: ++s->cur; #line 106 "condition_06.cs.re" @@ -225,7 +226,7 @@ yy32: fputc('\\', stdout); continue; } -#line 229 "condition_06.cs.c" +#line 230 "condition_06.cs.c" yy34: ++s->cur; #line 91 "condition_06.cs.re" @@ -233,7 +234,7 @@ yy34: fputc('{', stdout); continue; } -#line 237 "condition_06.cs.c" +#line 238 "condition_06.cs.c" yy36: ++s->cur; #line 101 "condition_06.cs.re" @@ -241,7 +242,7 @@ yy36: fputc('#', stdout); continue; } -#line 245 "condition_06.cs.c" +#line 246 "condition_06.cs.c" yy38: ++s->cur; #line 96 "condition_06.cs.re" @@ -249,7 +250,7 @@ yy38: fputc('}', stdout); continue; } -#line 253 "condition_06.cs.c" +#line 254 "condition_06.cs.c" /* *********************************** */ yyc_Skiptoeol: if ((s->lim - s->cur) < 5) { if(fill(s, 5) >= 0) break; } @@ -266,14 +267,14 @@ yy43: { goto yyc_Skiptoeol; } -#line 270 "condition_06.cs.c" +#line 271 "condition_06.cs.c" yy44: ++s->cur; #line 161 "condition_06.cs.re" { continue; } -#line 277 "condition_06.cs.c" +#line 278 "condition_06.cs.c" yy46: yych = *(s->tok = ++s->cur); if (yych == '?') goto yy48; @@ -295,7 +296,7 @@ yy50: { goto yyc_Skiptoeol; } -#line 299 "condition_06.cs.c" +#line 300 "condition_06.cs.c" yy52: yych = *++s->cur; if (yych == '\n') goto yy50; @@ -311,7 +312,7 @@ yy54: { goto yyc_Skiptoeol; } -#line 315 "condition_06.cs.c" +#line 316 "condition_06.cs.c" yy56: ++s->cur; if ((yych = *s->cur) == '\n') goto yy54; @@ -329,7 +330,7 @@ yy60: fputc(*s->tok, stdout); continue; } -#line 333 "condition_06.cs.c" +#line 334 "condition_06.cs.c" yy61: ++s->cur; #line 174 "condition_06.cs.re" @@ -337,7 +338,7 @@ yy61: fputc(*s->tok, stdout); continue; } -#line 341 "condition_06.cs.c" +#line 342 "condition_06.cs.c" yy63: yych = *++s->cur; if (yych == '\n') goto yy60; @@ -347,7 +348,7 @@ yy63: fputl((const char*)s->tok, 2, stdout); continue; } -#line 351 "condition_06.cs.c" +#line 352 "condition_06.cs.c" } #line 183 "condition_06.cs.re" diff --git a/re2c/test/condition_07.cbi.c b/re2c/test/condition_07.cbi.c index bc6686ca..ada83c2a 100644 --- a/re2c/test/condition_07.cbi.c +++ b/re2c/test/condition_07.cbi.c @@ -59,6 +59,7 @@ enum YYCONDTYPE { }; + void scan(Scanner *s) { int cond = EStateR1; diff --git a/re2c/test/condition_08.cbi.c b/re2c/test/condition_08.cbi.c index 163bb18e..f4265f86 100644 --- a/re2c/test/condition_08.cbi.c +++ b/re2c/test/condition_08.cbi.c @@ -14,6 +14,7 @@ enum ScanContition { }; + typedef struct Scanner { FILE *fp; diff --git a/re2c/test/condition_08.cbif.c b/re2c/test/condition_08.cbif.c index bf268fcb..6c8aa6f9 100644 --- a/re2c/test/condition_08.cbif.c +++ b/re2c/test/condition_08.cbif.c @@ -14,6 +14,7 @@ enum ScanContition { }; + typedef struct Scanner { FILE *fp; diff --git a/re2c/test/condition_09.cbif.c b/re2c/test/condition_09.cbif.c index 6db30936..eb4ee4d3 100644 --- a/re2c/test/condition_09.cbif.c +++ b/re2c/test/condition_09.cbif.c @@ -14,6 +14,7 @@ enum ScanContition { }; + typedef struct Scanner { FILE *fp; @@ -85,6 +86,7 @@ void scan(Scanner *s) case 2: goto yyFillLabel2; case 3: goto yyFillLabel3; } + for(;;) { s->tok = s->cur; diff --git a/re2c/test/condition_09.cgif.c b/re2c/test/condition_09.cgif.c index 49cebe36..731afa5c 100644 --- a/re2c/test/condition_09.cgif.c +++ b/re2c/test/condition_09.cgif.c @@ -14,6 +14,7 @@ enum ScanContition { }; + typedef struct Scanner { FILE *fp; @@ -85,6 +86,7 @@ void scan(Scanner *s) case 2: goto yyFillLabel2; case 3: goto yyFillLabel3; } + for(;;) { s->tok = s->cur; diff --git a/re2c/test/condition_10.cgif.c b/re2c/test/condition_10.cgif.c index 5a19f91d..1d92fbe2 100644 --- a/re2c/test/condition_10.cgif.c +++ b/re2c/test/condition_10.cgif.c @@ -14,6 +14,7 @@ enum ScanContition { }; + typedef struct Scanner { FILE *fp; @@ -85,6 +86,7 @@ void scan(Scanner *s) case 2: goto yyFillLabel2; case 3: goto yyFillLabel3; } + for(;;) { s->tok = s->cur; diff --git a/re2c/test/condition_12.cgif.c b/re2c/test/condition_12.cgif.c index dd6438d5..058f0b24 100644 --- a/re2c/test/condition_12.cgif.c +++ b/re2c/test/condition_12.cgif.c @@ -14,6 +14,7 @@ enum ScanContition { }; + typedef struct Scanner { FILE *fp; @@ -85,6 +86,7 @@ void scan(Scanner *s) case 2: goto yyFillLabel2; case 3: goto yyFillLabel3; } + for(;;) { s->tok = s->cur; diff --git a/re2c/test/condition_14.cbif.c b/re2c/test/condition_14.cbif.c index ed015573..4cd54dda 100644 --- a/re2c/test/condition_14.cbif.c +++ b/re2c/test/condition_14.cbif.c @@ -14,6 +14,7 @@ enum ScanContition { }; + typedef struct Scanner { FILE *fp; @@ -85,6 +86,7 @@ void scan(Scanner *s) case 2: goto yyFillLabel2; case 3: goto yyFillLabel3; } + for(;;) { s->tok = s->cur; diff --git a/re2c/test/condition_14.cgif.c b/re2c/test/condition_14.cgif.c index 7cb4aed0..10aaab10 100644 --- a/re2c/test/condition_14.cgif.c +++ b/re2c/test/condition_14.cgif.c @@ -14,6 +14,7 @@ enum ScanContition { }; + typedef struct Scanner { FILE *fp; @@ -85,6 +86,7 @@ void scan(Scanner *s) case 2: goto yyFillLabel2; case 3: goto yyFillLabel3; } + for(;;) { s->tok = s->cur; diff --git a/re2c/test/condition_14.cif.c b/re2c/test/condition_14.cif.c index e374ae4c..64b5024b 100644 --- a/re2c/test/condition_14.cif.c +++ b/re2c/test/condition_14.cif.c @@ -14,6 +14,7 @@ enum ScanContition { }; + typedef struct Scanner { FILE *fp; @@ -85,6 +86,7 @@ void scan(Scanner *s) case 2: goto yyFillLabel2; case 3: goto yyFillLabel3; } + for(;;) { s->tok = s->cur; diff --git a/re2c/test/condition_14.csif.c b/re2c/test/condition_14.csif.c index ed015573..4cd54dda 100644 --- a/re2c/test/condition_14.csif.c +++ b/re2c/test/condition_14.csif.c @@ -14,6 +14,7 @@ enum ScanContition { }; + typedef struct Scanner { FILE *fp; @@ -85,6 +86,7 @@ void scan(Scanner *s) case 2: goto yyFillLabel2; case 3: goto yyFillLabel3; } + for(;;) { s->tok = s->cur; diff --git a/re2c/test/condition_15.csif.c b/re2c/test/condition_15.csif.c index 2c38f451..ea6e13c0 100644 --- a/re2c/test/condition_15.csif.c +++ b/re2c/test/condition_15.csif.c @@ -14,6 +14,7 @@ enum ScanContition { }; + typedef struct Scanner { FILE *fp; @@ -85,6 +86,7 @@ void scan(Scanner *s) case 2: goto yyFillLabel2; case 3: goto yyFillLabel3; } + for(;;) { s->tok = s->cur; diff --git a/re2c/test/condtype_decl.c.c b/re2c/test/condtype_decl.c.c index fbdd797f..a198c542 100644 --- a/re2c/test/condtype_decl.c.c +++ b/re2c/test/condtype_decl.c.c @@ -9,13 +9,14 @@ enum YYCONDTYPE { #line 1 "condtype_decl.c.re" + int main () { YYCONDTYPE cond; char * YYCURSOR; #define YYGETCONDITION() cond -#line 19 "condtype_decl.c.c" +#line 20 "condtype_decl.c.c" { unsigned char yych; switch (YYGETCONDITION()) { @@ -34,7 +35,7 @@ yy4: ++YYCURSOR; #line 11 "condtype_decl.c.re" {} -#line 38 "condtype_decl.c.c" +#line 39 "condtype_decl.c.c" /* *********************************** */ yyc_b: yych = *YYCURSOR; @@ -47,7 +48,7 @@ yy9: ++YYCURSOR; #line 12 "condtype_decl.c.re" {} -#line 51 "condtype_decl.c.c" +#line 52 "condtype_decl.c.c" } #line 13 "condtype_decl.c.re" diff --git a/re2c/test/condtype_decl.cg.c b/re2c/test/condtype_decl.cg.c index 2daa7816..82d5a521 100644 --- a/re2c/test/condtype_decl.cg.c +++ b/re2c/test/condtype_decl.cg.c @@ -9,13 +9,14 @@ enum YYCONDTYPE { #line 1 "condtype_decl.cg.re" + int main () { YYCONDTYPE cond; char * YYCURSOR; #define YYGETCONDITION() cond -#line 19 "condtype_decl.cg.c" +#line 20 "condtype_decl.cg.c" { unsigned char yych; static void *yyctable[2] = { @@ -31,7 +32,7 @@ yy4: ++YYCURSOR; #line 11 "condtype_decl.cg.re" {} -#line 35 "condtype_decl.cg.c" +#line 36 "condtype_decl.cg.c" /* *********************************** */ yyc_b: yych = *YYCURSOR; @@ -40,7 +41,7 @@ yy9: ++YYCURSOR; #line 12 "condtype_decl.cg.re" {} -#line 44 "condtype_decl.cg.c" +#line 45 "condtype_decl.cg.c" } #line 13 "condtype_decl.cg.re" diff --git a/re2c/test/condtype_decl.cs.c b/re2c/test/condtype_decl.cs.c index ed60c695..0ec9e9b9 100644 --- a/re2c/test/condtype_decl.cs.c +++ b/re2c/test/condtype_decl.cs.c @@ -9,13 +9,14 @@ enum YYCONDTYPE { #line 1 "condtype_decl.cs.re" + int main () { YYCONDTYPE cond; char * YYCURSOR; #define YYGETCONDITION() cond -#line 19 "condtype_decl.cs.c" +#line 20 "condtype_decl.cs.c" { unsigned char yych; if (YYGETCONDITION() < 1) { @@ -31,7 +32,7 @@ yy4: ++YYCURSOR; #line 11 "condtype_decl.cs.re" {} -#line 35 "condtype_decl.cs.c" +#line 36 "condtype_decl.cs.c" /* *********************************** */ yyc_b: yych = *YYCURSOR; @@ -40,7 +41,7 @@ yy9: ++YYCURSOR; #line 12 "condtype_decl.cs.re" {} -#line 44 "condtype_decl.cs.c" +#line 45 "condtype_decl.cs.c" } #line 13 "condtype_decl.cs.re" diff --git a/re2c/test/condtype_forwdecl.cg.c b/re2c/test/condtype_forwdecl.cg.c index 425031c1..5253dd4e 100644 --- a/re2c/test/condtype_forwdecl.cg.c +++ b/re2c/test/condtype_forwdecl.cg.c @@ -48,5 +48,6 @@ enum cond_t : int { }; #line 18 "condtype_forwdecl.cg.re" + re2c: warning: line 14: control flow in condition 'a' is undefined for strings that match '[\x0-\x60\x62-\xFF]', use default rule '*' [-Wundefined-control-flow] re2c: warning: line 14: control flow in condition 'b' is undefined for strings that match '[\x0-\x61\x63-\xFF]', use default rule '*' [-Wundefined-control-flow] diff --git a/re2c/test/condtype_forwdecl.cs.c b/re2c/test/condtype_forwdecl.cs.c index d3a4d7e8..6419423c 100644 --- a/re2c/test/condtype_forwdecl.cs.c +++ b/re2c/test/condtype_forwdecl.cs.c @@ -48,5 +48,6 @@ enum cond_t : int { }; #line 18 "condtype_forwdecl.cs.re" + re2c: warning: line 14: control flow in condition 'a' is undefined for strings that match '[\x0-\x60\x62-\xFF]', use default rule '*' [-Wundefined-control-flow] re2c: warning: line 14: control flow in condition 'b' is undefined for strings that match '[\x0-\x61\x63-\xFF]', use default rule '*' [-Wundefined-control-flow] diff --git a/re2c/test/config4f.f.c b/re2c/test/config4f.f.c index 7033346c..172699f5 100644 --- a/re2c/test/config4f.f.c +++ b/re2c/test/config4f.f.c @@ -18,10 +18,11 @@ char *scan(char *p) case 1: goto yyFillLabel1; } + // after getstate -#line 25 "config4f.f.c" +#line 26 "config4f.f.c" yy0: YYSETSTATE(0); @@ -45,7 +46,7 @@ yy2: ++YYCURSOR; #line 22 "config4f.f.re" { return NULL; } -#line 49 "config4f.f.c" +#line 50 "config4f.f.c" yy4: ++YYCURSOR; YYSETSTATE(1); @@ -68,7 +69,7 @@ yyFillLabel1: yy6: #line 21 "config4f.f.re" { return YYCURSOR; } -#line 72 "config4f.f.c" +#line 73 "config4f.f.c" #line 23 "config4f.f.re" } diff --git a/re2c/test/config4g.ifs.c b/re2c/test/config4g.ifs.c index e988acbc..55ce5168 100644 --- a/re2c/test/config4g.ifs.c +++ b/re2c/test/config4g.ifs.c @@ -14,6 +14,7 @@ const unsigned char *scan(const unsigned char *p, unsigned int len, int *state) } + yy0: *state = 0; if (p >= e) { diff --git a/re2c/test/config5.c b/re2c/test/config5.c index 6953f2a8..57acbcbc 100644 --- a/re2c/test/config5.c +++ b/re2c/test/config5.c @@ -1,10 +1,12 @@ /* Generated by re2c */ #line 1 "config5.re" // ignored -#line 7 "config5.re" + +#line 6 "config5.re" + // code -#line 8 "config5.c" +#line 10 "config5.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -18,7 +20,7 @@ yy2: yy3: #line 11 "config5.re" { return 0; } -#line 22 "config5.c" +#line 24 "config5.c" yy4: yych = *(YYMARKER = ++YYCURSOR); switch (yych) { @@ -53,13 +55,17 @@ yy10: ++YYCURSOR; #line 10 "config5.re" { return 1; } -#line 57 "config5.c" +#line 59 "config5.c" } #line 13 "config5.re" // ignored -#line 20 "config5.re" + +#line 19 "config5.re" + // max #define YYMAXFILL 3 -#line 26 "config5.re" + +#line 25 "config5.re" + // eof diff --git a/re2c/test/ctx.b.c b/re2c/test/ctx.b.c index 9d8f73bc..e18a2de6 100644 --- a/re2c/test/ctx.b.c +++ b/re2c/test/ctx.b.c @@ -157,6 +157,7 @@ yy14: #define YYMAXFILL 3 + int main(int,char**) { Scanner s("a77 a1 b8 b1"); diff --git a/re2c/test/ctx.c b/re2c/test/ctx.c index 20b11e59..098ef334 100644 --- a/re2c/test/ctx.c +++ b/re2c/test/ctx.c @@ -173,6 +173,7 @@ yy14: #define YYMAXFILL 3 + int main(int,char**) { Scanner s("a77 a1 b8 b1"); diff --git a/re2c/test/ctx.s.c b/re2c/test/ctx.s.c index 87d7feaa..1b9dd285 100644 --- a/re2c/test/ctx.s.c +++ b/re2c/test/ctx.s.c @@ -124,6 +124,7 @@ yy14: #define YYMAXFILL 3 + int main(int,char**) { Scanner s("a77 a1 b8 b1"); diff --git a/re2c/test/error13.1.c b/re2c/test/error13.1.c index 64b41ff8..bbcc9f85 100644 --- a/re2c/test/error13.1.c +++ b/re2c/test/error13.1.c @@ -3,7 +3,8 @@ #define YYMAXFILL 3 -#line 7 "error13.1.c" + +#line 8 "error13.1.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); @@ -17,7 +18,7 @@ yy2: yy3: #line 6 "error13.1.re" { return 0; } -#line 21 "error13.1.c" +#line 22 "error13.1.c" yy4: yych = *(YYMARKER = ++YYCURSOR); switch (yych) { @@ -38,12 +39,12 @@ yy7: ++YYCURSOR; #line 4 "error13.1.re" { return 1; } -#line 42 "error13.1.c" +#line 43 "error13.1.c" yy9: ++YYCURSOR; #line 5 "error13.1.re" { return 2; } -#line 47 "error13.1.c" +#line 48 "error13.1.c" } #line 7 "error13.1.re" diff --git a/re2c/test/error13.c b/re2c/test/error13.c index 7f0ed325..042ad194 100644 --- a/re2c/test/error13.c +++ b/re2c/test/error13.c @@ -3,7 +3,8 @@ #define YYMAXFILL 3 -#line 7 "error13.c" + +#line 8 "error13.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); @@ -17,7 +18,7 @@ yy2: yy3: #line 6 "error13.re" { return 0; } -#line 21 "error13.c" +#line 22 "error13.c" yy4: yych = *(YYMARKER = ++YYCURSOR); switch (yych) { @@ -38,12 +39,12 @@ yy7: ++YYCURSOR; #line 4 "error13.re" { return 1; } -#line 42 "error13.c" +#line 43 "error13.c" yy9: ++YYCURSOR; #line 5 "error13.re" { return 2; } -#line 47 "error13.c" +#line 48 "error13.c" } #line 7 "error13.re" diff --git a/re2c/test/error14.1.c b/re2c/test/error14.1.c index ead32206..f3f6c68c 100644 --- a/re2c/test/error14.1.c +++ b/re2c/test/error14.1.c @@ -48,4 +48,6 @@ yy9: #define YYMAXFILL 3 + #define YYMAXFILL 3 + diff --git a/re2c/test/error14.c b/re2c/test/error14.c index 4d4f4d67..3dc5c976 100644 --- a/re2c/test/error14.c +++ b/re2c/test/error14.c @@ -48,4 +48,6 @@ yy9: #define YYMAXFILL 3 + #define YYMAXFILL 3 + diff --git a/re2c/test/main.b.c b/re2c/test/main.b.c index 14a852fa..22758cef 100644 --- a/re2c/test/main.b.c +++ b/re2c/test/main.b.c @@ -1,7 +1,9 @@ /* Generated by re2c */ #line 1 "main.b.re" /* re2c lesson 001_upn_calculator, main.b.re, (c) M. Boerger, L. Allan 2006 */ -#line 43 "main.b.re" + +#line 42 "main.b.re" + #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers @@ -51,7 +53,7 @@ int ScanFullSpeed(char *pzStrToScan, size_t lenStrToScan) for(;;) { -#line 55 "main.b.c" +#line 57 "main.b.c" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -108,23 +110,23 @@ yy2: ++YYCURSOR; #line 97 "main.b.re" { return 0; } -#line 112 "main.b.c" +#line 114 "main.b.c" yy4: ++YYCURSOR; yy5: #line 98 "main.b.re" { return 1; } -#line 118 "main.b.c" +#line 120 "main.b.c" yy6: ++YYCURSOR; #line 95 "main.b.re" { continue; } -#line 123 "main.b.c" +#line 125 "main.b.c" yy8: ++YYCURSOR; #line 96 "main.b.re" { continue; } -#line 128 "main.b.c" +#line 130 "main.b.c" yy10: yych = *++YYCURSOR; if (yych <= '/') goto yy5; @@ -139,7 +141,7 @@ yy11: } #line 93 "main.b.re" { continue; } -#line 143 "main.b.c" +#line 145 "main.b.c" yy14: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -149,7 +151,7 @@ yy14: yy16: #line 94 "main.b.re" { continue; } -#line 153 "main.b.c" +#line 155 "main.b.c" } #line 99 "main.b.re" @@ -172,7 +174,7 @@ int scan(char *pzStrToScan, size_t lenStrToScan) for(;;) { -#line 176 "main.b.c" +#line 178 "main.b.c" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -229,23 +231,23 @@ yy19: ++YYCURSOR; #line 124 "main.b.re" { printf("EOF\n"); return 0; } -#line 233 "main.b.c" +#line 235 "main.b.c" yy21: ++YYCURSOR; yy22: #line 125 "main.b.re" { printf("ERR\n"); strcat(gTestBuf, "ERR "); return 1; } -#line 239 "main.b.c" +#line 241 "main.b.c" yy23: ++YYCURSOR; #line 122 "main.b.re" { printf("+\n"); strcat(gTestBuf, "+ "); continue; } -#line 244 "main.b.c" +#line 246 "main.b.c" yy25: ++YYCURSOR; #line 123 "main.b.re" { printf("-\n"); strcat(gTestBuf, "- "); continue; } -#line 249 "main.b.c" +#line 251 "main.b.c" yy27: yych = *++YYCURSOR; if (yych <= '/') goto yy22; @@ -260,7 +262,7 @@ yy28: } #line 120 "main.b.re" { printf("Num\n"); strcat(gTestBuf, "Num "); continue; } -#line 264 "main.b.c" +#line 266 "main.b.c" yy31: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -270,7 +272,7 @@ yy31: yy33: #line 121 "main.b.re" { printf("Oct\n"); strcat(gTestBuf, "Oct "); continue; } -#line 274 "main.b.c" +#line 276 "main.b.c" } #line 126 "main.b.re" diff --git a/re2c/test/parse_date.b.c b/re2c/test/parse_date.b.c index fd97cba8..bb8de452 100644 --- a/re2c/test/parse_date.b.c +++ b/re2c/test/parse_date.b.c @@ -14169,6 +14169,7 @@ yy1053: #define YYMAXFILL 26 + timelib_time* timelib_strtotime(char *s, int len, int *errors, timelib_tzdb *tzdb) { Scanner in; diff --git a/re2c/test/parse_date.c b/re2c/test/parse_date.c index 63948842..e8711dde 100644 --- a/re2c/test/parse_date.c +++ b/re2c/test/parse_date.c @@ -24021,6 +24021,7 @@ yy1053: #define YYMAXFILL 26 + timelib_time* timelib_strtotime(char *s, int len, int *errors, timelib_tzdb *tzdb) { Scanner in; diff --git a/re2c/test/parse_date.db.c b/re2c/test/parse_date.db.c index b817a474..191b04d9 100644 --- a/re2c/test/parse_date.db.c +++ b/re2c/test/parse_date.db.c @@ -19708,6 +19708,7 @@ yy1182: #define YYMAXFILL 29 + timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, timelib_tzdb *tzdb) { Scanner in; diff --git a/re2c/test/parse_date.g.c b/re2c/test/parse_date.g.c index a2a1831d..7564865b 100644 --- a/re2c/test/parse_date.g.c +++ b/re2c/test/parse_date.g.c @@ -14229,6 +14229,7 @@ yy1053: #define YYMAXFILL 26 + timelib_time* timelib_strtotime(char *s, int len, int *errors, timelib_tzdb *tzdb) { Scanner in; diff --git a/re2c/test/parse_date.s.c b/re2c/test/parse_date.s.c index 82b56705..b0570d85 100644 --- a/re2c/test/parse_date.s.c +++ b/re2c/test/parse_date.s.c @@ -14142,6 +14142,7 @@ yy1053: #define YYMAXFILL 26 + timelib_time* timelib_strtotime(char *s, int len, int *errors, timelib_tzdb *tzdb) { Scanner in; diff --git a/re2c/test/parse_date_1_78.db.c b/re2c/test/parse_date_1_78.db.c index faa75cf4..eb1aa67a 100644 --- a/re2c/test/parse_date_1_78.db.c +++ b/re2c/test/parse_date_1_78.db.c @@ -20215,6 +20215,7 @@ yy1233: #define YYMAXFILL 30 + timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, const timelib_tzdb *tzdb) { Scanner in; diff --git a/re2c/test/php20140822_zend_language_scanner.igcd--flex-syntax.c b/re2c/test/php20140822_zend_language_scanner.igcd--flex-syntax.c index e75a98fc..76f2a3aa 100644 --- a/re2c/test/php20140822_zend_language_scanner.igcd--flex-syntax.c +++ b/re2c/test/php20140822_zend_language_scanner.igcd--flex-syntax.c @@ -74,6 +74,7 @@ /* perform sanity check. If this message is triggered you should increase the ZEND_MMAP_AHEAD value in the zend_streams.h file */ #define YYMAXFILL 16 + #if ZEND_MMAP_AHEAD < YYMAXFILL # error ZEND_MMAP_AHEAD should be greater than or equal to YYMAXFILL #endif diff --git a/re2c/test/php20140822_zend_language_scanner_crlf.igcd--flex-syntax.c b/re2c/test/php20140822_zend_language_scanner_crlf.igcd--flex-syntax.c index b757eb63..186812ec 100644 --- a/re2c/test/php20140822_zend_language_scanner_crlf.igcd--flex-syntax.c +++ b/re2c/test/php20140822_zend_language_scanner_crlf.igcd--flex-syntax.c @@ -74,6 +74,7 @@ /* perform sanity check. If this message is triggered you should increase the ZEND_MMAP_AHEAD value in the zend_streams.h file */ #define YYMAXFILL 16 + #if ZEND_MMAP_AHEAD < YYMAXFILL # error ZEND_MMAP_AHEAD should be greater than or equal to YYMAXFILL #endif diff --git a/re2c/test/php20150211_parse_date.ig.c b/re2c/test/php20150211_parse_date.ig.c index c56e7e58..93b9fb35 100644 --- a/re2c/test/php20150211_parse_date.ig.c +++ b/re2c/test/php20150211_parse_date.ig.c @@ -26496,6 +26496,7 @@ yy1274: #define YYMAXFILL 31 + timelib_time* timelib_strtotime(char *s, size_t len, struct timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper) { Scanner in; diff --git a/re2c/test/php20150211_parse_date_crlf.ig.c b/re2c/test/php20150211_parse_date_crlf.ig.c index 3207dc2c..fc229a50 100644 --- a/re2c/test/php20150211_parse_date_crlf.ig.c +++ b/re2c/test/php20150211_parse_date_crlf.ig.c @@ -26496,6 +26496,7 @@ yy1274: #define YYMAXFILL 31 + timelib_time* timelib_strtotime(char *s, size_t len, struct timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper) { Scanner in; diff --git a/re2c/test/php20150211_parse_iso_intervals.ig.c b/re2c/test/php20150211_parse_iso_intervals.ig.c index 70b06e7b..d189294a 100644 --- a/re2c/test/php20150211_parse_iso_intervals.ig.c +++ b/re2c/test/php20150211_parse_iso_intervals.ig.c @@ -1063,6 +1063,7 @@ yy91: #define YYMAXFILL 20 + void timelib_strtointerval(char *s, size_t len, timelib_time **begin, timelib_time **end, timelib_rel_time **period, int *recurrences, diff --git a/re2c/test/php20150211_zend_ini_scanner.igcd--flex-syntax--case-inverted.c b/re2c/test/php20150211_zend_ini_scanner.igcd--flex-syntax--case-inverted.c index 51aa1a8d..deda0de9 100644 --- a/re2c/test/php20150211_zend_ini_scanner.igcd--flex-syntax--case-inverted.c +++ b/re2c/test/php20150211_zend_ini_scanner.igcd--flex-syntax--case-inverted.c @@ -68,6 +68,7 @@ /* perform sanity check. If this message is triggered you should increase the ZEND_MMAP_AHEAD value in the zend_streams.h file */ #define YYMAXFILL 6 + #if ZEND_MMAP_AHEAD < (YYMAXFILL + 1) # error ZEND_MMAP_AHEAD should be greater than YYMAXFILL #endif diff --git a/re2c/test/php20150211_zend_language_scanner.igcd--flex-syntax--case-inverted.c b/re2c/test/php20150211_zend_language_scanner.igcd--flex-syntax--case-inverted.c index 159c4c4d..36eba869 100644 --- a/re2c/test/php20150211_zend_language_scanner.igcd--flex-syntax--case-inverted.c +++ b/re2c/test/php20150211_zend_language_scanner.igcd--flex-syntax--case-inverted.c @@ -74,6 +74,7 @@ /* perform sanity check. If this message is triggered you should increase the ZEND_MMAP_AHEAD value in the zend_streams.h file */ #define YYMAXFILL 16 + #if ZEND_MMAP_AHEAD < YYMAXFILL # error ZEND_MMAP_AHEAD should be greater than or equal to YYMAXFILL #endif diff --git a/re2c/test/repeat-01.cgir.c b/re2c/test/repeat-01.cgir.c index 829bcf4b..f23bac4b 100644 --- a/re2c/test/repeat-01.cgir.c +++ b/re2c/test/repeat-01.cgir.c @@ -8,6 +8,7 @@ enum YYCONDTYPE { }; + void scan(unsigned char* in) { diff --git a/re2c/test/repeat-02.cgir.c b/re2c/test/repeat-02.cgir.c index c35fec37..d6fc40ee 100644 --- a/re2c/test/repeat-02.cgir.c +++ b/re2c/test/repeat-02.cgir.c @@ -8,6 +8,7 @@ enum YYCONDTYPE { }; + void scan(unsigned char* in) { diff --git a/re2c/test/repeat-03.cgir.c b/re2c/test/repeat-03.cgir.c index 18c96caf..78f176b1 100644 --- a/re2c/test/repeat-03.cgir.c +++ b/re2c/test/repeat-03.cgir.c @@ -8,6 +8,7 @@ enum YYCONDTYPE { }; + void scan(unsigned char* in) { diff --git a/re2c/test/reuse_conds_default_1.cgir.c b/re2c/test/reuse_conds_default_1.cgir.c index ee35adf2..fcf8302f 100644 --- a/re2c/test/reuse_conds_default_1.cgir.c +++ b/re2c/test/reuse_conds_default_1.cgir.c @@ -9,6 +9,7 @@ enum YYCONDTYPE { }; + void scan(unsigned char* in) { diff --git a/re2c/test/strip_001.s.c b/re2c/test/strip_001.s.c index 6ace6c7a..628d3a49 100644 --- a/re2c/test/strip_001.s.c +++ b/re2c/test/strip_001.s.c @@ -1,13 +1,16 @@ /* Generated by re2c */ #line 1 "strip_001.s.re" /* re2c lesson 002_strip_comments, strip_001.s, (c) M. Boerger 2006 - 2007 */ -#line 32 "strip_001.s.re" + +#line 31 "strip_001.s.re" + #include #include #include #define YYMAXFILL 2 + #define BSIZE 128 #if BSIZE < YYMAXFILL @@ -76,7 +79,7 @@ int scan(FILE *fp) { s.tok = s.cur; -#line 80 "strip_001.s.c" +#line 83 "strip_001.s.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -86,7 +89,7 @@ int scan(FILE *fp) yy3: #line 113 "strip_001.s.re" { fputc(*s.tok, stdout); continue; } -#line 90 "strip_001.s.c" +#line 93 "strip_001.s.c" yy4: yych = *++YYCURSOR; if (yych == '*') goto yy5; @@ -96,19 +99,19 @@ yy5: ++YYCURSOR; #line 112 "strip_001.s.re" { goto comment; } -#line 100 "strip_001.s.c" +#line 103 "strip_001.s.c" yy7: ++YYCURSOR; #line 111 "strip_001.s.re" { goto cppcomment; } -#line 105 "strip_001.s.c" +#line 108 "strip_001.s.c" } #line 114 "strip_001.s.re" comment: s.tok = s.cur; -#line 112 "strip_001.s.c" +#line 115 "strip_001.s.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -118,21 +121,21 @@ comment: yy12: #line 119 "strip_001.s.re" { goto comment; } -#line 122 "strip_001.s.c" +#line 125 "strip_001.s.c" yy13: yych = *++YYCURSOR; if (yych != '/') goto yy12; ++YYCURSOR; #line 118 "strip_001.s.re" { continue; } -#line 129 "strip_001.s.c" +#line 132 "strip_001.s.c" } #line 120 "strip_001.s.re" cppcomment: s.tok = s.cur; -#line 136 "strip_001.s.c" +#line 139 "strip_001.s.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -143,12 +146,12 @@ cppcomment: yy19: #line 125 "strip_001.s.re" { goto cppcomment; } -#line 147 "strip_001.s.c" +#line 150 "strip_001.s.c" yy20: ++YYCURSOR; #line 124 "strip_001.s.re" { fwrite(s.tok, 1, s.cur - s.tok, stdout); continue; } -#line 152 "strip_001.s.c" +#line 155 "strip_001.s.c" yy22: ++YYCURSOR; if ((yych = *YYCURSOR) == '\n') goto yy20; diff --git a/re2c/test/strip_002.s.c b/re2c/test/strip_002.s.c index 25f4737b..e15f2bec 100644 --- a/re2c/test/strip_002.s.c +++ b/re2c/test/strip_002.s.c @@ -1,13 +1,16 @@ /* Generated by re2c */ #line 1 "strip_002.s.re" /* re2c lesson 002_strip_comments, strip_002.s, (c) M. Boerger 2006 - 2007 */ -#line 32 "strip_002.s.re" + +#line 31 "strip_002.s.re" + #include #include #include #define YYMAXFILL 2 + #define BSIZE 128 #if BSIZE < YYMAXFILL @@ -83,7 +86,7 @@ int scan(FILE *fp) { s.tok = s.cur; -#line 87 "strip_002.s.c" +#line 90 "strip_002.s.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -93,7 +96,7 @@ int scan(FILE *fp) yy3: #line 121 "strip_002.s.re" { fputc(*s.tok, stdout); continue; } -#line 97 "strip_002.s.c" +#line 100 "strip_002.s.c" yy4: yych = *++YYCURSOR; if (yych == '*') goto yy5; @@ -103,19 +106,19 @@ yy5: ++YYCURSOR; #line 120 "strip_002.s.re" { goto comment; } -#line 107 "strip_002.s.c" +#line 110 "strip_002.s.c" yy7: ++YYCURSOR; #line 119 "strip_002.s.re" { goto cppcomment; } -#line 112 "strip_002.s.c" +#line 115 "strip_002.s.c" } #line 122 "strip_002.s.re" comment: s.tok = s.cur; -#line 119 "strip_002.s.c" +#line 122 "strip_002.s.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -125,21 +128,21 @@ comment: yy12: #line 127 "strip_002.s.re" { goto comment; } -#line 129 "strip_002.s.c" +#line 132 "strip_002.s.c" yy13: yych = *++YYCURSOR; if (yych != '/') goto yy12; ++YYCURSOR; #line 126 "strip_002.s.re" { goto commentws; } -#line 136 "strip_002.s.c" +#line 139 "strip_002.s.c" } #line 128 "strip_002.s.re" commentws: s.tok = s.cur; -#line 143 "strip_002.s.c" +#line 146 "strip_002.s.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -156,18 +159,18 @@ yy18: ++YYCURSOR; #line 134 "strip_002.s.re" { echo(&s); continue; } -#line 160 "strip_002.s.c" +#line 163 "strip_002.s.c" yy20: ++YYCURSOR; yy21: #line 133 "strip_002.s.re" { goto commentws; } -#line 166 "strip_002.s.c" +#line 169 "strip_002.s.c" yy22: ++YYCURSOR; #line 132 "strip_002.s.re" { echo(&s); continue; } -#line 171 "strip_002.s.c" +#line 174 "strip_002.s.c" yy24: ++YYCURSOR; if ((yych = *YYCURSOR) == '\n') goto yy22; @@ -178,7 +181,7 @@ yy24: cppcomment: s.tok = s.cur; -#line 182 "strip_002.s.c" +#line 185 "strip_002.s.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -189,12 +192,12 @@ cppcomment: yy28: #line 140 "strip_002.s.re" { goto cppcomment; } -#line 193 "strip_002.s.c" +#line 196 "strip_002.s.c" yy29: ++YYCURSOR; #line 139 "strip_002.s.re" { echo(&s); continue; } -#line 198 "strip_002.s.c" +#line 201 "strip_002.s.c" yy31: ++YYCURSOR; if ((yych = *YYCURSOR) == '\n') goto yy29; diff --git a/re2c/test/strip_003.b--skeleton.c b/re2c/test/strip_003.b--skeleton.c index f08920f9..18639ed7 100644 --- a/re2c/test/strip_003.b--skeleton.c +++ b/re2c/test/strip_003.b--skeleton.c @@ -48,6 +48,7 @@ error: return NULL; } + #define YYCTYPE unsigned char #define YYKEYTYPE unsigned char #define YYPEEK() *cursor diff --git a/re2c/test/strip_003.b.c b/re2c/test/strip_003.b.c index 68aaf5ef..096f0975 100644 --- a/re2c/test/strip_003.b.c +++ b/re2c/test/strip_003.b.c @@ -1,13 +1,16 @@ /* Generated by re2c */ #line 1 "strip_003.b.re" /* re2c lesson 002_strip_comments, strip_003.b, (c) M. Boerger 2006 - 2007 */ -#line 37 "strip_003.b.re" + +#line 36 "strip_003.b.re" + #include #include #include #define YYMAXFILL 4 + #define BSIZE 128 #if BSIZE < YYMAXFILL @@ -86,7 +89,7 @@ int scan(FILE *fp) { s.tok = s.cur; -#line 90 "strip_003.b.c" +#line 93 "strip_003.b.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4); @@ -101,7 +104,7 @@ int scan(FILE *fp) yy3: #line 130 "strip_003.b.re" { fputc(*s.tok, stdout); continue; } -#line 105 "strip_003.b.c" +#line 108 "strip_003.b.c" yy4: yych = *(YYMARKER = ++YYCURSOR); if (yych == '/') goto yy7; @@ -129,25 +132,25 @@ yy10: ++YYCURSOR; #line 129 "strip_003.b.re" { goto comment; } -#line 133 "strip_003.b.c" +#line 136 "strip_003.b.c" yy12: ++YYCURSOR; #line 127 "strip_003.b.re" { goto cppcomment; } -#line 138 "strip_003.b.c" +#line 141 "strip_003.b.c" yy14: ++YYCURSOR; YYCURSOR -= 2; #line 128 "strip_003.b.re" { echo(&s); nlcomment = 1; continue; } -#line 144 "strip_003.b.c" +#line 147 "strip_003.b.c" } #line 131 "strip_003.b.re" comment: s.tok = s.cur; -#line 151 "strip_003.b.c" +#line 154 "strip_003.b.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -157,21 +160,21 @@ comment: yy19: #line 136 "strip_003.b.re" { goto comment; } -#line 161 "strip_003.b.c" +#line 164 "strip_003.b.c" yy20: yych = *++YYCURSOR; if (yych != '/') goto yy19; ++YYCURSOR; #line 135 "strip_003.b.re" { goto commentws; } -#line 168 "strip_003.b.c" +#line 171 "strip_003.b.c" } #line 137 "strip_003.b.re" commentws: s.tok = s.cur; -#line 175 "strip_003.b.c" +#line 178 "strip_003.b.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4); @@ -194,13 +197,13 @@ commentws: yy26: #line 151 "strip_003.b.re" { echo(&s); nlcomment = 0; continue; } -#line 198 "strip_003.b.c" +#line 201 "strip_003.b.c" yy27: ++YYCURSOR; yy28: #line 150 "strip_003.b.re" { goto commentws; } -#line 204 "strip_003.b.c" +#line 207 "strip_003.b.c" yy29: yych = *(YYMARKER = ++YYCURSOR); if (yych == '/') goto yy33; @@ -214,7 +217,7 @@ yy30: nlcomment = 0; continue; } -#line 218 "strip_003.b.c" +#line 221 "strip_003.b.c" yy31: yych = *++YYCURSOR; if (yych == '\n') goto yy29; @@ -232,14 +235,14 @@ yy35: ++YYCURSOR; #line 141 "strip_003.b.re" { goto comment; } -#line 236 "strip_003.b.c" +#line 239 "strip_003.b.c" } #line 152 "strip_003.b.re" cppcomment: s.tok = s.cur; -#line 243 "strip_003.b.c" +#line 246 "strip_003.b.c" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -250,12 +253,12 @@ cppcomment: yy40: #line 157 "strip_003.b.re" { goto cppcomment; } -#line 254 "strip_003.b.c" +#line 257 "strip_003.b.c" yy41: ++YYCURSOR; #line 156 "strip_003.b.re" { echo(&s); continue; } -#line 259 "strip_003.b.c" +#line 262 "strip_003.b.c" yy43: ++YYCURSOR; if ((yych = *YYCURSOR) == '\n') goto yy41; diff --git a/re2c/test/yyaccept_missing.bci.c b/re2c/test/yyaccept_missing.bci.c index 637e6cd6..46ccebe2 100644 --- a/re2c/test/yyaccept_missing.bci.c +++ b/re2c/test/yyaccept_missing.bci.c @@ -22,6 +22,7 @@ enum YYCONDTYPE { }; + int scan(char *s, int l) { char *p = s; -- 2.40.0