-/* Generated by re2c 0.16 on Sun Mar 5 11:37:40 2017 */
+/* Generated by re2c 0.16 on Sun Mar 5 11:49:42 2017 */
#line 1 "../src/ast/lex.re"
#include "src/util/c99_stdint.h"
#include <stddef.h>
#include "src/code/output.h"
#include "src/re/encoding/enc.h"
-#include "src/ast/extop.h"
#include "src/ast/input.h"
#include "src/ast/ast.h"
#include "src/ast/scanner.h"
// source code is in ASCII: pointers have type 'char *'
// but re2c makes an implicit assumption that YYCTYPE is unsigned
// when it generates comparisons
-#line 37 "../src/ast/lex.re"
+#line 36 "../src/ast/lex.re"
-#line 58 "../src/ast/lex.re"
+#line 57 "../src/ast/lex.re"
Scanner::ParseMode Scanner::echo()
const char *start = cur;
-#line 56 "src/ast/lex.cc"
+#line 55 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
}
++YYCURSOR;
-#line 148 "../src/ast/lex.re"
+#line 147 "../src/ast/lex.re"
{
if (cur == eof) {
if (opts->target == opt_t::CODE) {
}
goto echo;
}
-#line 124 "src/ast/lex.cc"
+#line 123 "src/ast/lex.cc"
yy4:
++YYCURSOR;
yy5:
-#line 169 "../src/ast/lex.re"
+#line 168 "../src/ast/lex.re"
{ goto echo; }
-#line 130 "src/ast/lex.cc"
+#line 129 "src/ast/lex.cc"
yy6:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
if (yych == '#') goto yy14;
yy7:
-#line 163 "../src/ast/lex.re"
+#line 162 "../src/ast/lex.re"
{
cline++;
pos = cur;
goto echo;
}
-#line 145 "src/ast/lex.cc"
+#line 144 "src/ast/lex.cc"
yy8:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy6;
}
yy16:
++YYCURSOR;
-#line 72 "../src/ast/lex.re"
+#line 71 "../src/ast/lex.re"
{
if (opts->rFlag) {
fatal("found standard 're2c' block while using -r flag");
}
return Parse;
}
-#line 198 "src/ast/lex.cc"
+#line 197 "src/ast/lex.cc"
yy18:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '!') goto yy20;
yy66:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 158 "../src/ast/lex.re"
+#line 157 "../src/ast/lex.re"
{
set_sourceline();
goto echo;
}
-#line 431 "src/ast/lex.cc"
+#line 430 "src/ast/lex.cc"
yy68:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy66;
goto yy13;
yy89:
++YYCURSOR;
-#line 111 "../src/ast/lex.re"
+#line 110 "../src/ast/lex.re"
{
if (opts->target == opt_t::CODE) {
out.wraw(tok, start)
lex_end_of_comment();
goto echo;
}
-#line 532 "src/ast/lex.cc"
+#line 531 "src/ast/lex.cc"
yy91:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy98;
goto yy13;
yy94:
++YYCURSOR;
-#line 93 "../src/ast/lex.re"
+#line 92 "../src/ast/lex.re"
{
if (!opts->rFlag) {
fatal("found 'use:re2c' block without -r flag");
}
return Reuse;
}
-#line 557 "src/ast/lex.cc"
+#line 556 "src/ast/lex.cc"
yy96:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy102;
goto yy13;
yy99:
++YYCURSOR;
-#line 140 "../src/ast/lex.re"
+#line 139 "../src/ast/lex.re"
{
if (opts->target == opt_t::CODE) {
out.wraw(tok, start);
lex_tags();
goto echo;
}
-#line 580 "src/ast/lex.cc"
+#line 579 "src/ast/lex.cc"
yy101:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy106;
goto yy13;
yy104:
++YYCURSOR;
-#line 82 "../src/ast/lex.re"
+#line 81 "../src/ast/lex.re"
{
if (!opts->rFlag) {
fatal("found 'rules:re2c' block without -r flag");
opts.reset_mapCodeName ();
return Rules;
}
-#line 606 "src/ast/lex.cc"
+#line 605 "src/ast/lex.cc"
yy106:
++YYCURSOR;
-#line 129 "../src/ast/lex.re"
+#line 128 "../src/ast/lex.re"
{
if (opts->target == opt_t::CODE) {
out.wraw(tok, start)
lex_end_of_comment();
goto echo;
}
-#line 620 "src/ast/lex.cc"
+#line 619 "src/ast/lex.cc"
yy108:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy111;
goto yy13;
yy109:
++YYCURSOR;
-#line 103 "../src/ast/lex.re"
+#line 102 "../src/ast/lex.re"
{
if (opts->target == opt_t::CODE) {
out.wraw(tok, start);
lex_end_of_comment();
goto echo;
}
-#line 635 "src/ast/lex.cc"
+#line 634 "src/ast/lex.cc"
yy111:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy13;
++YYCURSOR;
-#line 120 "../src/ast/lex.re"
+#line 119 "../src/ast/lex.re"
{
if (opts->target == opt_t::CODE) {
out.wraw(tok, start)
lex_end_of_comment();
goto echo;
}
-#line 649 "src/ast/lex.cc"
+#line 648 "src/ast/lex.cc"
}
-#line 170 "../src/ast/lex.re"
+#line 169 "../src/ast/lex.re"
}
{
uint32_t ignored = 0;
for (;;) {
-#line 659 "src/ast/lex.cc"
+#line 658 "src/ast/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
}
yy116:
++YYCURSOR;
-#line 177 "../src/ast/lex.re"
+#line 176 "../src/ast/lex.re"
{ fatal("expected end of block"); }
-#line 677 "src/ast/lex.cc"
+#line 676 "src/ast/lex.cc"
yy118:
++YYCURSOR;
yy119:
-#line 179 "../src/ast/lex.re"
+#line 178 "../src/ast/lex.re"
{ continue; }
-#line 683 "src/ast/lex.cc"
+#line 682 "src/ast/lex.cc"
yy120:
++YYCURSOR;
-#line 180 "../src/ast/lex.re"
+#line 179 "../src/ast/lex.re"
{ ++ignored; continue; }
-#line 688 "src/ast/lex.cc"
+#line 687 "src/ast/lex.cc"
yy122:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy120;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '/') goto yy119;
++YYCURSOR;
-#line 181 "../src/ast/lex.re"
+#line 180 "../src/ast/lex.re"
{
if (ignored > 0) {
cline += ignored;
tok = pos = cur;
return;
}
-#line 706 "src/ast/lex.cc"
+#line 705 "src/ast/lex.cc"
}
-#line 189 "../src/ast/lex.re"
+#line 188 "../src/ast/lex.re"
}
}
{
std::string fmt, sep;
for (;;) {
-#line 716 "src/ast/lex.cc"
+#line 715 "src/ast/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
}
++YYCURSOR;
yy129:
-#line 196 "../src/ast/lex.re"
+#line 195 "../src/ast/lex.re"
{ fatal("unrecognized configuration"); }
-#line 776 "src/ast/lex.cc"
+#line 775 "src/ast/lex.cc"
yy130:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yybm[0+yych] & 128) {
goto yy130;
}
-#line 201 "../src/ast/lex.re"
+#line 200 "../src/ast/lex.re"
{ continue; }
-#line 786 "src/ast/lex.cc"
+#line 785 "src/ast/lex.cc"
yy133:
++YYCURSOR;
-#line 202 "../src/ast/lex.re"
+#line 201 "../src/ast/lex.re"
{ ++cline; continue; }
-#line 791 "src/ast/lex.cc"
+#line 790 "src/ast/lex.cc"
yy135:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy133;
goto yy129;
yy139:
++YYCURSOR;
-#line 203 "../src/ast/lex.re"
+#line 202 "../src/ast/lex.re"
{
if (opts->target == opt_t::CODE) {
out.wdelay_tags(opts->topIndent,
tok = pos = cur;
return;
}
-#line 819 "src/ast/lex.cc"
+#line 818 "src/ast/lex.cc"
yy141:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'r') goto yy144;
goto yy142;
yy150:
++YYCURSOR;
-#line 198 "../src/ast/lex.re"
+#line 197 "../src/ast/lex.re"
{ fmt = lex_conf_string(); continue; }
-#line 858 "src/ast/lex.cc"
+#line 857 "src/ast/lex.cc"
yy152:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 't') goto yy142;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'r') goto yy142;
++YYCURSOR;
-#line 199 "../src/ast/lex.re"
+#line 198 "../src/ast/lex.re"
{ sep = lex_conf_string(); continue; }
-#line 869 "src/ast/lex.cc"
+#line 868 "src/ast/lex.cc"
}
-#line 211 "../src/ast/lex.re"
+#line 210 "../src/ast/lex.re"
}
}
start:
-#line 889 "src/ast/lex.cc"
+#line 888 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
yy159:
++YYCURSOR;
yy160:
-#line 379 "../src/ast/lex.re"
+#line 378 "../src/ast/lex.re"
{
fatalf("unexpected character: '%c'", *tok);
goto scan;
}
-#line 991 "src/ast/lex.cc"
+#line 990 "src/ast/lex.cc"
yy161:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yybm[0+yych] & 16) {
goto yy161;
}
-#line 363 "../src/ast/lex.re"
+#line 362 "../src/ast/lex.re"
{
goto scan;
}
-#line 1003 "src/ast/lex.cc"
+#line 1002 "src/ast/lex.cc"
yy164:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '#') goto yy190;
}
yy165:
-#line 372 "../src/ast/lex.re"
+#line 371 "../src/ast/lex.re"
{
if (cur == eof) return 0;
pos = cur;
cline++;
goto scan;
}
-#line 1021 "src/ast/lex.cc"
+#line 1020 "src/ast/lex.cc"
yy166:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy164;
yy167:
++YYCURSOR;
yy168:
-#line 273 "../src/ast/lex.re"
+#line 272 "../src/ast/lex.re"
{ return *tok; }
-#line 1031 "src/ast/lex.cc"
+#line 1030 "src/ast/lex.cc"
yy169:
++YYCURSOR;
-#line 260 "../src/ast/lex.re"
+#line 259 "../src/ast/lex.re"
{ yylval.regexp = lex_str('"', opts->bCaseInsensitive || opts->bCaseInverted); return TOKEN_REGEXP; }
-#line 1036 "src/ast/lex.cc"
+#line 1035 "src/ast/lex.cc"
yy171:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '}') goto yy192;
goto yy160;
yy172:
++YYCURSOR;
-#line 259 "../src/ast/lex.re"
+#line 258 "../src/ast/lex.re"
{ yylval.regexp = lex_str('\'', opts->bCaseInsensitive || !opts->bCaseInverted); return TOKEN_REGEXP; }
-#line 1045 "src/ast/lex.cc"
+#line 1044 "src/ast/lex.cc"
yy174:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '/') goto yy192;
goto yy168;
yy175:
++YYCURSOR;
-#line 358 "../src/ast/lex.re"
+#line 357 "../src/ast/lex.re"
{
yylval.regexp = ast_dot(cline, get_column());
return TOKEN_REGEXP;
}
-#line 1057 "src/ast/lex.cc"
+#line 1056 "src/ast/lex.cc"
yy177:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '*') goto yy194;
yy182:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '^') goto yy209;
-#line 261 "../src/ast/lex.re"
+#line 260 "../src/ast/lex.re"
{ yylval.regexp = lex_cls(false); return TOKEN_REGEXP; }
-#line 1119 "src/ast/lex.cc"
+#line 1118 "src/ast/lex.cc"
yy184:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy211;
}
}
yy186:
-#line 228 "../src/ast/lex.re"
+#line 227 "../src/ast/lex.re"
{
depth = 1;
code_line = cline;
goto code;
}
-#line 1148 "src/ast/lex.cc"
+#line 1147 "src/ast/lex.cc"
yy187:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
}
yy192:
++YYCURSOR;
-#line 254 "../src/ast/lex.re"
+#line 253 "../src/ast/lex.re"
{
tok = cur;
return 0;
}
-#line 1189 "src/ast/lex.cc"
+#line 1188 "src/ast/lex.cc"
yy194:
++YYCURSOR;
-#line 248 "../src/ast/lex.re"
+#line 247 "../src/ast/lex.re"
{
depth = 1;
goto comment;
}
-#line 1197 "src/ast/lex.cc"
+#line 1196 "src/ast/lex.cc"
yy196:
++YYCURSOR;
-#line 245 "../src/ast/lex.re"
+#line 244 "../src/ast/lex.re"
{
goto nextLine;
}
-#line 1204 "src/ast/lex.cc"
+#line 1203 "src/ast/lex.cc"
yy198:
++YYCURSOR;
YYCURSOR -= 1;
-#line 338 "../src/ast/lex.re"
+#line 337 "../src/ast/lex.re"
{
if (!opts->FFlag) {
yylval.str = new std::string (tok, tok_len());
return TOKEN_REGEXP;
}
}
-#line 1228 "src/ast/lex.cc"
+#line 1227 "src/ast/lex.cc"
yy200:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy202:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 333 "../src/ast/lex.re"
+#line 332 "../src/ast/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
return TOKEN_ID;
}
-#line 1253 "src/ast/lex.cc"
+#line 1252 "src/ast/lex.cc"
yy204:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '>') goto yy221;
-#line 238 "../src/ast/lex.re"
+#line 237 "../src/ast/lex.re"
{
tok += 2; /* skip ":=" */
depth = 0;
code_line = cline;
goto code;
}
-#line 1264 "src/ast/lex.cc"
+#line 1263 "src/ast/lex.cc"
yy206:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
}
}
yy208:
-#line 264 "../src/ast/lex.re"
+#line 263 "../src/ast/lex.re"
{
if (!opts->tags) {
fatal("tags are only allowed with '-T, --tags' option");
yylval.regexp = ast_tag(cline, get_column(), name);
return TOKEN_REGEXP;
}
-#line 1291 "src/ast/lex.cc"
+#line 1290 "src/ast/lex.cc"
yy209:
++YYCURSOR;
-#line 262 "../src/ast/lex.re"
+#line 261 "../src/ast/lex.re"
{ yylval.regexp = lex_cls(true); return TOKEN_REGEXP; }
-#line 1296 "src/ast/lex.cc"
+#line 1295 "src/ast/lex.cc"
yy211:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy223;
yy212:
++YYCURSOR;
yy213:
-#line 306 "../src/ast/lex.re"
+#line 305 "../src/ast/lex.re"
{
fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers");
}
-#line 1308 "src/ast/lex.cc"
+#line 1307 "src/ast/lex.cc"
yy214:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yy219:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 320 "../src/ast/lex.re"
+#line 319 "../src/ast/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
if (opts->FFlag)
return TOKEN_ID;
}
}
-#line 1374 "src/ast/lex.cc"
+#line 1373 "src/ast/lex.cc"
yy221:
++YYCURSOR;
YYCURSOR -= 2;
-#line 234 "../src/ast/lex.re"
+#line 233 "../src/ast/lex.re"
{
return *tok;
}
-#line 1382 "src/ast/lex.cc"
+#line 1381 "src/ast/lex.cc"
yy223:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy230;
goto yy213;
yy225:
++YYCURSOR;
-#line 275 "../src/ast/lex.re"
+#line 274 "../src/ast/lex.re"
{
- if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.extop.min))
+ if (!s_to_u32_unsafe (tok + 1, cur - 1, yylval.bounds.min))
{
fatal ("repetition count overflow");
}
- yylval.extop.max = yylval.extop.min;
+ yylval.bounds.max = yylval.bounds.min;
return TOKEN_CLOSESIZE;
}
-#line 1405 "src/ast/lex.cc"
+#line 1404 "src/ast/lex.cc"
yy227:
++YYCURSOR;
-#line 310 "../src/ast/lex.re"
+#line 309 "../src/ast/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 1416 "src/ast/lex.cc"
+#line 1415 "src/ast/lex.cc"
yy229:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'n') goto yy235;
goto yy189;
yy233:
++YYCURSOR;
-#line 297 "../src/ast/lex.re"
+#line 296 "../src/ast/lex.re"
{
- if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.extop.min))
+ if (!s_to_u32_unsafe (tok + 1, cur - 2, yylval.bounds.min))
{
fatal ("repetition lower bound overflow");
}
- yylval.extop.max = std::numeric_limits<uint32_t>::max();
+ yylval.bounds.max = std::numeric_limits<uint32_t>::max();
return TOKEN_CLOSESIZE;
}
-#line 1444 "src/ast/lex.cc"
+#line 1443 "src/ast/lex.cc"
yy235:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy240;
goto yy189;
yy236:
++YYCURSOR;
-#line 318 "../src/ast/lex.re"
+#line 317 "../src/ast/lex.re"
{ lex_conf (); return TOKEN_CONF; }
-#line 1453 "src/ast/lex.cc"
+#line 1452 "src/ast/lex.cc"
yy238:
++YYCURSOR;
-#line 284 "../src/ast/lex.re"
+#line 283 "../src/ast/lex.re"
{
const char * p = strchr (tok, ',');
- if (!s_to_u32_unsafe (tok + 1, p, yylval.extop.min))
+ if (!s_to_u32_unsafe (tok + 1, p, yylval.bounds.min))
{
fatal ("repetition lower bound overflow");
}
- if (!s_to_u32_unsafe (p + 1, cur - 1, yylval.extop.max))
+ if (!s_to_u32_unsafe (p + 1, cur - 1, yylval.bounds.max))
{
fatal ("repetition upper bound overflow");
}
return TOKEN_CLOSESIZE;
}
-#line 1469 "src/ast/lex.cc"
+#line 1468 "src/ast/lex.cc"
yy240:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '0') goto yy242;
yy247:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 367 "../src/ast/lex.re"
+#line 366 "../src/ast/lex.re"
{
set_sourceline ();
goto scan;
}
-#line 1530 "src/ast/lex.cc"
+#line 1529 "src/ast/lex.cc"
yy249:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy247;
if (yych == '\n') goto yy189;
goto yy250;
}
-#line 383 "../src/ast/lex.re"
+#line 382 "../src/ast/lex.re"
flex_name:
-#line 1560 "src/ast/lex.cc"
+#line 1559 "src/ast/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
if (yych == '\r') goto yy260;
++YYCURSOR;
yy257:
-#line 394 "../src/ast/lex.re"
+#line 393 "../src/ast/lex.re"
{
YYCURSOR = tok;
goto start;
}
-#line 1574 "src/ast/lex.cc"
+#line 1573 "src/ast/lex.cc"
yy258:
++YYCURSOR;
-#line 388 "../src/ast/lex.re"
+#line 387 "../src/ast/lex.re"
{
YYCURSOR = tok;
lexer_state = LEX_NORMAL;
return TOKEN_FID_END;
}
-#line 1583 "src/ast/lex.cc"
+#line 1582 "src/ast/lex.cc"
yy260:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy258;
goto yy257;
}
-#line 398 "../src/ast/lex.re"
+#line 397 "../src/ast/lex.re"
code:
-#line 1594 "src/ast/lex.cc"
+#line 1593 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
yy263:
++YYCURSOR;
-#line 461 "../src/ast/lex.re"
+#line 460 "../src/ast/lex.re"
{
if (cur == eof)
{
}
goto code;
}
-#line 1667 "src/ast/lex.cc"
+#line 1666 "src/ast/lex.cc"
yy265:
++YYCURSOR;
yy266:
-#line 475 "../src/ast/lex.re"
+#line 474 "../src/ast/lex.re"
{
goto code;
}
-#line 1675 "src/ast/lex.cc"
+#line 1674 "src/ast/lex.cc"
yy267:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
}
yy268:
-#line 442 "../src/ast/lex.re"
+#line 441 "../src/ast/lex.re"
{
if (depth == 0)
{
cline++;
goto code;
}
-#line 1714 "src/ast/lex.cc"
+#line 1713 "src/ast/lex.cc"
yy269:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
goto yy287;
yy271:
++YYCURSOR;
-#line 414 "../src/ast/lex.re"
+#line 413 "../src/ast/lex.re"
{
if (depth == 0)
{
}
goto code;
}
-#line 1739 "src/ast/lex.cc"
+#line 1738 "src/ast/lex.cc"
yy273:
++YYCURSOR;
-#line 402 "../src/ast/lex.re"
+#line 401 "../src/ast/lex.re"
{
if (depth == 0)
{
}
goto code;
}
-#line 1755 "src/ast/lex.cc"
+#line 1754 "src/ast/lex.cc"
yy275:
yyaccept = 2;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy276:
YYCURSOR -= 1;
-#line 429 "../src/ast/lex.re"
+#line 428 "../src/ast/lex.re"
{
if (depth == 0)
{
cline++;
goto code;
}
-#line 1781 "src/ast/lex.cc"
+#line 1780 "src/ast/lex.cc"
yy277:
++YYCURSOR;
goto yy276;
if (yych >= '#') goto yy285;
yy283:
++YYCURSOR;
-#line 472 "../src/ast/lex.re"
+#line 471 "../src/ast/lex.re"
{
goto code;
}
-#line 1820 "src/ast/lex.cc"
+#line 1819 "src/ast/lex.cc"
yy285:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy301:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 425 "../src/ast/lex.re"
+#line 424 "../src/ast/lex.re"
{
set_sourceline ();
goto code;
}
-#line 1915 "src/ast/lex.cc"
+#line 1914 "src/ast/lex.cc"
yy303:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy301;
if (yych == '\n') goto yy280;
goto yy304;
}
-#line 478 "../src/ast/lex.re"
+#line 477 "../src/ast/lex.re"
comment:
-#line 1949 "src/ast/lex.cc"
+#line 1948 "src/ast/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
}
++YYCURSOR;
yy311:
-#line 510 "../src/ast/lex.re"
+#line 509 "../src/ast/lex.re"
{
if (cur == eof)
{
}
goto comment;
}
-#line 2004 "src/ast/lex.cc"
+#line 2003 "src/ast/lex.cc"
yy312:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yybm[0+yych] & 32) {
}
if (yych == '#') goto yy319;
yy313:
-#line 501 "../src/ast/lex.re"
+#line 500 "../src/ast/lex.re"
{
if (cur == eof)
{
cline++;
goto comment;
}
-#line 2022 "src/ast/lex.cc"
+#line 2021 "src/ast/lex.cc"
yy314:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '/') goto yy321;
}
yy321:
++YYCURSOR;
-#line 482 "../src/ast/lex.re"
+#line 481 "../src/ast/lex.re"
{
if (--depth == 0)
{
goto comment;
}
}
-#line 2067 "src/ast/lex.cc"
+#line 2066 "src/ast/lex.cc"
yy323:
++YYCURSOR;
-#line 492 "../src/ast/lex.re"
+#line 491 "../src/ast/lex.re"
{
++depth;
fatal("ambiguous /* found");
goto comment;
}
-#line 2076 "src/ast/lex.cc"
+#line 2075 "src/ast/lex.cc"
yy325:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'i') goto yy318;
yy335:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 497 "../src/ast/lex.re"
+#line 496 "../src/ast/lex.re"
{
set_sourceline ();
goto comment;
}
-#line 2138 "src/ast/lex.cc"
+#line 2137 "src/ast/lex.cc"
yy337:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy335;
if (yych == '\n') goto yy318;
goto yy338;
}
-#line 517 "../src/ast/lex.re"
+#line 516 "../src/ast/lex.re"
nextLine:
-#line 2168 "src/ast/lex.cc"
+#line 2167 "src/ast/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy346;
++YYCURSOR;
-#line 528 "../src/ast/lex.re"
+#line 527 "../src/ast/lex.re"
{ if(cur == eof) {
return 0;
}
goto nextLine;
}
-#line 2181 "src/ast/lex.cc"
+#line 2180 "src/ast/lex.cc"
yy346:
++YYCURSOR;
-#line 521 "../src/ast/lex.re"
+#line 520 "../src/ast/lex.re"
{ if(cur == eof) {
return 0;
}
cline++;
goto scan;
}
-#line 2192 "src/ast/lex.cc"
+#line 2191 "src/ast/lex.cc"
}
-#line 533 "../src/ast/lex.re"
+#line 532 "../src/ast/lex.re"
}
uint32_t u, l;
fst:
-#line 2219 "src/ast/lex.cc"
+#line 2218 "src/ast/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == ']') goto yy351;
-#line 558 "../src/ast/lex.re"
+#line 557 "../src/ast/lex.re"
{ l = lex_cls_chr(); goto snd; }
-#line 2227 "src/ast/lex.cc"
+#line 2226 "src/ast/lex.cc"
yy351:
++YYCURSOR;
-#line 557 "../src/ast/lex.re"
+#line 556 "../src/ast/lex.re"
{ goto end; }
-#line 2232 "src/ast/lex.cc"
+#line 2231 "src/ast/lex.cc"
}
-#line 559 "../src/ast/lex.re"
+#line 558 "../src/ast/lex.re"
snd:
-#line 2238 "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 yy356;
yy355:
-#line 562 "../src/ast/lex.re"
+#line 561 "../src/ast/lex.re"
{ u = l; goto add; }
-#line 2247 "src/ast/lex.cc"
+#line 2246 "src/ast/lex.cc"
yy356:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != ']') goto yy358;
yy358:
++YYCURSOR;
YYCURSOR -= 1;
-#line 563 "../src/ast/lex.re"
+#line 562 "../src/ast/lex.re"
{
u = lex_cls_chr();
if (l > u) {
}
goto add;
}
-#line 2265 "src/ast/lex.cc"
+#line 2264 "src/ast/lex.cc"
}
-#line 571 "../src/ast/lex.re"
+#line 570 "../src/ast/lex.re"
add:
if (!(s = opts->encoding.encodeRange(l, u))) {
{
tok = cur;
-#line 2286 "src/ast/lex.cc"
+#line 2285 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if (yych == '\n') goto yy364;
if (yych == '\\') goto yy366;
++YYCURSOR;
-#line 594 "../src/ast/lex.re"
+#line 593 "../src/ast/lex.re"
{ return static_cast<uint8_t>(tok[0]); }
-#line 2297 "src/ast/lex.cc"
+#line 2296 "src/ast/lex.cc"
yy364:
++YYCURSOR;
-#line 589 "../src/ast/lex.re"
+#line 588 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error"); }
-#line 2302 "src/ast/lex.cc"
+#line 2301 "src/ast/lex.cc"
yy366:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '`') {
}
}
}
-#line 592 "../src/ast/lex.re"
+#line 591 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in escape sequence"); }
-#line 2353 "src/ast/lex.cc"
+#line 2352 "src/ast/lex.cc"
yy368:
++YYCURSOR;
-#line 607 "../src/ast/lex.re"
+#line 606 "../src/ast/lex.re"
{
warn.useless_escape(cline, get_column(), tok[1]);
return static_cast<uint8_t>(tok[1]);
}
-#line 2361 "src/ast/lex.cc"
+#line 2360 "src/ast/lex.cc"
yy370:
++YYCURSOR;
-#line 605 "../src/ast/lex.re"
+#line 604 "../src/ast/lex.re"
{ return static_cast<uint8_t>('-'); }
-#line 2366 "src/ast/lex.cc"
+#line 2365 "src/ast/lex.cc"
yy372:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy373;
if (yych <= '7') goto yy397;
yy373:
-#line 591 "../src/ast/lex.re"
+#line 590 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in octal escape sequence"); }
-#line 2375 "src/ast/lex.cc"
+#line 2374 "src/ast/lex.cc"
yy374:
++YYCURSOR;
goto yy373;
if (yych <= 'f') goto yy399;
}
yy376:
-#line 590 "../src/ast/lex.re"
+#line 589 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in hexadecimal escape sequence"); }
-#line 2393 "src/ast/lex.cc"
+#line 2392 "src/ast/lex.cc"
yy377:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy378:
++YYCURSOR;
-#line 604 "../src/ast/lex.re"
+#line 603 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2411 "src/ast/lex.cc"
+#line 2410 "src/ast/lex.cc"
yy380:
++YYCURSOR;
-#line 606 "../src/ast/lex.re"
+#line 605 "../src/ast/lex.re"
{ return static_cast<uint8_t>(']'); }
-#line 2416 "src/ast/lex.cc"
+#line 2415 "src/ast/lex.cc"
yy382:
++YYCURSOR;
-#line 597 "../src/ast/lex.re"
+#line 596 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2421 "src/ast/lex.cc"
+#line 2420 "src/ast/lex.cc"
yy384:
++YYCURSOR;
-#line 598 "../src/ast/lex.re"
+#line 597 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2426 "src/ast/lex.cc"
+#line 2425 "src/ast/lex.cc"
yy386:
++YYCURSOR;
-#line 599 "../src/ast/lex.re"
+#line 598 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2431 "src/ast/lex.cc"
+#line 2430 "src/ast/lex.cc"
yy388:
++YYCURSOR;
-#line 600 "../src/ast/lex.re"
+#line 599 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2436 "src/ast/lex.cc"
+#line 2435 "src/ast/lex.cc"
yy390:
++YYCURSOR;
-#line 601 "../src/ast/lex.re"
+#line 600 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2441 "src/ast/lex.cc"
+#line 2440 "src/ast/lex.cc"
yy392:
++YYCURSOR;
-#line 602 "../src/ast/lex.re"
+#line 601 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2446 "src/ast/lex.cc"
+#line 2445 "src/ast/lex.cc"
yy394:
++YYCURSOR;
-#line 603 "../src/ast/lex.re"
+#line 602 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2451 "src/ast/lex.cc"
+#line 2450 "src/ast/lex.cc"
yy396:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy402:
++YYCURSOR;
-#line 596 "../src/ast/lex.re"
+#line 595 "../src/ast/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2516 "src/ast/lex.cc"
+#line 2515 "src/ast/lex.cc"
yy404:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
}
yy406:
++YYCURSOR;
-#line 595 "../src/ast/lex.re"
+#line 594 "../src/ast/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2545 "src/ast/lex.cc"
+#line 2544 "src/ast/lex.cc"
yy408:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
goto yy398;
}
}
-#line 611 "../src/ast/lex.re"
+#line 610 "../src/ast/lex.re"
}
end = false;
tok = cur;
-#line 2578 "src/ast/lex.cc"
+#line 2577 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if (yych == '\n') goto yy414;
if (yych == '\\') goto yy416;
++YYCURSOR;
-#line 624 "../src/ast/lex.re"
+#line 623 "../src/ast/lex.re"
{
end = tok[0] == quote;
return static_cast<uint8_t>(tok[0]);
}
-#line 2592 "src/ast/lex.cc"
+#line 2591 "src/ast/lex.cc"
yy414:
++YYCURSOR;
-#line 619 "../src/ast/lex.re"
+#line 618 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error"); }
-#line 2597 "src/ast/lex.cc"
+#line 2596 "src/ast/lex.cc"
yy416:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 'a') {
}
}
}
-#line 622 "../src/ast/lex.re"
+#line 621 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in escape sequence"); }
-#line 2645 "src/ast/lex.cc"
+#line 2644 "src/ast/lex.cc"
yy418:
++YYCURSOR;
-#line 638 "../src/ast/lex.re"
+#line 637 "../src/ast/lex.re"
{
if (tok[1] != quote) {
warn.useless_escape(cline, get_column(), tok[1]);
}
return static_cast<uint8_t>(tok[1]);
}
-#line 2655 "src/ast/lex.cc"
+#line 2654 "src/ast/lex.cc"
yy420:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy421;
if (yych <= '7') goto yy443;
yy421:
-#line 621 "../src/ast/lex.re"
+#line 620 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in octal escape sequence"); }
-#line 2664 "src/ast/lex.cc"
+#line 2663 "src/ast/lex.cc"
yy422:
++YYCURSOR;
goto yy421;
if (yych <= 'f') goto yy445;
}
yy424:
-#line 620 "../src/ast/lex.re"
+#line 619 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in hexadecimal escape sequence"); }
-#line 2682 "src/ast/lex.cc"
+#line 2681 "src/ast/lex.cc"
yy425:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy426:
++YYCURSOR;
-#line 637 "../src/ast/lex.re"
+#line 636 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2700 "src/ast/lex.cc"
+#line 2699 "src/ast/lex.cc"
yy428:
++YYCURSOR;
-#line 630 "../src/ast/lex.re"
+#line 629 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2705 "src/ast/lex.cc"
+#line 2704 "src/ast/lex.cc"
yy430:
++YYCURSOR;
-#line 631 "../src/ast/lex.re"
+#line 630 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2710 "src/ast/lex.cc"
+#line 2709 "src/ast/lex.cc"
yy432:
++YYCURSOR;
-#line 632 "../src/ast/lex.re"
+#line 631 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2715 "src/ast/lex.cc"
+#line 2714 "src/ast/lex.cc"
yy434:
++YYCURSOR;
-#line 633 "../src/ast/lex.re"
+#line 632 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2720 "src/ast/lex.cc"
+#line 2719 "src/ast/lex.cc"
yy436:
++YYCURSOR;
-#line 634 "../src/ast/lex.re"
+#line 633 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2725 "src/ast/lex.cc"
+#line 2724 "src/ast/lex.cc"
yy438:
++YYCURSOR;
-#line 635 "../src/ast/lex.re"
+#line 634 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2730 "src/ast/lex.cc"
+#line 2729 "src/ast/lex.cc"
yy440:
++YYCURSOR;
-#line 636 "../src/ast/lex.re"
+#line 635 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2735 "src/ast/lex.cc"
+#line 2734 "src/ast/lex.cc"
yy442:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
yy448:
++YYCURSOR;
-#line 629 "../src/ast/lex.re"
+#line 628 "../src/ast/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2800 "src/ast/lex.cc"
+#line 2799 "src/ast/lex.cc"
yy450:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
}
yy452:
++YYCURSOR;
-#line 628 "../src/ast/lex.re"
+#line 627 "../src/ast/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2829 "src/ast/lex.cc"
+#line 2828 "src/ast/lex.cc"
yy454:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
goto yy444;
}
}
-#line 644 "../src/ast/lex.re"
+#line 643 "../src/ast/lex.re"
}
sourceline:
tok = cur;
-#line 2876 "src/ast/lex.cc"
+#line 2875 "src/ast/lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
yy458:
++YYCURSOR;
yy459:
-#line 689 "../src/ast/lex.re"
+#line 688 "../src/ast/lex.re"
{
goto sourceline;
}
-#line 2929 "src/ast/lex.cc"
+#line 2928 "src/ast/lex.cc"
yy460:
++YYCURSOR;
-#line 677 "../src/ast/lex.re"
+#line 676 "../src/ast/lex.re"
{
if (cur == eof)
{
tok = cur;
return;
}
-#line 2945 "src/ast/lex.cc"
+#line 2944 "src/ast/lex.cc"
yy462:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '\n') goto yy459;
if (yybm[0+yych] & 64) {
goto yy463;
}
-#line 666 "../src/ast/lex.re"
+#line 665 "../src/ast/lex.re"
{
if (!s_to_u32_unsafe (tok, cur, cline))
{
}
goto sourceline;
}
-#line 2965 "src/ast/lex.cc"
+#line 2964 "src/ast/lex.cc"
yy466:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy459;
yy469:
++YYCURSOR;
-#line 673 "../src/ast/lex.re"
+#line 672 "../src/ast/lex.re"
{
escape (in.file_name, std::string (tok + 1, tok_len () - 2)); // -2 to omit quotes
goto sourceline;
}
-#line 2987 "src/ast/lex.cc"
+#line 2986 "src/ast/lex.cc"
yy471:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yych == '\n') goto yy468;
goto yy466;
}
-#line 692 "../src/ast/lex.re"
+#line 691 "../src/ast/lex.re"
}