mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
d: add support for lookahead correction
When using lookahead correction, the method YYParser.Context.getExpectedTokens is not annotated with const, because the method calls yylacCheck, which is not const. Also, because of yylacStack and yylacEstablished, yylacCheck needs to be called from the context of the parser class, which is sent as parameter to the Context's constructor. * data/skeletons/lalr1.d (yylacCheck, yylacEstablish, yylacDiscard, yylacStack, yylacEstablished): New. (Context): Use it. * doc/bison.texi: Document it. * tests/calc.at: Check it.
This commit is contained in:
committed by
Akim Demaille
parent
0e51f6146a
commit
593724366f
@@ -6885,7 +6885,7 @@ introduced in 3.0 with support for @code{simple} and @code{verbose}. Values
|
||||
@deffn Directive {%define parse.lac} @var{when}
|
||||
|
||||
@itemize
|
||||
@item Languages(s): C/C++ (deterministic parsers only), and Java.
|
||||
@item Languages(s): C/C++ (deterministic parsers only), D and Java.
|
||||
|
||||
@item Purpose: Enable LAC (lookahead correction) to improve
|
||||
syntax error handling. @xref{LAC}.
|
||||
|
||||
Reference in New Issue
Block a user