Boost logo

Boost-Commit :

From: hartmut.kaiser_at_[hidden]
Date: 2008-04-18 09:52:48


Author: hkaiser
Date: 2008-04-18 09:52:47 EDT (Fri, 18 Apr 2008)
New Revision: 44541
URL: http://svn.boost.org/trac/boost/changeset/44541

Log:
Spirit.Lex: trying to fix some gcc issues.
Text files modified:
   trunk/boost/spirit/home/lex/lexer/lexer.hpp | 2 +-
   trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_lexer.hpp | 17 ++++++++++-------
   trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_static_lexer.hpp | 20 +++++++++-----------
   3 files changed, 20 insertions(+), 19 deletions(-)

Modified: trunk/boost/spirit/home/lex/lexer/lexer.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexer.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexer.hpp 2008-04-18 09:52:47 EDT (Fri, 18 Apr 2008)
@@ -280,7 +280,7 @@
     // definitions
     ///////////////////////////////////////////////////////////////////////////
     template <typename Lexer>
- class lexer_def : noncopyable, public Lexer
+ class lexer_def : private noncopyable, public Lexer
     {
     private:
         typedef lexer_def self_type;

Modified: trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_lexer.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_lexer.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_lexer.hpp 2008-04-18 09:52:47 EDT (Fri, 18 Apr 2008)
@@ -198,7 +198,16 @@
         typedef typename Token::id_type id_type;
         typedef TokenSet token_set;
         typedef lexertl_iterator<Functor> iterator_type;
-
+
+ private:
+ // this type is purely used for the iterator_type construction below
+ struct iterator_data_type {
+ boost::lexer::state_machine const& state_machine_;
+ boost::lexer::basic_rules<char_type> const& rules_;
+ typename Functor::semantic_actions_type const& actions_;
+ };
+
+ public:
         // Return the start iterator usable for iterating over the generated
         // tokens.
         iterator_type begin(Iterator& first, Iterator const& last) const
@@ -206,12 +215,6 @@
             if (!init_dfa())
                 return iterator_type();
                 
- struct iterator_data_type {
- boost::lexer::state_machine const& state_machine_;
- boost::lexer::basic_rules<char_type> const& rules_;
- typename Functor::semantic_actions_type const& actions_;
- };
-
             iterator_data_type iterator_data = { state_machine, rules, actions };
             return iterator_type(iterator_data, first, last);
         }

Modified: trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_static_lexer.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_static_lexer.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/lexertl_static_lexer.hpp 2008-04-18 09:52:47 EDT (Fri, 18 Apr 2008)
@@ -169,18 +169,21 @@
         typedef Token token_type;
         typedef TokenSet token_set;
         typedef lexertl_iterator<Functor> iterator_type;
-
+
+ private:
+ // this type is purely used for the iterator_type construction below
+ struct iterator_data_type {
+ typename Functor::next_token_functor next_;
+ typename Functor::semantic_actions_type const& actions_;
+ };
+
+ public:
         // Return the start iterator usable for iterating over the generated
         // tokens, the Functor F is called to match the next token from the
         // input.
         template <typename F>
         iterator_type begin(Iterator& first, Iterator const& last, F next) const
         {
- struct iterator_data_type {
- typename Functor::next_token_functor next_;
- typename Functor::semantic_actions_type const& actions_;
- };
-
             iterator_data_type iterator_data = { next, actions };
             return iterator_type(iterator_data, first, last);
         }
@@ -191,11 +194,6 @@
         template <typename Iterator_>
         iterator_type begin(Iterator_& first, Iterator_ const& last) const
         {
- struct iterator_data_type {
- typename Functor::next_token_functor next_;
- typename Functor::semantic_actions_type const& actions_;
- };
-
             iterator_data_type iterator_data =
                 { &lex::static_::next_token<Iterator_>, actions };
             return iterator_type(iterator_data, first, last);


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