%define push_pull -> %define api.push_pull. Discussed starting at

<http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
* data/push.c: Expect the new name.
* data/yacc.c: Likewise.
* doc/bison.texinfo (Push Decl): Update.
(Decl Summary): Update %define entry.
(Push Parser Function): Update.
(Pull Parser Function): Update.
(Parser Create Function): Update.
(Parser Delete Function): Update.
* tests/calc.at (Simple LALR Calculator): Update.
* tests/input.at (%define enum variables): Update.
* tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
(Push Parsing: Multiple impure instances): Update.
(Push Parsing: Unsupported Skeletons): Update.
* tests/torture.at (Exploding the Stack Size with Alloca): Update.
(Exploding the Stack Size with Malloc): Update.

* NEWS (2.3a+): Add an entry for the push parser, and clean up the
other entries some.
This commit is contained in:
Joel E. Denny
2007-10-28 20:11:35 +00:00
parent 32f19b6b47
commit c373bf8bb8
9 changed files with 96 additions and 51 deletions

View File

@@ -560,7 +560,7 @@ AT_CHECK_CALC_LALR([%yacc])
AT_CHECK_CALC_LALR([%error-verbose])
AT_CHECK_CALC_LALR([%pure-parser %locations])
AT_CHECK_CALC_LALR([%define push_pull "both" %pure-parser %locations])
AT_CHECK_CALC_LALR([%define api.push_pull "both" %pure-parser %locations])
AT_CHECK_CALC_LALR([%error-verbose %locations])
AT_CHECK_CALC_LALR([%error-verbose %locations %defines %name-prefix "calc" %verbose %yacc])
@@ -569,7 +569,7 @@ AT_CHECK_CALC_LALR([%debug])
AT_CHECK_CALC_LALR([%error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc])
AT_CHECK_CALC_LALR([%pure-parser %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc])
AT_CHECK_CALC_LALR([%define push_pull "both" %pure-parser %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc])
AT_CHECK_CALC_LALR([%define api.push_pull "both" %pure-parser %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc])
AT_CHECK_CALC_LALR([%pure-parser %error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])

View File

@@ -848,13 +848,13 @@ AT_CLEANUP
AT_SETUP([[%define enum variables]])
AT_DATA([[input.y]],
[[%define push_pull "neither"
[[%define api.push_pull "neither"
%%
start: ;
]])
AT_CHECK([[bison input.y]], [1], [],
[[input.y:1.9-17: invalid value for %define variable `push_pull': `neither'
[[input.y:1.9-21: invalid value for %define variable `api.push_pull': `neither'
]])
AT_CLEANUP

View File

@@ -33,7 +33,7 @@ AT_DATA_GRAMMAR([[input.y]],
void yyerror (char const *msg);
%}
%pure-parser %define push_pull "push"
%pure-parser %define api.push_pull "push"
%%
@@ -92,7 +92,7 @@ AT_DATA_GRAMMAR([[input.y]],
int yylex (void);
%}
%define push_pull "both"
%define api.push_pull "both"
%%
@@ -158,13 +158,13 @@ AT_SETUP([[Push Parsing: Unsupported Skeletons]])
AT_DATA([[input.y]],
[[%glr-parser
%define push_pull "push"
%define api.push_pull "push"
%%
start: ;
]])
AT_CHECK([[bison input.y]], [0], [],
[[input.y:2.9-17: warning: %define variable `push_pull' is not used
[[input.y:2.9-21: warning: %define variable `api.push_pull' is not used
]])
AT_CLEANUP

View File

@@ -496,7 +496,7 @@ AT_PARSER_CHECK([./input 10000], 2, [], [ignore],
# just helps guarantee we don't let the YYSTACK_USE_ALLOCA feature affect
# push parsers.
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA],
[[%define push_pull "both"
[[%define api.push_pull "both"
]])
AT_PARSER_CHECK([./input 20], 0, [], [ignore],
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
@@ -534,7 +534,7 @@ AT_PARSER_CHECK([./input 10000], 2, [], [ignore],
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA],
[[%define push_pull "both"
[[%define api.push_pull "both"
]])
AT_PARSER_CHECK([./input 20], 0, [], [ignore],
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])