mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
b4_semantic_type_declare.
* data/c++.m4 (b4_semantic_type_declare): New. Factors and generalizes what was in glr.cc and lalr1.cc. * data/variant.hh (b4_semantic_type_declare): Redefine it for variants. * data/lalr1.cc, data/glr.cc: Use it.
This commit is contained in:
@@ -389,21 +389,7 @@ do { \
|
||||
{
|
||||
public:
|
||||
#ifndef YYSTYPE
|
||||
]b4_variant_if(
|
||||
[ /// An auxiliary type to compute the largest semantic type.
|
||||
union union_type
|
||||
{]b4_type_foreach([b4_char_sizeof])[};
|
||||
|
||||
/// Symbol semantic values.
|
||||
typedef variant<sizeof(union_type)> semantic_type;],
|
||||
[ /// Symbol semantic values.
|
||||
m4_ifdef([b4_stype],
|
||||
[ union semantic_type
|
||||
{b4_user_stype
|
||||
};],
|
||||
[m4_if(b4_tag_seen_flag, 0,
|
||||
[[ typedef int semantic_type;]],
|
||||
[[ typedef YYSTYPE semantic_type;]])])])[
|
||||
]b4_semantic_type_declare[
|
||||
#else
|
||||
typedef YYSTYPE semantic_type;
|
||||
#endif]b4_locations_if([
|
||||
|
||||
Reference in New Issue
Block a user