mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +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
@@ -1461,6 +1461,10 @@ AT_CHECK_CALC_LALR1_D([%define parse.error verbose %debug %define api.token.pref
|
||||
AT_CHECK_CALC_LALR1_D([%define parse.error verbose %debug %define api.symbol.prefix {SYMB_} %verbose])
|
||||
AT_CHECK_CALC_LALR1_D([%define parse.error verbose %debug %define api.symbol.prefix {SYMB_} %define api.token.prefix {TOK_} %verbose])
|
||||
|
||||
AT_CHECK_CALC_LALR1_D([%locations %define parse.lac full %define parse.error verbose])
|
||||
AT_CHECK_CALC_LALR1_D([%locations %define parse.lac full %define parse.error custom])
|
||||
AT_CHECK_CALC_LALR1_D([%locations %define parse.lac full %define parse.error detailed %define parse.trace])
|
||||
|
||||
#AT_CHECK_CALC_LALR1_D([%locations %define parse.error verbose %debug %verbose %parse-param {semantic_value *result}{int *count}{int *nerrs}])
|
||||
#AT_CHECK_CALC_LALR1_D([%locations %define parse.error verbose %debug %define api.prefix {calc} %verbose %parse-param {semantic_value *result}{int *count}{int *nerrs}])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user