bison-patches
[Top][All Lists]
Advanced

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

[PATCH 4/5] c++: don't glue functions together


From: Akim Demaille
Subject: [PATCH 4/5] c++: don't glue functions together
Date: Wed, 11 Nov 2020 16:39:50 +0100

* data/skeletons/bison.m4 (b4_type_foreach): Accept a separator.
* data/skeletons/c++.m4: Use it.
And fix an incorrect comment.
---
 data/skeletons/bison.m4 | 6 +++---
 data/skeletons/c++.m4   | 5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/data/skeletons/bison.m4 b/data/skeletons/bison.m4
index 365ee72e..7ab1cb91 100644
--- a/data/skeletons/bison.m4
+++ b/data/skeletons/bison.m4
@@ -633,11 +633,11 @@ m4_define([_b4_type_action],
 
 ])])
 
-# b4_type_foreach(MACRO)
-# ----------------------
+# b4_type_foreach(MACRO, [SEP])
+# -----------------------------
 # Invoke MACRO(SYMBOL-NUMS) for each set of SYMBOL-NUMS for each type set.
 m4_define([b4_type_foreach],
-          [m4_map([$1], m4_defn([b4_type_names]))])
+          [m4_map_sep([$1], [$2], m4_defn([b4_type_names]))])
 
 
 
diff --git a/data/skeletons/c++.m4 b/data/skeletons/c++.m4
index b7a2a3a8..78c66def 100644
--- a/data/skeletons/c++.m4
+++ b/data/skeletons/c++.m4
@@ -321,8 +321,9 @@ m4_define([b4_symbol_type_define],
       /// Copy constructor.
       basic_symbol (const basic_symbol& that);]b4_variant_if([[
 
-      /// Constructor for valueless symbols, and symbols from each type.
-]b4_type_foreach([b4_basic_symbol_constructor_define])], [[
+      /// Constructors for typed symbols.
+]b4_type_foreach([b4_basic_symbol_constructor_define], [
+])], [[
       /// Constructor for valueless symbols.
       basic_symbol (typename Base::kind_type t]b4_locations_if([,
                     YY_MOVE_REF (location_type) l])[);
-- 
2.29.2




reply via email to

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