* data/bison.m4 (b4_args, _b4_args): Rename as...
(b4_join, _b4_join): these.
* data/c++.m4, data/lalr1.cc, data/variant.hh: Adjust.
[m4_eval([$1 - $2])],
[($1) - ($2)])])
-# b4_args(ARG1, ...)
-# _b4_args(ARG1, ...)
+# b4_join(ARG1, ...)
+# _b4_join(ARG1, ...)
# -------------------
# Join with comma, skipping empty arguments.
-# b4_args calls itself recursively until it sees the first non-empty
-# argument, then calls _b4_args which prepends each non-empty argument
+# b4_join calls itself recursively until it sees the first non-empty
+# argument, then calls _b4_join which prepends each non-empty argument
# with a comma.
-m4_define([b4_args],
+m4_define([b4_join],
[m4_if([$#$1],
[1], [],
[m4_ifval([$1],
[$1[]_$0(m4_shift($@))],
[$0(m4_shift($@))])])])
-# _b4_args(ARGS1, ...)
+# _b4_join(ARGS1, ...)
# --------------------
-m4_define([_b4_args],
+m4_define([_b4_join],
[m4_if([$#$1],
[1], [],
[m4_ifval([$1], [, $1])[]$0(m4_shift($@))])])
/// Constructor.]b4_locations_if([
inline symbol_base_type (const location_type& l)])[;
- inline symbol_base_type (]b4_args(
+ inline symbol_base_type (]b4_join(
[const semantic_type& v],
b4_locations_if([const location_type& l]))[);
inline symbol_type ();
/// Constructor for tokens with semantic value.
- inline symbol_type (]b4_args([token_type t],
+ inline symbol_type (]b4_join([token_type t],
[const semantic_type& v],
b4_locations_if([const location_type& l]))[);
/// Constructor for valueless tokens.
- inline symbol_type (]b4_args([token_type t],
+ inline symbol_type (]b4_join([token_type t],
b4_locations_if([const location_type& l]))[);
/// The symbol type.
template <typename Exact>
inline
- ]b4_parser_class_name[::symbol_base_type<Exact>::symbol_base_type (]b4_args(
+ ]b4_parser_class_name[::symbol_base_type<Exact>::symbol_base_type (]b4_join(
[const semantic_type& v],
b4_locations_if([const location_type& l]))[)
: value(v)]b4_locations_if([
}
inline
- ]b4_parser_class_name[::symbol_type::symbol_type (]b4_args(
+ ]b4_parser_class_name[::symbol_type::symbol_type (]b4_join(
[token_type t],
b4_locations_if([const location_type& l]))[)
: super_type (]b4_locations_if([l])[)
}
inline
- ]b4_parser_class_name[::symbol_type::symbol_type (]b4_args(
+ ]b4_parser_class_name[::symbol_type::symbol_type (]b4_join(
[token_type t],
[const semantic_type& v],
b4_locations_if([const location_type& l]))[)
inline stack_symbol_type ();
/// Constructor.
- inline stack_symbol_type (]b4_args([state_type s],
+ inline stack_symbol_type (]b4_join([state_type s],
[const semantic_type& v],
b4_locations_if([const location_type& l]))[);
{
}
- ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (]b4_args(
+ ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (]b4_join(
[state_type s],
[const semantic_type& v],
b4_locations_if([const location_type& l]))[)
if (m)
YY_SYMBOL_PRINT (m, sym);
]b4_variant_if(
-[[ yystack_.push (stack_symbol_type (]b4_args(
+[[ yystack_.push (stack_symbol_type (]b4_join(
[s],
[semantic_type()],
b4_locations_if([sym.location]))[));
]b4_symbol_variant([[yystos_[s]]], [[yystack_[0].value]],
[build], [sym.value])],
-[[ yystack_.push (stack_symbol_type (]b4_args(
+[[ yystack_.push (stack_symbol_type (]b4_join(
[s],
[sym.value],
b4_locations_if([sym.location]))[));]])[
if (m)
YY_SYMBOL_PRINT (m, s);
]b4_variant_if(
-[[ yystack_.push (stack_symbol_type (]b4_args(
+[[ yystack_.push (stack_symbol_type (]b4_join(
[s.state],
[semantic_type()],
b4_locations_if([s.location]))[));
if (!yyerrstatus_)
{
++yynerrs_;
- error (]b4_args(b4_locations_if([yyla.location]),
+ error (]b4_join(b4_locations_if([yyla.location]),
[[yysyntax_error_ (yystack_[0].state,
yyempty ? yyempty_ : yyla.type)]])[);
}
void
]b4_parser_class_name[::error (const syntax_error& yyexc)
{
- error (]b4_args(b4_locations_if([yyexc.location]),
+ error (]b4_join(b4_locations_if([yyexc.location]),
[[yyexc.what()]])[);
}
[ static inline
symbol_type
make_[]b4_symbol_([$1], [id]) (dnl
-b4_args(b4_symbol_if([$1], [has_type],
+b4_join(b4_symbol_if([$1], [has_type],
[const b4_symbol([$1], [type])& v]),
b4_locations_if([const location_type& l])));
[b4_symbol_if([$1], [is_token], [b4_symbol_if([$1], [has_id],
[ b4_parser_class_name::symbol_type
b4_parser_class_name::make_[]b4_symbol_([$1], [id]) (dnl
-b4_args(b4_symbol_if([$1], [has_type],
+b4_join(b4_symbol_if([$1], [has_type],
[const b4_symbol([$1], [type])& v]),
b4_locations_if([const location_type& l])))
{
- return symbol_type (b4_args([token::b4_symbol([$1], [id])],
+ return symbol_type (b4_join([token::b4_symbol([$1], [id])],
b4_symbol_if([$1], [has_type], [v]),
b4_locations_if([l])));
}