summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdela Vais <adela.vais99@gmail.com>2021-01-29 16:56:13 +0200
committerAkim Demaille <akim.demaille@gmail.com>2021-04-11 07:41:39 +0200
commit9ba3c5ceb9ca51056bb254925bc6708261a3db1c (patch)
treede08110c3bd11f060373bbf59450cec7ef82ab44 /tests
parent4bd4cdf37749bbd589e684f39da9aeb1d2aabc51 (diff)
downloadbison-9ba3c5ceb9ca51056bb254925bc6708261a3db1c.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/calc.at4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/calc.at b/tests/calc.at
index 7475535d..8dffb6b9 100644
--- a/tests/calc.at
+++ b/tests/calc.at
@@ -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. #