mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
d: add push parser support
Support the push-pull directive with the options pull, push and both. Pull remains the default option. * data/skeletons/d.m4: Add user aliases for the push parser's return values: PUSH_MORE, ABORT, ACCEPT. * data/skeletons/lalr1.d: Add push parser support. * tests/calc.at: Test it.
This commit is contained in:
committed by
Akim Demaille
parent
4bd4cdf377
commit
9ba3c5ceb9
@@ -540,7 +540,7 @@ m4_define([AT_CALC_MAIN(d)],
|
||||
auto l = calcLexer (input);
|
||||
auto p = new YYParser (l);]AT_DEBUG_IF([[
|
||||
p.setDebugLevel (1);]])[
|
||||
return !p.parse ();
|
||||
return !p.parse();
|
||||
}
|
||||
]])
|
||||
|
||||
@@ -1510,6 +1510,8 @@ AT_CHECK_CALC_LALR1_D([%locations %define parse.lac full %define parse.error det
|
||||
|
||||
AT_CHECK_CALC_LALR1_D([%define api.token.constructor %locations %define parse.error custom %define api.value.type union])
|
||||
AT_CHECK_CALC_LALR1_D([%define api.token.constructor %locations %define parse.error detailed])
|
||||
AT_CHECK_CALC_LALR1_D([%define api.push-pull both])
|
||||
AT_CHECK_CALC_LALR1_D([%define parse.trace %define parse.error custom %locations %define api.push-pull both %define parse.lac full])
|
||||
|
||||
# ----------------------- #
|
||||
# LALR1 Java Calculator. #
|
||||
|
||||
Reference in New Issue
Block a user