]> git.saurik.com Git - bison.git/blobdiff - data/glr.cc
lalr1.cc: don't generate location.hh when location_type is defined
[bison.git] / data / glr.cc
index 068f9a314053f12126fb7884677302c10d3b9800..fb9a87b662b04bf3b82edaf8a18a279b23d8252c 100644 (file)
@@ -229,7 +229,8 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
 
 #include <string>
 #include <iostream>
-#include "location.hh"
+]b4_percent_define_ifdef([[location_type]], [],
+                         [[#include "location.hh"]])[
 
 /* Using locations.  */
 #define YYLSP_NEEDED ]b4_locations_flag[
@@ -277,7 +278,8 @@ b4_user_stype
     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
     {