-/* Generated by re2c 1.1.1 on Sat Jan 5 22:53:11 2019 */
+/* Generated by re2c 1.1.1 on Tue Feb 5 11:51:11 2019 */
#line 1 "../src/options/parse_opts.re"
#include "src/codegen/input_api.h"
#include "src/options/msg.h"
#line 944 "src/options/parse_opts.cc"
yy206:
++YYCURSOR;
-#line 121 "../src/options/parse_opts.re"
+#line 126 "../src/options/parse_opts.re"
{ goto opt_short; }
#line 949 "src/options/parse_opts.cc"
yy208:
++YYCURSOR;
-#line 110 "../src/options/parse_opts.re"
+#line 109 "../src/options/parse_opts.re"
{ opts.set_encoding(Enc::UTF8); goto opt_short; }
#line 954 "src/options/parse_opts.cc"
yy210:
yy216:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 0x00) goto yy256;
-#line 113 "../src/options/parse_opts.re"
+#line 118 "../src/options/parse_opts.re"
{ *argv = YYCURSOR; goto opt_incpath; }
#line 975 "src/options/parse_opts.cc"
yy218:
++YYCURSOR;
-#line 105 "../src/options/parse_opts.re"
- { opts.set_posix_captures(true); goto opt_short; }
-#line 980 "src/options/parse_opts.cc"
+#line 111 "../src/options/parse_opts.re"
+ {
+ opts.set_posix_syntax(true);
+ opts.set_posix_semantics(true);
+ goto opt_short;
+ }
+#line 984 "src/options/parse_opts.cc"
yy220:
++YYCURSOR;
#line 97 "../src/options/parse_opts.re"
{ globopts.target = TARGET_SKELETON; goto opt_short; }
-#line 985 "src/options/parse_opts.cc"
+#line 989 "src/options/parse_opts.cc"
yy222:
++YYCURSOR;
#line 104 "../src/options/parse_opts.re"
{ opts.set_tags(true); goto opt_short; }
-#line 990 "src/options/parse_opts.cc"
+#line 994 "src/options/parse_opts.cc"
yy224:
++YYCURSOR;
#line 90 "../src/options/parse_opts.re"
{ vernum (); return EXIT_OK; }
-#line 995 "src/options/parse_opts.cc"
+#line 999 "src/options/parse_opts.cc"
yy226:
++YYCURSOR;
#line 99 "../src/options/parse_opts.re"
{ opts.set_bFlag(true); goto opt_short; }
-#line 1000 "src/options/parse_opts.cc"
+#line 1004 "src/options/parse_opts.cc"
yy228:
++YYCURSOR;
#line 92 "../src/options/parse_opts.re"
{ globopts.cFlag = true; goto opt_short; }
-#line 1005 "src/options/parse_opts.cc"
+#line 1009 "src/options/parse_opts.cc"
yy230:
++YYCURSOR;
#line 100 "../src/options/parse_opts.re"
{ opts.set_dFlag(true); goto opt_short; }
-#line 1010 "src/options/parse_opts.cc"
+#line 1014 "src/options/parse_opts.cc"
yy232:
++YYCURSOR;
-#line 106 "../src/options/parse_opts.re"
+#line 105 "../src/options/parse_opts.re"
{ opts.set_encoding(Enc::EBCDIC); goto opt_short; }
-#line 1015 "src/options/parse_opts.cc"
+#line 1019 "src/options/parse_opts.cc"
yy234:
++YYCURSOR;
#line 94 "../src/options/parse_opts.re"
{ globopts.fFlag = true; goto opt_short; }
-#line 1020 "src/options/parse_opts.cc"
+#line 1024 "src/options/parse_opts.cc"
yy236:
++YYCURSOR;
#line 101 "../src/options/parse_opts.re"
{ opts.set_gFlag(true); goto opt_short; }
-#line 1025 "src/options/parse_opts.cc"
+#line 1029 "src/options/parse_opts.cc"
yy238:
++YYCURSOR;
#line 102 "../src/options/parse_opts.re"
{ opts.set_iFlag(true); goto opt_short; }
-#line 1030 "src/options/parse_opts.cc"
+#line 1034 "src/options/parse_opts.cc"
yy240:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 0x00) goto yy258;
-#line 116 "../src/options/parse_opts.re"
+#line 121 "../src/options/parse_opts.re"
{ *argv = YYCURSOR; goto opt_output; }
-#line 1036 "src/options/parse_opts.cc"
+#line 1040 "src/options/parse_opts.cc"
yy242:
++YYCURSOR;
#line 96 "../src/options/parse_opts.re"
{ globopts.rFlag = true; goto opt_short; }
-#line 1041 "src/options/parse_opts.cc"
+#line 1045 "src/options/parse_opts.cc"
yy244:
++YYCURSOR;
#line 103 "../src/options/parse_opts.re"
{ opts.set_sFlag(true); goto opt_short; }
-#line 1046 "src/options/parse_opts.cc"
+#line 1050 "src/options/parse_opts.cc"
yy246:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 0x00) goto yy260;
-#line 119 "../src/options/parse_opts.re"
+#line 124 "../src/options/parse_opts.re"
{ *argv = YYCURSOR; goto opt_header; }
-#line 1052 "src/options/parse_opts.cc"
+#line 1056 "src/options/parse_opts.cc"
yy248:
++YYCURSOR;
-#line 107 "../src/options/parse_opts.re"
+#line 106 "../src/options/parse_opts.re"
{ opts.set_encoding(Enc::UTF32); goto opt_short; }
-#line 1057 "src/options/parse_opts.cc"
+#line 1061 "src/options/parse_opts.cc"
yy250:
++YYCURSOR;
#line 89 "../src/options/parse_opts.re"
{ version (); return EXIT_OK; }
-#line 1062 "src/options/parse_opts.cc"
+#line 1066 "src/options/parse_opts.cc"
yy252:
++YYCURSOR;
-#line 108 "../src/options/parse_opts.re"
+#line 107 "../src/options/parse_opts.re"
{ opts.set_encoding(Enc::UCS2); goto opt_short; }
-#line 1067 "src/options/parse_opts.cc"
+#line 1071 "src/options/parse_opts.cc"
yy254:
++YYCURSOR;
-#line 109 "../src/options/parse_opts.re"
+#line 108 "../src/options/parse_opts.re"
{ opts.set_encoding(Enc::UTF16); goto opt_short; }
-#line 1072 "src/options/parse_opts.cc"
+#line 1076 "src/options/parse_opts.cc"
yy256:
++YYCURSOR;
-#line 112 "../src/options/parse_opts.re"
+#line 117 "../src/options/parse_opts.re"
{ NEXT_ARG("-I", opt_incpath); }
-#line 1077 "src/options/parse_opts.cc"
+#line 1081 "src/options/parse_opts.cc"
yy258:
++YYCURSOR;
-#line 115 "../src/options/parse_opts.re"
+#line 120 "../src/options/parse_opts.re"
{ NEXT_ARG("-o, --output", opt_output); }
-#line 1082 "src/options/parse_opts.cc"
+#line 1086 "src/options/parse_opts.cc"
yy260:
++YYCURSOR;
-#line 118 "../src/options/parse_opts.re"
+#line 123 "../src/options/parse_opts.re"
{ NEXT_ARG("-t, --type-header", opt_header); }
-#line 1087 "src/options/parse_opts.cc"
+#line 1091 "src/options/parse_opts.cc"
}
-#line 122 "../src/options/parse_opts.re"
+#line 127 "../src/options/parse_opts.re"
opt_long:
-#line 1094 "src/options/parse_opts.cc"
+#line 1098 "src/options/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
yy264:
++YYCURSOR;
yy265:
-#line 126 "../src/options/parse_opts.re"
+#line 131 "../src/options/parse_opts.re"
{ ERROR("bad long option: %s", *argv); }
-#line 1122 "src/options/parse_opts.cc"
+#line 1126 "src/options/parse_opts.cc"
yy266:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'i') goto yy282;
goto yy283;
yy348:
++YYCURSOR;
-#line 150 "../src/options/parse_opts.re"
+#line 154 "../src/options/parse_opts.re"
{ opts.set_encoding(Enc::EBCDIC); goto opt; }
-#line 1488 "src/options/parse_opts.cc"
+#line 1492 "src/options/parse_opts.cc"
yy350:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '-') goto yy384;
goto yy283;
yy388:
++YYCURSOR;
-#line 128 "../src/options/parse_opts.re"
+#line 133 "../src/options/parse_opts.re"
{ usage (); return EXIT_OK; }
-#line 1652 "src/options/parse_opts.cc"
+#line 1656 "src/options/parse_opts.cc"
yy390:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 0x00) goto yy429;
goto yy283;
yy404:
++YYCURSOR;
-#line 148 "../src/options/parse_opts.re"
+#line 153 "../src/options/parse_opts.re"
{ opts.set_tags (true); goto opt; }
-#line 1713 "src/options/parse_opts.cc"
+#line 1717 "src/options/parse_opts.cc"
yy406:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'h') goto yy444;
goto yy283;
yy429:
++YYCURSOR;
-#line 159 "../src/options/parse_opts.re"
+#line 169 "../src/options/parse_opts.re"
{ NEXT_ARG("--input", opt_input); }
-#line 1811 "src/options/parse_opts.cc"
+#line 1815 "src/options/parse_opts.cc"
yy431:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '-') goto yy469;
goto yy283;
yy447:
++YYCURSOR;
-#line 154 "../src/options/parse_opts.re"
+#line 158 "../src/options/parse_opts.re"
{ opts.set_encoding(Enc::UTF8); goto opt; }
-#line 1880 "src/options/parse_opts.cc"
+#line 1884 "src/options/parse_opts.cc"
yy449:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 0x00) goto yy487;
goto yy283;
yy475:
++YYCURSOR;
-#line 156 "../src/options/parse_opts.re"
+#line 166 "../src/options/parse_opts.re"
{ NEXT_ARG("-o, --output", opt_output); }
-#line 1990 "src/options/parse_opts.cc"
+#line 1994 "src/options/parse_opts.cc"
yy477:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'a') goto yy515;
goto yy283;
yy485:
++YYCURSOR;
-#line 153 "../src/options/parse_opts.re"
+#line 157 "../src/options/parse_opts.re"
{ opts.set_encoding(Enc::UTF16); goto opt; }
-#line 2028 "src/options/parse_opts.cc"
+#line 2032 "src/options/parse_opts.cc"
yy487:
++YYCURSOR;
-#line 130 "../src/options/parse_opts.re"
+#line 135 "../src/options/parse_opts.re"
{ vernum (); return EXIT_OK; }
-#line 2033 "src/options/parse_opts.cc"
+#line 2037 "src/options/parse_opts.cc"
yy489:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 0x00) goto yy525;
goto yy283;
yy523:
++YYCURSOR;
-#line 151 "../src/options/parse_opts.re"
+#line 155 "../src/options/parse_opts.re"
{ opts.set_encoding(Enc::UTF32); goto opt; }
-#line 2174 "src/options/parse_opts.cc"
+#line 2178 "src/options/parse_opts.cc"
yy525:
++YYCURSOR;
-#line 129 "../src/options/parse_opts.re"
+#line 134 "../src/options/parse_opts.re"
{ version (); return EXIT_OK; }
-#line 2179 "src/options/parse_opts.cc"
+#line 2183 "src/options/parse_opts.cc"
yy527:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy564;
goto yy283;
yy536:
++YYCURSOR;
-#line 178 "../src/options/parse_opts.re"
+#line 188 "../src/options/parse_opts.re"
{ globopts.dump_cfg = true; goto opt; }
-#line 2220 "src/options/parse_opts.cc"
+#line 2224 "src/options/parse_opts.cc"
yy538:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'u') goto yy574;
goto yy283;
yy541:
++YYCURSOR;
-#line 172 "../src/options/parse_opts.re"
+#line 182 "../src/options/parse_opts.re"
{ globopts.dump_nfa = true; goto opt; }
-#line 2242 "src/options/parse_opts.cc"
+#line 2246 "src/options/parse_opts.cc"
yy543:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'p') goto yy580;
goto yy283;
yy544:
++YYCURSOR;
-#line 133 "../src/options/parse_opts.re"
+#line 138 "../src/options/parse_opts.re"
{ globopts.target = TARGET_DOT; goto opt; }
-#line 2251 "src/options/parse_opts.cc"
+#line 2255 "src/options/parse_opts.cc"
yy546:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 's') goto yy581;
goto yy283;
yy557:
++YYCURSOR;
-#line 136 "../src/options/parse_opts.re"
+#line 141 "../src/options/parse_opts.re"
{ globopts.rFlag = true; goto opt; }
-#line 2300 "src/options/parse_opts.cc"
+#line 2304 "src/options/parse_opts.cc"
yy559:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 's') goto yy592;
goto yy283;
yy560:
++YYCURSOR;
-#line 139 "../src/options/parse_opts.re"
+#line 144 "../src/options/parse_opts.re"
{ globopts.target = TARGET_SKELETON; goto opt; }
-#line 2309 "src/options/parse_opts.cc"
+#line 2313 "src/options/parse_opts.cc"
yy562:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 's') goto yy593;
goto yy283;
yy572:
++YYCURSOR;
-#line 177 "../src/options/parse_opts.re"
+#line 187 "../src/options/parse_opts.re"
{ globopts.dump_adfa = true; goto opt; }
-#line 2354 "src/options/parse_opts.cc"
+#line 2358 "src/options/parse_opts.cc"
yy574:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy604;
goto yy283;
yy600:
++YYCURSOR;
-#line 132 "../src/options/parse_opts.re"
+#line 137 "../src/options/parse_opts.re"
{ globopts.cFlag = true; goto opt; }
-#line 2463 "src/options/parse_opts.cc"
+#line 2467 "src/options/parse_opts.cc"
yy602:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 't') goto yy635;
goto yy283;
yy610:
++YYCURSOR;
-#line 169 "../src/options/parse_opts.re"
+#line 179 "../src/options/parse_opts.re"
{ globopts.eager_skip = true; goto opt; }
-#line 2500 "src/options/parse_opts.cc"
+#line 2504 "src/options/parse_opts.cc"
yy612:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 0x00) goto yy644;
goto yy283;
yy615:
++YYCURSOR;
-#line 145 "../src/options/parse_opts.re"
+#line 150 "../src/options/parse_opts.re"
{ opts.set_sFlag (true); goto opt; }
-#line 2517 "src/options/parse_opts.cc"
+#line 2521 "src/options/parse_opts.cc"
yy617:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'f') goto yy649;
goto yy283;
yy621:
++YYCURSOR;
-#line 138 "../src/options/parse_opts.re"
+#line 143 "../src/options/parse_opts.re"
{ globopts.version = false; goto opt; }
-#line 2538 "src/options/parse_opts.cc"
+#line 2542 "src/options/parse_opts.cc"
yy623:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy653;
goto yy283;
yy628:
++YYCURSOR;
-#line 152 "../src/options/parse_opts.re"
+#line 156 "../src/options/parse_opts.re"
{ opts.set_encoding(Enc::UCS2); goto opt; }
-#line 2563 "src/options/parse_opts.cc"
+#line 2567 "src/options/parse_opts.cc"
yy630:
++YYCURSOR;
-#line 141 "../src/options/parse_opts.re"
+#line 146 "../src/options/parse_opts.re"
{ opts.set_bFlag (true); goto opt; }
-#line 2568 "src/options/parse_opts.cc"
+#line 2572 "src/options/parse_opts.cc"
yy632:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 't') goto yy660;
goto yy283;
yy642:
++YYCURSOR;
-#line 179 "../src/options/parse_opts.re"
+#line 189 "../src/options/parse_opts.re"
{ globopts.dump_interf = true; goto opt; }
-#line 2613 "src/options/parse_opts.cc"
+#line 2617 "src/options/parse_opts.cc"
yy644:
++YYCURSOR;
-#line 160 "../src/options/parse_opts.re"
+#line 170 "../src/options/parse_opts.re"
{ NEXT_ARG("--empty-class", opt_empty_class); }
-#line 2618 "src/options/parse_opts.cc"
+#line 2622 "src/options/parse_opts.cc"
yy646:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'i') goto yy674;
goto yy283;
yy647:
++YYCURSOR;
-#line 135 "../src/options/parse_opts.re"
+#line 140 "../src/options/parse_opts.re"
{ globopts.FFlag = true; goto opt; }
-#line 2627 "src/options/parse_opts.cc"
+#line 2631 "src/options/parse_opts.cc"
yy649:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'o') goto yy675;
goto yy283;
yy655:
++YYCURSOR;
-#line 162 "../src/options/parse_opts.re"
+#line 172 "../src/options/parse_opts.re"
{ goto opt; }
-#line 2656 "src/options/parse_opts.cc"
+#line 2660 "src/options/parse_opts.cc"
yy657:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 't') goto yy682;
goto yy283;
yy658:
++YYCURSOR;
-#line 157 "../src/options/parse_opts.re"
+#line 167 "../src/options/parse_opts.re"
{ NEXT_ARG("-t, --type-header", opt_header); }
-#line 2665 "src/options/parse_opts.cc"
+#line 2669 "src/options/parse_opts.cc"
yy660:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'i') goto yy683;
goto yy283;
yy663:
++YYCURSOR;
-#line 142 "../src/options/parse_opts.re"
+#line 147 "../src/options/parse_opts.re"
{ opts.set_dFlag (true); goto opt; }
-#line 2682 "src/options/parse_opts.cc"
+#line 2686 "src/options/parse_opts.cc"
yy665:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'i') goto yy687;
goto yy283;
yy667:
++YYCURSOR;
-#line 174 "../src/options/parse_opts.re"
+#line 184 "../src/options/parse_opts.re"
{ globopts.dump_dfa_det = true; goto opt; }
-#line 2695 "src/options/parse_opts.cc"
+#line 2699 "src/options/parse_opts.cc"
yy669:
++YYCURSOR;
-#line 176 "../src/options/parse_opts.re"
+#line 186 "../src/options/parse_opts.re"
{ globopts.dump_dfa_min = true; goto opt; }
-#line 2700 "src/options/parse_opts.cc"
+#line 2704 "src/options/parse_opts.cc"
yy671:
++YYCURSOR;
-#line 173 "../src/options/parse_opts.re"
+#line 183 "../src/options/parse_opts.re"
{ globopts.dump_dfa_raw = true; goto opt; }
-#line 2705 "src/options/parse_opts.cc"
+#line 2709 "src/options/parse_opts.cc"
yy673:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'p') goto yy689;
goto yy283;
yy677:
++YYCURSOR;
-#line 167 "../src/options/parse_opts.re"
+#line 177 "../src/options/parse_opts.re"
{ globopts.lookahead = false; goto opt; }
-#line 2726 "src/options/parse_opts.cc"
+#line 2730 "src/options/parse_opts.cc"
yy679:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'a') goto yy694;
goto yy283;
yy684:
++YYCURSOR;
-#line 147 "../src/options/parse_opts.re"
+#line 152 "../src/options/parse_opts.re"
{ opts.set_bCaseInverted (true); goto opt; }
-#line 2751 "src/options/parse_opts.cc"
+#line 2755 "src/options/parse_opts.cc"
yy686:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 0x00) goto yy700;
goto yy283;
yy691:
++YYCURSOR;
-#line 144 "../src/options/parse_opts.re"
+#line 149 "../src/options/parse_opts.re"
{ opts.set_iFlag (true); goto opt; }
-#line 2776 "src/options/parse_opts.cc"
+#line 2780 "src/options/parse_opts.cc"
yy693:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'd') goto yy706;
goto yy283;
yy696:
++YYCURSOR;
-#line 166 "../src/options/parse_opts.re"
+#line 176 "../src/options/parse_opts.re"
{ NEXT_ARG("--posix-closure", opt_posix_closure); }
-#line 2793 "src/options/parse_opts.cc"
+#line 2797 "src/options/parse_opts.cc"
yy698:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 0x00) goto yy710;
goto yy283;
yy700:
++YYCURSOR;
-#line 143 "../src/options/parse_opts.re"
+#line 148 "../src/options/parse_opts.re"
{ opts.set_gFlag (true); goto opt; }
-#line 2806 "src/options/parse_opts.cc"
+#line 2810 "src/options/parse_opts.cc"
yy702:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'n') goto yy713;
goto yy283;
yy708:
++YYCURSOR;
-#line 149 "../src/options/parse_opts.re"
- { opts.set_posix_captures(true); goto opt; }
-#line 2835 "src/options/parse_opts.cc"
+#line 160 "../src/options/parse_opts.re"
+ {
+ opts.set_posix_syntax(true);
+ opts.set_posix_semantics(true);
+ goto opt;
+ }
+#line 2843 "src/options/parse_opts.cc"
yy710:
++YYCURSOR;
-#line 134 "../src/options/parse_opts.re"
+#line 139 "../src/options/parse_opts.re"
{ globopts.fFlag = true; goto opt; }
-#line 2840 "src/options/parse_opts.cc"
+#line 2848 "src/options/parse_opts.cc"
yy712:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 0x00) goto yy721;
goto yy283;
yy715:
++YYCURSOR;
-#line 175 "../src/options/parse_opts.re"
+#line 185 "../src/options/parse_opts.re"
{ globopts.dump_dfa_tagopt = true; goto opt; }
-#line 2857 "src/options/parse_opts.cc"
+#line 2865 "src/options/parse_opts.cc"
yy717:
++YYCURSOR;
-#line 158 "../src/options/parse_opts.re"
+#line 168 "../src/options/parse_opts.re"
{ NEXT_ARG("--encoding-policy", opt_encoding_policy); }
-#line 2862 "src/options/parse_opts.cc"
+#line 2870 "src/options/parse_opts.cc"
yy719:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 't') goto yy726;
goto yy283;
yy721:
++YYCURSOR;
-#line 146 "../src/options/parse_opts.re"
+#line 151 "../src/options/parse_opts.re"
{ opts.set_bCaseInsensitive (true); goto opt; }
-#line 2875 "src/options/parse_opts.cc"
+#line 2883 "src/options/parse_opts.cc"
yy723:
++YYCURSOR;
-#line 165 "../src/options/parse_opts.re"
+#line 175 "../src/options/parse_opts.re"
{ NEXT_ARG("--dfa-minimization", opt_dfa_minimization); }
-#line 2880 "src/options/parse_opts.cc"
+#line 2888 "src/options/parse_opts.cc"
yy725:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 's') goto yy729;
goto yy283;
yy727:
++YYCURSOR;
-#line 168 "../src/options/parse_opts.re"
+#line 178 "../src/options/parse_opts.re"
{ globopts.optimize_tags = false; goto opt; }
-#line 2893 "src/options/parse_opts.cc"
+#line 2901 "src/options/parse_opts.cc"
yy729:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 0x00) goto yy731;
goto yy283;
yy731:
++YYCURSOR;
-#line 180 "../src/options/parse_opts.re"
+#line 190 "../src/options/parse_opts.re"
{ globopts.dump_closure_stats = true; goto opt; }
-#line 2906 "src/options/parse_opts.cc"
+#line 2914 "src/options/parse_opts.cc"
yy733:
++YYCURSOR;
-#line 137 "../src/options/parse_opts.re"
+#line 142 "../src/options/parse_opts.re"
{ globopts.bNoGenerationDate = true; goto opt; }
-#line 2911 "src/options/parse_opts.cc"
+#line 2919 "src/options/parse_opts.cc"
}
-#line 181 "../src/options/parse_opts.re"
+#line 191 "../src/options/parse_opts.re"
opt_output:
-#line 2918 "src/options/parse_opts.cc"
+#line 2926 "src/options/parse_opts.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
if (yych != '-') goto yy739;
yy737:
++YYCURSOR;
-#line 185 "../src/options/parse_opts.re"
+#line 195 "../src/options/parse_opts.re"
{ ERROR("bad argument to option -o, --output: %s", *argv); }
-#line 2962 "src/options/parse_opts.cc"
+#line 2970 "src/options/parse_opts.cc"
yy739:
yych = (YYCTYPE)*++YYCURSOR;
if (yybm[0+yych] & 128) {
goto yy739;
}
++YYCURSOR;
-#line 186 "../src/options/parse_opts.re"
+#line 196 "../src/options/parse_opts.re"
{ opts.set_output_file (*argv); goto opt; }
-#line 2971 "src/options/parse_opts.cc"
+#line 2979 "src/options/parse_opts.cc"
}
-#line 187 "../src/options/parse_opts.re"
+#line 197 "../src/options/parse_opts.re"
opt_header:
-#line 2978 "src/options/parse_opts.cc"
+#line 2986 "src/options/parse_opts.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
if (yych != '-') goto yy747;
yy745:
++YYCURSOR;
-#line 191 "../src/options/parse_opts.re"
+#line 201 "../src/options/parse_opts.re"
{ ERROR("bad argument to option -t, --type-header: %s", *argv); }
-#line 3022 "src/options/parse_opts.cc"
+#line 3030 "src/options/parse_opts.cc"
yy747:
yych = (YYCTYPE)*++YYCURSOR;
if (yybm[0+yych] & 128) {
goto yy747;
}
++YYCURSOR;
-#line 192 "../src/options/parse_opts.re"
+#line 202 "../src/options/parse_opts.re"
{ opts.set_header_file (*argv); goto opt; }
-#line 3031 "src/options/parse_opts.cc"
+#line 3039 "src/options/parse_opts.cc"
}
-#line 193 "../src/options/parse_opts.re"
+#line 203 "../src/options/parse_opts.re"
opt_incpath:
-#line 3038 "src/options/parse_opts.cc"
+#line 3046 "src/options/parse_opts.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
if (yych != '-') goto yy755;
yy753:
++YYCURSOR;
-#line 197 "../src/options/parse_opts.re"
+#line 207 "../src/options/parse_opts.re"
{ ERROR("bad argument to option -I: %s", *argv); }
-#line 3082 "src/options/parse_opts.cc"
+#line 3090 "src/options/parse_opts.cc"
yy755:
yych = (YYCTYPE)*++YYCURSOR;
if (yybm[0+yych] & 128) {
goto yy755;
}
++YYCURSOR;
-#line 198 "../src/options/parse_opts.re"
+#line 208 "../src/options/parse_opts.re"
{ globopts.incpaths.push_back(*argv); goto opt; }
-#line 3091 "src/options/parse_opts.cc"
+#line 3099 "src/options/parse_opts.cc"
}
-#line 199 "../src/options/parse_opts.re"
+#line 209 "../src/options/parse_opts.re"
opt_encoding_policy:
-#line 3098 "src/options/parse_opts.cc"
+#line 3106 "src/options/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
}
++YYCURSOR;
yy762:
-#line 203 "../src/options/parse_opts.re"
+#line 213 "../src/options/parse_opts.re"
{
ERROR("bad argument to option --encoding-policy "
"(expected: ignore | substitute | fail): %s", *argv);
}
-#line 3115 "src/options/parse_opts.cc"
+#line 3123 "src/options/parse_opts.cc"
yy763:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'a') goto yy766;
goto yy767;
yy776:
++YYCURSOR;
-#line 209 "../src/options/parse_opts.re"
+#line 219 "../src/options/parse_opts.re"
{ opts.set_encoding_policy (Enc::POLICY_FAIL); goto opt; }
-#line 3170 "src/options/parse_opts.cc"
+#line 3178 "src/options/parse_opts.cc"
yy778:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy780;
goto yy767;
yy782:
++YYCURSOR;
-#line 207 "../src/options/parse_opts.re"
+#line 217 "../src/options/parse_opts.re"
{ opts.set_encoding_policy (Enc::POLICY_IGNORE); goto opt; }
-#line 3191 "src/options/parse_opts.cc"
+#line 3199 "src/options/parse_opts.cc"
yy784:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'u') goto yy767;
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy767;
++YYCURSOR;
-#line 208 "../src/options/parse_opts.re"
+#line 218 "../src/options/parse_opts.re"
{ opts.set_encoding_policy (Enc::POLICY_SUBSTITUTE); goto opt; }
-#line 3204 "src/options/parse_opts.cc"
+#line 3212 "src/options/parse_opts.cc"
}
-#line 210 "../src/options/parse_opts.re"
+#line 220 "../src/options/parse_opts.re"
opt_input:
-#line 3211 "src/options/parse_opts.cc"
+#line 3219 "src/options/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
yy792:
++YYCURSOR;
yy793:
-#line 214 "../src/options/parse_opts.re"
+#line 224 "../src/options/parse_opts.re"
{
ERROR("bad argument to option --input "
"(expected: default | custom): %s", *argv);
}
-#line 3226 "src/options/parse_opts.cc"
+#line 3234 "src/options/parse_opts.cc"
yy794:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'u') goto yy796;
goto yy797;
yy807:
++YYCURSOR;
-#line 219 "../src/options/parse_opts.re"
+#line 229 "../src/options/parse_opts.re"
{ opts.set_input_api(INPUT_CUSTOM); goto opt; }
-#line 3281 "src/options/parse_opts.cc"
+#line 3289 "src/options/parse_opts.cc"
yy809:
yych = (YYCTYPE)*++YYCURSOR;
if (yych >= 0x01) goto yy797;
++YYCURSOR;
-#line 218 "../src/options/parse_opts.re"
+#line 228 "../src/options/parse_opts.re"
{ opts.set_input_api(INPUT_DEFAULT); goto opt; }
-#line 3288 "src/options/parse_opts.cc"
+#line 3296 "src/options/parse_opts.cc"
}
-#line 220 "../src/options/parse_opts.re"
+#line 230 "../src/options/parse_opts.re"
opt_empty_class:
-#line 3295 "src/options/parse_opts.cc"
+#line 3303 "src/options/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
if (yych == 'm') goto yy817;
++YYCURSOR;
yy815:
-#line 224 "../src/options/parse_opts.re"
+#line 234 "../src/options/parse_opts.re"
{
ERROR("bad argument to option --empty-class "
"(expected: match-empty | match-none | error): %s", *argv);
}
-#line 3308 "src/options/parse_opts.cc"
+#line 3316 "src/options/parse_opts.cc"
yy816:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'r') goto yy818;
goto yy819;
yy827:
++YYCURSOR;
-#line 230 "../src/options/parse_opts.re"
+#line 240 "../src/options/parse_opts.re"
{ opts.set_empty_class_policy (EMPTY_CLASS_ERROR); goto opt; }
-#line 3355 "src/options/parse_opts.cc"
+#line 3363 "src/options/parse_opts.cc"
yy829:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy830;
goto yy819;
yy839:
++YYCURSOR;
-#line 229 "../src/options/parse_opts.re"
+#line 239 "../src/options/parse_opts.re"
{ opts.set_empty_class_policy (EMPTY_CLASS_MATCH_NONE); goto opt; }
-#line 3401 "src/options/parse_opts.cc"
+#line 3409 "src/options/parse_opts.cc"
yy841:
++YYCURSOR;
-#line 228 "../src/options/parse_opts.re"
+#line 238 "../src/options/parse_opts.re"
{ opts.set_empty_class_policy (EMPTY_CLASS_MATCH_EMPTY); goto opt; }
-#line 3406 "src/options/parse_opts.cc"
+#line 3414 "src/options/parse_opts.cc"
}
-#line 231 "../src/options/parse_opts.re"
+#line 241 "../src/options/parse_opts.re"
opt_dfa_minimization:
-#line 3413 "src/options/parse_opts.cc"
+#line 3421 "src/options/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
if (yych == 't') goto yy848;
++YYCURSOR;
yy846:
-#line 235 "../src/options/parse_opts.re"
+#line 245 "../src/options/parse_opts.re"
{
ERROR("bad argument to option --dfa-minimization "
"(expected: table | moore): %s", *argv);
}
-#line 3426 "src/options/parse_opts.cc"
+#line 3434 "src/options/parse_opts.cc"
yy847:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'o') goto yy849;
goto yy850;
yy858:
++YYCURSOR;
-#line 240 "../src/options/parse_opts.re"
+#line 250 "../src/options/parse_opts.re"
{ globopts.dfa_minimization = DFA_MINIMIZATION_MOORE; goto opt; }
-#line 3473 "src/options/parse_opts.cc"
+#line 3481 "src/options/parse_opts.cc"
yy860:
++YYCURSOR;
-#line 239 "../src/options/parse_opts.re"
+#line 249 "../src/options/parse_opts.re"
{ globopts.dfa_minimization = DFA_MINIMIZATION_TABLE; goto opt; }
-#line 3478 "src/options/parse_opts.cc"
+#line 3486 "src/options/parse_opts.cc"
}
-#line 241 "../src/options/parse_opts.re"
+#line 251 "../src/options/parse_opts.re"
opt_posix_closure:
-#line 3485 "src/options/parse_opts.cc"
+#line 3493 "src/options/parse_opts.cc"
{
YYCTYPE yych;
yych = (YYCTYPE)*YYCURSOR;
if (yych == 'g') goto yy866;
++YYCURSOR;
yy865:
-#line 245 "../src/options/parse_opts.re"
+#line 255 "../src/options/parse_opts.re"
{
ERROR("bad argument to option --posix_closure "
"(expected: gor1 | gtop): %s", *argv);
}
-#line 3497 "src/options/parse_opts.cc"
+#line 3505 "src/options/parse_opts.cc"
yy866:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == 'o') goto yy867;
goto yy868;
yy874:
++YYCURSOR;
-#line 249 "../src/options/parse_opts.re"
+#line 259 "../src/options/parse_opts.re"
{ globopts.posix_closure = POSIX_CLOSURE_GOR1; goto opt; }
-#line 3533 "src/options/parse_opts.cc"
+#line 3541 "src/options/parse_opts.cc"
yy876:
++YYCURSOR;
-#line 250 "../src/options/parse_opts.re"
+#line 260 "../src/options/parse_opts.re"
{ globopts.posix_closure = POSIX_CLOSURE_GTOP; goto opt; }
-#line 3538 "src/options/parse_opts.cc"
+#line 3546 "src/options/parse_opts.cc"
}
-#line 251 "../src/options/parse_opts.re"
+#line 261 "../src/options/parse_opts.re"
end:
-/* Generated by re2c 1.1.1 on Sat Jan 5 22:53:11 2019 */
+/* Generated by re2c 1.1.1 on Tue Feb 5 11:51:11 2019 */
#line 1 "../src/parse/lex_conf.re"
#include "src/util/c99_stdint.h"
#include <string>
}
}
yy2:
-#line 170 "../src/parse/lex_conf.re"
+#line 176 "../src/parse/lex_conf.re"
{
fatal_lc(l, c, "unrecognized configuration '%.*s'",
static_cast<int>(cur - tok), tok);
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 66 "../src/parse/lex_conf.re"
+#line 72 "../src/parse/lex_conf.re"
{
const int32_t eof = lex_conf_number();
if (eof < 0) fatal_lc(l, c, "eof cannot have negative value");
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 60 "../src/parse/lex_conf.re"
+#line 66 "../src/parse/lex_conf.re"
{ lex_conf_enc(Enc::UTF8, opts); return; }
#line 525 "src/parse/lex_conf.cc"
yy95:
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 50 "../src/parse/lex_conf.re"
- { opts.set_posix_captures (lex_conf_bool()); return; }
-#line 533 "src/parse/lex_conf.cc"
+#line 55 "../src/parse/lex_conf.re"
+ {
+ bool b = lex_conf_bool();
+ opts.set_posix_syntax(b);
+ opts.set_posix_semantics(b);
+ return;
+ }
+#line 538 "src/parse/lex_conf.cc"
yy97:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
}
#line 49 "../src/parse/lex_conf.re"
{ opts.set_tags (lex_conf_bool()); return; }
-#line 541 "src/parse/lex_conf.cc"
+#line 546 "src/parse/lex_conf.cc"
yy99:
yych = (unsigned char)*++cur;
if (yych <= 'Z') {
yy100:
#line 44 "../src/parse/lex_conf.re"
{ opts.set_bFlag (lex_conf_bool()); return; }
-#line 562 "src/parse/lex_conf.cc"
+#line 567 "src/parse/lex_conf.cc"
yy101:
yych = (unsigned char)*++cur;
if (yych == 'a') goto yy144;
yy103:
#line 45 "../src/parse/lex_conf.re"
{ opts.set_dFlag (lex_conf_bool()); return; }
-#line 588 "src/parse/lex_conf.cc"
+#line 593 "src/parse/lex_conf.cc"
yy104:
yych = (unsigned char)*++cur;
if (yych <= '_') {
}
}
yy105:
-#line 56 "../src/parse/lex_conf.re"
+#line 62 "../src/parse/lex_conf.re"
{ lex_conf_enc(Enc::EBCDIC, opts); return; }
-#line 614 "src/parse/lex_conf.cc"
+#line 619 "src/parse/lex_conf.cc"
yy106:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
}
#line 46 "../src/parse/lex_conf.re"
{ opts.set_gFlag (lex_conf_bool()); return; }
-#line 622 "src/parse/lex_conf.cc"
+#line 627 "src/parse/lex_conf.cc"
yy108:
yych = (unsigned char)*++cur;
if (yych <= 'Z') {
yy109:
#line 47 "../src/parse/lex_conf.re"
{ opts.set_iFlag (lex_conf_bool()); return; }
-#line 643 "src/parse/lex_conf.cc"
+#line 648 "src/parse/lex_conf.cc"
yy110:
yych = (unsigned char)*++cur;
if (yych == 'e') goto yy151;
}
}
yy112:
-#line 53 "../src/parse/lex_conf.re"
+#line 52 "../src/parse/lex_conf.re"
{ opts.set_output_file (lex_conf_string()); return; }
-#line 669 "src/parse/lex_conf.cc"
+#line 674 "src/parse/lex_conf.cc"
yy113:
yych = (unsigned char)*++cur;
if (yych == 'o') goto yy154;
}
#line 48 "../src/parse/lex_conf.re"
{ opts.set_sFlag (lex_conf_bool()); return; }
-#line 681 "src/parse/lex_conf.cc"
+#line 686 "src/parse/lex_conf.cc"
yy116:
yych = (unsigned char)*++cur;
if (yych <= '^') {
}
}
yy117:
-#line 54 "../src/parse/lex_conf.re"
+#line 53 "../src/parse/lex_conf.re"
{ opts.set_header_file (lex_conf_string()); return; }
-#line 704 "src/parse/lex_conf.cc"
+#line 709 "src/parse/lex_conf.cc"
yy118:
yych = (unsigned char)*++cur;
if (yych <= '^') {
}
}
yy119:
-#line 57 "../src/parse/lex_conf.re"
+#line 63 "../src/parse/lex_conf.re"
{ lex_conf_enc(Enc::UTF32, opts); return; }
-#line 728 "src/parse/lex_conf.cc"
+#line 733 "src/parse/lex_conf.cc"
yy120:
yych = (unsigned char)*++cur;
if (yych <= 'Z') {
}
}
yy121:
-#line 58 "../src/parse/lex_conf.re"
+#line 64 "../src/parse/lex_conf.re"
{ lex_conf_enc(Enc::UCS2, opts); return; }
-#line 749 "src/parse/lex_conf.cc"
+#line 754 "src/parse/lex_conf.cc"
yy122:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 59 "../src/parse/lex_conf.re"
+#line 65 "../src/parse/lex_conf.re"
{ lex_conf_enc(Enc::UTF16, opts); return; }
-#line 757 "src/parse/lex_conf.cc"
+#line 762 "src/parse/lex_conf.cc"
yy124:
yych = (unsigned char)*++cur;
if (yych <= 'r') goto yy4;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 101 "../src/parse/lex_conf.re"
+#line 107 "../src/parse/lex_conf.re"
{ opts.set_yybmHexTable (lex_conf_bool()); return; }
-#line 958 "src/parse/lex_conf.cc"
+#line 963 "src/parse/lex_conf.cc"
yy172:
yych = (unsigned char)*++cur;
if (yych == 'v') goto yy212;
}
if (yych == '@') goto yy220;
yy180:
-#line 85 "../src/parse/lex_conf.re"
+#line 91 "../src/parse/lex_conf.re"
{ opts.set_condGoto (lex_conf_string ()); return; }
-#line 997 "src/parse/lex_conf.cc"
+#line 1002 "src/parse/lex_conf.cc"
yy181:
yych = (unsigned char)*++cur;
if (yych == 'r') goto yy222;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 152 "../src/parse/lex_conf.re"
+#line 158 "../src/parse/lex_conf.re"
{ opts.set_bEmitYYCh (lex_conf_bool()); return; }
-#line 1146 "src/parse/lex_conf.cc"
+#line 1151 "src/parse/lex_conf.cc"
yy215:
yych = (unsigned char)*++cur;
if (yych == 'e') goto yy264;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 81 "../src/parse/lex_conf.re"
+#line 87 "../src/parse/lex_conf.re"
{ opts.set_condPrefix (lex_conf_string ()); return; }
-#line 1204 "src/parse/lex_conf.cc"
+#line 1209 "src/parse/lex_conf.cc"
yy225:
yych = (unsigned char)*++cur;
if (yych == 'A') goto yy271;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 137 "../src/parse/lex_conf.re"
+#line 143 "../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 1339 "src/parse/lex_conf.cc"
+#line 1344 "src/parse/lex_conf.cc"
yy253:
yych = (unsigned char)*++cur;
if (yych == 'l') goto yy304;
}
}
yy257:
-#line 165 "../src/parse/lex_conf.re"
+#line 171 "../src/parse/lex_conf.re"
{ opts.set_startlabel (lex_conf_string()); return; }
-#line 1376 "src/parse/lex_conf.cc"
+#line 1381 "src/parse/lex_conf.cc"
yy258:
yych = (unsigned char)*++cur;
if (yych == 't') goto yy312;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 63 "../src/parse/lex_conf.re"
+#line 69 "../src/parse/lex_conf.re"
{ lex_conf_input(opts); return; }
-#line 1526 "src/parse/lex_conf.cc"
+#line 1531 "src/parse/lex_conf.cc"
yy295:
yych = (unsigned char)*++cur;
if (yych == 'd') goto yy351;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 161 "../src/parse/lex_conf.re"
+#line 167 "../src/parse/lex_conf.re"
{ opts.set_labelPrefix (lex_conf_string ()); return; }
-#line 1578 "src/parse/lex_conf.cc"
+#line 1583 "src/parse/lex_conf.cc"
yy308:
++cur;
if (lim <= cur) YYFILL(1);
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 96 "../src/parse/lex_conf.re"
+#line 102 "../src/parse/lex_conf.re"
{ opts.set_bUseStateAbort (lex_conf_bool()); return; }
-#line 1616 "src/parse/lex_conf.cc"
+#line 1621 "src/parse/lex_conf.cc"
yy314:
yych = (unsigned char)*++cur;
if (yych == 'a') goto yy367;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 132 "../src/parse/lex_conf.re"
+#line 138 "../src/parse/lex_conf.re"
{ opts.set_tags_prefix (lex_conf_string ()); return; }
-#line 1632 "src/parse/lex_conf.cc"
+#line 1637 "src/parse/lex_conf.cc"
yy318:
yych = (unsigned char)*++cur;
if (yych <= 'c') {
}
if (yych == '@') goto yy380;
yy325:
-#line 83 "../src/parse/lex_conf.re"
+#line 89 "../src/parse/lex_conf.re"
{ opts.set_condDivider (lex_conf_string ()); return; }
-#line 1676 "src/parse/lex_conf.cc"
+#line 1681 "src/parse/lex_conf.cc"
yy326:
yych = (unsigned char)*++cur;
if (yych == 'n') goto yy381;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 95 "../src/parse/lex_conf.re"
+#line 101 "../src/parse/lex_conf.re"
{ opts.set_yynext (lex_conf_string ()); return; }
-#line 1824 "src/parse/lex_conf.cc"
+#line 1829 "src/parse/lex_conf.cc"
yy362:
yych = (unsigned char)*++cur;
if (yych <= '0') goto yy221;
++cur;
yy364:
cur = ctx;
-#line 164 "../src/parse/lex_conf.re"
+#line 170 "../src/parse/lex_conf.re"
{ opts.set_startlabel_force (lex_conf_bool()); return; }
-#line 1836 "src/parse/lex_conf.cc"
+#line 1841 "src/parse/lex_conf.cc"
yy365:
++cur;
if (lim <= cur) YYFILL(1);
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 159 "../src/parse/lex_conf.re"
+#line 165 "../src/parse/lex_conf.re"
{ opts.set_fill_check (lex_conf_bool()); return; }
-#line 1885 "src/parse/lex_conf.cc"
+#line 1890 "src/parse/lex_conf.cc"
yy377:
yych = (unsigned char)*++cur;
if (yych == 'e') goto yy431;
}
}
yy390:
-#line 154 "../src/parse/lex_conf.re"
+#line 160 "../src/parse/lex_conf.re"
{ opts.set_fill (lex_conf_string ()); return; }
-#line 1956 "src/parse/lex_conf.cc"
+#line 1961 "src/parse/lex_conf.cc"
yy391:
yych = (unsigned char)*++cur;
if (yych == 'O') goto yy450;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 119 "../src/parse/lex_conf.re"
+#line 125 "../src/parse/lex_conf.re"
{ opts.set_yypeek (lex_conf_string ()); return; }
-#line 1989 "src/parse/lex_conf.cc"
+#line 1994 "src/parse/lex_conf.cc"
yy399:
yych = (unsigned char)*++cur;
if (yych == 'O') goto yy460;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 120 "../src/parse/lex_conf.re"
+#line 126 "../src/parse/lex_conf.re"
{ opts.set_yyskip (lex_conf_string ()); return; }
-#line 2009 "src/parse/lex_conf.cc"
+#line 2014 "src/parse/lex_conf.cc"
yy404:
yych = (unsigned char)*++cur;
if (yych == 'N') goto yy463;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 135 "../src/parse/lex_conf.re"
+#line 141 "../src/parse/lex_conf.re"
{ opts.set_indString (lex_conf_string ()); return; }
-#line 2073 "src/parse/lex_conf.cc"
+#line 2078 "src/parse/lex_conf.cc"
yy419:
yych = (unsigned char)*++cur;
if (yych == 'a') goto yy479;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 100 "../src/parse/lex_conf.re"
+#line 106 "../src/parse/lex_conf.re"
{ opts.set_yybm (lex_conf_string ()); return; }
-#line 2097 "src/parse/lex_conf.cc"
+#line 2102 "src/parse/lex_conf.cc"
yy425:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 150 "../src/parse/lex_conf.re"
+#line 156 "../src/parse/lex_conf.re"
{ opts.set_yych (lex_conf_string ()); return; }
-#line 2105 "src/parse/lex_conf.cc"
+#line 2110 "src/parse/lex_conf.cc"
yy427:
yych = (unsigned char)*++cur;
if (yych == 'a') goto yy483;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 155 "../src/parse/lex_conf.re"
+#line 161 "../src/parse/lex_conf.re"
{ opts.set_fill_use (lex_conf_bool()); return; }
-#line 2129 "src/parse/lex_conf.cc"
+#line 2134 "src/parse/lex_conf.cc"
yy433:
yych = (unsigned char)*++cur;
if (yych == 't') goto yy487;
goto yy221;
yy436:
++cur;
-#line 86 "../src/parse/lex_conf.re"
+#line 92 "../src/parse/lex_conf.re"
{ opts.set_condGotoParam (lex_conf_string ()); return; }
-#line 2146 "src/parse/lex_conf.cc"
+#line 2151 "src/parse/lex_conf.cc"
yy438:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 82 "../src/parse/lex_conf.re"
+#line 88 "../src/parse/lex_conf.re"
{ opts.set_condEnumPrefix (lex_conf_string ()); return; }
-#line 2154 "src/parse/lex_conf.cc"
+#line 2159 "src/parse/lex_conf.cc"
yy440:
yych = (unsigned char)*++cur;
if (yych == 'P') goto yy491;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 149 "../src/parse/lex_conf.re"
+#line 155 "../src/parse/lex_conf.re"
{ opts.set_yyctype (lex_conf_string ()); return; }
-#line 2174 "src/parse/lex_conf.cc"
+#line 2179 "src/parse/lex_conf.cc"
yy445:
yych = (unsigned char)*++cur;
if (yych == 'R') goto yy495;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 147 "../src/parse/lex_conf.re"
+#line 153 "../src/parse/lex_conf.re"
{ opts.set_yydebug (lex_conf_string ()); return; }
-#line 2186 "src/parse/lex_conf.cc"
+#line 2191 "src/parse/lex_conf.cc"
yy448:
yych = (unsigned char)*++cur;
if (yych == 'n') goto yy497;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 117 "../src/parse/lex_conf.re"
+#line 123 "../src/parse/lex_conf.re"
{ opts.set_yylimit (lex_conf_string ()); return; }
-#line 2214 "src/parse/lex_conf.cc"
+#line 2219 "src/parse/lex_conf.cc"
yy455:
yych = (unsigned char)*++cur;
if (yych == 'R') goto yy502;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 129 "../src/parse/lex_conf.re"
+#line 135 "../src/parse/lex_conf.re"
{ opts.set_yymtagn (lex_conf_string ()); return; }
-#line 2226 "src/parse/lex_conf.cc"
+#line 2231 "src/parse/lex_conf.cc"
yy458:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 130 "../src/parse/lex_conf.re"
+#line 136 "../src/parse/lex_conf.re"
{ opts.set_yymtagp (lex_conf_string ()); return; }
-#line 2234 "src/parse/lex_conf.cc"
+#line 2239 "src/parse/lex_conf.cc"
yy460:
yych = (unsigned char)*++cur;
if (yych == 'R') goto yy504;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 127 "../src/parse/lex_conf.re"
+#line 133 "../src/parse/lex_conf.re"
{ opts.set_yystagn (lex_conf_string ()); return; }
-#line 2254 "src/parse/lex_conf.cc"
+#line 2259 "src/parse/lex_conf.cc"
yy465:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 128 "../src/parse/lex_conf.re"
+#line 134 "../src/parse/lex_conf.re"
{ opts.set_yystagp (lex_conf_string ()); return; }
-#line 2262 "src/parse/lex_conf.cc"
+#line 2267 "src/parse/lex_conf.cc"
yy467:
yych = (unsigned char)*++cur;
if (yych == 'o') goto yy507;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 103 "../src/parse/lex_conf.re"
+#line 109 "../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 2362 "src/parse/lex_conf.cc"
+#line 2367 "src/parse/lex_conf.cc"
yy490:
yych = (unsigned char)*++cur;
if (yych == 'n') goto yy531;
}
}
yy492:
-#line 121 "../src/parse/lex_conf.re"
+#line 127 "../src/parse/lex_conf.re"
{ opts.set_yybackup (lex_conf_string ()); return; }
-#line 2388 "src/parse/lex_conf.cc"
+#line 2393 "src/parse/lex_conf.cc"
yy493:
yych = (unsigned char)*++cur;
if (yych == 'P') goto yy533;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 114 "../src/parse/lex_conf.re"
+#line 120 "../src/parse/lex_conf.re"
{ opts.set_yycursor (lex_conf_string ()); return; }
-#line 2404 "src/parse/lex_conf.cc"
+#line 2409 "src/parse/lex_conf.cc"
yy497:
yych = (unsigned char)*++cur;
if (yych == 'a') goto yy535;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 115 "../src/parse/lex_conf.re"
+#line 121 "../src/parse/lex_conf.re"
{ opts.set_yymarker (lex_conf_string ()); return; }
-#line 2432 "src/parse/lex_conf.cc"
+#line 2437 "src/parse/lex_conf.cc"
yy504:
yych = (unsigned char)*++cur;
if (yych == 'E') goto yy540;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 97 "../src/parse/lex_conf.re"
+#line 103 "../src/parse/lex_conf.re"
{ opts.set_bUseStateNext (lex_conf_bool()); return; }
-#line 2504 "src/parse/lex_conf.cc"
+#line 2509 "src/parse/lex_conf.cc"
yy522:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 133 "../src/parse/lex_conf.re"
+#line 139 "../src/parse/lex_conf.re"
{ opts.set_tags_expression(lex_conf_string ()); return; }
-#line 2512 "src/parse/lex_conf.cc"
+#line 2517 "src/parse/lex_conf.cc"
yy524:
yych = (unsigned char)*++cur;
if (yych == 'p') goto yy556;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 151 "../src/parse/lex_conf.re"
+#line 157 "../src/parse/lex_conf.re"
{ opts.set_yychConversion (lex_conf_bool()); return; }
-#line 2536 "src/parse/lex_conf.cc"
+#line 2541 "src/parse/lex_conf.cc"
yy530:
yych = (unsigned char)*++cur;
if (yych == 'r') goto yy560;
}
}
yy541:
-#line 123 "../src/parse/lex_conf.re"
+#line 129 "../src/parse/lex_conf.re"
{ opts.set_yyrestore (lex_conf_string ()); return; }
-#line 2600 "src/parse/lex_conf.cc"
+#line 2605 "src/parse/lex_conf.cc"
yy542:
yych = (unsigned char)*++cur;
if (yych == 'I') goto yy578;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 157 "../src/parse/lex_conf.re"
+#line 163 "../src/parse/lex_conf.re"
{ opts.set_fill_arg_use (lex_conf_bool()); return; }
-#line 2682 "src/parse/lex_conf.cc"
+#line 2687 "src/parse/lex_conf.cc"
yy562:
++cur;
-#line 84 "../src/parse/lex_conf.re"
+#line 90 "../src/parse/lex_conf.re"
{ opts.set_condDividerParam (lex_conf_string ()); return; }
-#line 2687 "src/parse/lex_conf.cc"
+#line 2692 "src/parse/lex_conf.cc"
yy564:
yych = (unsigned char)*++cur;
if (yych == 'X') goto yy602;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 75 "../src/parse/lex_conf.re"
+#line 81 "../src/parse/lex_conf.re"
{ opts.set_yycondtype (lex_conf_string ()); return; }
-#line 2699 "src/parse/lex_conf.cc"
+#line 2704 "src/parse/lex_conf.cc"
yy567:
yych = (unsigned char)*++cur;
if (yych == 'R') goto yy604;
goto yy4;
yy569:
++cur;
-#line 156 "../src/parse/lex_conf.re"
+#line 162 "../src/parse/lex_conf.re"
{ opts.set_fill_arg (lex_conf_string ()); return; }
-#line 2712 "src/parse/lex_conf.cc"
+#line 2717 "src/parse/lex_conf.cc"
yy571:
yych = (unsigned char)*++cur;
if (yych == 'T') goto yy607;
}
}
yy573:
-#line 89 "../src/parse/lex_conf.re"
+#line 95 "../src/parse/lex_conf.re"
{ opts.set_state_get (lex_conf_string ()); return; }
-#line 2738 "src/parse/lex_conf.cc"
+#line 2743 "src/parse/lex_conf.cc"
yy574:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 126 "../src/parse/lex_conf.re"
+#line 132 "../src/parse/lex_conf.re"
{ opts.set_yylessthan (lex_conf_string ()); return; }
-#line 2746 "src/parse/lex_conf.cc"
+#line 2751 "src/parse/lex_conf.cc"
yy576:
yych = (unsigned char)*++cur;
if (yych == 'T') goto yy609;
}
}
yy580:
-#line 91 "../src/parse/lex_conf.re"
+#line 97 "../src/parse/lex_conf.re"
{ opts.set_state_set (lex_conf_string ()); return; }
-#line 2781 "src/parse/lex_conf.cc"
+#line 2786 "src/parse/lex_conf.cc"
yy581:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 64 "../src/parse/lex_conf.re"
+#line 70 "../src/parse/lex_conf.re"
{ lex_conf_empty_class(opts); return; }
-#line 2811 "src/parse/lex_conf.cc"
+#line 2816 "src/parse/lex_conf.cc"
yy588:
yych = (unsigned char)*++cur;
if (yych == 'l') goto yy618;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 94 "../src/parse/lex_conf.re"
+#line 100 "../src/parse/lex_conf.re"
{ opts.set_yyfilllabel (lex_conf_string ()); return; }
-#line 2837 "src/parse/lex_conf.cc"
+#line 2842 "src/parse/lex_conf.cc"
yy594:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 98 "../src/parse/lex_conf.re"
+#line 104 "../src/parse/lex_conf.re"
{ opts.set_yyaccept (lex_conf_string ()); return; }
-#line 2845 "src/parse/lex_conf.cc"
+#line 2850 "src/parse/lex_conf.cc"
yy596:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 87 "../src/parse/lex_conf.re"
+#line 93 "../src/parse/lex_conf.re"
{ opts.set_yyctable (lex_conf_string ()); return; }
-#line 2853 "src/parse/lex_conf.cc"
+#line 2858 "src/parse/lex_conf.cc"
yy598:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 168 "../src/parse/lex_conf.re"
+#line 174 "../src/parse/lex_conf.re"
{ lex_conf_string (); return; }
-#line 2861 "src/parse/lex_conf.cc"
+#line 2866 "src/parse/lex_conf.cc"
yy600:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 112 "../src/parse/lex_conf.re"
+#line 118 "../src/parse/lex_conf.re"
{ opts.set_yytarget (lex_conf_string ()); return; }
-#line 2869 "src/parse/lex_conf.cc"
+#line 2874 "src/parse/lex_conf.cc"
yy602:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 122 "../src/parse/lex_conf.re"
+#line 128 "../src/parse/lex_conf.re"
{ opts.set_yybackupctx (lex_conf_string ()); return; }
-#line 2877 "src/parse/lex_conf.cc"
+#line 2882 "src/parse/lex_conf.cc"
yy604:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 116 "../src/parse/lex_conf.re"
+#line 122 "../src/parse/lex_conf.re"
{ opts.set_yyctxmarker (lex_conf_string ()); return; }
-#line 2885 "src/parse/lex_conf.cc"
+#line 2890 "src/parse/lex_conf.cc"
yy606:
yych = (unsigned char)*++cur;
if (yych == 'd') goto yy621;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 158 "../src/parse/lex_conf.re"
+#line 164 "../src/parse/lex_conf.re"
{ opts.set_fill_naked (lex_conf_bool()); return; }
-#line 2955 "src/parse/lex_conf.cc"
+#line 2960 "src/parse/lex_conf.cc"
yy623:
yych = (unsigned char)*++cur;
if (yych == 'O') goto yy639;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 124 "../src/parse/lex_conf.re"
+#line 130 "../src/parse/lex_conf.re"
{ opts.set_yyrestorectx (lex_conf_string ()); return; }
-#line 2971 "src/parse/lex_conf.cc"
+#line 2976 "src/parse/lex_conf.cc"
yy627:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 125 "../src/parse/lex_conf.re"
+#line 131 "../src/parse/lex_conf.re"
{ opts.set_yyrestoretag (lex_conf_string ()); return; }
-#line 2979 "src/parse/lex_conf.cc"
+#line 2984 "src/parse/lex_conf.cc"
yy629:
yych = (unsigned char)*++cur;
if (yych == 'O') goto yy641;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 52 "../src/parse/lex_conf.re"
+#line 51 "../src/parse/lex_conf.re"
{ opts.set_bCaseInverted (lex_conf_bool()); return; }
-#line 3003 "src/parse/lex_conf.cc"
+#line 3008 "src/parse/lex_conf.cc"
yy635:
yych = (unsigned char)*++cur;
if (yych == 's') goto yy106;
}
}
yy647:
-#line 76 "../src/parse/lex_conf.re"
+#line 82 "../src/parse/lex_conf.re"
{ opts.set_cond_get (lex_conf_string ()); return; }
-#line 3071 "src/parse/lex_conf.cc"
+#line 3076 "src/parse/lex_conf.cc"
yy648:
yych = (unsigned char)*++cur;
if (yych == 'e') goto yy657;
}
}
yy650:
-#line 78 "../src/parse/lex_conf.re"
+#line 84 "../src/parse/lex_conf.re"
{ opts.set_cond_set (lex_conf_string ()); return; }
-#line 3098 "src/parse/lex_conf.cc"
+#line 3103 "src/parse/lex_conf.cc"
yy651:
yych = (unsigned char)*++cur;
if (yych == 'e') goto yy660;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 62 "../src/parse/lex_conf.re"
+#line 68 "../src/parse/lex_conf.re"
{ lex_conf_encoding_policy(opts); return; }
-#line 3118 "src/parse/lex_conf.cc"
+#line 3123 "src/parse/lex_conf.cc"
yy656:
yych = (unsigned char)*++cur;
if (yych == 'n') goto yy664;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 51 "../src/parse/lex_conf.re"
+#line 50 "../src/parse/lex_conf.re"
{ opts.set_bCaseInsensitive (lex_conf_bool()); return; }
-#line 3150 "src/parse/lex_conf.cc"
+#line 3155 "src/parse/lex_conf.cc"
yy664:
yych = (unsigned char)*++cur;
if (yych == 'a') goto yy673;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 90 "../src/parse/lex_conf.re"
+#line 96 "../src/parse/lex_conf.re"
{ opts.set_state_get_naked (lex_conf_bool()); return; }
-#line 3162 "src/parse/lex_conf.cc"
+#line 3167 "src/parse/lex_conf.cc"
yy667:
yych = (unsigned char)*++cur;
if (yych == 'a') goto yy674;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 92 "../src/parse/lex_conf.re"
+#line 98 "../src/parse/lex_conf.re"
{ opts.set_state_set_naked (lex_conf_bool()); return; }
-#line 3178 "src/parse/lex_conf.cc"
+#line 3183 "src/parse/lex_conf.cc"
yy671:
++cur;
-#line 93 "../src/parse/lex_conf.re"
+#line 99 "../src/parse/lex_conf.re"
{ opts.set_state_set_arg (lex_conf_string ()); return; }
-#line 3183 "src/parse/lex_conf.cc"
+#line 3188 "src/parse/lex_conf.cc"
yy673:
yych = (unsigned char)*++cur;
if (yych == 'k') goto yy676;
goto yy4;
yy681:
++cur;
-#line 79 "../src/parse/lex_conf.re"
+#line 85 "../src/parse/lex_conf.re"
{ opts.set_cond_set_arg (lex_conf_string ()); return; }
-#line 3220 "src/parse/lex_conf.cc"
+#line 3225 "src/parse/lex_conf.cc"
yy683:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 77 "../src/parse/lex_conf.re"
+#line 83 "../src/parse/lex_conf.re"
{ opts.set_cond_get_naked (lex_conf_bool()); return; }
-#line 3228 "src/parse/lex_conf.cc"
+#line 3233 "src/parse/lex_conf.cc"
yy685:
yych = (unsigned char)*++cur;
if (yybm[0+yych] & 32) {
goto yy3;
}
-#line 80 "../src/parse/lex_conf.re"
+#line 86 "../src/parse/lex_conf.re"
{ opts.set_cond_set_naked (lex_conf_bool()); return; }
-#line 3236 "src/parse/lex_conf.cc"
+#line 3241 "src/parse/lex_conf.cc"
}
-#line 174 "../src/parse/lex_conf.re"
+#line 180 "../src/parse/lex_conf.re"
}
{
lex_conf_assign ();
-#line 3246 "src/parse/lex_conf.cc"
+#line 3251 "src/parse/lex_conf.cc"
{
unsigned char yych;
if ((lim - cur) < 10) YYFILL(10);
}
++cur;
yy690:
-#line 181 "../src/parse/lex_conf.re"
+#line 187 "../src/parse/lex_conf.re"
{ fatal_lc(get_line(), get_column(),
"bad configuration value (expected: 'ignore', 'substitute', 'fail')"); }
-#line 3262 "src/parse/lex_conf.cc"
+#line 3267 "src/parse/lex_conf.cc"
yy691:
yych = (unsigned char)*(mar = ++cur);
if (yych == 'a') goto yy694;
goto yy695;
yy701:
++cur;
-#line 185 "../src/parse/lex_conf.re"
+#line 191 "../src/parse/lex_conf.re"
{ opts.set_encoding_policy(Enc::POLICY_FAIL); goto end; }
-#line 3305 "src/parse/lex_conf.cc"
+#line 3310 "src/parse/lex_conf.cc"
yy703:
yych = (unsigned char)*++cur;
if (yych == 'r') goto yy705;
goto yy695;
yy707:
++cur;
-#line 183 "../src/parse/lex_conf.re"
+#line 189 "../src/parse/lex_conf.re"
{ opts.set_encoding_policy(Enc::POLICY_IGNORE); goto end; }
-#line 3326 "src/parse/lex_conf.cc"
+#line 3331 "src/parse/lex_conf.cc"
yy709:
yych = (unsigned char)*++cur;
if (yych != 't') goto yy695;
yych = (unsigned char)*++cur;
if (yych != 'e') goto yy695;
++cur;
-#line 184 "../src/parse/lex_conf.re"
+#line 190 "../src/parse/lex_conf.re"
{ opts.set_encoding_policy(Enc::POLICY_SUBSTITUTE); goto end; }
-#line 3339 "src/parse/lex_conf.cc"
+#line 3344 "src/parse/lex_conf.cc"
}
-#line 186 "../src/parse/lex_conf.re"
+#line 192 "../src/parse/lex_conf.re"
end:
lex_conf_semicolon();
{
lex_conf_assign ();
-#line 3351 "src/parse/lex_conf.cc"
+#line 3356 "src/parse/lex_conf.cc"
{
unsigned char yych;
if ((lim - cur) < 7) YYFILL(7);
yy717:
++cur;
yy718:
-#line 195 "../src/parse/lex_conf.re"
+#line 201 "../src/parse/lex_conf.re"
{ fatal_lc(get_line(), get_column(),
"bad configuration value (expected: 'default', 'custom')"); }
-#line 3365 "src/parse/lex_conf.cc"
+#line 3370 "src/parse/lex_conf.cc"
yy719:
yych = (unsigned char)*(mar = ++cur);
if (yych == 'u') goto yy721;
goto yy722;
yy730:
++cur;
-#line 198 "../src/parse/lex_conf.re"
+#line 204 "../src/parse/lex_conf.re"
{ opts.set_input_api(INPUT_CUSTOM); goto end; }
-#line 3412 "src/parse/lex_conf.cc"
+#line 3417 "src/parse/lex_conf.cc"
yy732:
yych = (unsigned char)*++cur;
if (yych != 't') goto yy722;
++cur;
-#line 197 "../src/parse/lex_conf.re"
+#line 203 "../src/parse/lex_conf.re"
{ opts.set_input_api(INPUT_DEFAULT); goto end; }
-#line 3419 "src/parse/lex_conf.cc"
+#line 3424 "src/parse/lex_conf.cc"
}
-#line 199 "../src/parse/lex_conf.re"
+#line 205 "../src/parse/lex_conf.re"
end:
lex_conf_semicolon();
{
lex_conf_assign ();
-#line 3431 "src/parse/lex_conf.cc"
+#line 3436 "src/parse/lex_conf.cc"
{
unsigned char yych;
if ((lim - cur) < 11) YYFILL(11);
if (yych == 'm') goto yy740;
++cur;
yy738:
-#line 208 "../src/parse/lex_conf.re"
+#line 214 "../src/parse/lex_conf.re"
{ fatal_lc(get_line(), get_column(),
"bad configuration value (expected: 'match-empty', 'match-none', 'error')"); }
-#line 3443 "src/parse/lex_conf.cc"
+#line 3448 "src/parse/lex_conf.cc"
yy739:
yych = (unsigned char)*(mar = ++cur);
if (yych == 'r') goto yy741;
goto yy742;
yy748:
++cur;
-#line 212 "../src/parse/lex_conf.re"
+#line 218 "../src/parse/lex_conf.re"
{ opts.set_empty_class_policy(EMPTY_CLASS_ERROR); goto end; }
-#line 3482 "src/parse/lex_conf.cc"
+#line 3487 "src/parse/lex_conf.cc"
yy750:
yych = (unsigned char)*++cur;
if (yych != '-') goto yy742;
goto yy742;
yy759:
++cur;
-#line 211 "../src/parse/lex_conf.re"
+#line 217 "../src/parse/lex_conf.re"
{ opts.set_empty_class_policy(EMPTY_CLASS_MATCH_NONE); goto end; }
-#line 3522 "src/parse/lex_conf.cc"
+#line 3527 "src/parse/lex_conf.cc"
yy761:
++cur;
-#line 210 "../src/parse/lex_conf.re"
+#line 216 "../src/parse/lex_conf.re"
{ opts.set_empty_class_policy(EMPTY_CLASS_MATCH_EMPTY); goto end; }
-#line 3527 "src/parse/lex_conf.cc"
+#line 3532 "src/parse/lex_conf.cc"
}
-#line 213 "../src/parse/lex_conf.re"
+#line 219 "../src/parse/lex_conf.re"
end:
lex_conf_semicolon();
void Scanner::lex_conf_assign ()
{
-#line 3547 "src/parse/lex_conf.cc"
+#line 3552 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
}
++cur;
yy766:
-#line 230 "../src/parse/lex_conf.re"
+#line 236 "../src/parse/lex_conf.re"
{ fatal_lc(get_line(), get_column(), "missing '=' in configuration"); }
-#line 3596 "src/parse/lex_conf.cc"
+#line 3601 "src/parse/lex_conf.cc"
yy767:
yych = (unsigned char)*(mar = ++cur);
if (yych <= 0x1F) {
if (yybm[0+yych] & 128) {
goto yy768;
}
-#line 231 "../src/parse/lex_conf.re"
+#line 237 "../src/parse/lex_conf.re"
{ return; }
-#line 3615 "src/parse/lex_conf.cc"
+#line 3620 "src/parse/lex_conf.cc"
yy771:
++cur;
if (lim <= cur) YYFILL(1);
cur = mar;
goto yy766;
}
-#line 232 "../src/parse/lex_conf.re"
+#line 238 "../src/parse/lex_conf.re"
}
void Scanner::lex_conf_semicolon ()
{
-#line 3636 "src/parse/lex_conf.cc"
+#line 3641 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
}
++cur;
yy777:
-#line 238 "../src/parse/lex_conf.re"
+#line 244 "../src/parse/lex_conf.re"
{ fatal_lc(get_line(), get_column(), "missing ending ';' in configuration"); }
-#line 3685 "src/parse/lex_conf.cc"
+#line 3690 "src/parse/lex_conf.cc"
yy778:
yych = (unsigned char)*(mar = ++cur);
if (yybm[0+yych] & 128) {
if (yych != ';') goto yy777;
yy779:
++cur;
-#line 239 "../src/parse/lex_conf.re"
+#line 245 "../src/parse/lex_conf.re"
{ return; }
-#line 3696 "src/parse/lex_conf.cc"
+#line 3701 "src/parse/lex_conf.cc"
yy781:
++cur;
if (lim <= cur) YYFILL(1);
cur = mar;
goto yy777;
}
-#line 240 "../src/parse/lex_conf.re"
+#line 246 "../src/parse/lex_conf.re"
}
lex_conf_assign ();
tok = cur;
-#line 3722 "src/parse/lex_conf.cc"
+#line 3727 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
}
++cur;
yy787:
-#line 253 "../src/parse/lex_conf.re"
+#line 259 "../src/parse/lex_conf.re"
{ fatal_lc(get_line(), get_column(),
"bad configuration value (expected number)"); }
-#line 3772 "src/parse/lex_conf.cc"
+#line 3777 "src/parse/lex_conf.cc"
yy788:
yych = (unsigned char)*++cur;
if (yych <= '0') goto yy787;
yy789:
++cur;
yy790:
-#line 255 "../src/parse/lex_conf.re"
+#line 261 "../src/parse/lex_conf.re"
{
int32_t n = 0;
if (!s_to_i32_unsafe (tok, cur, n)) {
lex_conf_semicolon ();
return n;
}
-#line 3790 "src/parse/lex_conf.cc"
+#line 3795 "src/parse/lex_conf.cc"
yy791:
++cur;
if (lim <= cur) YYFILL(1);
}
goto yy790;
}
-#line 263 "../src/parse/lex_conf.re"
+#line 269 "../src/parse/lex_conf.re"
}
std::string s;
tok = cur;
-#line 3810 "src/parse/lex_conf.cc"
+#line 3815 "src/parse/lex_conf.cc"
{
unsigned char yych;
static const unsigned char yybm[] = {
}
}
yy795:
-#line 291 "../src/parse/lex_conf.re"
+#line 297 "../src/parse/lex_conf.re"
{ goto end; }
-#line 3868 "src/parse/lex_conf.cc"
+#line 3873 "src/parse/lex_conf.cc"
yy796:
++cur;
if (lim <= cur) YYFILL(1);
if (yybm[0+yych] & 128) {
goto yy796;
}
-#line 287 "../src/parse/lex_conf.re"
+#line 293 "../src/parse/lex_conf.re"
{
s = getstr(tok, cur);
goto end;
}
-#line 3881 "src/parse/lex_conf.cc"
+#line 3886 "src/parse/lex_conf.cc"
yy799:
++cur;
-#line 272 "../src/parse/lex_conf.re"
+#line 278 "../src/parse/lex_conf.re"
{
const char quote = tok[0];
for (bool end;;) {
}
}
}
-#line 3900 "src/parse/lex_conf.cc"
+#line 3905 "src/parse/lex_conf.cc"
}
-#line 292 "../src/parse/lex_conf.re"
+#line 298 "../src/parse/lex_conf.re"
end:
lex_conf_semicolon ();
conopt_t globopts;
globopts.FFlag = true;
Opt opts(globopts);
- opts.set_posix_captures(true);
+ opts.set_posix_syntax(true);
+ opts.set_posix_semantics((cflags & REG_LEFTMOST) == 0);
const opt_t *opt = opts.snapshot();
Warn warn;
#define T9(R,S,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r) { GS = {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r}; T(R,S,gs); }
#define T10(R,S,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) { GS = {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}; T(R,S,gs); }
-int test_all(int flags)
+static int test_all_posix(int flags)
{
int e = 0;
return e;
}
+static int test_all_leftmost(int flags)
+{
+ int e = 0;
+
+ T1("a", "a", 0,1);
+ T2("(a)", "a", 0,1, 0,1);
+ T2("(a*)", "aaa", 0,3, 0,3);
+ T3("(a*)(b*)", "aabb", 0,4, 0,2, 2,4);
+ T3("(a*)(a*)", "aa", 0,2, 0,2, 2,2);
+ T2("(a|aa)*", "aa", 0,2, 1,2);
+ T3("(a)|(a)", "a", 0,1, 0,1, -1,-1);
+ T3("(a)*(a)*", "a", 0,1, 0,1, -1,-1);
+
+ T1("[a]", "a", 0,1);
+ T0("[a]", "b");
+ T0("[^a]", "a");
+ T1("[^a]", "b", 0,1);
+ T1("[ac]*", "ac", 0,2);
+ T1("[a-c]*", "abc", 0,3);
+ T1("[]]", "]", 0,1);
+ T0("[^]]", "]");
+ T1("[^]]", "a", 0,1);
+ T1("[-]", "-", 0,1);
+ T1("[]-]*", "]-", 0,2);
+ T1("[-a]*", "-a", 0,2);
+ T1("[a-]*", "-a", 0,2);
+ T1("[-a-]*", "-a", 0,2);
+
+ // basic
+ T3("(..)*(...)*", "a", 0,0, -1,-1, -1,-1);
+ T3("(..)*(...)*", "abcd", 0,4, 2,4, -1,-1);
+ T3("(ab|a)(bc|c)", "abc", 0,3, 0,2, 2,3);
+ T2("(ab)c|abc", "abc", 0,3, 0,2);
+ T4("(a*)(b?)(b+)b{3}", "aaabbbbbbb", 0,10, 0,3, 3,4, 4,7);
+ T4("(a*)(b{0,1})(b{1,})b{3}", "aaabbbbbbb", 0,10, 0,3, 3,4, 4,7);
+ T3("((a|a)|a)", "a", 0,1, 0,1, 0,1);
+ T3("(a*)(a|aa)", "aaaa", 0,4, 0,3, 3,4);
+ T2("a*(a.|aa)", "aaaa", 0,4, 2,4);
+ T4("a(b)|c(d)|a(e)f", "aef", 0,3, -1,-1, -1,-1, 1,2);
+ T2("(a|b)?.*", "b", 0,1, 0,1);
+ T3("(a|b)c|a(b|c)", "ac", 0,2, 0,1, -1,-1);
+ T3("(a|b)c|a(b|c)", "ab", 0,2, -1,-1, 1,2);
+ T3("(a|b)*c|(a|ab)*c", "abc", 0,3, 1,2, -1,-1);
+ T3("(.a|.b).*|.*(.a|.b)", "xa", 0,2, 0,2, -1,-1);
+ T2("a?(ab|ba)ab", "abab", 0,4, 0,2);
+ T2("a?(a[c]{0}b|ba)ab", "abab", 0,4, 0,2);
+ T1("ab|abab", "abbabab", 0,2);
+ T3("(aa|aaa)*|(a|aaaaa)", "aa", 0,2, 0,2, -1,-1);
+ T3("(a.|.a.)*|(a|.a...)", "aa", 0,2, 0,2, -1,-1);
+ T4("(a)(b)(c)", "abc", 0,3, 0,1, 1,2, 2,3);
+ T7("((((((x))))))", "x", 0,1, 0,1, 0,1, 0,1, 0,1, 0,1, 0,1);
+ T7("((((((x))))))*", "xx", 0,2, 1,2, 1,2, 1,2, 1,2, 1,2, 1,2);
+ T2("a?(ab|ba)*", "ababababababababababababababababababababababababababababababababababababababababa", 0,81, 79,81);
+ T1("a*a*a*a*a*b", "aaaaaaaaab", 0,10);
+ T1("a[b]+bc", "abbc", 0,4);
+ T1("a[b]+bc", "abbbbc", 0,6);
+ T1("a[b]?bc", "abbc", 0,4);
+ T1("a[b]?bc", "abc", 0,3);
+ T1("a[b]?c", "abc", 0,3);
+ T1("ab|cd", "abc", 0,2);
+ T1("ab|cd", "abcd", 0,2);
+ T3("((a))", "abc", 0,1, 0,1, 0,1);
+ T3("(a)b(c)", "abc", 0,3, 0,1, 2,3);
+ T1("a*", "aaa", 0,3);
+ T2("(a*)*", "-", 0,0, 0,0);
+ T2("(a*)+", "-", 0,0, 0,0);
+ T2("(a*|b)*", "-", 0,0, 0,0);
+ T2("(a+|b)*", "ab", 0,2, 1,2);
+ T2("(a+|b)+", "ab", 0,2, 1,2);
+ T2("(a+|b)?", "ab", 0,1, 0,1);
+ T2("([abc])*d", "abbbcd", 0,6, 4,5);
+ T2("([abc])*bcd", "abcd", 0,4, 0,1);
+ T1("a|b|c|d|e", "e", 0,1);
+ T2("(a|b|c|d|e)f", "ef", 0,2, 0,1);
+ T3("((a*|b))*", "-", 0,0, 0,0, 0,0);
+ T2("(ab|a[b]*)bc", "abc", 0,3, 0,1);
+ T2("a([bc]*)c*", "abc", 0,3, 1,3);
+ T3("a([bc]*)(c*d)", "abcd", 0,4, 1,3, 3,4);
+ T3("a([bc]+)(c*d)", "abcd", 0,4, 1,3, 3,4);
+ T3("a([bc]*)(c+d)", "abcd", 0,4, 1,2, 2,4);
+ T1("a[bcd]*dcdcde", "adcdcde", 0,7);
+ T2("(ab|a)b*c", "abc", 0,3, 0,2);
+ T5("((a)(b)c)(d)", "abcd", 0,4, 0,3, 0,1, 1,2, 3,4);
+ T3("(.*)c(.*)", "abcde", 0,5, 0,2, 3,5);
+ T2("a(bc)d", "abcd", 0,4, 1,3);
+ T2("a+(b|c)*d+", "aabcdd", 0,6, 3,4);
+
+ // categorize
+ T4("(a*)(ab)*(b*)", "abc", 0,2, 0,1, -1,-1, 1,2);
+ T7("((a*)(ab)*)((b*)(a*))", "aba", 0,3, 0,1, 0,1, -1,-1, 1,3, 1,2, 2,3);
+ T2("(...?.?)*", "xxxxxx", 0,6, 4,6);
+ T3("(a|ab)(bc|c)", "abcabc", 0,3, 0,1, 1,3);
+ T3("(aba|a*b)(aba|a*b)", "ababa", 0,5, 0,2, 2,5);
+ T2("(a*){2}", "xxxxx", 0,0, 0,0);
+ T2("(a*)*", "a", 0,1, 0,1);
+ T2("(aba|a*b)*", "ababa", 0,5, 2,5);
+ T3("(a(b)?)+", "aba", 0,3, 2,3, -1,-1);
+ T2(".*(.*)", "ab", 0,2, 2,2);
+ T6("(a?)((ab)?)(b?)a?(ab)?b?", "abab", 0,4, 0,1, 1,1, -1,-1, 1,2, -1,-1);
+
+ // forcedassoc
+ T3("(a|ab)(c|bcd)", "abcd", 0,4, 0,1, 1,4);
+ T3("(a|ab)(bcd|c)", "abcd", 0,4, 0,1, 1,4);
+ T3("(ab|a)(c|bcd)", "abcd", 0,4, 0,1, 1,4);
+ T3("(ab|a)(bcd|c)", "abcd", 0,4, 0,1, 1,4);
+ T5("((a|ab)(c|bcd))(d*)", "abcd", 0,4, 0,4, 0,1, 1,4, 4,4);
+ T5("((a|ab)(bcd|c))(d*)", "abcd", 0,4, 0,4, 0,1, 1,4, 4,4);
+ T5("((ab|a)(c|bcd))(d*)", "abcd", 0,4, 0,3, 0,2, 2,3, 3,4);
+ T5("((ab|a)(bcd|c))(d*)", "abcd", 0,4, 0,3, 0,2, 2,3, 3,4);
+ T5("(a|ab)((c|bcd)(d*))", "abcd", 0,4, 0,1, 1,4, 1,4, 4,4);
+ T5("(a|ab)((bcd|c)(d*))", "abcd", 0,4, 0,1, 1,4, 1,4, 4,4);
+ T5("(ab|a)((c|bcd)(d*))", "abcd", 0,4, 0,2, 2,4, 2,3, 3,4);
+ T5("(ab|a)((bcd|c)(d*))", "abcd", 0,4, 0,2, 2,4, 2,3, 3,4);
+ T3("(a*)(b|abc)", "abc", 0,3, 0,0, 0,3);
+ T3("(a*)(abc|b)", "abc", 0,3, 0,0, 0,3);
+ T5("((a*)(b|abc))(c*)", "abc", 0,3, 0,2, 0,1, 1,2, 2,3);
+ T5("((a*)(abc|b))(c*)", "abc", 0,3, 0,2, 0,1, 1,2, 2,3);
+ T5("(a*)((b|abc)(c*))", "abc", 0,3, 0,1, 1,3, 1,2, 2,3);
+ T5("(a*)((abc|b)(c*))", "abc", 0,3, 0,1, 1,3, 1,2, 2,3);
+ T3("(a*)(b|abc)", "abc", 0,3, 0,0, 0,3);
+ T3("(a*)(abc|b)", "abc", 0,3, 0,0, 0,3);
+ T5("((a*)(b|abc))(c*)", "abc", 0,3, 0,2, 0,1, 1,2, 2,3);
+ T5("((a*)(abc|b))(c*)", "abc", 0,3, 0,2, 0,1, 1,2, 2,3);
+ T5("(a*)((b|abc)(c*))", "abc", 0,3, 0,1, 1,3, 1,2, 2,3);
+ T5("(a*)((abc|b)(c*))", "abc", 0,3, 0,1, 1,3, 1,2, 2,3);
+ T2("(a|ab)", "ab", 0,2, 0,2);
+ T2("(ab|a)", "ab", 0,2, 0,2);
+ T3("(a|ab)(b*)", "ab", 0,2, 0,1, 1,2);
+ T3("(ab|a)(b*)", "ab", 0,2, 0,2, 2,2);
+
+ // glennfowler
+ T4("(a?)((ab)?)", "ab", 0,2, 0,0, 0,2, 0,2);
+ T5("(a?)((ab)?)(b?)", "ab", 0,2, 0,1, 1,1, -1,-1, 1,2);
+ T6("((a?)((ab)?))(b?)", "ab", 0,2, 0,1, 0,1, 1,1, -1,-1, 1,2);
+ T6("(a?)(((ab)?)(b?))", "ab", 0,2, 0,1, 1,2, 1,1, -1,-1, 1,2);
+ T2("(.?)", "x", 0,1, 0,1);
+ T2("(.?){1}", "x", 0,1, 0,1);
+ T3("(.?)(.?)", "x", 0,1, 0,1, 1,1);
+ T2("(.?){2}", "x", 0,1, 1,1);
+ T2("(.?)*", "x", 0,1, 0,1);
+ T2("(.?.?)", "xxx", 0,2, 0,2);
+ T2("(.?.?){1}", "xxx", 0,2, 0,2);
+ T3("(.?.?)(.?.?)", "xxx", 0,3, 0,2, 2,3);
+ T2("(.?.?){2}", "xxx", 0,3, 2,3);
+ T4("(.?.?)(.?.?)(.?.?)", "xxx", 0,3, 0,2, 2,3, 3,3);
+ T2("(.?.?){3}", "xxx", 0,3, 3,3);
+ T2("(.?.?)*", "xxx", 0,3, 2,3);
+ T4("a?((ab)?)(b?)", "ab", 0,2, 1,1, -1,-1, 1,2);
+ T4("(a?)((ab)?)b?", "ab", 0,2, 0,1, 1,1, -1,-1);
+ T3("a?((ab)?)b?", "ab", 0,2, 1,1, -1,-1);
+ T2("(a*){2}", "xxxxx", 0,0, 0,0);
+ T3("(ab?)(b?a)", "aba", 0,3, 0,2, 2,3);
+ T3("(a|ab)(ba|a)", "aba", 0,3, 0,1, 1,3);
+ T2("(a|ab|ba)", "aba", 0,2, 0,2);
+ T3("(a|ab|ba)(a|ab|ba)", "aba", 0,3, 0,1, 1,3);
+ T2("(a|ab|ba)*", "aba", 0,3, 1,3);
+ T2("(aba|a*b)", "ababa", 0,3, 0,3);
+ T3("(aba|a*b)(aba|a*b)", "ababa", 0,5, 0,2, 2,5);
+ T0("(aba|a*b)(aba|a*b)(aba|a*b)", "ababa");
+ T2("(aba|a*b)*", "ababa", 0,5, 2,5);
+ T2("(aba|ab|a)", "ababa", 0,3, 0,3);
+ T3("(aba|ab|a)(aba|ab|a)", "ababa", 0,5, 0,2, 2,5);
+ T4("(aba|ab|a)(aba|ab|a)(aba|ab|a)", "ababa", 0,5, 0,2, 2,4, 4,5);
+ T2("(aba|ab|a)*", "ababa", 0,5, 2,5);
+ T3("(a(b)?)", "aba", 0,2, 0,2, 1,2);
+ T5("(a(b)?)(a(b)?)", "aba", 0,3, 0,2, 1,2, 2,3, -1,-1);
+ T3("(a(b)?)+", "aba", 0,3, 2,3, -1,-1);
+ T3("(.*)(.*)", "xx", 0,2, 0,2, 2,2);
+ T2(".*(.*)", "xx", 0,2, 2,2);
+ T2("(a.*z|b.*y)", "azbazby", 0,5, 0,5);
+ T3("(a.*z|b.*y)(a.*z|b.*y)", "azbazby", 0,7, 0,5, 5,7);
+ T2("(a.*z|b.*y)*", "azbazby", 0,7, 5,7);
+ T3("(.|..)(.*)", "ab", 0,2, 0,1, 1,2);
+ T4("((..)*(...)*)", "xxx", 0,3, 0,3, -1,-1, 0,3);
+ T7("((..)*(...)*)((..)*(...)*)", "xxx", 0,3, 0,3, -1,-1, 0,3, 3,3, -1,-1, -1,-1);
+ T4("((..)*(...)*)*", "xxx", 0,3, 0,3, -1,-1, 0,3);
+
+ // nullsubexpr
+ T2("(a*)*", "a", 0,1, 0,1);
+ T2("(a*)*", "x", 0,0, 0,0);
+ T2("(a*)*", "aaaaaa", 0,6, 0,6);
+ T2("(a*)*", "aaaaaax", 0,6, 0,6);
+ T2("(a*)+", "a", 0,1, 0,1);
+ T2("(a*)+", "x", 0,0, 0,0);
+ T2("(a*)+", "aaaaaa", 0,6, 0,6);
+ T2("(a*)+", "aaaaaax", 0,6, 0,6);
+ T2("(a+)*", "a", 0,1, 0,1);
+ T2("(a+)*", "x", 0,0, -1,-1);
+ T2("(a+)*", "aaaaaa", 0,6, 0,6);
+ T2("(a+)*", "aaaaaax", 0,6, 0,6);
+ T2("(a+)+", "a", 0,1, 0,1);
+ T0("(a+)+", "x");
+ T2("(a+)+", "aaaaaa", 0,6, 0,6);
+ T2("(a+)+", "aaaaaax", 0,6, 0,6);
+ T2("([a]*)*", "a", 0,1, 0,1);
+ T2("([a]*)*", "x", 0,0, 0,0);
+ T2("([a]*)*", "aaaaaa", 0,6, 0,6);
+ T2("([a]*)*", "aaaaaax", 0,6, 0,6);
+ T2("([a]*)+", "a", 0,1, 0,1);
+ T2("([a]*)+", "x", 0,0, 0,0);
+ T2("([a]*)+", "aaaaaa", 0,6, 0,6);
+ T2("([a]*)+", "aaaaaax", 0,6, 0,6);
+ T2("([^b]*)*", "a", 0,1, 0,1);
+ T2("([^b]*)*", "b", 0,0, 0,0);
+ T2("([^b]*)*", "aaaaaa", 0,6, 0,6);
+ T2("([^b]*)*", "aaaaaab", 0,6, 0,6);
+ T2("([ab]*)*", "a", 0,1, 0,1);
+ T2("([ab]*)*", "aaaaaa", 0,6, 0,6);
+ T2("([ab]*)*", "ababab", 0,6, 0,6);
+ T2("([ab]*)*", "bababa", 0,6, 0,6);
+ T2("([ab]*)*", "b", 0,1, 0,1);
+ T2("([ab]*)*", "bbbbbb", 0,6, 0,6);
+ T2("([ab]*)*", "aaaabcde", 0,5, 0,5);
+ T2("([^a]*)*", "b", 0,1, 0,1);
+ T2("([^a]*)*", "bbbbbb", 0,6, 0,6);
+ T2("([^a]*)*", "aaaaaa", 0,0, 0,0);
+ T2("([^ab]*)*", "ccccxx", 0,6, 0,6);
+ T2("([^ab]*)*", "ababab", 0,0, 0,0);
+ T3("((z)+|a)*", "zabcde", 0,2, 1,2, -1,-1);
+ T2("(a)", "aaa", 0,1, 0,1);
+ T3("(a*)*(x)", "x", 0,1, 0,0, 0,1);
+ T3("(a*)*(x)", "ax", 0,2, 0,1, 1,2);
+ T3("(a*)*(x)", "axa", 0,2, 0,1, 1,2);
+ T3("(a*)+(x)", "x", 0,1, 0,0, 0,1);
+ T3("(a*)+(x)", "ax", 0,2, 0,1, 1,2);
+ T3("(a*)+(x)", "axa", 0,2, 0,1, 1,2);
+ T3("(a*){2}(x)", "x", 0,1, 0,0, 0,1);
+ T3("(a*){2}(x)", "ax", 0,2, 1,1, 1,2);
+ T3("(a*){2}(x)", "axa", 0,2, 1,1, 1,2);
+
+ T4("(()|.)(b)", "ab", 0,2, 0,1, -1,-1, 1,2);
+ T4("(()|[ab])(b)", "ab", 0,2, 0,1, -1,-1, 1,2);
+ T3("(()|[ab])+b", "aaab", 0,4, 2,3, -1,-1);
+ T4("(.|())(b)", "ab", 0,2, 0,1, -1,-1, 1,2);
+ T4("([ab]|())(b)", "ab", 0,2, 0,1, -1,-1, 1,2);
+ T3("([ab]|())+b", "aaab", 0,4, 2,3, -1,-1);
+ T3("(.?)(b)", "ab", 0,2, 0,1, 1,2);
+
+ // other
+ T2("(a|aa)*", "aaa", 0,3, 2,3);
+ T2("(a|aa)*", "aaaa", 0,4, 3,4);
+ T2("(aa|a)*", "aaa", 0,3, 2,3);
+ T2("(aa|a)*", "aaaa", 0,4, 2,4);
+ T2("a|(a)", "a", 0,1, -1,-1);
+ T2("(a)|a", "a", 0,1, 0,1);
+ T3("(b)a|b(a)", "ba", 0,2, 0,1, -1,-1);
+ T3("b(a)|(b)a", "ba", 0,2, 1,2, -1,-1);
+ T2("a*|(a|aa)*", "aa", 0,2, -1,-1);
+ T2("(a|aa)*|a*", "aa", 0,2, 1,2);
+ T2("(aa*|aaa*)*", "aaaaaa", 0,6, 0,6);
+ T3("(aa*|aaa*)(aa*|aaa*)", "aaaaaa", 0,6, 0,5, 5,6);
+ T2("(aa*|aaa*){2}", "aaaaaa", 0,6, 5,6);
+ T7("((aa)*|(aaa)*)((aa)*|(aaa)*)", "aaaaaa", 0,6, 0,6, 4,6, -1,-1, 6,6, -1,-1, -1,-1);
+ T4("((aa)*|(aaa)*){2}", "aaaaaa", 0,6, 6,6, -1,-1, -1,-1);
+ T3("(aa)*|(aaa)*", "aaaaaa", 0,6, 4,6, -1,-1);
+ T2("(X|Xa|Xab|Xaba|abab|baba|bY|Y)*", "XY", 0,2, 1,2);
+ T2("(X|Xa|Xab|Xaba|abab|baba|bY|Y)*", "XabY", 0,4, 2,4);
+ T2("(X|Xa|Xab|Xaba|abab|baba|bY|Y)*", "XababY", 0,6, 5,6);
+ T2("(X|Xa|Xab|Xaba|abab|baba|bY|Y)*", "XabababY", 0,8, 6,8);
+ T2("(X|Xa|Xab|Xaba|abab|baba|bY|Y)*", "XababababY", 0,10, 9,10);
+ T0("(y){2}", "NULL");
+ T0("(y){2}", "y");
+ T2("(y){2}", "yy", 0,2, 1,2);
+ T2("(y){0,2}", "NULL", 0,0, -1,-1);
+ T2("(y){0,2}", "y", 0,1, 0,1);
+ T2("(y){0,2}", "yy", 0,2, 1,2);
+ T0("(y){1,2}", "NULL");
+ T2("(y){1,2}", "y", 0,1, 0,1);
+ T2("(y){1,2}", "yy", 0,2, 1,2);
+ T0("(y){1,2}y", "NULL");
+ T0("(y){1,2}y", "y");
+ T2("(y){1,2}y", "yy", 0,2, 0,1);
+ T2("(y){1,2}y", "yyy", 0,3, 1,2);
+ T0("(y){1,2}y?", "NULL");
+ T2("(y){1,2}y?", "y", 0,1, 0,1);
+ T2("(y){1,2}y?", "yy", 0,2, 1,2);
+ T2("(y){1,2}y?", "yyy", 0,3, 1,2);
+ T0("(y){2,}", "NULL");
+ T0("(y){2,}", "y");
+ T2("(y){2,}", "yy", 0,2, 1,2);
+ T2("(y){2,}", "yyy", 0,3, 2,3);
+ T2("(y?){2}", "NULL", 0,0, 0,0);
+ T2("(y?){2}", "y", 0,1, 1,1);
+ T2("(y?){2}", "yy", 0,2, 1,2);
+ T2("(y?){0,2}", "NULL", 0,0, 0,0);
+ T2("(y?){0,2}", "y", 0,1, 1,1);
+ T2("(y?){0,2}", "yy", 0,2, 1,2);
+ T2("(y?){1,2}", "NULL", 0,0, 0,0);
+ T2("(y?){1,2}", "y", 0,1, 1,1);
+ T2("(y?){1,2}", "yy", 0,2, 1,2);
+ T0("(y?){1,2}y", "NULL");
+ T2("(y?){1,2}y", "y", 0,1, 0,0);
+ T2("(y?){1,2}y", "yy", 0,2, 1,1);
+ T2("(y?){1,2}y", "yyy", 0,3, 1,2);
+ T2("(y?){1,2}y?", "NULL", 0,0, 0,0);
+ T2("(y?){1,2}y?", "y", 0,1, 1,1);
+ T2("(y?){1,2}y?", "yy", 0,2, 1,2);
+ T2("(y?){1,2}y?", "yyy", 0,3, 1,2);
+ T2("(y?){2,}", "NULL", 0,0, 0,0);
+ T2("(y?){2,}", "y", 0,1, 1,1);
+ T2("(y?){2,}", "yy", 0,2, 1,2);
+ T2("(y?){2,}", "yyy", 0,3, 2,3);
+ T3("(y|(x?)){1,3}", "y", 0,1, 1,1, 1,1);
+ T2("(y[y]?){3}", "yyyy", 0,4, 3,4);
+
+ // repetition
+ T0("((..)|(.))", "");
+ T0("((..)|(.))((..)|(.))", "");
+ T0("((..)|(.))((..)|(.))((..)|(.))", "");
+ T0("((..)|(.)){1}", "");
+ T0("((..)|(.)){2}", "");
+ T0("((..)|(.)){3}", "");
+ T4("((..)|(.))*", "", 0,0, -1,-1, -1,-1, -1,-1);
+ T4("((..)|(.))", "a", 0,1, 0,1, -1,-1, 0,1);
+ T0("((..)|(.))((..)|(.))", "a");
+ T0("((..)|(.))((..)|(.))((..)|(.))", "a");
+ T4("((..)|(.)){1}", "a", 0,1, 0,1, -1,-1, 0,1);
+ T0("((..)|(.)){2}", "a");
+ T0("((..)|(.)){3}", "a");
+ T4("((..)|(.))*", "a", 0,1, 0,1, -1,-1, 0,1);
+ T4("((..)|(.))", "aa", 0,2, 0,2, 0,2, -1,-1);
+ T7("((..)|(.))((..)|(.))", "aa", 0,2, 0,1, -1,-1, 0,1, 1,2, -1,-1, 1,2);
+ T0("((..)|(.))((..)|(.))((..)|(.))", "aa");
+ T4("((..)|(.)){1}", "aa", 0,2, 0,2, 0,2, -1,-1);
+ T4("((..)|(.)){2}", "aa", 0,2, 1,2, -1,-1, 1,2);
+ T0("((..)|(.)){3}", "aa");
+ T4("((..)|(.))*", "aa", 0,2, 0,2, 0,2, -1,-1);
+ T4("((..)|(.))", "aaa", 0,2, 0,2, 0,2, -1,-1);
+ T7("((..)|(.))((..)|(.))", "aaa", 0,3, 0,2, 0,2, -1,-1, 2,3, -1,-1, 2,3);
+ T10("((..)|(.))((..)|(.))((..)|(.))", "aaa", 0,3, 0,1, -1,-1, 0,1, 1,2, -1,-1, 1,2, 2,3, -1,-1, 2,3);
+ T4("((..)|(.)){1}", "aaa", 0,2, 0,2, 0,2, -1,-1);
+ T4("((..)|(.)){2}", "aaa", 0,3, 2,3, -1,-1, 2,3);
+ T4("((..)|(.)){3}", "aaa", 0,3, 2,3, -1,-1, 2,3);
+ T4("((..)|(.))*", "aaa", 0,3, 2,3, -1,-1, 2,3);
+ T4("((..)|(.))", "aaaa", 0,2, 0,2, 0,2, -1,-1);
+ T7("((..)|(.))((..)|(.))", "aaaa", 0,4, 0,2, 0,2, -1,-1, 2,4, 2,4, -1,-1);
+ T10("((..)|(.))((..)|(.))((..)|(.))", "aaaa", 0,4, 0,2, 0,2, -1,-1, 2,3, -1,-1, 2,3, 3,4, -1,-1, 3,4);
+ T4("((..)|(.)){1}", "aaaa", 0,2, 0,2, 0,2, -1,-1);
+ T4("((..)|(.)){2}", "aaaa", 0,4, 2,4, 2,4, -1,-1);
+ T4("((..)|(.)){3}", "aaaa", 0,4, 3,4, -1,-1, 3,4);
+ T4("((..)|(.))*", "aaaa", 0,4, 2,4, 2,4, -1,-1);
+ T4("((..)|(.))", "aaaaa", 0,2, 0,2, 0,2, -1,-1);
+ T7("((..)|(.))((..)|(.))", "aaaaa", 0,4, 0,2, 0,2, -1,-1, 2,4, 2,4, -1,-1);
+ T10("((..)|(.))((..)|(.))((..)|(.))", "aaaaa", 0,5, 0,2, 0,2, -1,-1, 2,4, 2,4, -1,-1, 4,5, -1,-1, 4,5);
+ T4("((..)|(.)){1}", "aaaaa", 0,2, 0,2, 0,2, -1,-1);
+ T4("((..)|(.)){2}", "aaaaa", 0,4, 2,4, 2,4, -1,-1);
+ T4("((..)|(.)){3}", "aaaaa", 0,5, 4,5, -1,-1, 4,5);
+ T4("((..)|(.))*", "aaaaa", 0,5, 4,5, -1,-1, 4,5);
+ T4("((..)|(.))", "aaaaaa", 0,2, 0,2, 0,2, -1,-1);
+ T7("((..)|(.))((..)|(.))", "aaaaaa", 0,4, 0,2, 0,2, -1,-1, 2,4, 2,4, -1,-1);
+ T10("((..)|(.))((..)|(.))((..)|(.))", "aaaaaa", 0,6, 0,2, 0,2, -1,-1, 2,4, 2,4, -1,-1, 4,6, 4,6, -1,-1);
+ T4("((..)|(.)){1}", "aaaaaa", 0,2, 0,2, 0,2, -1,-1);
+ T4("((..)|(.)){2}", "aaaaaa", 0,4, 2,4, 2,4, -1,-1);
+ T4("((..)|(.)){3}", "aaaaaa", 0,6, 4,6, 4,6, -1,-1);
+ T4("((..)|(.))*", "aaaaaa", 0,6, 4,6, 4,6, -1,-1);
+ T2("X(.?){0,}Y", "X1234567Y", 0,9, 7,8);
+ T2("X(.?){1,}Y", "X1234567Y", 0,9, 7,8);
+ T2("X(.?){2,}Y", "X1234567Y", 0,9, 7,8);
+ T2("X(.?){3,}Y", "X1234567Y", 0,9, 7,8);
+ T2("X(.?){4,}Y", "X1234567Y", 0,9, 7,8);
+ T2("X(.?){5,}Y", "X1234567Y", 0,9, 7,8);
+ T2("X(.?){6,}Y", "X1234567Y", 0,9, 7,8);
+ T2("X(.?){7,}Y", "X1234567Y", 0,9, 7,8);
+ T2("X(.?){8,}Y", "X1234567Y", 0,9, 8,8);
+ T2("X(.?){0,8}Y", "X1234567Y", 0,9, 8,8);
+ T2("X(.?){1,8}Y", "X1234567Y", 0,9, 8,8);
+ T2("X(.?){2,8}Y", "X1234567Y", 0,9, 8,8);
+ T2("X(.?){3,8}Y", "X1234567Y", 0,9, 8,8);
+ T2("X(.?){4,8}Y", "X1234567Y", 0,9, 8,8);
+ T2("X(.?){5,8}Y", "X1234567Y", 0,9, 8,8);
+ T2("X(.?){6,8}Y", "X1234567Y", 0,9, 8,8);
+ T2("X(.?){7,8}Y", "X1234567Y", 0,9, 8,8);
+ T2("X(.?){8,8}Y", "X1234567Y", 0,9, 8,8);
+ T3("(a|ab|c|bcd){0,}(d*)", "ababcd", 0,6, 3,6, 6,6);
+ T3("(a|ab|c|bcd){1,}(d*)", "ababcd", 0,6, 3,6, 6,6);
+ T3("(a|ab|c|bcd){2,}(d*)", "ababcd", 0,6, 3,6, 6,6);
+ T3("(a|ab|c|bcd){3,}(d*)", "ababcd", 0,6, 3,6, 6,6);
+ T0("(a|ab|c|bcd){4,}(d*)", "ababcd");
+ T3("(a|ab|c|bcd){0,10}(d*)", "ababcd", 0,6, 3,6, 6,6);
+ T3("(a|ab|c|bcd){1,10}(d*)", "ababcd", 0,6, 3,6, 6,6);
+ T3("(a|ab|c|bcd){2,10}(d*)", "ababcd", 0,6, 3,6, 6,6);
+ T3("(a|ab|c|bcd){3,10}(d*)", "ababcd", 0,6, 3,6, 6,6);
+ T0("(a|ab|c|bcd){4,10}(d*)", "ababcd");
+ T3("(a|ab|c|bcd)*(d*)", "ababcd", 0,6, 3,6, 6,6);
+ T3("(a|ab|c|bcd)+(d*)", "ababcd", 0,6, 3,6, 6,6);
+ T3("(ab|a|c|bcd){0,}(d*)", "ababcd", 0,6, 4,5, 5,6);
+ T3("(ab|a|c|bcd){1,}(d*)", "ababcd", 0,6, 4,5, 5,6);
+ T3("(ab|a|c|bcd){2,}(d*)", "ababcd", 0,6, 4,5, 5,6);
+ T3("(ab|a|c|bcd){3,}(d*)", "ababcd", 0,6, 4,5, 5,6);
+ T0("(ab|a|c|bcd){4,}(d*)", "ababcd");
+ T3("(ab|a|c|bcd){0,10}(d*)", "ababcd", 0,6, 4,5, 5,6);
+ T3("(ab|a|c|bcd){1,10}(d*)", "ababcd", 0,6, 4,5, 5,6);
+ T3("(ab|a|c|bcd){2,10}(d*)", "ababcd", 0,6, 4,5, 5,6);
+ T3("(ab|a|c|bcd){3,10}(d*)", "ababcd", 0,6, 4,5, 5,6);
+ T0("(ab|a|c|bcd){4,10}(d*)", "ababcd");
+ T3("(ab|a|c|bcd)*(d*)", "ababcd", 0,6, 4,5, 5,6);
+ T3("(ab|a|c|bcd)+(d*)", "ababcd", 0,6, 4,5, 5,6);
+
+ // rightassoc
+ T4("(a|ab)(c|bcd)(d*)", "abcd", 0,4, 0,1, 1,4, 4,4);
+ T4("(a|ab)(bcd|c)(d*)", "abcd", 0,4, 0,1, 1,4, 4,4);
+ T4("(ab|a)(c|bcd)(d*)", "abcd", 0,4, 0,2, 2,3, 3,4);
+ T4("(ab|a)(bcd|c)(d*)", "abcd", 0,4, 0,2, 2,3, 3,4);
+ T4("(a*)(b|abc)(c*)", "abc", 0,3, 0,1, 1,2, 2,3);
+ T4("(a*)(abc|b)(c*)", "abc", 0,3, 0,1, 1,2, 2,3);
+ T4("(a*)(b|abc)(c*)", "abc", 0,3, 0,1, 1,2, 2,3);
+ T4("(a*)(abc|b)(c*)", "abc", 0,3, 0,1, 1,2, 2,3);
+ T4("(a|ab)(c|bcd)(d|.*)", "abcd", 0,4, 0,1, 1,4, 4,4);
+ T4("(a|ab)(bcd|c)(d|.*)", "abcd", 0,4, 0,1, 1,4, 4,4);
+ T4("(ab|a)(c|bcd)(d|.*)", "abcd", 0,4, 0,2, 2,3, 3,4);
+ T4("(ab|a)(bcd|c)(d|.*)", "abcd", 0,4, 0,2, 2,3, 3,4);
+
+ return e;
+}
+
#undef GS
#undef T
#undef T0
{
int e = 0;
- e |= test_all(0);
- e |= test_all(REG_NFA);
- e |= test_all(REG_NFA | REG_LEFTMOST);
+ e |= test_all_posix(0);
+ e |= test_all_posix(REG_NFA);
+ e |= test_all_leftmost(REG_NFA | REG_LEFTMOST);
return e;
}
Output& Output::wdelay_yymaxnmatch()
{
if (block().opts->target == TARGET_CODE
- && block().opts->posix_captures) {
+ && block().opts->posix_syntax) {
block().fragments.push_back (new OutputFragment (OutputFragment::MAXNMATCH, 0));
}
return *this;
closure_t &closure = ctx.dc_closure;
// build tagged epsilon-closure of the given set of NFA states
- if (ctx.dc_opts->posix_captures) {
+ if (ctx.dc_opts->posix_semantics) {
closure_posix(ctx);
prune(closure, ctx.dc_nfa.rules);
std::sort(closure.begin(), closure.end(), cmpby_rule_state);
// WARNING: this function assumes that kernel items are grouped by rule
void warn_nondeterministic_tags(const determ_context_t &ctx)
{
- if (ctx.dc_opts->posix_captures) return;
+ if (ctx.dc_opts->posix_syntax) return;
Warn &warn = ctx.dc_warn;
const kernels_t &kernels = ctx.dc_kernels;
s = re_to_nfa(ctx, iter, t);
for (uint32_t i = min; i < max; ++i) {
nfa_state_t *q = &nfa.states[nfa.size++];
- if (ctx.opts->posix_captures) {
+ if (ctx.opts->posix_semantics) {
// POSIX: shorter alternative first to speed up GOR1
// by first exploring paths without optional empty repetitions
q->make_alt(nrule, t, s);
}
}
- if (spec.opts->posix_captures) {
+ if (spec.opts->posix_semantics) {
// needed for closure algorithms GOR1 and GTOP
uint32_t topord = 0;
calc_topord(root, topord);
bUseStateAbort = Opt::baseopt.bUseStateAbort;
bUseStateNext = Opt::baseopt.bUseStateNext;
}
- if (posix_captures) {
+ if (posix_semantics) {
+ posix_syntax = true;
+ }
+ if (posix_syntax) {
tags = true;
}
if (!tags)
MUTOPT (bool, tags, false) \
MUTOPT (std::string, tags_prefix, "yyt") \
MUTOPT (std::string, tags_expression, "@@") \
- MUTOPT (bool, posix_captures, false) \
+ MUTOPT (bool, posix_syntax, false) \
+ MUTOPT (bool, posix_semantics, false) \
/* code generation */ \
MUTOPT (bool, sFlag, false) \
MUTOPT (bool, bFlag, false) \
"i" { opts.set_iFlag(true); goto opt_short; }
"s" { opts.set_sFlag(true); goto opt_short; }
"T" { opts.set_tags(true); goto opt_short; }
- "P" { opts.set_posix_captures(true); goto opt_short; }
"e" { opts.set_encoding(Enc::EBCDIC); goto opt_short; }
"u" { opts.set_encoding(Enc::UTF32); goto opt_short; }
"w" { opts.set_encoding(Enc::UCS2); goto opt_short; }
"x" { opts.set_encoding(Enc::UTF16); goto opt_short; }
"8" { opts.set_encoding(Enc::UTF8); goto opt_short; }
+ "P" {
+ opts.set_posix_syntax(true);
+ opts.set_posix_semantics(true);
+ goto opt_short;
+ }
+
"I" end { NEXT_ARG("-I", opt_incpath); }
"I" { *argv = YYCURSOR; goto opt_incpath; }
"case-insensitive" end { opts.set_bCaseInsensitive (true); goto opt; }
"case-inverted" end { opts.set_bCaseInverted (true); goto opt; }
"tags" end { opts.set_tags (true); goto opt; }
- "posix-captures" end { opts.set_posix_captures(true); goto opt; }
"ecb" end { opts.set_encoding(Enc::EBCDIC); goto opt; }
"unicode" end { opts.set_encoding(Enc::UTF32); goto opt; }
"wide-chars" end { opts.set_encoding(Enc::UCS2); goto opt; }
"utf-16" end { opts.set_encoding(Enc::UTF16); goto opt; }
"utf-8" end { opts.set_encoding(Enc::UTF8); goto opt; }
+ "posix-captures" end {
+ opts.set_posix_syntax(true);
+ opts.set_posix_semantics(true);
+ goto opt;
+ }
+
"output" end { NEXT_ARG("-o, --output", opt_output); }
"type-header" end { NEXT_ARG("-t, --type-header", opt_header); }
"encoding-policy" end { NEXT_ARG("--encoding-policy", opt_encoding_policy); }
"flags:" ("i" | "no-debug-info") { opts.set_iFlag (lex_conf_bool()); return; }
"flags:" ("s" | "nested-ifs") { opts.set_sFlag (lex_conf_bool()); return; }
"flags:" ("T" | "tags") { opts.set_tags (lex_conf_bool()); return; }
- "flags:" ("P" | "posix-captures") { opts.set_posix_captures (lex_conf_bool()); return; }
"flags:case-insensitive" { opts.set_bCaseInsensitive (lex_conf_bool()); return; }
"flags:case-inverted" { opts.set_bCaseInverted (lex_conf_bool()); return; }
"flags:" ("o" | "output") { opts.set_output_file (lex_conf_string()); return; }
"flags:" ("t" | "type-header") { opts.set_header_file (lex_conf_string()); return; }
+ "flags:" ("P" | "posix-captures") {
+ bool b = lex_conf_bool();
+ opts.set_posix_syntax(b);
+ opts.set_posix_semantics(b);
+ return;
+ }
+
"flags:" ("e" | "ecb") { lex_conf_enc(Enc::EBCDIC, opts); return; }
"flags:" ("u" | "unicode") { lex_conf_enc(Enc::UTF32, opts); return; }
"flags:" ("w" | "wide-chars") { lex_conf_enc(Enc::UCS2, opts); return; }
}
case AST::ALT: {
RE *t1 = NULL, *t2 = NULL, *t3 = NULL, *t4 = NULL, *x, *y;
- if (opts->posix_captures && has_tags(ast)) {
+ if (opts->posix_syntax && has_tags(ast)) {
// see note [POSIX subexpression hierarchy]
if (ast->cat.ast1->type != AST::CAP) {
t1 = re_tag(spec, tags.size(), false);
}
case AST::CAT: {
RE *t1 = NULL, *t2 = NULL, *t3 = NULL, *t4 = NULL, *x, *y;
- if (opts->posix_captures && has_tags(ast)) {
+ if (opts->posix_syntax && has_tags(ast)) {
// see note [POSIX subexpression hierarchy]
if (ast->cat.ast1->type != AST::CAP) {
t1 = re_tag(spec, tags.size(), false);
fatal_lc(ast->line, ast->column,
"tags are only allowed with '-T, --tags' option");
}
- if (opts->posix_captures) {
+ if (opts->posix_syntax) {
fatal_lc(ast->line, ast->column,
"simple tags are not allowed with '--posix-captures' option");
}
return t;
}
case AST::CAP: {
- if (!opts->posix_captures) {
+ if (!opts->posix_syntax) {
return ast_to_re(spec, ast->cap, ncap, height);
}
const AST *x = ast->cap;
const AST *x = ast->iter.ast;
RE *t1 = NULL, *t2 = NULL;
- if (opts->posix_captures && x->type == AST::CAP) {
+ if (opts->posix_syntax && x->type == AST::CAP) {
x = x->cap;
if (x->type == AST::REF) x = x->ref.ast;
case AST::ITER:
break;
case AST::CAP:
- if (spec.opts->posix_captures) break;
+ if (spec.opts->posix_syntax) break;
return ast_to_range(spec, ast->cap);
case AST::REF:
if (misuse_of_named_def(spec, ast)) return NULL;
{
DASSERT(ast->type == AST::REF);
- if (!spec.opts->posix_captures) return false;
+ if (!spec.opts->posix_syntax) return false;
fatal_l(ast->line,
"implicit grouping is forbidden with '--posix-captures'"
y = re_cat(spec, y, re_tag(spec, *i, true));
}
re->alt.re1 = re_cat(spec, re->alt.re1, y);
- re->alt.re2 = spec.opts->posix_captures
+ // Decision to place negative tags before/after could be based
+ // on POSIX semantics, not syntax. But strangely on some tests
+ // placing before results in better performance. More benchmarks
+ // are needed to understand this (with AOT/JIT, TNFA/TDFA).
+ re->alt.re2 = spec.opts->posix_syntax
? re_cat(spec, x, re->alt.re2)
: re_cat(spec, re->alt.re2, x);
break;
o.ws("\n").wind(1).ws("const YYCTYPE *limit = NULL;");
o.ws("\n").wind(1).ws("const YYCTYPE *token = NULL;");
o.ws("\n").wind(1).ws("const YYCTYPE *eof = NULL;");
- if (opts->posix_captures) {
+ if (opts->posix_syntax) {
o.ws("\n").wind(1).ws("size_t yynmatch;");
o.ws("\n").wind(1).ws("const YYCTYPE *yypmatch[").wu64(maxnmatch).ws(" * 2];");
}