]> git.saurik.com Git - bison.git/commitdiff
c++: api.token.constructor requires api.value.type=variant
authorAkim Demaille <akim@lrde.epita.fr>
Fri, 8 Feb 2013 14:25:18 +0000 (15:25 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Fri, 8 Feb 2013 16:28:02 +0000 (17:28 +0100)
Eventually it should also support "union".

* data/glr.cc: Move this check to...
* data/c++.m4: here, as lalr1.cc is affected too.

data/c++.m4
data/glr.cc

index b034a4a629e66bb33f5d980e26d982b5917544c0..a63cbce48b38b8331802744447c6782e434a9d6c 100644 (file)
@@ -520,3 +520,13 @@ m4_define([b4_yylloc_default_define],
     while (/*CONSTCOND*/ false)
 # endif
 ]])
+
+## -------- ##
+## Checks.  ##
+## -------- ##
+
+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]))])])
index 0afceeac00c9bcadd956a61a52ae8eb264354621..0164eda6b439c5ddde10e82bac75b6342f4c32c9 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])