* src/output.c (symbol_definitions_output): Rename symbol
attributes type_name and has_type_name as type and has_type.
* data/lalr1.cc: Adjust uses.
+2008-11-13 Akim Demaille <demaille@gostai.com>
+
+ Simplify names.
+ * src/output.c (symbol_definitions_output): Rename symbol
+ attributes type_name and has_type_name as type and has_type.
+ * data/lalr1.cc: Adjust uses.
+
2008-11-13 Akim Demaille <demaille@gostai.com>
Use b4_type_names for the union type.
2008-11-13 Akim Demaille <demaille@gostai.com>
Use b4_type_names for the union type.
# Run actions for the symbol NUMS that all have the same type-name.
# Skip NUMS that have no type-name.
m4_define([b4_type_action_],
# Run actions for the symbol NUMS that all have the same type-name.
# Skip NUMS that have no type-name.
m4_define([b4_type_action_],
-[b4_symbol_if([$1], [has_type_name],
+[b4_symbol_if([$1], [has_type],
[m4_map([b4_symbol_case_], [$@])[]dnl
b4_dollar_dollar([b4_symbol([$1], [number])],
[b4_symbol([$1], [tag])],
[m4_map([b4_symbol_case_], [$@])[]dnl
b4_dollar_dollar([b4_symbol([$1], [number])],
[b4_symbol([$1], [tag])],
- [b4_symbol([$1], [type_name])]);
+ [b4_symbol([$1], [type])]);
m4_define([b4_symbol_constructor_declaration_],
[ template <token_type>
static inline symbol_type
m4_define([b4_symbol_constructor_declaration_],
[ template <token_type>
static inline symbol_type
- make_symbol (b4_args(b4_symbol_if([$1], [has_type_name],
- [const b4_symbol([$1], [type_name])& v]),
+ make_symbol (b4_args(b4_symbol_if([$1], [has_type],
+ [const b4_symbol([$1], [type])& v]),
b4_locations_if([const location_type& l])));
])
b4_locations_if([const location_type& l])));
])
inline
b4_parser_class_name::symbol_type
b4_parser_class_name::make_symbol <b4_parser_class_name::token::b4_symbol([$1], [id])> (dnl
inline
b4_parser_class_name::symbol_type
b4_parser_class_name::make_symbol <b4_parser_class_name::token::b4_symbol([$1], [id])> (dnl
-b4_args(b4_symbol_if([$1], [has_type_name],
- [const b4_symbol([$1], [type_name])& v]),
+b4_args(b4_symbol_if([$1], [has_type],
+ [const b4_symbol([$1], [type])& v]),
b4_locations_if([const b4_parser_class_name::location_type& l])));
])])])
b4_locations_if([const b4_parser_class_name::location_type& l])));
])])])
[ template <>
b4_parser_class_name::symbol_type
b4_parser_class_name::make_symbol <b4_parser_class_name::token::b4_symbol([$1], [id])> (dnl
[ template <>
b4_parser_class_name::symbol_type
b4_parser_class_name::make_symbol <b4_parser_class_name::token::b4_symbol([$1], [id])> (dnl
-b4_args(b4_symbol_if([$1], [has_type_name],
- [const b4_symbol([$1], [type_name])& v]),
+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]))],
b4_locations_if([const location_type& l])))
{
return symbol_type (b4_args([yytranslate_ (token::b4_symbol([$1], [id]))],
- b4_symbol_if([$1], [has_type_name], [v]),
+ b4_symbol_if([$1], [has_type], [v]),
b4_locations_if([l])));
}
b4_locations_if([l])));
}
#
# for defined type names.
m4_define([b4_char_sizeof],
#
# for defined type names.
m4_define([b4_char_sizeof],
-[b4_symbol_if([$1], [has_type_name],
+[b4_symbol_if([$1], [has_type],
[
m4_map([b4_char_sizeof_], [$@])dnl
[
m4_map([b4_char_sizeof_], [$@])dnl
- char _b4_char_sizeof_dummy@{sizeof([b4_symbol([$1], [type_name])])@};
+ char _b4_char_sizeof_dummy@{sizeof([b4_symbol([$1], [type])])@};
SET_KEY("number");
MUSCLE_INSERT_INT (key, sym->number);
SET_KEY("number");
MUSCLE_INSERT_INT (key, sym->number);
- SET_KEY("has_type_name");
MUSCLE_INSERT_INT (key, !!sym->type_name);
MUSCLE_INSERT_INT (key, !!sym->type_name);
MUSCLE_INSERT_STRING (key, sym->type_name ? sym->type_name : "");
#undef SET_KEY
MUSCLE_INSERT_STRING (key, sym->type_name ? sym->type_name : "");
#undef SET_KEY