-/* Generated by re2c 0.15.2 on Sun Nov 29 10:27:59 2015 */
+/* Generated by re2c 0.15.2 on Tue Dec 1 15:54:11 2015 */
#line 1 "../src/conf/parse_opts.re"
-#include <stdio.h>
-
+#include "src/codegen/input_api.h"
#include "src/conf/msg.h"
#include "src/conf/opt.h"
+#include "src/conf/warn.h"
#include "src/globals.h"
+#include "src/ir/regexp/empty_class_policy.h"
+#include "src/ir/regexp/encoding/enc.h"
namespace re2c
{
char * YYMARKER;
Warn::option_t option;
-#line 29 "../src/conf/parse_opts.re"
+#line 31 "../src/conf/parse_opts.re"
opt:
goto end;
}
-#line 35 "src/conf/parse_opts.cc"
+#line 37 "src/conf/parse_opts.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
yy2:
++YYCURSOR;
yy3:
-#line 38 "../src/conf/parse_opts.re"
+#line 40 "../src/conf/parse_opts.re"
{
error ("bad option: %s", *argv);
return EXIT_FAIL;
}
-#line 85 "src/conf/parse_opts.cc"
+#line 87 "src/conf/parse_opts.cc"
yy4:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
} else {
if (yych == 'W') goto yy7;
}
-#line 61 "../src/conf/parse_opts.re"
+#line 63 "../src/conf/parse_opts.re"
{ goto opt_short; }
-#line 100 "src/conf/parse_opts.cc"
+#line 102 "src/conf/parse_opts.cc"
yy7:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'n') goto yy19;
}
yy8:
-#line 66 "../src/conf/parse_opts.re"
+#line 68 "../src/conf/parse_opts.re"
{ option = Warn::W; goto opt_warn; }
-#line 113 "src/conf/parse_opts.cc"
+#line 115 "src/conf/parse_opts.cc"
yy9:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) <= 0x00) goto yy13;
-#line 62 "../src/conf/parse_opts.re"
+#line 64 "../src/conf/parse_opts.re"
{ goto opt_long; }
-#line 119 "src/conf/parse_opts.cc"
+#line 121 "src/conf/parse_opts.cc"
yy11:
++YYCURSOR;
-#line 58 "../src/conf/parse_opts.re"
+#line 60 "../src/conf/parse_opts.re"
{ if (!opts.source ("<stdin>")) return EXIT_FAIL; goto opt; }
-#line 124 "src/conf/parse_opts.cc"
+#line 126 "src/conf/parse_opts.cc"
yy13:
++YYCURSOR;
-#line 44 "../src/conf/parse_opts.re"
+#line 46 "../src/conf/parse_opts.re"
{
// all remaining arguments are non-options
// so they must be input files
}
goto end;
}
-#line 141 "src/conf/parse_opts.cc"
+#line 143 "src/conf/parse_opts.cc"
yy15:
++YYCURSOR;
-#line 64 "../src/conf/parse_opts.re"
+#line 66 "../src/conf/parse_opts.re"
{ warn.set_all (); goto opt; }
-#line 146 "src/conf/parse_opts.cc"
+#line 148 "src/conf/parse_opts.cc"
yy17:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy30;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'e') goto yy23;
yy22:
-#line 67 "../src/conf/parse_opts.re"
+#line 69 "../src/conf/parse_opts.re"
{ option = Warn::WNO; goto opt_warn; }
-#line 172 "src/conf/parse_opts.cc"
+#line 174 "src/conf/parse_opts.cc"
yy23:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'r') goto yy18;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '-') goto yy18;
++YYCURSOR;
-#line 69 "../src/conf/parse_opts.re"
+#line 71 "../src/conf/parse_opts.re"
{ option = Warn::WNOERROR; goto opt_warn; }
-#line 187 "src/conf/parse_opts.cc"
+#line 189 "src/conf/parse_opts.cc"
yy30:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'r') goto yy18;
if (yych <= 0x00) goto yy36;
if (yych != '-') goto yy18;
++YYCURSOR;
-#line 68 "../src/conf/parse_opts.re"
+#line 70 "../src/conf/parse_opts.re"
{ option = Warn::WERROR; goto opt_warn; }
-#line 201 "src/conf/parse_opts.cc"
+#line 203 "src/conf/parse_opts.cc"
yy36:
++YYCURSOR;
-#line 65 "../src/conf/parse_opts.re"
+#line 67 "../src/conf/parse_opts.re"
{ warn.set_all_error (); goto opt; }
-#line 206 "src/conf/parse_opts.cc"
+#line 208 "src/conf/parse_opts.cc"
yy38:
++YYCURSOR;
yych = (YYCTYPE)*YYCURSOR;
goto yy38;
}
++YYCURSOR;
-#line 59 "../src/conf/parse_opts.re"
+#line 61 "../src/conf/parse_opts.re"
{ if (!opts.source (*argv)) return EXIT_FAIL; goto opt; }
-#line 217 "src/conf/parse_opts.cc"
+#line 219 "src/conf/parse_opts.cc"
}
-#line 70 "../src/conf/parse_opts.re"
+#line 72 "../src/conf/parse_opts.re"
opt_warn:
-#line 224 "src/conf/parse_opts.cc"
+#line 226 "src/conf/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
yy44:
++YYCURSOR;
yy45:
-#line 75 "../src/conf/parse_opts.re"
+#line 77 "../src/conf/parse_opts.re"
{
error ("bad warning: %s", *argv);
return EXIT_FAIL;
}
-#line 244 "src/conf/parse_opts.cc"
+#line 246 "src/conf/parse_opts.cc"
yy46:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'o') goto yy162;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy52;
++YYCURSOR;
-#line 84 "../src/conf/parse_opts.re"
+#line 86 "../src/conf/parse_opts.re"
{ warn.set (Warn::UNREACHABLE_RULES, option); goto opt; }
-#line 313 "src/conf/parse_opts.cc"
+#line 315 "src/conf/parse_opts.cc"
yy72:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'f') goto yy52;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy52;
++YYCURSOR;
-#line 83 "../src/conf/parse_opts.re"
+#line 85 "../src/conf/parse_opts.re"
{ warn.set (Warn::UNDEFINED_CONTROL_FLOW, option); goto opt; }
-#line 356 "src/conf/parse_opts.cc"
+#line 358 "src/conf/parse_opts.cc"
yy93:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'l') goto yy52;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy52;
++YYCURSOR;
-#line 85 "../src/conf/parse_opts.re"
+#line 87 "../src/conf/parse_opts.re"
{ warn.set (Warn::USELESS_ESCAPE, option); goto opt; }
-#line 385 "src/conf/parse_opts.cc"
+#line 387 "src/conf/parse_opts.cc"
yy107:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'a') goto yy52;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy52;
++YYCURSOR;
-#line 82 "../src/conf/parse_opts.re"
+#line 84 "../src/conf/parse_opts.re"
{ warn.set (Warn::SWAPPED_RANGE, option); goto opt; }
-#line 414 "src/conf/parse_opts.cc"
+#line 416 "src/conf/parse_opts.cc"
yy121:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 't') goto yy52;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy52;
++YYCURSOR;
-#line 81 "../src/conf/parse_opts.re"
+#line 83 "../src/conf/parse_opts.re"
{ warn.set (Warn::MATCH_EMPTY_STRING, option); goto opt; }
-#line 453 "src/conf/parse_opts.cc"
+#line 455 "src/conf/parse_opts.cc"
yy140:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'p') goto yy52;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy52;
++YYCURSOR;
-#line 80 "../src/conf/parse_opts.re"
+#line 82 "../src/conf/parse_opts.re"
{ warn.set (Warn::EMPTY_CHARACTER_CLASS, option); goto opt; }
-#line 498 "src/conf/parse_opts.cc"
+#line 500 "src/conf/parse_opts.cc"
yy162:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'n') goto yy52;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy52;
++YYCURSOR;
-#line 79 "../src/conf/parse_opts.re"
+#line 81 "../src/conf/parse_opts.re"
{ warn.set (Warn::CONDITION_ORDER, option); goto opt; }
-#line 531 "src/conf/parse_opts.cc"
+#line 533 "src/conf/parse_opts.cc"
}
-#line 86 "../src/conf/parse_opts.re"
+#line 88 "../src/conf/parse_opts.re"
opt_short:
-#line 538 "src/conf/parse_opts.cc"
+#line 540 "src/conf/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
}
yy180:
++YYCURSOR;
-#line 95 "../src/conf/parse_opts.re"
+#line 97 "../src/conf/parse_opts.re"
{ goto opt; }
-#line 608 "src/conf/parse_opts.cc"
+#line 610 "src/conf/parse_opts.cc"
yy182:
++YYCURSOR;
-#line 91 "../src/conf/parse_opts.re"
+#line 93 "../src/conf/parse_opts.re"
{
error ("bad short option: %s", *argv);
return EXIT_FAIL;
}
-#line 616 "src/conf/parse_opts.cc"
+#line 618 "src/conf/parse_opts.cc"
yy184:
++YYCURSOR;
-#line 119 "../src/conf/parse_opts.re"
+#line 121 "../src/conf/parse_opts.re"
{ goto opt_short; }
-#line 621 "src/conf/parse_opts.cc"
+#line 623 "src/conf/parse_opts.cc"
yy186:
++YYCURSOR;
-#line 114 "../src/conf/parse_opts.re"
+#line 116 "../src/conf/parse_opts.re"
{ if (!opts.set_encoding (Enc::UTF8)) { error_encoding (); return EXIT_FAIL; } goto opt_short; }
-#line 626 "src/conf/parse_opts.cc"
+#line 628 "src/conf/parse_opts.cc"
yy188:
++YYCURSOR;
-#line 96 "../src/conf/parse_opts.re"
+#line 98 "../src/conf/parse_opts.re"
{ usage (); return EXIT_OK; }
-#line 631 "src/conf/parse_opts.cc"
+#line 633 "src/conf/parse_opts.cc"
yy190:
++YYCURSOR;
-#line 102 "../src/conf/parse_opts.re"
+#line 104 "../src/conf/parse_opts.re"
{ opts.set_target (opt_t::DOT); goto opt_short; }
-#line 636 "src/conf/parse_opts.cc"
+#line 638 "src/conf/parse_opts.cc"
yy192:
++YYCURSOR;
-#line 104 "../src/conf/parse_opts.re"
+#line 106 "../src/conf/parse_opts.re"
{ opts.set_FFlag (true); goto opt_short; }
-#line 641 "src/conf/parse_opts.cc"
+#line 643 "src/conf/parse_opts.cc"
yy194:
++YYCURSOR;
-#line 109 "../src/conf/parse_opts.re"
+#line 111 "../src/conf/parse_opts.re"
{ opts.set_target (opt_t::SKELETON); goto opt_short; }
-#line 646 "src/conf/parse_opts.cc"
+#line 648 "src/conf/parse_opts.cc"
yy196:
++YYCURSOR;
-#line 98 "../src/conf/parse_opts.re"
+#line 100 "../src/conf/parse_opts.re"
{ vernum (); return EXIT_OK; }
-#line 651 "src/conf/parse_opts.cc"
+#line 653 "src/conf/parse_opts.cc"
yy198:
++YYCURSOR;
-#line 99 "../src/conf/parse_opts.re"
+#line 101 "../src/conf/parse_opts.re"
{ opts.set_bFlag (true); goto opt_short; }
-#line 656 "src/conf/parse_opts.cc"
+#line 658 "src/conf/parse_opts.cc"
yy200:
++YYCURSOR;
-#line 100 "../src/conf/parse_opts.re"
+#line 102 "../src/conf/parse_opts.re"
{ opts.set_cFlag (true); goto opt_short; }
-#line 661 "src/conf/parse_opts.cc"
+#line 663 "src/conf/parse_opts.cc"
yy202:
++YYCURSOR;
-#line 101 "../src/conf/parse_opts.re"
+#line 103 "../src/conf/parse_opts.re"
{ opts.set_dFlag (true); goto opt_short; }
-#line 666 "src/conf/parse_opts.cc"
+#line 668 "src/conf/parse_opts.cc"
yy204:
++YYCURSOR;
-#line 110 "../src/conf/parse_opts.re"
+#line 112 "../src/conf/parse_opts.re"
{ if (!opts.set_encoding (Enc::EBCDIC)) { error_encoding (); return EXIT_FAIL; } goto opt_short; }
-#line 671 "src/conf/parse_opts.cc"
+#line 673 "src/conf/parse_opts.cc"
yy206:
++YYCURSOR;
-#line 103 "../src/conf/parse_opts.re"
+#line 105 "../src/conf/parse_opts.re"
{ opts.set_fFlag (true); goto opt_short; }
-#line 676 "src/conf/parse_opts.cc"
+#line 678 "src/conf/parse_opts.cc"
yy208:
++YYCURSOR;
-#line 105 "../src/conf/parse_opts.re"
+#line 107 "../src/conf/parse_opts.re"
{ opts.set_gFlag (true); goto opt_short; }
-#line 681 "src/conf/parse_opts.cc"
+#line 683 "src/conf/parse_opts.cc"
yy210:
++YYCURSOR;
-#line 106 "../src/conf/parse_opts.re"
+#line 108 "../src/conf/parse_opts.re"
{ opts.set_iFlag (true); goto opt_short; }
-#line 686 "src/conf/parse_opts.cc"
+#line 688 "src/conf/parse_opts.cc"
yy212:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) <= 0x00) goto yy230;
-#line 116 "../src/conf/parse_opts.re"
+#line 118 "../src/conf/parse_opts.re"
{ *argv = YYCURSOR; goto opt_output; }
-#line 692 "src/conf/parse_opts.cc"
+#line 694 "src/conf/parse_opts.cc"
yy214:
++YYCURSOR;
-#line 107 "../src/conf/parse_opts.re"
+#line 109 "../src/conf/parse_opts.re"
{ opts.set_rFlag (true); goto opt_short; }
-#line 697 "src/conf/parse_opts.cc"
+#line 699 "src/conf/parse_opts.cc"
yy216:
++YYCURSOR;
-#line 108 "../src/conf/parse_opts.re"
+#line 110 "../src/conf/parse_opts.re"
{ opts.set_sFlag (true); goto opt_short; }
-#line 702 "src/conf/parse_opts.cc"
+#line 704 "src/conf/parse_opts.cc"
yy218:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) <= 0x00) goto yy228;
-#line 118 "../src/conf/parse_opts.re"
+#line 120 "../src/conf/parse_opts.re"
{ *argv = YYCURSOR; goto opt_header; }
-#line 708 "src/conf/parse_opts.cc"
+#line 710 "src/conf/parse_opts.cc"
yy220:
++YYCURSOR;
-#line 111 "../src/conf/parse_opts.re"
+#line 113 "../src/conf/parse_opts.re"
{ if (!opts.set_encoding (Enc::UTF32)) { error_encoding (); return EXIT_FAIL; } goto opt_short; }
-#line 713 "src/conf/parse_opts.cc"
+#line 715 "src/conf/parse_opts.cc"
yy222:
++YYCURSOR;
-#line 97 "../src/conf/parse_opts.re"
+#line 99 "../src/conf/parse_opts.re"
{ version (); return EXIT_OK; }
-#line 718 "src/conf/parse_opts.cc"
+#line 720 "src/conf/parse_opts.cc"
yy224:
++YYCURSOR;
-#line 112 "../src/conf/parse_opts.re"
+#line 114 "../src/conf/parse_opts.re"
{ if (!opts.set_encoding (Enc::UCS2)) { error_encoding (); return EXIT_FAIL; } goto opt_short; }
-#line 723 "src/conf/parse_opts.cc"
+#line 725 "src/conf/parse_opts.cc"
yy226:
++YYCURSOR;
-#line 113 "../src/conf/parse_opts.re"
+#line 115 "../src/conf/parse_opts.re"
{ if (!opts.set_encoding (Enc::UTF16)) { error_encoding (); return EXIT_FAIL; } goto opt_short; }
-#line 728 "src/conf/parse_opts.cc"
+#line 730 "src/conf/parse_opts.cc"
yy228:
++YYCURSOR;
-#line 117 "../src/conf/parse_opts.re"
+#line 119 "../src/conf/parse_opts.re"
{ if (!next (YYCURSOR, argv)) { error_arg ("-t, --type-header"); return EXIT_FAIL; } goto opt_header; }
-#line 733 "src/conf/parse_opts.cc"
+#line 735 "src/conf/parse_opts.cc"
yy230:
++YYCURSOR;
-#line 115 "../src/conf/parse_opts.re"
+#line 117 "../src/conf/parse_opts.re"
{ if (!next (YYCURSOR, argv)) { error_arg ("-o, --output"); return EXIT_FAIL; } goto opt_output; }
-#line 738 "src/conf/parse_opts.cc"
+#line 740 "src/conf/parse_opts.cc"
}
-#line 120 "../src/conf/parse_opts.re"
+#line 122 "../src/conf/parse_opts.re"
opt_long:
-#line 745 "src/conf/parse_opts.cc"
+#line 747 "src/conf/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
yy234:
++YYCURSOR;
yy235:
-#line 125 "../src/conf/parse_opts.re"
+#line 127 "../src/conf/parse_opts.re"
{
error ("bad long option: %s", *argv);
return EXIT_FAIL;
}
-#line 775 "src/conf/parse_opts.cc"
+#line 777 "src/conf/parse_opts.cc"
yy236:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'i') goto yy541;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 149 "../src/conf/parse_opts.re"
+#line 151 "../src/conf/parse_opts.re"
{ if (!opts.set_encoding (Enc::UCS2)) { error_encoding (); return EXIT_FAIL; } goto opt; }
-#line 875 "src/conf/parse_opts.cc"
+#line 877 "src/conf/parse_opts.cc"
yy263:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'r') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 130 "../src/conf/parse_opts.re"
+#line 132 "../src/conf/parse_opts.re"
{ version (); return EXIT_OK; }
-#line 899 "src/conf/parse_opts.cc"
+#line 901 "src/conf/parse_opts.cc"
yy272:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'm') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 131 "../src/conf/parse_opts.re"
+#line 133 "../src/conf/parse_opts.re"
{ vernum (); return EXIT_OK; }
-#line 908 "src/conf/parse_opts.cc"
+#line 910 "src/conf/parse_opts.cc"
yy276:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'f') goto yy285;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 148 "../src/conf/parse_opts.re"
+#line 150 "../src/conf/parse_opts.re"
{ if (!opts.set_encoding (Enc::UTF32)) { error_encoding (); return EXIT_FAIL; } goto opt; }
-#line 929 "src/conf/parse_opts.cc"
+#line 931 "src/conf/parse_opts.cc"
yy285:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '-') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 151 "../src/conf/parse_opts.re"
+#line 153 "../src/conf/parse_opts.re"
{ if (!opts.set_encoding (Enc::UTF8)) { error_encoding (); return EXIT_FAIL; } goto opt; }
-#line 947 "src/conf/parse_opts.cc"
+#line 949 "src/conf/parse_opts.cc"
yy291:
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 150 "../src/conf/parse_opts.re"
+#line 152 "../src/conf/parse_opts.re"
{ if (!opts.set_encoding (Enc::UTF16)) { error_encoding (); return EXIT_FAIL; } goto opt; }
-#line 954 "src/conf/parse_opts.cc"
+#line 956 "src/conf/parse_opts.cc"
yy294:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'p') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 153 "../src/conf/parse_opts.re"
+#line 155 "../src/conf/parse_opts.re"
{ if (!next (YYCURSOR, argv)) { error_arg ("-t, --type-header"); return EXIT_FAIL; } goto opt_header; }
-#line 979 "src/conf/parse_opts.cc"
+#line 981 "src/conf/parse_opts.cc"
yy306:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'n') goto yy347;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 136 "../src/conf/parse_opts.re"
+#line 138 "../src/conf/parse_opts.re"
{ opts.set_fFlag (true); goto opt; }
-#line 1025 "src/conf/parse_opts.cc"
+#line 1027 "src/conf/parse_opts.cc"
yy324:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 't') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 133 "../src/conf/parse_opts.re"
+#line 135 "../src/conf/parse_opts.re"
{ opts.set_cFlag (true); goto opt; }
-#line 1056 "src/conf/parse_opts.cc"
+#line 1058 "src/conf/parse_opts.cc"
yy339:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'l') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 146 "../src/conf/parse_opts.re"
+#line 148 "../src/conf/parse_opts.re"
{ opts.set_target (opt_t::SKELETON); goto opt; }
-#line 1073 "src/conf/parse_opts.cc"
+#line 1075 "src/conf/parse_opts.cc"
yy347:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'g') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 157 "../src/conf/parse_opts.re"
+#line 159 "../src/conf/parse_opts.re"
{ goto opt; }
-#line 1096 "src/conf/parse_opts.cc"
+#line 1098 "src/conf/parse_opts.cc"
yy358:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'u') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 140 "../src/conf/parse_opts.re"
+#line 142 "../src/conf/parse_opts.re"
{ opts.set_rFlag (true); goto opt; }
-#line 1115 "src/conf/parse_opts.cc"
+#line 1117 "src/conf/parse_opts.cc"
yy367:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 't') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 152 "../src/conf/parse_opts.re"
+#line 154 "../src/conf/parse_opts.re"
{ if (!next (YYCURSOR, argv)) { error_arg ("-o, --output"); return EXIT_FAIL; } goto opt_output; }
-#line 1130 "src/conf/parse_opts.cc"
+#line 1132 "src/conf/parse_opts.cc"
yy374:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '-') goto yy386;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 141 "../src/conf/parse_opts.re"
+#line 143 "../src/conf/parse_opts.re"
{ opts.set_sFlag (true); goto opt; }
-#line 1157 "src/conf/parse_opts.cc"
+#line 1159 "src/conf/parse_opts.cc"
yy386:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 'f') {
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 139 "../src/conf/parse_opts.re"
+#line 141 "../src/conf/parse_opts.re"
{ opts.set_iFlag (true); goto opt; }
-#line 1198 "src/conf/parse_opts.cc"
+#line 1200 "src/conf/parse_opts.cc"
yy401:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'n') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 142 "../src/conf/parse_opts.re"
+#line 144 "../src/conf/parse_opts.re"
{ opts.set_bNoGenerationDate (true); goto opt; }
-#line 1231 "src/conf/parse_opts.cc"
+#line 1233 "src/conf/parse_opts.cc"
yy417:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'r') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 143 "../src/conf/parse_opts.re"
+#line 145 "../src/conf/parse_opts.re"
{ opts.set_version (false); goto opt; }
-#line 1248 "src/conf/parse_opts.cc"
+#line 1250 "src/conf/parse_opts.cc"
yy425:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'p') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 155 "../src/conf/parse_opts.re"
+#line 157 "../src/conf/parse_opts.re"
{ goto opt_input; }
-#line 1261 "src/conf/parse_opts.cc"
+#line 1263 "src/conf/parse_opts.cc"
yy431:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'l') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 129 "../src/conf/parse_opts.re"
+#line 131 "../src/conf/parse_opts.re"
{ usage (); return EXIT_OK; }
-#line 1272 "src/conf/parse_opts.cc"
+#line 1274 "src/conf/parse_opts.cc"
yy436:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'e') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 137 "../src/conf/parse_opts.re"
+#line 139 "../src/conf/parse_opts.re"
{ opts.set_FFlag (true); goto opt; }
-#line 1297 "src/conf/parse_opts.cc"
+#line 1299 "src/conf/parse_opts.cc"
yy448:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'i') goto yy469;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 147 "../src/conf/parse_opts.re"
+#line 149 "../src/conf/parse_opts.re"
{ if (!opts.set_encoding (Enc::EBCDIC)) { error_encoding (); return EXIT_FAIL; } goto opt; }
-#line 1315 "src/conf/parse_opts.cc"
+#line 1317 "src/conf/parse_opts.cc"
yy454:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'o') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 154 "../src/conf/parse_opts.re"
+#line 156 "../src/conf/parse_opts.re"
{ goto opt_encoding_policy; }
-#line 1346 "src/conf/parse_opts.cc"
+#line 1348 "src/conf/parse_opts.cc"
yy469:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 't') goto yy481;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 156 "../src/conf/parse_opts.re"
+#line 158 "../src/conf/parse_opts.re"
{ goto opt_empty_class; }
-#line 1373 "src/conf/parse_opts.cc"
+#line 1375 "src/conf/parse_opts.cc"
yy481:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '-') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 135 "../src/conf/parse_opts.re"
+#line 137 "../src/conf/parse_opts.re"
{ opts.set_target (opt_t::DOT); goto opt; }
-#line 1388 "src/conf/parse_opts.cc"
+#line 1390 "src/conf/parse_opts.cc"
yy488:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'b') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 134 "../src/conf/parse_opts.re"
+#line 136 "../src/conf/parse_opts.re"
{ opts.set_dFlag (true); goto opt; }
-#line 1415 "src/conf/parse_opts.cc"
+#line 1417 "src/conf/parse_opts.cc"
yy501:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 's') goto yy517;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 138 "../src/conf/parse_opts.re"
+#line 140 "../src/conf/parse_opts.re"
{ opts.set_gFlag (true); goto opt; }
-#line 1450 "src/conf/parse_opts.cc"
+#line 1452 "src/conf/parse_opts.cc"
yy517:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'e') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 144 "../src/conf/parse_opts.re"
+#line 146 "../src/conf/parse_opts.re"
{ opts.set_bCaseInsensitive (true); goto opt; }
-#line 1488 "src/conf/parse_opts.cc"
+#line 1490 "src/conf/parse_opts.cc"
yy534:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'r') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 145 "../src/conf/parse_opts.re"
+#line 147 "../src/conf/parse_opts.re"
{ opts.set_bCaseInverted (true); goto opt; }
-#line 1503 "src/conf/parse_opts.cc"
+#line 1505 "src/conf/parse_opts.cc"
yy541:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 't') goto yy252;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy252;
++YYCURSOR;
-#line 132 "../src/conf/parse_opts.re"
+#line 134 "../src/conf/parse_opts.re"
{ opts.set_bFlag (true); goto opt; }
-#line 1528 "src/conf/parse_opts.cc"
+#line 1530 "src/conf/parse_opts.cc"
}
-#line 158 "../src/conf/parse_opts.re"
+#line 160 "../src/conf/parse_opts.re"
opt_output:
-#line 1535 "src/conf/parse_opts.cc"
+#line 1537 "src/conf/parse_opts.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
if (yych != '-') goto yy557;
yy555:
++YYCURSOR;
-#line 163 "../src/conf/parse_opts.re"
+#line 165 "../src/conf/parse_opts.re"
{
error ("bad argument to option -o, --output: %s", *argv);
return EXIT_FAIL;
}
-#line 1582 "src/conf/parse_opts.cc"
+#line 1584 "src/conf/parse_opts.cc"
yy557:
yych = (YYCTYPE)*++YYCURSOR;
goto yy559;
goto yy558;
}
++YYCURSOR;
-#line 167 "../src/conf/parse_opts.re"
+#line 169 "../src/conf/parse_opts.re"
{ if (!opts.output (*argv)) return EXIT_FAIL; goto opt; }
-#line 1596 "src/conf/parse_opts.cc"
+#line 1598 "src/conf/parse_opts.cc"
}
-#line 168 "../src/conf/parse_opts.re"
+#line 170 "../src/conf/parse_opts.re"
opt_header:
-#line 1603 "src/conf/parse_opts.cc"
+#line 1605 "src/conf/parse_opts.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
if (yych != '-') goto yy566;
yy564:
++YYCURSOR;
-#line 173 "../src/conf/parse_opts.re"
+#line 175 "../src/conf/parse_opts.re"
{
error ("bad argument to option -t, --type-header: %s", *argv);
return EXIT_FAIL;
}
-#line 1650 "src/conf/parse_opts.cc"
+#line 1652 "src/conf/parse_opts.cc"
yy566:
yych = (YYCTYPE)*++YYCURSOR;
goto yy568;
goto yy567;
}
++YYCURSOR;
-#line 177 "../src/conf/parse_opts.re"
+#line 179 "../src/conf/parse_opts.re"
{ opts.set_header_file (*argv); goto opt; }
-#line 1664 "src/conf/parse_opts.cc"
+#line 1666 "src/conf/parse_opts.cc"
}
-#line 178 "../src/conf/parse_opts.re"
+#line 180 "../src/conf/parse_opts.re"
opt_encoding_policy:
return EXIT_FAIL;
}
-#line 1676 "src/conf/parse_opts.cc"
+#line 1678 "src/conf/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
}
++YYCURSOR;
yy574:
-#line 188 "../src/conf/parse_opts.re"
+#line 190 "../src/conf/parse_opts.re"
{
error ("bad argument to option --encoding-policy (expected: ignore | substitute | fail): %s", *argv);
return EXIT_FAIL;
}
-#line 1693 "src/conf/parse_opts.cc"
+#line 1695 "src/conf/parse_opts.cc"
yy575:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'a') goto yy597;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy579;
++YYCURSOR;
-#line 193 "../src/conf/parse_opts.re"
+#line 195 "../src/conf/parse_opts.re"
{ opts.set_encoding_policy (Enc::POLICY_SUBSTITUTE); goto opt; }
-#line 1730 "src/conf/parse_opts.cc"
+#line 1732 "src/conf/parse_opts.cc"
yy590:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'n') goto yy579;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy579;
++YYCURSOR;
-#line 192 "../src/conf/parse_opts.re"
+#line 194 "../src/conf/parse_opts.re"
{ opts.set_encoding_policy (Enc::POLICY_IGNORE); goto opt; }
-#line 1745 "src/conf/parse_opts.cc"
+#line 1747 "src/conf/parse_opts.cc"
yy597:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'i') goto yy579;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy579;
++YYCURSOR;
-#line 194 "../src/conf/parse_opts.re"
+#line 196 "../src/conf/parse_opts.re"
{ opts.set_encoding_policy (Enc::POLICY_FAIL); goto opt; }
-#line 1756 "src/conf/parse_opts.cc"
+#line 1758 "src/conf/parse_opts.cc"
}
-#line 195 "../src/conf/parse_opts.re"
+#line 197 "../src/conf/parse_opts.re"
opt_input:
return EXIT_FAIL;
}
-#line 1768 "src/conf/parse_opts.cc"
+#line 1770 "src/conf/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
yy604:
++YYCURSOR;
yy605:
-#line 205 "../src/conf/parse_opts.re"
+#line 207 "../src/conf/parse_opts.re"
{
error ("bad argument to option --input (expected: default | custom): %s", *argv);
return EXIT_FAIL;
}
-#line 1783 "src/conf/parse_opts.cc"
+#line 1785 "src/conf/parse_opts.cc"
yy606:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'u') goto yy617;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy609;
++YYCURSOR;
-#line 209 "../src/conf/parse_opts.re"
+#line 211 "../src/conf/parse_opts.re"
{ opts.set_input_api (InputAPI::DEFAULT); goto opt; }
-#line 1810 "src/conf/parse_opts.cc"
+#line 1812 "src/conf/parse_opts.cc"
yy617:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 's') goto yy609;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy609;
++YYCURSOR;
-#line 210 "../src/conf/parse_opts.re"
+#line 212 "../src/conf/parse_opts.re"
{ opts.set_input_api (InputAPI::CUSTOM); goto opt; }
-#line 1825 "src/conf/parse_opts.cc"
+#line 1827 "src/conf/parse_opts.cc"
}
-#line 211 "../src/conf/parse_opts.re"
+#line 213 "../src/conf/parse_opts.re"
opt_empty_class:
return EXIT_FAIL;
}
-#line 1837 "src/conf/parse_opts.cc"
+#line 1839 "src/conf/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
if (yych == 'm') goto yy629;
++YYCURSOR;
yy627:
-#line 221 "../src/conf/parse_opts.re"
+#line 223 "../src/conf/parse_opts.re"
{
error ("bad argument to option --empty-class (expected: match-empty | match-none | error): %s", *argv);
return EXIT_FAIL;
}
-#line 1850 "src/conf/parse_opts.cc"
+#line 1852 "src/conf/parse_opts.cc"
yy628:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'r') goto yy649;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy631;
++YYCURSOR;
-#line 226 "../src/conf/parse_opts.re"
+#line 228 "../src/conf/parse_opts.re"
{ opts.set_empty_class_policy (EMPTY_CLASS_MATCH_NONE); goto opt; }
-#line 1890 "src/conf/parse_opts.cc"
+#line 1892 "src/conf/parse_opts.cc"
yy643:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'p') goto yy631;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy631;
++YYCURSOR;
-#line 225 "../src/conf/parse_opts.re"
+#line 227 "../src/conf/parse_opts.re"
{ opts.set_empty_class_policy (EMPTY_CLASS_MATCH_EMPTY); goto opt; }
-#line 1903 "src/conf/parse_opts.cc"
+#line 1905 "src/conf/parse_opts.cc"
yy649:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'r') goto yy631;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy631;
++YYCURSOR;
-#line 227 "../src/conf/parse_opts.re"
+#line 229 "../src/conf/parse_opts.re"
{ opts.set_empty_class_policy (EMPTY_CLASS_ERROR); goto opt; }
-#line 1916 "src/conf/parse_opts.cc"
+#line 1918 "src/conf/parse_opts.cc"
}
-#line 228 "../src/conf/parse_opts.re"
+#line 230 "../src/conf/parse_opts.re"
end:
-/* Generated by re2c 0.15.2 on Tue Dec 1 12:58:01 2015 */
+/* Generated by re2c 0.15.2 on Tue Dec 1 15:54:14 2015 */
#line 1 "../src/parse/lex.re"
-#include <stdlib.h>
+#include "src/util/c99_stdint.h"
+#include <stddef.h>
#include <string.h>
-#include <iostream>
+#include <algorithm>
#include <limits>
-#include <sstream>
+#include <string>
-#include "src/ir/dfa/dfa.h"
-#include "src/ir/regexp/regexp_null.h"
+#include "src/codegen/output.h"
+#include "src/conf/opt.h"
+#include "src/conf/warn.h"
#include "src/globals.h"
+#include "src/ir/regexp/encoding/enc.h"
+#include "src/ir/regexp/regexp.h"
+#include "src/ir/regexp/regexp_null.h"
+#include "src/parse/code.h"
#include "src/parse/extop.h"
-#include "src/parse/parser.h"
+#include "src/parse/input.h"
#include "src/parse/scanner.h"
+#include "src/parse/parser.h" // needed by "y.tab.h"
#include "src/parse/unescape.h"
-#include "y.tab.h"
+#include "src/util/range.h"
#include "src/util/s_to_n32_unsafe.h"
+#include "y.tab.h"
extern YYSTYPE yylval;
// source code is in ASCII: pointers have type 'char *'
// but re2c makes an implicit assumption that YYCTYPE is unsigned
// when it generates comparisons
-#line 34 "../src/parse/lex.re"
+#line 42 "../src/parse/lex.re"
-#line 54 "../src/parse/lex.re"
+#line 62 "../src/parse/lex.re"
Scanner::ParseMode Scanner::echo()
tok = cur;
echo:
-#line 54 "src/parse/lex.cc"
+#line 62 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
}
++YYCURSOR;
-#line 194 "../src/parse/lex.re"
+#line 202 "../src/parse/lex.re"
{
if (!ignore_eoc && opts->target == opt_t::CODE)
{
return Stop;
}
}
-#line 124 "src/parse/lex.cc"
+#line 132 "src/parse/lex.cc"
yy4:
++YYCURSOR;
yy5:
-#line 205 "../src/parse/lex.re"
+#line 213 "../src/parse/lex.re"
{
goto echo;
}
-#line 132 "src/parse/lex.cc"
+#line 140 "src/parse/lex.cc"
yy6:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
if (yych == '#') goto yy91;
yy7:
-#line 181 "../src/parse/lex.re"
+#line 189 "../src/parse/lex.re"
{
if (ignore_eoc)
{
cline++;
goto echo;
}
-#line 155 "src/parse/lex.cc"
+#line 163 "src/parse/lex.cc"
yy8:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '{') goto yy32;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 85 "../src/parse/lex.re"
+#line 93 "../src/parse/lex.re"
{
if (opts->rFlag)
{
tok = cur;
return Rules;
}
-#line 252 "src/parse/lex.cc"
+#line 260 "src/parse/lex.cc"
yy31:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
yy32:
++YYCURSOR;
-#line 70 "../src/parse/lex.re"
+#line 78 "../src/parse/lex.re"
{
if (opts->rFlag)
{
tok = cur;
return Parse;
}
-#line 274 "src/parse/lex.cc"
+#line 282 "src/parse/lex.cc"
yy34:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'e') goto yy12;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 97 "../src/parse/lex.re"
+#line 105 "../src/parse/lex.re"
{
if (!opts->rFlag)
{
tok = cur;
return Reuse;
}
-#line 304 "src/parse/lex.cc"
+#line 312 "src/parse/lex.cc"
yy42:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'x') goto yy12;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 111 "../src/parse/lex.re"
+#line 119 "../src/parse/lex.re"
{
if (opts->target != opt_t::DOT)
{
ignore_eoc = true;
goto echo;
}
-#line 329 "src/parse/lex.cc"
+#line 337 "src/parse/lex.cc"
yy50:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 't') goto yy12;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 120 "../src/parse/lex.re"
+#line 128 "../src/parse/lex.re"
{
tok = pos = cur;
out.wdelay_state_goto (opts->topIndent);
ignore_eoc = true;
goto echo;
}
-#line 361 "src/parse/lex.cc"
+#line 369 "src/parse/lex.cc"
yy63:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'n') goto yy12;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 126 "../src/parse/lex.re"
+#line 134 "../src/parse/lex.re"
{
tok = pos = cur;
ignore_eoc = true;
goto echo;
}
-#line 388 "src/parse/lex.cc"
+#line 396 "src/parse/lex.cc"
yy74:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'p') goto yy12;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 131 "../src/parse/lex.re"
+#line 139 "../src/parse/lex.re"
{
tok = pos = cur;
ignore_eoc = true;
}
goto echo;
}
-#line 419 "src/parse/lex.cc"
+#line 427 "src/parse/lex.cc"
yy84:
yyaccept = 2;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '\n') goto yy87;
if (yych == '\r') goto yy86;
yy85:
-#line 160 "../src/parse/lex.re"
+#line 168 "../src/parse/lex.re"
{
if (ignore_eoc)
{
tok = pos = cur;
goto echo;
}
-#line 444 "src/parse/lex.cc"
+#line 452 "src/parse/lex.cc"
yy86:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '\n') goto yy12;
yy87:
++YYCURSOR;
-#line 142 "../src/parse/lex.re"
+#line 150 "../src/parse/lex.re"
{
cline++;
if (ignore_eoc)
tok = pos = cur;
goto echo;
}
-#line 469 "src/parse/lex.cc"
+#line 477 "src/parse/lex.cc"
yy89:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy103:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 177 "../src/parse/lex.re"
+#line 185 "../src/parse/lex.re"
{
set_sourceline ();
goto echo;
}
-#line 549 "src/parse/lex.cc"
+#line 557 "src/parse/lex.cc"
yy105:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy103;
if (yych == '\r') goto yy105;
goto yy12;
}
-#line 208 "../src/parse/lex.re"
+#line 216 "../src/parse/lex.re"
}
start:
-#line 594 "src/parse/lex.cc"
+#line 602 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
yy112:
++YYCURSOR;
yy113:
-#line 380 "../src/parse/lex.re"
+#line 388 "../src/parse/lex.re"
{
fatalf("unexpected character: '%c'", *tok);
goto scan;
}
-#line 714 "src/parse/lex.cc"
+#line 722 "src/parse/lex.cc"
yy114:
++YYCURSOR;
yych = (YYCTYPE)*YYCURSOR;
goto yy220;
yy115:
-#line 364 "../src/parse/lex.re"
+#line 372 "../src/parse/lex.re"
{
goto scan;
}
-#line 724 "src/parse/lex.cc"
+#line 732 "src/parse/lex.cc"
yy116:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '#') goto yy200;
}
yy117:
-#line 373 "../src/parse/lex.re"
+#line 381 "../src/parse/lex.re"
{
if (cur == eof) return 0;
pos = cur;
cline++;
goto scan;
}
-#line 742 "src/parse/lex.cc"
+#line 750 "src/parse/lex.cc"
yy118:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy197;
goto yy113;
yy119:
++YYCURSOR;
-#line 257 "../src/parse/lex.re"
+#line 265 "../src/parse/lex.re"
{ yylval.regexp = lex_str('"', opts->bCaseInsensitive || opts->bCaseInverted); return TOKEN_REGEXP; }
-#line 751 "src/parse/lex.cc"
+#line 759 "src/parse/lex.cc"
yy121:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '}') goto yy195;
goto yy113;
yy122:
++YYCURSOR;
-#line 256 "../src/parse/lex.re"
+#line 264 "../src/parse/lex.re"
{ yylval.regexp = lex_str('\'', opts->bCaseInsensitive || !opts->bCaseInverted); return TOKEN_REGEXP; }
-#line 760 "src/parse/lex.cc"
+#line 768 "src/parse/lex.cc"
yy124:
++YYCURSOR;
yy125:
-#line 267 "../src/parse/lex.re"
+#line 275 "../src/parse/lex.re"
{
return *tok;
}
-#line 768 "src/parse/lex.cc"
+#line 776 "src/parse/lex.cc"
yy126:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '/') goto yy195;
-#line 271 "../src/parse/lex.re"
+#line 279 "../src/parse/lex.re"
{
yylval.op = *tok;
return TOKEN_STAR;
}
-#line 777 "src/parse/lex.cc"
+#line 785 "src/parse/lex.cc"
yy128:
++YYCURSOR;
-#line 275 "../src/parse/lex.re"
+#line 283 "../src/parse/lex.re"
{
yylval.op = *tok;
return TOKEN_CLOSE;
}
-#line 785 "src/parse/lex.cc"
+#line 793 "src/parse/lex.cc"
yy130:
++YYCURSOR;
-#line 359 "../src/parse/lex.re"
+#line 367 "../src/parse/lex.re"
{
yylval.regexp = mkDot();
return TOKEN_REGEXP;
}
-#line 793 "src/parse/lex.cc"
+#line 801 "src/parse/lex.cc"
yy132:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '*') goto yy191;
yy136:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '^') goto yy176;
-#line 258 "../src/parse/lex.re"
+#line 266 "../src/parse/lex.re"
{ yylval.regexp = lex_cls(false); return TOKEN_REGEXP; }
-#line 819 "src/parse/lex.cc"
+#line 827 "src/parse/lex.cc"
yy138:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
}
}
yy140:
-#line 227 "../src/parse/lex.re"
+#line 235 "../src/parse/lex.re"
{
depth = 1;
goto code;
}
-#line 848 "src/parse/lex.cc"
+#line 856 "src/parse/lex.cc"
yy141:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yy146:
++YYCURSOR;
yy147:
-#line 311 "../src/parse/lex.re"
+#line 319 "../src/parse/lex.re"
{
fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers");
}
-#line 901 "src/parse/lex.cc"
+#line 909 "src/parse/lex.cc"
yy148:
++YYCURSOR;
-#line 315 "../src/parse/lex.re"
+#line 323 "../src/parse/lex.re"
{
if (!opts->FFlag) {
fatal("curly braces for names only allowed with -F switch");
yylval.str = new std::string (tok + 1, tok_len () - 2); // -2 to omit braces
return TOKEN_ID;
}
-#line 912 "src/parse/lex.cc"
+#line 920 "src/parse/lex.cc"
yy150:
++YYCURSOR;
-#line 280 "../src/parse/lex.re"
+#line 288 "../src/parse/lex.re"
{
if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.extop.min))
{
yylval.extop.max = yylval.extop.min;
return TOKEN_CLOSESIZE;
}
-#line 924 "src/parse/lex.cc"
+#line 932 "src/parse/lex.cc"
yy152:
yyaccept = 3;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '9') goto yy155;
if (yych != '}') goto yy147;
++YYCURSOR;
-#line 302 "../src/parse/lex.re"
+#line 310 "../src/parse/lex.re"
{
if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.extop.min))
{
yylval.extop.max = std::numeric_limits<uint32_t>::max();
return TOKEN_CLOSESIZE;
}
-#line 941 "src/parse/lex.cc"
+#line 949 "src/parse/lex.cc"
yy155:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yych <= '9') goto yy155;
if (yych != '}') goto yy143;
++YYCURSOR;
-#line 289 "../src/parse/lex.re"
+#line 297 "../src/parse/lex.re"
{
const char * p = strchr (tok, ',');
if (!s_to_u32_unsafe (tok + 1, p, yylval.extop.min))
}
return TOKEN_CLOSESIZE;
}
-#line 963 "src/parse/lex.cc"
+#line 971 "src/parse/lex.cc"
yy159:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 343 "../src/parse/lex.re"
+#line 351 "../src/parse/lex.re"
{
if (!opts->FFlag) {
yylval.str = new std::string (tok, tok_len());
return TOKEN_REGEXP;
}
}
-#line 983 "src/parse/lex.cc"
+#line 991 "src/parse/lex.cc"
yy161:
yych = (YYCTYPE)*++YYCURSOR;
goto yy174;
++YYCURSOR;
yy163:
YYCURSOR = YYCTXMARKER;
-#line 338 "../src/parse/lex.re"
+#line 346 "../src/parse/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
return TOKEN_ID;
}
-#line 996 "src/parse/lex.cc"
+#line 1004 "src/parse/lex.cc"
yy164:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCTXMARKER = YYCURSOR;
if (yych != ':') goto yy165;
++YYCURSOR;
-#line 323 "../src/parse/lex.re"
+#line 331 "../src/parse/lex.re"
{ lex_conf (); return TOKEN_CONF; }
-#line 1043 "src/parse/lex.cc"
+#line 1051 "src/parse/lex.cc"
yy171:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 325 "../src/parse/lex.re"
+#line 333 "../src/parse/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
if (opts->FFlag)
return TOKEN_ID;
}
}
-#line 1060 "src/parse/lex.cc"
+#line 1068 "src/parse/lex.cc"
yy173:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy163;
yy176:
++YYCURSOR;
-#line 259 "../src/parse/lex.re"
+#line 267 "../src/parse/lex.re"
{ yylval.regexp = lex_cls(true); return TOKEN_REGEXP; }
-#line 1079 "src/parse/lex.cc"
+#line 1087 "src/parse/lex.cc"
yy178:
++YYCURSOR;
-#line 264 "../src/parse/lex.re"
+#line 272 "../src/parse/lex.re"
{
return TOKEN_SETUP;
}
-#line 1086 "src/parse/lex.cc"
+#line 1094 "src/parse/lex.cc"
yy180:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
yy183:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 261 "../src/parse/lex.re"
+#line 269 "../src/parse/lex.re"
{
return TOKEN_NOCOND;
}
-#line 1120 "src/parse/lex.cc"
+#line 1128 "src/parse/lex.cc"
yy185:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '>') goto yy183;
yy187:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '>') goto yy189;
-#line 236 "../src/parse/lex.re"
+#line 244 "../src/parse/lex.re"
{
tok += 2; /* skip ":=" */
depth = 0;
goto code;
}
-#line 1138 "src/parse/lex.cc"
+#line 1146 "src/parse/lex.cc"
yy189:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 232 "../src/parse/lex.re"
+#line 240 "../src/parse/lex.re"
{
return *tok;
}
-#line 1146 "src/parse/lex.cc"
+#line 1154 "src/parse/lex.cc"
yy191:
++YYCURSOR;
-#line 245 "../src/parse/lex.re"
+#line 253 "../src/parse/lex.re"
{
depth = 1;
goto comment;
}
-#line 1154 "src/parse/lex.cc"
+#line 1162 "src/parse/lex.cc"
yy193:
++YYCURSOR;
-#line 242 "../src/parse/lex.re"
+#line 250 "../src/parse/lex.re"
{
goto nextLine;
}
-#line 1161 "src/parse/lex.cc"
+#line 1169 "src/parse/lex.cc"
yy195:
++YYCURSOR;
-#line 251 "../src/parse/lex.re"
+#line 259 "../src/parse/lex.re"
{
tok = cur;
return 0;
}
-#line 1169 "src/parse/lex.cc"
+#line 1177 "src/parse/lex.cc"
yy197:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
yy212:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 368 "../src/parse/lex.re"
+#line 376 "../src/parse/lex.re"
{
set_sourceline ();
goto scan;
}
-#line 1267 "src/parse/lex.cc"
+#line 1275 "src/parse/lex.cc"
yy214:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy212;
if (yych == ' ') goto yy219;
goto yy115;
}
-#line 384 "../src/parse/lex.re"
+#line 392 "../src/parse/lex.re"
flex_name:
-#line 1305 "src/parse/lex.cc"
+#line 1313 "src/parse/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
if (yych == '\r') goto yy227;
++YYCURSOR;
yy224:
-#line 395 "../src/parse/lex.re"
+#line 403 "../src/parse/lex.re"
{
YYCURSOR = tok;
goto start;
}
-#line 1319 "src/parse/lex.cc"
+#line 1327 "src/parse/lex.cc"
yy225:
++YYCURSOR;
yy226:
-#line 389 "../src/parse/lex.re"
+#line 397 "../src/parse/lex.re"
{
YYCURSOR = tok;
lexer_state = LEX_NORMAL;
return TOKEN_FID_END;
}
-#line 1329 "src/parse/lex.cc"
+#line 1337 "src/parse/lex.cc"
yy227:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '\n') goto yy224;
yych = (YYCTYPE)*YYCURSOR;
goto yy226;
}
-#line 399 "../src/parse/lex.re"
+#line 407 "../src/parse/lex.re"
code:
-#line 1342 "src/parse/lex.cc"
+#line 1350 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
yy231:
++YYCURSOR;
-#line 462 "../src/parse/lex.re"
+#line 470 "../src/parse/lex.re"
{
if (cur == eof)
{
}
goto code;
}
-#line 1415 "src/parse/lex.cc"
+#line 1423 "src/parse/lex.cc"
yy233:
++YYCURSOR;
yy234:
-#line 476 "../src/parse/lex.re"
+#line 484 "../src/parse/lex.re"
{
goto code;
}
-#line 1423 "src/parse/lex.cc"
+#line 1431 "src/parse/lex.cc"
yy235:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
}
yy236:
-#line 443 "../src/parse/lex.re"
+#line 451 "../src/parse/lex.re"
{
if (depth == 0)
{
cline++;
goto code;
}
-#line 1463 "src/parse/lex.cc"
+#line 1471 "src/parse/lex.cc"
yy237:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
goto yy244;
yy239:
++YYCURSOR;
-#line 415 "../src/parse/lex.re"
+#line 423 "../src/parse/lex.re"
{
if (depth == 0)
{
}
goto code;
}
-#line 1488 "src/parse/lex.cc"
+#line 1496 "src/parse/lex.cc"
yy241:
++YYCURSOR;
-#line 403 "../src/parse/lex.re"
+#line 411 "../src/parse/lex.re"
{
if (depth == 0)
{
}
goto code;
}
-#line 1504 "src/parse/lex.cc"
+#line 1512 "src/parse/lex.cc"
yy243:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy243;
yy247:
++YYCURSOR;
-#line 473 "../src/parse/lex.re"
+#line 481 "../src/parse/lex.re"
{
goto code;
}
-#line 1539 "src/parse/lex.cc"
+#line 1547 "src/parse/lex.cc"
yy249:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
}
yy253:
YYCURSOR = YYCTXMARKER;
-#line 430 "../src/parse/lex.re"
+#line 438 "../src/parse/lex.re"
{
if (depth == 0)
{
cline++;
goto code;
}
-#line 1580 "src/parse/lex.cc"
+#line 1588 "src/parse/lex.cc"
yy254:
yych = (YYCTYPE)*++YYCURSOR;
goto yy253;
yy267:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 426 "../src/parse/lex.re"
+#line 434 "../src/parse/lex.re"
{
set_sourceline ();
goto code;
}
-#line 1652 "src/parse/lex.cc"
+#line 1660 "src/parse/lex.cc"
yy269:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy267;
goto yy245;
}
}
-#line 479 "../src/parse/lex.re"
+#line 487 "../src/parse/lex.re"
comment:
-#line 1696 "src/parse/lex.cc"
+#line 1704 "src/parse/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
}
++YYCURSOR;
yy279:
-#line 511 "../src/parse/lex.re"
+#line 519 "../src/parse/lex.re"
{
if (cur == eof)
{
}
goto comment;
}
-#line 1751 "src/parse/lex.cc"
+#line 1759 "src/parse/lex.cc"
yy280:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yybm[0+yych] & 32) {
}
if (yych == '#') goto yy291;
yy281:
-#line 502 "../src/parse/lex.re"
+#line 510 "../src/parse/lex.re"
{
if (cur == eof)
{
cline++;
goto comment;
}
-#line 1769 "src/parse/lex.cc"
+#line 1777 "src/parse/lex.cc"
yy282:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '/') goto yy286;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '*') goto yy279;
++YYCURSOR;
-#line 493 "../src/parse/lex.re"
+#line 501 "../src/parse/lex.re"
{
++depth;
fatal("ambiguous /* found");
goto comment;
}
-#line 1784 "src/parse/lex.cc"
+#line 1792 "src/parse/lex.cc"
yy286:
++YYCURSOR;
-#line 483 "../src/parse/lex.re"
+#line 491 "../src/parse/lex.re"
{
if (--depth == 0)
{
goto comment;
}
}
-#line 1798 "src/parse/lex.cc"
+#line 1806 "src/parse/lex.cc"
yy288:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy303:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 498 "../src/parse/lex.re"
+#line 506 "../src/parse/lex.re"
{
set_sourceline ();
goto comment;
}
-#line 1881 "src/parse/lex.cc"
+#line 1889 "src/parse/lex.cc"
yy305:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy303;
if (yych == '\r') goto yy305;
goto yy290;
}
-#line 518 "../src/parse/lex.re"
+#line 526 "../src/parse/lex.re"
nextLine:
-#line 1911 "src/parse/lex.cc"
+#line 1919 "src/parse/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy314;
++YYCURSOR;
-#line 529 "../src/parse/lex.re"
+#line 537 "../src/parse/lex.re"
{ if(cur == eof) {
return 0;
}
goto nextLine;
}
-#line 1924 "src/parse/lex.cc"
+#line 1932 "src/parse/lex.cc"
yy314:
++YYCURSOR;
-#line 522 "../src/parse/lex.re"
+#line 530 "../src/parse/lex.re"
{ if(cur == eof) {
return 0;
}
cline++;
goto scan;
}
-#line 1935 "src/parse/lex.cc"
+#line 1943 "src/parse/lex.cc"
}
-#line 534 "../src/parse/lex.re"
+#line 542 "../src/parse/lex.re"
}
uint32_t u, l;
fst:
-#line 1961 "src/parse/lex.cc"
+#line 1969 "src/parse/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == ']') goto yy319;
-#line 558 "../src/parse/lex.re"
+#line 566 "../src/parse/lex.re"
{ l = lex_cls_chr(); goto snd; }
-#line 1969 "src/parse/lex.cc"
+#line 1977 "src/parse/lex.cc"
yy319:
++YYCURSOR;
-#line 557 "../src/parse/lex.re"
+#line 565 "../src/parse/lex.re"
{ goto end; }
-#line 1974 "src/parse/lex.cc"
+#line 1982 "src/parse/lex.cc"
}
-#line 559 "../src/parse/lex.re"
+#line 567 "../src/parse/lex.re"
snd:
-#line 1980 "src/parse/lex.cc"
+#line 1988 "src/parse/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*(YYMARKER = YYCURSOR);
if (yych == '-') goto yy324;
yy323:
-#line 562 "../src/parse/lex.re"
+#line 570 "../src/parse/lex.re"
{ u = l; goto add; }
-#line 1989 "src/parse/lex.cc"
+#line 1997 "src/parse/lex.cc"
yy324:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
yy326:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 563 "../src/parse/lex.re"
+#line 571 "../src/parse/lex.re"
{
u = lex_cls_chr();
if (l > u) {
}
goto add;
}
-#line 2008 "src/parse/lex.cc"
+#line 2016 "src/parse/lex.cc"
}
-#line 571 "../src/parse/lex.re"
+#line 579 "../src/parse/lex.re"
add:
if (!(s = opts->encoding.encodeRange(l, u))) {
{
tok = cur;
-#line 2029 "src/parse/lex.cc"
+#line 2037 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if (yych == '\n') goto yy332;
if (yych == '\\') goto yy334;
++YYCURSOR;
-#line 594 "../src/parse/lex.re"
+#line 602 "../src/parse/lex.re"
{ return static_cast<uint8_t>(tok[0]); }
-#line 2040 "src/parse/lex.cc"
+#line 2048 "src/parse/lex.cc"
yy332:
++YYCURSOR;
-#line 589 "../src/parse/lex.re"
+#line 597 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error"); }
-#line 2045 "src/parse/lex.cc"
+#line 2053 "src/parse/lex.cc"
yy334:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) <= '`') {
}
}
}
-#line 592 "../src/parse/lex.re"
+#line 600 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in escape sequence"); }
-#line 2096 "src/parse/lex.cc"
+#line 2104 "src/parse/lex.cc"
yy336:
++YYCURSOR;
-#line 607 "../src/parse/lex.re"
+#line 615 "../src/parse/lex.re"
{
warn.useless_escape(tline, tok - pos, tok[1]);
return static_cast<uint8_t>(tok[1]);
}
-#line 2104 "src/parse/lex.cc"
+#line 2112 "src/parse/lex.cc"
yy338:
++YYCURSOR;
-#line 605 "../src/parse/lex.re"
+#line 613 "../src/parse/lex.re"
{ return static_cast<uint8_t>('-'); }
-#line 2109 "src/parse/lex.cc"
+#line 2117 "src/parse/lex.cc"
yy340:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy341;
if (yych <= '7') goto yy379;
yy341:
-#line 591 "../src/parse/lex.re"
+#line 599 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); }
-#line 2118 "src/parse/lex.cc"
+#line 2126 "src/parse/lex.cc"
yy342:
yych = (YYCTYPE)*++YYCURSOR;
goto yy341;
if (yych <= 'f') goto yy372;
}
yy344:
-#line 590 "../src/parse/lex.re"
+#line 598 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); }
-#line 2136 "src/parse/lex.cc"
+#line 2144 "src/parse/lex.cc"
yy345:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy346:
++YYCURSOR;
-#line 604 "../src/parse/lex.re"
+#line 612 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2154 "src/parse/lex.cc"
+#line 2162 "src/parse/lex.cc"
yy348:
++YYCURSOR;
-#line 606 "../src/parse/lex.re"
+#line 614 "../src/parse/lex.re"
{ return static_cast<uint8_t>(']'); }
-#line 2159 "src/parse/lex.cc"
+#line 2167 "src/parse/lex.cc"
yy350:
++YYCURSOR;
-#line 597 "../src/parse/lex.re"
+#line 605 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2164 "src/parse/lex.cc"
+#line 2172 "src/parse/lex.cc"
yy352:
++YYCURSOR;
-#line 598 "../src/parse/lex.re"
+#line 606 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2169 "src/parse/lex.cc"
+#line 2177 "src/parse/lex.cc"
yy354:
++YYCURSOR;
-#line 599 "../src/parse/lex.re"
+#line 607 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2174 "src/parse/lex.cc"
+#line 2182 "src/parse/lex.cc"
yy356:
++YYCURSOR;
-#line 600 "../src/parse/lex.re"
+#line 608 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2179 "src/parse/lex.cc"
+#line 2187 "src/parse/lex.cc"
yy358:
++YYCURSOR;
-#line 601 "../src/parse/lex.re"
+#line 609 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2184 "src/parse/lex.cc"
+#line 2192 "src/parse/lex.cc"
yy360:
++YYCURSOR;
-#line 602 "../src/parse/lex.re"
+#line 610 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2189 "src/parse/lex.cc"
+#line 2197 "src/parse/lex.cc"
yy362:
++YYCURSOR;
-#line 603 "../src/parse/lex.re"
+#line 611 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2194 "src/parse/lex.cc"
+#line 2202 "src/parse/lex.cc"
yy364:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy367:
++YYCURSOR;
-#line 595 "../src/parse/lex.re"
+#line 603 "../src/parse/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2227 "src/parse/lex.cc"
+#line 2235 "src/parse/lex.cc"
yy369:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy366;
if (yych >= '8') goto yy366;
++YYCURSOR;
-#line 596 "../src/parse/lex.re"
+#line 604 "../src/parse/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2339 "src/parse/lex.cc"
+#line 2347 "src/parse/lex.cc"
}
-#line 611 "../src/parse/lex.re"
+#line 619 "../src/parse/lex.re"
}
end = false;
tok = cur;
-#line 2350 "src/parse/lex.cc"
+#line 2358 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if (yych == '\n') goto yy386;
if (yych == '\\') goto yy388;
++YYCURSOR;
-#line 624 "../src/parse/lex.re"
+#line 632 "../src/parse/lex.re"
{
end = tok[0] == quote;
return static_cast<uint8_t>(tok[0]);
}
-#line 2364 "src/parse/lex.cc"
+#line 2372 "src/parse/lex.cc"
yy386:
++YYCURSOR;
-#line 619 "../src/parse/lex.re"
+#line 627 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error"); }
-#line 2369 "src/parse/lex.cc"
+#line 2377 "src/parse/lex.cc"
yy388:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) <= 'a') {
}
}
}
-#line 622 "../src/parse/lex.re"
+#line 630 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in escape sequence"); }
-#line 2417 "src/parse/lex.cc"
+#line 2425 "src/parse/lex.cc"
yy390:
++YYCURSOR;
-#line 638 "../src/parse/lex.re"
+#line 646 "../src/parse/lex.re"
{
if (tok[1] != quote) {
warn.useless_escape(tline, tok - pos, tok[1]);
}
return static_cast<uint8_t>(tok[1]);
}
-#line 2427 "src/parse/lex.cc"
+#line 2435 "src/parse/lex.cc"
yy392:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy393;
if (yych <= '7') goto yy429;
yy393:
-#line 621 "../src/parse/lex.re"
+#line 629 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); }
-#line 2436 "src/parse/lex.cc"
+#line 2444 "src/parse/lex.cc"
yy394:
yych = (YYCTYPE)*++YYCURSOR;
goto yy393;
if (yych <= 'f') goto yy422;
}
yy396:
-#line 620 "../src/parse/lex.re"
+#line 628 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); }
-#line 2454 "src/parse/lex.cc"
+#line 2462 "src/parse/lex.cc"
yy397:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy398:
++YYCURSOR;
-#line 637 "../src/parse/lex.re"
+#line 645 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2472 "src/parse/lex.cc"
+#line 2480 "src/parse/lex.cc"
yy400:
++YYCURSOR;
-#line 630 "../src/parse/lex.re"
+#line 638 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2477 "src/parse/lex.cc"
+#line 2485 "src/parse/lex.cc"
yy402:
++YYCURSOR;
-#line 631 "../src/parse/lex.re"
+#line 639 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2482 "src/parse/lex.cc"
+#line 2490 "src/parse/lex.cc"
yy404:
++YYCURSOR;
-#line 632 "../src/parse/lex.re"
+#line 640 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2487 "src/parse/lex.cc"
+#line 2495 "src/parse/lex.cc"
yy406:
++YYCURSOR;
-#line 633 "../src/parse/lex.re"
+#line 641 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2492 "src/parse/lex.cc"
+#line 2500 "src/parse/lex.cc"
yy408:
++YYCURSOR;
-#line 634 "../src/parse/lex.re"
+#line 642 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2497 "src/parse/lex.cc"
+#line 2505 "src/parse/lex.cc"
yy410:
++YYCURSOR;
-#line 635 "../src/parse/lex.re"
+#line 643 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2502 "src/parse/lex.cc"
+#line 2510 "src/parse/lex.cc"
yy412:
++YYCURSOR;
-#line 636 "../src/parse/lex.re"
+#line 644 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2507 "src/parse/lex.cc"
+#line 2515 "src/parse/lex.cc"
yy414:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy417:
++YYCURSOR;
-#line 628 "../src/parse/lex.re"
+#line 636 "../src/parse/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2540 "src/parse/lex.cc"
+#line 2548 "src/parse/lex.cc"
yy419:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
if (yych <= '/') goto yy416;
if (yych >= '8') goto yy416;
++YYCURSOR;
-#line 629 "../src/parse/lex.re"
+#line 637 "../src/parse/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2652 "src/parse/lex.cc"
+#line 2660 "src/parse/lex.cc"
}
-#line 644 "../src/parse/lex.re"
+#line 652 "../src/parse/lex.re"
}
sourceline:
tok = cur;
-#line 2675 "src/parse/lex.cc"
+#line 2683 "src/parse/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
yy434:
++YYCURSOR;
yy435:
-#line 687 "../src/parse/lex.re"
+#line 695 "../src/parse/lex.re"
{
goto sourceline;
}
-#line 2728 "src/parse/lex.cc"
+#line 2736 "src/parse/lex.cc"
yy436:
++YYCURSOR;
-#line 675 "../src/parse/lex.re"
+#line 683 "../src/parse/lex.re"
{
if (cur == eof)
{
tok = cur;
return;
}
-#line 2744 "src/parse/lex.cc"
+#line 2752 "src/parse/lex.cc"
yy438:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '\n') goto yy435;
yych = (YYCTYPE)*YYCURSOR;
goto yy442;
yy440:
-#line 664 "../src/parse/lex.re"
+#line 672 "../src/parse/lex.re"
{
if (!s_to_u32_unsafe (tok, cur, cline))
{
}
goto sourceline;
}
-#line 2762 "src/parse/lex.cc"
+#line 2770 "src/parse/lex.cc"
yy441:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy443;
yy447:
++YYCURSOR;
-#line 671 "../src/parse/lex.re"
+#line 679 "../src/parse/lex.re"
{
escape (in.file_name, std::string (tok + 1, tok_len () - 2)); // -2 to omit quotes
goto sourceline;
}
-#line 2799 "src/parse/lex.cc"
+#line 2807 "src/parse/lex.cc"
}
-#line 690 "../src/parse/lex.re"
+#line 698 "../src/parse/lex.re"
}
-/* Generated by re2c 0.15.2 on Fri Nov 27 13:55:14 2015*/
+/* Generated by re2c 0.15.2 on Tue Dec 1 15:54:11 2015 */
#line 1 "../src/parse/lex_conf.re"
+#include "src/util/c99_stdint.h"
+#include <string>
+
+#include "src/codegen/output.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
+#include "src/ir/regexp/encoding/enc.h"
#include "src/parse/scanner.h"
#include "src/util/s_to_n32_unsafe.h"
{
// global re2c config (affects the whole file)
-#line 29 "../src/parse/lex_conf.re"
+#line 36 "../src/parse/lex_conf.re"
void Scanner::lex_conf ()
{
tok = cur;
-#line 18 "src/parse/lex_conf.cc"
+#line 25 "src/parse/lex_conf.cc"
{
unsigned char yych;
unsigned int yyaccept = 0;
yy2:
++cur;
yy3:
-#line 35 "../src/parse/lex_conf.re"
+#line 42 "../src/parse/lex_conf.re"
{ fatal ((tok - pos) - tchar, "unrecognized configuration"); }
-#line 74 "src/parse/lex_conf.cc"
+#line 81 "src/parse/lex_conf.cc"
yy4:
yyaccept = 0;
yych = (unsigned char)*(ptr = ++cur);
yych = (unsigned char)*++cur;
if (yych != 'e') goto yy13;
++cur;
-#line 134 "../src/parse/lex_conf.re"
+#line 141 "../src/parse/lex_conf.re"
{ opts.set_fill_use (lex_conf_number () != 0); return; }
-#line 212 "src/parse/lex_conf.cc"
+#line 219 "src/parse/lex_conf.cc"
yy30:
yych = (unsigned char)*++cur;
if (yych != 'r') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'r') goto yy13;
++cur;
-#line 136 "../src/parse/lex_conf.re"
+#line 143 "../src/parse/lex_conf.re"
{ opts.set_fill_arg_use (lex_conf_number () != 0); return; }
-#line 231 "src/parse/lex_conf.cc"
+#line 238 "src/parse/lex_conf.cc"
yy39:
yych = (unsigned char)*++cur;
if (yych != 'e') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'k') goto yy13;
++cur;
-#line 138 "../src/parse/lex_conf.re"
+#line 145 "../src/parse/lex_conf.re"
{ opts.set_fill_check (lex_conf_number () != 0); return; }
-#line 242 "src/parse/lex_conf.cc"
+#line 249 "src/parse/lex_conf.cc"
yy44:
yych = (unsigned char)*++cur;
if (yych != ':') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'n') goto yy13;
++cur;
-#line 130 "../src/parse/lex_conf.re"
+#line 137 "../src/parse/lex_conf.re"
{ opts.set_yychConversion (lex_conf_number () != 0); return; }
-#line 274 "src/parse/lex_conf.cc"
+#line 281 "src/parse/lex_conf.cc"
yy58:
yych = (unsigned char)*++cur;
if (yych != 'i') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 't') goto yy13;
++cur;
-#line 131 "../src/parse/lex_conf.re"
+#line 138 "../src/parse/lex_conf.re"
{ opts.set_bEmitYYCh (lex_conf_number () != 0); return; }
-#line 283 "src/parse/lex_conf.cc"
+#line 290 "src/parse/lex_conf.cc"
yy62:
yych = (unsigned char)*++cur;
if (yych != ':') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'x') goto yy13;
++cur;
-#line 88 "../src/parse/lex_conf.re"
+#line 95 "../src/parse/lex_conf.re"
{ opts.set_yybmHexTable (lex_conf_number () != 0); return; }
-#line 296 "src/parse/lex_conf.cc"
+#line 303 "src/parse/lex_conf.cc"
yy68:
yych = (unsigned char)*++cur;
if (yych != 'r') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 't') goto yy13;
++cur;
-#line 85 "../src/parse/lex_conf.re"
+#line 92 "../src/parse/lex_conf.re"
{ opts.set_yyaccept (lex_conf_string ()); return; }
-#line 359 "src/parse/lex_conf.cc"
+#line 366 "src/parse/lex_conf.cc"
yy89:
++cur;
-#line 87 "../src/parse/lex_conf.re"
+#line 94 "../src/parse/lex_conf.re"
{ opts.set_yybm (lex_conf_string ()); return; }
-#line 364 "src/parse/lex_conf.cc"
+#line 371 "src/parse/lex_conf.cc"
yy91:
yych = (unsigned char)*++cur;
if (yych != 'r') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 't') goto yy13;
++cur;
-#line 99 "../src/parse/lex_conf.re"
+#line 106 "../src/parse/lex_conf.re"
{ opts.set_yytarget (lex_conf_string ()); return; }
-#line 377 "src/parse/lex_conf.cc"
+#line 384 "src/parse/lex_conf.cc"
yy97:
yych = (unsigned char)*++cur;
if (yych == 'a') goto yy100;
goto yy13;
yy98:
++cur;
-#line 129 "../src/parse/lex_conf.re"
+#line 136 "../src/parse/lex_conf.re"
{ opts.set_yych (lex_conf_string ()); return; }
-#line 386 "src/parse/lex_conf.cc"
+#line 393 "src/parse/lex_conf.cc"
yy100:
yych = (unsigned char)*++cur;
if (yych != 'b') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'e') goto yy13;
++cur;
-#line 74 "../src/parse/lex_conf.re"
+#line 81 "../src/parse/lex_conf.re"
{ opts.set_yyctable (lex_conf_string ()); return; }
-#line 397 "src/parse/lex_conf.cc"
+#line 404 "src/parse/lex_conf.cc"
yy105:
yych = (unsigned char)*++cur;
if (yych != 'a') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'e') goto yy13;
++cur;
-#line 147 "../src/parse/lex_conf.re"
+#line 154 "../src/parse/lex_conf.re"
{ lex_conf_string (); return; }
-#line 410 "src/parse/lex_conf.cc"
+#line 417 "src/parse/lex_conf.cc"
yy111:
yych = (unsigned char)*++cur;
if (yych != 'a') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'l') goto yy13;
++cur;
-#line 84 "../src/parse/lex_conf.re"
+#line 91 "../src/parse/lex_conf.re"
{ opts.set_bUseStateNext (lex_conf_number () != 0); return; }
-#line 455 "src/parse/lex_conf.cc"
+#line 462 "src/parse/lex_conf.cc"
yy128:
yych = (unsigned char)*++cur;
if (yych != 'o') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 't') goto yy13;
++cur;
-#line 83 "../src/parse/lex_conf.re"
+#line 90 "../src/parse/lex_conf.re"
{ opts.set_bUseStateAbort (lex_conf_number () != 0); return; }
-#line 466 "src/parse/lex_conf.cc"
+#line 473 "src/parse/lex_conf.cc"
yy133:
yych = (unsigned char)*++cur;
if (yych != 'l') goto yy13;
}
if (yych == '=') goto yy142;
yy139:
-#line 144 "../src/parse/lex_conf.re"
+#line 151 "../src/parse/lex_conf.re"
{ out.set_user_start_label (lex_conf_string ()); return; }
-#line 488 "src/parse/lex_conf.cc"
+#line 495 "src/parse/lex_conf.cc"
yy140:
++cur;
if (lim <= cur) fill(1);
++cur;
yy145:
cur = ctx;
-#line 143 "../src/parse/lex_conf.re"
+#line 150 "../src/parse/lex_conf.re"
{ out.set_force_start_label (lex_conf_number () != 0); return; }
-#line 525 "src/parse/lex_conf.cc"
+#line 532 "src/parse/lex_conf.cc"
yy146:
yych = (unsigned char)*++cur;
if (yych <= '0') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 't') goto yy13;
++cur;
-#line 82 "../src/parse/lex_conf.re"
+#line 89 "../src/parse/lex_conf.re"
{ opts.set_yynext (lex_conf_string ()); return; }
-#line 574 "src/parse/lex_conf.cc"
+#line 581 "src/parse/lex_conf.cc"
yy163:
yych = (unsigned char)*++cur;
if (yych != 'l') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'l') goto yy13;
++cur;
-#line 81 "../src/parse/lex_conf.re"
+#line 88 "../src/parse/lex_conf.re"
{ opts.set_yyfilllabel (lex_conf_string ()); return; }
-#line 593 "src/parse/lex_conf.cc"
+#line 600 "src/parse/lex_conf.cc"
yy172:
yych = (unsigned char)*++cur;
if (yych != 'e') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'x') goto yy13;
++cur;
-#line 140 "../src/parse/lex_conf.re"
+#line 147 "../src/parse/lex_conf.re"
{ opts.set_labelPrefix (lex_conf_string ()); return; }
-#line 606 "src/parse/lex_conf.cc"
+#line 613 "src/parse/lex_conf.cc"
yy178:
yych = (unsigned char)*++cur;
if (yych != 'd') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'g') goto yy13;
++cur;
-#line 114 "../src/parse/lex_conf.re"
+#line 121 "../src/parse/lex_conf.re"
{ opts.set_indString (lex_conf_string ()); return; }
-#line 639 "src/parse/lex_conf.cc"
+#line 646 "src/parse/lex_conf.cc"
yy192:
yych = (unsigned char)*++cur;
if (yych != 'p') goto yy13;
++cur;
-#line 116 "../src/parse/lex_conf.re"
+#line 123 "../src/parse/lex_conf.re"
{
const int32_t n = lex_conf_number ();
if (n < 0)
opts.set_topIndent (static_cast<uint32_t> (n));
return;
}
-#line 654 "src/parse/lex_conf.cc"
+#line 661 "src/parse/lex_conf.cc"
yy195:
yych = (unsigned char)*++cur;
if (yych != 'a') goto yy13;
}
yy200:
++cur;
-#line 38 "../src/parse/lex_conf.re"
+#line 45 "../src/parse/lex_conf.re"
{
Enc::type_t enc = Enc::ASCII;
switch (cur[-1])
}
return;
}
-#line 702 "src/parse/lex_conf.cc"
+#line 709 "src/parse/lex_conf.cc"
yy202:
yych = (unsigned char)*++cur;
if (yych != 'f') goto yy13;
yych = (unsigned char)*(ptr = ++cur);
if (yych == ':') goto yy229;
yy228:
-#line 76 "../src/parse/lex_conf.re"
+#line 83 "../src/parse/lex_conf.re"
{ opts.set_state_get (lex_conf_string ()); return; }
-#line 804 "src/parse/lex_conf.cc"
+#line 811 "src/parse/lex_conf.cc"
yy229:
yych = (unsigned char)*++cur;
if (yych != 'n') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'd') goto yy13;
++cur;
-#line 77 "../src/parse/lex_conf.re"
+#line 84 "../src/parse/lex_conf.re"
{ opts.set_state_get_naked (lex_conf_number () != 0); return; }
-#line 819 "src/parse/lex_conf.cc"
+#line 826 "src/parse/lex_conf.cc"
yy236:
yych = (unsigned char)*++cur;
if (yych != 'N') goto yy13;
yych = (unsigned char)*(ptr = ++cur);
if (yych == ':') goto yy245;
yy244:
-#line 63 "../src/parse/lex_conf.re"
+#line 70 "../src/parse/lex_conf.re"
{ opts.set_cond_get (lex_conf_string ()); return; }
-#line 841 "src/parse/lex_conf.cc"
+#line 848 "src/parse/lex_conf.cc"
yy245:
yych = (unsigned char)*++cur;
if (yych != 'n') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'd') goto yy13;
++cur;
-#line 64 "../src/parse/lex_conf.re"
+#line 71 "../src/parse/lex_conf.re"
{ opts.set_cond_get_naked (lex_conf_number () != 0); return; }
-#line 856 "src/parse/lex_conf.cc"
+#line 863 "src/parse/lex_conf.cc"
yy252:
yych = (unsigned char)*++cur;
if (yych != 'R') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'R') goto yy13;
++cur;
-#line 102 "../src/parse/lex_conf.re"
+#line 109 "../src/parse/lex_conf.re"
{ opts.set_yymarker (lex_conf_string ()); return; }
-#line 869 "src/parse/lex_conf.cc"
+#line 876 "src/parse/lex_conf.cc"
yy258:
yych = (unsigned char)*++cur;
if (yych != 'E') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'K') goto yy13;
++cur;
-#line 106 "../src/parse/lex_conf.re"
+#line 113 "../src/parse/lex_conf.re"
{ opts.set_yypeek (lex_conf_string ()); return; }
-#line 878 "src/parse/lex_conf.cc"
+#line 885 "src/parse/lex_conf.cc"
yy262:
yych = (unsigned char)*++cur;
if (yych == 'T') goto yy267;
yych = (unsigned char)*++cur;
if (yych != 'P') goto yy13;
++cur;
-#line 107 "../src/parse/lex_conf.re"
+#line 114 "../src/parse/lex_conf.re"
{ opts.set_yyskip (lex_conf_string ()); return; }
-#line 891 "src/parse/lex_conf.cc"
+#line 898 "src/parse/lex_conf.cc"
yy267:
yych = (unsigned char)*++cur;
if (yych == 'C') goto yy268;
if (yych == ':') goto yy276;
if (yych == '@') goto yy275;
yy274:
-#line 78 "../src/parse/lex_conf.re"
+#line 85 "../src/parse/lex_conf.re"
{ opts.set_state_set (lex_conf_string ()); return; }
-#line 917 "src/parse/lex_conf.cc"
+#line 924 "src/parse/lex_conf.cc"
yy275:
yych = (unsigned char)*++cur;
if (yych == 's') goto yy283;
yych = (unsigned char)*++cur;
if (yych != 'd') goto yy13;
++cur;
-#line 79 "../src/parse/lex_conf.re"
+#line 86 "../src/parse/lex_conf.re"
{ opts.set_state_set_naked (lex_conf_number () != 0); return; }
-#line 936 "src/parse/lex_conf.cc"
+#line 943 "src/parse/lex_conf.cc"
yy283:
yych = (unsigned char)*++cur;
if (yych != 't') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'e') goto yy13;
++cur;
-#line 80 "../src/parse/lex_conf.re"
+#line 87 "../src/parse/lex_conf.re"
{ opts.set_state_set_arg (lex_conf_string ()); return; }
-#line 949 "src/parse/lex_conf.cc"
+#line 956 "src/parse/lex_conf.cc"
yy289:
yych = (unsigned char)*++cur;
if (yych != 'N') goto yy13;
if (yych == ':') goto yy298;
if (yych == '@') goto yy299;
yy297:
-#line 65 "../src/parse/lex_conf.re"
+#line 72 "../src/parse/lex_conf.re"
{ opts.set_cond_set (lex_conf_string ()); return; }
-#line 972 "src/parse/lex_conf.cc"
+#line 979 "src/parse/lex_conf.cc"
yy298:
yych = (unsigned char)*++cur;
if (yych == 'n') goto yy305;
yych = (unsigned char)*++cur;
if (yych != 'd') goto yy13;
++cur;
-#line 66 "../src/parse/lex_conf.re"
+#line 73 "../src/parse/lex_conf.re"
{ opts.set_cond_set_arg (lex_conf_string ()); return; }
-#line 989 "src/parse/lex_conf.cc"
+#line 996 "src/parse/lex_conf.cc"
yy305:
yych = (unsigned char)*++cur;
if (yych != 'a') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'd') goto yy13;
++cur;
-#line 67 "../src/parse/lex_conf.re"
+#line 74 "../src/parse/lex_conf.re"
{ opts.set_cond_set_naked (lex_conf_number () != 0); return; }
-#line 1002 "src/parse/lex_conf.cc"
+#line 1009 "src/parse/lex_conf.cc"
yy311:
yych = (unsigned char)*++cur;
if (yych != 'C') goto yy13;
yych = (unsigned char)*(ptr = ++cur);
if (yych == 'C') goto yy317;
yy316:
-#line 108 "../src/parse/lex_conf.re"
+#line 115 "../src/parse/lex_conf.re"
{ opts.set_yybackup (lex_conf_string ()); return; }
-#line 1018 "src/parse/lex_conf.cc"
+#line 1025 "src/parse/lex_conf.cc"
yy317:
yych = (unsigned char)*++cur;
if (yych != 'T') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'X') goto yy13;
++cur;
-#line 109 "../src/parse/lex_conf.re"
+#line 116 "../src/parse/lex_conf.re"
{ opts.set_yybackupctx (lex_conf_string ()); return; }
-#line 1027 "src/parse/lex_conf.cc"
+#line 1034 "src/parse/lex_conf.cc"
yy321:
yych = (unsigned char)*++cur;
if (yych != 'S') goto yy13;
yych = (unsigned char)*(ptr = ++cur);
if (yych == 'C') goto yy328;
yy327:
-#line 110 "../src/parse/lex_conf.re"
+#line 117 "../src/parse/lex_conf.re"
{ opts.set_yyrestore (lex_conf_string ()); return; }
-#line 1045 "src/parse/lex_conf.cc"
+#line 1052 "src/parse/lex_conf.cc"
yy328:
yych = (unsigned char)*++cur;
if (yych != 'T') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'X') goto yy13;
++cur;
-#line 111 "../src/parse/lex_conf.re"
+#line 118 "../src/parse/lex_conf.re"
{ opts.set_yyrestorectx (lex_conf_string ()); return; }
-#line 1054 "src/parse/lex_conf.cc"
+#line 1061 "src/parse/lex_conf.cc"
yy332:
yych = (unsigned char)*++cur;
if (yych == 'M') goto yy341;
yych = (unsigned char)*++cur;
if (yych != 'N') goto yy13;
++cur;
-#line 112 "../src/parse/lex_conf.re"
+#line 119 "../src/parse/lex_conf.re"
{ opts.set_yylessthan (lex_conf_string ()); return; }
-#line 1075 "src/parse/lex_conf.cc"
+#line 1082 "src/parse/lex_conf.cc"
yy341:
yych = (unsigned char)*++cur;
if (yych != 'I') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'T') goto yy13;
++cur;
-#line 104 "../src/parse/lex_conf.re"
+#line 111 "../src/parse/lex_conf.re"
{ opts.set_yylimit (lex_conf_string ()); return; }
-#line 1084 "src/parse/lex_conf.cc"
+#line 1091 "src/parse/lex_conf.cc"
yy345:
yych = (unsigned char)*++cur;
if (yych != 'B') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'G') goto yy13;
++cur;
-#line 126 "../src/parse/lex_conf.re"
+#line 133 "../src/parse/lex_conf.re"
{ opts.set_yydebug (lex_conf_string ()); return; }
-#line 1095 "src/parse/lex_conf.cc"
+#line 1102 "src/parse/lex_conf.cc"
yy350:
yych = (unsigned char)*++cur;
if (yych == 'N') goto yy370;
yych = (unsigned char)*++cur;
if (yych != 'R') goto yy13;
++cur;
-#line 103 "../src/parse/lex_conf.re"
+#line 110 "../src/parse/lex_conf.re"
{ opts.set_yyctxmarker (lex_conf_string ()); return; }
-#line 1128 "src/parse/lex_conf.cc"
+#line 1135 "src/parse/lex_conf.cc"
yy362:
yych = (unsigned char)*++cur;
if (yych != 'E') goto yy13;
++cur;
-#line 128 "../src/parse/lex_conf.re"
+#line 135 "../src/parse/lex_conf.re"
{ opts.set_yyctype (lex_conf_string ()); return; }
-#line 1135 "src/parse/lex_conf.cc"
+#line 1142 "src/parse/lex_conf.cc"
yy365:
yych = (unsigned char)*++cur;
if (yych != 'S') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'R') goto yy13;
++cur;
-#line 101 "../src/parse/lex_conf.re"
+#line 108 "../src/parse/lex_conf.re"
{ opts.set_yycursor (lex_conf_string ()); return; }
-#line 1146 "src/parse/lex_conf.cc"
+#line 1153 "src/parse/lex_conf.cc"
yy370:
yych = (unsigned char)*++cur;
if (yych != 'D') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'E') goto yy13;
++cur;
-#line 62 "../src/parse/lex_conf.re"
+#line 69 "../src/parse/lex_conf.re"
{ opts.set_yycondtype (lex_conf_string ()); return; }
-#line 1161 "src/parse/lex_conf.cc"
+#line 1168 "src/parse/lex_conf.cc"
yy377:
yych = (unsigned char)*++cur;
if (yych != 'L') goto yy13;
if (yych == ':') goto yy381;
if (yych == '@') goto yy382;
yy380:
-#line 133 "../src/parse/lex_conf.re"
+#line 140 "../src/parse/lex_conf.re"
{ opts.set_fill (lex_conf_string ()); return; }
-#line 1174 "src/parse/lex_conf.cc"
+#line 1181 "src/parse/lex_conf.cc"
yy381:
yych = (unsigned char)*++cur;
if (yych == 'n') goto yy387;
yych = (unsigned char)*++cur;
if (yych != 'n') goto yy13;
++cur;
-#line 135 "../src/parse/lex_conf.re"
+#line 142 "../src/parse/lex_conf.re"
{ opts.set_fill_arg (lex_conf_string ()); return; }
-#line 1189 "src/parse/lex_conf.cc"
+#line 1196 "src/parse/lex_conf.cc"
yy387:
yych = (unsigned char)*++cur;
if (yych != 'a') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'd') goto yy13;
++cur;
-#line 137 "../src/parse/lex_conf.re"
+#line 144 "../src/parse/lex_conf.re"
{ opts.set_fill_naked (lex_conf_number () != 0); return; }
-#line 1202 "src/parse/lex_conf.cc"
+#line 1209 "src/parse/lex_conf.cc"
yy393:
yych = (unsigned char)*++cur;
if (yych == 'o') goto yy441;
yych = (unsigned char)*(ptr = ++cur);
if (yych == '@') goto yy409;
yy408:
-#line 70 "../src/parse/lex_conf.re"
+#line 77 "../src/parse/lex_conf.re"
{ opts.set_condDivider (lex_conf_string ()); return; }
-#line 1253 "src/parse/lex_conf.cc"
+#line 1260 "src/parse/lex_conf.cc"
yy409:
yych = (unsigned char)*++cur;
if (yych != 'c') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'd') goto yy13;
++cur;
-#line 71 "../src/parse/lex_conf.re"
+#line 78 "../src/parse/lex_conf.re"
{ opts.set_condDividerParam (lex_conf_string ()); return; }
-#line 1266 "src/parse/lex_conf.cc"
+#line 1273 "src/parse/lex_conf.cc"
yy415:
yych = (unsigned char)*++cur;
if (yych != 't') goto yy13;
yych = (unsigned char)*(ptr = ++cur);
if (yych == '@') goto yy419;
yy418:
-#line 72 "../src/parse/lex_conf.re"
+#line 79 "../src/parse/lex_conf.re"
{ opts.set_condGoto (lex_conf_string ()); return; }
-#line 1278 "src/parse/lex_conf.cc"
+#line 1285 "src/parse/lex_conf.cc"
yy419:
yych = (unsigned char)*++cur;
if (yych != 'c') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'd') goto yy13;
++cur;
-#line 73 "../src/parse/lex_conf.re"
+#line 80 "../src/parse/lex_conf.re"
{ opts.set_condGotoParam (lex_conf_string ()); return; }
-#line 1291 "src/parse/lex_conf.cc"
+#line 1298 "src/parse/lex_conf.cc"
yy425:
yych = (unsigned char)*++cur;
if (yych != 'u') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'x') goto yy13;
++cur;
-#line 69 "../src/parse/lex_conf.re"
+#line 76 "../src/parse/lex_conf.re"
{ opts.set_condEnumPrefix (lex_conf_string ()); return; }
-#line 1312 "src/parse/lex_conf.cc"
+#line 1319 "src/parse/lex_conf.cc"
yy435:
yych = (unsigned char)*++cur;
if (yych != 'e') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'x') goto yy13;
++cur;
-#line 68 "../src/parse/lex_conf.re"
+#line 75 "../src/parse/lex_conf.re"
{ opts.set_condPrefix (lex_conf_string ()); return; }
-#line 1325 "src/parse/lex_conf.cc"
+#line 1332 "src/parse/lex_conf.cc"
yy441:
yych = (unsigned char)*++cur;
if (yych != 't') goto yy13;
yych = (unsigned char)*++cur;
if (yych != 'd') goto yy13;
++cur;
-#line 90 "../src/parse/lex_conf.re"
+#line 97 "../src/parse/lex_conf.re"
{
const int32_t n = lex_conf_number ();
if (n < 0)
opts.set_cGotoThreshold (static_cast<uint32_t> (n));
return;
}
-#line 1362 "src/parse/lex_conf.cc"
+#line 1369 "src/parse/lex_conf.cc"
}
-#line 148 "../src/parse/lex_conf.re"
+#line 155 "../src/parse/lex_conf.re"
}
void Scanner::lex_conf_assign ()
{
-#line 1371 "src/parse/lex_conf.cc"
+#line 1378 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
}
++cur;
yy458:
-#line 154 "../src/parse/lex_conf.re"
+#line 161 "../src/parse/lex_conf.re"
{ fatal ("missing '=' in configuration"); }
-#line 1420 "src/parse/lex_conf.cc"
+#line 1427 "src/parse/lex_conf.cc"
yy459:
yych = (unsigned char)*(ptr = ++cur);
if (yych <= 0x1F) {
yych = (unsigned char)*cur;
goto yy463;
yy461:
-#line 155 "../src/parse/lex_conf.re"
+#line 162 "../src/parse/lex_conf.re"
{ return; }
-#line 1438 "src/parse/lex_conf.cc"
+#line 1445 "src/parse/lex_conf.cc"
yy462:
++cur;
if (lim <= cur) fill(1);
cur = ptr;
goto yy458;
}
-#line 156 "../src/parse/lex_conf.re"
+#line 163 "../src/parse/lex_conf.re"
}
void Scanner::lex_conf_semicolon ()
{
-#line 1468 "src/parse/lex_conf.cc"
+#line 1475 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
}
++cur;
yy470:
-#line 162 "../src/parse/lex_conf.re"
+#line 169 "../src/parse/lex_conf.re"
{ fatal ("missing ending ';' in configuration"); }
-#line 1517 "src/parse/lex_conf.cc"
+#line 1524 "src/parse/lex_conf.cc"
yy471:
yych = (unsigned char)*(ptr = ++cur);
if (yybm[0+yych] & 128) {
yy472:
++cur;
yy473:
-#line 163 "../src/parse/lex_conf.re"
+#line 170 "../src/parse/lex_conf.re"
{ return; }
-#line 1530 "src/parse/lex_conf.cc"
+#line 1537 "src/parse/lex_conf.cc"
yy474:
yych = (unsigned char)*++cur;
goto yy473;
cur = ptr;
goto yy470;
}
-#line 164 "../src/parse/lex_conf.re"
+#line 171 "../src/parse/lex_conf.re"
}
lex_conf_assign ();
tok = cur;
-#line 1554 "src/parse/lex_conf.cc"
+#line 1561 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
yy481:
++cur;
yy482:
-#line 173 "../src/parse/lex_conf.re"
+#line 180 "../src/parse/lex_conf.re"
{
int32_t n = 0;
if (!s_to_i32_unsafe (tok, cur, n))
lex_conf_semicolon ();
return n;
}
-#line 1613 "src/parse/lex_conf.cc"
+#line 1620 "src/parse/lex_conf.cc"
yy483:
yych = (unsigned char)*++cur;
if (yych <= '0') goto yy480;
}
goto yy482;
}
-#line 182 "../src/parse/lex_conf.re"
+#line 189 "../src/parse/lex_conf.re"
}
std::string s;
tok = cur;
-#line 1637 "src/parse/lex_conf.cc"
+#line 1644 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
}
}
yy488:
-#line 205 "../src/parse/lex_conf.re"
+#line 212 "../src/parse/lex_conf.re"
{
s = std::string(tok, tok_len());
goto end;
}
-#line 1697 "src/parse/lex_conf.cc"
+#line 1704 "src/parse/lex_conf.cc"
yy489:
++cur;
-#line 191 "../src/parse/lex_conf.re"
+#line 198 "../src/parse/lex_conf.re"
{
const char quote = tok[0];
for (bool end;;) {
}
}
}
-#line 1715 "src/parse/lex_conf.cc"
+#line 1722 "src/parse/lex_conf.cc"
yy491:
++cur;
if (lim <= cur) fill(1);
}
goto yy488;
}
-#line 209 "../src/parse/lex_conf.re"
+#line 216 "../src/parse/lex_conf.re"
end:
lex_conf_semicolon ();
+#include "src/util/c99_stdint.h"
#include <assert.h>
-#include <time.h>
-#include <string.h>
+#include <stddef.h>
#include <stdlib.h>
-#include <iostream>
#include <limits>
+#include <list>
+#include <map>
#include <set>
+#include <string>
+#include <utility>
+#include <vector>
-#include "config.h"
+#include "src/codegen/output.h"
#include "src/codegen/skeleton/skeleton.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
#include "src/ir/bytecode/bytecode.h"
+#include "src/ir/dfa/dfa.h"
#include "src/ir/regexp/encoding/enc.h"
#include "src/ir/regexp/encoding/range_suffix.h"
+#include "src/ir/regexp/regexp.h"
#include "src/ir/regexp/regexp_cat.h"
#include "src/ir/regexp/regexp_close.h"
#include "src/ir/regexp/regexp_null.h"
-#include "src/globals.h"
+#include "src/ir/regexp/regexp_rule.h"
+#include "src/ir/rule_rank.h"
#include "src/parse/code.h"
#include "src/parse/extop.h"
+#include "src/parse/loc.h"
#include "src/parse/parser.h"
-#include "src/util/c99_stdint.h"
+#include "src/parse/scanner.h"
+#include "src/parse/spec.h"
+#include "src/util/counter.h"
+#include "src/util/free_list.h"
+#include "src/util/range.h"
#include "src/util/smart_ptr.h"
#define YYMALLOC malloc
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 184, 184, 186, 190, 194, 203, 212, 216, 220,
- 224, 241, 259, 263, 269, 274, 280, 284, 299, 316,
- 321, 327, 343, 361, 381, 387, 395, 398, 405, 411,
- 421, 424, 432, 435, 442, 446, 453, 457, 464, 468,
- 475, 479, 494, 514, 518, 522, 526, 533, 543, 547
+ 0, 198, 198, 200, 204, 208, 217, 226, 230, 234,
+ 238, 255, 273, 277, 283, 288, 294, 298, 313, 330,
+ 335, 341, 357, 375, 395, 401, 409, 412, 419, 425,
+ 435, 438, 446, 449, 456, 460, 467, 471, 478, 482,
+ 489, 493, 508, 528, 532, 536, 540, 547, 557, 561
};
#endif
+#include <algorithm> // min
#include <string.h> // memset
#include "src/codegen/bitmap.h"
#include "src/codegen/go.h"
-#include "src/codegen/indent.h"
+#include "src/codegen/output.h"
+#include "src/conf/opt.h"
#include "src/globals.h"
namespace re2c
#ifndef _RE2C_CODEGEN_BITMAP_
#define _RE2C_CODEGEN_BITMAP_
-#include "src/codegen/output.h"
#include "src/util/c99_stdint.h"
+
#include "src/util/forbid_copy.h"
namespace re2c
struct Go;
struct Span;
class State;
+class OutputFile;
class BitMap
{
+#include "src/util/c99_stdint.h"
+#include <stddef.h>
+#include <set>
+#include <string>
+
#include "src/codegen/emit.h"
-#include "src/codegen/indent.h"
#include "src/codegen/input_api.h"
+#include "src/codegen/output.h"
#include "src/codegen/skeleton/skeleton.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
#include "src/ir/dfa/action.h"
+#include "src/ir/dfa/state.h"
+#include "src/ir/regexp/regexp.h"
#include "src/ir/regexp/regexp_rule.h"
+#include "src/parse/code.h"
+#include "src/parse/loc.h"
namespace re2c
{
+class label_t;
+
static void need (OutputFile & o, uint32_t ind, bool & readCh, uint32_t n, bool bSetMarker);
static void emit_match (OutputFile & o, uint32_t ind, bool & readCh, const State * const s);
static void emit_initial (OutputFile & o, uint32_t ind, bool & readCh, const State * const s, const Initial & init, const std::set<label_t> & used_labels);
-#include <assert.h>
+#include "src/util/c99_stdint.h"
+#include <stddef.h>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
#include "src/codegen/bitmap.h"
#include "src/codegen/emit.h"
#include "src/codegen/go.h"
-#include "src/codegen/indent.h"
#include "src/codegen/input_api.h"
+#include "src/codegen/label.h"
+#include "src/codegen/output.h"
#include "src/codegen/skeleton/skeleton.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
+#include "src/ir/dfa/action.h"
+#include "src/ir/dfa/dfa.h"
+#include "src/ir/dfa/state.h"
+#include "src/util/counter.h"
namespace re2c
{
+#include "src/util/c99_stdint.h"
+#include <string>
+#include <utility>
+#include <vector>
+
#include "src/codegen/bitmap.h"
#include "src/codegen/go.h"
-#include "src/ir/dfa/dfa.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
+#include "src/ir/dfa/state.h"
#include "src/util/allocate.h"
namespace re2c
+#include "src/util/c99_stdint.h"
+#include <utility>
+#include <vector>
+
#include "src/codegen/go.h"
-#include "src/ir/dfa/dfa.h"
namespace re2c
{
+#include "src/util/c99_stdint.h"
+#include <string>
+#include <utility>
+#include <vector>
+
#include "src/codegen/bitmap.h"
#include "src/codegen/go.h"
-#include "src/codegen/indent.h"
+#include "src/codegen/input_api.h"
+#include "src/codegen/label.h"
+#include "src/codegen/output.h"
#include "src/codegen/print.h"
-#include "src/ir/dfa/dfa.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
+#include "src/ir/dfa/state.h"
+#include "src/ir/regexp/encoding/enc.h"
namespace re2c
{
+#include "src/util/c99_stdint.h"
+#include <set>
+#include <utility>
+#include <vector>
+
#include "src/codegen/go.h"
-#include "src/ir/dfa/dfa.h"
+#include "src/codegen/label.h"
+#include "src/ir/dfa/state.h"
namespace re2c
{
#include <sstream>
-#include "src/codegen/indent.h"
#include "src/codegen/input_api.h"
+#include "src/codegen/indent.h"
+#include "src/conf/opt.h"
#include "src/globals.h"
namespace re2c
#ifndef _RE2C_CODEGEN_INPUT_API_
#define _RE2C_CODEGEN_INPUT_API_
-#include <map>
-#include <string>
-
#include "src/util/c99_stdint.h"
+#include <string>
namespace re2c
{
#ifndef _RE2C_CODEGEN_LABEL_
#define _RE2C_CODEGEN_LABEL_
-#include <iosfwd>
+#include <iosfwd> // ostream
#include "src/util/c99_stdint.h"
-#include "src/util/counter.h"
namespace re2c {
+template <typename num_t> class counter_t;
+
// label public API:
// - get first label
// - compare labels
-#include <iomanip>
#include <stdio.h>
-#include <string.h>
#include <time.h>
+#include <iomanip>
#include "src/codegen/indent.h"
#include "src/codegen/output.h"
#include "src/codegen/print.h"
+#include "src/conf/opt.h"
+#include "src/conf/warn.h"
#include "src/globals.h"
+#include "src/ir/rule_rank.h"
namespace re2c
{
#ifndef _RE2C_CODEGEN_OUTPUT_
#define _RE2C_CODEGEN_OUTPUT_
+#include "src/util/c99_stdint.h"
+#include <stddef.h>
+#include <stdio.h>
#include <fstream>
#include <set>
#include <sstream>
#include <vector>
#include "src/codegen/label.h"
-#include "src/ir/rule_rank.h"
-#include "src/util/c99_stdint.h"
+#include "src/util/counter.h"
#include "src/util/forbid_copy.h"
namespace re2c
{
+class rule_rank_t;
+
struct OutputFragment
{
enum type_t
+#include "src/util/c99_stdint.h"
#include <string.h>
+#include <map>
#include "src/codegen/bitmap.h"
+#include "src/codegen/go.h"
#include "src/codegen/scc.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
+#include "src/ir/dfa/action.h"
#include "src/ir/dfa/dfa.h"
+#include "src/ir/dfa/state.h"
#include "src/ir/regexp/regexp_rule.h"
+#include "src/ir/rule_rank.h"
#include "src/util/allocate.h"
namespace re2c {
#include <iostream>
#include "src/codegen/print.h"
+#include "src/conf/opt.h"
#include "src/globals.h"
+#include "src/ir/regexp/encoding/enc.h"
namespace re2c
{
#ifndef _RE2C_CODEGEN_PRINT_
#define _RE2C_CODEGEN_PRINT_
-#include <iosfwd>
-
#include "src/util/c99_stdint.h"
+#include <iosfwd>
namespace re2c
{
#include "src/codegen/scc.h"
-#include "src/ir/dfa/dfa.h"
+#include "src/codegen/go.h"
+#include "src/ir/dfa/state.h"
namespace re2c {
+#include <map>
+#include <utility>
+#include <vector>
+
+#include "src/codegen/skeleton/path.h"
#include "src/codegen/skeleton/skeleton.h"
+#include "src/codegen/skeleton/way.h"
+#include "src/conf/warn.h"
+#include "src/globals.h"
+#include "src/ir/rule_rank.h"
+#include "src/util/u32lim.h"
namespace re2c
{
+#include "src/util/c99_stdint.h"
+#include <stddef.h>
+#include <algorithm>
+#include <set>
+#include <string>
+
#include "src/codegen/bitmap.h"
-#include "src/codegen/indent.h"
+#include "src/codegen/output.h"
#include "src/codegen/skeleton/skeleton.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
+#include "src/ir/regexp/encoding/enc.h"
+#include "src/ir/rule_rank.h"
namespace re2c
{
-#include <stdlib.h> // exit
-
-#include "src/codegen/indent.h"
-#include "src/codegen/print.h"
+#include "src/util/c99_stdint.h"
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <algorithm>
+#include <map>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "src/codegen/skeleton/path.h"
#include "src/codegen/skeleton/skeleton.h"
#include "src/conf/msg.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
+#include "src/ir/regexp/encoding/enc.h"
+#include "src/ir/rule_rank.h"
+#include "src/util/u32lim.h"
namespace re2c
{
+#include <map>
+#include <set>
+
+#include "src/codegen/skeleton/path.h"
#include "src/codegen/skeleton/skeleton.h"
+#include "src/conf/warn.h"
+#include "src/globals.h"
+#include "src/ir/rule_rank.h"
+#include "src/parse/rules.h"
namespace re2c
{
+#include "src/util/c99_stdint.h"
+#include <algorithm>
#include <limits>
+#include <map>
+#include <utility>
#include "src/codegen/skeleton/skeleton.h"
-#include <stdlib.h> // exit
+#include <stdlib.h>
+#include <algorithm>
+#include <utility>
+#include "src/codegen/go.h"
#include "src/codegen/skeleton/skeleton.h"
#include "src/conf/msg.h"
+#include "src/ir/dfa/dfa.h"
+#include "src/ir/dfa/state.h"
+#include "src/ir/regexp/regexp.h"
#include "src/ir/regexp/regexp_rule.h"
namespace re2c
#ifndef _RE2C_CODEGEN_SKELETON_SKELETON_
#define _RE2C_CODEGEN_SKELETON_SKELETON_
+#include "src/util/c99_stdint.h"
+#include <stddef.h>
+#include <stdio.h>
#include <limits>
#include <map>
+#include <set>
+#include <string>
+#include <vector>
#include "src/codegen/skeleton/path.h"
#include "src/codegen/skeleton/way.h"
-#include "src/ir/dfa/dfa.h"
-#include "src/util/c99_stdint.h"
-#include "src/util/forbid_copy.h"
+#include "src/ir/rule_rank.h"
+#include "src/parse/rules.h"
#include "src/util/local_increment.h"
+#include "src/util/forbid_copy.h"
#include "src/util/u32lim.h"
namespace re2c
{
+class DFA;
+class State;
+struct OutputFile;
+
struct Node
{
/*
+#include "src/util/c99_stdint.h"
+#include <map>
+#include <set>
+#include <utility>
+
+#include "src/codegen/skeleton/path.h"
#include "src/codegen/skeleton/skeleton.h"
+#include "src/conf/warn.h"
+#include "src/globals.h"
+#include "src/ir/rule_rank.h"
+#include "src/parse/rules.h"
namespace re2c
{
+#include <stddef.h>
+#include <algorithm>
+
#include "src/codegen/skeleton/way.h"
namespace re2c
#ifndef _RE2C_CODEGEN_SKELETON_WAY_
#define _RE2C_CODEGEN_SKELETON_WAY_
+#include "src/util/c99_stdint.h"
#include <stdio.h>
+#include <utility>
#include <vector>
-#include "src/util/c99_stdint.h"
-
namespace re2c
{
#ifndef _RE2C_CONF_OPT_
#define _RE2C_CONF_OPT_
+#include "src/util/c99_stdint.h"
+#include <stddef.h>
#include <string>
#include "src/codegen/input_api.h"
-#include "src/ir/regexp/encoding/enc.h"
#include "src/ir/regexp/empty_class_policy.h"
+#include "src/ir/regexp/encoding/enc.h"
+#include "src/util/forbid_copy.h"
namespace re2c
{
-#include <stdio.h>
-
+#include "src/codegen/input_api.h"
#include "src/conf/msg.h"
#include "src/conf/opt.h"
+#include "src/conf/warn.h"
#include "src/globals.h"
+#include "src/ir/regexp/empty_class_policy.h"
+#include "src/ir/regexp/encoding/enc.h"
namespace re2c
{
-#include <algorithm>
+#include <stddef.h>
#include <stdio.h>
+#include <algorithm>
+#include <set>
#include <string>
+#include <utility>
-#include "src/codegen/print.h"
#include "src/conf/msg.h"
#include "src/conf/warn.h"
+#include "src/ir/rule_rank.h"
namespace re2c {
#ifndef _RE2C_CONF_WARN_
#define _RE2C_CONF_WARN_
+#include "src/util/c99_stdint.h"
+#include <string>
#include <vector>
#include "src/codegen/skeleton/way.h"
#include "src/parse/rules.h"
-#include "src/util/c99_stdint.h"
namespace re2c {
#include <string.h>
+#include <algorithm>
-#include "src/codegen/skeleton/skeleton.h"
+#include "src/codegen/output.h"
#include "src/ir/bytecode/bytecode.h"
-#include "src/globals.h"
+#include "src/ir/bytecode/charset.h"
+#include "src/ir/bytecode/ins.h"
+#include "src/ir/dfa/dfa.h"
+#include "src/ir/regexp/regexp.h"
+#include "src/parse/spec.h"
namespace re2c {
#ifndef _RE2C_IR_BYTECODE_BYTECODE_
#define _RE2C_IR_BYTECODE_BYTECODE_
-#include "src/codegen/output.h"
-#include "src/ir/dfa/dfa.h"
-#include "src/ir/regexp/regexp.h"
-#include "src/parse/spec.h"
+#include "src/util/c99_stdint.h"
+#include <string>
+
#include "src/util/smart_ptr.h"
namespace re2c
{
+class DFA;
+struct Output;
+struct Spec;
+
smart_ptr<DFA> genCode (Spec & spec, Output & output, const std::string & cond, uint32_t cunits);
} // namespace re2c
+#include "src/util/c99_stdint.h"
+
+#include "src/ir/regexp/regexp.h"
#include "src/ir/regexp/regexp_alt.h"
#include "src/ir/regexp/regexp_cat.h"
#include "src/ir/regexp/regexp_close.h"
#include "src/ir/regexp/regexp_match.h"
#include "src/ir/regexp/regexp_null.h"
#include "src/ir/regexp/regexp_rule.h"
+#include "src/util/range.h"
namespace re2c
{
+#include "src/util/c99_stdint.h"
+
+#include "src/ir/bytecode/ins.h"
+#include "src/ir/regexp/regexp.h"
#include "src/ir/regexp/regexp_alt.h"
#include "src/ir/regexp/regexp_cat.h"
#include "src/ir/regexp/regexp_close.h"
#include "src/ir/regexp/regexp_match.h"
#include "src/ir/regexp/regexp_null.h"
#include "src/ir/regexp/regexp_rule.h"
+#include "src/util/range.h"
namespace re2c
{
#include "src/ir/bytecode/ins.h"
#include "src/ir/regexp/regexp_rule.h"
+#include "src/ir/rule_rank.h"
namespace re2c {
#ifndef _RE2C_IR_BYTECODE_INS_
#define _RE2C_IR_BYTECODE_INS_
-#include <iosfwd>
-
#include "src/util/c99_stdint.h"
+#include <iosfwd>
namespace re2c
{
+#include "src/util/c99_stdint.h"
+
+#include "src/ir/bytecode/charset.h"
+#include "src/ir/regexp/regexp.h"
#include "src/ir/regexp/regexp_alt.h"
#include "src/ir/regexp/regexp_cat.h"
#include "src/ir/regexp/regexp_close.h"
#include "src/ir/regexp/regexp_match.h"
#include "src/ir/regexp/regexp_null.h"
#include "src/ir/regexp/regexp_rule.h"
+#include "src/util/range.h"
namespace re2c {
#include <string.h>
+#include <map>
+#include <ostream>
+#include "src/codegen/go.h"
#include "src/codegen/skeleton/skeleton.h"
#include "src/ir/dfa/dfa.h"
+#include "src/ir/bytecode/ins.h"
+#include "src/ir/dfa/state.h"
#include "src/ir/regexp/regexp_rule.h"
+#include "src/ir/rule_rank.h"
#include "src/util/allocate.h"
namespace re2c
#ifndef _RE2C_IR_DFA_DFA_
#define _RE2C_IR_DFA_DFA_
+#include "src/util/c99_stdint.h"
+#include <set>
+#include <string>
+
#include "src/ir/dfa/action.h"
-#include "src/ir/dfa/state.h"
+#include "src/ir/regexp/regexp.h"
+#include "src/parse/rules.h"
#include "src/util/forbid_copy.h"
namespace re2c
{
struct Skeleton;
+class State;
+class label_t;
+struct Output;
+struct OutputFile;
+union Ins;
class DFA
{
#include "src/ir/regexp/encoding/enc.h"
+#include "src/util/range.h"
namespace re2c {
#define _RE2C_IR_REGEXP_ENCODING_ENC_
#include "src/util/c99_stdint.h"
-#include "src/util/range.h"
namespace re2c {
+class Range;
+
/*
* note [encodings]
*
#include "src/ir/regexp/encoding/range_suffix.h"
#include "src/ir/regexp/regexp.h"
#include "src/ir/regexp/regexp_match.h"
+#include "src/util/range.h"
namespace re2c {
#ifndef _RE2C_IR_REGEXP_ENCODING_RANGE_SUFFIX_
#define _RE2C_IR_REGEXP_ENCODING_RANGE_SUFFIX_
+#include "src/util/c99_stdint.h"
#include <stddef.h> // NULL
-#include "src/util/c99_stdint.h"
#include "src/util/forbid_copy.h"
#include "src/util/free_list.h"
namespace re2c {
-class RegExp; // forward
+class RegExp;
struct RangeSuffix
{
#include "src/ir/regexp/encoding/utf16/utf16_range.h"
-#include "src/ir/regexp/regexp.h"
+#include "src/ir/regexp/encoding/range_suffix.h"
namespace re2c {
#ifndef _RE2C_IR_REGEXP_ENCODING_UTF16_RANGE_
#define _RE2C_IR_REGEXP_ENCODING_UTF16_RANGE_
-#include "src/ir/regexp/encoding/range_suffix.h"
+#include "src/util/c99_stdint.h"
+
#include "src/ir/regexp/encoding/utf16/utf16.h"
namespace re2c {
+struct RangeSuffix;
+
void UTF16addContinuous1(RangeSuffix * & root, uint32_t l, uint32_t h);
void UTF16addContinuous2(RangeSuffix * & root, uint32_t l_ld, uint32_t h_ld, uint32_t l_tr, uint32_t h_tr);
void UTF16splitByContinuity(RangeSuffix * & root, uint32_t l_ld, uint32_t h_ld, uint32_t l_tr, uint32_t h_tr);
-#include "src/ir/regexp/encoding/utf16/utf16_range.h"
+#include "src/util/c99_stdint.h"
+
#include "src/ir/regexp/encoding/utf16/utf16_regexp.h"
-#include "src/ir/regexp/regexp.h"
+#include "src/ir/regexp/encoding/range_suffix.h"
+#include "src/ir/regexp/encoding/utf16/utf16_range.h"
#include "src/ir/regexp/regexp_cat.h"
#include "src/ir/regexp/regexp_match.h"
+#include "src/util/range.h"
namespace re2c {
#define _RE2C_IR_REGEXP_ENCODING_UTF16_REGEXP_
#include "src/ir/regexp/encoding/utf16/utf16.h"
-#include "src/util/range.h"
namespace re2c {
-class RegExp; // forward
+class Range;
+class RegExp;
RegExp * UTF16Symbol(utf16::rune r);
RegExp * UTF16Range(const Range * r);
#include "src/ir/regexp/encoding/utf8/utf8_range.h"
-#include "src/ir/regexp/regexp.h"
+#include "src/ir/regexp/encoding/range_suffix.h"
namespace re2c {
#ifndef _RE2C_IR_REGEXP_ENCODING_UTF8_RANGE_
#define _RE2C_IR_REGEXP_ENCODING_UTF8_RANGE_
-#include "src/ir/regexp/encoding/range_suffix.h"
+#include "src/util/c99_stdint.h"
+
#include "src/ir/regexp/encoding/utf8/utf8.h"
namespace re2c {
+struct RangeSuffix;
+
void UTF8addContinuous(RangeSuffix * & p, utf8::rune l, utf8::rune h, uint32_t n);
void UTF8splitByContinuity(RangeSuffix * & p, utf8::rune l, utf8::rune h, uint32_t n);
void UTF8splitByRuneLength(RangeSuffix * & p, utf8::rune l, utf8::rune h);
-#include "src/ir/regexp/encoding/utf8/utf8_range.h"
+#include "src/util/c99_stdint.h"
+
#include "src/ir/regexp/encoding/utf8/utf8_regexp.h"
-#include "src/ir/regexp/regexp.h"
+#include "src/ir/regexp/encoding/range_suffix.h"
+#include "src/ir/regexp/encoding/utf8/utf8_range.h"
#include "src/ir/regexp/regexp_cat.h"
#include "src/ir/regexp/regexp_match.h"
+#include "src/util/range.h"
namespace re2c {
#define _RE2C_IR_REGEXP_ENCODING_UTF8_REGEXP_
#include "src/ir/regexp/encoding/utf8/utf8.h"
-#include "src/util/range.h"
namespace re2c {
-class RegExp; // forward
+class Range;
+class RegExp;
RegExp * UTF8Symbol(utf8::rune r);
RegExp * UTF8Range(const Range * r);
+#include "src/util/c99_stdint.h"
+
#include "src/ir/regexp/regexp.h"
#include "src/ir/regexp/regexp_alt.h"
#include "src/ir/regexp/regexp_cat.h"
+#include "src/conf/opt.h"
+#include "src/conf/warn.h"
+#include "src/globals.h"
+#include "src/ir/regexp/empty_class_policy.h"
#include "src/ir/regexp/encoding/case.h"
+#include "src/ir/regexp/encoding/enc.h"
#include "src/ir/regexp/encoding/utf16/utf16_regexp.h"
#include "src/ir/regexp/encoding/utf8/utf8_regexp.h"
#include "src/ir/regexp/regexp.h"
#ifndef _RE2C_IR_REGEXP_REGEXP_
#define _RE2C_IR_REGEXP_REGEXP_
+#include "src/util/c99_stdint.h"
#include <iosfwd>
-#include "src/ir/bytecode/charset.h"
-#include "src/ir/bytecode/ins.h"
-#include "src/globals.h"
+#include "src/util/free_list.h"
#include "src/util/forbid_copy.h"
namespace re2c
{
+struct CharSet;
+union Ins;
+
typedef uint32_t Char;
class RegExp
#ifndef _RE2C_IR_RULE_RANK_
#define _RE2C_IR_RULE_RANK_
-#include <iosfwd>
-
#include "src/util/c99_stdint.h"
-#include "src/util/counter.h"
+#include <iosfwd>
namespace re2c
{
+template <typename num_t> class counter_t;
+
// rule rank public API:
// - get rule rank corresponding to nonexistent/default rule
// - check if rank corresponds to nonexistent/default rule
-#include "config.h"
+#include "src/util/c99_stdint.h"
+#include <string>
+
+#include "src/codegen/output.h"
#include "src/conf/msg.h"
#include "src/conf/opt.h"
+#include "src/conf/warn.h"
#include "src/globals.h"
+#include "src/parse/input.h"
#include "src/parse/parser.h"
+#include "src/parse/scanner.h"
namespace re2c
{
#ifndef _RE2C_PARSE_CODE_
#define _RE2C_PARSE_CODE_
-#include "src/parse/loc.h"
#include "src/util/c99_stdint.h"
+#include <stddef.h>
+#include <string>
+
+#include "src/parse/loc.h"
#include "src/util/free_list.h"
namespace re2c
-#include <stdlib.h>
+#include "src/util/c99_stdint.h"
+#include <stddef.h>
#include <string.h>
-#include <iostream>
+#include <algorithm>
#include <limits>
-#include <sstream>
+#include <string>
-#include "src/ir/dfa/dfa.h"
-#include "src/ir/regexp/regexp_null.h"
+#include "src/codegen/output.h"
+#include "src/conf/opt.h"
+#include "src/conf/warn.h"
#include "src/globals.h"
+#include "src/ir/regexp/encoding/enc.h"
+#include "src/ir/regexp/regexp.h"
+#include "src/ir/regexp/regexp_null.h"
+#include "src/parse/code.h"
#include "src/parse/extop.h"
-#include "src/parse/parser.h"
+#include "src/parse/input.h"
#include "src/parse/scanner.h"
+#include "src/parse/parser.h" // needed by "y.tab.h"
#include "src/parse/unescape.h"
-#include "y.tab.h"
+#include "src/util/range.h"
#include "src/util/s_to_n32_unsafe.h"
+#include "y.tab.h"
extern YYSTYPE yylval;
+#include "src/util/c99_stdint.h"
+#include <string>
+
+#include "src/codegen/output.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
+#include "src/ir/regexp/encoding/enc.h"
#include "src/parse/scanner.h"
#include "src/util/s_to_n32_unsafe.h"
%{
+#include "src/util/c99_stdint.h"
#include <assert.h>
-#include <time.h>
-#include <string.h>
+#include <stddef.h>
#include <stdlib.h>
-#include <iostream>
#include <limits>
+#include <list>
+#include <map>
#include <set>
+#include <string>
+#include <utility>
+#include <vector>
-#include "config.h"
+#include "src/codegen/output.h"
#include "src/codegen/skeleton/skeleton.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
#include "src/ir/bytecode/bytecode.h"
+#include "src/ir/dfa/dfa.h"
#include "src/ir/regexp/encoding/enc.h"
#include "src/ir/regexp/encoding/range_suffix.h"
+#include "src/ir/regexp/regexp.h"
#include "src/ir/regexp/regexp_cat.h"
#include "src/ir/regexp/regexp_close.h"
#include "src/ir/regexp/regexp_null.h"
-#include "src/globals.h"
+#include "src/ir/regexp/regexp_rule.h"
+#include "src/ir/rule_rank.h"
#include "src/parse/code.h"
#include "src/parse/extop.h"
+#include "src/parse/loc.h"
#include "src/parse/parser.h"
-#include "src/util/c99_stdint.h"
+#include "src/parse/scanner.h"
+#include "src/parse/spec.h"
+#include "src/util/counter.h"
+#include "src/util/free_list.h"
+#include "src/util/range.h"
#include "src/util/smart_ptr.h"
#define YYMALLOC malloc
-#include <iostream>
#include <stdarg.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
-#include "scanner.h"
+#include <iostream>
+#include <new>
+
+#include "src/codegen/label.h"
+#include "src/codegen/output.h"
+#include "src/conf/opt.h"
+#include "src/globals.h"
+#include "src/parse/scanner.h"
+#include "src/util/counter.h"
// used by Scanner::fatal_at and Scanner::fatalf
#if defined(_MSC_VER) && !defined(vsnprintf)
#ifndef _RE2C_PARSE_SCANNER_
#define _RE2C_PARSE_SCANNER_
+#include "src/util/c99_stdint.h"
+#include <stddef.h>
#include <string>
-#include "src/codegen/output.h"
-#include "src/ir/regexp/regexp.h"
-#include "src/globals.h"
-#include "src/parse/code.h"
#include "src/parse/input.h"
#include "src/util/attribute.h"
#include "src/util/forbid_copy.h"
namespace re2c
{
+class Range;
+class RegExp;
+struct OutputFile;
+
struct ScannerState
{
enum lexer_state_t
-#include <string.h>
-
-#include "src/parse/scanner.h"
#include "src/parse/unescape.h"
namespace re2c {
#ifndef _RE2C_UTIL_RANGE_
#define _RE2C_UTIL_RANGE_
+#include "src/util/c99_stdint.h"
#include <assert.h>
#include <stddef.h> // NULL
#include "src/test/range/test.h"
-#include "src/util/c99_stdint.h"
#include "src/util/forbid_copy.h"
#include "src/util/free_list.h"