mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
m4: decommission function generating macro
These macros have been extremely useful when we had to support K&R C, which we dropped long ago. Now, they merely make the code uselessly hard to read. * data/skeletons/c.m4, data/skeletons/glr.c, data/skeletons/glr.cc, * data/skeletons/yacc.c: Stop using b4_function_define.
This commit is contained in:
@@ -77,16 +77,10 @@ m4_define([b4_yy_symbol_print_define],
|
||||
| Print this symbol. |
|
||||
`--------------------*/
|
||||
|
||||
]b4_function_define([yy_symbol_print],
|
||||
[static void],
|
||||
[[FILE *], []],
|
||||
[[int yytype], [yytype]],
|
||||
[[const ]b4_namespace_ref::b4_parser_class[::semantic_type *yyvaluep],
|
||||
[yyvaluep]][]dnl
|
||||
b4_locations_if([,
|
||||
[[const ]b4_namespace_ref::b4_parser_class[::location_type *yylocationp],
|
||||
[yylocationp]]]),
|
||||
b4_parse_param)[
|
||||
static void
|
||||
yy_symbol_print (FILE *, int yytype,
|
||||
const ]b4_namespace_ref::b4_parser_class[::semantic_type *yyvaluep]b4_locations_if([[,
|
||||
const ]b4_namespace_ref::b4_parser_class[::location_type *yylocationp]])[]b4_user_formals[)
|
||||
{
|
||||
]b4_parse_param_use[]dnl
|
||||
[ yyparser.yy_symbol_print_ (yytype, yyvaluep]b4_locations_if([, yylocationp])[);
|
||||
@@ -134,12 +128,10 @@ m4_append([b4_epilogue],
|
||||
| Report an error. |
|
||||
`------------------*/
|
||||
|
||||
]b4_function_define([yyerror],
|
||||
[static void],b4_locations_if([
|
||||
[[const ]b4_namespace_ref::b4_parser_class[::location_type *yylocationp],
|
||||
[yylocationp]],])
|
||||
b4_parse_param,
|
||||
[[const char* msg], [msg]])[
|
||||
static void
|
||||
yyerror (]b4_locations_if([[const ]b4_namespace_ref::b4_parser_class[::location_type *yylocationp,
|
||||
]])[]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param),
|
||||
])[const char* msg)
|
||||
{
|
||||
]b4_parse_param_use[]dnl
|
||||
[ yyparser.error (]b4_locations_if([[*yylocationp, ]])[msg);
|
||||
|
||||
Reference in New Issue
Block a user