mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
(whether successful or failed) so that yypush_parse can be invoked again to start a new parse using the same yypstate. * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to check multiple yypull_parse invocations on the same yypstate. For pull mode, extend to check multiple yyparse invocations. (Exploding the Stack Size with Alloca): Extend to try with %push-pull-parser. (Exploding the Stack Size with Malloc): Likewise. * tests/calc.at (Simple LALR Calculator): Don't specify %skeleton "push.c" since %push-pull-parser implies that now. * tests/headers.at (export YYLTYPE): Don't check for the push declarations. Otherwise, this test case can't be used to see if push mode can truly emulate pull mode. * tests/input.at (Torturing the Scanner): Likewise. * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove. (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use AT_YACC_IF, which now includes the case of push mode since %skeleton need not be used for push mode. This will be more intuitive once push.c is renamed to yacc.c.
This commit is contained in:
@@ -58,10 +58,6 @@ m4_pushdef([AT_LOCATION_IF],
|
||||
[m4_bmatch([$3], [%locations], [$1], [$2])])
|
||||
m4_pushdef([AT_PURE_IF],
|
||||
[m4_bmatch([$3], [%pure-parser], [$1], [$2])])
|
||||
m4_pushdef([AT_PUSH_IF],
|
||||
[m4_bmatch([$3], [%push-parser\|%push-pull-parser], [$1], [$2])])
|
||||
m4_pushdef([AT_YACC_OR_PUSH_IF],
|
||||
[AT_YACC_IF([$1], [AT_PUSH_IF([$1], [$2])])])
|
||||
m4_pushdef([AT_PURE_AND_LOC_IF],
|
||||
[m4_bmatch([$3], [%locations.*%pure-parser\|%pure-parser.*%locations],
|
||||
[$1], [$2])])
|
||||
@@ -78,9 +74,9 @@ m4_pushdef([AT_YYERROR_ARG_LOC_IF],
|
||||
# yyerror always sees the locations (when activated), except if
|
||||
# (yacc & pure & !param). FIXME: This is wrong. See the manual.
|
||||
m4_pushdef([AT_YYERROR_SEES_LOC_IF],
|
||||
[AT_LOCATION_IF([AT_YACC_OR_PUSH_IF([AT_PURE_IF([AT_PARAM_IF([$1], [$2])],
|
||||
[$1])],
|
||||
[$1])],
|
||||
[AT_LOCATION_IF([AT_YACC_IF([AT_PURE_IF([AT_PARAM_IF([$1], [$2])],
|
||||
[$1])],
|
||||
[$1])],
|
||||
[$2])])
|
||||
|
||||
# The interface is pure: either because %pure-parser, or because we
|
||||
|
||||
Reference in New Issue
Block a user