glr.cc: don't leak glr.c/glr.cc scaffolding to the user

Until we have a decent reimplementation of glr.cc, we have to use
tricks to shoehorn C++ symbols to the C engine of glr.c.  Some of them
are done via #define.  Unfortunately in Bison 3.6 some of these we
done in the header file, which broke valid user code.

Reported by Egor Pugin.
https://lists.gnu.org/r/bug-bison/2020-06/msg00003.html

* data/skeletons/glr.cc: Stop playing tricks with b4_pre_epilogue.
(b4_glr_cc_setup, b4_glr_cc_cleanup): New.
Much cleaner way to instal glr.cc's scaffolding around glr.c.
* data/skeletons/glr.c: Adjust to use them.
This commit is contained in:
Akim Demaille
2020-06-12 07:28:05 +02:00
parent 508ac09939
commit 3f4ffea6f2
5 changed files with 64 additions and 34 deletions

4
NEWS
View File

@@ -2,6 +2,10 @@ GNU Bison NEWS
* Noteworthy changes in release ?.? (????-??-??) [?]
** Bug fixes
In glr.cc some internal macros leaked in the user's code, and could damage
access to the token kinds.
* Noteworthy changes in release 3.6.3 (2020-06-03) [stable]