-/* Generated by re2c 1.0.3 on Sat Apr 14 21:01:06 2018 */
+/* Generated by re2c 1.0.3 on Mon Jun 25 23:10:51 2018 */
#line 1 "../src/ast/lex.re"
#include "src/util/c99_stdint.h"
#include <stddef.h>
#define YYCURSOR cur
#define YYLIMIT lim
#define YYMARKER mar
-#define YYCTXMARKER ctx
+#define YYCTXMARKER ctx
#define YYFILL(n) { fill (n); }
namespace re2c
yy4:
++YYCURSOR;
yy5:
-#line 153 "../src/ast/lex.re"
+#line 154 "../src/ast/lex.re"
{ goto echo; }
#line 127 "src/ast/lex.cc"
yy6:
}
if (yych == '#') goto yy14;
yy7:
-#line 147 "../src/ast/lex.re"
+#line 148 "../src/ast/lex.re"
{
cline++;
pos = cur;
YYCURSOR = YYCTXMARKER;
#line 142 "../src/ast/lex.re"
{
+ out.wraw(tok, ptr + 1);
set_sourceline();
goto echo;
}
-#line 453 "src/ast/lex.cc"
+#line 454 "src/ast/lex.cc"
yy75:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy73;
lex_end_of_comment(out);
goto echo;
}
-#line 568 "src/ast/lex.cc"
+#line 569 "src/ast/lex.cc"
yy102:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'h') goto yy111;
out.wraw(tok, ptr);
return Reuse;
}
-#line 596 "src/ast/lex.cc"
+#line 597 "src/ast/lex.cc"
yy109:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy116;
lex_tags(out, true);
goto echo;
}
-#line 645 "src/ast/lex.cc"
+#line 646 "src/ast/lex.cc"
yy121:
++YYCURSOR;
#line 78 "../src/ast/lex.re"
out.wraw(tok, ptr);
return Rules;
}
-#line 653 "src/ast/lex.cc"
+#line 654 "src/ast/lex.cc"
yy123:
++YYCURSOR;
#line 124 "../src/ast/lex.re"
lex_tags(out, false);
goto echo;
}
-#line 662 "src/ast/lex.cc"
+#line 663 "src/ast/lex.cc"
yy125:
++YYCURSOR;
#line 115 "../src/ast/lex.re"
lex_end_of_comment(out);
goto echo;
}
-#line 674 "src/ast/lex.cc"
+#line 675 "src/ast/lex.cc"
yy127:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy131;
lex_end_of_comment(out);
goto echo;
}
-#line 687 "src/ast/lex.cc"
+#line 688 "src/ast/lex.cc"
yy130:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy132;
lex_end_of_comment(out);
goto echo;
}
-#line 709 "src/ast/lex.cc"
+#line 710 "src/ast/lex.cc"
yy135:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy13;
lex_end_of_comment(out);
goto echo;
}
-#line 721 "src/ast/lex.cc"
+#line 722 "src/ast/lex.cc"
}
-#line 154 "../src/ast/lex.re"
+#line 155 "../src/ast/lex.re"
}
{
uint32_t ignored = 0;
for (;;) {
-#line 731 "src/ast/lex.cc"
+#line 732 "src/ast/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
}
yy140:
++YYCURSOR;
-#line 161 "../src/ast/lex.re"
+#line 162 "../src/ast/lex.re"
{ fatal_lc(get_cline(), get_column(), "expected end of block"); }
-#line 749 "src/ast/lex.cc"
+#line 750 "src/ast/lex.cc"
yy142:
++YYCURSOR;
yy143:
-#line 163 "../src/ast/lex.re"
+#line 164 "../src/ast/lex.re"
{ continue; }
-#line 755 "src/ast/lex.cc"
+#line 756 "src/ast/lex.cc"
yy144:
++YYCURSOR;
-#line 164 "../src/ast/lex.re"
+#line 165 "../src/ast/lex.re"
{ ++ignored; continue; }
-#line 760 "src/ast/lex.cc"
+#line 761 "src/ast/lex.cc"
yy146:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy144;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '/') goto yy143;
++YYCURSOR;
-#line 165 "../src/ast/lex.re"
+#line 166 "../src/ast/lex.re"
{
if (ignored > 0) {
cline += ignored;
tok = pos = cur;
return;
}
-#line 778 "src/ast/lex.cc"
+#line 779 "src/ast/lex.cc"
}
-#line 173 "../src/ast/lex.re"
+#line 174 "../src/ast/lex.re"
}
}
{
std::string fmt, sep;
for (;;) {
-#line 788 "src/ast/lex.cc"
+#line 789 "src/ast/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
}
++YYCURSOR;
yy153:
-#line 180 "../src/ast/lex.re"
+#line 181 "../src/ast/lex.re"
{ fatal_lc(get_cline(), get_column(), "unrecognized configuration"); }
-#line 848 "src/ast/lex.cc"
+#line 849 "src/ast/lex.cc"
yy154:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yybm[0+yych] & 128) {
goto yy154;
}
-#line 185 "../src/ast/lex.re"
+#line 186 "../src/ast/lex.re"
{ continue; }
-#line 858 "src/ast/lex.cc"
+#line 859 "src/ast/lex.cc"
yy157:
++YYCURSOR;
-#line 186 "../src/ast/lex.re"
+#line 187 "../src/ast/lex.re"
{ ++cline; continue; }
-#line 863 "src/ast/lex.cc"
+#line 864 "src/ast/lex.cc"
yy159:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy157;
goto yy153;
yy163:
++YYCURSOR;
-#line 187 "../src/ast/lex.re"
+#line 188 "../src/ast/lex.re"
{
out.wdelay_tags(new ConfTags(fmt, sep), mtags);
tok = pos = cur;
return;
}
-#line 888 "src/ast/lex.cc"
+#line 889 "src/ast/lex.cc"
yy165:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy168;
goto yy166;
yy174:
++YYCURSOR;
-#line 182 "../src/ast/lex.re"
+#line 183 "../src/ast/lex.re"
{ fmt = lex_conf_string(); continue; }
-#line 927 "src/ast/lex.cc"
+#line 928 "src/ast/lex.cc"
yy176:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 't') goto yy166;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'r') goto yy166;
++YYCURSOR;
-#line 183 "../src/ast/lex.re"
+#line 184 "../src/ast/lex.re"
{ sep = lex_conf_string(); continue; }
-#line 938 "src/ast/lex.cc"
+#line 939 "src/ast/lex.cc"
}
-#line 192 "../src/ast/lex.re"
+#line 193 "../src/ast/lex.re"
}
}
tchar = cur - pos;
tok = cur;
-#line 951 "src/ast/lex.cc"
+#line 952 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
yy183:
++YYCURSOR;
yy184:
-#line 352 "../src/ast/lex.re"
+#line 353 "../src/ast/lex.re"
{
fatal_lc(get_cline(), get_column(), "unexpected character: '%c'", *tok);
goto scan;
}
-#line 1056 "src/ast/lex.cc"
+#line 1057 "src/ast/lex.cc"
yy185:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yybm[0+yych] & 16) {
goto yy185;
}
-#line 331 "../src/ast/lex.re"
+#line 332 "../src/ast/lex.re"
{
goto scan;
}
-#line 1068 "src/ast/lex.cc"
+#line 1069 "src/ast/lex.cc"
yy188:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '#') goto yy214;
}
yy189:
-#line 340 "../src/ast/lex.re"
+#line 341 "../src/ast/lex.re"
{
if (cur == eof) return 0;
pos = cur;
goto scan;
}
}
-#line 1091 "src/ast/lex.cc"
+#line 1092 "src/ast/lex.cc"
yy190:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy188;
yy191:
++YYCURSOR;
yy192:
-#line 244 "../src/ast/lex.re"
+#line 245 "../src/ast/lex.re"
{ return *tok; }
-#line 1101 "src/ast/lex.cc"
+#line 1102 "src/ast/lex.cc"
yy193:
++YYCURSOR;
-#line 234 "../src/ast/lex.re"
+#line 235 "../src/ast/lex.re"
{ yylval.regexp = lex_str('"'); return TOKEN_REGEXP; }
-#line 1106 "src/ast/lex.cc"
+#line 1107 "src/ast/lex.cc"
yy195:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '^') {
goto yy184;
yy197:
++YYCURSOR;
-#line 233 "../src/ast/lex.re"
+#line 234 "../src/ast/lex.re"
{ yylval.regexp = lex_str('\''); return TOKEN_REGEXP; }
-#line 1126 "src/ast/lex.cc"
+#line 1127 "src/ast/lex.cc"
yy199:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '/') goto yy219;
goto yy192;
yy200:
++YYCURSOR;
-#line 326 "../src/ast/lex.re"
+#line 327 "../src/ast/lex.re"
{
yylval.regexp = ast_dot(cline, get_column());
return TOKEN_REGEXP;
}
-#line 1138 "src/ast/lex.cc"
+#line 1139 "src/ast/lex.cc"
yy202:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '*') goto yy221;
yy206:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '^') goto yy233;
-#line 235 "../src/ast/lex.re"
+#line 236 "../src/ast/lex.re"
{ yylval.regexp = lex_cls(false); return TOKEN_REGEXP; }
-#line 1183 "src/ast/lex.cc"
+#line 1184 "src/ast/lex.cc"
yy208:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy235;
}
}
yy210:
-#line 202 "../src/ast/lex.re"
+#line 203 "../src/ast/lex.re"
{
depth = 1;
code_line = cline;
goto code;
}
-#line 1212 "src/ast/lex.cc"
+#line 1213 "src/ast/lex.cc"
yy211:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
}
}
yy218:
-#line 238 "../src/ast/lex.re"
+#line 239 "../src/ast/lex.re"
{
const std::string *name = new std::string(tok + 1, tok_len() - 1);
yylval.regexp = ast_tag(cline, get_column(), name, tok[0] == '#');
return TOKEN_REGEXP;
}
-#line 1269 "src/ast/lex.cc"
+#line 1270 "src/ast/lex.cc"
yy219:
++YYCURSOR;
-#line 228 "../src/ast/lex.re"
+#line 229 "../src/ast/lex.re"
{
tok = cur;
return 0;
}
-#line 1277 "src/ast/lex.cc"
+#line 1278 "src/ast/lex.cc"
yy221:
++YYCURSOR;
-#line 222 "../src/ast/lex.re"
+#line 223 "../src/ast/lex.re"
{
depth = 1;
goto comment;
}
-#line 1285 "src/ast/lex.cc"
+#line 1286 "src/ast/lex.cc"
yy223:
++YYCURSOR;
-#line 219 "../src/ast/lex.re"
+#line 220 "../src/ast/lex.re"
{
goto nextLine;
}
-#line 1292 "src/ast/lex.cc"
+#line 1293 "src/ast/lex.cc"
yy225:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '>') goto yy243;
-#line 212 "../src/ast/lex.re"
+#line 213 "../src/ast/lex.re"
{
tok += 2; /* skip ":=" */
depth = 0;
code_line = cline;
goto code;
}
-#line 1303 "src/ast/lex.cc"
+#line 1304 "src/ast/lex.cc"
yy227:
++YYCURSOR;
YYCURSOR -= 1;
-#line 309 "../src/ast/lex.re"
+#line 310 "../src/ast/lex.re"
{
if (!globopts->FFlag) {
yylval.str = new std::string (tok, tok_len());
return TOKEN_REGEXP;
}
}
-#line 1324 "src/ast/lex.cc"
+#line 1325 "src/ast/lex.cc"
yy229:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy231:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 304 "../src/ast/lex.re"
+#line 305 "../src/ast/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
return TOKEN_ID;
}
-#line 1349 "src/ast/lex.cc"
+#line 1350 "src/ast/lex.cc"
yy233:
++YYCURSOR;
-#line 236 "../src/ast/lex.re"
+#line 237 "../src/ast/lex.re"
{ yylval.regexp = lex_cls(true); return TOKEN_REGEXP; }
-#line 1354 "src/ast/lex.cc"
+#line 1355 "src/ast/lex.cc"
yy235:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy247;
yy236:
++YYCURSOR;
yy237:
-#line 277 "../src/ast/lex.re"
+#line 278 "../src/ast/lex.re"
{
fatal_lc(get_cline(), get_column(), "illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers");
}
-#line 1366 "src/ast/lex.cc"
+#line 1367 "src/ast/lex.cc"
yy238:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yy243:
++YYCURSOR;
YYCURSOR -= 2;
-#line 208 "../src/ast/lex.re"
+#line 209 "../src/ast/lex.re"
{
return *tok;
}
-#line 1410 "src/ast/lex.cc"
+#line 1411 "src/ast/lex.cc"
yy245:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 291 "../src/ast/lex.re"
+#line 292 "../src/ast/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
if (globopts->FFlag)
return TOKEN_ID;
}
}
-#line 1427 "src/ast/lex.cc"
+#line 1428 "src/ast/lex.cc"
yy247:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy254;
goto yy237;
yy249:
++YYCURSOR;
-#line 246 "../src/ast/lex.re"
+#line 247 "../src/ast/lex.re"
{
if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.bounds.min))
{
yylval.bounds.max = yylval.bounds.min;
return TOKEN_CLOSESIZE;
}
-#line 1450 "src/ast/lex.cc"
+#line 1451 "src/ast/lex.cc"
yy251:
++YYCURSOR;
-#line 281 "../src/ast/lex.re"
+#line 282 "../src/ast/lex.re"
{
if (!globopts->FFlag) {
fatal_lc(get_cline(), get_column(), "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 1461 "src/ast/lex.cc"
+#line 1462 "src/ast/lex.cc"
yy253:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'n') goto yy259;
goto yy213;
yy257:
++YYCURSOR;
-#line 268 "../src/ast/lex.re"
+#line 269 "../src/ast/lex.re"
{
if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.bounds.min))
{
yylval.bounds.max = std::numeric_limits<uint32_t>::max();
return TOKEN_CLOSESIZE;
}
-#line 1489 "src/ast/lex.cc"
+#line 1490 "src/ast/lex.cc"
yy259:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy264;
goto yy213;
yy260:
++YYCURSOR;
-#line 289 "../src/ast/lex.re"
+#line 290 "../src/ast/lex.re"
{ return TOKEN_CONF; }
-#line 1498 "src/ast/lex.cc"
+#line 1499 "src/ast/lex.cc"
yy262:
++YYCURSOR;
-#line 255 "../src/ast/lex.re"
+#line 256 "../src/ast/lex.re"
{
const char * p = strchr (tok, ',');
if (!s_to_u32_unsafe (tok + 1, p, yylval.bounds.min))
}
return TOKEN_CLOSESIZE;
}
-#line 1514 "src/ast/lex.cc"
+#line 1515 "src/ast/lex.cc"
yy264:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '0') goto yy266;
yy271:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 335 "../src/ast/lex.re"
+#line 336 "../src/ast/lex.re"
{
set_sourceline ();
return TOKEN_LINE_INFO;
}
-#line 1575 "src/ast/lex.cc"
+#line 1576 "src/ast/lex.cc"
yy273:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy271;
if (yych == '\n') goto yy213;
goto yy274;
}
-#line 356 "../src/ast/lex.re"
+#line 357 "../src/ast/lex.re"
code:
-#line 1605 "src/ast/lex.cc"
+#line 1606 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
yy280:
++YYCURSOR;
-#line 419 "../src/ast/lex.re"
+#line 420 "../src/ast/lex.re"
{
if (cur == eof)
{
}
goto code;
}
-#line 1678 "src/ast/lex.cc"
+#line 1679 "src/ast/lex.cc"
yy282:
++YYCURSOR;
yy283:
-#line 433 "../src/ast/lex.re"
+#line 434 "../src/ast/lex.re"
{
goto code;
}
-#line 1686 "src/ast/lex.cc"
+#line 1687 "src/ast/lex.cc"
yy284:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
}
yy285:
-#line 400 "../src/ast/lex.re"
+#line 401 "../src/ast/lex.re"
{
if (depth == 0)
{
cline++;
goto code;
}
-#line 1725 "src/ast/lex.cc"
+#line 1726 "src/ast/lex.cc"
yy286:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
goto yy304;
yy288:
++YYCURSOR;
-#line 372 "../src/ast/lex.re"
+#line 373 "../src/ast/lex.re"
{
if (depth == 0)
{
}
goto code;
}
-#line 1750 "src/ast/lex.cc"
+#line 1751 "src/ast/lex.cc"
yy290:
++YYCURSOR;
-#line 360 "../src/ast/lex.re"
+#line 361 "../src/ast/lex.re"
{
if (depth == 0)
{
}
goto code;
}
-#line 1766 "src/ast/lex.cc"
+#line 1767 "src/ast/lex.cc"
yy292:
yyaccept = 2;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy293:
YYCURSOR -= 1;
-#line 387 "../src/ast/lex.re"
+#line 388 "../src/ast/lex.re"
{
if (depth == 0)
{
cline++;
goto code;
}
-#line 1792 "src/ast/lex.cc"
+#line 1793 "src/ast/lex.cc"
yy294:
++YYCURSOR;
goto yy293;
if (yych >= '#') goto yy302;
yy300:
++YYCURSOR;
-#line 430 "../src/ast/lex.re"
+#line 431 "../src/ast/lex.re"
{
goto code;
}
-#line 1831 "src/ast/lex.cc"
+#line 1832 "src/ast/lex.cc"
yy302:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy318:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 383 "../src/ast/lex.re"
+#line 384 "../src/ast/lex.re"
{
set_sourceline ();
goto code;
}
-#line 1926 "src/ast/lex.cc"
+#line 1927 "src/ast/lex.cc"
yy320:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy318;
if (yych == '\n') goto yy297;
goto yy321;
}
-#line 436 "../src/ast/lex.re"
+#line 437 "../src/ast/lex.re"
comment:
-#line 1960 "src/ast/lex.cc"
+#line 1961 "src/ast/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
}
++YYCURSOR;
yy328:
-#line 468 "../src/ast/lex.re"
+#line 469 "../src/ast/lex.re"
{
if (cur == eof)
{
}
goto comment;
}
-#line 2015 "src/ast/lex.cc"
+#line 2016 "src/ast/lex.cc"
yy329:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yybm[0+yych] & 32) {
}
if (yych == '#') goto yy336;
yy330:
-#line 459 "../src/ast/lex.re"
+#line 460 "../src/ast/lex.re"
{
if (cur == eof)
{
cline++;
goto comment;
}
-#line 2033 "src/ast/lex.cc"
+#line 2034 "src/ast/lex.cc"
yy331:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '/') goto yy338;
}
yy338:
++YYCURSOR;
-#line 440 "../src/ast/lex.re"
+#line 441 "../src/ast/lex.re"
{
if (--depth == 0)
{
goto comment;
}
}
-#line 2078 "src/ast/lex.cc"
+#line 2079 "src/ast/lex.cc"
yy340:
++YYCURSOR;
-#line 450 "../src/ast/lex.re"
+#line 451 "../src/ast/lex.re"
{
++depth;
fatal_lc(get_cline(), get_column(), "ambiguous /* found");
goto comment;
}
-#line 2087 "src/ast/lex.cc"
+#line 2088 "src/ast/lex.cc"
yy342:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'i') goto yy335;
yy352:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 455 "../src/ast/lex.re"
+#line 456 "../src/ast/lex.re"
{
set_sourceline ();
goto comment;
}
-#line 2149 "src/ast/lex.cc"
+#line 2150 "src/ast/lex.cc"
yy354:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy352;
if (yych == '\n') goto yy335;
goto yy355;
}
-#line 475 "../src/ast/lex.re"
+#line 476 "../src/ast/lex.re"
nextLine:
-#line 2179 "src/ast/lex.cc"
+#line 2180 "src/ast/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy363;
++YYCURSOR;
-#line 486 "../src/ast/lex.re"
+#line 487 "../src/ast/lex.re"
{ if(cur == eof) {
return 0;
}
goto nextLine;
}
-#line 2192 "src/ast/lex.cc"
+#line 2193 "src/ast/lex.cc"
yy363:
++YYCURSOR;
-#line 479 "../src/ast/lex.re"
+#line 480 "../src/ast/lex.re"
{ if(cur == eof) {
return 0;
}
cline++;
goto scan;
}
-#line 2203 "src/ast/lex.cc"
+#line 2204 "src/ast/lex.cc"
}
-#line 491 "../src/ast/lex.re"
+#line 492 "../src/ast/lex.re"
}
tok = cur;
c = get_column();
-#line 2217 "src/ast/lex.cc"
+#line 2218 "src/ast/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == ']') goto yy368;
-#line 503 "../src/ast/lex.re"
+#line 504 "../src/ast/lex.re"
{ l = lex_cls_chr(); goto snd; }
-#line 2225 "src/ast/lex.cc"
+#line 2226 "src/ast/lex.cc"
yy368:
++YYCURSOR;
-#line 502 "../src/ast/lex.re"
+#line 503 "../src/ast/lex.re"
{ return ast_cls(cline, c0, cls, neg); }
-#line 2230 "src/ast/lex.cc"
+#line 2231 "src/ast/lex.cc"
}
-#line 504 "../src/ast/lex.re"
+#line 505 "../src/ast/lex.re"
snd:
-#line 2236 "src/ast/lex.cc"
+#line 2237 "src/ast/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*(YYMARKER = YYCURSOR);
if (yych == '-') goto yy373;
yy372:
-#line 507 "../src/ast/lex.re"
+#line 508 "../src/ast/lex.re"
{ u = l; goto add; }
-#line 2245 "src/ast/lex.cc"
+#line 2246 "src/ast/lex.cc"
yy373:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != ']') goto yy375;
yy375:
++YYCURSOR;
YYCURSOR -= 1;
-#line 508 "../src/ast/lex.re"
+#line 509 "../src/ast/lex.re"
{
u = lex_cls_chr();
if (l > u) {
}
goto add;
}
-#line 2263 "src/ast/lex.cc"
+#line 2264 "src/ast/lex.cc"
}
-#line 516 "../src/ast/lex.re"
+#line 517 "../src/ast/lex.re"
add:
cls->push_back(ASTRange(l, u, c));
tok = cur;
const uint32_t l = get_cline(), c = get_column();
-#line 2277 "src/ast/lex.cc"
+#line 2278 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
++YYCURSOR;
yy380:
-#line 533 "../src/ast/lex.re"
+#line 534 "../src/ast/lex.re"
{ return static_cast<uint8_t>(tok[0]); }
-#line 2293 "src/ast/lex.cc"
+#line 2294 "src/ast/lex.cc"
yy381:
++YYCURSOR;
-#line 528 "../src/ast/lex.re"
+#line 529 "../src/ast/lex.re"
{ fatal_lc(l, c, "newline in character class"); }
-#line 2298 "src/ast/lex.cc"
+#line 2299 "src/ast/lex.cc"
yy383:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy381;
yy385:
++YYCURSOR;
yy386:
-#line 546 "../src/ast/lex.re"
+#line 547 "../src/ast/lex.re"
{
warn.useless_escape(cline, get_column(), tok[1]);
return static_cast<uint8_t>(tok[1]);
}
-#line 2355 "src/ast/lex.cc"
+#line 2356 "src/ast/lex.cc"
yy387:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy381;
goto yy386;
yy388:
++YYCURSOR;
-#line 544 "../src/ast/lex.re"
+#line 545 "../src/ast/lex.re"
{ return static_cast<uint8_t>('-'); }
-#line 2364 "src/ast/lex.cc"
+#line 2365 "src/ast/lex.cc"
yy390:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy391;
if (yych <= '7') goto yy415;
yy391:
-#line 530 "../src/ast/lex.re"
+#line 531 "../src/ast/lex.re"
{ fatal_lc(l, c, "syntax error in octal escape sequence"); }
-#line 2373 "src/ast/lex.cc"
+#line 2374 "src/ast/lex.cc"
yy392:
++YYCURSOR;
goto yy391;
if (yych <= 'f') goto yy417;
}
yy394:
-#line 529 "../src/ast/lex.re"
+#line 530 "../src/ast/lex.re"
{ fatal_lc(l, c, "syntax error in hexadecimal escape sequence"); }
-#line 2391 "src/ast/lex.cc"
+#line 2392 "src/ast/lex.cc"
yy395:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy396:
++YYCURSOR;
-#line 543 "../src/ast/lex.re"
+#line 544 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2409 "src/ast/lex.cc"
+#line 2410 "src/ast/lex.cc"
yy398:
++YYCURSOR;
-#line 545 "../src/ast/lex.re"
+#line 546 "../src/ast/lex.re"
{ return static_cast<uint8_t>(']'); }
-#line 2414 "src/ast/lex.cc"
+#line 2415 "src/ast/lex.cc"
yy400:
++YYCURSOR;
-#line 536 "../src/ast/lex.re"
+#line 537 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2419 "src/ast/lex.cc"
+#line 2420 "src/ast/lex.cc"
yy402:
++YYCURSOR;
-#line 537 "../src/ast/lex.re"
+#line 538 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2424 "src/ast/lex.cc"
+#line 2425 "src/ast/lex.cc"
yy404:
++YYCURSOR;
-#line 538 "../src/ast/lex.re"
+#line 539 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2429 "src/ast/lex.cc"
+#line 2430 "src/ast/lex.cc"
yy406:
++YYCURSOR;
-#line 539 "../src/ast/lex.re"
+#line 540 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2434 "src/ast/lex.cc"
+#line 2435 "src/ast/lex.cc"
yy408:
++YYCURSOR;
-#line 540 "../src/ast/lex.re"
+#line 541 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2439 "src/ast/lex.cc"
+#line 2440 "src/ast/lex.cc"
yy410:
++YYCURSOR;
-#line 541 "../src/ast/lex.re"
+#line 542 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2444 "src/ast/lex.cc"
+#line 2445 "src/ast/lex.cc"
yy412:
++YYCURSOR;
-#line 542 "../src/ast/lex.re"
+#line 543 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2449 "src/ast/lex.cc"
+#line 2450 "src/ast/lex.cc"
yy414:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy420:
++YYCURSOR;
-#line 535 "../src/ast/lex.re"
+#line 536 "../src/ast/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2514 "src/ast/lex.cc"
+#line 2515 "src/ast/lex.cc"
yy422:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
}
yy424:
++YYCURSOR;
-#line 534 "../src/ast/lex.re"
+#line 535 "../src/ast/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2543 "src/ast/lex.cc"
+#line 2544 "src/ast/lex.cc"
yy426:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
goto yy416;
}
}
-#line 550 "../src/ast/lex.re"
+#line 551 "../src/ast/lex.re"
}
tok = cur;
const uint32_t l = get_cline(), c = get_column();
-#line 2577 "src/ast/lex.cc"
+#line 2578 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
++YYCURSOR;
yy431:
-#line 565 "../src/ast/lex.re"
+#line 566 "../src/ast/lex.re"
{
end = tok[0] == quote;
return static_cast<uint8_t>(tok[0]);
}
-#line 2596 "src/ast/lex.cc"
+#line 2597 "src/ast/lex.cc"
yy432:
++YYCURSOR;
-#line 560 "../src/ast/lex.re"
+#line 561 "../src/ast/lex.re"
{ fatal_lc(l, c, "newline in character string"); }
-#line 2601 "src/ast/lex.cc"
+#line 2602 "src/ast/lex.cc"
yy434:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy432;
yy436:
++YYCURSOR;
yy437:
-#line 579 "../src/ast/lex.re"
+#line 580 "../src/ast/lex.re"
{
if (tok[1] != quote) {
warn.useless_escape(cline, get_column(), tok[1]);
}
return static_cast<uint8_t>(tok[1]);
}
-#line 2657 "src/ast/lex.cc"
+#line 2658 "src/ast/lex.cc"
yy438:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy432;
if (yych <= '/') goto yy440;
if (yych <= '7') goto yy462;
yy440:
-#line 562 "../src/ast/lex.re"
+#line 563 "../src/ast/lex.re"
{ fatal_lc(l, c, "syntax error in octal escape sequence"); }
-#line 2670 "src/ast/lex.cc"
+#line 2671 "src/ast/lex.cc"
yy441:
++YYCURSOR;
goto yy440;
if (yych <= 'f') goto yy464;
}
yy443:
-#line 561 "../src/ast/lex.re"
+#line 562 "../src/ast/lex.re"
{ fatal_lc(l, c, "syntax error in hexadecimal escape sequence"); }
-#line 2688 "src/ast/lex.cc"
+#line 2689 "src/ast/lex.cc"
yy444:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy445:
++YYCURSOR;
-#line 578 "../src/ast/lex.re"
+#line 579 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2706 "src/ast/lex.cc"
+#line 2707 "src/ast/lex.cc"
yy447:
++YYCURSOR;
-#line 571 "../src/ast/lex.re"
+#line 572 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2711 "src/ast/lex.cc"
+#line 2712 "src/ast/lex.cc"
yy449:
++YYCURSOR;
-#line 572 "../src/ast/lex.re"
+#line 573 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2716 "src/ast/lex.cc"
+#line 2717 "src/ast/lex.cc"
yy451:
++YYCURSOR;
-#line 573 "../src/ast/lex.re"
+#line 574 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2721 "src/ast/lex.cc"
+#line 2722 "src/ast/lex.cc"
yy453:
++YYCURSOR;
-#line 574 "../src/ast/lex.re"
+#line 575 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2726 "src/ast/lex.cc"
+#line 2727 "src/ast/lex.cc"
yy455:
++YYCURSOR;
-#line 575 "../src/ast/lex.re"
+#line 576 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2731 "src/ast/lex.cc"
+#line 2732 "src/ast/lex.cc"
yy457:
++YYCURSOR;
-#line 576 "../src/ast/lex.re"
+#line 577 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2736 "src/ast/lex.cc"
+#line 2737 "src/ast/lex.cc"
yy459:
++YYCURSOR;
-#line 577 "../src/ast/lex.re"
+#line 578 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2741 "src/ast/lex.cc"
+#line 2742 "src/ast/lex.cc"
yy461:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy467:
++YYCURSOR;
-#line 570 "../src/ast/lex.re"
+#line 571 "../src/ast/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2806 "src/ast/lex.cc"
+#line 2807 "src/ast/lex.cc"
yy469:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
}
yy471:
++YYCURSOR;
-#line 569 "../src/ast/lex.re"
+#line 570 "../src/ast/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2835 "src/ast/lex.cc"
+#line 2836 "src/ast/lex.cc"
yy473:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
goto yy463;
}
}
-#line 585 "../src/ast/lex.re"
+#line 586 "../src/ast/lex.re"
}
sourceline:
tok = cur;
-#line 2879 "src/ast/lex.cc"
+#line 2880 "src/ast/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
};
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
- if (yych <= '!') {
- if (yych == '\n') goto yy479;
+ if (yych <= '\r') {
+ if (yych <= '\t') {
+ if (yych >= 0x01) goto yy479;
+ } else {
+ if (yych <= '\n') goto yy481;
+ if (yych <= '\f') goto yy479;
+ goto yy483;
+ }
} else {
- if (yych <= '"') goto yy481;
- if (yych <= '0') goto yy477;
- if (yych <= '9') goto yy482;
+ if (yych <= '"') {
+ if (yych <= '!') goto yy479;
+ goto yy484;
+ } else {
+ if (yych <= '0') goto yy479;
+ if (yych <= '9') goto yy485;
+ goto yy479;
+ }
}
-yy477:
++YYCURSOR;
-yy478:
-#line 627 "../src/ast/lex.re"
- { goto sourceline; }
-#line 2930 "src/ast/lex.cc"
+#line 623 "../src/ast/lex.re"
+ {
+ --cur;
+ tok = cur;
+ return;
+ }
+#line 2944 "src/ast/lex.cc"
yy479:
++YYCURSOR;
-#line 617 "../src/ast/lex.re"
+yy480:
+#line 629 "../src/ast/lex.re"
+ { goto sourceline; }
+#line 2950 "src/ast/lex.cc"
+yy481:
+ ++YYCURSOR;
+#line 618 "../src/ast/lex.re"
{
- if (cur == eof) {
- --cur;
- } else {
- pos = cur;
- }
tok = cur;
return;
}
-#line 2943 "src/ast/lex.cc"
-yy481:
+#line 2958 "src/ast/lex.cc"
+yy483:
+ yych = (YYCTYPE)*++YYCURSOR;
+ if (yych == '\n') goto yy481;
+ goto yy480;
+yy484:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
- if (yych == '\n') goto yy478;
- goto yy486;
-yy482:
+ if (yych == '\n') goto yy480;
+ goto yy489;
+yy485:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 64) {
- goto yy482;
+ goto yy485;
}
-#line 604 "../src/ast/lex.re"
+#line 605 "../src/ast/lex.re"
{
if (!s_to_u32_unsafe (tok, cur, cline)) {
fatal_lc(get_cline(), get_column(), "line number overflow");
}
goto sourceline;
}
-#line 2962 "src/ast/lex.cc"
-yy485:
+#line 2981 "src/ast/lex.cc"
+yy488:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
-yy486:
+yy489:
if (yybm[0+yych] & 128) {
- goto yy485;
+ goto yy488;
}
- if (yych <= '\n') goto yy487;
- if (yych <= '"') goto yy488;
- goto yy490;
-yy487:
+ if (yych <= '\n') goto yy490;
+ if (yych <= '"') goto yy491;
+ goto yy493;
+yy490:
YYCURSOR = YYMARKER;
- goto yy478;
-yy488:
+ goto yy480;
+yy491:
++YYCURSOR;
-#line 611 "../src/ast/lex.re"
+#line 612 "../src/ast/lex.re"
{
- in.escaped_file_name = std::string (tok + 1, tok_len () - 2); // -2 to omit quotes
+ in.escaped_file_name = std::string (tok + 1, tok_len () - 2); // strip quotes
strrreplace (in.escaped_file_name, "\\", "\\\\");
goto sourceline;
}
-#line 2985 "src/ast/lex.cc"
-yy490:
+#line 3004 "src/ast/lex.cc"
+yy493:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
- if (yych == '\n') goto yy487;
- goto yy485;
+ if (yych == '\n') goto yy490;
+ goto yy488;
}
-#line 628 "../src/ast/lex.re"
+#line 630 "../src/ast/lex.re"
}