]> git.saurik.com Git - bison.git/blobdiff - data/lalr1.cc
Do not use date ranges in copyright notices.
[bison.git] / data / lalr1.cc
index e4cbf6f7c62f42d378b9f9b3419ed470969b7d61..bd1faa560e7b00e13390fd082f17d3457d461807 100644 (file)
@@ -1,6 +1,7 @@
 # C++ skeleton for Bison
 
 # C++ skeleton for Bison
 
-# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+# 2010 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
 
 # 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
@@ -115,7 +116,7 @@ m4_popdef([b4_dollar_dollar])dnl
 
 
 m4_pushdef([b4_copyright_years],
 
 
 m4_pushdef([b4_copyright_years],
-           [2002-2010])
+           [2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010])
 
 m4_define([b4_parser_class_name],
           [b4_percent_define_get([[parser_class_name]])])
 
 m4_define([b4_parser_class_name],
           [b4_percent_define_get([[parser_class_name]])])
@@ -124,10 +125,10 @@ m4_define([b4_parser_class_name],
 b4_defines_if([],
               [b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
 
 b4_defines_if([],
               [b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
 
-b4_locations_if(
-[# Backward compatibility.
-m4_define([b4_location_constructors])
-m4_include(b4_pkgdatadir/[location.cc])])
+b4_locations_if([b4_percent_define_ifdef([[location_type]], [],
+  [# Backward compatibility.
+  m4_define([b4_location_constructors])
+  m4_include(b4_pkgdatadir/[location.cc])])])
 m4_include(b4_pkgdatadir/[stack.hh])
 b4_variant_if([m4_include(b4_pkgdatadir/[variant.hh])])
 
 m4_include(b4_pkgdatadir/[stack.hh])
 b4_variant_if([m4_include(b4_pkgdatadir/[variant.hh])])
 
@@ -150,14 +151,12 @@ dnl FIXME: This is wrong, we want computed header guards.
 #include <string>
 #include <iostream>
 #include "stack.hh"
 #include <string>
 #include <iostream>
 #include "stack.hh"
+]b4_locations_if([b4_percent_define_ifdef([[location_type]], [],
+                                          [[#include "location.hh"]])])[
 
 
-]b4_namespace_open[
-]b4_locations_if([  class position;
-  class location;])[
-]b4_variant_if([b4_variant_define])[
-]b4_namespace_close[
-
-]b4_locations_if([#include "location.hh"])[
+]b4_variant_if([b4_namespace_open
+b4_variant_define
+b4_namespace_close])[
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -177,26 +176,6 @@ dnl FIXME: This is wrong, we want computed header guards.
 # define YYTOKEN_TABLE ]b4_token_table[
 #endif
 
 # define YYTOKEN_TABLE ]b4_token_table[
 #endif
 
-]b4_locations_if([dnl
-[/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
-   If N is 0, then set CURRENT to the empty location which ends
-   the previous symbol: RHS[0] (always defined).  */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)                        \
-do {                                                            \
-  if (N)                                                        \
-    {                                                           \
-      (Current).begin = (Rhs)[1].location.begin;                \
-      (Current).end   = (Rhs)[N].location.end;                 \
-    }                                                           \
-  else                                                          \
-    {                                                           \
-      (Current).begin = (Current).end = (Rhs)[0].location.end; \
-    }                                                           \
-} while (false)
-#endif]])[
-
 ]b4_namespace_open[
 
   /// A Bison parser.
 ]b4_namespace_open[
 
   /// A Bison parser.
@@ -408,6 +387,27 @@ b4_percent_code_get[]dnl
 # endif
 #endif
 
 # endif
 #endif
 
+]b4_locations_if([dnl
+[/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)                               \
+ do                                                                    \
+   if (N)                                                              \
+     {                                                                 \
+       (Current).begin = YYRHSLOC (Rhs, 1).begin;                      \
+       (Current).end   = YYRHSLOC (Rhs, N).end;                        \
+     }                                                                 \
+   else                                                                \
+     {                                                                 \
+       (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end;        \
+     }                                                                 \
+ while (false)
+#endif]])[
+
 /* Suppress unused-variable warnings by "using" E.  */
 #define YYUSE(e) ((void) (e))
 
 /* Suppress unused-variable warnings by "using" E.  */
 #define YYUSE(e) ((void) (e))