mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
skeletons: simplify after knr removal
* data/c.m4 (b4_yydestruct_generate, b4_yy_symbol_print_generate): They no longer need an argument, it has a single possible value. * data/glr.c, data/yacc.c: Adjust.
This commit is contained in:
20
data/c.m4
20
data/c.m4
@@ -407,17 +407,16 @@ b4_syncline([@oline@], [@ofile@])
|
||||
break;])
|
||||
|
||||
|
||||
# b4_yydestruct_generate(FUNCTION-DECLARATOR)
|
||||
# -------------------------------------------
|
||||
# Generate the "yydestruct" function, which declaration is issued using
|
||||
# FUNCTION-DECLARATOR, which may be "b4_function_define".
|
||||
# b4_yydestruct_generate
|
||||
# ----------------------
|
||||
# Define the "yydestruct" function.
|
||||
m4_define_default([b4_yydestruct_generate],
|
||||
[[/*-----------------------------------------------.
|
||||
| Release the memory associated to this symbol. |
|
||||
`-----------------------------------------------*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
]$1([yydestruct],
|
||||
]b4_function_define([yydestruct],
|
||||
[static void],
|
||||
[[const char *yymsg], [yymsg]],
|
||||
[[int yytype], [yytype]],
|
||||
@@ -440,10 +439,9 @@ m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
||||
])
|
||||
|
||||
|
||||
# b4_yy_symbol_print_generate(FUNCTION-DECLARATOR)
|
||||
# ------------------------------------------------
|
||||
# Generate the "yy_symbol_print" function, which declaration is issued using
|
||||
# FUNCTION-DECLARATOR, which may be "b4_function_define".
|
||||
# b4_yy_symbol_print_generate
|
||||
# ---------------------------
|
||||
# Define the "yy_symbol_print" function.
|
||||
m4_define_default([b4_yy_symbol_print_generate],
|
||||
[[
|
||||
/*--------------------------------.
|
||||
@@ -451,7 +449,7 @@ m4_define_default([b4_yy_symbol_print_generate],
|
||||
`--------------------------------*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
]$1([yy_symbol_value_print],
|
||||
]b4_function_define([yy_symbol_value_print],
|
||||
[static void],
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
@@ -483,7 +481,7 @@ m4_if(b4_skeleton, ["yacc.c"],
|
||||
| Print this symbol on YYOUTPUT. |
|
||||
`--------------------------------*/
|
||||
|
||||
]$1([yy_symbol_print],
|
||||
]b4_function_define([yy_symbol_print],
|
||||
[static void],
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
|
||||
@@ -491,7 +491,7 @@ typedef enum { yyok, yyaccept, yyabort, yyerr } YYRESULTTAG;
|
||||
YYFPRINTF Args; \
|
||||
} while (YYID (0))
|
||||
|
||||
]b4_yy_symbol_print_generate([b4_function_define])[
|
||||
]b4_yy_symbol_print_generate[
|
||||
|
||||
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
|
||||
do { \
|
||||
@@ -872,7 +872,7 @@ yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1)
|
||||
|
||||
/* Bison grammar-table manipulation. */
|
||||
|
||||
]b4_yydestruct_generate([b4_function_define])[
|
||||
]b4_yydestruct_generate[
|
||||
|
||||
/** Number of symbols composing the right hand side of rule #RULE. */
|
||||
static inline int
|
||||
|
||||
@@ -714,7 +714,7 @@ do { \
|
||||
} \
|
||||
} while (YYID (0))
|
||||
|
||||
]b4_yy_symbol_print_generate([b4_function_define])[
|
||||
]b4_yy_symbol_print_generate[
|
||||
|
||||
/*------------------------------------------------------------------.
|
||||
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
|
||||
@@ -1284,7 +1284,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
}
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
|
||||
]b4_yydestruct_generate([b4_function_define])[
|
||||
]b4_yydestruct_generate[
|
||||
|
||||
]b4_pure_if([], [
|
||||
|
||||
|
||||
Reference in New Issue
Block a user