bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] c++: api.token.constructor requires api.value.type=variant


From: Akim Demaille
Subject: [PATCH 1/2] c++: api.token.constructor requires api.value.type=variant
Date: Fri, 8 Feb 2013 17:28:42 +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 | 10 ++++++++++
 data/glr.cc |  6 ------
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/data/c++.m4 b/data/c++.m4
index b034a4a..a63cbce 100644
--- a/data/c++.m4
+++ b/data/c++.m4
@@ -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]))])])
diff --git a/data/glr.cc b/data/glr.cc
index 0afceea..0164eda 100644
--- a/data/glr.cc
+++ b/data/glr.cc
@@ -43,12 +43,6 @@
 #   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])
 
-- 
1.8.1.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]