// basic_symbol.
template <typename Base>
- inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol ()
: value ()
{}
]b4_locations_if([
template <typename Base>
- inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (const location_type& l)
: value ()
, location (l)
{}])[
template <typename Base>
- inline
]b4_parser_class_name[::basic_symbol<Base>&
]b4_parser_class_name[::basic_symbol<Base>::operator= (const basic_symbol&)
{
}
template <typename Base>
- inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (const basic_symbol& other)
: Base (other)
, value ()]b4_locations_if([
template <typename Base>
- inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::value_type t],
[const semantic_type& v],
, value ()]b4_locations_if([
, location (l)])[
{
- (void) v; /* FIXME: */
+ // FIXME: The YYUSE macro is only available in the .cc skeleton files. It
+ // is not available in .hh files, where this code is when using %defines.
+ (void) v;
]b4_variant_if([b4_symbol_variant([this->type_get ()], [value], [copy],
[v])],
[value = v;])[
}
template <typename Base>
- inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::value_type t],
b4_locations_if([const location_type& l]))[)
{}
template <typename Base>
- inline
void
]b4_parser_class_name[::basic_symbol<Base>::move (basic_symbol& s)
{
}
// by_type.
- inline
]b4_parser_class_name[::by_type::by_type ()
: type ()
{}
- inline
]b4_parser_class_name[::by_type::by_type (const by_type& other)
: type (other.type)
{}
- inline
]b4_parser_class_name[::by_type::by_type (token_type t)
: type (yytranslate_ (t))
{}
- inline
int
]b4_parser_class_name[::by_type::type_get () const
{
return type;
}
]b4_token_ctor_if([[
- inline
]b4_parser_class_name[::token_type
]b4_parser_class_name[::by_type::token () const
{
typedef variant<S> self_type;
/// Empty construction.
- inline
variant ()]b4_parse_assert_if([
: built (false)
, tname (YY_NULL)])[
/// Instantiate a \a T in here.
template <typename T>
- inline T&
+ T&
build ()
{]b4_parse_assert_if([
//YYASSERT (!built);
/// Instantiate a \a T in here from \a t.
template <typename T>
- inline T&
+ T&
build (const T& t)
{]b4_parse_assert_if([
//YYASSERT (!built);
/// Construct and fill.
template <typename T>
- inline
variant (const T& t)]b4_parse_assert_if([
: built (true)
, tname (typeid (T).name ())])[
/// Accessor to a built \a T.
template <typename T>
- inline T&
+ T&
as ()
{]b4_parse_assert_if([
YYASSERT (built);
/// Const accessor to a built \a T (for %printer).
template <typename T>
- inline const T&
+ const T&
as () const
{]b4_parse_assert_if([
YYASSERT (built);
/// Swapping between built and ((possibly) non-built is done with
/// variant::move ().
template <typename T>
- inline void
+ void
swap (variant<S>& other)
{]b4_parse_assert_if([
YYASSERT (built);
/// Assign the content of \a other to this.
/// Destroys \a other.
template <typename T>
- inline void
+ void
move (variant<S>& other)
{]b4_parse_assert_if([
YYASSERT (! built);])[
/// Copy the content of \a other to this.
/// Destroys \a other.
template <typename T>
- inline void
+ void
copy (const variant<S>& other)
{
build<T> (other.as<T> ());
/// Destroy the stored \a T.
template <typename T>
- inline void
+ void
destroy ()
{
as<T> ().~T ();]b4_parse_assert_if([