]> git.saurik.com Git - bison.git/blobdiff - data/yacc.c
Accept a token number in a %left, %right, or %nonassoc for POSIX
[bison.git] / data / yacc.c
index 04352a0dbfef10e8d02e20a8262b0852b365f765..96b91bedb47ae1c63024c1c39a32618c9a05b0a9 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
 
-# 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])])