]> git.saurik.com Git - bison.git/blobdiff - data/lalr1.cc
* build-aux/Makefile.am: Ship cross-options.pl.
[bison.git] / data / lalr1.cc
index 63712265cb7a9fc91c1d3bcb0037f7259858c5f8..7ecc525b88c7549162716cc55f606f582657cc01 100644 (file)
@@ -3,27 +3,23 @@
 # Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 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])
 
 m4_define([b4_parser_class_name],
           [b4_percent_define_get([[parser_class_name]])])
-m4_define([b4_namespace],
-          [b4_percent_define_get([[namespace]])])
 
 # The header is mandatory.
 b4_defines_if([],
@@ -53,11 +49,10 @@ dnl FIXME: This is wrong, we want computed header guards.
 #include <iostream>
 #include "stack.hh"
 
-namespace ]b4_namespace[
-{
+]b4_namespace_open[
   class position;
   class location;
-}
+]b4_namespace_close[
 
 #include "location.hh"
 
@@ -98,8 +93,7 @@ do {                                                  \
 } while (false)
 #endif
 
-namespace ]b4_namespace[
-{
+]b4_namespace_open[
 
   /// A Bison parser.
   class ]b4_parser_class_name[
@@ -288,14 +282,14 @@ b4_error_verbose_if([, int tok])[);
     static const token_number_type yyundef_token_;
 ]b4_parse_param_vars[
   };
-}
+]b4_namespace_close[
 
 ]b4_percent_define_flag_if([[global_tokens_and_yystype]],
 [b4_token_defines(b4_tokens)
 
 #ifndef YYSTYPE
  /* Redirection for backward compatibility.  */
-# define YYSTYPE b4_namespace::b4_parser_class_name::semantic_type
+# define YYSTYPE b4_namespace_ref::b4_parser_class_name::semantic_type
 #endif
 ])
 b4_percent_code_get([[provides]])[]dnl
@@ -377,8 +371,7 @@ do {                                        \
 #define YYABORT                goto yyabortlab
 #define YYERROR                goto yyerrorlab
 
-namespace ]b4_namespace[
-{
+]b4_namespace_open[
 #if YYERROR_VERBOSE
 
   /* Return YYSTR after stripping away unnecessary quotes and
@@ -1051,7 +1044,7 @@ b4_error_verbose_if([, int tok])[)
   const unsigned int ]b4_parser_class_name[::yyuser_token_number_max_ = ]b4_user_token_number_max[;
   const ]b4_parser_class_name[::token_number_type ]b4_parser_class_name[::yyundef_token_ = ]b4_undef_token_number[;
 
-} // namespace ]b4_namespace[
+]b4_namespace_close[
 
 ]b4_epilogue
 dnl
@@ -1064,8 +1057,7 @@ b4_copyright([Stack handling for Bison parsers in C++],
 
 #include <deque>
 
-namespace ]b4_namespace[
-{
+]b4_namespace_open[
   template <class T, class S = std::deque<T> >
   class stack
   {
@@ -1151,7 +1143,7 @@ namespace ]b4_namespace[
     const S& stack_;
     unsigned int range_;
   };
-}
+]b4_namespace_close[
 
 #endif // not BISON_STACK_HH]
 m4_divert_pop(0)