From a6b8f7c643ad8118f09fb41654d10606fa39cf64 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Thu, 6 Aug 2015 12:04:21 +0100 Subject: [PATCH] Makefile.am: dropped re2c flag '-i'. Line information is useful. --- re2c/Makefile.am | 2 +- re2c/bootstrap/src/conf/parse_opts.cc | 192 +++++++++++++++++++++++- re2c/bootstrap/src/parse/scanner_lex.cc | 166 +++++++++++++++++++- 3 files changed, 357 insertions(+), 3 deletions(-) diff --git a/re2c/Makefile.am b/re2c/Makefile.am index 3e33456f..e99f89c5 100644 --- a/re2c/Makefile.am +++ b/re2c/Makefile.am @@ -2,7 +2,7 @@ # do *not* add CXXFLAGS here, add them in configure.ac AM_CXXFLAGS = $(CXXFLAGSDEFAULT) BISONFLAGS = -y -d --no-lines -RE2CFLAGS = -bi +RE2CFLAGS = -b # binary bin_PROGRAMS = re2c diff --git a/re2c/bootstrap/src/conf/parse_opts.cc b/re2c/bootstrap/src/conf/parse_opts.cc index d22a093d..879bfffe 100644 --- a/re2c/bootstrap/src/conf/parse_opts.cc +++ b/re2c/bootstrap/src/conf/parse_opts.cc @@ -1,4 +1,5 @@ -/* Generated by re2c 0.14.3 on Tue Aug 4 21:08:00 2015 */ +/* Generated by re2c 0.14.3 on Thu Aug 6 12:02:24 2015 */ +#line 1 "../src/conf/parse_opts.re" #include #include "src/conf/msg.h" @@ -20,6 +21,7 @@ parse_opts_t parse_opts (char ** argv, Opt & opts) YYCTYPE * YYMARKER; Warn::option_t option; +#line 27 "../src/conf/parse_opts.re" opt: @@ -28,6 +30,7 @@ opt: goto end; } +#line 34 "src/conf/parse_opts.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -73,10 +76,12 @@ opt: yy2: ++YYCURSOR; yy3: +#line 36 "../src/conf/parse_opts.re" { error ("bad option: %s", *argv); return EXIT_FAIL; } +#line 85 "src/conf/parse_opts.cc" yy4: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -89,7 +94,9 @@ yy5: } else { if (yych == 'W') goto yy7; } +#line 59 "../src/conf/parse_opts.re" { goto opt_short; } +#line 100 "src/conf/parse_opts.cc" yy7: yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); @@ -100,16 +107,23 @@ yy7: if (yych == 'n') goto yy19; } yy8: +#line 64 "../src/conf/parse_opts.re" { option = Warn::W; goto opt_warn; } +#line 113 "src/conf/parse_opts.cc" yy9: ++YYCURSOR; if ((yych = *YYCURSOR) <= 0x00) goto yy13; +#line 60 "../src/conf/parse_opts.re" { goto opt_long; } +#line 119 "src/conf/parse_opts.cc" yy11: ++YYCURSOR; +#line 56 "../src/conf/parse_opts.re" { if (!opts.source ("")) return EXIT_FAIL; goto opt; } +#line 124 "src/conf/parse_opts.cc" yy13: ++YYCURSOR; +#line 42 "../src/conf/parse_opts.re" { // all remaining arguments are non-options // so they must be input files @@ -123,9 +137,12 @@ yy13: } goto end; } +#line 141 "src/conf/parse_opts.cc" yy15: ++YYCURSOR; +#line 62 "../src/conf/parse_opts.re" { warn.set_all (); goto opt; } +#line 146 "src/conf/parse_opts.cc" yy17: yych = *++YYCURSOR; if (yych == 'r') goto yy30; @@ -149,7 +166,9 @@ yy19: yych = *(YYMARKER = ++YYCURSOR); if (yych == 'e') goto yy23; yy22: +#line 65 "../src/conf/parse_opts.re" { option = Warn::WNO; goto opt_warn; } +#line 172 "src/conf/parse_opts.cc" yy23: yych = *++YYCURSOR; if (yych != 'r') goto yy18; @@ -162,7 +181,9 @@ yy23: yych = *++YYCURSOR; if (yych != '-') goto yy18; ++YYCURSOR; +#line 67 "../src/conf/parse_opts.re" { option = Warn::WNOERROR; goto opt_warn; } +#line 187 "src/conf/parse_opts.cc" yy30: yych = *++YYCURSOR; if (yych != 'r') goto yy18; @@ -174,10 +195,14 @@ yy30: if (yych <= 0x00) goto yy36; if (yych != '-') goto yy18; ++YYCURSOR; +#line 66 "../src/conf/parse_opts.re" { option = Warn::WERROR; goto opt_warn; } +#line 201 "src/conf/parse_opts.cc" yy36: ++YYCURSOR; +#line 63 "../src/conf/parse_opts.re" { warn.set_all_error (); goto opt; } +#line 206 "src/conf/parse_opts.cc" yy38: ++YYCURSOR; yych = *YYCURSOR; @@ -186,12 +211,16 @@ yy39: goto yy38; } ++YYCURSOR; +#line 57 "../src/conf/parse_opts.re" { if (!opts.source (*argv)) return EXIT_FAIL; goto opt; } +#line 217 "src/conf/parse_opts.cc" } +#line 68 "../src/conf/parse_opts.re" opt_warn: +#line 224 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = *YYCURSOR; @@ -203,10 +232,12 @@ opt_warn: } ++YYCURSOR; yy45: +#line 73 "../src/conf/parse_opts.re" { error ("bad warning: %s", *argv); return EXIT_FAIL; } +#line 241 "src/conf/parse_opts.cc" yy46: yych = *(YYMARKER = ++YYCURSOR); if (yych == 'm') goto yy83; @@ -247,7 +278,9 @@ yy51: yych = *++YYCURSOR; if (yych >= 0x01) goto yy50; ++YYCURSOR; +#line 79 "../src/conf/parse_opts.re" { warn.set (Warn::NAKED_DEFAULT, option); goto opt; } +#line 284 "src/conf/parse_opts.cc" yy64: yych = *++YYCURSOR; if (yych != 't') goto yy50; @@ -284,7 +317,9 @@ yy64: yych = *++YYCURSOR; if (yych >= 0x01) goto yy50; ++YYCURSOR; +#line 78 "../src/conf/parse_opts.re" { warn.set (Warn::MATCH_EMPTY_STRING, option); goto opt; } +#line 323 "src/conf/parse_opts.cc" yy83: yych = *++YYCURSOR; if (yych != 'p') goto yy50; @@ -327,12 +362,16 @@ yy83: yych = *++YYCURSOR; if (yych >= 0x01) goto yy50; ++YYCURSOR; +#line 77 "../src/conf/parse_opts.re" { warn.set (Warn::EMPTY_CHARACTER_CLASS, option); goto opt; } +#line 368 "src/conf/parse_opts.cc" } +#line 80 "../src/conf/parse_opts.re" opt_short: +#line 375 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = *YYCURSOR; @@ -392,89 +431,141 @@ opt_short: } yy107: ++YYCURSOR; +#line 89 "../src/conf/parse_opts.re" { goto opt; } +#line 437 "src/conf/parse_opts.cc" yy109: ++YYCURSOR; +#line 85 "../src/conf/parse_opts.re" { error ("bad short option: %s", *argv); return EXIT_FAIL; } +#line 445 "src/conf/parse_opts.cc" yy111: ++YYCURSOR; +#line 112 "../src/conf/parse_opts.re" { goto opt_short; } +#line 450 "src/conf/parse_opts.cc" yy113: ++YYCURSOR; +#line 107 "../src/conf/parse_opts.re" { if (!opts.utf_8 ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } +#line 455 "src/conf/parse_opts.cc" yy115: ++YYCURSOR; +#line 90 "../src/conf/parse_opts.re" { usage (); return EXIT_OK; } +#line 460 "src/conf/parse_opts.cc" yy117: ++YYCURSOR; +#line 96 "../src/conf/parse_opts.re" { opts.emit_dot (); goto opt_short; } +#line 465 "src/conf/parse_opts.cc" yy119: ++YYCURSOR; +#line 98 "../src/conf/parse_opts.re" { opts.flex_syntax (); goto opt_short; } +#line 470 "src/conf/parse_opts.cc" yy121: ++YYCURSOR; +#line 92 "../src/conf/parse_opts.re" { vernum (); return EXIT_OK; } +#line 475 "src/conf/parse_opts.cc" yy123: ++YYCURSOR; +#line 93 "../src/conf/parse_opts.re" { opts.bit_vectors (); goto opt_short; } +#line 480 "src/conf/parse_opts.cc" yy125: ++YYCURSOR; +#line 94 "../src/conf/parse_opts.re" { opts.start_conditions (); goto opt_short; } +#line 485 "src/conf/parse_opts.cc" yy127: ++YYCURSOR; +#line 95 "../src/conf/parse_opts.re" { opts.debug_output (); goto opt_short; } +#line 490 "src/conf/parse_opts.cc" yy129: ++YYCURSOR; +#line 103 "../src/conf/parse_opts.re" { if (!opts.ecb ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } +#line 495 "src/conf/parse_opts.cc" yy131: ++YYCURSOR; +#line 97 "../src/conf/parse_opts.re" { opts.storable_state (); goto opt_short; } +#line 500 "src/conf/parse_opts.cc" yy133: ++YYCURSOR; +#line 99 "../src/conf/parse_opts.re" { opts.computed_gotos (); goto opt_short; } +#line 505 "src/conf/parse_opts.cc" yy135: ++YYCURSOR; +#line 100 "../src/conf/parse_opts.re" { opts.no_debug_info (); goto opt_short; } +#line 510 "src/conf/parse_opts.cc" yy137: ++YYCURSOR; if ((yych = *YYCURSOR) <= 0x00) goto yy155; +#line 109 "../src/conf/parse_opts.re" { *argv = YYCURSOR; goto opt_output; } +#line 516 "src/conf/parse_opts.cc" yy139: ++YYCURSOR; +#line 101 "../src/conf/parse_opts.re" { opts.reusable (); goto opt_short; } +#line 521 "src/conf/parse_opts.cc" yy141: ++YYCURSOR; +#line 102 "../src/conf/parse_opts.re" { opts.nested_ifs (); goto opt_short; } +#line 526 "src/conf/parse_opts.cc" yy143: ++YYCURSOR; if ((yych = *YYCURSOR) <= 0x00) goto yy153; +#line 111 "../src/conf/parse_opts.re" { *argv = YYCURSOR; goto opt_header; } +#line 532 "src/conf/parse_opts.cc" yy145: ++YYCURSOR; +#line 104 "../src/conf/parse_opts.re" { if (!opts.unicode ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } +#line 537 "src/conf/parse_opts.cc" yy147: ++YYCURSOR; +#line 91 "../src/conf/parse_opts.re" { version (); return EXIT_OK; } +#line 542 "src/conf/parse_opts.cc" yy149: ++YYCURSOR; +#line 105 "../src/conf/parse_opts.re" { if (!opts.wide_chars ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } +#line 547 "src/conf/parse_opts.cc" yy151: ++YYCURSOR; +#line 106 "../src/conf/parse_opts.re" { if (!opts.utf_16 ()) { error_encoding (); return EXIT_FAIL; } goto opt_short; } +#line 552 "src/conf/parse_opts.cc" yy153: ++YYCURSOR; +#line 110 "../src/conf/parse_opts.re" { if (!next (YYCURSOR, argv)) { error_arg ("-t, --type-header"); return EXIT_FAIL; } goto opt_header; } +#line 557 "src/conf/parse_opts.cc" yy155: ++YYCURSOR; +#line 108 "../src/conf/parse_opts.re" { if (!next (YYCURSOR, argv)) { error_arg ("-o, --output"); return EXIT_FAIL; } goto opt_output; } +#line 562 "src/conf/parse_opts.cc" } +#line 113 "../src/conf/parse_opts.re" opt_long: +#line 569 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = *YYCURSOR; @@ -499,10 +590,12 @@ opt_long: yy159: ++YYCURSOR; yy160: +#line 118 "../src/conf/parse_opts.re" { error ("bad long option: %s", *argv); return EXIT_FAIL; } +#line 599 "src/conf/parse_opts.cc" yy161: yych = *(YYMARKER = ++YYCURSOR); if (yych == 'i') goto yy457; @@ -600,7 +693,9 @@ yy178: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 141 "../src/conf/parse_opts.re" { if (!opts.wide_chars ()) { error_encoding (); return EXIT_FAIL; } goto opt; } +#line 699 "src/conf/parse_opts.cc" yy188: yych = *++YYCURSOR; if (yych != 'r') goto yy177; @@ -622,14 +717,18 @@ yy191: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 123 "../src/conf/parse_opts.re" { version (); return EXIT_OK; } +#line 723 "src/conf/parse_opts.cc" yy197: yych = *++YYCURSOR; if (yych != 'm') goto yy177; yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 124 "../src/conf/parse_opts.re" { vernum (); return EXIT_OK; } +#line 732 "src/conf/parse_opts.cc" yy201: yych = *++YYCURSOR; if (yych == 'f') goto yy210; @@ -648,7 +747,9 @@ yy202: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 140 "../src/conf/parse_opts.re" { if (!opts.unicode ()) { error_encoding (); return EXIT_FAIL; } goto opt; } +#line 753 "src/conf/parse_opts.cc" yy210: yych = *++YYCURSOR; if (yych != '-') goto yy177; @@ -664,12 +765,16 @@ yy213: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 143 "../src/conf/parse_opts.re" { if (!opts.utf_8 ()) { error_encoding (); return EXIT_FAIL; } goto opt; } +#line 771 "src/conf/parse_opts.cc" yy216: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 142 "../src/conf/parse_opts.re" { if (!opts.utf_16 ()) { error_encoding (); return EXIT_FAIL; } goto opt; } +#line 778 "src/conf/parse_opts.cc" yy219: yych = *++YYCURSOR; if (yych != 'p') goto yy177; @@ -692,7 +797,9 @@ yy219: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 145 "../src/conf/parse_opts.re" { if (!next (YYCURSOR, argv)) { error_arg ("-t, --type-header"); return EXIT_FAIL; } goto opt_header; } +#line 803 "src/conf/parse_opts.cc" yy231: yych = *++YYCURSOR; if (yych == 'n') goto yy272; @@ -736,7 +843,9 @@ yy235: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 129 "../src/conf/parse_opts.re" { opts.storable_state (); goto opt; } +#line 849 "src/conf/parse_opts.cc" yy249: yych = *++YYCURSOR; if (yych != 't') goto yy177; @@ -765,7 +874,9 @@ yy249: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 126 "../src/conf/parse_opts.re" { opts.start_conditions (); goto opt; } +#line 880 "src/conf/parse_opts.cc" yy264: yych = *++YYCURSOR; if (yych != 'l') goto yy177; @@ -780,7 +891,9 @@ yy264: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 138 "../src/conf/parse_opts.re" { opts.skeleton (); goto opt; } +#line 897 "src/conf/parse_opts.cc" yy272: yych = *++YYCURSOR; if (yych != 'g') goto yy177; @@ -801,7 +914,9 @@ yy272: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 149 "../src/conf/parse_opts.re" { goto opt; } +#line 920 "src/conf/parse_opts.cc" yy283: yych = *++YYCURSOR; if (yych != 'u') goto yy177; @@ -818,7 +933,9 @@ yy283: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 133 "../src/conf/parse_opts.re" { opts.reusable (); goto opt; } +#line 939 "src/conf/parse_opts.cc" yy292: yych = *++YYCURSOR; if (yych != 't') goto yy177; @@ -831,7 +948,9 @@ yy292: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 144 "../src/conf/parse_opts.re" { if (!next (YYCURSOR, argv)) { error_arg ("-o, --output"); return EXIT_FAIL; } goto opt_output; } +#line 954 "src/conf/parse_opts.cc" yy299: yych = *++YYCURSOR; if (yych == '-') goto yy311; @@ -856,7 +975,9 @@ yy300: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 134 "../src/conf/parse_opts.re" { opts.nested_ifs (); goto opt; } +#line 981 "src/conf/parse_opts.cc" yy311: yych = *++YYCURSOR; if (yych == 'd') goto yy313; @@ -886,7 +1007,9 @@ yy313: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 132 "../src/conf/parse_opts.re" { opts.no_debug_info (); goto opt; } +#line 1013 "src/conf/parse_opts.cc" yy325: yych = *++YYCURSOR; if (yych != 'n') goto yy177; @@ -917,7 +1040,9 @@ yy325: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 135 "../src/conf/parse_opts.re" { opts.no_generation_date (); goto opt; } +#line 1046 "src/conf/parse_opts.cc" yy341: yych = *++YYCURSOR; if (yych != 'p') goto yy177; @@ -928,7 +1053,9 @@ yy341: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 147 "../src/conf/parse_opts.re" { goto opt_input; } +#line 1059 "src/conf/parse_opts.cc" yy347: yych = *++YYCURSOR; if (yych != 'l') goto yy177; @@ -937,7 +1064,9 @@ yy347: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 122 "../src/conf/parse_opts.re" { usage (); return EXIT_OK; } +#line 1070 "src/conf/parse_opts.cc" yy352: yych = *++YYCURSOR; if (yych != 'e') goto yy177; @@ -960,7 +1089,9 @@ yy352: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 130 "../src/conf/parse_opts.re" { opts.flex_syntax (); goto opt; } +#line 1095 "src/conf/parse_opts.cc" yy364: yych = *++YYCURSOR; if (yych == 'i') goto yy385; @@ -976,7 +1107,9 @@ yy366: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 139 "../src/conf/parse_opts.re" { if (!opts.ecb ()) { error_encoding (); return EXIT_FAIL; } goto opt; } +#line 1113 "src/conf/parse_opts.cc" yy370: yych = *++YYCURSOR; if (yych != 'o') goto yy177; @@ -1005,7 +1138,9 @@ yy370: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 146 "../src/conf/parse_opts.re" { goto opt_encoding_policy; } +#line 1144 "src/conf/parse_opts.cc" yy385: yych = *++YYCURSOR; if (yych == 't') goto yy397; @@ -1030,7 +1165,9 @@ yy386: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 148 "../src/conf/parse_opts.re" { goto opt_empty_class; } +#line 1171 "src/conf/parse_opts.cc" yy397: yych = *++YYCURSOR; if (yych != '-') goto yy177; @@ -1043,7 +1180,9 @@ yy397: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 128 "../src/conf/parse_opts.re" { opts.emit_dot (); goto opt; } +#line 1186 "src/conf/parse_opts.cc" yy404: yych = *++YYCURSOR; if (yych != 'b') goto yy177; @@ -1068,7 +1207,9 @@ yy404: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 127 "../src/conf/parse_opts.re" { opts.debug_output (); goto opt; } +#line 1213 "src/conf/parse_opts.cc" yy417: yych = *++YYCURSOR; if (yych == 's') goto yy433; @@ -1101,7 +1242,9 @@ yy418: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 131 "../src/conf/parse_opts.re" { opts.computed_gotos (); goto opt; } +#line 1248 "src/conf/parse_opts.cc" yy433: yych = *++YYCURSOR; if (yych != 'e') goto yy177; @@ -1137,7 +1280,9 @@ yy439: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 136 "../src/conf/parse_opts.re" { opts.case_insensitive (); goto opt; } +#line 1286 "src/conf/parse_opts.cc" yy450: yych = *++YYCURSOR; if (yych != 'r') goto yy177; @@ -1150,7 +1295,9 @@ yy450: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 137 "../src/conf/parse_opts.re" { opts.case_inverted (); goto opt; } +#line 1301 "src/conf/parse_opts.cc" yy457: yych = *++YYCURSOR; if (yych != 't') goto yy177; @@ -1173,12 +1320,16 @@ yy457: yych = *++YYCURSOR; if (yych >= 0x01) goto yy177; ++YYCURSOR; +#line 125 "../src/conf/parse_opts.re" { opts.bit_vectors (); goto opt; } +#line 1326 "src/conf/parse_opts.cc" } +#line 150 "../src/conf/parse_opts.re" opt_output: +#line 1333 "src/conf/parse_opts.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1220,10 +1371,12 @@ opt_output: if (yych != '-') goto yy473; yy471: ++YYCURSOR; +#line 155 "../src/conf/parse_opts.re" { error ("bad argument to option -o, --output: %s", *argv); return EXIT_FAIL; } +#line 1380 "src/conf/parse_opts.cc" yy473: yych = *(YYMARKER = ++YYCURSOR); goto yy475; @@ -1235,12 +1388,16 @@ yy475: goto yy474; } ++YYCURSOR; +#line 159 "../src/conf/parse_opts.re" { if (!opts.output (*argv)) return EXIT_FAIL; goto opt; } +#line 1394 "src/conf/parse_opts.cc" } +#line 160 "../src/conf/parse_opts.re" opt_header: +#line 1401 "src/conf/parse_opts.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1282,10 +1439,12 @@ opt_header: if (yych != '-') goto yy482; yy480: ++YYCURSOR; +#line 165 "../src/conf/parse_opts.re" { error ("bad argument to option -t, --type-header: %s", *argv); return EXIT_FAIL; } +#line 1448 "src/conf/parse_opts.cc" yy482: yych = *(YYMARKER = ++YYCURSOR); goto yy484; @@ -1297,8 +1456,11 @@ yy484: goto yy483; } ++YYCURSOR; +#line 169 "../src/conf/parse_opts.re" { if (!opts.type_header (*argv)) return EXIT_FAIL; goto opt; } +#line 1462 "src/conf/parse_opts.cc" } +#line 170 "../src/conf/parse_opts.re" opt_encoding_policy: @@ -1308,6 +1470,7 @@ opt_encoding_policy: return EXIT_FAIL; } +#line 1474 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = *YYCURSOR; @@ -1319,10 +1482,12 @@ opt_encoding_policy: } ++YYCURSOR; yy490: +#line 180 "../src/conf/parse_opts.re" { error ("bad argument to option --encoding-policy (expected: ignore | substitute | fail): %s", *argv); return EXIT_FAIL; } +#line 1491 "src/conf/parse_opts.cc" yy491: yych = *(YYMARKER = ++YYCURSOR); if (yych == 'a') goto yy513; @@ -1357,7 +1522,9 @@ yy496: yych = *++YYCURSOR; if (yych >= 0x01) goto yy495; ++YYCURSOR; +#line 185 "../src/conf/parse_opts.re" { opts.encoding_policy (Enc::POLICY_SUBSTITUTE); goto opt; } +#line 1528 "src/conf/parse_opts.cc" yy506: yych = *++YYCURSOR; if (yych != 'n') goto yy495; @@ -1370,7 +1537,9 @@ yy506: yych = *++YYCURSOR; if (yych >= 0x01) goto yy495; ++YYCURSOR; +#line 184 "../src/conf/parse_opts.re" { opts.encoding_policy (Enc::POLICY_IGNORE); goto opt; } +#line 1543 "src/conf/parse_opts.cc" yy513: yych = *++YYCURSOR; if (yych != 'i') goto yy495; @@ -1379,8 +1548,11 @@ yy513: yych = *++YYCURSOR; if (yych >= 0x01) goto yy495; ++YYCURSOR; +#line 186 "../src/conf/parse_opts.re" { opts.encoding_policy (Enc::POLICY_FAIL); goto opt; } +#line 1554 "src/conf/parse_opts.cc" } +#line 187 "../src/conf/parse_opts.re" opt_input: @@ -1390,6 +1562,7 @@ opt_input: return EXIT_FAIL; } +#line 1566 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = *YYCURSOR; @@ -1399,10 +1572,12 @@ opt_input: yy520: ++YYCURSOR; yy521: +#line 197 "../src/conf/parse_opts.re" { error ("bad argument to option --input (expected: default | custom): %s", *argv); return EXIT_FAIL; } +#line 1581 "src/conf/parse_opts.cc" yy522: yych = *(YYMARKER = ++YYCURSOR); if (yych == 'u') goto yy533; @@ -1427,7 +1602,9 @@ yy526: yych = *++YYCURSOR; if (yych >= 0x01) goto yy525; ++YYCURSOR; +#line 201 "../src/conf/parse_opts.re" { opts.input (InputAPI::DEFAULT); goto opt; } +#line 1608 "src/conf/parse_opts.cc" yy533: yych = *++YYCURSOR; if (yych != 's') goto yy525; @@ -1440,8 +1617,11 @@ yy533: yych = *++YYCURSOR; if (yych >= 0x01) goto yy525; ++YYCURSOR; +#line 202 "../src/conf/parse_opts.re" { opts.input (InputAPI::CUSTOM); goto opt; } +#line 1623 "src/conf/parse_opts.cc" } +#line 203 "../src/conf/parse_opts.re" opt_empty_class: @@ -1451,6 +1631,7 @@ opt_empty_class: return EXIT_FAIL; } +#line 1635 "src/conf/parse_opts.cc" { YYCTYPE yych; yych = *YYCURSOR; @@ -1458,10 +1639,12 @@ opt_empty_class: if (yych == 'm') goto yy545; ++YYCURSOR; yy543: +#line 213 "../src/conf/parse_opts.re" { error ("bad argument to option --empty-class (expected: match-empty | match-none | error): %s", *argv); return EXIT_FAIL; } +#line 1648 "src/conf/parse_opts.cc" yy544: yych = *(YYMARKER = ++YYCURSOR); if (yych == 'r') goto yy565; @@ -1499,7 +1682,9 @@ yy553: yych = *++YYCURSOR; if (yych >= 0x01) goto yy547; ++YYCURSOR; +#line 218 "../src/conf/parse_opts.re" { opts.empty_class (EMPTY_CLASS_MATCH_NONE); goto opt; } +#line 1688 "src/conf/parse_opts.cc" yy559: yych = *++YYCURSOR; if (yych != 'p') goto yy547; @@ -1510,7 +1695,9 @@ yy559: yych = *++YYCURSOR; if (yych >= 0x01) goto yy547; ++YYCURSOR; +#line 217 "../src/conf/parse_opts.re" { opts.empty_class (EMPTY_CLASS_MATCH_EMPTY); goto opt; } +#line 1701 "src/conf/parse_opts.cc" yy565: yych = *++YYCURSOR; if (yych != 'r') goto yy547; @@ -1521,8 +1708,11 @@ yy565: yych = *++YYCURSOR; if (yych >= 0x01) goto yy547; ++YYCURSOR; +#line 219 "../src/conf/parse_opts.re" { opts.empty_class (EMPTY_CLASS_ERROR); goto opt; } +#line 1714 "src/conf/parse_opts.cc" } +#line 220 "../src/conf/parse_opts.re" end: diff --git a/re2c/bootstrap/src/parse/scanner_lex.cc b/re2c/bootstrap/src/parse/scanner_lex.cc index 6043b99e..05f1c0ba 100644 --- a/re2c/bootstrap/src/parse/scanner_lex.cc +++ b/re2c/bootstrap/src/parse/scanner_lex.cc @@ -1,4 +1,5 @@ -/* Generated by re2c 0.14.3 on Thu Aug 6 10:57:02 2015 */ +/* Generated by re2c 0.14.3 on Thu Aug 6 12:02:24 2015 */ +#line 1 "../src/parse/scanner_lex.re" #include #include #include @@ -29,6 +30,7 @@ extern YYSTYPE yylval; namespace re2c { +#line 51 "../src/parse/scanner_lex.re" Scanner::ParseMode Scanner::echo() @@ -45,6 +47,7 @@ Scanner::ParseMode Scanner::echo() tok = cursor; echo: +#line 51 "src/parse/scanner_lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -103,6 +106,7 @@ echo: } } ++YYCURSOR; +#line 191 "../src/parse/scanner_lex.re" { if (!(ignore_eoc || DFlag || flag_skeleton)) { @@ -114,12 +118,15 @@ echo: RETURN(Stop); } } +#line 122 "src/parse/scanner_lex.cc" yy4: ++YYCURSOR; yy5: +#line 202 "../src/parse/scanner_lex.re" { goto echo; } +#line 130 "src/parse/scanner_lex.cc" yy6: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -128,6 +135,7 @@ yy6: } if (yych == '#') goto yy91; yy7: +#line 178 "../src/parse/scanner_lex.re" { if (ignore_eoc) { @@ -141,6 +149,7 @@ yy7: cline++; goto echo; } +#line 153 "src/parse/scanner_lex.cc" yy8: yych = *++YYCURSOR; if (yych == '{') goto yy32; @@ -224,6 +233,7 @@ yy21: yych = *++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; +#line 80 "../src/parse/scanner_lex.re" { if (rFlag) { @@ -236,11 +246,13 @@ yy21: tok = cursor; RETURN(Rules); } +#line 250 "src/parse/scanner_lex.cc" yy31: yych = *++YYCURSOR; if (yych != 'c') goto yy12; yy32: ++YYCURSOR; +#line 68 "../src/parse/scanner_lex.re" { if (rFlag) { @@ -253,6 +265,7 @@ yy32: tok = cursor; RETURN(Parse); } +#line 269 "src/parse/scanner_lex.cc" yy34: yych = *++YYCURSOR; if (yych != 'e') goto yy12; @@ -267,6 +280,7 @@ yy34: yych = *++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; +#line 92 "../src/parse/scanner_lex.re" { if (!rFlag) { @@ -280,6 +294,7 @@ yy34: tok = cursor; RETURN(Reuse); } +#line 298 "src/parse/scanner_lex.cc" yy42: yych = *++YYCURSOR; if (yych != 'x') goto yy12; @@ -294,6 +309,7 @@ yy42: yych = *++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; +#line 105 "../src/parse/scanner_lex.re" { if (!DFlag) { @@ -303,6 +319,7 @@ yy42: ignore_eoc = true; goto echo; } +#line 323 "src/parse/scanner_lex.cc" yy50: yych = *++YYCURSOR; if (yych != 't') goto yy12; @@ -327,12 +344,14 @@ yy50: yych = *++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; +#line 114 "../src/parse/scanner_lex.re" { tok = pos = cursor; out.insert_state_goto (topIndent); ignore_eoc = true; goto echo; } +#line 355 "src/parse/scanner_lex.cc" yy63: yych = *++YYCURSOR; if (yych != 'n') goto yy12; @@ -353,11 +372,13 @@ yy63: yych = *++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; +#line 120 "../src/parse/scanner_lex.re" { tok = pos = cursor; ignore_eoc = true; goto echo; } +#line 382 "src/parse/scanner_lex.cc" yy74: yych = *++YYCURSOR; if (yych != 'p') goto yy12; @@ -376,6 +397,7 @@ yy74: yych = *++YYCURSOR; if (yych != 'c') goto yy12; ++YYCURSOR; +#line 125 "../src/parse/scanner_lex.re" { tok = pos = cursor; ignore_eoc = true; @@ -389,12 +411,14 @@ yy74: } goto echo; } +#line 415 "src/parse/scanner_lex.cc" yy84: yyaccept = 2; yych = *(YYMARKER = ++YYCURSOR); if (yych == '\n') goto yy87; if (yych == '\r') goto yy86; yy85: +#line 156 "../src/parse/scanner_lex.re" { if (ignore_eoc) { @@ -413,11 +437,13 @@ yy85: tok = pos = cursor; goto echo; } +#line 441 "src/parse/scanner_lex.cc" yy86: yych = *++YYCURSOR; if (yych != '\n') goto yy12; yy87: ++YYCURSOR; +#line 138 "../src/parse/scanner_lex.re" { cline++; if (ignore_eoc) @@ -436,6 +462,7 @@ yy87: tok = pos = cursor; goto echo; } +#line 466 "src/parse/scanner_lex.cc" yy89: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -510,10 +537,12 @@ yy101: yy103: ++YYCURSOR; YYCURSOR = YYCTXMARKER; +#line 174 "../src/parse/scanner_lex.re" { set_sourceline(cursor); goto echo; } +#line 546 "src/parse/scanner_lex.cc" yy105: yych = *++YYCURSOR; if (yych == '\n') goto yy103; @@ -538,6 +567,7 @@ yy109: if (yych == '\r') goto yy105; goto yy12; } +#line 205 "../src/parse/scanner_lex.re" } @@ -560,6 +590,7 @@ scan: start: +#line 594 "src/parse/scanner_lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -674,18 +705,22 @@ start: yy112: ++YYCURSOR; yy113: +#line 436 "../src/parse/scanner_lex.re" { fatalf("unexpected character: '%c'", *tok); goto scan; } +#line 714 "src/parse/scanner_lex.cc" yy114: ++YYCURSOR; yych = *YYCURSOR; goto yy248; yy115: +#line 420 "../src/parse/scanner_lex.re" { goto scan; } +#line 724 "src/parse/scanner_lex.cc" yy116: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -696,12 +731,14 @@ yy116: if (yych == '#') goto yy228; } yy117: +#line 429 "../src/parse/scanner_lex.re" { if (cursor == eof) RETURN(0); pos = cursor; cline++; goto scan; } +#line 742 "src/parse/scanner_lex.cc" yy118: yych = *++YYCURSOR; if (yych == '\n') goto yy225; @@ -711,9 +748,11 @@ yy119: yych = *(YYMARKER = ++YYCURSOR); if (yych != '\n') goto yy221; yy120: +#line 285 "../src/parse/scanner_lex.re" { fatal("unterminated string constant (missing \")"); } +#line 756 "src/parse/scanner_lex.cc" yy121: yych = *++YYCURSOR; if (yych == '}') goto yy213; @@ -723,35 +762,45 @@ yy122: yych = *(YYMARKER = ++YYCURSOR); if (yych != '\n') goto yy216; yy123: +#line 288 "../src/parse/scanner_lex.re" { fatal("unterminated string constant (missing ')"); } +#line 770 "src/parse/scanner_lex.cc" yy124: ++YYCURSOR; yy125: +#line 316 "../src/parse/scanner_lex.re" { RETURN(*tok); } +#line 778 "src/parse/scanner_lex.cc" yy126: ++YYCURSOR; if ((yych = *YYCURSOR) == '/') goto yy213; +#line 320 "../src/parse/scanner_lex.re" { yylval.op = *tok; RETURN(STAR); } +#line 787 "src/parse/scanner_lex.cc" yy128: ++YYCURSOR; +#line 324 "../src/parse/scanner_lex.re" { yylval.op = *tok; RETURN(CLOSE); } +#line 795 "src/parse/scanner_lex.cc" yy130: ++YYCURSOR; +#line 414 "../src/parse/scanner_lex.re" { cur = cursor; yylval.regexp = mkDot(); return RANGE; } +#line 804 "src/parse/scanner_lex.cc" yy132: yych = *++YYCURSOR; if (yych == '*') goto yy209; @@ -779,9 +828,11 @@ yy136: if (yych == '^') goto yy188; goto yy187; yy137: +#line 306 "../src/parse/scanner_lex.re" { fatal("unterminated range (missing ])"); } +#line 836 "src/parse/scanner_lex.cc" yy138: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; @@ -807,10 +858,12 @@ yy139: } } yy140: +#line 227 "../src/parse/scanner_lex.re" { depth = 1; goto code; } +#line 867 "src/parse/scanner_lex.cc" yy141: yych = *++YYCURSOR; if (yych == ',') goto yy160; @@ -882,11 +935,14 @@ yy145: yy147: ++YYCURSOR; yy148: +#line 352 "../src/parse/scanner_lex.re" { fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"); } +#line 943 "src/parse/scanner_lex.cc" yy149: ++YYCURSOR; +#line 356 "../src/parse/scanner_lex.re" { if (!FFlag) { fatal("curly braces for names only allowed with -F switch"); @@ -895,13 +951,16 @@ yy149: yylval.str = new std::string (tok + 1, cur - tok - 2); return ID; } +#line 955 "src/parse/scanner_lex.cc" yy151: ++YYCURSOR; +#line 334 "../src/parse/scanner_lex.re" { yylval.extop.minsize = atoi((char *)tok+1); yylval.extop.maxsize = atoi((char *)tok+1); RETURN(CLOSESIZE); } +#line 964 "src/parse/scanner_lex.cc" yy153: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); @@ -909,11 +968,13 @@ yy153: if (yych <= '9') goto yy156; if (yych != '}') goto yy148; ++YYCURSOR; +#line 346 "../src/parse/scanner_lex.re" { yylval.extop.minsize = atoi((char *)tok+1); yylval.extop.maxsize = -1; RETURN(CLOSESIZE); } +#line 978 "src/parse/scanner_lex.cc" yy156: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -922,11 +983,13 @@ yy156: if (yych <= '9') goto yy156; if (yych != '}') goto yy142; ++YYCURSOR; +#line 340 "../src/parse/scanner_lex.re" { yylval.extop.minsize = atoi((char *)tok+1); yylval.extop.maxsize = MAX(yylval.extop.minsize,atoi(strchr((char *)tok, ',')+1)); RETURN(CLOSESIZE); } +#line 993 "src/parse/scanner_lex.cc" yy160: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); @@ -934,14 +997,17 @@ yy160: if (yych <= '9') goto yy156; if (yych != '}') goto yy148; ++YYCURSOR; +#line 329 "../src/parse/scanner_lex.re" { yylval.op = '*'; RETURN(CLOSE); } +#line 1006 "src/parse/scanner_lex.cc" yy163: ++YYCURSOR; yy164: YYCURSOR = YYCTXMARKER; +#line 393 "../src/parse/scanner_lex.re" { if (!FFlag) { cur = cursor; @@ -962,6 +1028,7 @@ yy164: return STRING; } } +#line 1032 "src/parse/scanner_lex.cc" yy165: yych = *++YYCURSOR; goto yy184; @@ -969,11 +1036,13 @@ yy166: ++YYCURSOR; yy167: YYCURSOR = YYCTXMARKER; +#line 387 "../src/parse/scanner_lex.re" { cur = ptr > tok ? ptr - 1 : cursor; yylval.str = new std::string (tok, cur - tok); return ID; } +#line 1046 "src/parse/scanner_lex.cc" yy168: YYCTXMARKER = YYCURSOR + 1; ++YYCURSOR; @@ -1052,6 +1121,7 @@ yy174: } } yy176: +#line 365 "../src/parse/scanner_lex.re" { cur = cursor; tok += 5; /* skip "re2c:" */ @@ -1059,6 +1129,7 @@ yy176: yylval.str = new std::string (tok, cur - tok); return CONFIG; } +#line 1133 "src/parse/scanner_lex.cc" yy177: yych = *++YYCURSOR; if (yych <= 'Z') { @@ -1117,6 +1188,7 @@ yy179: yy181: ++YYCURSOR; YYCURSOR = YYCTXMARKER; +#line 373 "../src/parse/scanner_lex.re" { cur = ptr > tok ? ptr - 1 : cursor; yylval.str = new std::string (tok, cur - tok); @@ -1130,6 +1202,7 @@ yy181: return ID; } } +#line 1206 "src/parse/scanner_lex.cc" yy183: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1175,12 +1248,14 @@ yy190: goto yy186; yy191: ++YYCURSOR; +#line 299 "../src/parse/scanner_lex.re" { cur = cursor; SubStr s (tok, cur - tok); yylval.regexp = ranToRE (s); return RANGE; } +#line 1259 "src/parse/scanner_lex.cc" yy193: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1189,17 +1264,21 @@ yy193: goto yy188; yy194: ++YYCURSOR; +#line 292 "../src/parse/scanner_lex.re" { cur = cursor; SubStr s (tok, cur - tok); yylval.regexp = invToRE (s); return RANGE; } +#line 1275 "src/parse/scanner_lex.cc" yy196: ++YYCURSOR; +#line 313 "../src/parse/scanner_lex.re" { RETURN(SETUP); } +#line 1282 "src/parse/scanner_lex.cc" yy198: YYCTXMARKER = YYCURSOR + 1; yych = *++YYCURSOR; @@ -1229,9 +1308,11 @@ yy200: yy201: ++YYCURSOR; YYCURSOR = YYCTXMARKER; +#line 310 "../src/parse/scanner_lex.re" { RETURN(NOCOND); } +#line 1316 "src/parse/scanner_lex.cc" yy203: yych = *++YYCURSOR; if (yych == '>') goto yy201; @@ -1243,35 +1324,45 @@ yy204: yy205: ++YYCURSOR; if ((yych = *YYCURSOR) == '>') goto yy207; +#line 236 "../src/parse/scanner_lex.re" { cur = cursor; tok += 2; /* skip ":=" */ depth = 0; goto code; } +#line 1335 "src/parse/scanner_lex.cc" yy207: ++YYCURSOR; YYCURSOR = YYCTXMARKER; +#line 232 "../src/parse/scanner_lex.re" { RETURN(*tok); } +#line 1343 "src/parse/scanner_lex.cc" yy209: ++YYCURSOR; +#line 246 "../src/parse/scanner_lex.re" { depth = 1; goto comment; } +#line 1351 "src/parse/scanner_lex.cc" yy211: ++YYCURSOR; +#line 243 "../src/parse/scanner_lex.re" { goto nextLine; } +#line 1358 "src/parse/scanner_lex.cc" yy213: ++YYCURSOR; +#line 252 "../src/parse/scanner_lex.re" { tok = cursor; RETURN(0); } +#line 1366 "src/parse/scanner_lex.cc" yy215: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1289,6 +1380,7 @@ yy216: goto yy215; yy218: ++YYCURSOR; +#line 271 "../src/parse/scanner_lex.re" { cur = cursor; SubStr s (tok + 1, cur - tok - 2); @@ -1302,6 +1394,7 @@ yy218: } return STRING; } +#line 1398 "src/parse/scanner_lex.cc" yy220: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1319,6 +1412,7 @@ yy221: goto yy220; yy223: ++YYCURSOR; +#line 257 "../src/parse/scanner_lex.re" { cur = cursor; SubStr s (tok + 1, cur - tok - 2); @@ -1332,6 +1426,7 @@ yy223: } return STRING; } +#line 1430 "src/parse/scanner_lex.cc" yy225: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); @@ -1424,10 +1519,12 @@ yy238: yy240: ++YYCURSOR; YYCURSOR = YYCTXMARKER; +#line 424 "../src/parse/scanner_lex.re" { set_sourceline(cursor); goto scan; } +#line 1528 "src/parse/scanner_lex.cc" yy242: yych = *++YYCURSOR; if (yych == '\n') goto yy240; @@ -1462,10 +1559,12 @@ yy248: if (yych == ' ') goto yy247; goto yy115; } +#line 440 "../src/parse/scanner_lex.re" flex_name: +#line 1568 "src/parse/scanner_lex.cc" { YYCTYPE yych; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -1474,18 +1573,22 @@ flex_name: if (yych == '\r') goto yy255; ++YYCURSOR; yy252: +#line 451 "../src/parse/scanner_lex.re" { YYCURSOR = tok; goto start; } +#line 1582 "src/parse/scanner_lex.cc" yy253: ++YYCURSOR; yy254: +#line 445 "../src/parse/scanner_lex.re" { YYCURSOR = tok; lexer_state = LEX_NORMAL; return FID_END; } +#line 1592 "src/parse/scanner_lex.cc" yy255: yych = *++YYCURSOR; if (yych != '\n') goto yy252; @@ -1493,10 +1596,12 @@ yy255: yych = *YYCURSOR; goto yy254; } +#line 455 "../src/parse/scanner_lex.re" code: +#line 1605 "src/parse/scanner_lex.cc" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -1557,6 +1662,7 @@ code: } yy259: ++YYCURSOR; +#line 520 "../src/parse/scanner_lex.re" { if (cursor == eof) { @@ -1568,12 +1674,15 @@ yy259: } goto code; } +#line 1678 "src/parse/scanner_lex.cc" yy261: ++YYCURSOR; yy262: +#line 534 "../src/parse/scanner_lex.re" { goto code; } +#line 1686 "src/parse/scanner_lex.cc" yy263: YYCTXMARKER = YYCURSOR + 1; yyaccept = 0; @@ -1593,6 +1702,7 @@ yy263: } } yy264: +#line 500 "../src/parse/scanner_lex.re" { if (depth == 0) { @@ -1613,6 +1723,7 @@ yy264: cline++; goto code; } +#line 1727 "src/parse/scanner_lex.cc" yy265: yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); @@ -1625,6 +1736,7 @@ yy266: goto yy272; yy267: ++YYCURSOR; +#line 472 "../src/parse/scanner_lex.re" { if (depth == 0) { @@ -1636,8 +1748,10 @@ yy267: } goto code; } +#line 1752 "src/parse/scanner_lex.cc" yy269: ++YYCURSOR; +#line 459 "../src/parse/scanner_lex.re" { if (depth == 0) { @@ -1651,6 +1765,7 @@ yy269: } goto code; } +#line 1769 "src/parse/scanner_lex.cc" yy271: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1681,9 +1796,11 @@ yy274: goto yy271; yy275: ++YYCURSOR; +#line 531 "../src/parse/scanner_lex.re" { goto code; } +#line 1804 "src/parse/scanner_lex.cc" yy277: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -1710,6 +1827,7 @@ yy280: } yy281: YYCURSOR = YYCTXMARKER; +#line 487 "../src/parse/scanner_lex.re" { if (depth == 0) { @@ -1723,6 +1841,7 @@ yy281: cline++; goto code; } +#line 1845 "src/parse/scanner_lex.cc" yy282: yych = *++YYCURSOR; goto yy281; @@ -1789,10 +1908,12 @@ yy293: yy295: ++YYCURSOR; YYCURSOR = YYCTXMARKER; +#line 483 "../src/parse/scanner_lex.re" { set_sourceline(cursor); goto code; } +#line 1917 "src/parse/scanner_lex.cc" yy297: yych = *++YYCURSOR; if (yych == '\n') goto yy295; @@ -1831,10 +1952,12 @@ yy302: goto yy273; } } +#line 537 "../src/parse/scanner_lex.re" comment: +#line 1961 "src/parse/scanner_lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -1881,6 +2004,7 @@ comment: } ++YYCURSOR; yy307: +#line 569 "../src/parse/scanner_lex.re" { if (cursor == eof) { @@ -1888,6 +2012,7 @@ yy307: } goto comment; } +#line 2016 "src/parse/scanner_lex.cc" yy308: yych = *(YYMARKER = ++YYCURSOR); if (yybm[0+yych] & 32) { @@ -1895,6 +2020,7 @@ yy308: } if (yych == '#') goto yy319; yy309: +#line 560 "../src/parse/scanner_lex.re" { if (cursor == eof) { @@ -1904,6 +2030,7 @@ yy309: cline++; goto comment; } +#line 2034 "src/parse/scanner_lex.cc" yy310: yych = *++YYCURSOR; if (yych == '/') goto yy314; @@ -1912,13 +2039,16 @@ yy311: yych = *++YYCURSOR; if (yych != '*') goto yy307; ++YYCURSOR; +#line 551 "../src/parse/scanner_lex.re" { ++depth; fatal("ambiguous /* found"); goto comment; } +#line 2049 "src/parse/scanner_lex.cc" yy314: ++YYCURSOR; +#line 541 "../src/parse/scanner_lex.re" { if (--depth == 0) { @@ -1929,6 +2059,7 @@ yy314: goto comment; } } +#line 2063 "src/parse/scanner_lex.cc" yy316: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -2006,10 +2137,12 @@ yy329: yy331: ++YYCURSOR; YYCURSOR = YYCTXMARKER; +#line 556 "../src/parse/scanner_lex.re" { set_sourceline(cursor); goto comment; } +#line 2146 "src/parse/scanner_lex.cc" yy333: yych = *++YYCURSOR; if (yych == '\n') goto yy331; @@ -2034,23 +2167,28 @@ yy337: if (yych == '\r') goto yy333; goto yy318; } +#line 576 "../src/parse/scanner_lex.re" nextLine: +#line 2176 "src/parse/scanner_lex.cc" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; if (yych == '\n') goto yy342; ++YYCURSOR; +#line 587 "../src/parse/scanner_lex.re" { if(cursor == eof) { RETURN(0); } goto nextLine; } +#line 2189 "src/parse/scanner_lex.cc" yy342: ++YYCURSOR; +#line 580 "../src/parse/scanner_lex.re" { if(cursor == eof) { RETURN(0); } @@ -2058,11 +2196,14 @@ yy342: cline++; goto scan; } +#line 2200 "src/parse/scanner_lex.cc" } +#line 592 "../src/parse/scanner_lex.re" config: +#line 2207 "src/parse/scanner_lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -2108,27 +2249,33 @@ config: if (yych == '=') goto yy350; } ++YYCURSOR; +#line 604 "../src/parse/scanner_lex.re" { fatal("missing '='"); } +#line 2257 "src/parse/scanner_lex.cc" yy348: ++YYCURSOR; yych = *YYCURSOR; goto yy355; yy349: +#line 596 "../src/parse/scanner_lex.re" { goto config; } +#line 2267 "src/parse/scanner_lex.cc" yy350: ++YYCURSOR; yych = *YYCURSOR; goto yy353; yy351: +#line 599 "../src/parse/scanner_lex.re" { lexer_state = LEX_CONFIG_VALUE; cur = cursor; RETURN('='); } +#line 2279 "src/parse/scanner_lex.cc" yy352: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -2147,10 +2294,12 @@ yy355: if (yych == ' ') goto yy354; goto yy349; } +#line 607 "../src/parse/scanner_lex.re" value: +#line 2303 "src/parse/scanner_lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -2217,24 +2366,28 @@ value: } } yy358: +#line 617 "../src/parse/scanner_lex.re" { cur = cursor; yylval.str = new std::string (tok, cur - tok); lexer_state = LEX_NORMAL; return VALUE; } +#line 2377 "src/parse/scanner_lex.cc" yy359: ++YYCURSOR; if (yybm[0+(yych = *YYCURSOR)] & 8) { goto yy364; } yy360: +#line 611 "../src/parse/scanner_lex.re" { cur = cursor; yylval.number = atoi(std::string (tok, cur - tok).c_str()); lexer_state = LEX_NORMAL; return NUMBER; } +#line 2391 "src/parse/scanner_lex.cc" yy361: yych = *++YYCURSOR; if (yych <= '0') goto yy365; @@ -2377,6 +2530,7 @@ yy379: if (yych == '\n') goto yy372; goto yy376; } +#line 623 "../src/parse/scanner_lex.re" } @@ -2399,6 +2553,7 @@ void Scanner::set_sourceline(char *& cursor) sourceline: tok = cursor; +#line 2557 "src/parse/scanner_lex.cc" { YYCTYPE yych; static const unsigned char yybm[] = { @@ -2447,11 +2602,14 @@ sourceline: yy382: ++YYCURSOR; yy383: +#line 667 "../src/parse/scanner_lex.re" { goto sourceline; } +#line 2610 "src/parse/scanner_lex.cc" yy384: ++YYCURSOR; +#line 655 "../src/parse/scanner_lex.re" { if (cursor == eof) { @@ -2464,6 +2622,7 @@ yy384: tok = cursor; return; } +#line 2626 "src/parse/scanner_lex.cc" yy386: yych = *(YYMARKER = ++YYCURSOR); if (yych == '\n') goto yy383; @@ -2473,11 +2632,13 @@ yy387: yych = *YYCURSOR; goto yy390; yy388: +#line 645 "../src/parse/scanner_lex.re" { cur = cursor; cline = atoi(std::string (tok, cur - tok).c_str()); goto sourceline; } +#line 2642 "src/parse/scanner_lex.cc" yy389: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); @@ -2509,12 +2670,15 @@ yy394: goto yy391; yy395: ++YYCURSOR; +#line 650 "../src/parse/scanner_lex.re" { cur = cursor; escape (in.file_name, std::string (tok + 1, cur - tok - 2)); goto sourceline; } +#line 2680 "src/parse/scanner_lex.cc" } +#line 670 "../src/parse/scanner_lex.re" } -- 2.40.0