X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/d782395d52519fabb2cac3bd479246cc6de7efa8..a005a9c4dc5588fc017a1cb1d19c1560e0e68943:/data/push.c diff --git a/data/push.c b/data/push.c index d96712b7..b0cbeb32 100644 --- a/data/push.c +++ b/data/push.c @@ -18,12 +18,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Check the value of %define push_pull. -b4_percent_define_default([[push_pull]], [[pull]]) -b4_percent_define_check_values([[[[push_pull]], [[pull]], [[push]], [[both]]]]) +# Check the value of %define api.push_pull. +b4_percent_define_default([[api.push_pull]], [[pull]]) +b4_percent_define_check_values([[[[api.push_pull]], + [[pull]], [[push]], [[both]]]]) b4_define_flag_if([pull]) m4_define([b4_pull_flag], [[1]]) b4_define_flag_if([push]) m4_define([b4_push_flag], [[1]]) -m4_case(b4_percent_define_get([[push_pull]]), +m4_case(b4_percent_define_get([[api.push_pull]]), [pull], [m4_define([b4_push_flag], [[0]])], [push], [m4_define([b4_pull_flag], [[0]])]) @@ -50,6 +51,10 @@ m4_define_default([b4_stack_depth_init], [200]) ## Pure/impure interfaces. ## ## ------------------------ ## +b4_percent_define_default([[api.pure]], [[false]]) +b4_define_flag_if([pure]) +m4_define([b4_pure_flag], + [b4_percent_define_flag_if([[api.pure]], [[1]], [[0]])]) # b4_yacc_pure_if(IF-TRUE, IF-FALSE) # ---------------------------------- @@ -162,14 +167,9 @@ b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],dnl ' define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -]b4_identification[ -/* Push parsers. */ -#define YYPUSH ]b4_push_flag[ +]b4_identification -/* Pull parsers. */ -#define YYPULL ]b4_pull_flag[ - -]b4_percent_code_get([[top]])[]dnl +b4_percent_code_get([[top]])[]dnl m4_if(b4_prefix, [yy], [], [[/* Substitute the variable and function names. */ ]b4_pull_if([[#define yyparse ]b4_prefix[parse