lalr1.cc: YY_ASSERT should use api.prefix
commit8b424b865e7fc1932131beff5298dfde0623ce28
authorAkim Demaille <akim.demaille@gmail.com>
Wed, 11 Nov 2020 10:39:02 +0000 (11 11:39 +0100)
committerAkim Demaille <akim.demaille@gmail.com>
Fri, 13 Nov 2020 05:17:52 +0000 (13 06:17 +0100)
tree444b80c7c4ab3a0eaee9f3120f0a74f6008c480a
parentf4431ea11541ebb6a0f4d6cec8f120bd0639dd4a
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).
NEWS
data/skeletons/variant.hh
tests/headers.at
tests/local.at