c++: style: rename a few macros for clarity

* data/c++.m4, data/lalr1.cc, data/variant.hh:
s/b4_symbol_constructor/b4_token_constructor/g, as this is really what
is being defined.
This commit is contained in:
Akim Demaille
2018-12-22 18:24:01 +01:00
parent e5780041b9
commit 0978148763
3 changed files with 23 additions and 23 deletions

View File

@@ -341,8 +341,8 @@ m4_define([b4_symbol_type_declare],
symbol_type () {};
/// Constructor for valueless symbols, and symbols from each type.
]b4_type_foreach([_b4_symbol_constructor_declare])[
]])[};
]b4_type_foreach([_b4_token_constructor_declare])dnl
])[};
]])
@@ -488,16 +488,16 @@ m4_define([b4_public_types_define],
}
]])[]dnl
b4_symbol_constructor_define])
b4_token_constructor_define])
# b4_symbol_constructor_declare
# b4_symbol_constructor_define
# -----------------------------
# b4_token_constructor_declare
# b4_tolen_constructor_define
# ----------------------------
# Declare/define symbol constructors for all the value types.
# Use at class-level. Redefined in variant.hh.
m4_define([b4_symbol_constructor_declare], [])
m4_define([b4_symbol_constructor_define], [])
m4_define([b4_token_constructor_declare], [])
m4_define([b4_token_constructor_define], [])
# b4_yytranslate_define(cc|hh)

View File

@@ -216,7 +216,7 @@ m4_define([b4_shared_declarations],
/// Report a syntax error.
void error (const syntax_error& err);
]b4_symbol_constructor_declare[
]b4_token_constructor_declare[
private:
/// This class is not copyable.

View File

@@ -368,11 +368,11 @@ m4_define([_b4_token_maker_declare],
])])
# _b4_symbol_constructor_declare(SYMBOL-NUM...)
# ---------------------------------------------
# _b4_token_constructor_declare(SYMBOL-NUM...)
# --------------------------------------------
# Declare a unique make_symbol for all the SYMBOL-NUM (they
# have the same type). Use at class-level.
m4_define([_b4_symbol_constructor_declare],
m4_define([_b4_token_constructor_declare],
[m4_ifval(_b4_includes_tokens($@),
[#if 201103L <= YY_CPLUSPLUS
symbol_type (b4_join(
@@ -390,10 +390,10 @@ m4_define([_b4_symbol_constructor_declare],
])])
# b4_symbol_constructor_declare
# -----------------------------
# Declare symbol constructors. Use at class-level.
m4_define([b4_symbol_constructor_declare],
# b4_token_constructor_declare
# ----------------------------
# Declare token constructors. Use at class-level.
m4_define([b4_token_constructor_declare],
[ // Symbol constructors declarations.
b4_symbol_foreach([_b4_token_maker_declare])])
@@ -432,8 +432,8 @@ m4_define([_b4_token_maker_define],
])])
# _b4_symbol_constructor_define(SYMBOL-NUM...)
# --------------------------------------------
# _b4_token_constructor_define(SYMBOL-NUM...)
# -------------------------------------------
# Declare a unique make_symbol for all the SYMBOL-NUM (they
# have the same type). Use at class-level.
m4_define([_b4_type_clause],
@@ -442,7 +442,7 @@ m4_define([_b4_type_clause],
[tok == token::b4_symbol([$1], [id])],
[tok == b4_symbol([$1], [user_number])])])])
m4_define([_b4_symbol_constructor_define],
m4_define([_b4_token_constructor_define],
[m4_ifval(_b4_includes_tokens($@),
[[#if 201103L <= YY_CPLUSPLUS
inline
@@ -520,10 +520,10 @@ m4_define([b4_basic_symbol_constructor_define],
]])
# b4_symbol_constructor_define
# ----------------------------
# b4_token_constructor_define
# ---------------------------
# Define the overloaded versions of make_symbol for all the value types.
m4_define([b4_symbol_constructor_define],
m4_define([b4_token_constructor_define],
[ // Implementation of make_symbol for each symbol type.
b4_type_foreach([_b4_symbol_constructor_define])
b4_type_foreach([_b4_token_constructor_define])
b4_symbol_foreach([_b4_token_maker_define])])