Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58444 - in trunk/boost/spirit/home/support/detail/lexer: . parser parser/tree
From: hartmut.kaiser_at_[hidden]
Date: 2009-12-17 18:35:49


Author: hkaiser
Date: 2009-12-17 18:35:48 EST (Thu, 17 Dec 2009)
New Revision: 58444
URL: http://svn.boost.org/trac/boost/changeset/58444

Log:
Spirit: updating Lexer files
Text files modified:
   trunk/boost/spirit/home/support/detail/lexer/generator.hpp | 32 +++++++++++++++++---------------
   trunk/boost/spirit/home/support/detail/lexer/parser/parser.hpp | 20 ++++++++++----------
   trunk/boost/spirit/home/support/detail/lexer/parser/tree/iteration_node.hpp | 2 +-
   trunk/boost/spirit/home/support/detail/lexer/parser/tree/leaf_node.hpp | 2 +-
   trunk/boost/spirit/home/support/detail/lexer/parser/tree/selection_node.hpp | 2 +-
   trunk/boost/spirit/home/support/detail/lexer/parser/tree/sequence_node.hpp | 2 +-
   6 files changed, 31 insertions(+), 29 deletions(-)

Modified: trunk/boost/spirit/home/support/detail/lexer/generator.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/generator.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/generator.hpp 2009-12-17 18:35:48 EST (Thu, 17 Dec 2009)
@@ -44,10 +44,10 @@
 
         for (; index_ < size_; ++index_)
         {
- internals_._lookup->push_back (0);
+ internals_._lookup->push_back (static_cast<size_t_vector *>(0));
             internals_._lookup->back () = new size_t_vector;
             internals_._dfa_alphabet.push_back (0);
- internals_._dfa->push_back (0);
+ internals_._dfa->push_back (static_cast<size_t_vector *>(0));
             internals_._dfa->back () = new size_t_vector;
         }
 
@@ -229,7 +229,7 @@
 
             for (; iter_ != end_; ++iter_)
             {
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<detail::selection_node *>(0));
                 node_ptr_vector_->back () = new detail::selection_node
                     (root_, *iter_);
                 root_ = node_ptr_vector_->back ();
@@ -405,9 +405,9 @@
 
         if (!found_)
         {
- seen_sets_->push_back (0);
+ seen_sets_->push_back (static_cast<node_set *>(0));
             seen_sets_->back () = set_ptr_.release ();
- seen_vectors_->push_back (0);
+ seen_vectors_->push_back (static_cast<node_vector *>(0));
             seen_vectors_->back () = vector_ptr_.release ();
             hash_vector_.push_back (hash_);
             // State 0 is the jam state...
@@ -466,7 +466,7 @@
             typename charset_list::list::iterator end_;
             charset_ptr overlap_ (new charset);
 
- lhs_->push_back (0);
+ lhs_->push_back (static_cast<charset *>(0));
             lhs_->back () = rhs_->front ();
             rhs_->pop_front ();
 
@@ -527,7 +527,7 @@
 
                 if (!r_->empty ())
                 {
- lhs_->push_back (0);
+ lhs_->push_back (static_cast<charset *>(0));
                     lhs_->back () = r_.release ();
                 }
             }
@@ -544,7 +544,7 @@
 
         for (; iter_ != end_; ++iter_)
         {
- list_->push_back (0);
+ list_->push_back (static_cast<charset *>(0));
             list_->back () = new charset (iter_->first, iter_->second);
         }
     }
@@ -609,7 +609,7 @@
             typename equivset_list::list::iterator end_;
             equivset_ptr overlap_ (new equivset);
 
- lhs_->push_back (0);
+ lhs_->push_back (static_cast<equivset *>(0));
             lhs_->back () = rhs_->front ();
             rhs_->pop_front ();
 
@@ -670,7 +670,7 @@
 
                 if (!r_->empty ())
                 {
- lhs_->push_back (0);
+ lhs_->push_back (static_cast<equivset *>(0));
                     lhs_->back () = r_.release ();
                 }
             }
@@ -695,7 +695,7 @@
 
                 if (token_ != null_token)
                 {
- list_->push_back (0);
+ list_->push_back (static_cast<equivset *>(0));
 
                     if (token_ == bol_token || token_ == eol_token)
                     {
@@ -736,24 +736,26 @@
 
         if (!found_)
         {
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<detail::leaf_node *>(0));
             node_ptr_vector_->back () = new detail::leaf_node
                 (bol_token, true);
 
             detail::node *lhs_ = node_ptr_vector_->back ();
 
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<detail::leaf_node *>(0));
             node_ptr_vector_->back () = new detail::leaf_node
                 (null_token, true);
 
             detail::node *rhs_ = node_ptr_vector_->back ();
 
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back
+ (static_cast<detail::selection_node *>(0));
             node_ptr_vector_->back () =
                 new detail::selection_node (lhs_, rhs_);
             lhs_ = node_ptr_vector_->back ();
 
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back
+ (static_cast<detail::sequence_node *>(0));
             node_ptr_vector_->back () =
                 new detail::sequence_node (lhs_, root_);
             root_ = node_ptr_vector_->back ();

Modified: trunk/boost/spirit/home/support/detail/lexer/parser/parser.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/parser/parser.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/parser/parser.hpp 2009-12-17 18:35:48 EST (Thu, 17 Dec 2009)
@@ -114,12 +114,12 @@
         }
         else
         {
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<end_node *>(0));
 
             node *rhs_node_ = new end_node (id_, unique_id_, dfa_state_);
 
             node_ptr_vector_->back () = rhs_node_;
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<sequence_node *>(0));
             node_ptr_vector_->back () = new sequence_node
                 (lhs_node_, rhs_node_);
             root_ = node_ptr_vector_->back ();
