-/* Generated by re2c 0.16 on Mon Mar 6 17:22:49 2017 */
+/* Generated by re2c 0.16 on Mon Mar 6 21:39:55 2017 */
#line 1 "../src/ast/lex.re"
#include "src/util/c99_stdint.h"
#include <stddef.h>
scan:
tchar = cur - pos;
tok = cur;
- switch (lexer_state)
- {
- case LEX_NORMAL: goto start;
- case LEX_FLEX_NAME: goto flex_name;
- }
-
-start:
-#line 855 "src/ast/lex.cc"
+#line 848 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
yy159:
++YYCURSOR;
yy160:
-#line 342 "../src/ast/lex.re"
+#line 340 "../src/ast/lex.re"
{
fatalf("unexpected character: '%c'", *tok);
goto scan;
}
-#line 957 "src/ast/lex.cc"
+#line 950 "src/ast/lex.cc"
yy161:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
if (yybm[0+yych] & 16) {
goto yy161;
}
-#line 326 "../src/ast/lex.re"
+#line 319 "../src/ast/lex.re"
{
goto scan;
}
-#line 969 "src/ast/lex.cc"
+#line 962 "src/ast/lex.cc"
yy164:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych == '#') goto yy190;
}
yy165:
-#line 335 "../src/ast/lex.re"
+#line 328 "../src/ast/lex.re"
{
- if (cur == eof) return 0;
- pos = cur;
- cline++;
- goto scan;
- }
-#line 987 "src/ast/lex.cc"
+ if (cur == eof) return 0;
+ pos = cur;
+ cline++;
+ if (lexer_state == LEX_FLEX_NAME) {
+ lexer_state = LEX_NORMAL;
+ return TOKEN_FID_END;
+ } else {
+ goto scan;
+ }
+ }
+#line 985 "src/ast/lex.cc"
yy166:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy164;
yy167:
++YYCURSOR;
yy168:
-#line 239 "../src/ast/lex.re"
+#line 232 "../src/ast/lex.re"
{ return *tok; }
-#line 997 "src/ast/lex.cc"
+#line 995 "src/ast/lex.cc"
yy169:
++YYCURSOR;
-#line 226 "../src/ast/lex.re"
+#line 219 "../src/ast/lex.re"
{ yylval.regexp = lex_str('"'); return TOKEN_REGEXP; }
-#line 1002 "src/ast/lex.cc"
+#line 1000 "src/ast/lex.cc"
yy171:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '}') goto yy192;
goto yy160;
yy172:
++YYCURSOR;
-#line 225 "../src/ast/lex.re"
+#line 218 "../src/ast/lex.re"
{ yylval.regexp = lex_str('\''); return TOKEN_REGEXP; }
-#line 1011 "src/ast/lex.cc"
+#line 1009 "src/ast/lex.cc"
yy174:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '/') goto yy192;
goto yy168;
yy175:
++YYCURSOR;
-#line 321 "../src/ast/lex.re"
+#line 314 "../src/ast/lex.re"
{
yylval.regexp = ast_dot(cline, get_column());
return TOKEN_REGEXP;
}
-#line 1023 "src/ast/lex.cc"
+#line 1021 "src/ast/lex.cc"
yy177:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '*') goto yy194;
yy182:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '^') goto yy209;
-#line 227 "../src/ast/lex.re"
+#line 220 "../src/ast/lex.re"
{ yylval.regexp = lex_cls(false); return TOKEN_REGEXP; }
-#line 1085 "src/ast/lex.cc"
+#line 1083 "src/ast/lex.cc"
yy184:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy211;
}
}
yy186:
-#line 194 "../src/ast/lex.re"
+#line 187 "../src/ast/lex.re"
{
depth = 1;
code_line = cline;
goto code;
}
-#line 1114 "src/ast/lex.cc"
+#line 1112 "src/ast/lex.cc"
yy187:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
}
yy192:
++YYCURSOR;
-#line 220 "../src/ast/lex.re"
+#line 213 "../src/ast/lex.re"
{
tok = cur;
return 0;
}
-#line 1155 "src/ast/lex.cc"
+#line 1153 "src/ast/lex.cc"
yy194:
++YYCURSOR;
-#line 214 "../src/ast/lex.re"
+#line 207 "../src/ast/lex.re"
{
depth = 1;
goto comment;
}
-#line 1163 "src/ast/lex.cc"
+#line 1161 "src/ast/lex.cc"
yy196:
++YYCURSOR;
-#line 211 "../src/ast/lex.re"
+#line 204 "../src/ast/lex.re"
{
goto nextLine;
}
-#line 1170 "src/ast/lex.cc"
+#line 1168 "src/ast/lex.cc"
yy198:
++YYCURSOR;
YYCURSOR -= 1;
-#line 304 "../src/ast/lex.re"
+#line 297 "../src/ast/lex.re"
{
if (!opts->FFlag) {
yylval.str = new std::string (tok, tok_len());
return TOKEN_REGEXP;
}
}
-#line 1191 "src/ast/lex.cc"
+#line 1189 "src/ast/lex.cc"
yy200:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yy202:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 299 "../src/ast/lex.re"
+#line 292 "../src/ast/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
return TOKEN_ID;
}
-#line 1216 "src/ast/lex.cc"
+#line 1214 "src/ast/lex.cc"
yy204:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '>') goto yy221;
-#line 204 "../src/ast/lex.re"
+#line 197 "../src/ast/lex.re"
{
tok += 2; /* skip ":=" */
depth = 0;
code_line = cline;
goto code;
}
-#line 1227 "src/ast/lex.cc"
+#line 1225 "src/ast/lex.cc"
yy206:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
}
}
yy208:
-#line 230 "../src/ast/lex.re"
+#line 223 "../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 1254 "src/ast/lex.cc"
+#line 1252 "src/ast/lex.cc"
yy209:
++YYCURSOR;
-#line 228 "../src/ast/lex.re"
+#line 221 "../src/ast/lex.re"
{ yylval.regexp = lex_cls(true); return TOKEN_REGEXP; }
-#line 1259 "src/ast/lex.cc"
+#line 1257 "src/ast/lex.cc"
yy211:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '2') goto yy223;
yy212:
++YYCURSOR;
yy213:
-#line 272 "../src/ast/lex.re"
+#line 265 "../src/ast/lex.re"
{
fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers");
}
-#line 1271 "src/ast/lex.cc"
+#line 1269 "src/ast/lex.cc"
yy214:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yy219:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 286 "../src/ast/lex.re"
+#line 279 "../src/ast/lex.re"
{
yylval.str = new std::string (tok, tok_len ());
if (opts->FFlag)
return TOKEN_ID;
}
}
-#line 1337 "src/ast/lex.cc"
+#line 1335 "src/ast/lex.cc"
yy221:
++YYCURSOR;
YYCURSOR -= 2;
-#line 200 "../src/ast/lex.re"
+#line 193 "../src/ast/lex.re"
{
return *tok;
}
-#line 1345 "src/ast/lex.cc"
+#line 1343 "src/ast/lex.cc"
yy223:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'c') goto yy230;
goto yy213;
yy225:
++YYCURSOR;
-#line 241 "../src/ast/lex.re"
+#line 234 "../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 1368 "src/ast/lex.cc"
+#line 1366 "src/ast/lex.cc"
yy227:
++YYCURSOR;
-#line 276 "../src/ast/lex.re"
+#line 269 "../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 1379 "src/ast/lex.cc"
+#line 1377 "src/ast/lex.cc"
yy229:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'n') goto yy235;
goto yy189;
yy233:
++YYCURSOR;
-#line 263 "../src/ast/lex.re"
+#line 256 "../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 1407 "src/ast/lex.cc"
+#line 1405 "src/ast/lex.cc"
yy235:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == 'e') goto yy240;
goto yy189;
yy236:
++YYCURSOR;
-#line 284 "../src/ast/lex.re"
+#line 277 "../src/ast/lex.re"
{ lex_conf (); return TOKEN_CONF; }
-#line 1416 "src/ast/lex.cc"
+#line 1414 "src/ast/lex.cc"
yy238:
++YYCURSOR;
-#line 250 "../src/ast/lex.re"
+#line 243 "../src/ast/lex.re"
{
const char * p = strchr (tok, ',');
if (!s_to_u32_unsafe (tok + 1, p, yylval.bounds.min))
}
return TOKEN_CLOSESIZE;
}
-#line 1432 "src/ast/lex.cc"
+#line 1430 "src/ast/lex.cc"
yy240:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '0') goto yy242;
yy247:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 330 "../src/ast/lex.re"
+#line 323 "../src/ast/lex.re"
{
- set_sourceline ();
- goto scan;
- }
-#line 1493 "src/ast/lex.cc"
+ set_sourceline ();
+ return TOKEN_LINE_INFO;
+ }
+#line 1491 "src/ast/lex.cc"
yy249:
yych = (YYCTYPE)*++YYCURSOR;
if (yych == '\n') goto yy247;
if (yych == '\n') goto yy189;
goto yy250;
}
-#line 346 "../src/ast/lex.re"
-
-
-flex_name:
-
-#line 1523 "src/ast/lex.cc"
-{
- YYCTYPE yych;
- if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = (YYCTYPE)*YYCURSOR;
- if (yych == '\n') goto yy258;
- if (yych == '\r') goto yy260;
- ++YYCURSOR;
-yy257:
-#line 357 "../src/ast/lex.re"
- {
- YYCURSOR = tok;
- goto start;
- }
-#line 1537 "src/ast/lex.cc"
-yy258:
- ++YYCURSOR;
-#line 351 "../src/ast/lex.re"
- {
- YYCURSOR = tok;
- lexer_state = LEX_NORMAL;
- return TOKEN_FID_END;
- }
-#line 1546 "src/ast/lex.cc"
-yy260:
- yych = (YYCTYPE)*++YYCURSOR;
- if (yych == '\n') goto yy258;
- goto yy257;
-}
-#line 361 "../src/ast/lex.re"
+#line 344 "../src/ast/lex.re"
code:
-#line 1557 "src/ast/lex.cc"
+#line 1521 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
yych = (YYCTYPE)*YYCURSOR;
if (yych <= '&') {
if (yych <= '\n') {
- if (yych <= 0x00) goto yy263;
- if (yych <= '\t') goto yy265;
- goto yy267;
+ if (yych <= 0x00) goto yy256;
+ if (yych <= '\t') goto yy258;
+ goto yy260;
} else {
- if (yych == '"') goto yy269;
- goto yy265;
+ if (yych == '"') goto yy262;
+ goto yy258;
}
} else {
if (yych <= '{') {
- if (yych <= '\'') goto yy270;
- if (yych <= 'z') goto yy265;
- goto yy271;
+ if (yych <= '\'') goto yy263;
+ if (yych <= 'z') goto yy258;
+ goto yy264;
} else {
- if (yych == '}') goto yy273;
- goto yy265;
+ if (yych == '}') goto yy266;
+ goto yy258;
}
}
-yy263:
+yy256:
++YYCURSOR;
-#line 424 "../src/ast/lex.re"
+#line 407 "../src/ast/lex.re"
{
if (cur == eof)
{
}
goto code;
}
-#line 1630 "src/ast/lex.cc"
-yy265:
+#line 1594 "src/ast/lex.cc"
+yy258:
++YYCURSOR;
-yy266:
-#line 438 "../src/ast/lex.re"
+yy259:
+#line 421 "../src/ast/lex.re"
{
goto code;
}
-#line 1638 "src/ast/lex.cc"
-yy267:
+#line 1602 "src/ast/lex.cc"
+yy260:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '\r') {
if (yych <= '\t') {
- if (yych >= '\t') goto yy275;
+ if (yych >= '\t') goto yy268;
} else {
- if (yych <= '\n') goto yy277;
- if (yych >= '\r') goto yy277;
+ if (yych <= '\n') goto yy270;
+ if (yych >= '\r') goto yy270;
}
} else {
if (yych <= ' ') {
- if (yych >= ' ') goto yy275;
+ if (yych >= ' ') goto yy268;
} else {
- if (yych == '#') goto yy278;
+ if (yych == '#') goto yy271;
}
}
-yy268:
-#line 405 "../src/ast/lex.re"
+yy261:
+#line 388 "../src/ast/lex.re"
{
if (depth == 0)
{
cline++;
goto code;
}
-#line 1677 "src/ast/lex.cc"
-yy269:
+#line 1641 "src/ast/lex.cc"
+yy262:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
- if (yych == '\n') goto yy266;
- goto yy282;
-yy270:
+ if (yych == '\n') goto yy259;
+ goto yy275;
+yy263:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
- if (yych == '\n') goto yy266;
- goto yy287;
-yy271:
+ if (yych == '\n') goto yy259;
+ goto yy280;
+yy264:
++YYCURSOR;
-#line 377 "../src/ast/lex.re"
+#line 360 "../src/ast/lex.re"
{
if (depth == 0)
{
}
goto code;
}
-#line 1702 "src/ast/lex.cc"
-yy273:
+#line 1666 "src/ast/lex.cc"
+yy266:
++YYCURSOR;
-#line 365 "../src/ast/lex.re"
+#line 348 "../src/ast/lex.re"
{
if (depth == 0)
{
}
goto code;
}
-#line 1718 "src/ast/lex.cc"
-yy275:
+#line 1682 "src/ast/lex.cc"
+yy268:
yyaccept = 2;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy289;
+ if (yych == '\t') goto yy282;
} else {
- if (yych <= ' ') goto yy289;
- if (yych == '#') goto yy278;
+ if (yych <= ' ') goto yy282;
+ if (yych == '#') goto yy271;
}
-yy276:
+yy269:
YYCURSOR -= 1;
-#line 392 "../src/ast/lex.re"
+#line 375 "../src/ast/lex.re"
{
if (depth == 0)
{
cline++;
goto code;
}
-#line 1744 "src/ast/lex.cc"
-yy277:
+#line 1708 "src/ast/lex.cc"
+yy270:
++YYCURSOR;
- goto yy276;
-yy278:
+ goto yy269;
+yy271:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 16) {
- goto yy278;
+ goto yy271;
}
- if (yych == 'l') goto yy291;
-yy280:
+ if (yych == 'l') goto yy284;
+yy273:
YYCURSOR = YYMARKER;
if (yyaccept <= 1) {
if (yyaccept == 0) {
- goto yy268;
+ goto yy261;
} else {
- goto yy266;
+ goto yy259;
}
} else {
- goto yy276;
+ goto yy269;
}
-yy281:
+yy274:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
-yy282:
+yy275:
if (yybm[0+yych] & 32) {
- goto yy281;
+ goto yy274;
}
- if (yych <= '\n') goto yy280;
- if (yych >= '#') goto yy285;
-yy283:
+ if (yych <= '\n') goto yy273;
+ if (yych >= '#') goto yy278;
+yy276:
++YYCURSOR;
-#line 435 "../src/ast/lex.re"
+#line 418 "../src/ast/lex.re"
{
goto code;
}
-#line 1783 "src/ast/lex.cc"
-yy285:
+#line 1747 "src/ast/lex.cc"
+yy278:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
- if (yych == '\n') goto yy280;
- goto yy281;
-yy286:
+ if (yych == '\n') goto yy273;
+ goto yy274;
+yy279:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
-yy287:
+yy280:
if (yybm[0+yych] & 64) {
- goto yy286;
+ goto yy279;
}
- if (yych <= '\n') goto yy280;
- if (yych <= '\'') goto yy283;
+ if (yych <= '\n') goto yy273;
+ if (yych <= '\'') goto yy276;
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
- if (yych == '\n') goto yy280;
- goto yy286;
-yy289:
+ if (yych == '\n') goto yy273;
+ goto yy279;
+yy282:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
- if (yych == '\t') goto yy289;
- goto yy280;
+ if (yych == '\t') goto yy282;
+ goto yy273;
} else {
- if (yych <= ' ') goto yy289;
- if (yych == '#') goto yy278;
- goto yy280;
+ if (yych <= ' ') goto yy282;
+ if (yych == '#') goto yy271;
+ goto yy273;
}
-yy291:
+yy284:
yych = (YYCTYPE)*++YYCURSOR;
- if (yych != 'i') goto yy280;
+ if (yych != 'i') goto yy273;
yych = (YYCTYPE)*++YYCURSOR;
- if (yych != 'n') goto yy280;
+ if (yych != 'n') goto yy273;
yych = (YYCTYPE)*++YYCURSOR;
- if (yych != 'e') goto yy280;
+ if (yych != 'e') goto yy273;
yych = (YYCTYPE)*++YYCURSOR;
- if (yych <= '0') goto yy296;
- if (yych <= '9') goto yy280;
- goto yy296;
-yy295:
+ if (yych <= '0') goto yy289;
+ if (yych <= '9') goto yy273;
+ goto yy289;
+yy288:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
-yy296:
+yy289:
if (yych <= 0x1F) {
- if (yych == '\t') goto yy295;
- goto yy280;
+ if (yych == '\t') goto yy288;
+ goto yy273;
} else {
- if (yych <= ' ') goto yy295;
- if (yych <= '0') goto yy280;
- if (yych >= ':') goto yy280;
+ if (yych <= ' ') goto yy288;
+ if (yych <= '0') goto yy273;
+ if (yych >= ':') goto yy273;
YYCTXMARKER = YYCURSOR;
}
-yy297:
+yy290:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 128) {
- goto yy297;
+ goto yy290;
}
if (yych <= '\f') {
- if (yych <= 0x08) goto yy280;
- if (yych <= '\t') goto yy299;
- if (yych <= '\n') goto yy301;
- goto yy280;
+ if (yych <= 0x08) goto yy273;
+ if (yych <= '\t') goto yy292;
+ if (yych <= '\n') goto yy294;
+ goto yy273;
} else {
- if (yych <= '\r') goto yy303;
- if (yych != ' ') goto yy280;
+ if (yych <= '\r') goto yy296;
+ if (yych != ' ') goto yy273;
}
-yy299:
+yy292:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
- if (yych == '\t') goto yy299;
- goto yy280;
+ if (yych == '\t') goto yy292;
+ goto yy273;
} else {
- if (yych <= ' ') goto yy299;
- if (yych == '"') goto yy304;
- goto yy280;
+ if (yych <= ' ') goto yy292;
+ if (yych == '"') goto yy297;
+ goto yy273;
}
-yy301:
+yy294:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 388 "../src/ast/lex.re"
+#line 371 "../src/ast/lex.re"
{
set_sourceline ();
goto code;
}
-#line 1878 "src/ast/lex.cc"
-yy303:
+#line 1842 "src/ast/lex.cc"
+yy296:
yych = (YYCTYPE)*++YYCURSOR;
- if (yych == '\n') goto yy301;
- goto yy280;
-yy304:
+ if (yych == '\n') goto yy294;
+ goto yy273;
+yy297:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= '!') {
- if (yych == '\n') goto yy280;
- goto yy304;
+ if (yych == '\n') goto yy273;
+ goto yy297;
} else {
- if (yych <= '"') goto yy306;
- if (yych == '\\') goto yy307;
- goto yy304;
+ if (yych <= '"') goto yy299;
+ if (yych == '\\') goto yy300;
+ goto yy297;
}
-yy306:
+yy299:
yych = (YYCTYPE)*++YYCURSOR;
- if (yych == '\n') goto yy301;
- if (yych == '\r') goto yy303;
- goto yy280;
-yy307:
+ if (yych == '\n') goto yy294;
+ if (yych == '\r') goto yy296;
+ goto yy273;
+yy300:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
- if (yych == '\n') goto yy280;
- goto yy304;
+ if (yych == '\n') goto yy273;
+ goto yy297;
}
-#line 441 "../src/ast/lex.re"
+#line 424 "../src/ast/lex.re"
comment:
-#line 1912 "src/ast/lex.cc"
+#line 1876 "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 yy312;
+ if (yych == '\n') goto yy305;
} else {
- if (yych <= '*') goto yy314;
- if (yych == '/') goto yy315;
+ if (yych <= '*') goto yy307;
+ if (yych == '/') goto yy308;
}
++YYCURSOR;
-yy311:
-#line 473 "../src/ast/lex.re"
+yy304:
+#line 456 "../src/ast/lex.re"
{
if (cur == eof)
{
}
goto comment;
}
-#line 1967 "src/ast/lex.cc"
-yy312:
+#line 1931 "src/ast/lex.cc"
+yy305:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yybm[0+yych] & 32) {
- goto yy316;
+ goto yy309;
}
- if (yych == '#') goto yy319;
-yy313:
-#line 464 "../src/ast/lex.re"
+ if (yych == '#') goto yy312;
+yy306:
+#line 447 "../src/ast/lex.re"
{
if (cur == eof)
{
cline++;
goto comment;
}
-#line 1985 "src/ast/lex.cc"
-yy314:
+#line 1949 "src/ast/lex.cc"
+yy307:
yych = (YYCTYPE)*++YYCURSOR;
- if (yych == '/') goto yy321;
- goto yy311;
-yy315:
+ if (yych == '/') goto yy314;
+ goto yy304;
+yy308:
yych = (YYCTYPE)*++YYCURSOR;
- if (yych == '*') goto yy323;
- goto yy311;
-yy316:
+ if (yych == '*') goto yy316;
+ goto yy304;
+yy309:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 32) {
- goto yy316;
+ goto yy309;
}
- if (yych == '#') goto yy319;
-yy318:
+ if (yych == '#') goto yy312;
+yy311:
YYCURSOR = YYMARKER;
- goto yy313;
-yy319:
+ goto yy306;
+yy312:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
- if (yych == '\t') goto yy319;
- goto yy318;
+ if (yych == '\t') goto yy312;
+ goto yy311;
} else {
- if (yych <= ' ') goto yy319;
- if (yych == 'l') goto yy325;
- goto yy318;
+ if (yych <= ' ') goto yy312;
+ if (yych == 'l') goto yy318;
+ goto yy311;
}
-yy321:
+yy314:
++YYCURSOR;
-#line 445 "../src/ast/lex.re"
+#line 428 "../src/ast/lex.re"
{
if (--depth == 0)
{
goto comment;
}
}
-#line 2030 "src/ast/lex.cc"
-yy323:
+#line 1994 "src/ast/lex.cc"
+yy316:
++YYCURSOR;
-#line 455 "../src/ast/lex.re"
+#line 438 "../src/ast/lex.re"
{
++depth;
fatal("ambiguous /* found");
goto comment;
}
-#line 2039 "src/ast/lex.cc"
-yy325:
+#line 2003 "src/ast/lex.cc"
+yy318:
yych = (YYCTYPE)*++YYCURSOR;
- if (yych != 'i') goto yy318;
+ if (yych != 'i') goto yy311;
yych = (YYCTYPE)*++YYCURSOR;
- if (yych != 'n') goto yy318;
+ if (yych != 'n') goto yy311;
yych = (YYCTYPE)*++YYCURSOR;
- if (yych != 'e') goto yy318;
+ if (yych != 'e') goto yy311;
yych = (YYCTYPE)*++YYCURSOR;
- if (yych <= '0') goto yy330;
- if (yych <= '9') goto yy318;
- goto yy330;
-yy329:
+ if (yych <= '0') goto yy323;
+ if (yych <= '9') goto yy311;
+ goto yy323;
+yy322:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
-yy330:
+yy323:
if (yych <= 0x1F) {
- if (yych == '\t') goto yy329;
- goto yy318;
+ if (yych == '\t') goto yy322;
+ goto yy311;
} else {
- if (yych <= ' ') goto yy329;
- if (yych <= '0') goto yy318;
- if (yych >= ':') goto yy318;
+ if (yych <= ' ') goto yy322;
+ if (yych <= '0') goto yy311;
+ if (yych >= ':') goto yy311;
YYCTXMARKER = YYCURSOR;
}
-yy331:
+yy324:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 64) {
- goto yy331;
+ goto yy324;
}
if (yych <= '\f') {
- if (yych <= 0x08) goto yy318;
- if (yych <= '\t') goto yy333;
- if (yych <= '\n') goto yy335;
- goto yy318;
+ if (yych <= 0x08) goto yy311;
+ if (yych <= '\t') goto yy326;
+ if (yych <= '\n') goto yy328;
+ goto yy311;
} else {
- if (yych <= '\r') goto yy337;
- if (yych != ' ') goto yy318;
+ if (yych <= '\r') goto yy330;
+ if (yych != ' ') goto yy311;
}
-yy333:
+yy326:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yych <= 0x1F) {
- if (yych == '\t') goto yy333;
- goto yy318;
+ if (yych == '\t') goto yy326;
+ goto yy311;
} else {
- if (yych <= ' ') goto yy333;
- if (yych == '"') goto yy338;
- goto yy318;
+ if (yych <= ' ') goto yy326;
+ if (yych == '"') goto yy331;
+ goto yy311;
}
-yy335:
+yy328:
++YYCURSOR;
YYCURSOR = YYCTXMARKER;
-#line 460 "../src/ast/lex.re"
+#line 443 "../src/ast/lex.re"
{
set_sourceline ();
goto comment;
}
-#line 2101 "src/ast/lex.cc"
-yy337:
+#line 2065 "src/ast/lex.cc"
+yy330:
yych = (YYCTYPE)*++YYCURSOR;
- if (yych == '\n') goto yy335;
- goto yy318;
-yy338:
+ if (yych == '\n') goto yy328;
+ goto yy311;
+yy331:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 128) {
- goto yy338;
+ goto yy331;
}
- if (yych <= '\n') goto yy318;
- if (yych >= '#') goto yy341;
+ if (yych <= '\n') goto yy311;
+ if (yych >= '#') goto yy334;
yych = (YYCTYPE)*++YYCURSOR;
- if (yych == '\n') goto yy335;
- if (yych == '\r') goto yy337;
- goto yy318;
-yy341:
+ if (yych == '\n') goto yy328;
+ if (yych == '\r') goto yy330;
+ goto yy311;
+yy334:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
- if (yych == '\n') goto yy318;
- goto yy338;
+ if (yych == '\n') goto yy311;
+ goto yy331;
}
-#line 480 "../src/ast/lex.re"
+#line 463 "../src/ast/lex.re"
nextLine:
-#line 2131 "src/ast/lex.cc"
+#line 2095 "src/ast/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
- if (yych == '\n') goto yy346;
+ if (yych == '\n') goto yy339;
++YYCURSOR;
-#line 491 "../src/ast/lex.re"
+#line 474 "../src/ast/lex.re"
{ if(cur == eof) {
return 0;
}
goto nextLine;
}
-#line 2144 "src/ast/lex.cc"
-yy346:
+#line 2108 "src/ast/lex.cc"
+yy339:
++YYCURSOR;
-#line 484 "../src/ast/lex.re"
+#line 467 "../src/ast/lex.re"
{ if(cur == eof) {
return 0;
}
cline++;
goto scan;
}
-#line 2155 "src/ast/lex.cc"
+#line 2119 "src/ast/lex.cc"
}
-#line 496 "../src/ast/lex.re"
+#line 479 "../src/ast/lex.re"
}
tok = cur;
c = get_column();
-#line 2183 "src/ast/lex.cc"
+#line 2147 "src/ast/lex.cc"
{
YYCTYPE yych;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
- if (yych == ']') goto yy351;
-#line 522 "../src/ast/lex.re"
+ if (yych == ']') goto yy344;
+#line 505 "../src/ast/lex.re"
{ l = lex_cls_chr(); goto snd; }
-#line 2191 "src/ast/lex.cc"
-yy351:
+#line 2155 "src/ast/lex.cc"
+yy344:
++YYCURSOR;
-#line 521 "../src/ast/lex.re"
+#line 504 "../src/ast/lex.re"
{ return ast_cls(cline, c0, cls, neg); }
-#line 2196 "src/ast/lex.cc"
+#line 2160 "src/ast/lex.cc"
}
-#line 523 "../src/ast/lex.re"
+#line 506 "../src/ast/lex.re"
snd:
-#line 2202 "src/ast/lex.cc"
+#line 2166 "src/ast/lex.cc"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = (YYCTYPE)*(YYMARKER = YYCURSOR);
- if (yych == '-') goto yy356;
-yy355:
-#line 526 "../src/ast/lex.re"
+ if (yych == '-') goto yy349;
+yy348:
+#line 509 "../src/ast/lex.re"
{ u = l; goto add; }
-#line 2211 "src/ast/lex.cc"
-yy356:
+#line 2175 "src/ast/lex.cc"
+yy349:
yych = (YYCTYPE)*++YYCURSOR;
- if (yych != ']') goto yy358;
+ if (yych != ']') goto yy351;
YYCURSOR = YYMARKER;
- goto yy355;
-yy358:
+ goto yy348;
+yy351:
++YYCURSOR;
YYCURSOR -= 1;
-#line 527 "../src/ast/lex.re"
+#line 510 "../src/ast/lex.re"
{
u = lex_cls_chr();
if (l > u) {
}
goto add;
}
-#line 2229 "src/ast/lex.cc"
+#line 2193 "src/ast/lex.cc"
}
-#line 535 "../src/ast/lex.re"
+#line 518 "../src/ast/lex.re"
add:
cls->push_back(ASTRange(l, u, c));
{
tok = cur;
-#line 2242 "src/ast/lex.cc"
+#line 2206 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
yych = (YYCTYPE)*YYCURSOR;
- if (yych == '\n') goto yy364;
- if (yych == '\\') goto yy366;
+ if (yych == '\n') goto yy357;
+ if (yych == '\\') goto yy359;
++YYCURSOR;
-#line 550 "../src/ast/lex.re"
+#line 533 "../src/ast/lex.re"
{ return static_cast<uint8_t>(tok[0]); }
-#line 2253 "src/ast/lex.cc"
-yy364:
+#line 2217 "src/ast/lex.cc"
+yy357:
++YYCURSOR;
-#line 545 "../src/ast/lex.re"
+#line 528 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error"); }
-#line 2258 "src/ast/lex.cc"
-yy366:
+#line 2222 "src/ast/lex.cc"
+yy359:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '`') {
if (yych <= '7') {
if (yych <= ',') {
- if (yych != '\n') goto yy368;
+ if (yych != '\n') goto yy361;
} else {
- if (yych <= '-') goto yy370;
- if (yych <= '/') goto yy368;
- if (yych <= '3') goto yy372;
- goto yy374;
+ if (yych <= '-') goto yy363;
+ if (yych <= '/') goto yy361;
+ if (yych <= '3') goto yy365;
+ goto yy367;
}
} else {
if (yych <= 'X') {
- if (yych == 'U') goto yy375;
- if (yych <= 'W') goto yy368;
- goto yy377;
+ if (yych == 'U') goto yy368;
+ if (yych <= 'W') goto yy361;
+ goto yy370;
} else {
- if (yych <= '[') goto yy368;
- if (yych <= '\\') goto yy378;
- if (yych <= ']') goto yy380;
- goto yy368;
+ if (yych <= '[') goto yy361;
+ if (yych <= '\\') goto yy371;
+ if (yych <= ']') goto yy373;
+ goto yy361;
}
}
} else {
if (yych <= 'q') {
if (yych <= 'e') {
- if (yych <= 'a') goto yy382;
- if (yych <= 'b') goto yy384;
- goto yy368;
+ if (yych <= 'a') goto yy375;
+ if (yych <= 'b') goto yy377;
+ goto yy361;
} else {
- if (yych <= 'f') goto yy386;
- if (yych == 'n') goto yy388;
- goto yy368;
+ if (yych <= 'f') goto yy379;
+ if (yych == 'n') goto yy381;
+ goto yy361;
}
} else {
if (yych <= 'u') {
- if (yych <= 'r') goto yy390;
- if (yych <= 's') goto yy368;
- if (yych <= 't') goto yy392;
- goto yy377;
+ if (yych <= 'r') goto yy383;
+ if (yych <= 's') goto yy361;
+ if (yych <= 't') goto yy385;
+ goto yy370;
} else {
- if (yych <= 'v') goto yy394;
- if (yych == 'x') goto yy396;
- goto yy368;
+ if (yych <= 'v') goto yy387;
+ if (yych == 'x') goto yy389;
+ goto yy361;
}
}
}
-#line 548 "../src/ast/lex.re"
+#line 531 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in escape sequence"); }
-#line 2309 "src/ast/lex.cc"
-yy368:
+#line 2273 "src/ast/lex.cc"
+yy361:
++YYCURSOR;
-#line 563 "../src/ast/lex.re"
+#line 546 "../src/ast/lex.re"
{
warn.useless_escape(cline, get_column(), tok[1]);
return static_cast<uint8_t>(tok[1]);
}
-#line 2317 "src/ast/lex.cc"
-yy370:
+#line 2281 "src/ast/lex.cc"
+yy363:
++YYCURSOR;
-#line 561 "../src/ast/lex.re"
+#line 544 "../src/ast/lex.re"
{ return static_cast<uint8_t>('-'); }
-#line 2322 "src/ast/lex.cc"
-yy372:
+#line 2286 "src/ast/lex.cc"
+yy365:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
- if (yych <= '/') goto yy373;
- if (yych <= '7') goto yy397;
-yy373:
-#line 547 "../src/ast/lex.re"
+ if (yych <= '/') goto yy366;
+ if (yych <= '7') goto yy390;
+yy366:
+#line 530 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in octal escape sequence"); }
-#line 2331 "src/ast/lex.cc"
-yy374:
+#line 2295 "src/ast/lex.cc"
+yy367:
++YYCURSOR;
- goto yy373;
-yy375:
+ goto yy366;
+yy368:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy376;
- if (yych <= '9') goto yy399;
+ if (yych <= '/') goto yy369;
+ if (yych <= '9') goto yy392;
} else {
- if (yych <= 'F') goto yy399;
- if (yych <= '`') goto yy376;
- if (yych <= 'f') goto yy399;
+ if (yych <= 'F') goto yy392;
+ if (yych <= '`') goto yy369;
+ if (yych <= 'f') goto yy392;
}
-yy376:
-#line 546 "../src/ast/lex.re"
+yy369:
+#line 529 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in hexadecimal escape sequence"); }
-#line 2349 "src/ast/lex.cc"
-yy377:
+#line 2313 "src/ast/lex.cc"
+yy370:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy376;
- if (yych <= '9') goto yy400;
- goto yy376;
+ if (yych <= '/') goto yy369;
+ if (yych <= '9') goto yy393;
+ goto yy369;
} else {
- if (yych <= 'F') goto yy400;
- if (yych <= '`') goto yy376;
- if (yych <= 'f') goto yy400;
- goto yy376;
+ if (yych <= 'F') goto yy393;
+ if (yych <= '`') goto yy369;
+ if (yych <= 'f') goto yy393;
+ goto yy369;
}
-yy378:
+yy371:
++YYCURSOR;
-#line 560 "../src/ast/lex.re"
+#line 543 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2367 "src/ast/lex.cc"
-yy380:
+#line 2331 "src/ast/lex.cc"
+yy373:
++YYCURSOR;
-#line 562 "../src/ast/lex.re"
+#line 545 "../src/ast/lex.re"
{ return static_cast<uint8_t>(']'); }
-#line 2372 "src/ast/lex.cc"
-yy382:
+#line 2336 "src/ast/lex.cc"
+yy375:
++YYCURSOR;
-#line 553 "../src/ast/lex.re"
+#line 536 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2377 "src/ast/lex.cc"
-yy384:
+#line 2341 "src/ast/lex.cc"
+yy377:
++YYCURSOR;
-#line 554 "../src/ast/lex.re"
+#line 537 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2382 "src/ast/lex.cc"
-yy386:
+#line 2346 "src/ast/lex.cc"
+yy379:
++YYCURSOR;
-#line 555 "../src/ast/lex.re"
+#line 538 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2387 "src/ast/lex.cc"
-yy388:
+#line 2351 "src/ast/lex.cc"
+yy381:
++YYCURSOR;
-#line 556 "../src/ast/lex.re"
+#line 539 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2392 "src/ast/lex.cc"
-yy390:
+#line 2356 "src/ast/lex.cc"
+yy383:
++YYCURSOR;
-#line 557 "../src/ast/lex.re"
+#line 540 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2397 "src/ast/lex.cc"
-yy392:
+#line 2361 "src/ast/lex.cc"
+yy385:
++YYCURSOR;
-#line 558 "../src/ast/lex.re"
+#line 541 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2402 "src/ast/lex.cc"
-yy394:
+#line 2366 "src/ast/lex.cc"
+yy387:
++YYCURSOR;
-#line 559 "../src/ast/lex.re"
+#line 542 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2407 "src/ast/lex.cc"
-yy396:
+#line 2371 "src/ast/lex.cc"
+yy389:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy376;
- if (yych <= '9') goto yy401;
- goto yy376;
+ if (yych <= '/') goto yy369;
+ if (yych <= '9') goto yy394;
+ goto yy369;
} else {
- if (yych <= 'F') goto yy401;
- if (yych <= '`') goto yy376;
- if (yych <= 'f') goto yy401;
- goto yy376;
+ if (yych <= 'F') goto yy394;
+ if (yych <= '`') goto yy369;
+ if (yych <= 'f') goto yy394;
+ goto yy369;
}
-yy397:
+yy390:
yych = (YYCTYPE)*++YYCURSOR;
- if (yych <= '/') goto yy398;
- if (yych <= '7') goto yy402;
-yy398:
+ if (yych <= '/') goto yy391;
+ if (yych <= '7') goto yy395;
+yy391:
YYCURSOR = YYMARKER;
if (yyaccept == 0) {
- goto yy373;
+ goto yy366;
} else {
- goto yy376;
+ goto yy369;
}
-yy399:
+yy392:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy398;
- if (yych <= '9') goto yy404;
- goto yy398;
+ if (yych <= '/') goto yy391;
+ if (yych <= '9') goto yy397;
+ goto yy391;
} else {
- if (yych <= 'F') goto yy404;
- if (yych <= '`') goto yy398;
- if (yych <= 'f') goto yy404;
- goto yy398;
+ if (yych <= 'F') goto yy397;
+ if (yych <= '`') goto yy391;
+ if (yych <= 'f') goto yy397;
+ goto yy391;
}
-yy400:
+yy393:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy398;
- if (yych <= '9') goto yy405;
- goto yy398;
+ if (yych <= '/') goto yy391;
+ if (yych <= '9') goto yy398;
+ goto yy391;
} else {
- if (yych <= 'F') goto yy405;
- if (yych <= '`') goto yy398;
- if (yych <= 'f') goto yy405;
- goto yy398;
+ if (yych <= 'F') goto yy398;
+ if (yych <= '`') goto yy391;
+ if (yych <= 'f') goto yy398;
+ goto yy391;
}
-yy401:
+yy394:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy398;
- if (yych <= '9') goto yy406;
- goto yy398;
+ if (yych <= '/') goto yy391;
+ if (yych <= '9') goto yy399;
+ goto yy391;
} else {
- if (yych <= 'F') goto yy406;
- if (yych <= '`') goto yy398;
- if (yych <= 'f') goto yy406;
- goto yy398;
+ if (yych <= 'F') goto yy399;
+ if (yych <= '`') goto yy391;
+ if (yych <= 'f') goto yy399;
+ goto yy391;
}
-yy402:
+yy395:
++YYCURSOR;
-#line 552 "../src/ast/lex.re"
+#line 535 "../src/ast/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2472 "src/ast/lex.cc"
-yy404:
+#line 2436 "src/ast/lex.cc"
+yy397:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy398;
- if (yych <= '9') goto yy408;
- goto yy398;
+ if (yych <= '/') goto yy391;
+ if (yych <= '9') goto yy401;
+ goto yy391;
} else {
- if (yych <= 'F') goto yy408;
- if (yych <= '`') goto yy398;
- if (yych <= 'f') goto yy408;
- goto yy398;
+ if (yych <= 'F') goto yy401;
+ if (yych <= '`') goto yy391;
+ if (yych <= 'f') goto yy401;
+ goto yy391;
}
-yy405:
+yy398:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy398;
- if (yych <= '9') goto yy401;
- goto yy398;
+ if (yych <= '/') goto yy391;
+ if (yych <= '9') goto yy394;
+ goto yy391;
} else {
- if (yych <= 'F') goto yy401;
- if (yych <= '`') goto yy398;
- if (yych <= 'f') goto yy401;
- goto yy398;
+ if (yych <= 'F') goto yy394;
+ if (yych <= '`') goto yy391;
+ if (yych <= 'f') goto yy394;
+ goto yy391;
}
-yy406:
+yy399:
++YYCURSOR;
-#line 551 "../src/ast/lex.re"
+#line 534 "../src/ast/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2501 "src/ast/lex.cc"
-yy408:
+#line 2465 "src/ast/lex.cc"
+yy401:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy398;
- if (yych >= ':') goto yy398;
+ if (yych <= '/') goto yy391;
+ if (yych >= ':') goto yy391;
} else {
- if (yych <= 'F') goto yy409;
- if (yych <= '`') goto yy398;
- if (yych >= 'g') goto yy398;
+ if (yych <= 'F') goto yy402;
+ if (yych <= '`') goto yy391;
+ if (yych >= 'g') goto yy391;
}
-yy409:
+yy402:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy398;
- if (yych <= '9') goto yy400;
- goto yy398;
+ if (yych <= '/') goto yy391;
+ if (yych <= '9') goto yy393;
+ goto yy391;
} else {
- if (yych <= 'F') goto yy400;
- if (yych <= '`') goto yy398;
- if (yych <= 'f') goto yy400;
- goto yy398;
+ if (yych <= 'F') goto yy393;
+ if (yych <= '`') goto yy391;
+ if (yych <= 'f') goto yy393;
+ goto yy391;
}
}
-#line 567 "../src/ast/lex.re"
+#line 550 "../src/ast/lex.re"
}
end = false;
tok = cur;
-#line 2534 "src/ast/lex.cc"
+#line 2498 "src/ast/lex.cc"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if ((YYLIMIT - YYCURSOR) < 10) YYFILL(10);
yych = (YYCTYPE)*YYCURSOR;
- if (yych == '\n') goto yy414;
- if (yych == '\\') goto yy416;
+ if (yych == '\n') goto yy407;
+ if (yych == '\\') goto yy409;
++YYCURSOR;
-#line 580 "../src/ast/lex.re"
+#line 563 "../src/ast/lex.re"
{
end = tok[0] == quote;
return static_cast<uint8_t>(tok[0]);
}
-#line 2548 "src/ast/lex.cc"
-yy414:
+#line 2512 "src/ast/lex.cc"
+yy407:
++YYCURSOR;
-#line 575 "../src/ast/lex.re"
+#line 558 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error"); }
-#line 2553 "src/ast/lex.cc"
-yy416:
+#line 2517 "src/ast/lex.cc"
+yy409:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= 'a') {
if (yych <= 'T') {
if (yych <= '/') {
- if (yych != '\n') goto yy418;
+ if (yych != '\n') goto yy411;
} else {
- if (yych <= '3') goto yy420;
- if (yych <= '7') goto yy422;
- goto yy418;
+ if (yych <= '3') goto yy413;
+ if (yych <= '7') goto yy415;
+ goto yy411;
}
} else {
if (yych <= 'X') {
- if (yych <= 'U') goto yy423;
- if (yych <= 'W') goto yy418;
- goto yy425;
+ if (yych <= 'U') goto yy416;
+ if (yych <= 'W') goto yy411;
+ goto yy418;
} else {
- if (yych == '\\') goto yy426;
- if (yych <= '`') goto yy418;
- goto yy428;
+ if (yych == '\\') goto yy419;
+ if (yych <= '`') goto yy411;
+ goto yy421;
}
}
} else {
if (yych <= 'r') {
if (yych <= 'f') {
- if (yych <= 'b') goto yy430;
- if (yych <= 'e') goto yy418;
- goto yy432;
+ if (yych <= 'b') goto yy423;
+ if (yych <= 'e') goto yy411;
+ goto yy425;
} else {
- if (yych == 'n') goto yy434;
- if (yych <= 'q') goto yy418;
- goto yy436;
+ if (yych == 'n') goto yy427;
+ if (yych <= 'q') goto yy411;
+ goto yy429;
}
} else {
if (yych <= 'u') {
- if (yych <= 's') goto yy418;
- if (yych <= 't') goto yy438;
- goto yy425;
- } else {
- if (yych <= 'v') goto yy440;
- if (yych == 'x') goto yy442;
+ if (yych <= 's') goto yy411;
+ if (yych <= 't') goto yy431;
goto yy418;
+ } else {
+ if (yych <= 'v') goto yy433;
+ if (yych == 'x') goto yy435;
+ goto yy411;
}
}
}
-#line 578 "../src/ast/lex.re"
+#line 561 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in escape sequence"); }
-#line 2601 "src/ast/lex.cc"
-yy418:
+#line 2565 "src/ast/lex.cc"
+yy411:
++YYCURSOR;
-#line 594 "../src/ast/lex.re"
+#line 577 "../src/ast/lex.re"
{
if (tok[1] != quote) {
warn.useless_escape(cline, get_column(), tok[1]);
}
return static_cast<uint8_t>(tok[1]);
}
-#line 2611 "src/ast/lex.cc"
-yy420:
+#line 2575 "src/ast/lex.cc"
+yy413:
yyaccept = 0;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
- if (yych <= '/') goto yy421;
- if (yych <= '7') goto yy443;
-yy421:
-#line 577 "../src/ast/lex.re"
+ if (yych <= '/') goto yy414;
+ if (yych <= '7') goto yy436;
+yy414:
+#line 560 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in octal escape sequence"); }
-#line 2620 "src/ast/lex.cc"
-yy422:
+#line 2584 "src/ast/lex.cc"
+yy415:
++YYCURSOR;
- goto yy421;
-yy423:
+ goto yy414;
+yy416:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy424;
- if (yych <= '9') goto yy445;
+ if (yych <= '/') goto yy417;
+ if (yych <= '9') goto yy438;
} else {
- if (yych <= 'F') goto yy445;
- if (yych <= '`') goto yy424;
- if (yych <= 'f') goto yy445;
+ if (yych <= 'F') goto yy438;
+ if (yych <= '`') goto yy417;
+ if (yych <= 'f') goto yy438;
}
-yy424:
-#line 576 "../src/ast/lex.re"
+yy417:
+#line 559 "../src/ast/lex.re"
{ fatal (get_column() - tchar, "syntax error in hexadecimal escape sequence"); }
-#line 2638 "src/ast/lex.cc"
-yy425:
+#line 2602 "src/ast/lex.cc"
+yy418:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy424;
- if (yych <= '9') goto yy446;
- goto yy424;
+ if (yych <= '/') goto yy417;
+ if (yych <= '9') goto yy439;
+ goto yy417;
} else {
- if (yych <= 'F') goto yy446;
- if (yych <= '`') goto yy424;
- if (yych <= 'f') goto yy446;
- goto yy424;
+ if (yych <= 'F') goto yy439;
+ if (yych <= '`') goto yy417;
+ if (yych <= 'f') goto yy439;
+ goto yy417;
}
-yy426:
+yy419:
++YYCURSOR;
-#line 593 "../src/ast/lex.re"
+#line 576 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\\'); }
-#line 2656 "src/ast/lex.cc"
-yy428:
+#line 2620 "src/ast/lex.cc"
+yy421:
++YYCURSOR;
-#line 586 "../src/ast/lex.re"
+#line 569 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\a'); }
-#line 2661 "src/ast/lex.cc"
-yy430:
+#line 2625 "src/ast/lex.cc"
+yy423:
++YYCURSOR;
-#line 587 "../src/ast/lex.re"
+#line 570 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\b'); }
-#line 2666 "src/ast/lex.cc"
-yy432:
+#line 2630 "src/ast/lex.cc"
+yy425:
++YYCURSOR;
-#line 588 "../src/ast/lex.re"
+#line 571 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\f'); }
-#line 2671 "src/ast/lex.cc"
-yy434:
+#line 2635 "src/ast/lex.cc"
+yy427:
++YYCURSOR;
-#line 589 "../src/ast/lex.re"
+#line 572 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\n'); }
-#line 2676 "src/ast/lex.cc"
-yy436:
+#line 2640 "src/ast/lex.cc"
+yy429:
++YYCURSOR;
-#line 590 "../src/ast/lex.re"
+#line 573 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\r'); }
-#line 2681 "src/ast/lex.cc"
-yy438:
+#line 2645 "src/ast/lex.cc"
+yy431:
++YYCURSOR;
-#line 591 "../src/ast/lex.re"
+#line 574 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\t'); }
-#line 2686 "src/ast/lex.cc"
-yy440:
+#line 2650 "src/ast/lex.cc"
+yy433:
++YYCURSOR;
-#line 592 "../src/ast/lex.re"
+#line 575 "../src/ast/lex.re"
{ return static_cast<uint8_t>('\v'); }
-#line 2691 "src/ast/lex.cc"
-yy442:
+#line 2655 "src/ast/lex.cc"
+yy435:
yyaccept = 1;
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
- if (yych <= '/') goto yy424;
- if (yych <= '9') goto yy447;
- goto yy424;
+ if (yych <= '/') goto yy417;
+ if (yych <= '9') goto yy440;
+ goto yy417;
} else {
- if (yych <= 'F') goto yy447;
- if (yych <= '`') goto yy424;
- if (yych <= 'f') goto yy447;
- goto yy424;
+ if (yych <= 'F') goto yy440;
+ if (yych <= '`') goto yy417;
+ if (yych <= 'f') goto yy440;
+ goto yy417;
}
-yy443:
+yy436:
yych = (YYCTYPE)*++YYCURSOR;
- if (yych <= '/') goto yy444;
- if (yych <= '7') goto yy448;
-yy444:
+ if (yych <= '/') goto yy437;
+ if (yych <= '7') goto yy441;
+yy437:
YYCURSOR = YYMARKER;
if (yyaccept == 0) {
- goto yy421;
+ goto yy414;
} else {
- goto yy424;
+ goto yy417;
}
-yy445:
+yy438:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy444;
- if (yych <= '9') goto yy450;
- goto yy444;
+ if (yych <= '/') goto yy437;
+ if (yych <= '9') goto yy443;
+ goto yy437;
} else {
- if (yych <= 'F') goto yy450;
- if (yych <= '`') goto yy444;
- if (yych <= 'f') goto yy450;
- goto yy444;
+ if (yych <= 'F') goto yy443;
+ if (yych <= '`') goto yy437;
+ if (yych <= 'f') goto yy443;
+ goto yy437;
}
-yy446:
+yy439:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy444;
- if (yych <= '9') goto yy451;
- goto yy444;
+ if (yych <= '/') goto yy437;
+ if (yych <= '9') goto yy444;
+ goto yy437;
} else {
- if (yych <= 'F') goto yy451;
- if (yych <= '`') goto yy444;
- if (yych <= 'f') goto yy451;
- goto yy444;
+ if (yych <= 'F') goto yy444;
+ if (yych <= '`') goto yy437;
+ if (yych <= 'f') goto yy444;
+ goto yy437;
}
-yy447:
+yy440:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy444;
- if (yych <= '9') goto yy452;
- goto yy444;
+ if (yych <= '/') goto yy437;
+ if (yych <= '9') goto yy445;
+ goto yy437;
} else {
- if (yych <= 'F') goto yy452;
- if (yych <= '`') goto yy444;
- if (yych <= 'f') goto yy452;
- goto yy444;
+ if (yych <= 'F') goto yy445;
+ if (yych <= '`') goto yy437;
+ if (yych <= 'f') goto yy445;
+ goto yy437;
}
-yy448:
+yy441:
++YYCURSOR;
-#line 585 "../src/ast/lex.re"
+#line 568 "../src/ast/lex.re"
{ return unesc_oct(tok, cur); }
-#line 2756 "src/ast/lex.cc"
-yy450:
+#line 2720 "src/ast/lex.cc"
+yy443:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy444;
- if (yych <= '9') goto yy454;
- goto yy444;
+ if (yych <= '/') goto yy437;
+ if (yych <= '9') goto yy447;
+ goto yy437;
} else {
- if (yych <= 'F') goto yy454;
- if (yych <= '`') goto yy444;
- if (yych <= 'f') goto yy454;
- goto yy444;
+ if (yych <= 'F') goto yy447;
+ if (yych <= '`') goto yy437;
+ if (yych <= 'f') goto yy447;
+ goto yy437;
}
-yy451:
+yy444:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy444;
- if (yych <= '9') goto yy447;
- goto yy444;
+ if (yych <= '/') goto yy437;
+ if (yych <= '9') goto yy440;
+ goto yy437;
} else {
- if (yych <= 'F') goto yy447;
- if (yych <= '`') goto yy444;
- if (yych <= 'f') goto yy447;
- goto yy444;
+ if (yych <= 'F') goto yy440;
+ if (yych <= '`') goto yy437;
+ if (yych <= 'f') goto yy440;
+ goto yy437;
}
-yy452:
+yy445:
++YYCURSOR;
-#line 584 "../src/ast/lex.re"
+#line 567 "../src/ast/lex.re"
{ return unesc_hex(tok, cur); }
-#line 2785 "src/ast/lex.cc"
-yy454:
+#line 2749 "src/ast/lex.cc"
+yy447:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy444;
- if (yych >= ':') goto yy444;
+ if (yych <= '/') goto yy437;
+ if (yych >= ':') goto yy437;
} else {
- if (yych <= 'F') goto yy455;
- if (yych <= '`') goto yy444;
- if (yych >= 'g') goto yy444;
+ if (yych <= 'F') goto yy448;
+ if (yych <= '`') goto yy437;
+ if (yych >= 'g') goto yy437;
}
-yy455:
+yy448:
yych = (YYCTYPE)*++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy444;
- if (yych <= '9') goto yy446;
- goto yy444;
+ if (yych <= '/') goto yy437;
+ if (yych <= '9') goto yy439;
+ goto yy437;
} else {
- if (yych <= 'F') goto yy446;
- if (yych <= '`') goto yy444;
- if (yych <= 'f') goto yy446;
- goto yy444;
+ if (yych <= 'F') goto yy439;
+ if (yych <= '`') goto yy437;
+ if (yych <= 'f') goto yy439;
+ goto yy437;
}
}
-#line 600 "../src/ast/lex.re"
+#line 583 "../src/ast/lex.re"
}
sourceline:
tok = cur;
-#line 2829 "src/ast/lex.cc"
+#line 2793 "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 yy460;
+ if (yych == '\n') goto yy453;
} else {
- if (yych <= '"') goto yy462;
- if (yych <= '0') goto yy458;
- if (yych <= '9') goto yy463;
+ if (yych <= '"') goto yy455;
+ if (yych <= '0') goto yy451;
+ if (yych <= '9') goto yy456;
}
-yy458:
+yy451:
++YYCURSOR;
-yy459:
-#line 642 "../src/ast/lex.re"
+yy452:
+#line 625 "../src/ast/lex.re"
{
goto sourceline;
}
-#line 2882 "src/ast/lex.cc"
-yy460:
+#line 2846 "src/ast/lex.cc"
+yy453:
++YYCURSOR;
-#line 630 "../src/ast/lex.re"
+#line 613 "../src/ast/lex.re"
{
if (cur == eof)
{
tok = cur;
return;
}
-#line 2898 "src/ast/lex.cc"
-yy462:
+#line 2862 "src/ast/lex.cc"
+yy455:
yych = (YYCTYPE)*(YYMARKER = ++YYCURSOR);
- if (yych == '\n') goto yy459;
- goto yy467;
-yy463:
+ if (yych == '\n') goto yy452;
+ goto yy460;
+yy456:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
if (yybm[0+yych] & 64) {
- goto yy463;
+ goto yy456;
}
-#line 619 "../src/ast/lex.re"
+#line 602 "../src/ast/lex.re"
{
if (!s_to_u32_unsafe (tok, cur, cline))
{
}
goto sourceline;
}
-#line 2918 "src/ast/lex.cc"
-yy466:
+#line 2882 "src/ast/lex.cc"
+yy459:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
-yy467:
+yy460:
if (yybm[0+yych] & 128) {
- goto yy466;
+ goto yy459;
}
- if (yych <= '\n') goto yy468;
- if (yych <= '"') goto yy469;
- goto yy471;
-yy468:
+ if (yych <= '\n') goto yy461;
+ if (yych <= '"') goto yy462;
+ goto yy464;
+yy461:
YYCURSOR = YYMARKER;
- goto yy459;
-yy469:
+ goto yy452;
+yy462:
++YYCURSOR;
-#line 626 "../src/ast/lex.re"
+#line 609 "../src/ast/lex.re"
{
escape (in.file_name, std::string (tok + 1, tok_len () - 2)); // -2 to omit quotes
goto sourceline;
}
-#line 2940 "src/ast/lex.cc"
-yy471:
+#line 2904 "src/ast/lex.cc"
+yy464:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = (YYCTYPE)*YYCURSOR;
- if (yych == '\n') goto yy468;
- goto yy466;
+ if (yych == '\n') goto yy461;
+ goto yy459;
}
-#line 645 "../src/ast/lex.re"
+#line 628 "../src/ast/lex.re"
}
TOKEN_ID = 261,
TOKEN_FID = 262,
TOKEN_FID_END = 263,
- TOKEN_REGEXP = 264
+ TOKEN_LINE_INFO = 264,
+ TOKEN_REGEXP = 265
};
#endif
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 67
+#define YYLAST 68
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 25
+#define YYNTOKENS 26
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 18
/* YYNRULES -- Number of rules. */
-#define YYNRULES 44
+#define YYNRULES 45
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 71
+#define YYNSTATES 72
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 264
+#define YYMAXUTOK 265
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 16, 2, 2, 2, 2, 2, 2,
- 23, 24, 13, 21, 18, 2, 2, 10, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 17, 12,
- 14, 11, 15, 22, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 17, 2, 2, 2, 2, 2, 2,
+ 24, 25, 14, 22, 19, 2, 2, 11, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 18, 13,
+ 15, 12, 16, 23, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 20, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 21, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 19, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 20, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
- 5, 6, 7, 8, 9
+ 5, 6, 7, 8, 9, 10
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 219, 219, 221, 222, 223, 227, 234, 239, 242,
- 246, 246, 249, 253, 257, 264, 271, 278, 284, 286,
- 292, 299, 300, 306, 312, 319, 320, 325, 333, 337,
- 344, 348, 355, 359, 366, 367, 373, 378, 379, 383,
- 384, 385, 389, 390, 400
+ 0, 220, 220, 222, 223, 224, 225, 229, 236, 241,
+ 244, 248, 248, 251, 255, 259, 266, 273, 280, 286,
+ 288, 294, 301, 302, 308, 314, 321, 322, 327, 335,
+ 339, 346, 350, 357, 361, 368, 369, 375, 380, 381,
+ 385, 386, 387, 391, 392, 402
};
#endif
static const char *const yytname[] =
{
"$end", "error", "$undefined", "TOKEN_CLOSESIZE", "TOKEN_CODE",
- "TOKEN_CONF", "TOKEN_ID", "TOKEN_FID", "TOKEN_FID_END", "TOKEN_REGEXP",
- "'/'", "'='", "';'", "'*'", "'<'", "'>'", "'!'", "':'", "','", "'|'",
- "'\\\\'", "'+'", "'?'", "'('", "')'", "$accept", "spec", "def", "name",
- "enddef", "rule", "ccode", "clist", "conds", "trailexpr", "capexpr",
- "expr", "diff", "term", "factor", "closes", "close", "primary", YY_NULLPTR
+ "TOKEN_CONF", "TOKEN_ID", "TOKEN_FID", "TOKEN_FID_END",
+ "TOKEN_LINE_INFO", "TOKEN_REGEXP", "'/'", "'='", "';'", "'*'", "'<'",
+ "'>'", "'!'", "':'", "','", "'|'", "'\\\\'", "'+'", "'?'", "'('", "')'",
+ "$accept", "spec", "def", "name", "enddef", "rule", "ccode", "clist",
+ "conds", "trailexpr", "capexpr", "expr", "diff", "term", "factor",
+ "closes", "close", "primary", YY_NULLPTR
};
#endif
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 47, 61, 59, 42, 60, 62, 33, 58, 44, 124,
- 92, 43, 63, 40, 41
+ 265, 47, 61, 59, 42, 60, 62, 33, 58, 44,
+ 124, 92, 43, 63, 40, 41
};
# endif
-#define YYPACT_NINF -20
+#define YYPACT_NINF -19
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-20)))
+ (!!((Yystate) == (-19)))
#define YYTABLE_NINF -1
STATE-NUM. */
static const yytype_int8 yypact[] =
{
- -20, 1, -20, -20, -6, -20, -20, 15, 22, 11,
- -20, 11, -20, 40, 35, 27, 31, 11, -20, 0,
- -20, -20, -20, -20, 19, 5, 32, 30, -20, 8,
- 21, -20, 11, 11, 11, -20, -20, -20, -20, -20,
- 28, -20, -20, 37, 42, -20, 39, 3, 49, -20,
- -20, -20, -20, -20, 27, 31, 11, -20, 50, 43,
- 53, 19, 19, -20, 55, 54, -20, -20, -20, -20,
- -20
+ -19, 1, -19, -19, -3, -19, -19, -19, 27, 30,
+ 8, -19, 8, -19, 34, 6, 21, 24, 8, -19,
+ -1, -19, -19, -19, -19, 16, -2, 36, 35, -19,
+ 4, 22, -19, 8, 8, 8, -19, -19, -19, -19,
+ -19, 26, -19, -19, 37, 31, -19, 39, 13, 50,
+ -19, -19, -19, -19, -19, 21, 24, 8, -19, 51,
+ 42, 55, 16, 16, -19, 56, 57, -19, -19, -19,
+ -19, -19
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 2, 0, 1, 3, 43, 9, 42, 0, 0, 0,
- 4, 0, 5, 0, 25, 27, 28, 30, 32, 34,
- 8, 13, 23, 22, 0, 0, 0, 21, 43, 0,
- 0, 12, 0, 0, 0, 33, 36, 39, 40, 41,
- 35, 37, 18, 0, 0, 17, 0, 0, 0, 44,
- 11, 7, 10, 6, 26, 29, 31, 38, 0, 0,
- 0, 0, 0, 24, 0, 0, 16, 15, 14, 19,
- 20
+ 2, 0, 1, 3, 44, 10, 6, 43, 0, 0,
+ 0, 4, 0, 5, 0, 26, 28, 29, 31, 33,
+ 35, 9, 14, 24, 23, 0, 0, 0, 22, 44,
+ 0, 0, 13, 0, 0, 0, 34, 37, 40, 41,
+ 42, 36, 38, 19, 0, 0, 18, 0, 0, 0,
+ 45, 12, 8, 11, 7, 27, 30, 32, 39, 0,
+ 0, 0, 0, 0, 25, 0, 0, 17, 16, 15,
+ 20, 21
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -20, -20, -20, -20, -20, -20, -19, 36, -20, 16,
- -20, -7, 29, 33, -17, -20, 24, -20
+ -19, -19, -19, -19, -19, -19, -12, 38, -19, 14,
+ -19, -7, 32, 33, -18, -19, 20, -19
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 1, 10, 11, 53, 12, 45, 26, 27, 13,
- 14, 15, 16, 17, 18, 40, 41, 19
+ -1, 1, 11, 12, 54, 13, 46, 27, 28, 14,
+ 15, 16, 17, 18, 19, 41, 42, 20
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
- 35, 2, 29, 36, 30, 20, 3, 4, 5, 28,
- 6, 22, 6, 37, 7, 8, 61, 28, 23, 21,
- 6, 38, 39, 42, 9, 54, 9, 33, 22, 50,
- 43, 51, 49, 52, 9, 23, 44, 24, 25, 35,
- 33, 37, 67, 68, 31, 32, 33, 47, 48, 38,
- 39, 34, 58, 59, 60, 63, 64, 66, 65, 69,
- 70, 46, 55, 62, 57, 0, 0, 56
+ 36, 2, 37, 30, 23, 31, 3, 4, 5, 21,
+ 6, 7, 24, 38, 29, 8, 9, 33, 7, 29,
+ 43, 39, 40, 7, 34, 10, 55, 62, 44, 50,
+ 51, 22, 10, 52, 45, 53, 23, 10, 32, 36,
+ 38, 34, 34, 60, 24, 35, 25, 26, 39, 40,
+ 68, 69, 48, 59, 49, 61, 64, 65, 66, 67,
+ 70, 58, 63, 71, 47, 0, 56, 0, 57
};
static const yytype_int8 yycheck[] =
{
- 17, 0, 9, 3, 11, 11, 5, 6, 7, 6,
- 9, 6, 9, 13, 13, 14, 13, 6, 13, 4,
- 9, 21, 22, 4, 23, 32, 23, 19, 6, 8,
- 11, 10, 24, 12, 23, 13, 17, 15, 16, 56,
- 19, 13, 61, 62, 4, 10, 19, 15, 18, 21,
- 22, 20, 15, 11, 15, 6, 6, 4, 15, 4,
- 6, 25, 33, 47, 40, -1, -1, 34
+ 18, 0, 3, 10, 6, 12, 5, 6, 7, 12,
+ 9, 10, 14, 14, 6, 14, 15, 11, 10, 6,
+ 4, 22, 23, 10, 20, 24, 33, 14, 12, 25,
+ 8, 4, 24, 11, 18, 13, 6, 24, 4, 57,
+ 14, 20, 20, 12, 14, 21, 16, 17, 22, 23,
+ 62, 63, 16, 16, 19, 16, 6, 6, 16, 4,
+ 4, 41, 48, 6, 26, -1, 34, -1, 35
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 26, 0, 5, 6, 7, 9, 13, 14, 23,
- 27, 28, 30, 34, 35, 36, 37, 38, 39, 42,
- 11, 4, 6, 13, 15, 16, 32, 33, 6, 36,
- 36, 4, 10, 19, 20, 39, 3, 13, 21, 22,
- 40, 41, 4, 11, 17, 31, 32, 15, 18, 24,
- 8, 10, 12, 29, 36, 37, 38, 41, 15, 11,
- 15, 13, 34, 6, 6, 15, 4, 31, 31, 4,
- 6
+ 0, 27, 0, 5, 6, 7, 9, 10, 14, 15,
+ 24, 28, 29, 31, 35, 36, 37, 38, 39, 40,
+ 43, 12, 4, 6, 14, 16, 17, 33, 34, 6,
+ 37, 37, 4, 11, 20, 21, 40, 3, 14, 22,
+ 23, 41, 42, 4, 12, 18, 32, 33, 16, 19,
+ 25, 8, 11, 13, 30, 37, 38, 39, 42, 16,
+ 12, 16, 14, 35, 6, 6, 16, 4, 32, 32,
+ 4, 6
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 25, 26, 26, 26, 26, 27, 27, 28, 28,
- 29, 29, 30, 30, 30, 30, 30, 30, 31, 31,
- 31, 32, 32, 33, 33, 34, 34, 35, 36, 36,
- 37, 37, 38, 38, 39, 39, 39, 40, 40, 41,
- 41, 41, 42, 42, 42
+ 0, 26, 27, 27, 27, 27, 27, 28, 28, 29,
+ 29, 30, 30, 31, 31, 31, 31, 31, 31, 32,
+ 32, 32, 33, 33, 34, 34, 35, 35, 36, 37,
+ 37, 38, 38, 39, 39, 40, 40, 40, 41, 41,
+ 42, 42, 42, 43, 43, 43
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
- 0, 2, 0, 2, 2, 2, 3, 3, 2, 1,
- 1, 1, 2, 2, 5, 5, 5, 3, 1, 4,
- 4, 1, 1, 1, 3, 1, 3, 1, 1, 3,
- 1, 3, 1, 2, 1, 2, 2, 1, 2, 1,
- 1, 1, 1, 1, 3
+ 0, 2, 0, 2, 2, 2, 2, 3, 3, 2,
+ 1, 1, 1, 2, 2, 5, 5, 5, 3, 1,
+ 4, 4, 1, 1, 1, 3, 1, 3, 1, 1,
+ 3, 1, 3, 1, 2, 1, 2, 2, 1, 2,
+ 1, 1, 1, 1, 1, 3
};
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 6:
+ case 7:
{
if (!context.symtab.insert(std::make_pair(*(yyvsp[-2].str), (yyvsp[-1].regexp))).second) {
break;
- case 7:
+ case 8:
{
context.input.fatal("trailing contexts are not allowed in named definitions");
break;
- case 8:
+ case 9:
{
(yyval.str) = (yyvsp[-1].str);
break;
- case 9:
+ case 10:
{
(yyval.str) = (yyvsp[0].str);
break;
- case 12:
+ case 13:
{
find(context.specs, "").rules.push_back(ASTRule((yyvsp[-1].regexp), (yyvsp[0].code)));
break;
- case 13:
+ case 14:
{
find(context.specs, "").defs.push_back((yyvsp[0].code));
break;
- case 14:
+ case 15:
{
for(CondList::const_iterator i = (yyvsp[-3].clist)->begin(); i != (yyvsp[-3].clist)->end(); ++i) {
break;
- case 15:
+ case 16:
{
for(CondList::const_iterator i = (yyvsp[-3].clist)->begin(); i != (yyvsp[-3].clist)->end(); ++i) {
break;
- case 16:
+ case 17:
{
for (CondList::const_iterator i = (yyvsp[-2].clist)->begin(); i != (yyvsp[-2].clist)->end(); ++i) {
break;
- case 17:
+ case 18:
{
const AST *r = ast_nil(context.input.get_cline(), 0);
break;
- case 19:
+ case 20:
{
(yyval.code) = (yyvsp[0].code);
break;
- case 20:
+ case 21:
{
(yyval.code) = new Code(context.input.get_fname(), context.input.get_cline());
break;
- case 22:
+ case 23:
{
(yyval.clist) = new CondList;
break;
- case 23:
+ case 24:
{
(yyval.clist) = new CondList;
break;
- case 24:
+ case 25:
{
(yyvsp[-2].clist)->insert(*(yyvsp[0].str));
break;
- case 26:
+ case 27:
{
(yyval.regexp) = ast_cat((yyvsp[-2].regexp), ast_cat(ast_tag(context.input.get_cline(), 0, NULL), (yyvsp[0].regexp)));
break;
- case 27:
+ case 28:
{
if (context.input.opts->posix_captures) {
break;
- case 28:
+ case 29:
{
(yyval.regexp) = (yyvsp[0].regexp);
break;
- case 29:
+ case 30:
{
(yyval.regexp) = ast_alt((yyvsp[-2].regexp), (yyvsp[0].regexp));
break;
- case 30:
+ case 31:
{
(yyval.regexp) = (yyvsp[0].regexp);
break;
- case 31:
+ case 32:
{
(yyval.regexp) = ast_diff((yyvsp[-2].regexp), (yyvsp[0].regexp));
break;
- case 32:
+ case 33:
{
(yyval.regexp) = (yyvsp[0].regexp);
break;
- case 33:
+ case 34:
{
(yyval.regexp) = ast_cat((yyvsp[-1].regexp), (yyvsp[0].regexp));
break;
- case 35:
+ case 36:
{
switch((yyvsp[0].op)) {
break;
- case 36:
+ case 37:
{
(yyval.regexp) = ast_iter((yyvsp[-1].regexp), (yyvsp[0].bounds).min, (yyvsp[0].bounds).max);
break;
- case 38:
+ case 39:
{ (yyval.op) = ((yyvsp[-1].op) == (yyvsp[0].op)) ? (yyvsp[-1].op) : '*'; }
break;
- case 39:
+ case 40:
{ (yyval.op) = '*'; }
break;
- case 40:
+ case 41:
{ (yyval.op) = '+'; }
break;
- case 41:
+ case 42:
{ (yyval.op) = '?'; }
break;
- case 43:
+ case 44:
{
symtab_t::iterator i = context.symtab.find(*(yyvsp[0].str));
break;
- case 44:
+ case 45:
{
(yyval.regexp) = (yyvsp[-1].regexp);