-/* Generated by re2c 0.14.3 on Tue Aug 11 14:37:44 2015 */
+/* Generated by re2c 0.14.3 on Wed Aug 12 17:25:10 2015 */
#line 1 "../src/parse/scanner_lex.re"
#include <stdlib.h>
#include <string.h>
#endif
#define YYCTYPE unsigned char
-#define YYCURSOR cursor
+#define YYCURSOR cur
#define YYLIMIT lim
#define YYMARKER ptr
#define YYCTXMARKER ctx
-#define YYFILL(n) {cursor = fill(cursor, n);}
+#define YYFILL(n) { fill (n); }
-#define RETURN(i) {cur = cursor; return i;}
+#define RETURN(i) { return i; }
namespace re2c
{
Scanner::ParseMode Scanner::echo()
{
- char *cursor = cur;
bool ignore_eoc = false;
int ignore_cnt = 0;
- if (eof && cursor == eof) // Catch EOF
+ if (eof && cur == eof) // Catch EOF
{
return Stop;
}
- tok = cursor;
+ tok = cur;
echo:
-#line 57 "src/parse/scanner_lex.cc"
+#line 56 "src/parse/scanner_lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
}
++YYCURSOR;
-#line 198 "../src/parse/scanner_lex.re"
+#line 197 "../src/parse/scanner_lex.re"
{
if (!(ignore_eoc || DFlag || flag_skeleton))
{
- out.write((const char*)(tok), (const char*)(cursor) - (const char*)(tok) - 1);
+ out.write((const char*)(tok), (const char*)(cur) - (const char*)(tok) - 1);
// -1 so we don't write out the \0
}
- if(cursor == eof)
+ if(cur == eof)
{
RETURN(Stop);
}
}
-#line 128 "src/parse/scanner_lex.cc"
+#line 127 "src/parse/scanner_lex.cc"
yy4:
++YYCURSOR;
yy5:
-#line 209 "../src/parse/scanner_lex.re"
+#line 208 "../src/parse/scanner_lex.re"
{
goto echo;
}
-#line 136 "src/parse/scanner_lex.cc"
+#line 135 "src/parse/scanner_lex.cc"
yy6:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
}
if (yych == '#') goto yy91;
yy7:
-#line 185 "../src/parse/scanner_lex.re"
+#line 184 "../src/parse/scanner_lex.re"
{
if (ignore_eoc)
{
}
else if (!(DFlag || flag_skeleton))
{
- out.write((const char*)(tok), (const char*)(cursor) - (const char*)(tok));
+ out.write((const char*)(tok), (const char*)(cur) - (const char*)(tok));
}
- tok = pos = cursor;
+ tok = pos = cur;
cline++;
goto echo;
}
-#line 159 "src/parse/scanner_lex.cc"
+#line 158 "src/parse/scanner_lex.cc"
yy8:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '{') goto yy32;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 87 "../src/parse/scanner_lex.re"
+#line 86 "../src/parse/scanner_lex.re"
{
if (rFlag)
{
{
fatal("found 'rules:re2c' block without -r flag");
}
- tok = cursor;
+ tok = cur;
RETURN(Rules);
}
-#line 256 "src/parse/scanner_lex.cc"
+#line 255 "src/parse/scanner_lex.cc"
yy31:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
yy32:
++YYCURSOR;
-#line 75 "../src/parse/scanner_lex.re"
+#line 74 "../src/parse/scanner_lex.re"
{
if (rFlag)
{
}
if (!(DFlag || flag_skeleton))
{
- out.write((const char*)(tok), (const char*)(&cursor[-7]) - (const char*)(tok));
+ out.write((const char*)(tok), (const char*)(&cur[-7]) - (const char*)(tok));
}
- tok = cursor;
+ tok = cur;
RETURN(Parse);
}
-#line 275 "src/parse/scanner_lex.cc"
+#line 274 "src/parse/scanner_lex.cc"
yy34:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'e') goto yy12;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 99 "../src/parse/scanner_lex.re"
+#line 98 "../src/parse/scanner_lex.re"
{
if (!rFlag)
{
reuse();
if (!(DFlag || flag_skeleton))
{
- out.write((const char*)(tok), (const char*)(&cursor[-11]) - (const char*)(tok));
+ out.write((const char*)(tok), (const char*)(&cur[-11]) - (const char*)(tok));
}
- tok = cursor;
+ tok = cur;
RETURN(Reuse);
}
-#line 304 "src/parse/scanner_lex.cc"
+#line 303 "src/parse/scanner_lex.cc"
yy42:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'x') goto yy12;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 112 "../src/parse/scanner_lex.re"
+#line 111 "../src/parse/scanner_lex.re"
{
if (!DFlag)
{
out.insert_yymaxfill ();
}
- tok = pos = cursor;
+ tok = pos = cur;
ignore_eoc = true;
goto echo;
}
-#line 329 "src/parse/scanner_lex.cc"
+#line 328 "src/parse/scanner_lex.cc"
yy50:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 't') goto yy12;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 121 "../src/parse/scanner_lex.re"
+#line 120 "../src/parse/scanner_lex.re"
{
- tok = pos = cursor;
+ tok = pos = cur;
out.insert_state_goto (topIndent);
ignore_eoc = true;
goto echo;
}
-#line 361 "src/parse/scanner_lex.cc"
+#line 360 "src/parse/scanner_lex.cc"
yy63:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'n') goto yy12;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 127 "../src/parse/scanner_lex.re"
+#line 126 "../src/parse/scanner_lex.re"
{
- tok = pos = cursor;
+ tok = pos = cur;
ignore_eoc = true;
goto echo;
}
-#line 388 "src/parse/scanner_lex.cc"
+#line 387 "src/parse/scanner_lex.cc"
yy74:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'p') goto yy12;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != 'c') goto yy12;
++YYCURSOR;
-#line 132 "../src/parse/scanner_lex.re"
+#line 131 "../src/parse/scanner_lex.re"
{
- tok = pos = cursor;
+ tok = pos = cur;
ignore_eoc = true;
if (!DFlag)
{
}
goto echo;
}
-#line 421 "src/parse/scanner_lex.cc"
+#line 420 "src/parse/scanner_lex.cc"
yy84:
yyaccept = 2;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '\n') goto yy87;
if (yych == '\r') goto yy86;
yy85:
-#line 163 "../src/parse/scanner_lex.re"
+#line 162 "../src/parse/scanner_lex.re"
{
if (ignore_eoc)
{
}
else if (!(DFlag || flag_skeleton))
{
- out.write((const char*)(tok), (const char*)(cursor) - (const char*)(tok));
+ out.write((const char*)(tok), (const char*)(cur) - (const char*)(tok));
}
- tok = pos = cursor;
+ tok = pos = cur;
goto echo;
}
-#line 447 "src/parse/scanner_lex.cc"
+#line 446 "src/parse/scanner_lex.cc"
yy86:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '\n') goto yy12;
yy87:
++YYCURSOR;
-#line 145 "../src/parse/scanner_lex.re"
+#line 144 "../src/parse/scanner_lex.re"
{
cline++;
if (ignore_eoc)
}
else if (!(DFlag || flag_skeleton))
{
- out.write((const char*)(tok), (const char*)(cursor) - (const char*)(tok));
+ out.write((const char*)(tok), (const char*)(cur) - (const char*)(tok));
}
- tok = pos = cursor;
+ tok = pos = cur;
goto echo;
}
-#line 472 "src/parse/scanner_lex.cc"
+#line 471 "src/parse/scanner_lex.cc"
yy89:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy103:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 181 "../src/parse/scanner_lex.re"
+#line 180 "../src/parse/scanner_lex.re"
{
- set_sourceline(cursor);
+ set_sourceline ();
goto echo;
}
-#line 552 "src/parse/scanner_lex.cc"
+#line 551 "src/parse/scanner_lex.cc"
yy105:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy103;
if (yych == '\r') goto yy105;
goto yy12;
}
-#line 212 "../src/parse/scanner_lex.re"
+#line 211 "../src/parse/scanner_lex.re"
}
int Scanner::scan()
{
- char *cursor = cur;
uint32_t depth;
scan:
- tchar = cursor - pos;
+ tchar = cur - pos;
tline = cline;
- tok = cursor;
+ tok = cur;
switch (lexer_state)
{
case LEX_NORMAL: goto start;
start:
-#line 600 "src/parse/scanner_lex.cc"
+#line 598 "src/parse/scanner_lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
yy112:
++YYCURSOR;
yy113:
-#line 443 "../src/parse/scanner_lex.re"
+#line 429 "../src/parse/scanner_lex.re"
{
fatalf("unexpected character: '%c'", *tok);
goto scan;
}
-#line 720 "src/parse/scanner_lex.cc"
+#line 718 "src/parse/scanner_lex.cc"
yy114:
++YYCURSOR;
yych = (YYCTYPE)*YYCURSOR;
goto yy248;
yy115:
-#line 427 "../src/parse/scanner_lex.re"
+#line 413 "../src/parse/scanner_lex.re"
{
goto scan;
}
-#line 730 "src/parse/scanner_lex.cc"
+#line 728 "src/parse/scanner_lex.cc"
yy116:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '#') goto yy228;
}
yy117:
-#line 436 "../src/parse/scanner_lex.re"
+#line 422 "../src/parse/scanner_lex.re"
{
- if (cursor == eof) RETURN(0);
- pos = cursor;
+ if (cur == eof) RETURN(0);
+ pos = cur;
cline++;
goto scan;
}
-#line 748 "src/parse/scanner_lex.cc"
+#line 746 "src/parse/scanner_lex.cc"
yy118:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy225;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych != '\n') goto yy221;
yy120:
-#line 292 "../src/parse/scanner_lex.re"
+#line 287 "../src/parse/scanner_lex.re"
{
fatal("unterminated string constant (missing \")");
}
-#line 762 "src/parse/scanner_lex.cc"
+#line 760 "src/parse/scanner_lex.cc"
yy121:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '}') goto yy213;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych != '\n') goto yy216;
yy123:
-#line 295 "../src/parse/scanner_lex.re"
+#line 290 "../src/parse/scanner_lex.re"
{
fatal("unterminated string constant (missing ')");
}
-#line 776 "src/parse/scanner_lex.cc"
+#line 774 "src/parse/scanner_lex.cc"
yy124:
++YYCURSOR;
yy125:
-#line 323 "../src/parse/scanner_lex.re"
+#line 316 "../src/parse/scanner_lex.re"
{
RETURN(*tok);
}
-#line 784 "src/parse/scanner_lex.cc"
+#line 782 "src/parse/scanner_lex.cc"
yy126:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '/') goto yy213;
-#line 327 "../src/parse/scanner_lex.re"
+#line 320 "../src/parse/scanner_lex.re"
{
yylval.op = *tok;
RETURN(STAR);
}
-#line 793 "src/parse/scanner_lex.cc"
+#line 791 "src/parse/scanner_lex.cc"
yy128:
++YYCURSOR;
-#line 331 "../src/parse/scanner_lex.re"
+#line 324 "../src/parse/scanner_lex.re"
{
yylval.op = *tok;
RETURN(CLOSE);
}
-#line 801 "src/parse/scanner_lex.cc"
+#line 799 "src/parse/scanner_lex.cc"
yy130:
++YYCURSOR;
-#line 421 "../src/parse/scanner_lex.re"
+#line 408 "../src/parse/scanner_lex.re"
{
- cur = cursor;
yylval.regexp = mkDot();
return RANGE;
}
-#line 810 "src/parse/scanner_lex.cc"
+#line 807 "src/parse/scanner_lex.cc"
yy132:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '*') goto yy209;
if (yych == '^') goto yy188;
goto yy187;
yy137:
-#line 313 "../src/parse/scanner_lex.re"
+#line 306 "../src/parse/scanner_lex.re"
{
fatal("unterminated range (missing ])");
}
-#line 842 "src/parse/scanner_lex.cc"
+#line 839 "src/parse/scanner_lex.cc"
yy138:
YYCTXMARKER = YYCURSOR + 1;
yych = (YYCTYPE)*++YYCURSOR;
}
}
yy140:
-#line 234 "../src/parse/scanner_lex.re"
+#line 232 "../src/parse/scanner_lex.re"
{
depth = 1;
goto code;
}
-#line 873 "src/parse/scanner_lex.cc"
+#line 870 "src/parse/scanner_lex.cc"
yy141:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == ',') goto yy160;
yy147:
++YYCURSOR;
yy148:
-#line 359 "../src/parse/scanner_lex.re"
+#line 352 "../src/parse/scanner_lex.re"
{
fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers");
}
-#line 949 "src/parse/scanner_lex.cc"
+#line 946 "src/parse/scanner_lex.cc"
yy149:
++YYCURSOR;
-#line 363 "../src/parse/scanner_lex.re"
+#line 356 "../src/parse/scanner_lex.re"
{
if (!FFlag) {
fatal("curly braces for names only allowed with -F switch");
}
- cur = cursor;
yylval.str = new std::string (tok + 1, cur - tok - 2);
return ID;
}
-#line 961 "src/parse/scanner_lex.cc"
+#line 957 "src/parse/scanner_lex.cc"
yy151:
++YYCURSOR;
-#line 341 "../src/parse/scanner_lex.re"
+#line 334 "../src/parse/scanner_lex.re"
{
yylval.extop.minsize = atoi((char *)tok+1);
yylval.extop.maxsize = atoi((char *)tok+1);
RETURN(CLOSESIZE);
}
-#line 970 "src/parse/scanner_lex.cc"
+#line 966 "src/parse/scanner_lex.cc"
yy153:
yyaccept = 6;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '9') goto yy156;
if (yych != '}') goto yy148;
++YYCURSOR;
-#line 353 "../src/parse/scanner_lex.re"
+#line 346 "../src/parse/scanner_lex.re"
{
yylval.extop.minsize = atoi((char *)tok+1);
yylval.extop.maxsize = -1;
RETURN(CLOSESIZE);
}
-#line 984 "src/parse/scanner_lex.cc"
+#line 980 "src/parse/scanner_lex.cc"
yy156:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yych <= '9') goto yy156;
if (yych != '}') goto yy142;
++YYCURSOR;
-#line 347 "../src/parse/scanner_lex.re"
+#line 340 "../src/parse/scanner_lex.re"
{
yylval.extop.minsize = atoi((char *)tok+1);
yylval.extop.maxsize = MAX(yylval.extop.minsize,atoi(strchr((char *)tok, ',')+1));
RETURN(CLOSESIZE);
}
-#line 999 "src/parse/scanner_lex.cc"
+#line 995 "src/parse/scanner_lex.cc"
yy160:
yyaccept = 6;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '9') goto yy156;
if (yych != '}') goto yy148;
++YYCURSOR;
-#line 336 "../src/parse/scanner_lex.re"
+#line 329 "../src/parse/scanner_lex.re"
{
yylval.op = '*';
RETURN(CLOSE);
}
-#line 1012 "src/parse/scanner_lex.cc"
+#line 1008 "src/parse/scanner_lex.cc"
yy163:
++YYCURSOR;
yy164:
YYCURSOR = YYCTXMARKER;
-#line 400 "../src/parse/scanner_lex.re"
+#line 389 "../src/parse/scanner_lex.re"
{
if (!FFlag) {
- cur = cursor;
yylval.str = new std::string (tok, cur - tok);
return ID;
} else {
/* Add one char in front and one behind instead of 's or "s */
- cur = cursor;
SubStr s (tok, cur - tok);
if (bCaseInsensitive || bCaseInverted)
{
return STRING;
}
}
-#line 1038 "src/parse/scanner_lex.cc"
+#line 1032 "src/parse/scanner_lex.cc"
yy165:
yych = (YYCTYPE)*++YYCURSOR;
goto yy184;
++YYCURSOR;
yy167:
YYCURSOR = YYCTXMARKER;
-#line 394 "../src/parse/scanner_lex.re"
+#line 384 "../src/parse/scanner_lex.re"
{
- cur = ptr > tok ? ptr - 1 : cursor;
yylval.str = new std::string (tok, cur - tok);
return ID;
}
-#line 1052 "src/parse/scanner_lex.cc"
+#line 1045 "src/parse/scanner_lex.cc"
yy168:
YYCTXMARKER = YYCURSOR + 1;
++YYCURSOR;
}
}
yy176:
-#line 372 "../src/parse/scanner_lex.re"
+#line 364 "../src/parse/scanner_lex.re"
{
- cur = cursor;
tok += 5; /* skip "re2c:" */
lexer_state = LEX_CONFIG;
yylval.str = new std::string (tok, cur - tok);
return CONFIG;
}
-#line 1139 "src/parse/scanner_lex.cc"
+#line 1131 "src/parse/scanner_lex.cc"
yy177:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 'Z') {
yy181:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 380 "../src/parse/scanner_lex.re"
+#line 371 "../src/parse/scanner_lex.re"
{
- cur = ptr > tok ? ptr - 1 : cursor;
yylval.str = new std::string (tok, cur - tok);
if (FFlag)
{
return ID;
}
}
-#line 1212 "src/parse/scanner_lex.cc"
+#line 1203 "src/parse/scanner_lex.cc"
yy183:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy186;
yy191:
++YYCURSOR;
-#line 306 "../src/parse/scanner_lex.re"
+#line 300 "../src/parse/scanner_lex.re"
{
- cur = cursor;
SubStr s (tok, cur - tok);
yylval.regexp = ranToRE (s);
return RANGE;
}
-#line 1265 "src/parse/scanner_lex.cc"
+#line 1255 "src/parse/scanner_lex.cc"
yy193:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy188;
yy194:
++YYCURSOR;
-#line 299 "../src/parse/scanner_lex.re"
+#line 294 "../src/parse/scanner_lex.re"
{
- cur = cursor;
SubStr s (tok, cur - tok);
yylval.regexp = invToRE (s);
return RANGE;
}
-#line 1281 "src/parse/scanner_lex.cc"
+#line 1270 "src/parse/scanner_lex.cc"
yy196:
++YYCURSOR;
-#line 320 "../src/parse/scanner_lex.re"
+#line 313 "../src/parse/scanner_lex.re"
{
RETURN(SETUP);
}
-#line 1288 "src/parse/scanner_lex.cc"
+#line 1277 "src/parse/scanner_lex.cc"
yy198:
YYCTXMARKER = YYCURSOR + 1;
yych = (YYCTYPE)*++YYCURSOR;
yy201:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 317 "../src/parse/scanner_lex.re"
+#line 310 "../src/parse/scanner_lex.re"
{
RETURN(NOCOND);
}
-#line 1322 "src/parse/scanner_lex.cc"
+#line 1311 "src/parse/scanner_lex.cc"
yy203:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '>') goto yy201;
yy205:
++YYCURSOR;
if ((yych = (YYCTYPE)*YYCURSOR) == '>') goto yy207;
-#line 243 "../src/parse/scanner_lex.re"
+#line 241 "../src/parse/scanner_lex.re"
{
- cur = cursor;
tok += 2; /* skip ":=" */
depth = 0;
goto code;
}
-#line 1341 "src/parse/scanner_lex.cc"
+#line 1329 "src/parse/scanner_lex.cc"
yy207:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 239 "../src/parse/scanner_lex.re"
+#line 237 "../src/parse/scanner_lex.re"
{
RETURN(*tok);
}
-#line 1349 "src/parse/scanner_lex.cc"
+#line 1337 "src/parse/scanner_lex.cc"
yy209:
++YYCURSOR;
-#line 253 "../src/parse/scanner_lex.re"
+#line 250 "../src/parse/scanner_lex.re"
{
depth = 1;
goto comment;
}
-#line 1357 "src/parse/scanner_lex.cc"
+#line 1345 "src/parse/scanner_lex.cc"
yy211:
++YYCURSOR;
-#line 250 "../src/parse/scanner_lex.re"
+#line 247 "../src/parse/scanner_lex.re"
{
goto nextLine;
}
-#line 1364 "src/parse/scanner_lex.cc"
+#line 1352 "src/parse/scanner_lex.cc"
yy213:
++YYCURSOR;
-#line 259 "../src/parse/scanner_lex.re"
+#line 256 "../src/parse/scanner_lex.re"
{
- tok = cursor;
+ tok = cur;
RETURN(0);
}
-#line 1372 "src/parse/scanner_lex.cc"
+#line 1360 "src/parse/scanner_lex.cc"
yy215:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy215;
yy218:
++YYCURSOR;
-#line 278 "../src/parse/scanner_lex.re"
+#line 274 "../src/parse/scanner_lex.re"
{
- cur = cursor;
SubStr s (tok + 1, cur - tok - 2);
if (bCaseInverted)
{
}
return STRING;
}
-#line 1404 "src/parse/scanner_lex.cc"
+#line 1391 "src/parse/scanner_lex.cc"
yy220:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy220;
yy223:
++YYCURSOR;
-#line 264 "../src/parse/scanner_lex.re"
+#line 261 "../src/parse/scanner_lex.re"
{
- cur = cursor;
SubStr s (tok + 1, cur - tok - 2);
if (bCaseInsensitive || bCaseInverted)
{
}
return STRING;
}
-#line 1436 "src/parse/scanner_lex.cc"
+#line 1422 "src/parse/scanner_lex.cc"
yy225:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
yy240:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 431 "../src/parse/scanner_lex.re"
+#line 417 "../src/parse/scanner_lex.re"
{
- set_sourceline(cursor);
+ set_sourceline ();
goto scan;
}
-#line 1534 "src/parse/scanner_lex.cc"
+#line 1520 "src/parse/scanner_lex.cc"
yy242:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy240;
if (yych == ' ') goto yy247;
goto yy115;
}
-#line 447 "../src/parse/scanner_lex.re"
+#line 433 "../src/parse/scanner_lex.re"
flex_name:
-#line 1574 "src/parse/scanner_lex.cc"
+#line 1560 "src/parse/scanner_lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
if (yych == '\r') goto yy255;
++YYCURSOR;
yy252:
-#line 458 "../src/parse/scanner_lex.re"
+#line 444 "../src/parse/scanner_lex.re"
{
YYCURSOR = tok;
goto start;
}
-#line 1588 "src/parse/scanner_lex.cc"
+#line 1574 "src/parse/scanner_lex.cc"
yy253:
++YYCURSOR;
yy254:
-#line 452 "../src/parse/scanner_lex.re"
+#line 438 "../src/parse/scanner_lex.re"
{
YYCURSOR = tok;
lexer_state = LEX_NORMAL;
return FID_END;
}
-#line 1598 "src/parse/scanner_lex.cc"
+#line 1584 "src/parse/scanner_lex.cc"
yy255:
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '\n') goto yy252;
yych = (YYCTYPE)*YYCURSOR;
goto yy254;
}
-#line 462 "../src/parse/scanner_lex.re"
+#line 448 "../src/parse/scanner_lex.re"
code:
-#line 1611 "src/parse/scanner_lex.cc"
+#line 1597 "src/parse/scanner_lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
yy259:
++YYCURSOR;
-#line 527 "../src/parse/scanner_lex.re"
+#line 511 "../src/parse/scanner_lex.re"
{
- if (cursor == eof)
+ if (cur == eof)
{
if (depth)
{
}
goto code;
}
-#line 1684 "src/parse/scanner_lex.cc"
+#line 1670 "src/parse/scanner_lex.cc"
yy261:
++YYCURSOR;
yy262:
-#line 541 "../src/parse/scanner_lex.re"
+#line 525 "../src/parse/scanner_lex.re"
{
goto code;
}
-#line 1692 "src/parse/scanner_lex.cc"
+#line 1678 "src/parse/scanner_lex.cc"
yy263:
YYCTXMARKER = YYCURSOR + 1;
yyaccept = 0;
}
}
yy264:
-#line 507 "../src/parse/scanner_lex.re"
+#line 492 "../src/parse/scanner_lex.re"
{
if (depth == 0)
{
- cur = cursor;
tok += strspn(tok, " \t\r\n");
while (cur > tok && strchr(" \t\r\n", cur[-1]))
{
yylval.code = new Code (tok, cur - tok, get_fname (), tline);
return CODE;
}
- else if (cursor == eof)
+ else if (cur == eof)
{
fatal("missing '}'");
}
- pos = cursor;
+ pos = cur;
cline++;
goto code;
}
-#line 1733 "src/parse/scanner_lex.cc"
+#line 1718 "src/parse/scanner_lex.cc"
yy265:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
goto yy272;
yy267:
++YYCURSOR;
-#line 479 "../src/parse/scanner_lex.re"
+#line 464 "../src/parse/scanner_lex.re"
{
if (depth == 0)
{
}
goto code;
}
-#line 1758 "src/parse/scanner_lex.cc"
+#line 1743 "src/parse/scanner_lex.cc"
yy269:
++YYCURSOR;
-#line 466 "../src/parse/scanner_lex.re"
+#line 452 "../src/parse/scanner_lex.re"
{
if (depth == 0)
{
}
else if (--depth == 0)
{
- cur = cursor;
yylval.code = new Code (tok, cur - tok, get_fname (), tline);
return CODE;
}
goto code;
}
-#line 1775 "src/parse/scanner_lex.cc"
+#line 1759 "src/parse/scanner_lex.cc"
yy271:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy271;
yy275:
++YYCURSOR;
-#line 538 "../src/parse/scanner_lex.re"
+#line 522 "../src/parse/scanner_lex.re"
{
goto code;
}
-#line 1810 "src/parse/scanner_lex.cc"
+#line 1794 "src/parse/scanner_lex.cc"
yy277:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
}
yy281:
YYCURSOR = YYCTXMARKER;
-#line 494 "../src/parse/scanner_lex.re"
+#line 479 "../src/parse/scanner_lex.re"
{
if (depth == 0)
{
goto code;
}
- else if (cursor == eof)
+ else if (cur == eof)
{
fatal("missing '}'");
}
- pos = cursor;
+ pos = cur;
cline++;
goto code;
}
-#line 1851 "src/parse/scanner_lex.cc"
+#line 1835 "src/parse/scanner_lex.cc"
yy282:
yych = (YYCTYPE)*++YYCURSOR;
goto yy281;
yy295:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 490 "../src/parse/scanner_lex.re"
+#line 475 "../src/parse/scanner_lex.re"
{
- set_sourceline(cursor);
+ set_sourceline ();
goto code;
}
-#line 1923 "src/parse/scanner_lex.cc"
+#line 1907 "src/parse/scanner_lex.cc"
yy297:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy295;
goto yy273;
}
}
-#line 544 "../src/parse/scanner_lex.re"
+#line 528 "../src/parse/scanner_lex.re"
comment:
-#line 1967 "src/parse/scanner_lex.cc"
+#line 1951 "src/parse/scanner_lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
}
++YYCURSOR;
yy307:
-#line 576 "../src/parse/scanner_lex.re"
+#line 560 "../src/parse/scanner_lex.re"
{
- if (cursor == eof)
+ if (cur == eof)
{
RETURN(0);
}
goto comment;
}
-#line 2022 "src/parse/scanner_lex.cc"
+#line 2006 "src/parse/scanner_lex.cc"
yy308:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yybm[0+yych] & 32) {
}
if (yych == '#') goto yy319;
yy309:
-#line 567 "../src/parse/scanner_lex.re"
+#line 551 "../src/parse/scanner_lex.re"
{
- if (cursor == eof)
+ if (cur == eof)
{
RETURN(0);
}
- tok = pos = cursor;
+ tok = pos = cur;
cline++;
goto comment;
}
-#line 2040 "src/parse/scanner_lex.cc"
+#line 2024 "src/parse/scanner_lex.cc"
yy310:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '/') goto yy314;
yych = (YYCTYPE)*++YYCURSOR;
if (yych != '*') goto yy307;
++YYCURSOR;
-#line 558 "../src/parse/scanner_lex.re"
+#line 542 "../src/parse/scanner_lex.re"
{
++depth;
fatal("ambiguous /* found");
goto comment;
}
-#line 2055 "src/parse/scanner_lex.cc"
+#line 2039 "src/parse/scanner_lex.cc"
yy314:
++YYCURSOR;
-#line 548 "../src/parse/scanner_lex.re"
+#line 532 "../src/parse/scanner_lex.re"
{
if (--depth == 0)
{
goto comment;
}
}
-#line 2069 "src/parse/scanner_lex.cc"
+#line 2053 "src/parse/scanner_lex.cc"
yy316:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy331:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 563 "../src/parse/scanner_lex.re"
+#line 547 "../src/parse/scanner_lex.re"
{
- set_sourceline(cursor);
+ set_sourceline ();
goto comment;
}
-#line 2152 "src/parse/scanner_lex.cc"
+#line 2136 "src/parse/scanner_lex.cc"
yy333:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy331;
if (yych == '\r') goto yy333;
goto yy318;
}
-#line 583 "../src/parse/scanner_lex.re"
+#line 567 "../src/parse/scanner_lex.re"
nextLine:
-#line 2182 "src/parse/scanner_lex.cc"
+#line 2166 "src/parse/scanner_lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych == '\n') goto yy342;
++YYCURSOR;
-#line 594 "../src/parse/scanner_lex.re"
- { if(cursor == eof) {
+#line 578 "../src/parse/scanner_lex.re"
+ { if(cur == eof) {
RETURN(0);
}
goto nextLine;
}
-#line 2195 "src/parse/scanner_lex.cc"
+#line 2179 "src/parse/scanner_lex.cc"
yy342:
++YYCURSOR;
-#line 587 "../src/parse/scanner_lex.re"
- { if(cursor == eof) {
+#line 571 "../src/parse/scanner_lex.re"
+ { if(cur == eof) {
RETURN(0);
}
- tok = pos = cursor;
+ tok = pos = cur;
cline++;
goto scan;
}
-#line 2206 "src/parse/scanner_lex.cc"
+#line 2190 "src/parse/scanner_lex.cc"
}
-#line 599 "../src/parse/scanner_lex.re"
+#line 583 "../src/parse/scanner_lex.re"
config:
-#line 2213 "src/parse/scanner_lex.cc"
+#line 2197 "src/parse/scanner_lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
if (yych == '=') goto yy350;
}
++YYCURSOR;
-#line 611 "../src/parse/scanner_lex.re"
+#line 594 "../src/parse/scanner_lex.re"
{
fatal("missing '='");
}
-#line 2263 "src/parse/scanner_lex.cc"
+#line 2247 "src/parse/scanner_lex.cc"
yy348:
++YYCURSOR;
yych = (YYCTYPE)*YYCURSOR;
goto yy355;
yy349:
-#line 603 "../src/parse/scanner_lex.re"
+#line 587 "../src/parse/scanner_lex.re"
{
goto config;
}
-#line 2273 "src/parse/scanner_lex.cc"
+#line 2257 "src/parse/scanner_lex.cc"
yy350:
++YYCURSOR;
yych = (YYCTYPE)*YYCURSOR;
goto yy353;
yy351:
-#line 606 "../src/parse/scanner_lex.re"
+#line 590 "../src/parse/scanner_lex.re"
{
lexer_state = LEX_CONFIG_VALUE;
- cur = cursor;
RETURN('=');
}
-#line 2285 "src/parse/scanner_lex.cc"
+#line 2268 "src/parse/scanner_lex.cc"
yy352:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yych == ' ') goto yy354;
goto yy349;
}
-#line 614 "../src/parse/scanner_lex.re"
+#line 597 "../src/parse/scanner_lex.re"
value:
-#line 2309 "src/parse/scanner_lex.cc"
+#line 2292 "src/parse/scanner_lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
}
}
yy358:
-#line 624 "../src/parse/scanner_lex.re"
+#line 606 "../src/parse/scanner_lex.re"
{
- cur = cursor;
yylval.str = new std::string (tok, cur - tok);
lexer_state = LEX_NORMAL;
return VALUE;
}
-#line 2383 "src/parse/scanner_lex.cc"
+#line 2365 "src/parse/scanner_lex.cc"
yy359:
++YYCURSOR;
if (yybm[0+(yych = (YYCTYPE)*YYCURSOR)] & 8) {
goto yy364;
}
yy360:
-#line 618 "../src/parse/scanner_lex.re"
+#line 601 "../src/parse/scanner_lex.re"
{
- cur = cursor;
yylval.number = atoi(std::string (tok, cur - tok).c_str());
lexer_state = LEX_NORMAL;
return NUMBER;
}
-#line 2397 "src/parse/scanner_lex.cc"
+#line 2378 "src/parse/scanner_lex.cc"
yy361:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '0') goto yy365;
if (yych == '\n') goto yy372;
goto yy376;
}
-#line 630 "../src/parse/scanner_lex.re"
+#line 611 "../src/parse/scanner_lex.re"
}
}
}
-void Scanner::set_sourceline(char *& cursor)
+void Scanner::set_sourceline ()
{
sourceline:
- tok = cursor;
+ tok = cur;
-#line 2563 "src/parse/scanner_lex.cc"
+#line 2544 "src/parse/scanner_lex.cc"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
yy382:
++YYCURSOR;
yy383:
-#line 674 "../src/parse/scanner_lex.re"
+#line 653 "../src/parse/scanner_lex.re"
{
goto sourceline;
}
-#line 2616 "src/parse/scanner_lex.cc"
+#line 2597 "src/parse/scanner_lex.cc"
yy384:
++YYCURSOR;
-#line 662 "../src/parse/scanner_lex.re"
+#line 641 "../src/parse/scanner_lex.re"
{
- if (cursor == eof)
+ if (cur == eof)
{
- --cursor;
+ --cur;
}
else
{
- pos = cursor;
+ pos = cur;
}
- tok = cursor;
+ tok = cur;
return;
}
-#line 2632 "src/parse/scanner_lex.cc"
+#line 2613 "src/parse/scanner_lex.cc"
yy386:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '\n') goto yy383;
yych = (YYCTYPE)*YYCURSOR;
goto yy390;
yy388:
-#line 652 "../src/parse/scanner_lex.re"
+#line 633 "../src/parse/scanner_lex.re"
{
- cur = cursor;
cline = atoi(std::string (tok, cur - tok).c_str());
goto sourceline;
}
-#line 2648 "src/parse/scanner_lex.cc"
+#line 2628 "src/parse/scanner_lex.cc"
yy389:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
goto yy391;
yy395:
++YYCURSOR;
-#line 657 "../src/parse/scanner_lex.re"
+#line 637 "../src/parse/scanner_lex.re"
{
- cur = cursor;
escape (in.file_name, std::string (tok + 1, cur - tok - 2));
goto sourceline;
}
-#line 2686 "src/parse/scanner_lex.cc"
+#line 2665 "src/parse/scanner_lex.cc"
}
-#line 677 "../src/parse/scanner_lex.re"
+#line 656 "../src/parse/scanner_lex.re"
}