Boost logo

Boost-Commit :

From: hartmut.kaiser_at_[hidden]
Date: 2008-05-30 20:59:38


Author: hkaiser
Date: 2008-05-30 20:59:38 EDT (Fri, 30 May 2008)
New Revision: 45968
URL: http://svn.boost.org/trac/boost/changeset/45968

Log:
Spirit.Lex: Made typedef's more consistent
Text files modified:
   trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_functor.hpp | 5 +++++
   trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_static_functor.hpp | 14 ++++++++++----
   2 files changed, 15 insertions(+), 4 deletions(-)

Modified: trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_functor.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_functor.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_functor.hpp 2008-05-30 20:59:38 EDT (Fri, 30 May 2008)
@@ -89,8 +89,12 @@
           : Data<Iterator, mpl::false_, mpl::false_>
         {
             typedef Data<Iterator, mpl::false_, mpl::false_> base_type;
+
             typedef std::size_t state_type;
             typedef typename base_type::char_type char_type;
+ typedef
+ typename base_type::semantic_actions_type
+ semantic_actions_type;
             
             // initialize the shared data
             template <typename IterData>
@@ -131,6 +135,7 @@
             typedef Data<Iterator, mpl::false_, HasState> base_type;
             
             typedef iterator_range<Iterator> iterpair_type;
+ typedef typename base_type::state_type state_type;
             typedef typename base_type::char_type char_type;
 
             typedef void functor_type(iterpair_type, std::size_t, bool&, Data&);

Modified: trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_static_functor.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_static_functor.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_static_functor.hpp 2008-05-30 20:59:38 EDT (Fri, 30 May 2008)
@@ -90,7 +90,13 @@
           : Data<Iterator, mpl::false_, mpl::false_>
         {
             typedef Data<Iterator, mpl::false_, mpl::false_> base_type;
-
+
+ typedef std::size_t state_type;
+ typedef typename base_type::char_type char_type;
+ typedef
+ typename base_type::semantic_actions_type
+ semantic_actions_type;
+
             // initialize the shared data
             template <typename IterData>
             Data (IterData const& data_, Iterator& first_, Iterator const& last_)
@@ -122,10 +128,10 @@
           : Data<Iterator, mpl::false_, HasState>
         {
             typedef Data<Iterator, mpl::false_, HasState> base_type;
+
             typedef iterator_range<Iterator> iterpair_type;
- typedef typename
- boost::detail::iterator_traits<Iterator>::value_type
- char_type;
+ typedef typename base_type::state_type state_type;
+ typedef typename base_type::char_type char_type;
 
             typedef void functor_type(iterpair_type, std::size_t, bool&, Data&);
             typedef boost::function<functor_type> functor_wrapper_type;


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