mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 00:33:03 +00:00
lalr1.cc: YY_ASSERT should use api.prefix
Working on the previous commit I realized that YY_ASSERT was used in the generated headers, so must follow api.prefix to avoid clashes when multiple C++ parser with variants are used. Actually many more macros should obey api.prefix (YY_CPLUSPLUS, YY_COPY, etc.). There was no complaint so far, so it's not urgent enough for 3.7.4, but it should be addressed in 3.8. * data/skeletons/variant.hh (b4_assert): New. Use it. * tests/local.at (AT_YYLEX_RETURN): Fix. * tests/headers.at: Make sure variant-based C++ parsers are checked too. This test did find that YY_ASSERT escaped renaming (before the fix in this commit).
This commit is contained in:
@@ -351,7 +351,7 @@ AT_TOKEN_CTOR_IF(
|
||||
[m4_pushdef([AT_LOC], [[(]AT_NAME_PREFIX[lloc)]])
|
||||
m4_pushdef([AT_VAL], [[(]AT_NAME_PREFIX[lval)]])
|
||||
m4_pushdef([AT_YYLEX_FORMALS], [])
|
||||
m4_pushdef([AT_YYLEX_RETURN], [yy::parser::symbol_type])
|
||||
m4_pushdef([AT_YYLEX_RETURN], [AT_NAMESPACE::parser::symbol_type])
|
||||
m4_pushdef([AT_YYLEX_ARGS], [])
|
||||
m4_pushdef([AT_USE_LEX_ARGS], [])
|
||||
m4_pushdef([AT_YYLEX_PRE_FORMALS], [])
|
||||
|
||||
Reference in New Issue
Block a user