mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 02:33:03 +00:00
glr.c, yacc.c: propagate yysymbol_type_t
Now that yacc.c and glr.c both know yysymbol_type_t, convert the common routines. * data/skeletons/c.m4 (yydestruct, yy_symbol_value_print) (yy_symbol_print): Use yysymbol_type_t instead of int. * data/skeletons/glr.c: Use yySymbol where appropriate. * data/skeletons/yacc.c (YY_ACCESSING_SYMBOL): New wrapper around yystos. Use it. * tests/local.at (yyreport_syntax_error): Use yysymbol_type_t where appropriate.
This commit is contained in:
@@ -1482,7 +1482,7 @@ yyglrReduce (yyGLRStack* yystackp, ptrdiff_t yyk, yyRuleNum yyrule,
|
||||
YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule - 1]));
|
||||
if (yyflag != yyok)
|
||||
return yyflag;
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyrule], &yysval, &yyloc);
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yylhsNonterm (yyrule), &yysval, &yyloc);
|
||||
yyglrShift (yystackp, yyk,
|
||||
yyLRgotoState (yystackp->yytops.yystates[yyk]->yylrState,
|
||||
yylhsNonterm (yyrule)),
|
||||
@@ -2131,10 +2131,10 @@ static int
|
||||
yyreport_syntax_error (const yyGLRStack* yystackp]b4_user_formals[);
|
||||
|
||||
/* The token type of the lookahead of this context. */
|
||||
static int
|
||||
static yySymbol
|
||||
yyparse_context_token (const yyGLRStack *yystackp) YY_ATTRIBUTE_UNUSED;
|
||||
|
||||
static int
|
||||
static yySymbol
|
||||
yyparse_context_token (const yyGLRStack *yystackp)
|
||||
{
|
||||
YYUSE (yystackp);
|
||||
|
||||
Reference in New Issue
Block a user