mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Merge remote-tracking branch 'origin/maint'
* origin/maint: tests: do not output m4 set up. tests: use the generic yyerror function. tests: use assert instead of plain abort. tests: improve the generic yylex implementation. tests: generalize the compilation macros. tests: fix confusion between api.prefix and name-prefix. maint: gitignores. yacc: work around the ylwrap limitation. Conflicts: NEWS tests/local.at
This commit is contained in:
15
data/yacc.c
15
data/yacc.c
@@ -229,6 +229,8 @@ m4_define([b4_declare_parser_state_variables], [b4_pure_if([[
|
||||
|
||||
# b4_declare_yyparse_push_
|
||||
# ------------------------
|
||||
# Declaration of yyparse (and dependencies) when using the push parser
|
||||
# (including in pull mode).
|
||||
m4_define([b4_declare_yyparse_push_],
|
||||
[[typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;
|
||||
enum { YYPUSH_MORE = 4 };
|
||||
@@ -274,12 +276,14 @@ m4_define([b4_declare_yyparse],
|
||||
# Declaration that might either go into the header (if --defines)
|
||||
# or open coded in the parser body.
|
||||
m4_define([b4_shared_declarations],
|
||||
[b4_declare_yydebug[
|
||||
[b4_cpp_guard_open([b4_spec_defines_file])[
|
||||
]b4_declare_yydebug[
|
||||
]b4_percent_code_get([[requires]])[
|
||||
]b4_token_enums_defines(b4_tokens)[
|
||||
]b4_declare_yylstype[
|
||||
]b4_declare_yyparse[
|
||||
]b4_percent_code_get([[provides]])[]dnl
|
||||
]b4_percent_code_get([[provides]])[
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])[]dnl
|
||||
])
|
||||
|
||||
## -------------- ##
|
||||
@@ -338,8 +342,9 @@ m4_if(b4_prefix, [yy], [],
|
||||
# define YYTOKEN_TABLE ]b4_token_table[
|
||||
#endif
|
||||
|
||||
]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
|
||||
[b4_shared_declarations])[
|
||||
/* In a future release of Bison, this section will be replaced
|
||||
by #include "@basename(]b4_spec_defines_file[@)". */
|
||||
]b4_shared_declarations[
|
||||
|
||||
/* Copy the second part of user declarations. */
|
||||
]b4_user_post_prologue
|
||||
@@ -1997,9 +2002,7 @@ b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Bison interface for Yacc-like parsers in C])[
|
||||
|
||||
]b4_cpp_guard_open([b4_spec_defines_file])[
|
||||
]b4_shared_declarations[
|
||||
]b4_cpp_guard_close([b4_spec_defines_file])[
|
||||
]])dnl b4_defines_if
|
||||
m4_divert_pop(0)
|
||||
m4_popdef([b4_copyright_years])
|
||||
|
||||
Reference in New Issue
Block a user