mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 08:13:02 +00:00
yacc.c: support "%define api.pure full"
This makes the interface for yyerror() pure without the need for a spurious parse_param. * data/yacc.c (b4_pure_if, b4_pure_flag): New definition, accept three states. (b4_yacc_pure_if): Rename as... (b4_yyerror_arg_loc_if): This, and use b4_pure_flag. * tests/actions.at (%define api.pure): Modernize. * test/calc.at (Simple LALR Calculator): Modernize. * tests/local.at (AT_YYERROR_ARG_LOC_IF): Adjust.
This commit is contained in:
@@ -168,6 +168,7 @@ m4_pushdef([AT_API_PREFIX],
|
||||
m4_pushdef([AT_YYERROR_ARG_LOC_IF],
|
||||
[AT_LOCATION_IF([AT_PURE_IF([m4_bmatch([$3],
|
||||
m4_quote(m4_join([\|],
|
||||
[%define api.pure "?full"?],
|
||||
[%glr-parser],
|
||||
[%parse-param],
|
||||
[%skeleton "?glr.c"?])),
|
||||
@@ -355,6 +356,7 @@ static
|
||||
}]dnl
|
||||
])
|
||||
|
||||
# AT_YYERROR_FORMALS
|
||||
# AT_YYERROR_PROTOTYPE
|
||||
# AT_YYERROR_DECLARE_EXTERN
|
||||
# AT_YYERROR_DECLARE
|
||||
|
||||
Reference in New Issue
Block a user