X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/f16b08196c780556cbf50691e2944960aebc46f6..ab7f29f8f9a7ad89b6a3163f913e1ee2b7889223:/data/yacc.c diff --git a/data/yacc.c b/data/yacc.c index 04352a0d..96b91bed 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -3,7 +3,7 @@ # Yacc compatible skeleton for Bison # Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. +# 2007, 2008 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,8 +18,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Handle BISON_USE_PUSH_FOR_PULL for the test suite. -b4_use_push_for_pull_if([m4_include(b4_pkgdatadir/[push.c])], [ +# This hack will go away when we mv push.c yacc.c. +m4_ifndef([b4_percent_define(api.push_pull)], +[m4_if(b4_use_push_for_pull_flag, [0], [ m4_include(b4_pkgdatadir/[c.m4]) @@ -36,6 +37,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) # ---------------------------------- @@ -1013,10 +1018,10 @@ b4_c_function_def([yyparse], [int], b4_parse_param) YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. + /* The stacks and their tools: + `yyss' is related to states. + `yyvs' is related to semantic values.]b4_locations_if([[ + `yyls' is related to locations.]])[ Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -1532,4 +1537,6 @@ b4_percent_code_get([[provides]]) ])dnl b4_defines_if m4_divert_pop(0) -])dnl b4_use_push_for_pull_if +], +[m4_include(b4_pkgdatadir/[push.c])])], +[m4_include(b4_pkgdatadir/[push.c])])