]> git.saurik.com Git - bison.git/blobdiff - data/glr.cc
glr.cc: fatal if using api.token.ctor without variants
[bison.git] / data / glr.cc
index 85aca842d8ef3d3d8e30cf433f8d5489638fb459..5f5a96f4d32f707f4d6d7e8215f54637e06ad918 100644 (file)
 #   user must initialize the first positions (in particular the
 #   filename member).
 
+b4_token_ctor_if([b4_variant_if([],
+  [b4_fatal_at(b4_percent_define_get_loc(api.token.constructor),
+               [cannot use '%s' without '%s'],
+               [%define api.token.constructor],
+               [%define api.value.type variant]))])])
+
 # We require a pure interface.
 m4_define([b4_pure_flag],      [1])
 
@@ -290,7 +296,7 @@ b4_location_define])])[
                                    const semantic_type* yyvaluep]b4_locations_if([[,
                                    const location_type* yylocationp]])[);
   private:
-    /* Debugging.  */
+    // Debugging.
     std::ostream* yycdebug_;
 #endif
 
@@ -318,7 +324,7 @@ b4_defines_if(
 b4_copyright([Skeleton interface for Bison GLR parsers in C++],
              [2002-2012])[
 
-/* C++ GLR parser skeleton written by Akim Demaille.  */
+// C++ GLR parser skeleton written by Akim Demaille.
 
 ]b4_cpp_guard_open([b4_spec_defines_file])[
 ]b4_shared_declarations[