Dub make_TOKEN as a public type interface.

* data/c++.m4 (b4_symbol_constructor_declare)
	(b4_symbol_constructor_define): New empty stubs.
	(b4_public_types_declare, b4_public_types_define): Use them.
	* data/lalr1.cc (b4_symbol_constructor_declare)
	(b4_symbol_constructor_declare_)
	(b4_symbol_constructor_define_, b4_symbol_constructor_define):
	Move to...
	* data/variant.hh: here.
	Remove the "b4_variant_if" parts, as variant.hh is loaded only if
	needed.
	* data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
	b4_symbol_constructor_declare, as it is now done by
	b4_public_types_define and b4_public_types_declare.
This commit is contained in:
Akim Demaille
2008-12-31 16:08:02 +01:00
parent 5f5a90dff6
commit 0623bacc05
4 changed files with 91 additions and 61 deletions

View File

@@ -186,7 +186,7 @@ m4_define([b4_public_types_declare],
/// Its token.
inline token_type token () const;
};
]])
]b4_symbol_constructor_declare])
# b4_public_types_define
@@ -281,7 +281,18 @@ m4_define([b4_public_types_define],
};
return static_cast<token_type> (yytoken_number_[type]);
}
]])])
]])[]dnl
b4_symbol_constructor_define])
# b4_symbol_constructor_declare
# b4_symbol_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], [])
# b4_lhs_value([TYPE])