]> git.saurik.com Git - bison.git/blobdiff - data/glr.c
* src/lalr.c (state_lookahead_tokens_count): Correct comment.
[bison.git] / data / glr.c
index 410c450025d36d7d96fd03c5929a8c0662bf7214..661db956bf79f889866ea9480e8b4af2271eb2f4 100644 (file)
@@ -1,30 +1,25 @@
                                                                     -*- 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, 2009 Free
+# Software Foundation, Inc.
 
-# This program is free software; you can redistribute it and/or modify
+# 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
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-
+#
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301  USA
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 m4_include(b4_pkgdatadir/[c.m4])
 
-b4_push_if([
-b4_complain([[non-deterministic push parsers are not yet supported]])])
-
 ## ---------------- ##
 ## Default values.  ##
 ## ---------------- ##
@@ -39,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
 # ---------------
@@ -146,9 +148,9 @@ m4_define([b4_rhs_location],
 # We do want M4 expansion after # for CPP macros.
 m4_changecom()
 m4_divert_push(0)dnl
-@output(b4_parser_file_name@)
+@output(b4_parser_file_name@)@
 b4_copyright([Skeleton implementation for Bison GLR parsers in C],
-  [2002, 2003, 2004, 2005, 2006])
+             [2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009])
 [
 /* C GLR parser skeleton written by Paul Hilfinger.  */
 
@@ -410,9 +412,9 @@ static const ]b4_int_type_for([b4_merger])[ yymerger[] =
   ]b4_merger[
 };
 
-/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
-   doesn't specify something else to do.  Zero means the default is an
-   error.  */
+/* YYDEFACT[S] -- default reduction number in state S.  Performed when
+   YYTABLE doesn't specify something else to do.  Zero means the default
+   is an error.  */
 static const ]b4_int_type_for([b4_defact])[ yydefact[] =
 {
   ]b4_defact[
@@ -2635,17 +2637,17 @@ dnl glr.cc produces its own header.
 dnl
 m4_if(b4_skeleton, ["glr.c"],
 [b4_defines_if(
-[@output(b4_spec_defines_file@)
+[@output(b4_spec_defines_file@)@
 b4_copyright([Skeleton interface for Bison GLR parsers in C],
-  [2002, 2003, 2004, 2005, 2006])
+             [2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009])
 
 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)