mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13: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:
@@ -620,7 +620,7 @@ m4_define_default([b4_yydestruct_define],
|
||||
|
||||
static void
|
||||
yydestruct (const char *yymsg,
|
||||
int yytype, YYSTYPE *yyvaluep]b4_locations_if(dnl
|
||||
yysymbol_type_t yytype, YYSTYPE *yyvaluep]b4_locations_if(dnl
|
||||
[[, YYLTYPE *yylocationp]])[]b4_user_formals[)
|
||||
{
|
||||
]b4_parse_param_use([yyvaluep], [yylocationp])dnl
|
||||
@@ -646,7 +646,7 @@ m4_define_default([b4_yy_symbol_print_define],
|
||||
|
||||
static void
|
||||
yy_symbol_value_print (FILE *yyo,
|
||||
int yytype, YYSTYPE const * const yyvaluep]b4_locations_if(dnl
|
||||
yysymbol_type_t yytype, YYSTYPE const * const yyvaluep]b4_locations_if(dnl
|
||||
[[, YYLTYPE const * const yylocationp]])[]b4_user_formals[)
|
||||
{
|
||||
FILE *yyoutput = yyo;
|
||||
@@ -674,7 +674,7 @@ b4_percent_code_get([[post-printer]])dnl
|
||||
|
||||
static void
|
||||
yy_symbol_print (FILE *yyo,
|
||||
int yytype, YYSTYPE const * const yyvaluep]b4_locations_if(dnl
|
||||
yysymbol_type_t yytype, YYSTYPE const * const yyvaluep]b4_locations_if(dnl
|
||||
[[, YYLTYPE const * const yylocationp]])[]b4_user_formals[)
|
||||
{
|
||||
YYFPRINTF (yyo, "%s %s (",
|
||||
|
||||
Reference in New Issue
Block a user