# C++ skeleton for Bison
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
[b4_symbol_if([$1], [has_type],
[
m4_map([ b4_symbol_tag_comment], [$@])dnl
- char _b4_char_sizeof_dummy@{sizeof([b4_symbol([$1], [type])])@};
+ char _b4_char_sizeof_dummy@{sizeof(b4_symbol([$1], [type]))@};
])])
/// Empty construction.
variant ()]b4_parse_assert_if([
- : yytname_ (YY_NULL)])[
+ : yytname_ (YY_NULLPTR)])[
{}
/// Construct and fill.
template <typename T>
void
move (self_type& other)
- {]b4_parse_assert_if([
- YYASSERT (!yytname_);])[
+ {
build<T> ();
swap<T> (other);
other.destroy<T> ();
destroy ()
{
as<T> ().~T ();]b4_parse_assert_if([
- yytname_ = YY_NULL;])[
+ yytname_ = YY_NULLPTR;])[
}
private:
## -------------------------- ##
-# b4_semantic_type_declare
-# ------------------------
+# b4_value_type_declare
+# ---------------------
# Declare semantic_type.
-m4_define([b4_semantic_type_declare],
-[ /// An auxiliary type to compute the largest semantic type.
+m4_define([b4_value_type_declare],
+[[ /// An auxiliary type to compute the largest semantic type.
union union_type
{]b4_type_foreach([b4_char_sizeof])[};
/// Symbol semantic values.
- typedef variant<sizeof(union_type)> semantic_type;dnl
+ typedef variant<sizeof(union_type)> semantic_type;][]dnl
])
return symbol_type (b4_join([token::b4_symbol([$1], [id])],
b4_symbol_if([$1], [has_type], [v]),
b4_locations_if([l])));
-
}
])])])
# b4_basic_symbol_constructor_declare
-# ----------------------------------
+# -----------------------------------
# Generate a constructor declaration for basic_symbol from given type.
m4_define([b4_basic_symbol_constructor_declare],
[[