-/* Generated by re2c 0.16 on Sat Apr 2 15:20:14 2016 */
+/* Generated by re2c 0.16 on Sat Apr 2 17:18:35 2016 */
#line 1 "../src/parse/lex.re"
#include "src/util/c99_stdint.h"
#include <stddef.h>
tok = cur;
echo:
+ const char *start = cur;
-#line 60 "src/parse/lex.cc"
+
+#line 62 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
}
++YYCURSOR;
-#line 172 "../src/parse/lex.re"
+#line 157 "../src/parse/lex.re"
{
if (opts->target == opt_t::CODE) {
- out.wraw(tok, tok_len () - 1);
- // -1 so we don't write out the \0
+ out.wraw(tok, start);
}
if (cur == eof) {
return Stop;
}
}
-#line 128 "src/parse/lex.cc"
+#line 129 "src/parse/lex.cc"
yy4:
++YYCURSOR;
yy5:
-#line 182 "../src/parse/lex.re"
+#line 177 "../src/parse/lex.re"
{ goto echo; }
-#line 134 "src/parse/lex.cc"
+#line 135 "src/parse/lex.cc"
yy6:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
if (yych == '#') goto yy14;
yy7:
-#line 163 "../src/parse/lex.re"
+#line 171 "../src/parse/lex.re"
{
- if (opts->target == opt_t::CODE) {
- out.wraw(tok, tok_len ());
- }
cline++;
- tok = pos = cur;
+ pos = cur;
goto echo;
}
-#line 152 "src/parse/lex.cc"
+#line 150 "src/parse/lex.cc"
yy8:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy6;
}
yy16:
++YYCURSOR;
-#line 77 "../src/parse/lex.re"
+#line 78 "../src/parse/lex.re"
{
- if (opts->rFlag)
- {
- fatal("found standard 're2c' block while using -r flag");
- }
- if (opts->target == opt_t::CODE)
- {
- const size_t lexeme_len = cur[-1] == '{'
- ? sizeof ("%{") - 1
- : sizeof ("/*!re2c") - 1;
- out.wraw(tok, tok_len () - lexeme_len);
- }
- tok = cur;
- return Parse;
- }
-#line 211 "src/parse/lex.cc"
+ if (opts->target == opt_t::CODE) {
+ out.wraw(tok, start);
+ }
+ if (opts->rFlag) {
+ fatal("found standard 're2c' block while using -r flag");
+ }
+ return Parse;
+ }
+#line 203 "src/parse/lex.cc"
yy18:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '!') goto yy20;
yy67:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 158 "../src/parse/lex.re"
+#line 166 "../src/parse/lex.re"
{
set_sourceline();
goto echo;
}
-#line 446 "src/parse/lex.cc"
+#line 438 "src/parse/lex.cc"
yy69:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy67;
goto yy13;
yy91:
++YYCURSOR;
-#line 121 "../src/parse/lex.re"
+#line 118 "../src/parse/lex.re"
{
if (opts->target == opt_t::CODE) {
- out.wdelay_yymaxfill();
+ out.wraw(tok, start)
+ .wdelay_yymaxfill();
}
goto eoc;
}
-#line 549 "src/parse/lex.cc"
+#line 542 "src/parse/lex.cc"
yy93:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy100;
goto yy13;
yy95:
++YYCURSOR;
-#line 104 "../src/parse/lex.re"
+#line 100 "../src/parse/lex.re"
{
- if (!opts->rFlag)
- {
- fatal("found 'use:re2c' block without -r flag");
- }
- reuse();
- if (opts->target == opt_t::CODE)
- {
- const size_t lexeme_len = sizeof ("/*!use:re2c") - 1;
- out.wraw(tok, tok_len () - lexeme_len);
- }
- tok = cur;
- return Reuse;
- }
-#line 575 "src/parse/lex.cc"
+ if (opts->target == opt_t::CODE) {
+ out.wraw(tok, start);
+ }
+ if (!opts->rFlag) {
+ fatal("found 'use:re2c' block without -r flag");
+ }
+ reuse();
+ return Reuse;
+ }
+#line 564 "src/parse/lex.cc"
yy97:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy102;
goto yy13;
yy105:
++YYCURSOR;
-#line 92 "../src/parse/lex.re"
+#line 88 "../src/parse/lex.re"
{
- if (opts->rFlag)
- {
- opts.reset_mapCodeName ();
- }
- else
- {
- fatal("found 'rules:re2c' block without -r flag");
- }
- tok = cur;
- return Rules;
- }
-#line 623 "src/parse/lex.cc"
+ if (opts->target == opt_t::CODE) {
+ out.wraw(tok, start);
+ }
+ if (opts->rFlag) {
+ opts.reset_mapCodeName ();
+ } else {
+ fatal("found 'rules:re2c' block without -r flag");
+ }
+ return Rules;
+ }
+#line 611 "src/parse/lex.cc"
yy107:
++YYCURSOR;
-#line 135 "../src/parse/lex.re"
+#line 134 "../src/parse/lex.re"
{
if (opts->target == opt_t::CODE) {
- out.wdelay_line_info().ws("\n")
+ out.wraw(tok, start)
+ .wdelay_line_info().ws("\n")
.wdelay_types().ws("\n")
.wline_info(cline, get_fname().c_str());
}
goto eoc;
}
-#line 635 "src/parse/lex.cc"
+#line 624 "src/parse/lex.cc"
yy109:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy113;
goto yy13;
yy111:
++YYCURSOR;
-#line 119 "../src/parse/lex.re"
- { goto eoc; }
-#line 648 "src/parse/lex.cc"
+#line 111 "../src/parse/lex.re"
+ {
+ if (opts->target == opt_t::CODE) {
+ out.wraw(tok, start);
+ }
+ goto eoc;
+ }
+#line 642 "src/parse/lex.cc"
yy113:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy115;
#line 144 "../src/parse/lex.re"
{
if (opts->target == opt_t::CODE) {
- const size_t len = sizeof("/*!contexts:re2c") - 1;
- out.wraw(tok, tok_len() - len);
+ out.wraw(tok, start);
}
ConfContexts *conf = new ConfContexts;
lex_conf_contexts(*conf);
tok = pos = cur;
goto echo;
}
-#line 673 "src/parse/lex.cc"
+#line 666 "src/parse/lex.cc"
yy117:
++YYCURSOR;
-#line 128 "../src/parse/lex.re"
+#line 126 "../src/parse/lex.re"
{
if (opts->target == opt_t::CODE) {
- out.wdelay_state_goto(opts->topIndent);
+ out.wraw(tok, start)
+ .wdelay_state_goto(opts->topIndent);
}
goto eoc;
}
-#line 683 "src/parse/lex.cc"
+#line 677 "src/parse/lex.cc"
}
-#line 183 "../src/parse/lex.re"
+#line 178 "../src/parse/lex.re"
eoc:
-#line 690 "src/parse/lex.cc"
+#line 684 "src/parse/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
}
yy121:
++YYCURSOR;
-#line 187 "../src/parse/lex.re"
+#line 182 "../src/parse/lex.re"
{ fatal("expected end of block"); }
-#line 708 "src/parse/lex.cc"
+#line 702 "src/parse/lex.cc"
yy123:
++YYCURSOR;
yy124:
-#line 188 "../src/parse/lex.re"
+#line 183 "../src/parse/lex.re"
{ goto eoc; }
-#line 714 "src/parse/lex.cc"
+#line 708 "src/parse/lex.cc"
yy125:
++YYCURSOR;
-#line 189 "../src/parse/lex.re"
+#line 184 "../src/parse/lex.re"
{ ++ignored; goto eoc; }
-#line 719 "src/parse/lex.cc"
+#line 713 "src/parse/lex.cc"
yy127:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy125;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '/') goto yy124;
++YYCURSOR;
-#line 190 "../src/parse/lex.re"
+#line 185 "../src/parse/lex.re"
{
if (ignored > 0) {
cline += ignored;
tok = pos = cur;
goto echo;
}
-#line 738 "src/parse/lex.cc"
+#line 732 "src/parse/lex.cc"
}
-#line 199 "../src/parse/lex.re"
+#line 194 "../src/parse/lex.re"
}
start:
-#line 760 "src/parse/lex.cc"
+#line 754 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
yy133:
++YYCURSOR;
yy134:
-#line 377 "../src/parse/lex.re"
+#line 372 "../src/parse/lex.re"
{
fatalf("unexpected character: '%c'", *tok);
goto scan;
}
-#line 871 "src/parse/lex.cc"
+#line 865 "src/parse/lex.cc"
yy135:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yybm[0+yych] & 16) {
goto yy135;
}
-#line 361 "../src/parse/lex.re"
+#line 356 "../src/parse/lex.re"
{
goto scan;
}
-#line 883 "src/parse/lex.cc"
+#line 877 "src/parse/lex.cc"
yy138:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '#') goto yy167;
}
yy139:
-#line 370 "../src/parse/lex.re"
+#line 365 "../src/parse/lex.re"
{
if (cur == eof) return 0;
pos = cur;
cline++;
goto scan;
}
-#line 901 "src/parse/lex.cc"
+#line 895 "src/parse/lex.cc"
yy140:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy138;
goto yy134;
yy141:
++YYCURSOR;
-#line 248 "../src/parse/lex.re"
+#line 243 "../src/parse/lex.re"
{ yylval.regexp = lex_str('"', opts->bCaseInsensitive || opts->bCaseInverted); return TOKEN_REGEXP; }
-#line 910 "src/parse/lex.cc"
+#line 904 "src/parse/lex.cc"
yy143:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '}') goto yy169;
goto yy134;
yy144:
++YYCURSOR;
-#line 247 "../src/parse/lex.re"
+#line 242 "../src/parse/lex.re"
{ yylval.regexp = lex_str('\'', opts->bCaseInsensitive || !opts->bCaseInverted); return TOKEN_REGEXP; }
-#line 919 "src/parse/lex.cc"
+#line 913 "src/parse/lex.cc"
yy146:
++YYCURSOR;
yy147:
-#line 264 "../src/parse/lex.re"
+#line 259 "../src/parse/lex.re"
{
return *tok;
}
-#line 927 "src/parse/lex.cc"
+#line 921 "src/parse/lex.cc"
yy148:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '/') goto yy169;
-#line 268 "../src/parse/lex.re"
+#line 263 "../src/parse/lex.re"
{
yylval.op = *tok;
return TOKEN_STAR;
}
-#line 936 "src/parse/lex.cc"
+#line 930 "src/parse/lex.cc"
yy150:
++YYCURSOR;
-#line 272 "../src/parse/lex.re"
+#line 267 "../src/parse/lex.re"
{
yylval.op = *tok;
return TOKEN_CLOSE;
}
-#line 944 "src/parse/lex.cc"
+#line 938 "src/parse/lex.cc"
yy152:
++YYCURSOR;
-#line 356 "../src/parse/lex.re"
+#line 351 "../src/parse/lex.re"
{
yylval.regexp = mkDot();
return TOKEN_REGEXP;
}
-#line 952 "src/parse/lex.cc"
+#line 946 "src/parse/lex.cc"
yy154:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '*') goto yy171;
yy159:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '^') goto yy190;
-#line 249 "../src/parse/lex.re"
+#line 244 "../src/parse/lex.re"
{ yylval.regexp = lex_cls(false); return TOKEN_REGEXP; }
-#line 994 "src/parse/lex.cc"
+#line 988 "src/parse/lex.cc"
yy161:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
}
}
yy163:
-#line 218 "../src/parse/lex.re"
+#line 213 "../src/parse/lex.re"
{
depth = 1;
goto code;
}
-#line 1023 "src/parse/lex.cc"
+#line 1017 "src/parse/lex.cc"
yy164:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
}
yy169:
++YYCURSOR;
-#line 242 "../src/parse/lex.re"
+#line 237 "../src/parse/lex.re"
{
tok = cur;
return 0;
}
-#line 1068 "src/parse/lex.cc"
+#line 1062 "src/parse/lex.cc"
yy171:
++YYCURSOR;
-#line 236 "../src/parse/lex.re"
+#line 231 "../src/parse/lex.re"
{
depth = 1;
goto comment;
}
-#line 1076 "src/parse/lex.cc"
+#line 1070 "src/parse/lex.cc"
yy173:
++YYCURSOR;
-#line 233 "../src/parse/lex.re"
+#line 228 "../src/parse/lex.re"
{
goto nextLine;
}
-#line 1083 "src/parse/lex.cc"
+#line 1077 "src/parse/lex.cc"
yy175:
++YYCURSOR;
YYCURSOR -= 1;
-#line 340 "../src/parse/lex.re"
+#line 335 "../src/parse/lex.re"
{
if (!opts->FFlag) {
yylval.str = new std::string (tok, tok_len());
return TOKEN_REGEXP;
}
}
-#line 1103 "src/parse/lex.cc"
+#line 1097 "src/parse/lex.cc"
yy177:
yych = (YYCTYPE)*++YYCURSOR;
goto yy203;
yy178:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 335 "../src/parse/lex.re"
+#line 330 "../src/parse/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
return TOKEN_ID;
}
-#line 1115 "src/parse/lex.cc"
+#line 1109 "src/parse/lex.cc"
yy180:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yy182:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '>') goto yy204;
-#line 227 "../src/parse/lex.re"
+#line 222 "../src/parse/lex.re"
{
tok += 2; /* skip ":=" */
depth = 0;
goto code;
}
-#line 1148 "src/parse/lex.cc"
+#line 1142 "src/parse/lex.cc"
yy184:
++YYCURSOR;
-#line 255 "../src/parse/lex.re"
+#line 250 "../src/parse/lex.re"
{
return TOKEN_SETUP;
}
-#line 1155 "src/parse/lex.cc"
+#line 1149 "src/parse/lex.cc"
yy186:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
}
}
yy189:
-#line 259 "../src/parse/lex.re"
+#line 254 "../src/parse/lex.re"
{
yylval.str = new std::string(tok + 1, tok_len() - 1);
return TOKEN_CTX;
}
-#line 1182 "src/parse/lex.cc"
+#line 1176 "src/parse/lex.cc"
yy190:
++YYCURSOR;
-#line 250 "../src/parse/lex.re"
+#line 245 "../src/parse/lex.re"
{ yylval.regexp = lex_cls(true); return TOKEN_REGEXP; }
-#line 1187 "src/parse/lex.cc"
+#line 1181 "src/parse/lex.cc"
yy192:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
yy193:
++YYCURSOR;
yy194:
-#line 308 "../src/parse/lex.re"
+#line 303 "../src/parse/lex.re"
{
fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers");
}
-#line 1200 "src/parse/lex.cc"
+#line 1194 "src/parse/lex.cc"
yy195:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yy200:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 322 "../src/parse/lex.re"
+#line 317 "../src/parse/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
if (opts->FFlag)
return TOKEN_ID;
}
}
-#line 1266 "src/parse/lex.cc"
+#line 1260 "src/parse/lex.cc"
yy202:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy204:
++YYCURSOR;
YYCURSOR -= 2;
-#line 223 "../src/parse/lex.re"
+#line 218 "../src/parse/lex.re"
{
return *tok;
}
-#line 1293 "src/parse/lex.cc"
+#line 1287 "src/parse/lex.cc"
yy206:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yy210:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 252 "../src/parse/lex.re"
+#line 247 "../src/parse/lex.re"
{
return TOKEN_NOCOND;
}
-#line 1331 "src/parse/lex.cc"
+#line 1325 "src/parse/lex.cc"
yy212:
yych = (YYCTYPE)*++YYCURSOR;
YYCTXMARKER = YYCURSOR;
goto yy194;
yy214:
++YYCURSOR;
-#line 277 "../src/parse/lex.re"
+#line 272 "../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 1355 "src/parse/lex.cc"
+#line 1349 "src/parse/lex.cc"
yy216:
++YYCURSOR;
-#line 312 "../src/parse/lex.re"
+#line 307 "../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 1366 "src/parse/lex.cc"
+#line 1360 "src/parse/lex.cc"
yy218:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'n') goto yy224;
goto yy166;
yy222:
++YYCURSOR;
-#line 299 "../src/parse/lex.re"
+#line 294 "../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 1395 "src/parse/lex.cc"
+#line 1389 "src/parse/lex.cc"
yy224:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy229;
goto yy166;
yy225:
++YYCURSOR;
-#line 320 "../src/parse/lex.re"
+#line 315 "../src/parse/lex.re"
{ lex_conf (); return TOKEN_CONF; }
-#line 1404 "src/parse/lex.cc"
+#line 1398 "src/parse/lex.cc"
yy227:
++YYCURSOR;
-#line 286 "../src/parse/lex.re"
+#line 281 "../src/parse/lex.re"
{
const char * p = strchr (tok, ',');
if (!s_to_u32_unsafe (tok + 1, p, yylval.extop.min))
}
return TOKEN_CLOSESIZE;
}
-#line 1420 "src/parse/lex.cc"
+#line 1414 "src/parse/lex.cc"
yy229:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '0') goto yy231;
yy236:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 365 "../src/parse/lex.re"
+#line 360 "../src/parse/lex.re"
{
set_sourceline ();
goto scan;
}
-#line 1481 "src/parse/lex.cc"
+#line 1475 "src/parse/lex.cc"
yy238:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy236;
if (yych == '\n') goto yy166;
goto yy239;
}
-#line 381 "../src/parse/lex.re"
+#line 376 "../src/parse/lex.re"
flex_name:
-#line 1511 "src/parse/lex.cc"
+#line 1505 "src/parse/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
if (yych == '\r') goto yy249;
++YYCURSOR;
yy246:
-#line 392 "../src/parse/lex.re"
+#line 387 "../src/parse/lex.re"
{
YYCURSOR = tok;
goto start;
}
-#line 1525 "src/parse/lex.cc"
+#line 1519 "src/parse/lex.cc"
yy247:
++YYCURSOR;
-#line 386 "../src/parse/lex.re"
+#line 381 "../src/parse/lex.re"
{
YYCURSOR = tok;
lexer_state = LEX_NORMAL;
return TOKEN_FID_END;
}
-#line 1534 "src/parse/lex.cc"
+#line 1528 "src/parse/lex.cc"
yy249:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '\n') goto yy247;
goto yy246;
}
-#line 396 "../src/parse/lex.re"
+#line 391 "../src/parse/lex.re"
code:
-#line 1545 "src/parse/lex.cc"
+#line 1539 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
yy252:
++YYCURSOR;
-#line 459 "../src/parse/lex.re"
+#line 454 "../src/parse/lex.re"
{
if (cur == eof)
{
}
goto code;
}
-#line 1618 "src/parse/lex.cc"
+#line 1612 "src/parse/lex.cc"
yy254:
++YYCURSOR;
yy255:
-#line 473 "../src/parse/lex.re"
+#line 468 "../src/parse/lex.re"
{
goto code;
}
-#line 1626 "src/parse/lex.cc"
+#line 1620 "src/parse/lex.cc"
yy256:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
}
yy257:
-#line 440 "../src/parse/lex.re"
+#line 435 "../src/parse/lex.re"
{
if (depth == 0)
{
cline++;
goto code;
}
-#line 1665 "src/parse/lex.cc"
+#line 1659 "src/parse/lex.cc"
yy258:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
goto yy276;
yy260:
++YYCURSOR;
-#line 412 "../src/parse/lex.re"
+#line 407 "../src/parse/lex.re"
{
if (depth == 0)
{
}
goto code;
}
-#line 1690 "src/parse/lex.cc"
+#line 1684 "src/parse/lex.cc"
yy262:
++YYCURSOR;
-#line 400 "../src/parse/lex.re"
+#line 395 "../src/parse/lex.re"
{
if (depth == 0)
{
}
goto code;
}
-#line 1706 "src/parse/lex.cc"
+#line 1700 "src/parse/lex.cc"
yy264:
yyaccept = 2;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy265:
YYCURSOR -= 1;
-#line 427 "../src/parse/lex.re"
+#line 422 "../src/parse/lex.re"
{
if (depth == 0)
{
cline++;
goto code;
}
-#line 1732 "src/parse/lex.cc"
+#line 1726 "src/parse/lex.cc"
yy266:
yych = (YYCTYPE)*++YYCURSOR;
goto yy265;
if (yych >= '#') goto yy274;
yy272:
++YYCURSOR;
-#line 470 "../src/parse/lex.re"
+#line 465 "../src/parse/lex.re"
{
goto code;
}
-#line 1771 "src/parse/lex.cc"
+#line 1765 "src/parse/lex.cc"
yy274:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy290:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 423 "../src/parse/lex.re"
+#line 418 "../src/parse/lex.re"
{
set_sourceline ();
goto code;
}
-#line 1866 "src/parse/lex.cc"
+#line 1860 "src/parse/lex.cc"
yy292:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy290;
if (yych == '\n') goto yy269;
goto yy293;
}
-#line 476 "../src/parse/lex.re"
+#line 471 "../src/parse/lex.re"
comment:
-#line 1900 "src/parse/lex.cc"
+#line 1894 "src/parse/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
}
++YYCURSOR;
yy300:
-#line 508 "../src/parse/lex.re"
+#line 503 "../src/parse/lex.re"
{
if (cur == eof)
{
}
goto comment;
}
-#line 1955 "src/parse/lex.cc"
+#line 1949 "src/parse/lex.cc"
yy301:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yybm[0+yych] & 32) {
}
if (yych == '#') goto yy308;
yy302:
-#line 499 "../src/parse/lex.re"
+#line 494 "../src/parse/lex.re"
{
if (cur == eof)
{
cline++;
goto comment;
}
-#line 1973 "src/parse/lex.cc"
+#line 1967 "src/parse/lex.cc"
yy303:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '/') goto yy310;
}
yy310:
++YYCURSOR;
-#line 480 "../src/parse/lex.re"
+#line 475 "../src/parse/lex.re"
{
if (--depth == 0)
{
goto comment;
}
}
-#line 2018 "src/parse/lex.cc"
+#line 2012 "src/parse/lex.cc"
yy312:
++YYCURSOR;
-#line 490 "../src/parse/lex.re"
+#line 485 "../src/parse/lex.re"
{
++depth;
fatal("ambiguous /* found");
goto comment;
}
-#line 2027 "src/parse/lex.cc"
+#line 2021 "src/parse/lex.cc"
yy314:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'i') goto yy307;
yy324:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 495 "../src/parse/lex.re"
+#line 490 "../src/parse/lex.re"
{
set_sourceline ();
goto comment;
}
-#line 2089 "src/parse/lex.cc"
+#line 2083 "src/parse/lex.cc"
yy326:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy324;
if (yych == '\n') goto yy307;
goto yy327;
}
-#line 515 "../src/parse/lex.re"
+#line 510 "../src/parse/lex.re"
nextLine:
-#line 2119 "src/parse/lex.cc"
+#line 2113 "src/parse/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy335;
++YYCURSOR;
-#line 526 "../src/parse/lex.re"
+#line 521 "../src/parse/lex.re"
{ if(cur == eof) {
return 0;
}
goto nextLine;
}
-#line 2132 "src/parse/lex.cc"
+#line 2126 "src/parse/lex.cc"
yy335:
++YYCURSOR;
-#line 519 "../src/parse/lex.re"
+#line 514 "../src/parse/lex.re"
{ if(cur == eof) {
return 0;
}
cline++;
goto scan;
}
-#line 2143 "src/parse/lex.cc"
+#line 2137 "src/parse/lex.cc"
}
-#line 531 "../src/parse/lex.re"
+#line 526 "../src/parse/lex.re"
}
uint32_t u, l;
fst:
-#line 2169 "src/parse/lex.cc"
+#line 2163 "src/parse/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == ']') goto yy340;
-#line 555 "../src/parse/lex.re"
+#line 550 "../src/parse/lex.re"
{ l = lex_cls_chr(); goto snd; }
-#line 2177 "src/parse/lex.cc"
+#line 2171 "src/parse/lex.cc"
yy340:
++YYCURSOR;
-#line 554 "../src/parse/lex.re"
+#line 549 "../src/parse/lex.re"
{ goto end; }
-#line 2182 "src/parse/lex.cc"
+#line 2176 "src/parse/lex.cc"
}
-#line 556 "../src/parse/lex.re"
+#line 551 "../src/parse/lex.re"
snd:
-#line 2188 "src/parse/lex.cc"
+#line 2182 "src/parse/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*(YYMARKER = YYCURSOR);
if (yych == '-') goto yy345;
yy344:
-#line 559 "../src/parse/lex.re"
+#line 554 "../src/parse/lex.re"
{ u = l; goto add; }
-#line 2197 "src/parse/lex.cc"
+#line 2191 "src/parse/lex.cc"
yy345:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != ']') goto yy347;
yy347:
++YYCURSOR;
YYCURSOR -= 1;
-#line 560 "../src/parse/lex.re"
+#line 555 "../src/parse/lex.re"
{
u = lex_cls_chr();
if (l > u) {
}
goto add;
}
-#line 2215 "src/parse/lex.cc"
+#line 2209 "src/parse/lex.cc"
}
-#line 568 "../src/parse/lex.re"
+#line 563 "../src/parse/lex.re"
add:
if (!(s = opts->encoding.encodeRange(l, u))) {
{
tok = cur;
-#line 2236 "src/parse/lex.cc"
+#line 2230 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if (yych == '\n') goto yy353;
if (yych == '\\') goto yy355;
++YYCURSOR;
-#line 591 "../src/parse/lex.re"
+#line 586 "../src/parse/lex.re"
{ return static_cast<uint8_t>(tok[0]); }
-#line 2247 "src/parse/lex.cc"
+#line 2241 "src/parse/lex.cc"
yy353:
++YYCURSOR;
-#line 586 "../src/parse/lex.re"
+#line 581 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error"); }
-#line 2252 "src/parse/lex.cc"
+#line 2246 "src/parse/lex.cc"
yy355:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) <= '`') {
}
}
}
-#line 589 "../src/parse/lex.re"
+#line 584 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in escape sequence"); }
-#line 2303 "src/parse/lex.cc"
+#line 2297 "src/parse/lex.cc"
yy357:
++YYCURSOR;
-#line 604 "../src/parse/lex.re"
+#line 599 "../src/parse/lex.re"
{
warn.useless_escape(tline, tok - pos, tok[1]);
return static_cast<uint8_t>(tok[1]);
}
-#line 2311 "src/parse/lex.cc"
+#line 2305 "src/parse/lex.cc"
yy359:
++YYCURSOR;
-#line 602 "../src/parse/lex.re"
+#line 597 "../src/parse/lex.re"
{ return static_cast<uint8_t>('-'); }
-#line 2316 "src/parse/lex.cc"
+#line 2310 "src/parse/lex.cc"
yy361:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy362;
if (yych <= '7') goto yy386;
yy362:
-#line 588 "../src/parse/lex.re"
+#line 583 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); }
-#line 2325 "src/parse/lex.cc"
+#line 2319 "src/parse/lex.cc"
yy363:
yych = (YYCTYPE)*++YYCURSOR;
goto yy362;
if (yych <= 'f') goto yy388;
}
yy365:
-#line 587 "../src/parse/lex.re"
+#line 582 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); }
-#line 2343 "src/parse/lex.cc"
+#line 2337 "src/parse/lex.cc"
yy366:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy367:
++YYCURSOR;
-#line 601 "../src/parse/lex.re"
+#line 596 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2361 "src/parse/lex.cc"
+#line 2355 "src/parse/lex.cc"
yy369:
++YYCURSOR;
-#line 603 "../src/parse/lex.re"
+#line 598 "../src/parse/lex.re"
{ return static_cast<uint8_t>(']'); }
-#line 2366 "src/parse/lex.cc"
+#line 2360 "src/parse/lex.cc"
yy371:
++YYCURSOR;
-#line 594 "../src/parse/lex.re"
+#line 589 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2371 "src/parse/lex.cc"
+#line 2365 "src/parse/lex.cc"
yy373:
++YYCURSOR;
-#line 595 "../src/parse/lex.re"
+#line 590 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2376 "src/parse/lex.cc"
+#line 2370 "src/parse/lex.cc"
yy375:
++YYCURSOR;
-#line 596 "../src/parse/lex.re"
+#line 591 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2381 "src/parse/lex.cc"
+#line 2375 "src/parse/lex.cc"
yy377:
++YYCURSOR;
-#line 597 "../src/parse/lex.re"
+#line 592 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2386 "src/parse/lex.cc"
+#line 2380 "src/parse/lex.cc"
yy379:
++YYCURSOR;
-#line 598 "../src/parse/lex.re"
+#line 593 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2391 "src/parse/lex.cc"
+#line 2385 "src/parse/lex.cc"
yy381:
++YYCURSOR;
-#line 599 "../src/parse/lex.re"
+#line 594 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2396 "src/parse/lex.cc"
+#line 2390 "src/parse/lex.cc"
yy383:
++YYCURSOR;
-#line 600 "../src/parse/lex.re"
+#line 595 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2401 "src/parse/lex.cc"
+#line 2395 "src/parse/lex.cc"
yy385:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy391:
++YYCURSOR;
-#line 593 "../src/parse/lex.re"
+#line 588 "../src/parse/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2466 "src/parse/lex.cc"
+#line 2460 "src/parse/lex.cc"
yy393:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
}
yy395:
++YYCURSOR;
-#line 592 "../src/parse/lex.re"
+#line 587 "../src/parse/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2495 "src/parse/lex.cc"
+#line 2489 "src/parse/lex.cc"
yy397:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
goto yy387;
}
}
-#line 608 "../src/parse/lex.re"
+#line 603 "../src/parse/lex.re"
}
end = false;
tok = cur;
-#line 2528 "src/parse/lex.cc"
+#line 2522 "src/parse/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if (yych == '\n') goto yy403;
if (yych == '\\') goto yy405;
++YYCURSOR;
-#line 621 "../src/parse/lex.re"
+#line 616 "../src/parse/lex.re"
{
end = tok[0] == quote;
return static_cast<uint8_t>(tok[0]);
}
-#line 2542 "src/parse/lex.cc"
+#line 2536 "src/parse/lex.cc"
yy403:
++YYCURSOR;
-#line 616 "../src/parse/lex.re"
+#line 611 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error"); }
-#line 2547 "src/parse/lex.cc"
+#line 2541 "src/parse/lex.cc"
yy405:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) <= 'a') {
}
}
}
-#line 619 "../src/parse/lex.re"
+#line 614 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in escape sequence"); }
-#line 2595 "src/parse/lex.cc"
+#line 2589 "src/parse/lex.cc"
yy407:
++YYCURSOR;
-#line 635 "../src/parse/lex.re"
+#line 630 "../src/parse/lex.re"
{
if (tok[1] != quote) {
warn.useless_escape(tline, tok - pos, tok[1]);
}
return static_cast<uint8_t>(tok[1]);
}
-#line 2605 "src/parse/lex.cc"
+#line 2599 "src/parse/lex.cc"
yy409:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy410;
if (yych <= '7') goto yy432;
yy410:
-#line 618 "../src/parse/lex.re"
+#line 613 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in octal escape sequence"); }
-#line 2614 "src/parse/lex.cc"
+#line 2608 "src/parse/lex.cc"
yy411:
yych = (YYCTYPE)*++YYCURSOR;
goto yy410;
if (yych <= 'f') goto yy434;
}
yy413:
-#line 617 "../src/parse/lex.re"
+#line 612 "../src/parse/lex.re"
{ fatal ((tok - pos) - tchar, "syntax error in hexadecimal escape sequence"); }
-#line 2632 "src/parse/lex.cc"
+#line 2626 "src/parse/lex.cc"
yy414:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy415:
++YYCURSOR;
-#line 634 "../src/parse/lex.re"
+#line 629 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2650 "src/parse/lex.cc"
+#line 2644 "src/parse/lex.cc"
yy417:
++YYCURSOR;
-#line 627 "../src/parse/lex.re"
+#line 622 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2655 "src/parse/lex.cc"
+#line 2649 "src/parse/lex.cc"
yy419:
++YYCURSOR;
-#line 628 "../src/parse/lex.re"
+#line 623 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2660 "src/parse/lex.cc"
+#line 2654 "src/parse/lex.cc"
yy421:
++YYCURSOR;
-#line 629 "../src/parse/lex.re"
+#line 624 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2665 "src/parse/lex.cc"
+#line 2659 "src/parse/lex.cc"
yy423:
++YYCURSOR;
-#line 630 "../src/parse/lex.re"
+#line 625 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2670 "src/parse/lex.cc"
+#line 2664 "src/parse/lex.cc"
yy425:
++YYCURSOR;
-#line 631 "../src/parse/lex.re"
+#line 626 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2675 "src/parse/lex.cc"
+#line 2669 "src/parse/lex.cc"
yy427:
++YYCURSOR;
-#line 632 "../src/parse/lex.re"
+#line 627 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2680 "src/parse/lex.cc"
+#line 2674 "src/parse/lex.cc"
yy429:
++YYCURSOR;
-#line 633 "../src/parse/lex.re"
+#line 628 "../src/parse/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2685 "src/parse/lex.cc"
+#line 2679 "src/parse/lex.cc"
yy431:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy437:
++YYCURSOR;
-#line 626 "../src/parse/lex.re"
+#line 621 "../src/parse/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2750 "src/parse/lex.cc"
+#line 2744 "src/parse/lex.cc"
yy439:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
}
yy441:
++YYCURSOR;
-#line 625 "../src/parse/lex.re"
+#line 620 "../src/parse/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2779 "src/parse/lex.cc"
+#line 2773 "src/parse/lex.cc"
yy443:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
goto yy433;
}
}
-#line 641 "../src/parse/lex.re"
+#line 636 "../src/parse/lex.re"
}
sourceline:
tok = cur;
-#line 2824 "src/parse/lex.cc"
+#line 2818 "src/parse/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
yy447:
++YYCURSOR;
yy448:
-#line 684 "../src/parse/lex.re"
+#line 679 "../src/parse/lex.re"
{
goto sourceline;
}
-#line 2877 "src/parse/lex.cc"
+#line 2871 "src/parse/lex.cc"
yy449:
++YYCURSOR;
-#line 672 "../src/parse/lex.re"
+#line 667 "../src/parse/lex.re"
{
if (cur == eof)
{
tok = cur;
return;
}
-#line 2893 "src/parse/lex.cc"
+#line 2887 "src/parse/lex.cc"
yy451:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '\n') goto yy448;
if (yybm[0+yych] & 64) {
goto yy452;
}
-#line 661 "../src/parse/lex.re"
+#line 656 "../src/parse/lex.re"
{
if (!s_to_u32_unsafe (tok, cur, cline))
{
}
goto sourceline;
}
-#line 2913 "src/parse/lex.cc"
+#line 2907 "src/parse/lex.cc"
yy455:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy448;
yy458:
++YYCURSOR;
-#line 668 "../src/parse/lex.re"
+#line 663 "../src/parse/lex.re"
{
escape (in.file_name, std::string (tok + 1, tok_len () - 2)); // -2 to omit quotes
goto sourceline;
}
-#line 2935 "src/parse/lex.cc"
+#line 2929 "src/parse/lex.cc"
yy460:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yych == '\n') goto yy457;
goto yy455;
}
-#line 687 "../src/parse/lex.re"
+#line 682 "../src/parse/lex.re"
}