-/* Generated by re2c 1.1.1 on Mon Oct 29 22:56:51 2018 */
+/* Generated by re2c 1.1.1 on Mon Oct 29 23:15:19 2018 */
#line 1 "../src/ast/lex.re"
#include "src/util/c99_stdint.h"
#include <stddef.h>
yy183:
++YYCURSOR;
yy184:
-#line 334 "../src/ast/lex.re"
+#line 326 "../src/ast/lex.re"
{
- fatal_lc(get_cline(), get_column(), "unexpected character: '%c'", *tok);
- goto scan;
- }
+ fatal_lc(get_cline(), get_column(), "unexpected character: '%c'", *tok);
+ goto scan;
+ }
#line 1057 "src/ast/lex.cc"
yy185:
++YYCURSOR;
if (yybm[0+yych] & 16) {
goto yy185;
}
-#line 313 "../src/ast/lex.re"
- {
- goto scan;
- }
-#line 1069 "src/ast/lex.cc"
+#line 306 "../src/ast/lex.re"
+ { goto scan; }
+#line 1067 "src/ast/lex.cc"
yy188:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '#') goto yy214;
}
yy189:
-#line 322 "../src/ast/lex.re"
+#line 313 "../src/ast/lex.re"
{
if (cur == eof) return 0;
pos = cur;
if (lexer_state == LEX_FLEX_NAME) {
lexer_state = LEX_NORMAL;
return TOKEN_FID_END;
- } else {
+ }
+ else {
goto scan;
}
}
-#line 1092 "src/ast/lex.cc"
+#line 1091 "src/ast/lex.cc"
yy190:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy188;
yy191:
++YYCURSOR;
yy192:
-#line 226 "../src/ast/lex.re"
+#line 222 "../src/ast/lex.re"
{ return *tok; }
-#line 1102 "src/ast/lex.cc"
+#line 1101 "src/ast/lex.cc"
yy193:
++YYCURSOR;
-#line 216 "../src/ast/lex.re"
+#line 212 "../src/ast/lex.re"
{ yylval.regexp = lex_str('"'); return TOKEN_REGEXP; }
-#line 1107 "src/ast/lex.cc"
+#line 1106 "src/ast/lex.cc"
yy195:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '^') {
goto yy184;
yy197:
++YYCURSOR;
-#line 215 "../src/ast/lex.re"
+#line 211 "../src/ast/lex.re"
{ yylval.regexp = lex_str('\''); return TOKEN_REGEXP; }
-#line 1127 "src/ast/lex.cc"
+#line 1126 "src/ast/lex.cc"
yy199:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '/') goto yy219;
goto yy192;
yy200:
++YYCURSOR;
-#line 308 "../src/ast/lex.re"
+#line 301 "../src/ast/lex.re"
{
- yylval.regexp = ast_dot(cline, get_column());
- return TOKEN_REGEXP;
- }
-#line 1139 "src/ast/lex.cc"
+ yylval.regexp = ast_dot(cline, get_column());
+ return TOKEN_REGEXP;
+ }
+#line 1138 "src/ast/lex.cc"
yy202:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '*') goto yy221;
yy206:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '^') goto yy233;
-#line 217 "../src/ast/lex.re"
+#line 213 "../src/ast/lex.re"
{ yylval.regexp = lex_cls(false); return TOKEN_REGEXP; }
-#line 1184 "src/ast/lex.cc"
+#line 1183 "src/ast/lex.cc"
yy208:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy235;
yy210:
#line 202 "../src/ast/lex.re"
{ lex_code(1); return TOKEN_CODE; }
-#line 1209 "src/ast/lex.cc"
+#line 1208 "src/ast/lex.cc"
yy211:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
}
}
yy218:
-#line 220 "../src/ast/lex.re"
+#line 216 "../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 1266 "src/ast/lex.cc"
+#line 1265 "src/ast/lex.cc"
yy219:
++YYCURSOR;
-#line 210 "../src/ast/lex.re"
- {
- tok = cur;
- return 0;
- }
-#line 1274 "src/ast/lex.cc"
+#line 209 "../src/ast/lex.re"
+ { tok = cur; return 0; }
+#line 1270 "src/ast/lex.cc"
yy221:
++YYCURSOR;
#line 207 "../src/ast/lex.re"
{ lex_c_comment(); goto scan; }
-#line 1279 "src/ast/lex.cc"
+#line 1275 "src/ast/lex.cc"
yy223:
++YYCURSOR;
#line 206 "../src/ast/lex.re"
{ lex_cpp_comment(); goto scan; }
-#line 1284 "src/ast/lex.cc"
+#line 1280 "src/ast/lex.cc"
yy225:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '>') goto yy243;
#line 203 "../src/ast/lex.re"
{ tok += 2; lex_code(0); return TOKEN_CODE; }
-#line 1290 "src/ast/lex.cc"
+#line 1286 "src/ast/lex.cc"
yy227:
++YYCURSOR;
YYCURSOR -= 1;
-#line 291 "../src/ast/lex.re"
+#line 283 "../src/ast/lex.re"
{
- if (!globopts->FFlag) {
- yylval.str = new std::string (tok, tok_len());
- return TOKEN_ID;
- } else {
- std::vector<ASTChar> *str = new std::vector<ASTChar>;
- for (char *s = tok; s < cur; ++s) {
- const uint32_t
- chr = static_cast<uint8_t>(*s),
- col = static_cast<uint32_t>(s - tok);
- str->push_back(ASTChar(chr, col));
- }
- yylval.regexp = ast_str(cline, get_column(), str, false);
- return TOKEN_REGEXP;
- }
- }
-#line 1311 "src/ast/lex.cc"
+ if (!globopts->FFlag) {
+ yylval.str = new std::string (tok, tok_len());
+ return TOKEN_ID;
+ }
+ else {
+ std::vector<ASTChar> *str = new std::vector<ASTChar>;
+ for (char *s = tok; s < cur; ++s) {
+ const uint32_t
+ chr = static_cast<uint8_t>(*s),
+ col = static_cast<uint32_t>(s - tok);
+ str->push_back(ASTChar(chr, col));
+ }
+ yylval.regexp = ast_str(cline, get_column(), str, false);
+ return TOKEN_REGEXP;
+ }
+ }
+#line 1308 "src/ast/lex.cc"
yy229:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy231:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 286 "../src/ast/lex.re"
+#line 278 "../src/ast/lex.re"
{
- yylval.str = new std::string (tok, tok_len ());
- return TOKEN_ID;
- }
-#line 1336 "src/ast/lex.cc"
+ yylval.str = new std::string (tok, tok_len ());
+ return TOKEN_ID;
+ }
+#line 1333 "src/ast/lex.cc"
yy233:
++YYCURSOR;
-#line 218 "../src/ast/lex.re"
+#line 214 "../src/ast/lex.re"
{ yylval.regexp = lex_cls(true); return TOKEN_REGEXP; }
-#line 1341 "src/ast/lex.cc"
+#line 1338 "src/ast/lex.cc"
yy235:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy247;
yy236:
++YYCURSOR;
yy237:
-#line 259 "../src/ast/lex.re"
+#line 251 "../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 1353 "src/ast/lex.cc"
+ fatal_lc(get_cline(), get_column(),
+ "illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers");
+ }
+#line 1351 "src/ast/lex.cc"
yy238:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR -= 2;
#line 204 "../src/ast/lex.re"
{ return *tok; }
-#line 1395 "src/ast/lex.cc"
+#line 1393 "src/ast/lex.cc"
yy245:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 273 "../src/ast/lex.re"
+#line 267 "../src/ast/lex.re"
{
- yylval.str = new std::string (tok, tok_len ());
- if (globopts->FFlag)
- {
- lexer_state = LEX_FLEX_NAME;
- return TOKEN_FID;
- }
- else
- {
- return TOKEN_ID;
- }
- }
-#line 1412 "src/ast/lex.cc"
+ yylval.str = new std::string (tok, tok_len ());
+ if (globopts->FFlag) {
+ lexer_state = LEX_FLEX_NAME;
+ return TOKEN_FID;
+ }
+ else {
+ return TOKEN_ID;
+ }
+ }
+#line 1408 "src/ast/lex.cc"
yy247:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy254;
goto yy237;
yy249:
++YYCURSOR;
-#line 228 "../src/ast/lex.re"
+#line 224 "../src/ast/lex.re"
{
- if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.bounds.min))
- {
- fatal_lc(get_cline(), get_column(), "repetition count overflow");
- }
- yylval.bounds.max = yylval.bounds.min;
- return TOKEN_CLOSESIZE;
- }
-#line 1435 "src/ast/lex.cc"
+ if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.bounds.min)) {
+ fatal_lc(get_cline(), get_column(), "repetition count overflow");
+ }
+ yylval.bounds.max = yylval.bounds.min;
+ return TOKEN_CLOSESIZE;
+ }
+#line 1430 "src/ast/lex.cc"
yy251:
++YYCURSOR;
-#line 263 "../src/ast/lex.re"
+#line 256 "../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 1446 "src/ast/lex.cc"
+ 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 1442 "src/ast/lex.cc"
yy253:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'n') goto yy259;
goto yy213;
yy257:
++YYCURSOR;
-#line 250 "../src/ast/lex.re"
+#line 243 "../src/ast/lex.re"
{
- if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.bounds.min))
- {
- fatal_lc(get_cline(), get_column(), "repetition lower bound overflow");
- }
- yylval.bounds.max = std::numeric_limits<uint32_t>::max();
- return TOKEN_CLOSESIZE;
- }
-#line 1474 "src/ast/lex.cc"
+ if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.bounds.min)) {
+ fatal_lc(get_cline(), get_column(), "repetition lower bound overflow");
+ }
+ yylval.bounds.max = std::numeric_limits<uint32_t>::max();
+ return TOKEN_CLOSESIZE;
+ }
+#line 1469 "src/ast/lex.cc"
yy259:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy264;
goto yy213;
yy260:
++YYCURSOR;
-#line 271 "../src/ast/lex.re"
+#line 265 "../src/ast/lex.re"
{ return TOKEN_CONF; }
-#line 1483 "src/ast/lex.cc"
+#line 1478 "src/ast/lex.cc"
yy262:
++YYCURSOR;
-#line 237 "../src/ast/lex.re"
+#line 232 "../src/ast/lex.re"
{
- const char * p = strchr (tok, ',');
- if (!s_to_u32_unsafe (tok + 1, p, yylval.bounds.min))
- {
- fatal_lc(get_cline(), get_column(), "repetition lower bound overflow");
- }
- if (!s_to_u32_unsafe (p + 1, cur - 1, yylval.bounds.max))
- {
- fatal_lc(get_cline(), get_column(), "repetition upper bound overflow");
- }
- return TOKEN_CLOSESIZE;
- }
-#line 1499 "src/ast/lex.cc"
+ const char * p = strchr (tok, ',');
+ if (!s_to_u32_unsafe (tok + 1, p, yylval.bounds.min)) {
+ fatal_lc(get_cline(), get_column(), "repetition lower bound overflow");
+ }
+ if (!s_to_u32_unsafe (p + 1, cur - 1, yylval.bounds.max)) {
+ fatal_lc(get_cline(), get_column(), "repetition upper bound overflow");
+ }
+ return TOKEN_CLOSESIZE;
+ }
+#line 1492 "src/ast/lex.cc"
yy264:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '0') goto yy266;
yy271:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 317 "../src/ast/lex.re"
+#line 308 "../src/ast/lex.re"
{
set_sourceline ();
return TOKEN_LINE_INFO;
}
-#line 1560 "src/ast/lex.cc"
+#line 1553 "src/ast/lex.cc"
yy273:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy271;
if (yych == '\n') goto yy213;
goto yy274;
}
-#line 338 "../src/ast/lex.re"
+#line 330 "../src/ast/lex.re"
}
const uint32_t line = cline;
code:
-#line 1595 "src/ast/lex.cc"
+#line 1588 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
yy280:
++YYCURSOR;
-#line 395 "../src/ast/lex.re"
+#line 387 "../src/ast/lex.re"
{
if (cur == eof) {
if (depth) fatal_l(get_cline(), "missing '}'");
}
goto code;
}
-#line 1665 "src/ast/lex.cc"
+#line 1658 "src/ast/lex.cc"
yy282:
++YYCURSOR;
yy283:
-#line 405 "../src/ast/lex.re"
+#line 397 "../src/ast/lex.re"
{ goto code; }
-#line 1671 "src/ast/lex.cc"
+#line 1664 "src/ast/lex.cc"
yy284:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
}
yy285:
-#line 380 "../src/ast/lex.re"
+#line 372 "../src/ast/lex.re"
{
if (depth == 0) {
tok += strspn(tok, " \t\r\n");
cline++;
goto code;
}
-#line 1705 "src/ast/lex.cc"
+#line 1698 "src/ast/lex.cc"
yy286:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy284;
goto yy283;
yy287:
++YYCURSOR;
-#line 404 "../src/ast/lex.re"
+#line 396 "../src/ast/lex.re"
{ lex_string(cur[-1]); goto code; }
-#line 1714 "src/ast/lex.cc"
+#line 1707 "src/ast/lex.cc"
yy289:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '*') goto yy300;
goto yy283;
yy290:
++YYCURSOR;
-#line 357 "../src/ast/lex.re"
+#line 349 "../src/ast/lex.re"
{
if (depth == 0) {
fatal_l(get_cline(), "Curly braces are not allowed after ':='");
}
goto code;
}
-#line 1732 "src/ast/lex.cc"
+#line 1725 "src/ast/lex.cc"
yy292:
++YYCURSOR;
-#line 346 "../src/ast/lex.re"
+#line 338 "../src/ast/lex.re"
{
if (depth == 0) {
fatal_l(get_cline(), "Curly braces are not allowed after ':='");
}
goto code;
}
-#line 1746 "src/ast/lex.cc"
+#line 1739 "src/ast/lex.cc"
yy294:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy295:
YYCURSOR -= 1;
-#line 372 "../src/ast/lex.re"
+#line 364 "../src/ast/lex.re"
{
if (depth == 0) goto code;
else if (cur == eof) fatal_l(get_cline(), "missing '}'");
cline++;
goto code;
}
-#line 1766 "src/ast/lex.cc"
+#line 1759 "src/ast/lex.cc"
yy296:
++YYCURSOR;
goto yy295;
}
yy300:
++YYCURSOR;
-#line 402 "../src/ast/lex.re"
+#line 394 "../src/ast/lex.re"
{ lex_c_comment(); goto code; }
-#line 1789 "src/ast/lex.cc"
+#line 1782 "src/ast/lex.cc"
yy302:
++YYCURSOR;
-#line 403 "../src/ast/lex.re"
+#line 395 "../src/ast/lex.re"
{ lex_cpp_comment(); goto code; }
-#line 1794 "src/ast/lex.cc"
+#line 1787 "src/ast/lex.cc"
yy304:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy316:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 367 "../src/ast/lex.re"
+#line 359 "../src/ast/lex.re"
{
set_sourceline ();
goto code;
}
-#line 1868 "src/ast/lex.cc"
+#line 1861 "src/ast/lex.cc"
yy318:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy316;
if (yych == '\n') goto yy299;
goto yy319;
}
-#line 406 "../src/ast/lex.re"
+#line 398 "../src/ast/lex.re"
}
{
loop:
-#line 1902 "src/ast/lex.cc"
+#line 1895 "src/ast/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
}
yy325:
++YYCURSOR;
-#line 416 "../src/ast/lex.re"
+#line 408 "../src/ast/lex.re"
{ if (cur == eof) fatal_l(get_cline(), "unexpected end of input"); else goto loop; }
-#line 1930 "src/ast/lex.cc"
+#line 1923 "src/ast/lex.cc"
yy327:
++YYCURSOR;
yy328:
-#line 417 "../src/ast/lex.re"
+#line 409 "../src/ast/lex.re"
{ goto loop; }
-#line 1936 "src/ast/lex.cc"
+#line 1929 "src/ast/lex.cc"
yy329:
++YYCURSOR;
-#line 415 "../src/ast/lex.re"
+#line 407 "../src/ast/lex.re"
{ pos = cur; ++cline; goto loop; }
-#line 1941 "src/ast/lex.cc"
+#line 1934 "src/ast/lex.cc"
yy331:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy329;
goto yy328;
yy332:
++YYCURSOR;
-#line 413 "../src/ast/lex.re"
+#line 405 "../src/ast/lex.re"
{ if (cur[-1] == delim) return; else goto loop; }
-#line 1950 "src/ast/lex.cc"
+#line 1943 "src/ast/lex.cc"
yy334:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '&') {
}
yy335:
++YYCURSOR;
-#line 414 "../src/ast/lex.re"
+#line 406 "../src/ast/lex.re"
{ goto loop; }
-#line 1963 "src/ast/lex.cc"
+#line 1956 "src/ast/lex.cc"
}
-#line 418 "../src/ast/lex.re"
+#line 410 "../src/ast/lex.re"
}
{
loop:
-#line 1973 "src/ast/lex.cc"
+#line 1966 "src/ast/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
}
yy339:
++YYCURSOR;
-#line 427 "../src/ast/lex.re"
+#line 419 "../src/ast/lex.re"
{ if (cur == eof) fatal_l(get_cline(), "end of input in comment"); else goto loop; }
-#line 1991 "src/ast/lex.cc"
+#line 1984 "src/ast/lex.cc"
yy341:
++YYCURSOR;
yy342:
-#line 428 "../src/ast/lex.re"
+#line 420 "../src/ast/lex.re"
{ goto loop; }
-#line 1997 "src/ast/lex.cc"
+#line 1990 "src/ast/lex.cc"
yy343:
++YYCURSOR;
-#line 426 "../src/ast/lex.re"
+#line 418 "../src/ast/lex.re"
{ pos = cur; ++cline; goto loop; }
-#line 2002 "src/ast/lex.cc"
+#line 1995 "src/ast/lex.cc"
yy345:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy343;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '/') goto yy342;
++YYCURSOR;
-#line 425 "../src/ast/lex.re"
+#line 417 "../src/ast/lex.re"
{ return; }
-#line 2013 "src/ast/lex.cc"
+#line 2006 "src/ast/lex.cc"
}
-#line 429 "../src/ast/lex.re"
+#line 421 "../src/ast/lex.re"
}
{
loop:
-#line 2023 "src/ast/lex.cc"
+#line 2016 "src/ast/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
}
yy351:
++YYCURSOR;
-#line 437 "../src/ast/lex.re"
+#line 429 "../src/ast/lex.re"
{ if (cur == eof) fatal_l(get_cline(), "end of input in comment"); else goto loop; }
-#line 2040 "src/ast/lex.cc"
+#line 2033 "src/ast/lex.cc"
yy353:
++YYCURSOR;
yy354:
-#line 438 "../src/ast/lex.re"
+#line 430 "../src/ast/lex.re"
{ goto loop; }
-#line 2046 "src/ast/lex.cc"
+#line 2039 "src/ast/lex.cc"
yy355:
++YYCURSOR;
-#line 436 "../src/ast/lex.re"
+#line 428 "../src/ast/lex.re"
{ pos = cur; ++cline; return; }
-#line 2051 "src/ast/lex.cc"
+#line 2044 "src/ast/lex.cc"
yy357:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy355;
goto yy354;
}
-#line 439 "../src/ast/lex.re"
+#line 431 "../src/ast/lex.re"
}
tok = cur;
c = get_column();
-#line 2069 "src/ast/lex.cc"
+#line 2062 "src/ast/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == ']') goto yy361;
-#line 451 "../src/ast/lex.re"
+#line 443 "../src/ast/lex.re"
{ l = lex_cls_chr(); goto snd; }
-#line 2077 "src/ast/lex.cc"
+#line 2070 "src/ast/lex.cc"
yy361:
++YYCURSOR;
-#line 450 "../src/ast/lex.re"
+#line 442 "../src/ast/lex.re"
{ return ast_cls(cline, c0, cls, neg); }
-#line 2082 "src/ast/lex.cc"
+#line 2075 "src/ast/lex.cc"
}
-#line 452 "../src/ast/lex.re"
+#line 444 "../src/ast/lex.re"
snd:
-#line 2088 "src/ast/lex.cc"
+#line 2081 "src/ast/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*(YYMARKER = YYCURSOR);
if (yych == '-') goto yy366;
yy365:
-#line 455 "../src/ast/lex.re"
+#line 447 "../src/ast/lex.re"
{ u = l; goto add; }
-#line 2097 "src/ast/lex.cc"
+#line 2090 "src/ast/lex.cc"
yy366:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != ']') goto yy368;
yy368:
++YYCURSOR;
YYCURSOR -= 1;
-#line 456 "../src/ast/lex.re"
+#line 448 "../src/ast/lex.re"
{
u = lex_cls_chr();
if (l > u) {
}
goto add;
}
-#line 2115 "src/ast/lex.cc"
+#line 2108 "src/ast/lex.cc"
}
-#line 464 "../src/ast/lex.re"
+#line 456 "../src/ast/lex.re"
add:
cls->push_back(ASTRange(l, u, c));
tok = cur;
const uint32_t l = get_cline(), c = get_column();
-#line 2129 "src/ast/lex.cc"
+#line 2122 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
++YYCURSOR;
yy373:
-#line 481 "../src/ast/lex.re"
+#line 473 "../src/ast/lex.re"
{ return static_cast<uint8_t>(tok[0]); }
-#line 2145 "src/ast/lex.cc"
+#line 2138 "src/ast/lex.cc"
yy374:
++YYCURSOR;
-#line 476 "../src/ast/lex.re"
+#line 468 "../src/ast/lex.re"
{ fatal_lc(l, c, "newline in character class"); }
-#line 2150 "src/ast/lex.cc"
+#line 2143 "src/ast/lex.cc"
yy376:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy374;
yy378:
++YYCURSOR;
yy379:
-#line 494 "../src/ast/lex.re"
+#line 486 "../src/ast/lex.re"
{
warn.useless_escape(cline, get_column(), tok[1]);
return static_cast<uint8_t>(tok[1]);
}
-#line 2207 "src/ast/lex.cc"
+#line 2200 "src/ast/lex.cc"
yy380:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy374;
goto yy379;
yy381:
++YYCURSOR;
-#line 492 "../src/ast/lex.re"
+#line 484 "../src/ast/lex.re"
{ return static_cast<uint8_t>('-'); }
-#line 2216 "src/ast/lex.cc"
+#line 2209 "src/ast/lex.cc"
yy383:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy384;
if (yych <= '7') goto yy408;
yy384:
-#line 478 "../src/ast/lex.re"
+#line 470 "../src/ast/lex.re"
{ fatal_lc(l, c, "syntax error in octal escape sequence"); }
-#line 2225 "src/ast/lex.cc"
+#line 2218 "src/ast/lex.cc"
yy385:
++YYCURSOR;
goto yy384;
if (yych <= 'f') goto yy410;
}
yy387:
-#line 477 "../src/ast/lex.re"
+#line 469 "../src/ast/lex.re"
{ fatal_lc(l, c, "syntax error in hexadecimal escape sequence"); }
-#line 2243 "src/ast/lex.cc"
+#line 2236 "src/ast/lex.cc"
yy388:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy389:
++YYCURSOR;
-#line 491 "../src/ast/lex.re"
+#line 483 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2261 "src/ast/lex.cc"
+#line 2254 "src/ast/lex.cc"
yy391:
++YYCURSOR;
-#line 493 "../src/ast/lex.re"
+#line 485 "../src/ast/lex.re"
{ return static_cast<uint8_t>(']'); }
-#line 2266 "src/ast/lex.cc"
+#line 2259 "src/ast/lex.cc"
yy393:
++YYCURSOR;
-#line 484 "../src/ast/lex.re"
+#line 476 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2271 "src/ast/lex.cc"
+#line 2264 "src/ast/lex.cc"
yy395:
++YYCURSOR;
-#line 485 "../src/ast/lex.re"
+#line 477 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2276 "src/ast/lex.cc"
+#line 2269 "src/ast/lex.cc"
yy397:
++YYCURSOR;
-#line 486 "../src/ast/lex.re"
+#line 478 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2281 "src/ast/lex.cc"
+#line 2274 "src/ast/lex.cc"
yy399:
++YYCURSOR;
-#line 487 "../src/ast/lex.re"
+#line 479 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2286 "src/ast/lex.cc"
+#line 2279 "src/ast/lex.cc"
yy401:
++YYCURSOR;
-#line 488 "../src/ast/lex.re"
+#line 480 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2291 "src/ast/lex.cc"
+#line 2284 "src/ast/lex.cc"
yy403:
++YYCURSOR;
-#line 489 "../src/ast/lex.re"
+#line 481 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2296 "src/ast/lex.cc"
+#line 2289 "src/ast/lex.cc"
yy405:
++YYCURSOR;
-#line 490 "../src/ast/lex.re"
+#line 482 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2301 "src/ast/lex.cc"
+#line 2294 "src/ast/lex.cc"
yy407:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy413:
++YYCURSOR;
-#line 483 "../src/ast/lex.re"
+#line 475 "../src/ast/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2366 "src/ast/lex.cc"
+#line 2359 "src/ast/lex.cc"
yy415:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
}
yy417:
++YYCURSOR;
-#line 482 "../src/ast/lex.re"
+#line 474 "../src/ast/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2395 "src/ast/lex.cc"
+#line 2388 "src/ast/lex.cc"
yy419:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
goto yy409;
}
}
-#line 498 "../src/ast/lex.re"
+#line 490 "../src/ast/lex.re"
}
tok = cur;
const uint32_t l = get_cline(), c = get_column();
-#line 2429 "src/ast/lex.cc"
+#line 2422 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
++YYCURSOR;
yy424:
-#line 513 "../src/ast/lex.re"
+#line 505 "../src/ast/lex.re"
{
end = tok[0] == quote;
return static_cast<uint8_t>(tok[0]);
}
-#line 2448 "src/ast/lex.cc"
+#line 2441 "src/ast/lex.cc"
yy425:
++YYCURSOR;
-#line 508 "../src/ast/lex.re"
+#line 500 "../src/ast/lex.re"
{ fatal_lc(l, c, "newline in character string"); }
-#line 2453 "src/ast/lex.cc"
+#line 2446 "src/ast/lex.cc"
yy427:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy425;
yy429:
++YYCURSOR;
yy430:
-#line 527 "../src/ast/lex.re"
+#line 519 "../src/ast/lex.re"
{
if (tok[1] != quote) {
warn.useless_escape(cline, get_column(), tok[1]);
}
return static_cast<uint8_t>(tok[1]);
}
-#line 2509 "src/ast/lex.cc"
+#line 2502 "src/ast/lex.cc"
yy431:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy425;
if (yych <= '/') goto yy433;
if (yych <= '7') goto yy455;
yy433:
-#line 510 "../src/ast/lex.re"
+#line 502 "../src/ast/lex.re"
{ fatal_lc(l, c, "syntax error in octal escape sequence"); }
-#line 2522 "src/ast/lex.cc"
+#line 2515 "src/ast/lex.cc"
yy434:
++YYCURSOR;
goto yy433;
if (yych <= 'f') goto yy457;
}
yy436:
-#line 509 "../src/ast/lex.re"
+#line 501 "../src/ast/lex.re"
{ fatal_lc(l, c, "syntax error in hexadecimal escape sequence"); }
-#line 2540 "src/ast/lex.cc"
+#line 2533 "src/ast/lex.cc"
yy437:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy438:
++YYCURSOR;
-#line 526 "../src/ast/lex.re"
+#line 518 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2558 "src/ast/lex.cc"
+#line 2551 "src/ast/lex.cc"
yy440:
++YYCURSOR;
-#line 519 "../src/ast/lex.re"
+#line 511 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2563 "src/ast/lex.cc"
+#line 2556 "src/ast/lex.cc"
yy442:
++YYCURSOR;
-#line 520 "../src/ast/lex.re"
+#line 512 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2568 "src/ast/lex.cc"
+#line 2561 "src/ast/lex.cc"
yy444:
++YYCURSOR;
-#line 521 "../src/ast/lex.re"
+#line 513 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2573 "src/ast/lex.cc"
+#line 2566 "src/ast/lex.cc"
yy446:
++YYCURSOR;
-#line 522 "../src/ast/lex.re"
+#line 514 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2578 "src/ast/lex.cc"
+#line 2571 "src/ast/lex.cc"
yy448:
++YYCURSOR;
-#line 523 "../src/ast/lex.re"
+#line 515 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2583 "src/ast/lex.cc"
+#line 2576 "src/ast/lex.cc"
yy450:
++YYCURSOR;
-#line 524 "../src/ast/lex.re"
+#line 516 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2588 "src/ast/lex.cc"
+#line 2581 "src/ast/lex.cc"
yy452:
++YYCURSOR;
-#line 525 "../src/ast/lex.re"
+#line 517 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2593 "src/ast/lex.cc"
+#line 2586 "src/ast/lex.cc"
yy454:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy460:
++YYCURSOR;
-#line 518 "../src/ast/lex.re"
+#line 510 "../src/ast/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2658 "src/ast/lex.cc"
+#line 2651 "src/ast/lex.cc"
yy462:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
}
yy464:
++YYCURSOR;
-#line 517 "../src/ast/lex.re"
+#line 509 "../src/ast/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2687 "src/ast/lex.cc"
+#line 2680 "src/ast/lex.cc"
yy466:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
goto yy456;
}
}
-#line 533 "../src/ast/lex.re"
+#line 525 "../src/ast/lex.re"
}
sourceline:
tok = cur;
-#line 2731 "src/ast/lex.cc"
+#line 2724 "src/ast/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
}
}
++YYCURSOR;
-#line 570 "../src/ast/lex.re"
+#line 562 "../src/ast/lex.re"
{
--cur;
tok = cur;
return;
}
-#line 2795 "src/ast/lex.cc"
+#line 2788 "src/ast/lex.cc"
yy472:
++YYCURSOR;
yy473:
-#line 576 "../src/ast/lex.re"
+#line 568 "../src/ast/lex.re"
{ goto sourceline; }
-#line 2801 "src/ast/lex.cc"
+#line 2794 "src/ast/lex.cc"
yy474:
++YYCURSOR;
-#line 565 "../src/ast/lex.re"
+#line 557 "../src/ast/lex.re"
{
tok = cur;
return;
}
-#line 2809 "src/ast/lex.cc"
+#line 2802 "src/ast/lex.cc"
yy476:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy474;
if (yybm[0+yych] & 64) {
goto yy478;
}
-#line 552 "../src/ast/lex.re"
+#line 544 "../src/ast/lex.re"
{
if (!s_to_u32_unsafe (tok, cur, cline)) {
fatal_lc(get_cline(), get_column(), "line number overflow");
}
goto sourceline;
}
-#line 2833 "src/ast/lex.cc"
+#line 2826 "src/ast/lex.cc"
yy481:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy473;
yy484:
++YYCURSOR;
-#line 559 "../src/ast/lex.re"
+#line 551 "../src/ast/lex.re"
{
in.escaped_file_name = std::string (tok + 1, tok_len () - 2); // strip quotes
strrreplace (in.escaped_file_name, "\\", "\\\\");
goto sourceline;
}
-#line 2856 "src/ast/lex.cc"
+#line 2849 "src/ast/lex.cc"
yy486:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yych == '\n') goto yy483;
goto yy481;
}
-#line 577 "../src/ast/lex.re"
+#line 569 "../src/ast/lex.re"
}