]> git.saurik.com Git - bison.git/blobdiff - data/glr.cc
tests: add -pedantic for --enable-gcc-warnings.
[bison.git] / data / glr.cc
index ea04b28dff343713be1ec986dd78a49259d3cdc4..15b113f7f4e251615e4b753cd709928baa410dbc 100644 (file)
@@ -1,8 +1,8 @@
                                                                     -*- C -*-
 
 # C++ GLR skeleton for Bison
                                                                     -*- C -*-
 
 # C++ GLR skeleton for Bison
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
-# Inc.
+
+# Copyright (C) 2002-2011 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
@@ -54,7 +54,8 @@ b4_defines_if([],
               [b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
 
 m4_include(b4_pkgdatadir/[c++.m4])
               [b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
 
 m4_include(b4_pkgdatadir/[c++.m4])
-m4_include(b4_pkgdatadir/[location.cc])
+b4_percent_define_ifdef([[location_type]], [],
+                        [m4_include(b4_pkgdatadir/[location.cc])])
 
 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]])])
@@ -217,9 +218,9 @@ m4_include(b4_pkgdatadir/[glr.c])
 m4_popdef([b4_parse_param])
 
 m4_divert_push(0)
 m4_popdef([b4_parse_param])
 
 m4_divert_push(0)
-@output(b4_spec_defines_file@)
+@output(b4_spec_defines_file@)@
 b4_copyright([Skeleton interface for Bison GLR parsers in C++],
 b4_copyright([Skeleton interface for Bison GLR parsers in C++],
-  [2002, 2003, 2004, 2005, 2006])[
+             [2002-2006, 2009-2011])[
 
 /* C++ GLR parser skeleton written by Akim Demaille.  */
 
 
 /* C++ GLR parser skeleton written by Akim Demaille.  */
 
@@ -230,17 +231,12 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
 
 #include <string>
 #include <iostream>
 
 #include <string>
 #include <iostream>
+]b4_percent_define_ifdef([[location_type]], [],
+                         [[#include "location.hh"]])[
 
 /* Using locations.  */
 #define YYLSP_NEEDED ]b4_locations_flag[
 
 
 /* Using locations.  */
 #define YYLSP_NEEDED ]b4_locations_flag[
 
-]b4_namespace_open[
-  class position;
-  class location;
-]b4_namespace_close[
-
-#include "location.hh"
-
 /* Enabling traces.  */
 #ifndef YYDEBUG
 # define YYDEBUG ]b4_debug_flag[
 /* Enabling traces.  */
 #ifndef YYDEBUG
 # define YYDEBUG ]b4_debug_flag[
@@ -284,7 +280,8 @@ b4_user_stype
     typedef YYSTYPE semantic_type;
 #endif
     /// Symbol locations.
     typedef YYSTYPE semantic_type;
 #endif
     /// Symbol locations.
-    typedef ]b4_percent_define_get([[location_type]])[ location_type;
+    typedef ]b4_percent_define_get([[location_type]],
+                                   [[location]])[ location_type;
     /// Tokens.
     struct token
     {
     /// Tokens.
     struct token
     {