#line 1 "../src/parse/parser.ypp"
-/* $Id$ */
-
#include <assert.h>
#include <time.h>
#include <string.h>
/* Line 189 of yacc.c */
-#line 220 "./parser.cc"
+#line 218 "./parser.cc"
/* Enabling traces. */
#ifndef YYDEBUG
{
/* Line 214 of yacc.c */
-#line 150 "../src/parse/parser.ypp"
+#line 148 "../src/parse/parser.ypp"
re2c::RegExp *regexp;
re2c::Token *token;
/* Line 214 of yacc.c */
-#line 283 "./parser.cc"
+#line 281 "./parser.cc"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
/* Line 264 of yacc.c */
-#line 295 "./parser.cc"
+#line 293 "./parser.cc"
#ifdef short
# undef short
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 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
+ 0, 175, 175, 177, 181, 185, 194, 203, 207, 211,
+ 217, 225, 234, 243, 247, 252, 257, 263, 267, 275,
+ 283, 288, 294, 300, 312, 324, 330, 338, 341, 348,
+ 354, 364, 367, 375, 378, 385, 389, 396, 400, 411,
+ 415, 422, 426, 441, 448, 452, 456, 460, 467, 477,
+ 481, 485
};
#endif
case 2:
/* Line 1464 of yacc.c */
-#line 177 "../src/parse/parser.ypp"
+#line 175 "../src/parse/parser.ypp"
{
;}
break;
case 3:
/* Line 1464 of yacc.c */
-#line 180 "../src/parse/parser.ypp"
+#line 178 "../src/parse/parser.ypp"
{
foundRules = true;
;}
case 5:
/* Line 1464 of yacc.c */
-#line 188 "../src/parse/parser.ypp"
+#line 186 "../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 197 "../src/parse/parser.ypp"
+#line 195 "../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 206 "../src/parse/parser.ypp"
+#line 204 "../src/parse/parser.ypp"
{
in->fatal("trailing contexts are not allowed in named definitions");
;}
case 8:
/* Line 1464 of yacc.c */
-#line 210 "../src/parse/parser.ypp"
+#line 208 "../src/parse/parser.ypp"
{
in->fatal("trailing contexts are not allowed in named definitions");
;}
case 9:
/* Line 1464 of yacc.c */
-#line 214 "../src/parse/parser.ypp"
+#line 212 "../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 220 "../src/parse/parser.ypp"
+#line 218 "../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 228 "../src/parse/parser.ypp"
+#line 226 "../src/parse/parser.ypp"
{
if (cFlag)
{
case 12:
/* Line 1464 of yacc.c */
-#line 237 "../src/parse/parser.ypp"
+#line 235 "../src/parse/parser.ypp"
{
if (cFlag)
in->fatal("condition or '<*>' required when using -c switch");
case 13:
/* Line 1464 of yacc.c */
-#line 246 "../src/parse/parser.ypp"
+#line 244 "../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 250 "../src/parse/parser.ypp"
+#line 248 "../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 255 "../src/parse/parser.ypp"
+#line 253 "../src/parse/parser.ypp"
{
context_none((yyvsp[(2) - (6)].clist));
delete (yyvsp[(5) - (6)].str);
case 16:
/* Line 1464 of yacc.c */
-#line 260 "../src/parse/parser.ypp"
+#line 258 "../src/parse/parser.ypp"
{
assert((yyvsp[(6) - (6)].str));
context_none((yyvsp[(2) - (6)].clist));
case 17:
/* Line 1464 of yacc.c */
-#line 266 "../src/parse/parser.ypp"
+#line 264 "../src/parse/parser.ypp"
{
default_rule((yyvsp[(2) - (5)].clist), (yyvsp[(5) - (5)].token));
;}
case 18:
/* Line 1464 of yacc.c */
-#line 270 "../src/parse/parser.ypp"
+#line 268 "../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 278 "../src/parse/parser.ypp"
+#line 276 "../src/parse/parser.ypp"
{
assert((yyvsp[(7) - (7)].str));
context_check(NULL);
case 20:
/* Line 1464 of yacc.c */
-#line 286 "../src/parse/parser.ypp"
+#line 284 "../src/parse/parser.ypp"
{
context_none(NULL);
delete (yyvsp[(5) - (6)].str);
case 21:
/* Line 1464 of yacc.c */
-#line 291 "../src/parse/parser.ypp"
+#line 289 "../src/parse/parser.ypp"
{
assert((yyvsp[(6) - (6)].str));
context_none(NULL);
case 22:
/* Line 1464 of yacc.c */
-#line 297 "../src/parse/parser.ypp"
+#line 295 "../src/parse/parser.ypp"
{
CondList *clist = new CondList();
clist->insert("*");
case 23:
/* Line 1464 of yacc.c */
-#line 303 "../src/parse/parser.ypp"
+#line 301 "../src/parse/parser.ypp"
{
context_check(NULL);
if (specNone)
case 24:
/* Line 1464 of yacc.c */
-#line 315 "../src/parse/parser.ypp"
+#line 313 "../src/parse/parser.ypp"
{
assert((yyvsp[(3) - (3)].str));
context_check(NULL);
case 25:
/* Line 1464 of yacc.c */
-#line 327 "../src/parse/parser.ypp"
+#line 325 "../src/parse/parser.ypp"
{
CondList *clist = new CondList();
clist->insert("*");
case 26:
/* Line 1464 of yacc.c */
-#line 333 "../src/parse/parser.ypp"
+#line 331 "../src/parse/parser.ypp"
{
setup_rule((yyvsp[(2) - (4)].clist), (yyvsp[(4) - (4)].token));
;}
case 27:
/* Line 1464 of yacc.c */
-#line 340 "../src/parse/parser.ypp"
+#line 338 "../src/parse/parser.ypp"
{
in->fatal("unnamed condition not supported");
;}
case 28:
/* Line 1464 of yacc.c */
-#line 344 "../src/parse/parser.ypp"
+#line 342 "../src/parse/parser.ypp"
{
(yyval.clist) = (yyvsp[(1) - (1)].clist);
;}
case 29:
/* Line 1464 of yacc.c */
-#line 351 "../src/parse/parser.ypp"
+#line 349 "../src/parse/parser.ypp"
{
(yyval.clist) = new CondList();
(yyval.clist)->insert(* (yyvsp[(1) - (1)].str));
case 30:
/* Line 1464 of yacc.c */
-#line 357 "../src/parse/parser.ypp"
+#line 355 "../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 366 "../src/parse/parser.ypp"
+#line 364 "../src/parse/parser.ypp"
{
(yyval.str) = NULL;
;}
case 32:
/* Line 1464 of yacc.c */
-#line 370 "../src/parse/parser.ypp"
+#line 368 "../src/parse/parser.ypp"
{
(yyval.str) = (yyvsp[(3) - (3)].str);
;}
case 33:
/* Line 1464 of yacc.c */
-#line 377 "../src/parse/parser.ypp"
+#line 375 "../src/parse/parser.ypp"
{
(yyval.regexp) = new NullOp;
;}
case 34:
/* Line 1464 of yacc.c */
-#line 381 "../src/parse/parser.ypp"
+#line 379 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(2) - (2)].regexp);
;}
case 35:
/* Line 1464 of yacc.c */
-#line 388 "../src/parse/parser.ypp"
+#line 386 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 36:
/* Line 1464 of yacc.c */
-#line 392 "../src/parse/parser.ypp"
+#line 390 "../src/parse/parser.ypp"
{
(yyval.regexp) = mkAlt((yyvsp[(1) - (3)].regexp), (yyvsp[(3) - (3)].regexp));
;}
case 37:
/* Line 1464 of yacc.c */
-#line 399 "../src/parse/parser.ypp"
+#line 397 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 38:
/* Line 1464 of yacc.c */
-#line 403 "../src/parse/parser.ypp"
+#line 401 "../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 414 "../src/parse/parser.ypp"
+#line 412 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 40:
/* Line 1464 of yacc.c */
-#line 418 "../src/parse/parser.ypp"
+#line 416 "../src/parse/parser.ypp"
{
(yyval.regexp) = new CatOp((yyvsp[(1) - (2)].regexp), (yyvsp[(2) - (2)].regexp));
;}
case 41:
/* Line 1464 of yacc.c */
-#line 425 "../src/parse/parser.ypp"
+#line 423 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 42:
/* Line 1464 of yacc.c */
-#line 429 "../src/parse/parser.ypp"
+#line 427 "../src/parse/parser.ypp"
{
switch((yyvsp[(2) - (2)].op))
{
case 43:
/* Line 1464 of yacc.c */
-#line 444 "../src/parse/parser.ypp"
+#line 442 "../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 451 "../src/parse/parser.ypp"
+#line 449 "../src/parse/parser.ypp"
{
(yyval.op) = (yyvsp[(1) - (1)].op);
;}
case 45:
/* Line 1464 of yacc.c */
-#line 455 "../src/parse/parser.ypp"
+#line 453 "../src/parse/parser.ypp"
{
(yyval.op) = (yyvsp[(1) - (1)].op);
;}
case 46:
/* Line 1464 of yacc.c */
-#line 459 "../src/parse/parser.ypp"
+#line 457 "../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 463 "../src/parse/parser.ypp"
+#line 461 "../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 470 "../src/parse/parser.ypp"
+#line 468 "../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 480 "../src/parse/parser.ypp"
+#line 478 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 50:
/* Line 1464 of yacc.c */
-#line 484 "../src/parse/parser.ypp"
+#line 482 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
;}
case 51:
/* Line 1464 of yacc.c */
-#line 488 "../src/parse/parser.ypp"
+#line 486 "../src/parse/parser.ypp"
{
(yyval.regexp) = (yyvsp[(2) - (3)].regexp);
;}
/* Line 1464 of yacc.c */
-#line 2099 "./parser.cc"
+#line 2097 "./parser.cc"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
/* Line 1684 of yacc.c */
-#line 493 "../src/parse/parser.ypp"
+#line 491 "../src/parse/parser.ypp"
extern "C" {