From f506af77bb7d9d68fcddecf28878ae80cc68a90f Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Tue, 29 Mar 2016 12:54:02 +0100 Subject: [PATCH] Added some configurations related to '-C, --contexts' option. Configurations: "define:YYCTX" (defaults to 'YYCTX') "define:YYDIST" (defaults to 'YYDIST') "define:YYDISTTYPE" (defaults to 'long') "ctxprefix" (defaults to 'yyctx') --- re2c/bootstrap/src/parse/lex_conf.cc | 1872 +++++++++-------- re2c/src/codegen/input_api.cc | 6 +- re2c/src/codegen/output.cc | 2 +- re2c/src/conf/opt.cc | 14 + re2c/src/conf/opt.h | 6 +- re2c/src/ir/ctx.cc | 4 +- re2c/src/ir/skeleton/generate_code.cc | 1 - re2c/src/parse/lex_conf.re | 5 + .../contexts/cond_star0.ci--input(custom).c | 2 +- re2c/test/contexts/cond_star0.ci.c | 2 +- .../contexts/cond_star1.ci--input(custom).c | 2 +- re2c/test/contexts/cond_star1.ci.c | 2 +- re2c/test/contexts/cond_star2.ci.c | 2 +- re2c/test/contexts/dedup0.i--input(custom).c | 2 +- re2c/test/contexts/dedup0.i.c | 2 +- re2c/test/contexts/dedup1.i--input(custom).c | 2 +- re2c/test/contexts/dedup1.i.c | 2 +- re2c/test/contexts/dedup2.i--input(custom).c | 2 +- re2c/test/contexts/dedup2.i.c | 2 +- re2c/test/contexts/dedup3.i--input(custom).c | 2 +- re2c/test/contexts/dedup3.i.c | 2 +- re2c/test/contexts/fix2.i--contexts.c | 1 - re2c/test/contexts/fix2.i--contexts.re | 1 - .../fix2_trail.i--contexts--input(custom).c | 1 - .../fix2_trail.i--contexts--input(custom).re | 1 - re2c/test/contexts/fix2_trail.i--contexts.c | 1 - re2c/test/contexts/fix2_trail.i--contexts.re | 1 - re2c/test/contexts/fix3.i--contexts.c | 5 +- re2c/test/contexts/fix3.i--contexts.re | 1 - .../fix3_trail.i--contexts--input(custom).c | 5 +- .../fix3_trail.i--contexts--input(custom).re | 1 - re2c/test/contexts/fix3_trail.i--contexts.c | 5 +- re2c/test/contexts/fix3_trail.i--contexts.re | 1 - re2c/test/contexts/fix4.i--contexts.c | 3 +- re2c/test/contexts/fix4.i--contexts.re | 1 - .../fix4_trail.i--contexts--input(custom).c | 3 +- .../fix4_trail.i--contexts--input(custom).re | 1 - re2c/test/contexts/fix4_trail.i--contexts.c | 3 +- re2c/test/contexts/fix4_trail.i--contexts.re | 1 - re2c/test/contexts/fix5.i--contexts.c | 3 +- re2c/test/contexts/fix5.i--contexts.re | 1 - .../fix5_trail.i--contexts--input(custom).c | 3 +- .../fix5_trail.i--contexts--input(custom).re | 1 - re2c/test/contexts/fix5_trail.i--contexts.c | 3 +- re2c/test/contexts/fix5_trail.i--contexts.re | 1 - ...x5_trail_conf.i--contexts--input(custom).c | 111 + ...5_trail_conf.i--contexts--input(custom).re | 47 + .../contexts/fix5_trail_conf.i--contexts.c | 98 + .../contexts/fix5_trail_conf.i--contexts.re | 37 + re2c/test/contexts/overlap.i--input(custom).c | 2 +- re2c/test/contexts/overlap.i.c | 2 +- re2c/test/contexts/selfoverlap1.i--contexts.c | 2 +- .../test/contexts/selfoverlap1.i--contexts.re | 1 - .../contexts/selfoverlap1_trail.i--contexts.c | 2 +- .../selfoverlap1_trail.i--contexts.re | 1 - 55 files changed, 1331 insertions(+), 956 deletions(-) create mode 100644 re2c/test/contexts/fix5_trail_conf.i--contexts--input(custom).c create mode 100644 re2c/test/contexts/fix5_trail_conf.i--contexts--input(custom).re create mode 100644 re2c/test/contexts/fix5_trail_conf.i--contexts.c create mode 100644 re2c/test/contexts/fix5_trail_conf.i--contexts.re diff --git a/re2c/bootstrap/src/parse/lex_conf.cc b/re2c/bootstrap/src/parse/lex_conf.cc index 7b8d484b..40b6efc8 100644 --- a/re2c/bootstrap/src/parse/lex_conf.cc +++ b/re2c/bootstrap/src/parse/lex_conf.cc @@ -1,4 +1,4 @@ -/* Generated by re2c 0.16 on Wed Mar 23 16:01:26 2016 */ +/* Generated by re2c 0.16 on Tue Mar 29 12:09:00 2016 */ #line 1 "../src/parse/lex_conf.re" #include "src/util/c99_stdint.h" #include @@ -81,264 +81,276 @@ yy3: yy4: yyaccept = 0; yych = (unsigned char)*(ptr = ++cur); - if (yych == 'g') goto yy12; - if (yych == 'o') goto yy14; - goto yy3; + if (yych <= 'n') { + if (yych == 'g') goto yy12; + goto yy3; + } else { + if (yych <= 'o') goto yy14; + if (yych == 't') goto yy15; + goto yy3; + } yy5: yyaccept = 0; yych = (unsigned char)*(ptr = ++cur); - if (yych == 'e') goto yy15; + if (yych == 'e') goto yy16; goto yy3; yy6: yyaccept = 0; yych = (unsigned char)*(ptr = ++cur); - if (yych == 'l') goto yy16; + if (yych == 'l') goto yy17; goto yy3; yy7: yyaccept = 0; yych = (unsigned char)*(ptr = ++cur); - if (yych == 'n') goto yy17; + if (yych == 'n') goto yy18; goto yy3; yy8: yyaccept = 0; yych = (unsigned char)*(ptr = ++cur); - if (yych == 'a') goto yy18; + if (yych == 'a') goto yy19; goto yy3; yy9: yyaccept = 0; yych = (unsigned char)*(ptr = ++cur); - if (yych == 't') goto yy19; + if (yych == 't') goto yy20; goto yy3; yy10: yyaccept = 0; yych = (unsigned char)*(ptr = ++cur); - if (yych == 'a') goto yy20; + if (yych == 'a') goto yy21; goto yy3; yy11: yyaccept = 0; yych = (unsigned char)*(ptr = ++cur); - if (yych == 'y') goto yy21; + if (yych == 'y') goto yy22; goto yy3; yy12: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy22; + if (yych == 'o') goto yy23; yy13: cur = ptr; - if (yyaccept <= 5) { - if (yyaccept <= 2) { + if (yyaccept <= 6) { + if (yyaccept <= 3) { if (yyaccept <= 1) { if (yyaccept == 0) { goto yy3; } else { - goto yy119; + goto yy126; } } else { - goto yy161; + if (yyaccept == 2) { + goto yy170; + } else { + goto yy216; + } } } else { - if (yyaccept <= 4) { - if (yyaccept == 3) { - goto yy206; + if (yyaccept <= 5) { + if (yyaccept == 4) { + goto yy222; } else { - goto yy255; + goto yy267; } } else { - goto yy321; + goto yy269; } } } else { - if (yyaccept <= 8) { - if (yyaccept <= 7) { - if (yyaccept == 6) { - goto yy356; + if (yyaccept <= 9) { + if (yyaccept <= 8) { + if (yyaccept == 7) { + goto yy336; } else { - goto yy377; + goto yy373; } } else { - goto yy383; + goto yy396; } } else { - if (yyaccept == 9) { - goto yy420; + if (yyaccept <= 11) { + if (yyaccept == 10) { + goto yy402; + } else { + goto yy439; + } } else { - goto yy423; + goto yy442; } } } yy14: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy23; + if (yych == 'n') goto yy24; goto yy13; yy15: yych = (unsigned char)*++cur; - if (yych == 'f') goto yy24; + if (yych == 'x') goto yy25; goto yy13; yy16: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy25; + if (yych == 'f') goto yy26; goto yy13; yy17: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy26; + if (yych == 'a') goto yy27; goto yy13; yy18: yych = (unsigned char)*++cur; - if (yych == 'b') goto yy27; + if (yych == 'd') goto yy28; goto yy13; yy19: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy28; + if (yych == 'b') goto yy29; goto yy13; yy20: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy29; + if (yych == 'a') goto yy30; goto yy13; yy21: + yych = (unsigned char)*++cur; + if (yych == 'r') goto yy31; + goto yy13; +yy22: yych = (unsigned char)*++cur; if (yych <= 'c') { if (yych <= 'a') goto yy13; - if (yych <= 'b') goto yy30; - goto yy31; + if (yych <= 'b') goto yy32; + goto yy33; } else { - if (yych == 'f') goto yy32; + if (yych == 'f') goto yy34; goto yy13; } -yy22: - yych = (unsigned char)*++cur; - if (yych == 't') goto yy33; - goto yy13; yy23: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy34; + if (yych == 't') goto yy35; goto yy13; yy24: yych = (unsigned char)*++cur; - if (yych == 'i') goto yy35; + if (yych == 'd') goto yy36; goto yy13; yy25: yych = (unsigned char)*++cur; - if (yych == 'g') goto yy36; + if (yych == 'p') goto yy37; goto yy13; yy26: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy37; + if (yych == 'i') goto yy38; goto yy13; yy27: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy38; + if (yych == 'g') goto yy39; goto yy13; yy28: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy39; - if (yych == 't') goto yy40; + if (yych == 'e') goto yy40; goto yy13; yy29: yych = (unsigned char)*++cur; - if (yych == 'i') goto yy41; + if (yych == 'e') goto yy41; goto yy13; yy30: yych = (unsigned char)*++cur; - if (yych == 'm') goto yy42; + if (yych == 'r') goto yy42; + if (yych == 't') goto yy43; goto yy13; yy31: yych = (unsigned char)*++cur; - if (yych == 'h') goto yy43; + if (yych == 'i') goto yy44; goto yy13; yy32: yych = (unsigned char)*++cur; - if (yych == 'i') goto yy44; + if (yych == 'm') goto yy45; goto yy13; yy33: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy45; + if (yych == 'h') goto yy46; goto yy13; yy34: yych = (unsigned char)*++cur; - if (yych <= 'd') { - if (yych == ':') goto yy46; - goto yy13; - } else { - if (yych <= 'e') goto yy47; - if (yych == 'p') goto yy48; - goto yy13; - } + if (yych == 'i') goto yy47; + goto yy13; yy35: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy49; + if (yych == 'o') goto yy48; goto yy13; yy36: yych = (unsigned char)*++cur; - if (yych == 's') goto yy50; - goto yy13; + if (yych <= 'd') { + if (yych == ':') goto yy49; + goto yy13; + } else { + if (yych <= 'e') goto yy50; + if (yych == 'p') goto yy51; + goto yy13; + } yy37: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy51; + if (yych == 'r') goto yy52; goto yy13; yy38: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy52; + if (yych == 'n') goto yy53; goto yy13; yy39: yych = (unsigned char)*++cur; - if (yych == 't') goto yy53; + if (yych == 's') goto yy54; goto yy13; yy40: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy54; + if (yych == 'n') goto yy55; goto yy13; yy41: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy55; + if (yych == 'l') goto yy56; goto yy13; yy42: yych = (unsigned char)*++cur; - if (yych == ':') goto yy56; + if (yych == 't') goto yy57; goto yy13; yy43: yych = (unsigned char)*++cur; - if (yych == ':') goto yy57; + if (yych == 'e') goto yy58; goto yy13; yy44: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy58; + if (yych == 'a') goto yy59; goto yy13; yy45: yych = (unsigned char)*++cur; - if (yych == ':') goto yy59; + if (yych == ':') goto yy60; goto yy13; yy46: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy60; - if (yych == 'g') goto yy61; + if (yych == ':') goto yy61; goto yy13; yy47: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy62; + if (yych == 'l') goto yy62; goto yy13; yy48: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy63; + if (yych == ':') goto yy63; goto yy13; yy49: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy64; + if (yych == 'd') goto yy64; + if (yych == 'g') goto yy65; goto yy13; yy50: yych = (unsigned char)*++cur; - if (yych == ':') goto yy65; + if (yych == 'n') goto yy66; goto yy13; yy51: yych = (unsigned char)*++cur; - if (yych == 't') goto yy66; + if (yych == 'r') goto yy67; goto yy13; yy52: yych = (unsigned char)*++cur; - if (yych == ':') goto yy67; - if (yych == 'p') goto yy68; + if (yych == 'e') goto yy68; goto yy13; yy53: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy69; + if (yych == 'e') goto yy69; goto yy13; yy54: yych = (unsigned char)*++cur; @@ -346,127 +358,152 @@ yy54: goto yy13; yy55: yych = (unsigned char)*++cur; - if (yych == 'b') goto yy71; + if (yych == 't') goto yy71; goto yy13; yy56: yych = (unsigned char)*++cur; - if (yych == 'h') goto yy72; + if (yych == ':') goto yy72; + if (yych == 'p') goto yy73; goto yy13; yy57: yych = (unsigned char)*++cur; - if (yych == 'c') goto yy73; - if (yych == 'e') goto yy74; + if (yych == 'l') goto yy74; goto yy13; yy58: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy75; + if (yych == ':') goto yy75; goto yy13; yy59: yych = (unsigned char)*++cur; - if (yych == 't') goto yy76; + if (yych == 'b') goto yy76; goto yy13; yy60: yych = (unsigned char)*++cur; - if (yych == 'i') goto yy77; + if (yych == 'h') goto yy77; goto yy13; yy61: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy78; + if (yych == 'c') goto yy78; + if (yych == 'e') goto yy79; goto yy13; yy62: yych = (unsigned char)*++cur; - if (yych == 'u') goto yy79; + if (yych == 'l') goto yy80; goto yy13; yy63: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy80; + if (yych == 't') goto yy81; goto yy13; yy64: yych = (unsigned char)*++cur; - if (yych == ':') goto yy81; + if (yych == 'i') goto yy82; goto yy13; yy65: yych = (unsigned char)*++cur; - if (yych <= 'e') { - if (yych == '8') goto yy82; - if (yych <= 'd') goto yy13; - goto yy82; - } else { - if (yych <= 'u') { - if (yych <= 't') goto yy13; - goto yy82; - } else { - if (yych <= 'v') goto yy13; - if (yych <= 'x') goto yy82; - goto yy13; - } - } + if (yych == 'o') goto yy83; + goto yy13; yy66: yych = (unsigned char)*++cur; - if (yych == ':') goto yy84; + if (yych == 'u') goto yy84; goto yy13; yy67: yych = (unsigned char)*++cur; - if (yych == 'y') goto yy85; + if (yych == 'e') goto yy85; goto yy13; yy68: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy86; + if (yych == 'f') goto yy86; goto yy13; yy69: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy87; + if (yych == ':') goto yy87; goto yy13; yy70: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy88; - if (yych == 'n') goto yy89; - goto yy13; + if (yych <= 'e') { + if (yych == '8') goto yy88; + if (yych <= 'd') goto yy13; + goto yy88; + } else { + if (yych <= 'u') { + if (yych <= 't') goto yy13; + goto yy88; + } else { + if (yych <= 'v') goto yy13; + if (yych <= 'x') goto yy88; + goto yy13; + } + } yy71: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy90; + if (yych == ':') goto yy90; goto yy13; yy72: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy91; + if (yych == 'y') goto yy91; goto yy13; yy73: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy92; + if (yych == 'r') goto yy92; goto yy13; yy74: yych = (unsigned char)*++cur; - if (yych == 'm') goto yy93; + if (yych == 'a') goto yy93; goto yy13; yy75: yych = (unsigned char)*++cur; - if (yych == ':') goto yy94; + if (yych == 'a') goto yy94; + if (yych == 'n') goto yy95; goto yy13; yy76: yych = (unsigned char)*++cur; - if (yych == 'h') goto yy95; + if (yych == 'l') goto yy96; goto yy13; yy77: yych = (unsigned char)*++cur; - if (yych == 'v') goto yy96; + if (yych == 'e') goto yy97; goto yy13; yy78: yych = (unsigned char)*++cur; - if (yych == 't') goto yy97; + if (yych == 'o') goto yy98; goto yy13; yy79: yych = (unsigned char)*++cur; - if (yych == 'm') goto yy98; + if (yych == 'm') goto yy99; goto yy13; yy80: yych = (unsigned char)*++cur; - if (yych == 'f') goto yy99; + if (yych == ':') goto yy100; goto yy13; yy81: yych = (unsigned char)*++cur; - if (yych == 'Y') goto yy100; + if (yych == 'h') goto yy101; goto yy13; yy82: + yych = (unsigned char)*++cur; + if (yych == 'v') goto yy102; + goto yy13; +yy83: + yych = (unsigned char)*++cur; + if (yych == 't') goto yy103; + goto yy13; +yy84: + yych = (unsigned char)*++cur; + if (yych == 'm') goto yy104; + goto yy13; +yy85: + yych = (unsigned char)*++cur; + if (yych == 'f') goto yy105; + goto yy13; +yy86: + yych = (unsigned char)*++cur; + if (yych == 'i') goto yy106; + goto yy13; +yy87: + yych = (unsigned char)*++cur; + if (yych == 'Y') goto yy107; + goto yy13; +yy88: ++cur; #line 45 "../src/parse/lex_conf.re" { @@ -492,952 +529,986 @@ yy82: } return; } -#line 496 "src/parse/lex_conf.cc" -yy84: - yych = (unsigned char)*++cur; - if (yych <= 'r') goto yy13; - if (yych <= 's') goto yy101; - if (yych <= 't') goto yy102; - goto yy13; -yy85: - yych = (unsigned char)*++cur; - if (yych == 'y') goto yy103; - goto yy13; -yy86: - yych = (unsigned char)*++cur; - if (yych == 'e') goto yy104; - goto yy13; -yy87: - yych = (unsigned char)*++cur; - if (yych == 'b') goto yy105; - goto yy13; -yy88: - yych = (unsigned char)*++cur; - if (yych == 'b') goto yy106; - goto yy13; -yy89: - yych = (unsigned char)*++cur; - if (yych == 'e') goto yy107; - goto yy13; +#line 533 "src/parse/lex_conf.cc" yy90: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy108; + if (yych <= 'r') goto yy13; + if (yych <= 's') goto yy108; + if (yych <= 't') goto yy109; goto yy13; yy91: yych = (unsigned char)*++cur; - if (yych == 'x') goto yy109; + if (yych == 'y') goto yy110; goto yy13; yy92: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy111; + if (yych == 'e') goto yy111; goto yy13; yy93: yych = (unsigned char)*++cur; - if (yych == 'i') goto yy112; + if (yych == 'b') goto yy112; goto yy13; yy94: yych = (unsigned char)*++cur; - if (yych <= 'd') { - if (yych == 'c') goto yy113; - goto yy13; - } else { - if (yych <= 'e') goto yy114; - if (yych == 'p') goto yy115; - goto yy13; - } + if (yych == 'b') goto yy113; + goto yy13; yy95: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy116; + if (yych == 'e') goto yy114; goto yy13; yy96: yych = (unsigned char)*++cur; - if (yych == 'i') goto yy117; + if (yych == 'e') goto yy115; goto yy13; yy97: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy118; + if (yych == 'x') goto yy116; goto yy13; yy98: yych = (unsigned char)*++cur; - if (yych == 'p') goto yy120; + if (yych == 'n') goto yy118; goto yy13; yy99: yych = (unsigned char)*++cur; - if (yych == 'i') goto yy121; + if (yych == 'i') goto yy119; goto yy13; yy100: yych = (unsigned char)*++cur; - if (yych == 'Y') goto yy122; - goto yy13; + if (yych <= 'd') { + if (yych == 'c') goto yy120; + goto yy13; + } else { + if (yych <= 'e') goto yy121; + if (yych == 'p') goto yy122; + goto yy13; + } yy101: yych = (unsigned char)*++cur; - if (yych == 't') goto yy123; + if (yych == 'r') goto yy123; goto yy13; yy102: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy124; + if (yych == 'i') goto yy124; goto yy13; yy103: yych = (unsigned char)*++cur; - if (yych == 'F') goto yy125; - if (yych == 'N') goto yy126; + if (yych == 'o') goto yy125; goto yy13; yy104: yych = (unsigned char)*++cur; - if (yych == 'f') goto yy127; + if (yych == 'p') goto yy127; goto yy13; yy105: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy128; + if (yych == 'i') goto yy128; goto yy13; yy106: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy129; + if (yych == 'x') goto yy129; goto yy13; yy107: yych = (unsigned char)*++cur; - if (yych == 'x') goto yy130; + if (yych == 'Y') goto yy131; goto yy13; yy108: yych = (unsigned char)*++cur; - if (yych == ':') goto yy131; + if (yych == 't') goto yy132; goto yy13; yy109: - ++cur; -#line 95 "../src/parse/lex_conf.re" - { opts.set_yybmHexTable (lex_conf_number () != 0); return; } -#line 610 "src/parse/lex_conf.cc" + yych = (unsigned char)*++cur; + if (yych == 'o') goto yy133; + goto yy13; +yy110: + yych = (unsigned char)*++cur; + if (yych == 'F') goto yy134; + if (yych == 'N') goto yy135; + goto yy13; yy111: yych = (unsigned char)*++cur; - if (yych == 'v') goto yy132; + if (yych == 'f') goto yy136; goto yy13; yy112: yych = (unsigned char)*++cur; - if (yych == 't') goto yy133; + if (yych == 'e') goto yy137; goto yy13; yy113: yych = (unsigned char)*++cur; - if (yych == 'h') goto yy135; + if (yych == 'o') goto yy138; goto yy13; yy114: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy136; + if (yych == 'x') goto yy139; goto yy13; yy115: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy137; + if (yych == ':') goto yy140; goto yy13; yy116: + ++cur; +#line 95 "../src/parse/lex_conf.re" + { opts.set_yybmHexTable (lex_conf_number () != 0); return; } +#line 651 "src/parse/lex_conf.cc" +yy118: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy138; + if (yych == 'v') goto yy141; goto yy13; -yy117: +yy119: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy139; + if (yych == 't') goto yy142; goto yy13; -yy118: - yyaccept = 1; - yych = (unsigned char)*(ptr = ++cur); - if (yych == '@') goto yy140; -yy119: -#line 79 "../src/parse/lex_conf.re" - { opts.set_condGoto (lex_conf_string ()); return; } -#line 646 "src/parse/lex_conf.cc" yy120: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy141; + if (yych == 'h') goto yy144; goto yy13; yy121: yych = (unsigned char)*++cur; - if (yych == 'x') goto yy142; + if (yych == 'n') goto yy145; goto yy13; yy122: yych = (unsigned char)*++cur; - switch (yych) { - case 'B': goto yy144; - case 'C': goto yy145; - case 'D': goto yy146; - case 'F': goto yy147; - case 'G': goto yy148; - case 'L': goto yy149; - case 'M': goto yy150; - case 'P': goto yy151; - case 'R': goto yy152; - case 'S': goto yy153; - default: goto yy13; - } + if (yych == 'a') goto yy146; + goto yy13; yy123: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy154; + if (yych == 'e') goto yy147; goto yy13; yy124: yych = (unsigned char)*++cur; - if (yych == 'p') goto yy155; + if (yych == 'd') goto yy148; goto yy13; yy125: - yych = (unsigned char)*++cur; - if (yych == 'i') goto yy157; - goto yy13; + yyaccept = 1; + yych = (unsigned char)*(ptr = ++cur); + if (yych == '@') goto yy149; yy126: - yych = (unsigned char)*++cur; - if (yych == 'e') goto yy158; - goto yy13; +#line 79 "../src/parse/lex_conf.re" + { opts.set_condGoto (lex_conf_string ()); return; } +#line 687 "src/parse/lex_conf.cc" yy127: yych = (unsigned char)*++cur; - if (yych == 'i') goto yy159; + if (yych == 'r') goto yy150; goto yy13; yy128: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy160; + if (yych == 'x') goto yy151; goto yy13; yy129: + ++cur; +#line 124 "../src/parse/lex_conf.re" + { opts.set_ctxprefix (lex_conf_string ()); return; } +#line 700 "src/parse/lex_conf.cc" +yy131: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy162; - goto yy13; -yy130: + switch (yych) { + case 'B': goto yy153; + case 'C': goto yy154; + case 'D': goto yy155; + case 'F': goto yy156; + case 'G': goto yy157; + case 'L': goto yy158; + case 'M': goto yy159; + case 'P': goto yy160; + case 'R': goto yy161; + case 'S': goto yy162; + default: goto yy13; + } +yy132: yych = (unsigned char)*++cur; - if (yych == 't') goto yy163; + if (yych == 'r') goto yy163; goto yy13; -yy131: +yy133: yych = (unsigned char)*++cur; - if (yych == 'y') goto yy164; + if (yych == 'p') goto yy164; goto yy13; -yy132: +yy134: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy165; + if (yych == 'i') goto yy166; goto yy13; -yy133: - ++cur; -#line 138 "../src/parse/lex_conf.re" - { opts.set_bEmitYYCh (lex_conf_number () != 0); return; } -#line 714 "src/parse/lex_conf.cc" yy135: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy166; + if (yych == 'e') goto yy167; goto yy13; yy136: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy167; + if (yych == 'i') goto yy168; goto yy13; yy137: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy168; + if (yych == 'l') goto yy169; goto yy13; yy138: yych = (unsigned char)*++cur; - if (yych == 's') goto yy169; + if (yych == 'r') goto yy171; goto yy13; yy139: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy170; + if (yych == 't') goto yy172; goto yy13; yy140: yych = (unsigned char)*++cur; - if (yych == 'c') goto yy171; + if (yych == 'y') goto yy173; goto yy13; yy141: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy172; + if (yych == 'e') goto yy174; goto yy13; yy142: ++cur; -#line 75 "../src/parse/lex_conf.re" - { opts.set_condPrefix (lex_conf_string ()); return; } -#line 747 "src/parse/lex_conf.cc" +#line 143 "../src/parse/lex_conf.re" + { opts.set_bEmitYYCh (lex_conf_number () != 0); return; } +#line 760 "src/parse/lex_conf.cc" yy144: yych = (unsigned char)*++cur; - if (yych == 'A') goto yy173; + if (yych == 'e') goto yy175; goto yy13; yy145: yych = (unsigned char)*++cur; - if (yych <= 'S') { - if (yych == 'O') goto yy174; - goto yy13; - } else { - if (yych <= 'T') goto yy175; - if (yych <= 'U') goto yy176; - goto yy13; - } + if (yych == 'a') goto yy176; + goto yy13; yy146: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy177; + if (yych == 'r') goto yy177; goto yy13; yy147: yych = (unsigned char)*++cur; - if (yych == 'I') goto yy178; + if (yych == 's') goto yy178; goto yy13; yy148: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy179; + if (yych == 'e') goto yy179; goto yy13; yy149: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy180; - if (yych == 'I') goto yy181; + if (yych == 'c') goto yy180; goto yy13; yy150: yych = (unsigned char)*++cur; - if (yych == 'A') goto yy182; + if (yych == 'e') goto yy181; goto yy13; yy151: + ++cur; +#line 75 "../src/parse/lex_conf.re" + { opts.set_condPrefix (lex_conf_string ()); return; } +#line 793 "src/parse/lex_conf.cc" +yy153: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy183; + if (yych == 'A') goto yy182; goto yy13; -yy152: +yy154: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy184; - goto yy13; -yy153: + if (yych <= 'S') { + if (yych == 'O') goto yy183; + goto yy13; + } else { + if (yych <= 'T') goto yy184; + if (yych <= 'U') goto yy185; + goto yy13; + } +yy155: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy185; - if (yych == 'K') goto yy186; + if (yych == 'E') goto yy186; + if (yych == 'I') goto yy187; goto yy13; -yy154: +yy156: yych = (unsigned char)*++cur; - if (yych == 'i') goto yy187; + if (yych == 'I') goto yy188; goto yy13; -yy155: - ++cur; -#line 123 "../src/parse/lex_conf.re" - { - const int32_t n = lex_conf_number (); - if (n < 0) - { - fatal ("configuration 'indent:top' must be nonnegative"); - } - opts.set_topIndent (static_cast (n)); - return; - } -#line 812 "src/parse/lex_conf.cc" yy157: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy188; + if (yych == 'E') goto yy189; goto yy13; yy158: yych = (unsigned char)*++cur; - if (yych == 'x') goto yy189; + if (yych == 'E') goto yy190; + if (yych == 'I') goto yy191; goto yy13; yy159: yych = (unsigned char)*++cur; - if (yych == 'x') goto yy190; + if (yych == 'A') goto yy192; goto yy13; yy160: - yyaccept = 2; - yych = (unsigned char)*(ptr = ++cur); - ctx = cur; - if (yybm[0+yych] & 64) { - goto yy192; - } - if (yych == '=') goto yy194; -yy161: -#line 151 "../src/parse/lex_conf.re" - { out.set_user_start_label (lex_conf_string ()); return; } -#line 836 "src/parse/lex_conf.cc" -yy162: yych = (unsigned char)*++cur; - if (yych == 't') goto yy196; + if (yych == 'E') goto yy193; goto yy13; -yy163: +yy161: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy198; + if (yych == 'E') goto yy194; goto yy13; -yy164: +yy162: yych = (unsigned char)*++cur; - if (yych == 'y') goto yy199; + if (yych == 'E') goto yy195; + if (yych == 'K') goto yy196; goto yy13; -yy165: +yy163: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy200; + if (yych == 'i') goto yy197; goto yy13; +yy164: + ++cur; +#line 128 "../src/parse/lex_conf.re" + { + const int32_t n = lex_conf_number (); + if (n < 0) + { + fatal ("configuration 'indent:top' must be nonnegative"); + } + opts.set_topIndent (static_cast (n)); + return; + } +#line 859 "src/parse/lex_conf.cc" yy166: yych = (unsigned char)*++cur; - if (yych == 'c') goto yy201; + if (yych == 'l') goto yy198; goto yy13; yy167: yych = (unsigned char)*++cur; - if (yych == 'b') goto yy202; + if (yych == 'x') goto yy199; goto yy13; yy168: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy203; + if (yych == 'x') goto yy200; goto yy13; yy169: - yych = (unsigned char)*++cur; - if (yych == 'h') goto yy204; - goto yy13; + yyaccept = 2; + yych = (unsigned char)*(ptr = ++cur); + ctx = cur; + if (yybm[0+yych] & 64) { + goto yy202; + } + if (yych == '=') goto yy204; yy170: - yych = (unsigned char)*++cur; - if (yych == 'r') goto yy205; - goto yy13; +#line 156 "../src/parse/lex_conf.re" + { out.set_user_start_label (lex_conf_string ()); return; } +#line 883 "src/parse/lex_conf.cc" yy171: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy207; + if (yych == 't') goto yy206; goto yy13; yy172: yych = (unsigned char)*++cur; - if (yych == 'f') goto yy208; + if (yych == 'l') goto yy208; goto yy13; yy173: yych = (unsigned char)*++cur; - if (yych == 'C') goto yy209; + if (yych == 'y') goto yy209; goto yy13; yy174: yych = (unsigned char)*++cur; - if (yych == 'N') goto yy210; + if (yych == 'r') goto yy210; goto yy13; yy175: yych = (unsigned char)*++cur; - if (yych <= 'W') goto yy13; - if (yych <= 'X') goto yy211; - if (yych <= 'Y') goto yy212; + if (yych == 'c') goto yy211; goto yy13; yy176: yych = (unsigned char)*++cur; - if (yych == 'R') goto yy213; + if (yych == 'b') goto yy212; goto yy13; yy177: yych = (unsigned char)*++cur; - if (yych == 'B') goto yy214; + if (yych == 'a') goto yy213; goto yy13; yy178: yych = (unsigned char)*++cur; - if (yych == 'L') goto yy215; + if (yych == 'h') goto yy214; goto yy13; yy179: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy216; + if (yych == 'r') goto yy215; goto yy13; yy180: yych = (unsigned char)*++cur; - if (yych == 'S') goto yy217; + if (yych == 'o') goto yy217; goto yy13; yy181: yych = (unsigned char)*++cur; - if (yych == 'M') goto yy218; + if (yych == 'f') goto yy218; goto yy13; yy182: yych = (unsigned char)*++cur; - if (yych == 'R') goto yy219; + if (yych == 'C') goto yy219; goto yy13; yy183: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy220; + if (yych == 'N') goto yy220; goto yy13; yy184: yych = (unsigned char)*++cur; - if (yych == 'S') goto yy221; + if (yych <= 'W') goto yy13; + if (yych <= 'X') goto yy221; + if (yych <= 'Y') goto yy223; goto yy13; yy185: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy222; + if (yych == 'R') goto yy224; goto yy13; yy186: yych = (unsigned char)*++cur; - if (yych == 'I') goto yy223; + if (yych == 'B') goto yy225; goto yy13; yy187: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy224; + if (yych == 'S') goto yy226; goto yy13; yy188: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy225; + if (yych == 'L') goto yy227; goto yy13; yy189: yych = (unsigned char)*++cur; - if (yych == 't') goto yy226; + if (yych == 'T') goto yy228; goto yy13; yy190: + yych = (unsigned char)*++cur; + if (yych == 'S') goto yy229; + goto yy13; +yy191: + yych = (unsigned char)*++cur; + if (yych == 'M') goto yy230; + goto yy13; +yy192: + yych = (unsigned char)*++cur; + if (yych == 'R') goto yy231; + goto yy13; +yy193: + yych = (unsigned char)*++cur; + if (yych == 'E') goto yy232; + goto yy13; +yy194: + yych = (unsigned char)*++cur; + if (yych == 'S') goto yy233; + goto yy13; +yy195: + yych = (unsigned char)*++cur; + if (yych == 'T') goto yy234; + goto yy13; +yy196: + yych = (unsigned char)*++cur; + if (yych == 'I') goto yy235; + goto yy13; +yy197: + yych = (unsigned char)*++cur; + if (yych == 'n') goto yy236; + goto yy13; +yy198: + yych = (unsigned char)*++cur; + if (yych == 'l') goto yy237; + goto yy13; +yy199: + yych = (unsigned char)*++cur; + if (yych == 't') goto yy238; + goto yy13; +yy200: ++cur; -#line 147 "../src/parse/lex_conf.re" +#line 152 "../src/parse/lex_conf.re" { opts.set_labelPrefix (lex_conf_string ()); return; } -#line 955 "src/parse/lex_conf.cc" -yy192: +#line 1006 "src/parse/lex_conf.cc" +yy202: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yybm[0+yych] & 64) { - goto yy192; + goto yy202; } if (yych != '=') goto yy13; -yy194: +yy204: ++cur; if ((lim - cur) < 2) fill(2); yych = (unsigned char)*cur; if (yych <= ',') { if (yych <= '\t') { if (yych <= 0x08) goto yy13; - goto yy194; + goto yy204; } else { - if (yych == ' ') goto yy194; + if (yych == ' ') goto yy204; goto yy13; } } else { if (yych <= '/') { - if (yych <= '-') goto yy228; + if (yych <= '-') goto yy240; goto yy13; } else { - if (yych <= '0') goto yy229; - if (yych <= '9') goto yy231; + if (yych <= '0') goto yy241; + if (yych <= '9') goto yy243; goto yy13; } } -yy196: +yy206: ++cur; #line 90 "../src/parse/lex_conf.re" { opts.set_bUseStateAbort (lex_conf_number () != 0); return; } -#line 990 "src/parse/lex_conf.cc" -yy198: +#line 1041 "src/parse/lex_conf.cc" +yy208: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy233; + if (yych == 'a') goto yy245; goto yy13; -yy199: +yy209: yych = (unsigned char)*++cur; if (yych <= 'c') { if (yych <= '`') goto yy13; - if (yych <= 'a') goto yy234; - if (yych <= 'b') goto yy235; - goto yy236; + if (yych <= 'a') goto yy246; + if (yych <= 'b') goto yy247; + goto yy248; } else { if (yych <= 'r') goto yy13; - if (yych <= 's') goto yy237; - if (yych <= 't') goto yy238; + if (yych <= 's') goto yy249; + if (yych <= 't') goto yy250; goto yy13; } -yy200: +yy210: yych = (unsigned char)*++cur; - if (yych == 's') goto yy239; + if (yych == 's') goto yy251; goto yy13; -yy201: +yy211: yych = (unsigned char)*++cur; - if (yych == 'k') goto yy240; + if (yych == 'k') goto yy252; goto yy13; -yy202: +yy212: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy242; + if (yych == 'l') goto yy254; goto yy13; -yy203: +yy213: yych = (unsigned char)*++cur; - if (yych == 'm') goto yy243; + if (yych == 'm') goto yy255; goto yy13; -yy204: +yy214: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy244; + if (yych == 'o') goto yy256; goto yy13; -yy205: +yy215: yyaccept = 3; yych = (unsigned char)*(ptr = ++cur); - if (yych == '@') goto yy245; -yy206: + if (yych == '@') goto yy257; +yy216: #line 77 "../src/parse/lex_conf.re" { opts.set_condDivider (lex_conf_string ()); return; } -#line 1035 "src/parse/lex_conf.cc" -yy207: +#line 1086 "src/parse/lex_conf.cc" +yy217: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy246; + if (yych == 'n') goto yy258; goto yy13; -yy208: +yy218: yych = (unsigned char)*++cur; - if (yych == 'i') goto yy247; + if (yych == 'i') goto yy259; goto yy13; -yy209: +yy219: yych = (unsigned char)*++cur; - if (yych == 'K') goto yy248; + if (yych == 'K') goto yy260; goto yy13; -yy210: +yy220: yych = (unsigned char)*++cur; - if (yych == 'D') goto yy249; + if (yych == 'D') goto yy261; goto yy13; -yy211: +yy221: + yyaccept = 4; + yych = (unsigned char)*(ptr = ++cur); + if (yych == 'M') goto yy262; +yy222: +#line 121 "../src/parse/lex_conf.re" + { opts.set_yyctx (lex_conf_string ()); return; } +#line 1110 "src/parse/lex_conf.cc" +yy223: yych = (unsigned char)*++cur; - if (yych == 'M') goto yy250; + if (yych == 'P') goto yy263; goto yy13; -yy212: +yy224: yych = (unsigned char)*++cur; - if (yych == 'P') goto yy251; + if (yych == 'S') goto yy264; goto yy13; -yy213: +yy225: yych = (unsigned char)*++cur; - if (yych == 'S') goto yy252; + if (yych == 'U') goto yy265; goto yy13; -yy214: +yy226: yych = (unsigned char)*++cur; - if (yych == 'U') goto yy253; + if (yych == 'T') goto yy266; goto yy13; -yy215: +yy227: yych = (unsigned char)*++cur; - if (yych == 'L') goto yy254; + if (yych == 'L') goto yy268; goto yy13; -yy216: +yy228: yych = (unsigned char)*++cur; - if (yych == 'C') goto yy256; - if (yych == 'S') goto yy257; + if (yych == 'C') goto yy270; + if (yych == 'S') goto yy271; goto yy13; -yy217: +yy229: yych = (unsigned char)*++cur; - if (yych == 'S') goto yy258; + if (yych == 'S') goto yy272; goto yy13; -yy218: +yy230: yych = (unsigned char)*++cur; - if (yych == 'I') goto yy259; + if (yych == 'I') goto yy273; goto yy13; -yy219: +yy231: yych = (unsigned char)*++cur; - if (yych == 'K') goto yy260; + if (yych == 'K') goto yy274; goto yy13; -yy220: +yy232: yych = (unsigned char)*++cur; - if (yych == 'K') goto yy261; + if (yych == 'K') goto yy275; goto yy13; -yy221: +yy233: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy263; + if (yych == 'T') goto yy277; goto yy13; -yy222: +yy234: yych = (unsigned char)*++cur; - if (yych == 'C') goto yy264; - if (yych == 'S') goto yy265; + if (yych == 'C') goto yy278; + if (yych == 'S') goto yy279; goto yy13; -yy223: +yy235: yych = (unsigned char)*++cur; - if (yych == 'P') goto yy266; + if (yych == 'P') goto yy280; goto yy13; -yy224: +yy236: yych = (unsigned char)*++cur; - if (yych == 'g') goto yy268; + if (yych == 'g') goto yy282; goto yy13; -yy225: +yy237: yych = (unsigned char)*++cur; - if (yych == 'L') goto yy270; + if (yych == 'L') goto yy284; goto yy13; -yy226: +yy238: ++cur; #line 89 "../src/parse/lex_conf.re" { opts.set_yynext (lex_conf_string ()); return; } -#line 1118 "src/parse/lex_conf.cc" -yy228: +#line 1177 "src/parse/lex_conf.cc" +yy240: yych = (unsigned char)*++cur; if (yych <= '0') goto yy13; - if (yych <= '9') goto yy231; + if (yych <= '9') goto yy243; goto yy13; -yy229: +yy241: ++cur; -yy230: +yy242: cur = ctx; -#line 150 "../src/parse/lex_conf.re" +#line 155 "../src/parse/lex_conf.re" { out.set_force_start_label (lex_conf_number () != 0); return; } -#line 1130 "src/parse/lex_conf.cc" -yy231: +#line 1189 "src/parse/lex_conf.cc" +yy243: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yybm[0+yych] & 128) { - goto yy231; + goto yy243; } - goto yy230; -yy233: + goto yy242; +yy245: yych = (unsigned char)*++cur; - if (yych == 'b') goto yy271; + if (yych == 'b') goto yy285; goto yy13; -yy234: +yy246: yych = (unsigned char)*++cur; - if (yych == 'c') goto yy272; + if (yych == 'c') goto yy286; goto yy13; -yy235: +yy247: yych = (unsigned char)*++cur; - if (yych == 'm') goto yy273; + if (yych == 'm') goto yy287; goto yy13; -yy236: +yy248: yych = (unsigned char)*++cur; - if (yych == 'h') goto yy275; - if (yych == 't') goto yy277; + if (yych == 'h') goto yy289; + if (yych == 't') goto yy291; goto yy13; -yy237: +yy249: yych = (unsigned char)*++cur; - if (yych == 't') goto yy278; + if (yych == 't') goto yy292; goto yy13; -yy238: +yy250: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy279; + if (yych == 'a') goto yy293; goto yy13; -yy239: +yy251: yych = (unsigned char)*++cur; - if (yych == 'i') goto yy280; + if (yych == 'i') goto yy294; goto yy13; -yy240: +yy252: ++cur; -#line 145 "../src/parse/lex_conf.re" +#line 150 "../src/parse/lex_conf.re" { opts.set_fill_check (lex_conf_number () != 0); return; } -#line 1172 "src/parse/lex_conf.cc" -yy242: +#line 1231 "src/parse/lex_conf.cc" +yy254: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy281; + if (yych == 'e') goto yy295; goto yy13; -yy243: +yy255: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy283; + if (yych == 'e') goto yy297; goto yy13; -yy244: +yy256: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy284; + if (yych == 'l') goto yy298; goto yy13; -yy245: +yy257: yych = (unsigned char)*++cur; - if (yych == 'c') goto yy285; + if (yych == 'c') goto yy299; goto yy13; -yy246: +yy258: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy286; + if (yych == 'd') goto yy300; goto yy13; -yy247: +yy259: yych = (unsigned char)*++cur; - if (yych == 'x') goto yy288; + if (yych == 'x') goto yy302; goto yy13; -yy248: +yy260: yych = (unsigned char)*++cur; - if (yych == 'U') goto yy290; + if (yych == 'U') goto yy304; goto yy13; -yy249: +yy261: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy291; + if (yych == 'T') goto yy305; goto yy13; -yy250: +yy262: yych = (unsigned char)*++cur; - if (yych == 'A') goto yy292; + if (yych == 'A') goto yy306; goto yy13; -yy251: +yy263: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy293; + if (yych == 'E') goto yy307; goto yy13; -yy252: +yy264: yych = (unsigned char)*++cur; - if (yych == 'O') goto yy295; + if (yych == 'O') goto yy309; goto yy13; -yy253: +yy265: yych = (unsigned char)*++cur; - if (yych == 'G') goto yy296; + if (yych == 'G') goto yy310; goto yy13; -yy254: - yyaccept = 4; +yy266: + yyaccept = 5; yych = (unsigned char)*(ptr = ++cur); - if (yych == ':') goto yy298; - if (yych == '@') goto yy299; -yy255: -#line 140 "../src/parse/lex_conf.re" + if (yych == 'T') goto yy312; +yy267: +#line 122 "../src/parse/lex_conf.re" + { opts.set_yydist (lex_conf_string ()); return; } +#line 1287 "src/parse/lex_conf.cc" +yy268: + yyaccept = 6; + yych = (unsigned char)*(ptr = ++cur); + if (yych == ':') goto yy313; + if (yych == '@') goto yy314; +yy269: +#line 145 "../src/parse/lex_conf.re" { opts.set_fill (lex_conf_string ()); return; } -#line 1229 "src/parse/lex_conf.cc" -yy256: +#line 1296 "src/parse/lex_conf.cc" +yy270: yych = (unsigned char)*++cur; - if (yych == 'O') goto yy300; + if (yych == 'O') goto yy315; goto yy13; -yy257: +yy271: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy301; + if (yych == 'T') goto yy316; goto yy13; -yy258: +yy272: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy302; + if (yych == 'T') goto yy317; goto yy13; -yy259: +yy273: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy303; + if (yych == 'T') goto yy318; goto yy13; -yy260: +yy274: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy305; + if (yych == 'E') goto yy320; goto yy13; -yy261: +yy275: ++cur; #line 113 "../src/parse/lex_conf.re" { opts.set_yypeek (lex_conf_string ()); return; } -#line 1254 "src/parse/lex_conf.cc" -yy263: +#line 1321 "src/parse/lex_conf.cc" +yy277: yych = (unsigned char)*++cur; - if (yych == 'O') goto yy306; + if (yych == 'O') goto yy321; goto yy13; -yy264: +yy278: yych = (unsigned char)*++cur; - if (yych == 'O') goto yy307; + if (yych == 'O') goto yy322; goto yy13; -yy265: +yy279: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy308; + if (yych == 'T') goto yy323; goto yy13; -yy266: +yy280: ++cur; #line 114 "../src/parse/lex_conf.re" { opts.set_yyskip (lex_conf_string ()); return; } -#line 1271 "src/parse/lex_conf.cc" -yy268: +#line 1338 "src/parse/lex_conf.cc" +yy282: ++cur; -#line 121 "../src/parse/lex_conf.re" +#line 126 "../src/parse/lex_conf.re" { opts.set_indString (lex_conf_string ()); return; } -#line 1276 "src/parse/lex_conf.cc" -yy270: +#line 1343 "src/parse/lex_conf.cc" +yy284: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy309; + if (yych == 'a') goto yy324; goto yy13; -yy271: +yy285: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy310; + if (yych == 'e') goto yy325; goto yy13; -yy272: +yy286: yych = (unsigned char)*++cur; - if (yych == 'c') goto yy311; + if (yych == 'c') goto yy326; goto yy13; -yy273: +yy287: ++cur; #line 94 "../src/parse/lex_conf.re" { opts.set_yybm (lex_conf_string ()); return; } -#line 1293 "src/parse/lex_conf.cc" -yy275: +#line 1360 "src/parse/lex_conf.cc" +yy289: ++cur; -#line 136 "../src/parse/lex_conf.re" +#line 141 "../src/parse/lex_conf.re" { opts.set_yych (lex_conf_string ()); return; } -#line 1298 "src/parse/lex_conf.cc" -yy277: +#line 1365 "src/parse/lex_conf.cc" +yy291: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy312; + if (yych == 'a') goto yy327; goto yy13; -yy278: +yy292: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy313; + if (yych == 'a') goto yy328; goto yy13; -yy279: +yy293: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy314; + if (yych == 'r') goto yy329; goto yy13; -yy280: +yy294: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy315; + if (yych == 'o') goto yy330; goto yy13; -yy281: +yy295: ++cur; -#line 141 "../src/parse/lex_conf.re" +#line 146 "../src/parse/lex_conf.re" { opts.set_fill_use (lex_conf_number () != 0); return; } -#line 1319 "src/parse/lex_conf.cc" -yy283: +#line 1386 "src/parse/lex_conf.cc" +yy297: yych = (unsigned char)*++cur; - if (yych == 't') goto yy316; + if (yych == 't') goto yy331; goto yy13; -yy284: +yy298: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy317; + if (yych == 'd') goto yy332; goto yy13; -yy285: +yy299: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy319; + if (yych == 'o') goto yy334; goto yy13; -yy286: +yy300: ++cur; #line 80 "../src/parse/lex_conf.re" { opts.set_condGotoParam (lex_conf_string ()); return; } -#line 1336 "src/parse/lex_conf.cc" -yy288: +#line 1403 "src/parse/lex_conf.cc" +yy302: ++cur; #line 76 "../src/parse/lex_conf.re" { opts.set_condEnumPrefix (lex_conf_string ()); return; } -#line 1341 "src/parse/lex_conf.cc" -yy290: +#line 1408 "src/parse/lex_conf.cc" +yy304: yych = (unsigned char)*++cur; - if (yych == 'P') goto yy320; + if (yych == 'P') goto yy335; goto yy13; -yy291: +yy305: yych = (unsigned char)*++cur; - if (yych == 'Y') goto yy322; + if (yych == 'Y') goto yy337; goto yy13; -yy292: +yy306: yych = (unsigned char)*++cur; - if (yych == 'R') goto yy323; + if (yych == 'R') goto yy338; goto yy13; -yy293: +yy307: ++cur; -#line 135 "../src/parse/lex_conf.re" +#line 140 "../src/parse/lex_conf.re" { opts.set_yyctype (lex_conf_string ()); return; } -#line 1358 "src/parse/lex_conf.cc" -yy295: +#line 1425 "src/parse/lex_conf.cc" +yy309: yych = (unsigned char)*++cur; - if (yych == 'R') goto yy324; + if (yych == 'R') goto yy339; goto yy13; -yy296: +yy310: ++cur; -#line 133 "../src/parse/lex_conf.re" +#line 138 "../src/parse/lex_conf.re" { opts.set_yydebug (lex_conf_string ()); return; } -#line 1367 "src/parse/lex_conf.cc" -yy298: +#line 1434 "src/parse/lex_conf.cc" +yy312: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy326; + if (yych == 'Y') goto yy341; goto yy13; -yy299: +yy313: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy327; + if (yych == 'n') goto yy342; goto yy13; -yy300: +yy314: yych = (unsigned char)*++cur; - if (yych == 'N') goto yy328; + if (yych == 'l') goto yy343; goto yy13; -yy301: +yy315: yych = (unsigned char)*++cur; - if (yych == 'A') goto yy329; + if (yych == 'N') goto yy344; goto yy13; -yy302: +yy316: yych = (unsigned char)*++cur; - if (yych == 'H') goto yy330; + if (yych == 'A') goto yy345; goto yy13; -yy303: +yy317: + yych = (unsigned char)*++cur; + if (yych == 'H') goto yy346; + goto yy13; +yy318: ++cur; #line 111 "../src/parse/lex_conf.re" { opts.set_yylimit (lex_conf_string ()); return; } -#line 1392 "src/parse/lex_conf.cc" -yy305: +#line 1463 "src/parse/lex_conf.cc" +yy320: yych = (unsigned char)*++cur; - if (yych == 'R') goto yy331; + if (yych == 'R') goto yy347; goto yy13; -yy306: +yy321: yych = (unsigned char)*++cur; - if (yych == 'R') goto yy333; + if (yych == 'R') goto yy349; goto yy13; -yy307: +yy322: yych = (unsigned char)*++cur; - if (yych == 'N') goto yy334; + if (yych == 'N') goto yy350; goto yy13; -yy308: +yy323: yych = (unsigned char)*++cur; - if (yych == 'A') goto yy335; + if (yych == 'A') goto yy351; goto yy13; -yy309: +yy324: yych = (unsigned char)*++cur; - if (yych == 'b') goto yy336; + if (yych == 'b') goto yy352; goto yy13; -yy310: +yy325: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy337; + if (yych == 'l') goto yy353; goto yy13; -yy311: +yy326: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy339; + if (yych == 'e') goto yy355; goto yy13; -yy312: +yy327: yych = (unsigned char)*++cur; - if (yych == 'b') goto yy340; + if (yych == 'b') goto yy356; goto yy13; -yy313: +yy328: yych = (unsigned char)*++cur; - if (yych == 'b') goto yy341; + if (yych == 'b') goto yy357; goto yy13; -yy314: +yy329: yych = (unsigned char)*++cur; - if (yych == 'g') goto yy342; + if (yych == 'g') goto yy358; goto yy13; -yy315: +yy330: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy343; + if (yych == 'n') goto yy359; goto yy13; -yy316: +yy331: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy345; + if (yych == 'e') goto yy361; goto yy13; -yy317: +yy332: ++cur; #line 97 "../src/parse/lex_conf.re" { @@ -1449,490 +1520,503 @@ yy317: opts.set_cGotoThreshold (static_cast (n)); return; } -#line 1453 "src/parse/lex_conf.cc" -yy319: +#line 1524 "src/parse/lex_conf.cc" +yy334: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy346; + if (yych == 'n') goto yy362; goto yy13; -yy320: - yyaccept = 5; +yy335: + yyaccept = 7; yych = (unsigned char)*(ptr = ++cur); - if (yych == 'C') goto yy347; -yy321: + if (yych == 'C') goto yy363; +yy336: #line 115 "../src/parse/lex_conf.re" { opts.set_yybackup (lex_conf_string ()); return; } -#line 1465 "src/parse/lex_conf.cc" -yy322: +#line 1536 "src/parse/lex_conf.cc" +yy337: yych = (unsigned char)*++cur; - if (yych == 'P') goto yy348; + if (yych == 'P') goto yy364; goto yy13; -yy323: +yy338: yych = (unsigned char)*++cur; - if (yych == 'K') goto yy349; + if (yych == 'K') goto yy365; goto yy13; -yy324: +yy339: ++cur; #line 108 "../src/parse/lex_conf.re" { opts.set_yycursor (lex_conf_string ()); return; } -#line 1478 "src/parse/lex_conf.cc" -yy326: +#line 1549 "src/parse/lex_conf.cc" +yy341: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy350; + if (yych == 'P') goto yy366; goto yy13; -yy327: +yy342: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy351; + if (yych == 'a') goto yy367; goto yy13; -yy328: +yy343: yych = (unsigned char)*++cur; - if (yych == 'D') goto yy352; + if (yych == 'e') goto yy368; goto yy13; -yy329: +yy344: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy353; + if (yych == 'D') goto yy369; goto yy13; -yy330: +yy345: yych = (unsigned char)*++cur; - if (yych == 'A') goto yy354; + if (yych == 'T') goto yy370; goto yy13; -yy331: +yy346: + yych = (unsigned char)*++cur; + if (yych == 'A') goto yy371; + goto yy13; +yy347: ++cur; #line 109 "../src/parse/lex_conf.re" { opts.set_yymarker (lex_conf_string ()); return; } -#line 1503 "src/parse/lex_conf.cc" -yy333: +#line 1578 "src/parse/lex_conf.cc" +yy349: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy355; + if (yych == 'E') goto yy372; goto yy13; -yy334: +yy350: yych = (unsigned char)*++cur; - if (yych == 'D') goto yy357; + if (yych == 'D') goto yy374; goto yy13; -yy335: +yy351: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy358; + if (yych == 'T') goto yy375; goto yy13; -yy336: +yy352: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy359; + if (yych == 'e') goto yy376; goto yy13; -yy337: +yy353: ++cur; #line 91 "../src/parse/lex_conf.re" { opts.set_bUseStateNext (lex_conf_number () != 0); return; } -#line 1524 "src/parse/lex_conf.cc" -yy339: +#line 1599 "src/parse/lex_conf.cc" +yy355: yych = (unsigned char)*++cur; - if (yych == 'p') goto yy360; + if (yych == 'p') goto yy377; goto yy13; -yy340: +yy356: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy361; + if (yych == 'l') goto yy378; goto yy13; -yy341: +yy357: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy362; + if (yych == 'l') goto yy379; goto yy13; -yy342: +yy358: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy363; + if (yych == 'e') goto yy380; goto yy13; -yy343: +yy359: ++cur; -#line 137 "../src/parse/lex_conf.re" +#line 142 "../src/parse/lex_conf.re" { opts.set_yychConversion (lex_conf_number () != 0); return; } -#line 1545 "src/parse/lex_conf.cc" -yy345: +#line 1620 "src/parse/lex_conf.cc" +yy361: yych = (unsigned char)*++cur; - if (yych == 'r') goto yy364; + if (yych == 'r') goto yy381; goto yy13; -yy346: +yy362: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy366; + if (yych == 'd') goto yy383; goto yy13; -yy347: +yy363: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy368; + if (yych == 'T') goto yy385; goto yy13; -yy348: +yy364: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy369; + if (yych == 'E') goto yy386; goto yy13; -yy349: +yy365: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy371; + if (yych == 'E') goto yy388; goto yy13; -yy350: +yy366: yych = (unsigned char)*++cur; - if (yych == 'k') goto yy372; + if (yych == 'E') goto yy389; goto yy13; -yy351: +yy367: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy373; + if (yych == 'k') goto yy391; goto yy13; -yy352: +yy368: yych = (unsigned char)*++cur; - if (yych == 'I') goto yy375; + if (yych == 'n') goto yy392; goto yy13; -yy353: +yy369: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy376; + if (yych == 'I') goto yy394; goto yy13; -yy354: +yy370: yych = (unsigned char)*++cur; - if (yych == 'N') goto yy378; + if (yych == 'E') goto yy395; goto yy13; -yy355: - yyaccept = 6; +yy371: + yych = (unsigned char)*++cur; + if (yych == 'N') goto yy397; + goto yy13; +yy372: + yyaccept = 8; yych = (unsigned char)*(ptr = ++cur); - if (yych == 'C') goto yy380; -yy356: + if (yych == 'C') goto yy399; +yy373: #line 117 "../src/parse/lex_conf.re" { opts.set_yyrestore (lex_conf_string ()); return; } -#line 1593 "src/parse/lex_conf.cc" -yy357: +#line 1672 "src/parse/lex_conf.cc" +yy374: yych = (unsigned char)*++cur; - if (yych == 'I') goto yy381; + if (yych == 'I') goto yy400; goto yy13; -yy358: +yy375: yych = (unsigned char)*++cur; - if (yych == 'E') goto yy382; + if (yych == 'E') goto yy401; goto yy13; -yy359: +yy376: yych = (unsigned char)*++cur; - if (yych == 'l') goto yy384; + if (yych == 'l') goto yy403; goto yy13; -yy360: +yy377: yych = (unsigned char)*++cur; - if (yych == 't') goto yy386; + if (yych == 't') goto yy405; goto yy13; -yy361: +yy378: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy388; + if (yych == 'e') goto yy407; goto yy13; -yy362: +yy379: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy390; + if (yych == 'e') goto yy409; goto yy13; -yy363: +yy380: yych = (unsigned char)*++cur; - if (yych == 't') goto yy392; + if (yych == 't') goto yy411; goto yy13; -yy364: +yy381: ++cur; -#line 143 "../src/parse/lex_conf.re" +#line 148 "../src/parse/lex_conf.re" { opts.set_fill_arg_use (lex_conf_number () != 0); return; } -#line 1626 "src/parse/lex_conf.cc" -yy366: +#line 1705 "src/parse/lex_conf.cc" +yy383: ++cur; #line 78 "../src/parse/lex_conf.re" { opts.set_condDividerParam (lex_conf_string ()); return; } -#line 1631 "src/parse/lex_conf.cc" -yy368: +#line 1710 "src/parse/lex_conf.cc" +yy385: yych = (unsigned char)*++cur; - if (yych == 'X') goto yy394; + if (yych == 'X') goto yy413; goto yy13; -yy369: +yy386: ++cur; #line 69 "../src/parse/lex_conf.re" { opts.set_yycondtype (lex_conf_string ()); return; } -#line 1640 "src/parse/lex_conf.cc" -yy371: +#line 1719 "src/parse/lex_conf.cc" +yy388: yych = (unsigned char)*++cur; - if (yych == 'R') goto yy396; + if (yych == 'R') goto yy415; goto yy13; -yy372: +yy389: + ++cur; +#line 123 "../src/parse/lex_conf.re" + { opts.set_yydisttype (lex_conf_string ()); return; } +#line 1728 "src/parse/lex_conf.cc" +yy391: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy398; + if (yych == 'e') goto yy417; goto yy13; -yy373: +yy392: ++cur; -#line 142 "../src/parse/lex_conf.re" +#line 147 "../src/parse/lex_conf.re" { opts.set_fill_arg (lex_conf_string ()); return; } -#line 1653 "src/parse/lex_conf.cc" -yy375: +#line 1737 "src/parse/lex_conf.cc" +yy394: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy399; + if (yych == 'T') goto yy418; goto yy13; -yy376: - yyaccept = 7; +yy395: + yyaccept = 9; yych = (unsigned char)*(ptr = ++cur); - if (yych == ':') goto yy400; -yy377: + if (yych == ':') goto yy419; +yy396: #line 83 "../src/parse/lex_conf.re" { opts.set_state_get (lex_conf_string ()); return; } -#line 1665 "src/parse/lex_conf.cc" -yy378: +#line 1749 "src/parse/lex_conf.cc" +yy397: ++cur; #line 119 "../src/parse/lex_conf.re" { opts.set_yylessthan (lex_conf_string ()); return; } -#line 1670 "src/parse/lex_conf.cc" -yy380: +#line 1754 "src/parse/lex_conf.cc" +yy399: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy401; + if (yych == 'T') goto yy420; goto yy13; -yy381: +yy400: yych = (unsigned char)*++cur; - if (yych == 'T') goto yy402; + if (yych == 'T') goto yy421; goto yy13; -yy382: - yyaccept = 8; +yy401: + yyaccept = 10; yych = (unsigned char)*(ptr = ++cur); - if (yych == ':') goto yy403; - if (yych == '@') goto yy404; -yy383: + if (yych == ':') goto yy422; + if (yych == '@') goto yy423; +yy402: #line 85 "../src/parse/lex_conf.re" { opts.set_state_set (lex_conf_string ()); return; } -#line 1687 "src/parse/lex_conf.cc" -yy384: +#line 1771 "src/parse/lex_conf.cc" +yy403: ++cur; #line 88 "../src/parse/lex_conf.re" { opts.set_yyfilllabel (lex_conf_string ()); return; } -#line 1692 "src/parse/lex_conf.cc" -yy386: +#line 1776 "src/parse/lex_conf.cc" +yy405: ++cur; #line 92 "../src/parse/lex_conf.re" { opts.set_yyaccept (lex_conf_string ()); return; } -#line 1697 "src/parse/lex_conf.cc" -yy388: +#line 1781 "src/parse/lex_conf.cc" +yy407: ++cur; #line 81 "../src/parse/lex_conf.re" { opts.set_yyctable (lex_conf_string ()); return; } -#line 1702 "src/parse/lex_conf.cc" -yy390: +#line 1786 "src/parse/lex_conf.cc" +yy409: ++cur; -#line 154 "../src/parse/lex_conf.re" +#line 159 "../src/parse/lex_conf.re" { lex_conf_string (); return; } -#line 1707 "src/parse/lex_conf.cc" -yy392: +#line 1791 "src/parse/lex_conf.cc" +yy411: ++cur; #line 106 "../src/parse/lex_conf.re" { opts.set_yytarget (lex_conf_string ()); return; } -#line 1712 "src/parse/lex_conf.cc" -yy394: +#line 1796 "src/parse/lex_conf.cc" +yy413: ++cur; #line 116 "../src/parse/lex_conf.re" { opts.set_yybackupctx (lex_conf_string ()); return; } -#line 1717 "src/parse/lex_conf.cc" -yy396: +#line 1801 "src/parse/lex_conf.cc" +yy415: ++cur; #line 110 "../src/parse/lex_conf.re" { opts.set_yyctxmarker (lex_conf_string ()); return; } -#line 1722 "src/parse/lex_conf.cc" -yy398: +#line 1806 "src/parse/lex_conf.cc" +yy417: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy405; + if (yych == 'd') goto yy424; goto yy13; -yy399: +yy418: yych = (unsigned char)*++cur; - if (yych == 'I') goto yy407; + if (yych == 'I') goto yy426; goto yy13; -yy400: +yy419: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy408; + if (yych == 'n') goto yy427; goto yy13; -yy401: +yy420: yych = (unsigned char)*++cur; - if (yych == 'X') goto yy409; + if (yych == 'X') goto yy428; goto yy13; -yy402: +yy421: yych = (unsigned char)*++cur; - if (yych == 'I') goto yy411; + if (yych == 'I') goto yy430; goto yy13; -yy403: +yy422: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy412; + if (yych == 'n') goto yy431; goto yy13; -yy404: +yy423: yych = (unsigned char)*++cur; - if (yych == 's') goto yy413; + if (yych == 's') goto yy432; goto yy13; -yy405: +yy424: ++cur; -#line 144 "../src/parse/lex_conf.re" +#line 149 "../src/parse/lex_conf.re" { opts.set_fill_naked (lex_conf_number () != 0); return; } -#line 1755 "src/parse/lex_conf.cc" -yy407: +#line 1839 "src/parse/lex_conf.cc" +yy426: yych = (unsigned char)*++cur; - if (yych == 'O') goto yy414; + if (yych == 'O') goto yy433; goto yy13; -yy408: +yy427: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy415; + if (yych == 'a') goto yy434; goto yy13; -yy409: +yy428: ++cur; #line 118 "../src/parse/lex_conf.re" { opts.set_yyrestorectx (lex_conf_string ()); return; } -#line 1768 "src/parse/lex_conf.cc" -yy411: +#line 1852 "src/parse/lex_conf.cc" +yy430: yych = (unsigned char)*++cur; - if (yych == 'O') goto yy416; + if (yych == 'O') goto yy435; goto yy13; -yy412: +yy431: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy417; + if (yych == 'a') goto yy436; goto yy13; -yy413: +yy432: yych = (unsigned char)*++cur; - if (yych == 't') goto yy418; + if (yych == 't') goto yy437; goto yy13; -yy414: +yy433: yych = (unsigned char)*++cur; - if (yych == 'N') goto yy419; + if (yych == 'N') goto yy438; goto yy13; -yy415: +yy434: yych = (unsigned char)*++cur; - if (yych == 'k') goto yy421; + if (yych == 'k') goto yy440; goto yy13; -yy416: +yy435: yych = (unsigned char)*++cur; - if (yych == 'N') goto yy422; + if (yych == 'N') goto yy441; goto yy13; -yy417: +yy436: yych = (unsigned char)*++cur; - if (yych == 'k') goto yy424; + if (yych == 'k') goto yy443; goto yy13; -yy418: +yy437: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy425; + if (yych == 'a') goto yy444; goto yy13; -yy419: - yyaccept = 9; +yy438: + yyaccept = 11; yych = (unsigned char)*(ptr = ++cur); - if (yych == ':') goto yy426; -yy420: + if (yych == ':') goto yy445; +yy439: #line 70 "../src/parse/lex_conf.re" { opts.set_cond_get (lex_conf_string ()); return; } -#line 1808 "src/parse/lex_conf.cc" -yy421: +#line 1892 "src/parse/lex_conf.cc" +yy440: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy427; + if (yych == 'e') goto yy446; goto yy13; -yy422: - yyaccept = 10; +yy441: + yyaccept = 12; yych = (unsigned char)*(ptr = ++cur); - if (yych == ':') goto yy428; - if (yych == '@') goto yy429; -yy423: + if (yych == ':') goto yy447; + if (yych == '@') goto yy448; +yy442: #line 72 "../src/parse/lex_conf.re" { opts.set_cond_set (lex_conf_string ()); return; } -#line 1821 "src/parse/lex_conf.cc" -yy424: +#line 1905 "src/parse/lex_conf.cc" +yy443: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy430; + if (yych == 'e') goto yy449; goto yy13; -yy425: +yy444: yych = (unsigned char)*++cur; - if (yych == 't') goto yy431; + if (yych == 't') goto yy450; goto yy13; -yy426: +yy445: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy432; + if (yych == 'n') goto yy451; goto yy13; -yy427: +yy446: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy433; + if (yych == 'd') goto yy452; goto yy13; -yy428: +yy447: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy435; + if (yych == 'n') goto yy454; goto yy13; -yy429: +yy448: yych = (unsigned char)*++cur; - if (yych == 'c') goto yy436; + if (yych == 'c') goto yy455; goto yy13; -yy430: +yy449: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy437; + if (yych == 'd') goto yy456; goto yy13; -yy431: +yy450: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy439; + if (yych == 'e') goto yy458; goto yy13; -yy432: +yy451: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy441; + if (yych == 'a') goto yy460; goto yy13; -yy433: +yy452: ++cur; #line 84 "../src/parse/lex_conf.re" { opts.set_state_get_naked (lex_conf_number () != 0); return; } -#line 1862 "src/parse/lex_conf.cc" -yy435: +#line 1946 "src/parse/lex_conf.cc" +yy454: yych = (unsigned char)*++cur; - if (yych == 'a') goto yy442; + if (yych == 'a') goto yy461; goto yy13; -yy436: +yy455: yych = (unsigned char)*++cur; - if (yych == 'o') goto yy443; + if (yych == 'o') goto yy462; goto yy13; -yy437: +yy456: ++cur; #line 86 "../src/parse/lex_conf.re" { opts.set_state_set_naked (lex_conf_number () != 0); return; } -#line 1875 "src/parse/lex_conf.cc" -yy439: +#line 1959 "src/parse/lex_conf.cc" +yy458: ++cur; #line 87 "../src/parse/lex_conf.re" { opts.set_state_set_arg (lex_conf_string ()); return; } -#line 1880 "src/parse/lex_conf.cc" -yy441: +#line 1964 "src/parse/lex_conf.cc" +yy460: yych = (unsigned char)*++cur; - if (yych == 'k') goto yy444; + if (yych == 'k') goto yy463; goto yy13; -yy442: +yy461: yych = (unsigned char)*++cur; - if (yych == 'k') goto yy445; + if (yych == 'k') goto yy464; goto yy13; -yy443: +yy462: yych = (unsigned char)*++cur; - if (yych == 'n') goto yy446; + if (yych == 'n') goto yy465; goto yy13; -yy444: +yy463: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy447; + if (yych == 'e') goto yy466; goto yy13; -yy445: +yy464: yych = (unsigned char)*++cur; - if (yych == 'e') goto yy448; + if (yych == 'e') goto yy467; goto yy13; -yy446: +yy465: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy449; + if (yych == 'd') goto yy468; goto yy13; -yy447: +yy466: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy451; + if (yych == 'd') goto yy470; goto yy13; -yy448: +yy467: yych = (unsigned char)*++cur; - if (yych == 'd') goto yy453; + if (yych == 'd') goto yy472; goto yy13; -yy449: +yy468: ++cur; #line 73 "../src/parse/lex_conf.re" { opts.set_cond_set_arg (lex_conf_string ()); return; } -#line 1917 "src/parse/lex_conf.cc" -yy451: +#line 2001 "src/parse/lex_conf.cc" +yy470: ++cur; #line 71 "../src/parse/lex_conf.re" { opts.set_cond_get_naked (lex_conf_number () != 0); return; } -#line 1922 "src/parse/lex_conf.cc" -yy453: +#line 2006 "src/parse/lex_conf.cc" +yy472: ++cur; #line 74 "../src/parse/lex_conf.re" { opts.set_cond_set_naked (lex_conf_number () != 0); return; } -#line 1927 "src/parse/lex_conf.cc" +#line 2011 "src/parse/lex_conf.cc" } -#line 155 "../src/parse/lex_conf.re" +#line 160 "../src/parse/lex_conf.re" } void Scanner::lex_conf_assign () { -#line 1936 "src/parse/lex_conf.cc" +#line 2020 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -1972,56 +2056,56 @@ void Scanner::lex_conf_assign () if ((lim - cur) < 2) fill(2); yych = (unsigned char)*cur; if (yych <= 0x1F) { - if (yych == '\t') goto yy459; + if (yych == '\t') goto yy478; } else { - if (yych <= ' ') goto yy459; - if (yych == '=') goto yy460; + if (yych <= ' ') goto yy478; + if (yych == '=') goto yy479; } ++cur; -yy458: -#line 161 "../src/parse/lex_conf.re" +yy477: +#line 166 "../src/parse/lex_conf.re" { fatal ("missing '=' in configuration"); } -#line 1985 "src/parse/lex_conf.cc" -yy459: +#line 2069 "src/parse/lex_conf.cc" +yy478: yych = (unsigned char)*(ptr = ++cur); if (yych <= 0x1F) { - if (yych == '\t') goto yy463; - goto yy458; + if (yych == '\t') goto yy482; + goto yy477; } else { - if (yych <= ' ') goto yy463; - if (yych != '=') goto yy458; + if (yych <= ' ') goto yy482; + if (yych != '=') goto yy477; } -yy460: +yy479: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yybm[0+yych] & 128) { - goto yy460; + goto yy479; } -#line 162 "../src/parse/lex_conf.re" +#line 167 "../src/parse/lex_conf.re" { return; } -#line 2004 "src/parse/lex_conf.cc" -yy463: +#line 2088 "src/parse/lex_conf.cc" +yy482: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yych <= 0x1F) { - if (yych == '\t') goto yy463; + if (yych == '\t') goto yy482; } else { - if (yych <= ' ') goto yy463; - if (yych == '=') goto yy460; + if (yych <= ' ') goto yy482; + if (yych == '=') goto yy479; } cur = ptr; - goto yy458; + goto yy477; } -#line 163 "../src/parse/lex_conf.re" +#line 168 "../src/parse/lex_conf.re" } void Scanner::lex_conf_semicolon () { -#line 2025 "src/parse/lex_conf.cc" +#line 2109 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -2061,39 +2145,39 @@ void Scanner::lex_conf_semicolon () if ((lim - cur) < 2) fill(2); yych = (unsigned char)*cur; if (yych <= 0x1F) { - if (yych == '\t') goto yy470; + if (yych == '\t') goto yy489; } else { - if (yych <= ' ') goto yy470; - if (yych == ';') goto yy471; + if (yych <= ' ') goto yy489; + if (yych == ';') goto yy490; } ++cur; -yy469: -#line 169 "../src/parse/lex_conf.re" +yy488: +#line 174 "../src/parse/lex_conf.re" { fatal ("missing ending ';' in configuration"); } -#line 2074 "src/parse/lex_conf.cc" -yy470: +#line 2158 "src/parse/lex_conf.cc" +yy489: yych = (unsigned char)*(ptr = ++cur); if (yybm[0+yych] & 128) { - goto yy473; + goto yy492; } - if (yych != ';') goto yy469; -yy471: + if (yych != ';') goto yy488; +yy490: ++cur; -#line 170 "../src/parse/lex_conf.re" +#line 175 "../src/parse/lex_conf.re" { return; } -#line 2085 "src/parse/lex_conf.cc" -yy473: +#line 2169 "src/parse/lex_conf.cc" +yy492: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yybm[0+yych] & 128) { - goto yy473; + goto yy492; } - if (yych == ';') goto yy471; + if (yych == ';') goto yy490; cur = ptr; - goto yy469; + goto yy488; } -#line 171 "../src/parse/lex_conf.re" +#line 176 "../src/parse/lex_conf.re" } @@ -2102,7 +2186,7 @@ int32_t Scanner::lex_conf_number () lex_conf_assign (); tok = cur; -#line 2106 "src/parse/lex_conf.cc" +#line 2190 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -2142,21 +2226,21 @@ int32_t Scanner::lex_conf_number () if ((lim - cur) < 2) fill(2); yych = (unsigned char)*cur; if (yych <= '/') { - if (yych == '-') goto yy479; + if (yych == '-') goto yy498; } else { - if (yych <= '0') goto yy480; - if (yych <= '9') goto yy482; + if (yych <= '0') goto yy499; + if (yych <= '9') goto yy501; } -yy478: -yy479: +yy497: +yy498: yych = (unsigned char)*++cur; - if (yych <= '0') goto yy478; - if (yych <= '9') goto yy482; - goto yy478; -yy480: + if (yych <= '0') goto yy497; + if (yych <= '9') goto yy501; + goto yy497; +yy499: ++cur; -yy481: -#line 180 "../src/parse/lex_conf.re" +yy500: +#line 185 "../src/parse/lex_conf.re" { int32_t n = 0; if (!s_to_i32_unsafe (tok, cur, n)) @@ -2166,17 +2250,17 @@ yy481: lex_conf_semicolon (); return n; } -#line 2170 "src/parse/lex_conf.cc" -yy482: +#line 2254 "src/parse/lex_conf.cc" +yy501: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yybm[0+yych] & 128) { - goto yy482; + goto yy501; } - goto yy481; + goto yy500; } -#line 189 "../src/parse/lex_conf.re" +#line 194 "../src/parse/lex_conf.re" } @@ -2186,7 +2270,7 @@ std::string Scanner::lex_conf_string () std::string s; tok = cur; -#line 2190 "src/parse/lex_conf.cc" +#line 2274 "src/parse/lex_conf.cc" { unsigned char yych; static const unsigned char yybm[] = { @@ -2227,37 +2311,37 @@ std::string Scanner::lex_conf_string () yych = (unsigned char)*cur; if (yych <= '!') { if (yych <= '\n') { - if (yych <= 0x08) goto yy487; + if (yych <= 0x08) goto yy506; } else { - if (yych != ' ') goto yy487; + if (yych != ' ') goto yy506; } } else { if (yych <= '\'') { - if (yych <= '"') goto yy489; - if (yych <= '&') goto yy487; - goto yy489; + if (yych <= '"') goto yy508; + if (yych <= '&') goto yy506; + goto yy508; } else { - if (yych != ';') goto yy487; + if (yych != ';') goto yy506; } } -yy486: -#line 212 "../src/parse/lex_conf.re" +yy505: +#line 217 "../src/parse/lex_conf.re" { s = std::string(tok, tok_len()); goto end; } -#line 2250 "src/parse/lex_conf.cc" -yy487: +#line 2334 "src/parse/lex_conf.cc" +yy506: ++cur; if (lim <= cur) fill(1); yych = (unsigned char)*cur; if (yybm[0+yych] & 128) { - goto yy487; + goto yy506; } - goto yy486; -yy489: + goto yy505; +yy508: ++cur; -#line 198 "../src/parse/lex_conf.re" +#line 203 "../src/parse/lex_conf.re" { const char quote = tok[0]; for (bool end;;) { @@ -2272,9 +2356,9 @@ yy489: } } } -#line 2276 "src/parse/lex_conf.cc" +#line 2360 "src/parse/lex_conf.cc" } -#line 216 "../src/parse/lex_conf.re" +#line 221 "../src/parse/lex_conf.re" end: lex_conf_semicolon (); diff --git a/re2c/src/codegen/input_api.cc b/re2c/src/codegen/input_api.cc index 51254dda..9e0f0054 100644 --- a/re2c/src/codegen/input_api.cc +++ b/re2c/src/codegen/input_api.cc @@ -101,7 +101,7 @@ std::string InputAPI::expr_dist () const s = "(" + opts->yycursor + " - " + opts->yyctxmarker + ")"; break; case CUSTOM: - s = "YYDIST()"; + s = opts->yydist + "()"; break; } return s; @@ -125,7 +125,7 @@ std::string InputAPI::expr_ctx (const std::string &ctx) const s = "(" + opts->yyctxmarker + " + " + ctx + ")"; break; case CUSTOM: - s = "YYCTX(" + ctx + ")"; + s = opts->yyctx + "(" + ctx + ")"; break; } return s; @@ -154,7 +154,7 @@ std::string InputAPI::stmt_restorectx_fix(uint32_t ind, size_t dist) const s << opts->yycursor << " -= " << dist; break; case CUSTOM: - s << opts->yyrestorectx << " (YYDIST() - " << dist << ")"; + s << opts->yyrestorectx << " (" + opts->yydist + "() - " << dist << ")"; break; } return indent(ind) + s.str() + ";\n"; diff --git a/re2c/src/codegen/output.cc b/re2c/src/codegen/output.cc index 73121106..847a2750 100644 --- a/re2c/src/codegen/output.cc +++ b/re2c/src/codegen/output.cc @@ -395,7 +395,7 @@ void output_contexts(std::ostream &o, uint32_t ind, const std::set std::set::const_iterator ctx = contexts.begin(), end = contexts.end(); - o << indent(ind) << "YYDISTTYPE " << *ctx; + o << indent(ind) << opts->yydisttype << " " << *ctx; for (++ctx; ctx != end; ++ctx) { o << ", " << *ctx; } diff --git a/re2c/src/conf/opt.cc b/re2c/src/conf/opt.cc index 8cb47ba5..884496e1 100644 --- a/re2c/src/conf/opt.cc +++ b/re2c/src/conf/opt.cc @@ -76,6 +76,10 @@ void opt_t::fix () state_set = Opt::baseopt.state_set; state_set_arg = Opt::baseopt.state_set_arg; state_set_naked = Opt::baseopt.state_set_naked; + yyctx = Opt::baseopt.yyctx; + yydist = Opt::baseopt.yydist; + yydisttype = Opt::baseopt.yydisttype; + ctxprefix = Opt::baseopt.ctxprefix; yyfilllabel = Opt::baseopt.yyfilllabel; yynext = Opt::baseopt.yynext; yyaccept = Opt::baseopt.yyaccept; @@ -150,6 +154,13 @@ void opt_t::fix () bUseStateAbort = Opt::baseopt.bUseStateAbort; bUseStateNext = Opt::baseopt.bUseStateNext; } + if (!contexts) + { + yyctx = Opt::baseopt.yyctx; + yydist = Opt::baseopt.yydist; + yydisttype = Opt::baseopt.yydisttype; + ctxprefix = Opt::baseopt.ctxprefix; + } if (!bFlag) { yybmHexTable = Opt::baseopt.yybmHexTable; @@ -323,6 +334,9 @@ void Opt::reset_mapCodeName () useropt->yyrestore = Opt::baseopt.yyrestore; useropt->yyrestorectx = Opt::baseopt.yyrestorectx; useropt->yyskip = Opt::baseopt.yyskip; + useropt->yyctx = Opt::baseopt.yyctx; + useropt->yydist = Opt::baseopt.yydist; + useropt->yydisttype = Opt::baseopt.yydisttype; useropt->yyfilllabel = Opt::baseopt.yyfilllabel; useropt->yynext = Opt::baseopt.yynext; useropt->yyaccept = Opt::baseopt.yyaccept; diff --git a/re2c/src/conf/opt.h b/re2c/src/conf/opt.h index 25d20fbf..6dc69f8f 100644 --- a/re2c/src/conf/opt.h +++ b/re2c/src/conf/opt.h @@ -54,8 +54,12 @@ namespace re2c OPT (std::string, yyaccept, "yyaccept") \ OPT (bool, bUseStateAbort, false) \ OPT (bool, bUseStateNext, false) \ - /* reuse */ \ + /* contexts */ \ OPT (bool, contexts, false) \ + OPT (std::string, yyctx, "YYCTX") \ + OPT (std::string, yydist, "YYDIST") \ + OPT (std::string, yydisttype, "long") \ + OPT (std::string, ctxprefix, "yyctx") \ /* reuse */ \ OPT (bool, rFlag, false) \ /* partial flex syntax support */ \ diff --git a/re2c/src/ir/ctx.cc b/re2c/src/ir/ctx.cc index e57cdd88..181eb437 100644 --- a/re2c/src/ir/ctx.cc +++ b/re2c/src/ir/ctx.cc @@ -1,7 +1,9 @@ #include #include +#include "src/conf/opt.h" #include "src/ir/ctx.h" +#include "src/globals.h" namespace re2c { @@ -11,7 +13,7 @@ CtxVar::CtxVar(const std::string *n, size_t idx) , fullname() { std::ostringstream s; - s << "yyctx" << idx; + s << opts->ctxprefix << idx; if (name != NULL) { s << *name; } diff --git a/re2c/src/ir/skeleton/generate_code.cc b/re2c/src/ir/skeleton/generate_code.cc index 04219a36..519ef547 100644 --- a/re2c/src/ir/skeleton/generate_code.cc +++ b/re2c/src/ir/skeleton/generate_code.cc @@ -117,7 +117,6 @@ void emit_start(const Skeleton &skel, OutputFile &o, size_t maxfill, if(base_ctxmarker) { o.ws("\n#define YYRESTORECTX(dist) cursor = ctxmarker + dist"); o.ws("\n#define YYDIST() (cursor - ctxmarker)"); - o.ws("\n#define YYDISTTYPE long"); } else { o.ws("\n#define YYRESTORECTX() cursor = ctxmarker"); } diff --git a/re2c/src/parse/lex_conf.re b/re2c/src/parse/lex_conf.re index 550fe1ab..d647f68e 100644 --- a/re2c/src/parse/lex_conf.re +++ b/re2c/src/parse/lex_conf.re @@ -118,6 +118,11 @@ void Scanner::lex_conf () "define:YYRESTORECTX" { opts.set_yyrestorectx (lex_conf_string ()); return; } "define:YYLESSTHAN" { opts.set_yylessthan (lex_conf_string ()); return; } + "define:YYCTX" { opts.set_yyctx (lex_conf_string ()); return; } + "define:YYDIST" { opts.set_yydist (lex_conf_string ()); return; } + "define:YYDISTTYPE" { opts.set_yydisttype (lex_conf_string ()); return; } + "ctxprefix" { opts.set_ctxprefix (lex_conf_string ()); return; } + "indent:string" { opts.set_indString (lex_conf_string ()); return; } "indent:top" { diff --git a/re2c/test/contexts/cond_star0.ci--input(custom).c b/re2c/test/contexts/cond_star0.ci--input(custom).c index ee92c6af..16f60269 100644 --- a/re2c/test/contexts/cond_star0.ci--input(custom).c +++ b/re2c/test/contexts/cond_star0.ci--input(custom).c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx1; + long yyctx0, yyctx1; YYBACKUPCTX (); switch (YYGETCONDITION()) { case yycc1: goto yyc_c1; diff --git a/re2c/test/contexts/cond_star0.ci.c b/re2c/test/contexts/cond_star0.ci.c index eab89423..20969544 100644 --- a/re2c/test/contexts/cond_star0.ci.c +++ b/re2c/test/contexts/cond_star0.ci.c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx1; + long yyctx0, yyctx1; YYCTXMARKER = YYCURSOR; switch (YYGETCONDITION()) { case yycc1: goto yyc_c1; diff --git a/re2c/test/contexts/cond_star1.ci--input(custom).c b/re2c/test/contexts/cond_star1.ci--input(custom).c index ddcfba7f..6451ef6e 100644 --- a/re2c/test/contexts/cond_star1.ci--input(custom).c +++ b/re2c/test/contexts/cond_star1.ci--input(custom).c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx1; + long yyctx0, yyctx1; YYBACKUPCTX (); switch (YYGETCONDITION()) { case yycc1: goto yyc_c1; diff --git a/re2c/test/contexts/cond_star1.ci.c b/re2c/test/contexts/cond_star1.ci.c index 17dc11b5..d33f25a6 100644 --- a/re2c/test/contexts/cond_star1.ci.c +++ b/re2c/test/contexts/cond_star1.ci.c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx1; + long yyctx0, yyctx1; YYCTXMARKER = YYCURSOR; switch (YYGETCONDITION()) { case yycc1: goto yyc_c1; diff --git a/re2c/test/contexts/cond_star2.ci.c b/re2c/test/contexts/cond_star2.ci.c index ff2ee39f..a05b56ff 100644 --- a/re2c/test/contexts/cond_star2.ci.c +++ b/re2c/test/contexts/cond_star2.ci.c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx1, yyctx3; + long yyctx0, yyctx1, yyctx3; YYCTXMARKER = YYCURSOR; switch (YYGETCONDITION()) { case yycc1: goto yyc_c1; diff --git a/re2c/test/contexts/dedup0.i--input(custom).c b/re2c/test/contexts/dedup0.i--input(custom).c index 71439541..bb71067b 100644 --- a/re2c/test/contexts/dedup0.i--input(custom).c +++ b/re2c/test/contexts/dedup0.i--input(custom).c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx2; + long yyctx0, yyctx2; YYBACKUPCTX (); if (YYLESSTHAN (3)) YYFILL(3); yych = YYPEEK (); diff --git a/re2c/test/contexts/dedup0.i.c b/re2c/test/contexts/dedup0.i.c index 57d2a91a..b7832fbe 100644 --- a/re2c/test/contexts/dedup0.i.c +++ b/re2c/test/contexts/dedup0.i.c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx2; + long yyctx0, yyctx2; YYCTXMARKER = YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = *YYCURSOR; diff --git a/re2c/test/contexts/dedup1.i--input(custom).c b/re2c/test/contexts/dedup1.i--input(custom).c index 9d18085c..e2824b59 100644 --- a/re2c/test/contexts/dedup1.i--input(custom).c +++ b/re2c/test/contexts/dedup1.i--input(custom).c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx2; + long yyctx0, yyctx2; YYBACKUPCTX (); if (YYLESSTHAN (3)) YYFILL(3); yych = YYPEEK (); diff --git a/re2c/test/contexts/dedup1.i.c b/re2c/test/contexts/dedup1.i.c index 324fadcd..b11e1e6d 100644 --- a/re2c/test/contexts/dedup1.i.c +++ b/re2c/test/contexts/dedup1.i.c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx2; + long yyctx0, yyctx2; YYCTXMARKER = YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = *YYCURSOR; diff --git a/re2c/test/contexts/dedup2.i--input(custom).c b/re2c/test/contexts/dedup2.i--input(custom).c index 53ddde38..b9197eec 100644 --- a/re2c/test/contexts/dedup2.i--input(custom).c +++ b/re2c/test/contexts/dedup2.i--input(custom).c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx2; + long yyctx0, yyctx2; YYBACKUPCTX (); if (YYLESSTHAN (3)) YYFILL(3); yych = YYPEEK (); diff --git a/re2c/test/contexts/dedup2.i.c b/re2c/test/contexts/dedup2.i.c index 9fb4aee0..3ecae321 100644 --- a/re2c/test/contexts/dedup2.i.c +++ b/re2c/test/contexts/dedup2.i.c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx2; + long yyctx0, yyctx2; YYCTXMARKER = YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = *YYCURSOR; diff --git a/re2c/test/contexts/dedup3.i--input(custom).c b/re2c/test/contexts/dedup3.i--input(custom).c index 18fbc81c..d35e3d0c 100644 --- a/re2c/test/contexts/dedup3.i--input(custom).c +++ b/re2c/test/contexts/dedup3.i--input(custom).c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx2; + long yyctx0, yyctx2; YYBACKUPCTX (); if (YYLESSTHAN (3)) YYFILL(3); yych = YYPEEK (); diff --git a/re2c/test/contexts/dedup3.i.c b/re2c/test/contexts/dedup3.i.c index 97510455..321e3378 100644 --- a/re2c/test/contexts/dedup3.i.c +++ b/re2c/test/contexts/dedup3.i.c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx2; + long yyctx0, yyctx2; YYCTXMARKER = YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = *YYCURSOR; diff --git a/re2c/test/contexts/fix2.i--contexts.c b/re2c/test/contexts/fix2.i--contexts.c index 3a4d959c..bba01df7 100644 --- a/re2c/test/contexts/fix2.i--contexts.c +++ b/re2c/test/contexts/fix2.i--contexts.c @@ -4,7 +4,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; diff --git a/re2c/test/contexts/fix2.i--contexts.re b/re2c/test/contexts/fix2.i--contexts.re index 37df4c01..af302d99 100644 --- a/re2c/test/contexts/fix2.i--contexts.re +++ b/re2c/test/contexts/fix2.i--contexts.re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix2_trail.i--contexts--input(custom).c b/re2c/test/contexts/fix2_trail.i--contexts--input(custom).c index 8affb1ea..e695a195 100644 --- a/re2c/test/contexts/fix2_trail.i--contexts--input(custom).c +++ b/re2c/test/contexts/fix2_trail.i--contexts--input(custom).c @@ -4,7 +4,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; diff --git a/re2c/test/contexts/fix2_trail.i--contexts--input(custom).re b/re2c/test/contexts/fix2_trail.i--contexts--input(custom).re index 4ded9c21..9c54b233 100644 --- a/re2c/test/contexts/fix2_trail.i--contexts--input(custom).re +++ b/re2c/test/contexts/fix2_trail.i--contexts--input(custom).re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix2_trail.i--contexts.c b/re2c/test/contexts/fix2_trail.i--contexts.c index 0b363e31..380849cf 100644 --- a/re2c/test/contexts/fix2_trail.i--contexts.c +++ b/re2c/test/contexts/fix2_trail.i--contexts.c @@ -4,7 +4,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; diff --git a/re2c/test/contexts/fix2_trail.i--contexts.re b/re2c/test/contexts/fix2_trail.i--contexts.re index 4ded9c21..9c54b233 100644 --- a/re2c/test/contexts/fix2_trail.i--contexts.re +++ b/re2c/test/contexts/fix2_trail.i--contexts.re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix3.i--contexts.c b/re2c/test/contexts/fix3.i--contexts.c index c38f8ca0..a398074b 100644 --- a/re2c/test/contexts/fix3.i--contexts.c +++ b/re2c/test/contexts/fix3.i--contexts.c @@ -4,13 +4,12 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; { char yych; - YYDISTTYPE yyctx0p1, yyctx0p2, yyctx0p3, yyctx0p4; + long yyctx0p1, yyctx0p2, yyctx0p3, yyctx0p4; YYCTXMARKER = YYCURSOR; yych = *YYCURSOR; yyctx0p4 = yyctx0p3 = yyctx0p2 = yyctx0p1 = (YYCURSOR - YYCTXMARKER); @@ -95,4 +94,4 @@ int main(int argc, char **argv) } return 0; } -re2c: warning: line 18: rule matches empty string [-Wmatch-empty-string] +re2c: warning: line 17: rule matches empty string [-Wmatch-empty-string] diff --git a/re2c/test/contexts/fix3.i--contexts.re b/re2c/test/contexts/fix3.i--contexts.re index cbb1d97f..93cb1365 100644 --- a/re2c/test/contexts/fix3.i--contexts.re +++ b/re2c/test/contexts/fix3.i--contexts.re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix3_trail.i--contexts--input(custom).c b/re2c/test/contexts/fix3_trail.i--contexts--input(custom).c index dc2a66bc..e0e15012 100644 --- a/re2c/test/contexts/fix3_trail.i--contexts--input(custom).c +++ b/re2c/test/contexts/fix3_trail.i--contexts--input(custom).c @@ -4,13 +4,12 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; { char yych; - YYDISTTYPE yyctx0, yyctx0p1, yyctx0p2, yyctx0p3; + long yyctx0, yyctx0p1, yyctx0p2, yyctx0p3; YYBACKUPCTX (); yych = YYPEEK (); yyctx0 = yyctx0p3 = yyctx0p2 = yyctx0p1 = YYDIST(); @@ -96,4 +95,4 @@ int main(int argc, char **argv) } return 0; } -re2c: warning: line 18: rule matches empty string [-Wmatch-empty-string] +re2c: warning: line 17: rule matches empty string [-Wmatch-empty-string] diff --git a/re2c/test/contexts/fix3_trail.i--contexts--input(custom).re b/re2c/test/contexts/fix3_trail.i--contexts--input(custom).re index 106ccc07..efdaff32 100644 --- a/re2c/test/contexts/fix3_trail.i--contexts--input(custom).re +++ b/re2c/test/contexts/fix3_trail.i--contexts--input(custom).re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix3_trail.i--contexts.c b/re2c/test/contexts/fix3_trail.i--contexts.c index 74988966..7a6ed560 100644 --- a/re2c/test/contexts/fix3_trail.i--contexts.c +++ b/re2c/test/contexts/fix3_trail.i--contexts.c @@ -4,13 +4,12 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; { char yych; - YYDISTTYPE yyctx0, yyctx0p1, yyctx0p2, yyctx0p3; + long yyctx0, yyctx0p1, yyctx0p2, yyctx0p3; YYCTXMARKER = YYCURSOR; yych = *YYCURSOR; yyctx0 = yyctx0p3 = yyctx0p2 = yyctx0p1 = (YYCURSOR - YYCTXMARKER); @@ -96,4 +95,4 @@ int main(int argc, char **argv) } return 0; } -re2c: warning: line 18: rule matches empty string [-Wmatch-empty-string] +re2c: warning: line 17: rule matches empty string [-Wmatch-empty-string] diff --git a/re2c/test/contexts/fix3_trail.i--contexts.re b/re2c/test/contexts/fix3_trail.i--contexts.re index 106ccc07..efdaff32 100644 --- a/re2c/test/contexts/fix3_trail.i--contexts.re +++ b/re2c/test/contexts/fix3_trail.i--contexts.re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix4.i--contexts.c b/re2c/test/contexts/fix4.i--contexts.c index adb134e9..57b76c2a 100644 --- a/re2c/test/contexts/fix4.i--contexts.c +++ b/re2c/test/contexts/fix4.i--contexts.c @@ -4,13 +4,12 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; { char yych; - YYDISTTYPE yyctx0p1, yyctx0p3; + long yyctx0p1, yyctx0p3; YYCTXMARKER = YYCURSOR; yych = *YYCURSOR; switch (yych) { diff --git a/re2c/test/contexts/fix4.i--contexts.re b/re2c/test/contexts/fix4.i--contexts.re index bde32ab7..b9285d2c 100644 --- a/re2c/test/contexts/fix4.i--contexts.re +++ b/re2c/test/contexts/fix4.i--contexts.re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix4_trail.i--contexts--input(custom).c b/re2c/test/contexts/fix4_trail.i--contexts--input(custom).c index 5865c071..64998191 100644 --- a/re2c/test/contexts/fix4_trail.i--contexts--input(custom).c +++ b/re2c/test/contexts/fix4_trail.i--contexts--input(custom).c @@ -4,13 +4,12 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; { char yych; - YYDISTTYPE yyctx0p1, yyctx0p3; + long yyctx0p1, yyctx0p3; YYBACKUPCTX (); yych = YYPEEK (); switch (yych) { diff --git a/re2c/test/contexts/fix4_trail.i--contexts--input(custom).re b/re2c/test/contexts/fix4_trail.i--contexts--input(custom).re index 74878411..f48a2a02 100644 --- a/re2c/test/contexts/fix4_trail.i--contexts--input(custom).re +++ b/re2c/test/contexts/fix4_trail.i--contexts--input(custom).re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix4_trail.i--contexts.c b/re2c/test/contexts/fix4_trail.i--contexts.c index 1d26748b..dde3ed48 100644 --- a/re2c/test/contexts/fix4_trail.i--contexts.c +++ b/re2c/test/contexts/fix4_trail.i--contexts.c @@ -4,13 +4,12 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; { char yych; - YYDISTTYPE yyctx0p1, yyctx0p3; + long yyctx0p1, yyctx0p3; YYCTXMARKER = YYCURSOR; yych = *YYCURSOR; switch (yych) { diff --git a/re2c/test/contexts/fix4_trail.i--contexts.re b/re2c/test/contexts/fix4_trail.i--contexts.re index 74878411..f48a2a02 100644 --- a/re2c/test/contexts/fix4_trail.i--contexts.re +++ b/re2c/test/contexts/fix4_trail.i--contexts.re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix5.i--contexts.c b/re2c/test/contexts/fix5.i--contexts.c index af11f61f..dd8d5b9c 100644 --- a/re2c/test/contexts/fix5.i--contexts.c +++ b/re2c/test/contexts/fix5.i--contexts.c @@ -4,13 +4,12 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; { char yych; - YYDISTTYPE yyctx0p2, yyctx0p4; + long yyctx0p2, yyctx0p4; YYCTXMARKER = YYCURSOR; yych = *YYCURSOR; switch (yych) { diff --git a/re2c/test/contexts/fix5.i--contexts.re b/re2c/test/contexts/fix5.i--contexts.re index a1508975..363ec8a7 100644 --- a/re2c/test/contexts/fix5.i--contexts.re +++ b/re2c/test/contexts/fix5.i--contexts.re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix5_trail.i--contexts--input(custom).c b/re2c/test/contexts/fix5_trail.i--contexts--input(custom).c index 09a51846..2b63b35c 100644 --- a/re2c/test/contexts/fix5_trail.i--contexts--input(custom).c +++ b/re2c/test/contexts/fix5_trail.i--contexts--input(custom).c @@ -4,13 +4,12 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; { char yych; - YYDISTTYPE yyctx0, yyctx0p2; + long yyctx0, yyctx0p2; YYBACKUPCTX (); yych = YYPEEK (); switch (yych) { diff --git a/re2c/test/contexts/fix5_trail.i--contexts--input(custom).re b/re2c/test/contexts/fix5_trail.i--contexts--input(custom).re index 5ffcc7b2..3f2f0d70 100644 --- a/re2c/test/contexts/fix5_trail.i--contexts--input(custom).re +++ b/re2c/test/contexts/fix5_trail.i--contexts--input(custom).re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix5_trail.i--contexts.c b/re2c/test/contexts/fix5_trail.i--contexts.c index df09243c..31dd629e 100644 --- a/re2c/test/contexts/fix5_trail.i--contexts.c +++ b/re2c/test/contexts/fix5_trail.i--contexts.c @@ -4,13 +4,12 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; { char yych; - YYDISTTYPE yyctx0, yyctx0p2; + long yyctx0, yyctx0p2; YYCTXMARKER = YYCURSOR; yych = *YYCURSOR; switch (yych) { diff --git a/re2c/test/contexts/fix5_trail.i--contexts.re b/re2c/test/contexts/fix5_trail.i--contexts.re index 5ffcc7b2..3f2f0d70 100644 --- a/re2c/test/contexts/fix5_trail.i--contexts.re +++ b/re2c/test/contexts/fix5_trail.i--contexts.re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/fix5_trail_conf.i--contexts--input(custom).c b/re2c/test/contexts/fix5_trail_conf.i--contexts--input(custom).c new file mode 100644 index 00000000..313edf96 --- /dev/null +++ b/re2c/test/contexts/fix5_trail_conf.i--contexts--input(custom).c @@ -0,0 +1,111 @@ +/* Generated by re2c */ +#include +#include + +static void lex(const char *cursor) +{ +# define YYPEEK() *cursor +# define YYSKIP() ++cursor +# define YYBACKUP() marker = cursor +# define YYBACKUPCTX() ctxmarker = cursor +# define YYRESTORE() cursor = marker +# define YYRESTORECTX(dist) cursor = ctxmarker + dist +# define ZZZ_DIST() (cursor - ctxmarker) +# define ZZZ_CTX(dist) (ctxmarker + dist) + const char *marker; + const char *ctxmarker; + +{ + char yych; + ptrdiff_t zzz_0, zzz_0p2; + YYBACKUPCTX (); + yych = YYPEEK (); + switch (yych) { + case '0': goto yy4; + case '1': goto yy5; + default: goto yy2; + } +yy2: + YYSKIP (); +yy3: + { printf("error\n"); return; } +yy4: + YYSKIP (); + YYBACKUP (); + yych = YYPEEK (); + switch (yych) { + case '0': + case '1': goto yy7; + default: goto yy3; + } +yy5: + YYSKIP (); + YYBACKUP (); + yych = YYPEEK (); + zzz_0p2 = ZZZ_DIST(); + switch (yych) { + case '2': + case '3': goto yy11; + default: goto yy3; + } +yy6: + YYSKIP (); + yych = YYPEEK (); +yy7: + switch (yych) { + case '0': goto yy6; + case '1': goto yy9; + default: goto yy8; + } +yy8: + YYRESTORE (); + goto yy3; +yy9: + YYSKIP (); + yych = YYPEEK (); + zzz_0p2 = ZZZ_DIST(); + goto yy11; +yy10: + YYSKIP (); + yych = YYPEEK (); +yy11: + switch (yych) { + case '2': goto yy10; + case '3': goto yy12; + default: goto yy8; + } +yy12: + YYSKIP (); + zzz_0 = ZZZ_DIST(); + yych = YYPEEK (); + goto yy15; +yy13: + YYRESTORECTX (zzz_0); + { + printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n", + ZZZ_CTX((zzz_0p2 - 1)) - ctxmarker, ctxmarker, + ZZZ_CTX(zzz_0p2) - ZZZ_CTX((zzz_0p2 - 1)), ZZZ_CTX((zzz_0p2 - 1)), + ZZZ_CTX((zzz_0 - 1)) - ZZZ_CTX(zzz_0p2), ZZZ_CTX(zzz_0p2), + cursor - ZZZ_CTX((zzz_0 - 1)), ZZZ_CTX((zzz_0 - 1)), + cursor); + return; + } +yy14: + YYSKIP (); + yych = YYPEEK (); +yy15: + switch (yych) { + case '4': goto yy14; + default: goto yy13; + } +} + +} + +int main(int argc, char **argv) +{ + for (int i = 1; i < argc; ++i) { + lex(argv[i]); + } + return 0; +} diff --git a/re2c/test/contexts/fix5_trail_conf.i--contexts--input(custom).re b/re2c/test/contexts/fix5_trail_conf.i--contexts--input(custom).re new file mode 100644 index 00000000..6bd815df --- /dev/null +++ b/re2c/test/contexts/fix5_trail_conf.i--contexts--input(custom).re @@ -0,0 +1,47 @@ +#include +#include + +static void lex(const char *cursor) +{ +# define YYPEEK() *cursor +# define YYSKIP() ++cursor +# define YYBACKUP() marker = cursor +# define YYBACKUPCTX() ctxmarker = cursor +# define YYRESTORE() cursor = marker +# define YYRESTORECTX(dist) cursor = ctxmarker + dist +# define ZZZ_DIST() (cursor - ctxmarker) +# define ZZZ_CTX(dist) (ctxmarker + dist) + const char *marker; + const char *ctxmarker; + /*!re2c + re2c:define:YYCTYPE = char; + re2c:yyfill:enable = 0; + re2c:define:YYCTX = "ZZZ_CTX"; + re2c:define:YYDIST = "ZZZ_DIST"; + re2c:define:YYDISTTYPE = ptrdiff_t; + re2c:ctxprefix = "zzz_"; + + * { printf("error\n"); return; } + "0"* + @p1 "1" + @p2 "2"* + @p3 "3" + / "4"* { + printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n", + @p1 - ctxmarker, ctxmarker, + @p2 - @p1, @p1, + @p3 - @p2, @p2, + cursor - @p3, @p3, + cursor); + return; + } + */ +} + +int main(int argc, char **argv) +{ + for (int i = 1; i < argc; ++i) { + lex(argv[i]); + } + return 0; +} diff --git a/re2c/test/contexts/fix5_trail_conf.i--contexts.c b/re2c/test/contexts/fix5_trail_conf.i--contexts.c new file mode 100644 index 00000000..82c63a32 --- /dev/null +++ b/re2c/test/contexts/fix5_trail_conf.i--contexts.c @@ -0,0 +1,98 @@ +/* Generated by re2c */ +#include +#include + +static void lex(const char *YYCURSOR) +{ + const char *YYMARKER; + const char *YYCTXMARKER; + +{ + char yych; + ptrdiff_t zzz_0, zzz_0p2; + YYCTXMARKER = YYCURSOR; + yych = *YYCURSOR; + switch (yych) { + case '0': goto yy4; + case '1': goto yy5; + default: goto yy2; + } +yy2: + ++YYCURSOR; +yy3: + { printf("error\n"); return; } +yy4: + yych = *(YYMARKER = ++YYCURSOR); + switch (yych) { + case '0': + case '1': goto yy7; + default: goto yy3; + } +yy5: + yych = *(YYMARKER = ++YYCURSOR); + zzz_0p2 = (YYCURSOR - YYCTXMARKER); + switch (yych) { + case '2': + case '3': goto yy11; + default: goto yy3; + } +yy6: + ++YYCURSOR; + yych = *YYCURSOR; +yy7: + switch (yych) { + case '0': goto yy6; + case '1': goto yy9; + default: goto yy8; + } +yy8: + YYCURSOR = YYMARKER; + goto yy3; +yy9: + yych = *++YYCURSOR; + zzz_0p2 = (YYCURSOR - YYCTXMARKER); + goto yy11; +yy10: + ++YYCURSOR; + yych = *YYCURSOR; +yy11: + switch (yych) { + case '2': goto yy10; + case '3': goto yy12; + default: goto yy8; + } +yy12: + ++YYCURSOR; + zzz_0 = (YYCURSOR - YYCTXMARKER); + yych = *YYCURSOR; + goto yy15; +yy13: + YYCURSOR = YYCTXMARKER + zzz_0; + { + printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n", + (YYCTXMARKER + (zzz_0p2 - 1)) - YYCTXMARKER, YYCTXMARKER, + (YYCTXMARKER + zzz_0p2) - (YYCTXMARKER + (zzz_0p2 - 1)), (YYCTXMARKER + (zzz_0p2 - 1)), + (YYCTXMARKER + (zzz_0 - 1)) - (YYCTXMARKER + zzz_0p2), (YYCTXMARKER + zzz_0p2), + YYCURSOR - (YYCTXMARKER + (zzz_0 - 1)), (YYCTXMARKER + (zzz_0 - 1)), + YYCURSOR); + return; + } +yy14: + ++YYCURSOR; + yych = *YYCURSOR; +yy15: + switch (yych) { + case '4': goto yy14; + default: goto yy13; + } +} + +} + +int main(int argc, char **argv) +{ + for (int i = 1; i < argc; ++i) { + lex(argv[i]); + } + return 0; +} diff --git a/re2c/test/contexts/fix5_trail_conf.i--contexts.re b/re2c/test/contexts/fix5_trail_conf.i--contexts.re new file mode 100644 index 00000000..e0723095 --- /dev/null +++ b/re2c/test/contexts/fix5_trail_conf.i--contexts.re @@ -0,0 +1,37 @@ +#include +#include + +static void lex(const char *YYCURSOR) +{ + const char *YYMARKER; + const char *YYCTXMARKER; + /*!re2c + re2c:define:YYCTYPE = char; + re2c:yyfill:enable = 0; + re2c:define:YYDISTTYPE = ptrdiff_t; + re2c:ctxprefix = "zzz_"; + + * { printf("error\n"); return; } + "0"* + @p1 "1" + @p2 "2"* + @p3 "3" + / "4"* { + printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n", + @p1 - YYCTXMARKER, YYCTXMARKER, + @p2 - @p1, @p1, + @p3 - @p2, @p2, + YYCURSOR - @p3, @p3, + YYCURSOR); + return; + } + */ +} + +int main(int argc, char **argv) +{ + for (int i = 1; i < argc; ++i) { + lex(argv[i]); + } + return 0; +} diff --git a/re2c/test/contexts/overlap.i--input(custom).c b/re2c/test/contexts/overlap.i--input(custom).c index 597fc688..ffcdaa38 100644 --- a/re2c/test/contexts/overlap.i--input(custom).c +++ b/re2c/test/contexts/overlap.i--input(custom).c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx1; + long yyctx0, yyctx1; YYBACKUPCTX (); if (YYLESSTHAN (3)) YYFILL(3); yych = YYPEEK (); diff --git a/re2c/test/contexts/overlap.i.c b/re2c/test/contexts/overlap.i.c index 4f023acd..dd49a9cc 100644 --- a/re2c/test/contexts/overlap.i.c +++ b/re2c/test/contexts/overlap.i.c @@ -2,7 +2,7 @@ { YYCTYPE yych; - YYDISTTYPE yyctx0, yyctx1; + long yyctx0, yyctx1; YYCTXMARKER = YYCURSOR; if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); yych = *YYCURSOR; diff --git a/re2c/test/contexts/selfoverlap1.i--contexts.c b/re2c/test/contexts/selfoverlap1.i--contexts.c index 79a68ab2..ba449f6c 100644 --- a/re2c/test/contexts/selfoverlap1.i--contexts.c +++ b/re2c/test/contexts/selfoverlap1.i--contexts.c @@ -1 +1 @@ -re2c: error: line 20: context p1 is self-overlapping [-Werror-selfoverlapping-contexts] +re2c: error: line 19: context p1 is self-overlapping [-Werror-selfoverlapping-contexts] diff --git a/re2c/test/contexts/selfoverlap1.i--contexts.re b/re2c/test/contexts/selfoverlap1.i--contexts.re index 9145a032..a88a744e 100644 --- a/re2c/test/contexts/selfoverlap1.i--contexts.re +++ b/re2c/test/contexts/selfoverlap1.i--contexts.re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c diff --git a/re2c/test/contexts/selfoverlap1_trail.i--contexts.c b/re2c/test/contexts/selfoverlap1_trail.i--contexts.c index 8d0af52f..92b3545f 100644 --- a/re2c/test/contexts/selfoverlap1_trail.i--contexts.c +++ b/re2c/test/contexts/selfoverlap1_trail.i--contexts.c @@ -1 +1 @@ -re2c: error: line 20: trailing context is self-overlapping [-Werror-selfoverlapping-contexts] +re2c: error: line 19: trailing context is self-overlapping [-Werror-selfoverlapping-contexts] diff --git a/re2c/test/contexts/selfoverlap1_trail.i--contexts.re b/re2c/test/contexts/selfoverlap1_trail.i--contexts.re index f553a5ec..5f1b9623 100644 --- a/re2c/test/contexts/selfoverlap1_trail.i--contexts.re +++ b/re2c/test/contexts/selfoverlap1_trail.i--contexts.re @@ -3,7 +3,6 @@ static void lex(const char *YYCURSOR) { -#define YYDISTTYPE ptrdiff_t const char *YYMARKER; const char *YYCTXMARKER; /*!re2c -- 2.40.0