glr.cc: support syntax_error exceptions

Kindly requested by Аскар Сафин (Askar Safin).
http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00033.html

* data/skeletons/glr.c (b4_glr_cc_if): New.
Use it.
(yygetToken): Catch syntax_errors.
* data/skeletons/glr.cc (YY_EXCEPTIONS): New.
* tests/c++.at: Check it.
This commit is contained in:
Akim Demaille
2018-12-30 12:07:30 +01:00
parent 6653c912da
commit 90a8537e62
5 changed files with 63 additions and 6 deletions

5
NEWS
View File

@@ -147,6 +147,11 @@ GNU Bison NEWS
return parser::token::PAIR;
}
*** C++: Syntax error exceptions in GLR
The glr.cc skeleton now supports syntax_error exceptions thrown from user
actions, or from the scanner.
*** More POSIX Yacc compatibility warnings
More Bison specific directives are now reported with -y or -Wyacc. This