/* Copy the first part of user declarations. */
-/* Line 189 of yacc.c */
-#line 1 "parser.y"
/* $Id$ */
extern "C"
{
int yylex();
-int yyparse();
void yyerror(const char*);
}
-/* Line 189 of yacc.c */
-#line 228 "parser.cc"
/* Enabling traces. */
#ifndef YYDEBUG
typedef union YYSTYPE
{
-/* Line 214 of yacc.c */
-#line 158 "parser.y"
re2c::Symbol *symbol;
re2c::RegExp *regexp;
-/* Line 214 of yacc.c */
-#line 307 "parser.cc"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
/* Copy the second part of user declarations. */
-/* Line 264 of yacc.c */
-#line 319 "parser.cc"
#ifdef short
# undef short
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 187, 187, 189, 193, 197, 206, 215, 219, 223,
- 229, 237, 246, 255, 259, 264, 269, 275, 279, 287,
- 295, 300, 306, 312, 324, 336, 342, 350, 353, 360,
- 365, 374, 377, 385, 388, 395, 399, 406, 410, 421,
- 425, 432, 436, 451, 458, 462, 466, 470, 477, 485,
- 489, 493
+ 0, 186, 186, 188, 192, 196, 205, 214, 218, 222,
+ 228, 236, 245, 254, 258, 263, 268, 274, 278, 286,
+ 294, 299, 305, 311, 323, 335, 341, 349, 352, 359,
+ 364, 373, 376, 384, 387, 394, 398, 405, 409, 420,
+ 424, 431, 435, 450, 457, 461, 465, 469, 476, 484,
+ 488, 492
};
#endif
{
case 2:
-/* Line 1464 of yacc.c */
-#line 187 "parser.y"
{
}
break;
case 3:
-/* Line 1464 of yacc.c */
-#line 190 "parser.y"
{
foundRules = true;
}
case 5:
-/* Line 1464 of yacc.c */
-#line 198 "parser.y"
{
if ((yyvsp[(1) - (4)].symbol)->re)
{
case 6:
-/* Line 1464 of yacc.c */
-#line 207 "parser.y"
{
if ((yyvsp[(1) - (2)].symbol)->re)
{
case 7:
-/* Line 1464 of yacc.c */
-#line 216 "parser.y"
{
in->fatal("trailing contexts are not allowed in named definitions");
}
case 8:
-/* Line 1464 of yacc.c */
-#line 220 "parser.y"
{
in->fatal("trailing contexts are not allowed in named definitions");
}
case 9:
-/* Line 1464 of yacc.c */
-#line 224 "parser.y"
{
in->config(*(yyvsp[(1) - (4)].str), *(yyvsp[(3) - (4)].str));
delete (yyvsp[(1) - (4)].str);
case 10:
-/* Line 1464 of yacc.c */
-#line 230 "parser.y"
{
in->config(*(yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].number));
delete (yyvsp[(1) - (4)].str);
case 11:
-/* Line 1464 of yacc.c */
-#line 238 "parser.y"
{
if (cFlag)
{
case 12:
-/* Line 1464 of yacc.c */
-#line 247 "parser.y"
{
if (cFlag)
in->fatal("condition or '<*>' required when using -c switch");
case 13:
-/* Line 1464 of yacc.c */
-#line 256 "parser.y"
{
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 260 "parser.y"
{
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 265 "parser.y"
{
context_none((yyvsp[(2) - (6)].clist));
delete (yyvsp[(5) - (6)].str);
case 16:
-/* Line 1464 of yacc.c */
-#line 270 "parser.y"
{
assert((yyvsp[(6) - (6)].str));
context_none((yyvsp[(2) - (6)].clist));
case 17:
-/* Line 1464 of yacc.c */
-#line 276 "parser.y"
{
default_rule((yyvsp[(2) - (5)].clist), (yyvsp[(5) - (5)].token));
}
case 18:
-/* Line 1464 of yacc.c */
-#line 280 "parser.y"
{
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 288 "parser.y"
{
assert((yyvsp[(7) - (7)].str));
context_check(NULL);
case 20:
-/* Line 1464 of yacc.c */
-#line 296 "parser.y"
{
context_none(NULL);
delete (yyvsp[(5) - (6)].str);
case 21:
-/* Line 1464 of yacc.c */
-#line 301 "parser.y"
{
assert((yyvsp[(6) - (6)].str));
context_none(NULL);
case 22:
-/* Line 1464 of yacc.c */
-#line 307 "parser.y"
{
CondList *clist = new CondList();
clist->insert("*");
case 23:
-/* Line 1464 of yacc.c */
-#line 313 "parser.y"
{
context_check(NULL);
if (specNone)
case 24:
-/* Line 1464 of yacc.c */
-#line 325 "parser.y"
{
assert((yyvsp[(3) - (3)].str));
context_check(NULL);
case 25:
-/* Line 1464 of yacc.c */
-#line 337 "parser.y"
{
CondList *clist = new CondList();
clist->insert("*");
case 26:
-/* Line 1464 of yacc.c */
-#line 343 "parser.y"
{
setup_rule((yyvsp[(2) - (4)].clist), (yyvsp[(4) - (4)].token));
}
case 27:
-/* Line 1464 of yacc.c */
-#line 350 "parser.y"
{
in->fatal("unnamed condition not supported");
}
case 28:
-/* Line 1464 of yacc.c */
-#line 354 "parser.y"
{
(yyval.clist) = (yyvsp[(1) - (1)].clist);
}
case 29:
-/* Line 1464 of yacc.c */
-#line 361 "parser.y"
{
(yyval.clist) = new CondList();
(yyval.clist)->insert((yyvsp[(1) - (1)].symbol)->GetName().to_string());
case 30:
-/* Line 1464 of yacc.c */
-#line 366 "parser.y"
{
(yyvsp[(1) - (3)].clist)->insert((yyvsp[(3) - (3)].symbol)->GetName().to_string());
(yyval.clist) = (yyvsp[(1) - (3)].clist);
case 31:
-/* Line 1464 of yacc.c */
-#line 374 "parser.y"
{
(yyval.str) = NULL;
}
case 32:
-/* Line 1464 of yacc.c */
-#line 378 "parser.y"
{
(yyval.str) = new Str((yyvsp[(3) - (3)].symbol)->GetName().to_string().c_str());
}
case 33:
-/* Line 1464 of yacc.c */
-#line 385 "parser.y"
{
(yyval.regexp) = new NullOp;
}
case 34:
-/* Line 1464 of yacc.c */
-#line 389 "parser.y"
{
(yyval.regexp) = (yyvsp[(2) - (2)].regexp);
}
case 35:
-/* Line 1464 of yacc.c */
-#line 396 "parser.y"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
}
case 36:
-/* Line 1464 of yacc.c */
-#line 400 "parser.y"
{
(yyval.regexp) = mkAlt((yyvsp[(1) - (3)].regexp), (yyvsp[(3) - (3)].regexp));
}
case 37:
-/* Line 1464 of yacc.c */
-#line 407 "parser.y"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
}
case 38:
-/* Line 1464 of yacc.c */
-#line 411 "parser.y"
{
(yyval.regexp) = mkDiff((yyvsp[(1) - (3)].regexp), (yyvsp[(3) - (3)].regexp));
if(!(yyval.regexp))
case 39:
-/* Line 1464 of yacc.c */
-#line 422 "parser.y"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
}
case 40:
-/* Line 1464 of yacc.c */
-#line 426 "parser.y"
{
(yyval.regexp) = new CatOp((yyvsp[(1) - (2)].regexp), (yyvsp[(2) - (2)].regexp));
}
case 41:
-/* Line 1464 of yacc.c */
-#line 433 "parser.y"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
}
case 42:
-/* Line 1464 of yacc.c */
-#line 437 "parser.y"
{
switch((yyvsp[(2) - (2)].op))
{
case 43:
-/* Line 1464 of yacc.c */
-#line 452 "parser.y"
{
(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 459 "parser.y"
{
(yyval.op) = (yyvsp[(1) - (1)].op);
}
case 45:
-/* Line 1464 of yacc.c */
-#line 463 "parser.y"
{
(yyval.op) = (yyvsp[(1) - (1)].op);
}
case 46:
-/* Line 1464 of yacc.c */
-#line 467 "parser.y"
{
(yyval.op) = ((yyvsp[(1) - (2)].op) == (yyvsp[(2) - (2)].op)) ? (yyvsp[(1) - (2)].op) : '*';
}
case 47:
-/* Line 1464 of yacc.c */
-#line 471 "parser.y"
{
(yyval.op) = ((yyvsp[(1) - (2)].op) == (yyvsp[(2) - (2)].op)) ? (yyvsp[(1) - (2)].op) : '*';
}
case 48:
-/* Line 1464 of yacc.c */
-#line 478 "parser.y"
{
if(!(yyvsp[(1) - (1)].symbol)->re)
{
case 49:
-/* Line 1464 of yacc.c */
-#line 486 "parser.y"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
}
case 50:
-/* Line 1464 of yacc.c */
-#line 490 "parser.y"
{
(yyval.regexp) = (yyvsp[(1) - (1)].regexp);
}
case 51:
-/* Line 1464 of yacc.c */
-#line 494 "parser.y"
{
(yyval.regexp) = (yyvsp[(2) - (3)].regexp);
}
-/* Line 1464 of yacc.c */
-#line 2119 "parser.cc"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-/* Line 1684 of yacc.c */
-#line 499 "parser.y"
extern "C" {