@@ -292,7 +292,7 @@
         assert (handle_.top ()._type == token::CHARSET &&
             handle_.size () == 1);
         // store charset
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<leaf_node *>(0));
 
         const size_t id_ = handle_.top ()._id;
 
@@ -354,7 +354,7 @@
 
         node *lhs_ = tree_node_stack_.top ();
 
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<selection_node *>(0));
         node_ptr_vector_->back () = new selection_node (lhs_, rhs_);
         tree_node_stack_.top () = node_ptr_vector_->back ();
     }
@@ -368,7 +368,7 @@
 
         node *lhs_ = tree_node_stack_.top ();
 
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<sequence_node *>(0));
         node_ptr_vector_->back () = new sequence_node (lhs_, rhs_);
         tree_node_stack_.top () = node_ptr_vector_->back ();
     }
@@ -388,12 +388,12 @@
             (*iter_)->greedy (greedy_);
         }
 
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<leaf_node *>(0));
 
         node *rhs_ = new leaf_node (null_token, greedy_);
 
         node_ptr_vector_->back () = rhs_;
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<selection_node *>(0));
         node_ptr_vector_->back () = new selection_node (lhs_, rhs_);
         tree_node_stack_.top () = node_ptr_vector_->back ();
     }
@@ -404,7 +404,7 @@
         // perform *
         node *ptr_ = tree_node_stack_.top ();
 
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<iteration_node *>(0));
         node_ptr_vector_->back () = new iteration_node (ptr_, greedy_);
         tree_node_stack_.top () = node_ptr_vector_->back ();
     }
@@ -416,12 +416,12 @@
         node *lhs_ = tree_node_stack_.top ();
         node *copy_ = lhs_->copy (node_ptr_vector_);
 
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<iteration_node *>(0));
 
         node *rhs_ = new iteration_node (copy_, greedy_);
 
         node_ptr_vector_->back () = rhs_;
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<sequence_node *>(0));
         node_ptr_vector_->back () = new sequence_node (lhs_, rhs_);
         tree_node_stack_.top () = node_ptr_vector_->back ();
     }

Modified: trunk/boost/spirit/home/support/detail/lexer/parser/tree/iteration_node.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/parser/tree/iteration_node.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/parser/tree/iteration_node.hpp 2009-12-17 18:35:48 EST (Thu, 17 Dec 2009)
@@ -71,7 +71,7 @@
         {
             node *ptr_ = new_node_stack_.top ();
 
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<iteration_node *>(0));
             node_ptr_vector_->back () = new iteration_node (ptr_, _greedy);
             new_node_stack_.top () = node_ptr_vector_->back ();
         }

Modified: trunk/boost/spirit/home/support/detail/lexer/parser/tree/leaf_node.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/parser/tree/leaf_node.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/parser/tree/leaf_node.hpp 2009-12-17 18:35:48 EST (Thu, 17 Dec 2009)
@@ -95,7 +95,7 @@
         node_stack &new_node_stack_, bool_stack &/*perform_op_stack_*/,
         bool &/*down_*/) const
     {
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<leaf_node *>(0));
         node_ptr_vector_->back () = new leaf_node (_token, _greedy);
         new_node_stack_.push (node_ptr_vector_->back ());
     }

Modified: trunk/boost/spirit/home/support/detail/lexer/parser/tree/selection_node.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/parser/tree/selection_node.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/parser/tree/selection_node.hpp 2009-12-17 18:35:48 EST (Thu, 17 Dec 2009)
@@ -75,7 +75,7 @@
 
             node *lhs_ = new_node_stack_.top ();
 
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<selection_node *>(0));
             node_ptr_vector_->back () = new selection_node (lhs_, rhs_);
             new_node_stack_.top () = node_ptr_vector_->back ();
         }

Modified: trunk/boost/spirit/home/support/detail/lexer/parser/tree/sequence_node.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/parser/tree/sequence_node.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/parser/tree/sequence_node.hpp 2009-12-17 18:35:48 EST (Thu, 17 Dec 2009)
@@ -93,7 +93,7 @@
 
             node *lhs_ = new_node_stack_.top ();
 
- node_ptr_vector_->push_back (0);
+ node_ptr_vector_->push_back (static_cast<sequence_node *>(0));
             node_ptr_vector_->back () = new sequence_node (lhs_, rhs_);
             new_node_stack_.top () = node_ptr_vector_->back ();
         }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk