]> git.saurik.com Git - bison.git/blobdiff - data/stack.hh
regen
[bison.git] / data / stack.hh
index e785e8081895d5a5734eba9fe6996edb5952f359..317a0612c2ac1708151822994e26123ae5a58a8c 100644 (file)
@@ -1,6 +1,6 @@
 # C++ skeleton for Bison
 
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 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
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 m4_pushdef([b4_copyright_years],
-           [2002-2012])
+           [2002-2013])
 
-# We do want M4 expansion after # for CPP macros.
-m4_changecom()
-m4_divert_push(0)dnl
-@output(b4_dir_prefix[]stack.hh@)@
+b4_output_begin([b4_dir_prefix[]stack.hh])
 b4_copyright([Stack handling for Bison parsers in C++],
-             [2002-2012])[
+             [2002-2013])[
 
-#ifndef BISON_STACK_HH
-# define BISON_STACK_HH
+/**
+ ** \file ]b4_dir_prefix[stack.hh
+ ** Define the ]b4_namespace_ref[::stack class.
+ */
+
+]b4_cpp_guard_open([b4_dir_prefix[]stack.hh])[
 
 # include <deque>
 
@@ -76,6 +77,12 @@ b4_copyright([Stack handling for Bison parsers in C++],
         seq_.pop_front ();
     }
 
+    void
+    clear ()
+    {
+      seq_.clear ();
+    }
+
     inline
     unsigned int
     height () const
@@ -87,6 +94,8 @@ b4_copyright([Stack handling for Bison parsers in C++],
     inline const_iterator end () const { return seq_.rend (); }
 
   private:
+    stack (const stack&);
+    stack& operator= (const stack&);
     S seq_;
   };
 
@@ -114,8 +123,7 @@ b4_copyright([Stack handling for Bison parsers in C++],
   };
 ]b4_namespace_close[
 
-#endif // not BISON_STACK_HH[]dnl
-]
-m4_divert_pop(0)
-m4_popdef([b4_copyright_years])dnl
-m4_changecom([#])
+]b4_cpp_guard_close([b4_dir_prefix[]stack.hh])
+b4_output_end()
+
+m4_popdef([b4_copyright_years])