mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
lalr1.cc: also handle syntax_error when calling yylex.
* data/lalr1.cc (parse): Catch syntax_error around yylex and forward them to errlab1. * tests/c++.at (Syntax error as exception): Check support for syntax exceptions raised by the scanner. * NEWS, doc/bison.texinfo: Document it.
This commit is contained in:
9
NEWS
9
NEWS
@@ -24,6 +24,15 @@ Bison News
|
||||
Also, it is possible to add code to the parser's constructors using
|
||||
"%code init" and "%define init_throws".
|
||||
|
||||
** C++ skeleton improvements
|
||||
|
||||
The C++ parser features a syntax_error exception, which can be
|
||||
thrown from the scanner or from user rules to raise syntax errors.
|
||||
This facilitates reporting errors caught in sub-functions (e.g.,
|
||||
rejecting too large integral literals from a conversion function
|
||||
used by the scanner, or rejecting invalid combinations from a
|
||||
factory invoked by the user actions).
|
||||
|
||||
** Variable api.tokens.prefix
|
||||
|
||||
The variable api.tokens.prefix changes the way tokens are identified in
|
||||
|
||||
Reference in New Issue
Block a user