]> git.saurik.com Git - bison.git/blobdiff - data/glr.c
* NEWS: Update for recent changes.
[bison.git] / data / glr.c
index 0f0e3daa0a4c79c0a9a7ce4e0bfdb71f35c8ffeb..84637e0e5b9453228ae34883ea60dbd6e60f0022 100644 (file)
@@ -1,8 +1,8 @@
                                                                     -*- C -*-
 
 # GLR skeleton for Bison
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 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
@@ -34,6 +34,13 @@ m4_define_default([b4_stack_depth_init],  [200])
 ## Pure/impure interfaces.  ##
 ## ------------------------ ##
 
+b4_define_flag_if([pure])
+# If glr.cc is including this file and thus has already set b4_pure_flag, don't
+# change the value of b4_pure_flag, and don't record a use of api.pure.
+m4_ifndef([b4_pure_flag],
+[b4_percent_define_default([[api.pure]], [[false]])
+ m4_define([b4_pure_flag],
+           [b4_percent_define_flag_if([[api.pure]], [[1]], [[0]])])])
 
 # b4_user_formals
 # ---------------
@@ -2637,10 +2644,10 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C],
 b4_shared_declarations
 
 b4_pure_if([],
-[[extern YYSTYPE b4_prefix][lval;]])
+[[extern YYSTYPE ]b4_prefix[lval;]])
 
 b4_locations_if([b4_pure_if([],
-[extern YYLTYPE b4_prefix[]lloc;])
+[extern YYLTYPE ]b4_prefix[lloc;])
 ])
 ])])
 m4_divert_pop(0)