lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.

* data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
	constructor to take a token_type instead of the (internal) symbol
	number.
	Call yytranslate_.
	* data/variant.hh (b4_symbol_constructor_define_): Therefore,
	don't call yytranslate_ here.
This commit is contained in:
Akim Demaille
2009-09-09 23:09:22 +02:00
parent c981ce9b2b
commit 2b08bcebf0
4 changed files with 23 additions and 12 deletions

View File

@@ -262,7 +262,7 @@ b4_args(b4_symbol_if([$1], [has_type],
[const b4_symbol([$1], [type])& v]),
b4_locations_if([const location_type& l])))
{
return symbol_type (b4_args([yytranslate_ (token::b4_symbol([$1], [id]))],
return symbol_type (b4_args([token::b4_symbol([$1], [id])],
b4_symbol_if([$1], [has_type], [v]),
b4_locations_if([l])));
}