mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
java: add support for lookahead correction
Shamelessly stolen from Adrian Vogelsgesang's implementation in lalr1.cc. * data/skeletons/lalr1.java (yycdebugNnl, yyLacCheck, yyLacEstablish) (yyLacDiscard, yylacStack, yylacEstablished): New. (Context): Use it. * examples/java/calc/Calc.y: Enable LAC.
This commit is contained in:
@@ -23,11 +23,17 @@
|
||||
%define api.parser.public
|
||||
%define api.push-pull push
|
||||
|
||||
// Customized syntax error messages (see reportSyntaxError)...
|
||||
%define parse.error custom
|
||||
%define parse.trace
|
||||
|
||||
// ... with locations...
|
||||
%locations
|
||||
|
||||
// ... and accurate list of expected tokens.
|
||||
%define parse.lac full
|
||||
|
||||
%define parse.trace
|
||||
|
||||
%code imports {
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
|
||||
Reference in New Issue
Block a user