glr2.cc: fork glr.cc to a c++ version

This is a fork of glr.cc to be c++-first instead of a wrapper around
glr.c.

* data/skeletons/glr2.cc: New.
* data/skeletons/bison.m4, data/skeletons/c++.m4: Adjust.
* data/skeletons/c.m4 (b4_user_args_no_comma): New.
* src/reader.c (grammar_rule_check_and_complete): glr2.cc is C++.
* tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
* tests/input.at, tests/local.at, tests/regression.at, tests/scanner.at,
* tests/synclines.at, tests/types.at: Also check glr2.cc.
This commit is contained in:
Valentin Tolmer
2020-07-01 11:02:36 +02:00
committed by Akim Demaille
parent a1b7fef045
commit ef09bf065a
17 changed files with 3344 additions and 11 deletions

13
NEWS
View File

@@ -6,6 +6,19 @@ GNU Bison NEWS
Push parsers use YYMALLOC/YYFREE instead of direct calls to malloc/free.
** Changes
A new version of the generated C++ GLR parser was added as "glr2.cc". It
is forked from the existing glr.c/cc parser, with the objective of making
it a more modern, truly C++ parser (instead of a C++ wrapper around a C
parser). Down the line, the goal is to support `%define api.value.type
variant` and maybe share code with lalr1.cc.
The current parser should be identical in terms of interface, functionality
and performance to "glr.cc". To try it out, simply use
%skeleton "glr2.cc"
* Noteworthy changes in release 3.7.1 (2020-08-02) [stable]
** Bug fixes