395 |
]b4_check[ |
]b4_check[ |
396 |
}; |
}; |
397 |
|
|
398 |
|
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
399 |
|
symbol of state STATE-NUM. */ |
400 |
|
static const ]b4_int_type_for([b4_stos])[ yystos[] = |
401 |
|
{ |
402 |
|
]b4_stos[ |
403 |
|
}; |
404 |
|
|
405 |
|
|
406 |
/* Prevent warning if -Wmissing-prototypes. */ |
/* Prevent warning if -Wmissing-prototypes. */ |
407 |
]b4_c_ansi_function_decl([yyparse], [int], b4_parse_param)[ |
]b4_c_ansi_function_decl([yyparse], [int], b4_parse_param)[ |
458 |
if (yydebug) \ |
if (yydebug) \ |
459 |
YYFPRINTF Args; \ |
YYFPRINTF Args; \ |
460 |
} while (0) |
} while (0) |
461 |
|
|
462 |
|
]b4_yysymprint_generate([b4_c_ansi_function_def])[ |
463 |
|
|
464 |
|
# define YYDSYMPRINT(Args) \ |
465 |
|
do { \ |
466 |
|
if (yydebug) \ |
467 |
|
yysymprint Args; \ |
468 |
|
} while (0) |
469 |
|
|
470 |
/* Nonzero means print parse trace. It is left uninitialized so that |
/* Nonzero means print parse trace. It is left uninitialized so that |
471 |
multiple parsers can coexist. */ |
multiple parsers can coexist. */ |
472 |
int yydebug; |
int yydebug; |
473 |
|
|
474 |
#else /* !YYDEBUG */ |
#else /* !YYDEBUG */ |
475 |
|
|
476 |
/* Avoid empty `if' bodies. */ |
/* Avoid empty `if' bodies. */ |
477 |
# define YYDPRINTF(Args) {} |
# define YYDPRINTF(Args) {} |
478 |
|
# define YYDSYMPRINT(Args) {} |
479 |
|
|
480 |
#endif /* !YYDEBUG */ |
#endif /* !YYDEBUG */ |
481 |
|
|
482 |
/* YYINITDEPTH -- initial size of the parser's stacks. */ |
/* YYINITDEPTH -- initial size of the parser's stacks. */ |
631 |
*yyvalp = yyvsp[1-yyrhslen].yystate.yysemantics.yysval; |
*yyvalp = yyvsp[1-yyrhslen].yystate.yysemantics.yysval; |
632 |
*yylocp = yyvsp[1-yyrhslen].yystate.yyloc; |
*yylocp = yyvsp[1-yyrhslen].yystate.yyloc; |
633 |
} |
} |
|
# undef yyval |
|
|
# define yyval (*yyvalp) |
|
634 |
# undef yyerrok |
# undef yyerrok |
635 |
# define yyerrok (yystack->yyerrState = 0) |
# define yyerrok (yystack->yyerrState = 0) |
636 |
# undef YYACCEPT |
# undef YYACCEPT |
657 |
} |
} |
658 |
|
|
659 |
return yyok; |
return yyok; |
|
# undef yyval |
|
660 |
# undef yyerrok |
# undef yyerrok |
661 |
# undef YYABORT |
# undef YYABORT |
662 |
# undef YYACCEPT |
# undef YYACCEPT |
686 |
[ |
[ |
687 |
/* Bison grammar-table manipulation. */ |
/* Bison grammar-table manipulation. */ |
688 |
|
|
689 |
|
]b4_yydestruct_generate([b4_c_ansi_function_def])[ |
690 |
|
|
691 |
/** Number of symbols composing the right hand side of rule #RULE. */ |
/** Number of symbols composing the right hand side of rule #RULE. */ |
692 |
static inline int |
static inline int |
693 |
yyrhsLength (yyRuleNum yyrule) |
yyrhsLength (yyRuleNum yyrule) |
1640 |
while (yytrue) |
while (yytrue) |
1641 |
{ |
{ |
1642 |
if (*yytokenp == YYEOF) |
if (*yytokenp == YYEOF) |
1643 |
yyFail (yystack][]b4_lpure_args[, NULL); |
{ |
1644 |
|
/* Now pop stack until we find a state that shifts the |
1645 |
|
error token. */ |
1646 |
|
while (yystack->yytops.yystates[0] != NULL) |
1647 |
|
{ |
1648 |
|
yyGLRState *yys = yystack->yytops.yystates[0]; |
1649 |
|
YYDPRINTF ((stderr, "Error: popping ")); |
1650 |
|
YYDSYMPRINT ((stderr, |
1651 |
|
yystos[yys->yylrState], |
1652 |
|
&yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[)); |
1653 |
|
YYDPRINTF ((stderr, "\n")); |
1654 |
|
yydestruct (yystos[yys->yylrState], |
1655 |
|
&yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[); |
1656 |
|
yystack->yytops.yystates[0] = yys->yypred; |
1657 |
|
yystack->yynextFree -= 1; |
1658 |
|
yystack->yyspaceLeft += 1; |
1659 |
|
} |
1660 |
|
yyFail (yystack][]b4_lpure_args[, NULL); |
1661 |
|
} |
1662 |
if (*yytokenp != YYEMPTY) |
if (*yytokenp != YYEMPTY) |
1663 |
YYDPRINTF ((stderr, "Discarding token %s\n", |
{ |
1664 |
yytokenName (*yytokenp))); |
YYDPRINTF ((stderr, "Discarding token %s\n", |
1665 |
|
yytokenName (*yytokenp))); |
1666 |
|
yydestruct (*yytokenp, yylvalp]b4_location_if([, yyllocp])[); |
1667 |
|
} |
1668 |
YYDPRINTF ((stderr, "Reading a token: ")); |
YYDPRINTF ((stderr, "Reading a token: ")); |
1669 |
yychar = YYLEX; |
yychar = YYLEX; |
1670 |
*yytokenp = YYTRANSLATE (yychar); |
*yytokenp = YYTRANSLATE (yychar); |
1697 |
/* Now pop stack until we find a state that shifts the error token. */ |
/* Now pop stack until we find a state that shifts the error token. */ |
1698 |
while (yystack->yytops.yystates[0] != NULL) |
while (yystack->yytops.yystates[0] != NULL) |
1699 |
{ |
{ |
1700 |
yyj = yypact[yystack->yytops.yystates[0]->yylrState]; |
yyGLRState *yys = yystack->yytops.yystates[0]; |
1701 |
|
yyj = yypact[yys->yylrState]; |
1702 |
if (! yyis_pact_ninf (yyj)) |
if (! yyis_pact_ninf (yyj)) |
1703 |
{ |
{ |
1704 |
yyj += YYTERROR; |
yyj += YYTERROR; |
1705 |
if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == YYTERROR |
if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == YYTERROR |
1706 |
&& yyisShiftAction (yytable[yyj])) |
&& yyisShiftAction (yytable[yyj])) |
1707 |
{ |
{ |
1708 |
|
YYDPRINTF ((stderr, "Shifting error token, ")); |
1709 |
yyglrShift (yystack, 0, yytable[yyj], |
yyglrShift (yystack, 0, yytable[yyj], |
1710 |
yystack->yytops.yystates[0]->yyposn, |
yys->yyposn, *yylvalp, yyllocp]b4_user_args[); |
|
*yylvalp, yyllocp]b4_user_args[); |
|
1711 |
break; |
break; |
1712 |
} |
} |
1713 |
} |
} |
1714 |
yystack->yytops.yystates[0] = yystack->yytops.yystates[0]->yypred; |
YYDPRINTF ((stderr, "Error: popping ")); |
1715 |
|
YYDSYMPRINT ((stderr, |
1716 |
|
yystos[yys->yylrState], |
1717 |
|
&yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[)); |
1718 |
|
YYDPRINTF ((stderr, "\n")); |
1719 |
|
yydestruct (yystos[yys->yylrState], |
1720 |
|
&yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[); |
1721 |
|
yystack->yytops.yystates[0] = yys->yypred; |
1722 |
yystack->yynextFree -= 1; |
yystack->yynextFree -= 1; |
1723 |
yystack->yyspaceLeft += 1; |
yystack->yyspaceLeft += 1; |
1724 |
} |
} |