: RegExp::SHARED;
for(CondList::const_iterator it = clist->begin(); it != clist->end(); ++it)
{
- //Str *condcpy = newcond ? new Str(*newcond) : newcond;
Token *token = new Token(code, in->get_fname (), in->get_cline (), newcond);//condcpy);
RuleOp *rule = new RuleOp(expr, look, token, accept++, ins_access);
{
in->fatalf_at(code->line, "code to setup rule '%s' is already defined", it->c_str());
}
- ruleSetupMap[*it] = std::make_pair(code->line, code->text.to_string());
+ ruleSetupMap[*it] = std::make_pair(code->line, code->text);
}
delete clist;
delete code;
/* Line 189 of yacc.c */
-#line 221 "./parser.cc"
+#line 220 "./parser.cc"
/* Enabling traces. */
#ifndef YYDEBUG
{
/* Line 214 of yacc.c */
-#line 151 "../src/parse/parser.ypp"
+#line 150 "../src/parse/parser.ypp"
re2c::RegExp *regexp;
re2c::Token *token;
/* Line 214 of yacc.c */
-#line 284 "./parser.cc"
+#line 283 "./parser.cc"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
/* Line 264 of yacc.c */
-#line 296 "./parser.cc"
+#line 295 "./parser.cc"
#ifdef short
# undef short
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 178, 178, 180, 184, 188, 197, 206, 210, 214,
- 220, 228, 237, 246, 250, 255, 260, 266, 270, 278,
- 286, 291, 297, 303, 315, 327, 333, 341, 344, 351,
- 357, 367, 370, 378, 381, 388, 392, 399, 403, 414,
- 418, 425, 429, 444, 451, 455, 459, 463, 470, 480,
- 484, 488
+ 0, 177, 177, 179, 183, 187, 196, 205, 209, 213,
+ 219, 227, 236, 245, 249, 254, 259, 265, 269, 277,
+ 285, 290, 296, 302, 314, 326, 332, 340, 343, 350,
+ 356, 366, 369, 377, 380, 387, 391, 398, 402, 413,
+ 417, 424, 428, 443, 450, 454, 458, 462, 469, 479,
+ 483, 487
};
#endif
case 2:
/* Line 1464 of yacc.c */
-#line 178 "../src/parse/parser.ypp"
+#line 177 "../src/parse/parser.ypp"
{
;}
break;
case 3:
/* Line 1464 of yacc.c */
-#line 181 "../src/parse/parser.ypp"
+#line 180 "../src/parse/parser.ypp"
{
foundRules = true;
;}
case 5:
/* Line 1464 of yacc.c */
-#line 189 "../src/parse/parser.ypp"
+#line 188 "../src/parse/parser.ypp"
{
if (!symbol_table.insert (std::make_pair (* (yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].regexp))).second)
{
case 6:
/* Line 1464 of yacc.c */
-#line 198 "../src/parse/parser.ypp"
+#line 197 "../src/parse/parser.ypp"
{
if (!symbol_table.insert (std::make_pair (* (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].regexp))).second)
{
case 7:
/* Line 1464 of yacc.c */
-#line 207 "../src/parse/parser.ypp"
+#line 206 "../src/parse/parser.ypp"
{
in->fatal("trailing contexts are not allowed in named definitions");
;}
case 8:
/* Line 1464 of yacc.c */
-#line 211 "../src/parse/parser.ypp"
+#line 210 "../src/parse/parser.ypp"
{
in->fatal("trailing contexts are not allowed in named definitions");
;}
case 9:
/* Line 1464 of yacc.c */
-#line 215 "../src/parse/parser.ypp"
+#line 214 "../src/parse/parser.ypp"
{
in->config (* (yyvsp[(1) - (4)].str), * (yyvsp[(3) - (4)].str));
delete (yyvsp[(1) - (4)].str);
case 10:
/* Line 1464 of yacc.c */
-#line 221 "../src/parse/parser.ypp"
+#line 220 "../src/parse/parser.ypp"
{
in->config (* (yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].number));
delete (yyvsp[(1) - (4)].str);
case 11:
/* Line 1464 of yacc.c */
-#line 229 "../src/parse/parser.ypp"
+#line 228 "../src/parse/parser.ypp"
{
if (cFlag)
{
case 12:
/* Line 1464 of yacc.c */
-#line 238 "../src/parse/parser.ypp"
+#line 237 "../src/parse/parser.ypp"
{
if (cFlag)
in->fatal("condition or '<*>' required when using -c switch");
case 13:
/* Line 1464 of yacc.c */
-#line 247 "../src/parse/parser.ypp"
+#line 246 "../src/parse/parser.ypp"
{
context_rule((yyvsp[(2) - (7)].clist), (yyvsp[(4) - (7)].regexp), (yyvsp[(5) - (7)].regexp), (yyvsp[(6) - (7)].str), (yyvsp[(7) - (7)].token));
;}
case 14:
/* Line 1464 of yacc.c */
-#line 251 "../src/parse/parser.ypp"
+#line 250 "../src/parse/parser.ypp"
{
assert((yyvsp[(7) - (7)].str));
context_rule((yyvsp[(2) - (7)].clist), (yyvsp[(4) - (7)].regexp), (yyvsp[(5) - (7)].regexp), (yyvsp[(7) - (7)].str), NULL);
case 15:
/* Line 1464 of yacc.c */
-#line 256 "../src/parse/parser.ypp"
+#line 255 "../src/parse/parser.ypp"
{
context_none((yyvsp[(2) - (6)].clist));
delete (yyvsp[(5) - (6)].str);
case 16:
/* Line 1464 of yacc.c */
-#line 261 "../src/parse/parser.ypp"
+#line 260 "../src/parse/parser.ypp"
{
assert((yyvsp[(6) - (6)].str));
context_none((yyvsp[(2) - (6)].clist));
case 17:
/* Line 1464 of yacc.c */
-#line 267 "../src/parse/parser.ypp"
+#line 266 "../src/parse/parser.ypp"
{
default_rule((yyvsp[(2) - (5)].clist), (yyvsp[(5) - (5)].token));
;}
case 18:
/* Line 1464 of yacc.c */
-#line 271 "../src/parse/parser.ypp"
+#line 270 "../src/parse/parser.ypp"
{
context_check(NULL);
Token *token = new Token((yyvsp[(7) - (7)].token), (yyvsp[(7) - (7)].token)->source, (yyvsp[(7) - (7)].token)->line, (yyvsp[(6) - (7)].str));
case 19:
/* Line 1464 of yacc.c */
-#line 279 "../src/parse/parser.ypp"
+#line 278 "../src/parse/parser.ypp"
{
assert((yyvsp[(7) - (7)].str));
context_check(NULL);
case 20:
/* Line 1464 of yacc.c */
-#line 287 "../src/parse/parser.ypp"
+#line 286 "../src/parse/parser.ypp"
{
context_none(NULL);
delete (yyvsp[(5) - (6)].str);
case 21:
/* Line 1464 of yacc.c */
-#line 292 "../src/parse/parser.ypp"
+#line 291 "../src/parse/parser.ypp"
{
assert((yyvsp[(6) - (6)].str));
context_none(NULL);
case 22:
/* Line 1464 of yacc.c */
-#line 298 "../src/parse/parser.ypp"
+#line 297 "../src/parse/parser.ypp"
{
CondList *clist = new CondList();
clist->insert("*");
case 23:
/* Line 1464 of yacc.c */
-#line 304 "../src/parse/parser.ypp"
+#line 303 "../src/parse/parser.ypp"
{
context_check(NULL);
if (specNone)
case 24:
/* Line 1464 of yacc.c */
-#line 316 "../src/parse/parser.ypp"
+#line 315 "../src/parse/parser.ypp"
{
assert((yyvsp[(3) - (3)].str));
context_check(NULL);
case 25:
/* Line 1464 of yacc.c */
-#line 328 "../src/parse/parser.ypp"
+#line 327 "../src/parse/parser.ypp"
{
CondList *clist = new CondList();
clist->insert("*");
case 26:
/* Line 1464 of yacc.c */
-#line 334 "../src/parse/parser.ypp"
+#line 333 "../src/parse/parser.ypp"
{
setup_rule((yyvsp[(2) - (4)].clist), (yyvsp[(4) - (4)].token));
;}
case 27:
/* Line 1464 of yacc.c */
-#line 341 "../src/parse/parser.ypp"
+#line 340 "../src/parse/parser.ypp"
{
in->fatal("unnamed condition not supported");
;}
case 28:
/* Line 1464 of yacc.c */
-#line 345 "../src/parse/parser.ypp"
+#line 344 "../src/parse/parser.ypp"
{
(yyval.clist) = (yyvsp[(1) - (1)].clist);
;}
case 29:
/* Line 1464 of yacc.c */
-#line 352 "../src/parse/parser.ypp"
+#line 351 "../src/parse/parser.ypp"
{
(yyval.clist) = new CondList();
(yyval.clist)->insert(* (yyvsp[(1) - (1)].str));
case 30:
/* Line 1464 of yacc.c */
-#line 358 "../src/parse/parser.ypp"
+#line 357 "../src/parse/parser.ypp"
{
(yyvsp[(1) - (3)].clist)->insert(* (yyvsp[(3) - (3)].str));
delete (yyvsp[(3) - (3)].str);
case 31:
/* Line 1464 of yacc.c */
-#line 367 "../src/parse/parser.ypp"
+#line 366 "../src/parse/parser.ypp"
{
(yyval.str) = NULL;
;}
case 32:
/* Line 1464 of yacc.c */
-#line 371 "../src/parse/parser.ypp"
+#line 370 "../src/parse/parser.ypp"
{
(yyval.str) = (yyvsp[(3) - (3)].str);
;}
case 33:
/* Line 1464 of yacc.c */
-#line 378 "../src/parse/parser.ypp"
+#line 377 "../src/parse/parser.ypp"
{
(yyval.regexp) = new NullOp;
;}
case 34:
/* Line 1464 of yacc.c */
-#line 382 "../src/parse/parser.ypp"
+#line 381 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(2) - (2)].regexp);
;}
case 35:
/* Line 1464 of yacc.c */
-#line 389 "../src/parse/parser.ypp"
+#line 388 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 36:
/* Line 1464 of yacc.c */
-#line 393 "../src/parse/parser.ypp"
+#line 392 "../src/parse/parser.ypp"
{
(yyval.regexp) = mkAlt((yyvsp[(1) - (3)].regexp), (yyvsp[(3) - (3)].regexp));
;}
case 37:
/* Line 1464 of yacc.c */
-#line 400 "../src/parse/parser.ypp"
+#line 399 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 38:
/* Line 1464 of yacc.c */
-#line 404 "../src/parse/parser.ypp"
+#line 403 "../src/parse/parser.ypp"
{
(yyval.regexp) = mkDiff((yyvsp[(1) - (3)].regexp), (yyvsp[(3) - (3)].regexp));
if(!(yyval.regexp))
case 39:
/* Line 1464 of yacc.c */
-#line 415 "../src/parse/parser.ypp"
+#line 414 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 40:
/* Line 1464 of yacc.c */
-#line 419 "../src/parse/parser.ypp"
+#line 418 "../src/parse/parser.ypp"
{
(yyval.regexp) = new CatOp((yyvsp[(1) - (2)].regexp), (yyvsp[(2) - (2)].regexp));
;}
case 41:
/* Line 1464 of yacc.c */
-#line 426 "../src/parse/parser.ypp"
+#line 425 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 42:
/* Line 1464 of yacc.c */
-#line 430 "../src/parse/parser.ypp"
+#line 429 "../src/parse/parser.ypp"
{
switch((yyvsp[(2) - (2)].op))
{
case 43:
/* Line 1464 of yacc.c */
-#line 445 "../src/parse/parser.ypp"
+#line 444 "../src/parse/parser.ypp"
{
(yyval.regexp) = new CloseVOp((yyvsp[(1) - (2)].regexp), (yyvsp[(2) - (2)].extop).minsize, (yyvsp[(2) - (2)].extop).maxsize);
;}
case 44:
/* Line 1464 of yacc.c */
-#line 452 "../src/parse/parser.ypp"
+#line 451 "../src/parse/parser.ypp"
{
(yyval.op) = (yyvsp[(1) - (1)].op);
;}
case 45:
/* Line 1464 of yacc.c */
-#line 456 "../src/parse/parser.ypp"
+#line 455 "../src/parse/parser.ypp"
{
(yyval.op) = (yyvsp[(1) - (1)].op);
;}
case 46:
/* Line 1464 of yacc.c */
-#line 460 "../src/parse/parser.ypp"
+#line 459 "../src/parse/parser.ypp"
{
(yyval.op) = ((yyvsp[(1) - (2)].op) == (yyvsp[(2) - (2)].op)) ? (yyvsp[(1) - (2)].op) : '*';
;}
case 47:
/* Line 1464 of yacc.c */
-#line 464 "../src/parse/parser.ypp"
+#line 463 "../src/parse/parser.ypp"
{
(yyval.op) = ((yyvsp[(1) - (2)].op) == (yyvsp[(2) - (2)].op)) ? (yyvsp[(1) - (2)].op) : '*';
;}
case 48:
/* Line 1464 of yacc.c */
-#line 471 "../src/parse/parser.ypp"
+#line 470 "../src/parse/parser.ypp"
{
symbol_table_t::iterator i = symbol_table.find (* (yyvsp[(1) - (1)].str));
delete (yyvsp[(1) - (1)].str);
case 49:
/* Line 1464 of yacc.c */
-#line 481 "../src/parse/parser.ypp"
+#line 480 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 50:
/* Line 1464 of yacc.c */
-#line 485 "../src/parse/parser.ypp"
+#line 484 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 51:
/* Line 1464 of yacc.c */
-#line 489 "../src/parse/parser.ypp"
+#line 488 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(2) - (3)].regexp);
;}
/* Line 1464 of yacc.c */
-#line 2100 "./parser.cc"
+#line 2099 "./parser.cc"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
/* Line 1684 of yacc.c */
-#line 494 "../src/parse/parser.ypp"
+#line 493 "../src/parse/parser.ypp"
extern "C" {