]> git.saurik.com Git - bison.git/blobdiff - data/variant.hh
location: remove some ugly debugging code traces
[bison.git] / data / variant.hh
index d96c512b2af26e36555500fbcd0d3f43753df901..303e1c6719b0177a344f87a156102eead945b52e 100644 (file)
@@ -1,6 +1,6 @@
 # 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
@@ -63,7 +63,7 @@ m4_define([b4_char_sizeof],
 [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]))@};
 ])])
 
 
@@ -95,7 +95,7 @@ m4_define([b4_variant_define],
 
     /// Empty construction.
     variant ()]b4_parse_assert_if([
-      : yytname_ (YY_NULL)])[
+      : yytname_ (YY_NULLPTR)])[
     {}
 
     /// Construct and fill.
@@ -178,8 +178,7 @@ m4_define([b4_variant_define],
     template <typename T>
     void
     move (self_type& other)
-    {]b4_parse_assert_if([
-      YYASSERT (!yytname_);])[
+    {
       build<T> ();
       swap<T> (other);
       other.destroy<T> ();
@@ -199,7 +198,7 @@ m4_define([b4_variant_define],
     destroy ()
     {
       as<T> ().~T ();]b4_parse_assert_if([
-      yytname_ = YY_NULL;])[
+      yytname_ = YY_NULLPTR;])[
     }
 
   private:
@@ -244,16 +243,16 @@ m4_define([b4_variant_define],
 ## -------------------------- ##
 
 
-# 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
 ])
 
 
@@ -321,14 +320,13 @@ b4_join(b4_symbol_if([$1], [has_type],
     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],
 [[