Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52644 - in trunk: boost/spirit/home/karma/detail boost/spirit/home/lex boost/spirit/home/lex/lexer boost/spirit/home/lex/lexer/lexertl libs/spirit/example/lex libs/spirit/example/lex/static_lexer
From: hartmut.kaiser_at_[hidden]
Date: 2009-04-27 20:56:23


Author: hkaiser
Date: 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
New Revision: 52644
URL: http://svn.boost.org/trac/boost/changeset/52644

Log:
Spirit: Fixed a couple of compilation errors when using gcc 4.3
Text files modified:
   trunk/boost/spirit/home/karma/detail/output_iterator.hpp | 6 ------
   trunk/boost/spirit/home/lex/lexer/lexer.hpp | 2 +-
   trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp | 9 +++++++--
   trunk/boost/spirit/home/lex/lexer/string_token_def.hpp | 2 +-
   trunk/boost/spirit/home/lex/reference.hpp | 4 ++--
   trunk/boost/spirit/home/lex/tokenize_and_parse.hpp | 6 +++---
   trunk/libs/spirit/example/lex/example1.cpp | 2 +-
   trunk/libs/spirit/example/lex/example2.cpp | 2 +-
   trunk/libs/spirit/example/lex/example3.cpp | 2 +-
   trunk/libs/spirit/example/lex/example5.cpp | 2 +-
   trunk/libs/spirit/example/lex/example6.cpp | 8 ++++----
   trunk/libs/spirit/example/lex/print_numbers.cpp | 2 +-
   trunk/libs/spirit/example/lex/static_lexer/word_count_tokens.hpp | 2 +-
   trunk/libs/spirit/example/lex/strip_comments.cpp | 2 +-
   14 files changed, 25 insertions(+), 26 deletions(-)

Modified: trunk/boost/spirit/home/karma/detail/output_iterator.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/output_iterator.hpp (original)
+++ trunk/boost/spirit/home/karma/detail/output_iterator.hpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -254,13 +254,7 @@
             traits::is_not_unused<Derived>, Derived, output_iterator
>::type most_derived_type;
 
-#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
- private:
- friend struct counting_sink<output_iterator<OutputIterator, Derived> >;
- friend struct enable_buffering<output_iterator<OutputIterator, Derived> >;
-#else
     public:
-#endif
         // functions related to counting
         counting_sink<most_derived_type>* chain_counting(
             counting_sink<most_derived_type>* count_data)

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 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -42,7 +42,7 @@
               , lexer_def_<LexerDef> >
           , qi::parser<lexer_def_<LexerDef> >
           , lex::lexer_type<lexer_def_<LexerDef> >
- , noncopyable
+// , noncopyable
         {
         private:
             // avoid warnings about using 'this' in constructor

Modified: trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -13,6 +13,7 @@
 #include <boost/spirit/home/phoenix/core/argument.hpp>
 #include <boost/spirit/home/phoenix/bind.hpp>
 #include <boost/spirit/home/phoenix/scope.hpp>
+#include <boost/spirit/home/support/attributes.hpp>
 
 ///////////////////////////////////////////////////////////////////////////////
 namespace boost { namespace spirit { namespace lex { namespace lexertl
@@ -42,8 +43,12 @@
                   , Attribute const& attr, std::size_t id, bool& pass
                   , Context& ctx) const
                 {
- f (spirit::detail::pass_value<Attribute const>::call(attr)
- , id, pass, ctx);
+ typedef typename
+ traits::pass_attribute<unused_type, Attribute const>::type
+ attribute_type;
+
+ attribute_type attr_wrap(attr);
+ f (attr_wrap, id, pass, ctx);
                 }
             };
 

Modified: trunk/boost/spirit/home/lex/lexer/string_token_def.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/string_token_def.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/string_token_def.hpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -100,7 +100,7 @@
         template <typename Terminal>
         result_type operator()(Terminal const& term, unused_type) const
         {
- return result_type(fusion::at_c<0>(term.args), no_case());
+ return result_type(fusion::at_c<0>(term.args));
         }
     };
 

Modified: trunk/boost/spirit/home/lex/reference.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/reference.hpp (original)
+++ trunk/boost/spirit/home/lex/reference.hpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -37,7 +37,7 @@
         template <typename LexerDef, typename String>
         void collect(LexerDef& lexdef, String const& state) const
         {
- return ref.get().collect(lexdef, state);
+ return this->ref.get().collect(lexdef, state);
         }
     };
 
@@ -49,7 +49,7 @@
 
         IdType id() const
         {
- return ref.get().id();
+ return this->ref.get().id();
         }
     };
 

Modified: trunk/boost/spirit/home/lex/tokenize_and_parse.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/tokenize_and_parse.hpp (original)
+++ trunk/boost/spirit/home/lex/tokenize_and_parse.hpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -176,15 +176,15 @@
         typedef
             typename result_of::compile<qi::domain, Skipper>::type
         skipper_type;
- skipper_type const skipper_ = compile<qi::domain>(skipper);
+ skipper_type const skipper = compile<qi::domain>(skipper_);
 
         typename Lexer::iterator_type iter = lex.begin(first, last);
         if (!compile<qi::domain>(xpr).parse(
- iter, lex.end(), unused, skipper_, attr))
+ iter, lex.end(), unused, skipper, attr))
             return false;
 
         // do a final post-skip
- qi::skip_over(iter, lex.end(), skipper_);
+ qi::skip_over(iter, lex.end(), skipper);
         return true;
     }
 

Modified: trunk/libs/spirit/example/lex/example1.cpp
==============================================================================
--- trunk/libs/spirit/example/lex/example1.cpp (original)
+++ trunk/libs/spirit/example/lex/example1.cpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -23,7 +23,7 @@
 
 #include <boost/config/warning_disable.hpp>
 #include <boost/spirit/include/qi.hpp>
-#include <boost/spirit/include/lex_lexer_lexertl.hpp>
+#include <boost/spirit/include/lex_lexertl.hpp>
 
 #include <iostream>
 #include <fstream>

Modified: trunk/libs/spirit/example/lex/example2.cpp
==============================================================================
--- trunk/libs/spirit/example/lex/example2.cpp (original)
+++ trunk/libs/spirit/example/lex/example2.cpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -56,7 +56,7 @@
         // interpreted literally and never as special regex characters. This is
         // done to be able to assign single characters the id of their character
         // code value, allowing to reference those as literals in Qi grammars.
- self = token_def<>(',') | '!' | '.' | '?' | ' ' | '\n' | word;
+ this->self = token_def<>(',') | '!' | '.' | '?' | ' ' | '\n' | word;
     }
 
     token_def<> word;

Modified: trunk/libs/spirit/example/lex/example3.cpp
==============================================================================
--- trunk/libs/spirit/example/lex/example3.cpp (original)
+++ trunk/libs/spirit/example/lex/example3.cpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -23,7 +23,7 @@
 
 #include <boost/config/warning_disable.hpp>
 #include <boost/spirit/include/qi.hpp>
-#include <boost/spirit/include/lex_lexer_lexertl.hpp>
+#include <boost/spirit/include/lex_lexertl.hpp>
 
 #include <iostream>
 #include <fstream>

Modified: trunk/libs/spirit/example/lex/example5.cpp
==============================================================================
--- trunk/libs/spirit/example/lex/example5.cpp (original)
+++ trunk/libs/spirit/example/lex/example5.cpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -25,7 +25,7 @@
 
 #include <boost/config/warning_disable.hpp>
 #include <boost/spirit/include/qi.hpp>
-#include <boost/spirit/include/lex_lexer_lexertl.hpp>
+#include <boost/spirit/include/lex_lexertl.hpp>
 #include <boost/spirit/include/phoenix_operator.hpp>
 
 #include <iostream>

Modified: trunk/libs/spirit/example/lex/example6.cpp
==============================================================================
--- trunk/libs/spirit/example/lex/example6.cpp (original)
+++ trunk/libs/spirit/example/lex/example6.cpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -27,7 +27,7 @@
 
 #include <boost/config/warning_disable.hpp>
 #include <boost/spirit/include/qi.hpp>
-#include <boost/spirit/include/lex_lexer_lexertl.hpp>
+#include <boost/spirit/include/lex_lexertl.hpp>
 #include <boost/spirit/include/phoenix_operator.hpp>
 
 #include <iostream>
@@ -76,13 +76,13 @@
             ;
 
         // associate the tokens and the token set with the lexer
- self = token_def<>('(') | ')' | '{' | '}' | '=' | ';';
+ this->self = token_def<>('(') | ')' | '{' | '}' | '=' | ';';
 
         // Token definitions can be added by using some special syntactic
         // construct as shown below.
         // Note, that the token definitions added this way expose the iterator
         // pair pointing to the matched input stream as their attribute.
- self.add
+ this->self.add
             (constant, ID_CONSTANT)
             ("if", ID_IF)
             ("else", ID_ELSE)
@@ -91,7 +91,7 @@
         ;
 
         // add whitespace tokens to another lexer state (here: "WS")
- self("WS") = white_space;
+ this->self("WS") = white_space;
     }
 
     // The following two tokens have an associated value type, identifier

Modified: trunk/libs/spirit/example/lex/print_numbers.cpp
==============================================================================
--- trunk/libs/spirit/example/lex/print_numbers.cpp (original)
+++ trunk/libs/spirit/example/lex/print_numbers.cpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -21,7 +21,7 @@
 
 #include <boost/config/warning_disable.hpp>
 #include <boost/spirit/include/qi.hpp>
-#include <boost/spirit/include/lex_lexer_lexertl.hpp>
+#include <boost/spirit/include/lex_lexertl.hpp>
 #include <boost/spirit/include/phoenix_operator.hpp>
 
 #include <iostream>

Modified: trunk/libs/spirit/example/lex/static_lexer/word_count_tokens.hpp
==============================================================================
--- trunk/libs/spirit/example/lex/static_lexer/word_count_tokens.hpp (original)
+++ trunk/libs/spirit/example/lex/static_lexer/word_count_tokens.hpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -31,7 +31,7 @@
     {
         // define tokens and associate them with the lexer
         word = "[^ \t\n]+";
- this->self = word | '\n' | token_def<>(".", IDANY);
+ this->self = word | '\n' | boost::spirit::lex::token_def<>(".", IDANY);
     }
 
     boost::spirit::lex::token_def<std::string> word;

Modified: trunk/libs/spirit/example/lex/strip_comments.cpp
==============================================================================
--- trunk/libs/spirit/example/lex/strip_comments.cpp (original)
+++ trunk/libs/spirit/example/lex/strip_comments.cpp 2009-04-27 20:56:20 EDT (Mon, 27 Apr 2009)
@@ -35,7 +35,7 @@
 
 #include <boost/config/warning_disable.hpp>
 #include <boost/spirit/include/qi.hpp>
-#include <boost/spirit/include/lex_lexer_lexertl.hpp>
+#include <boost/spirit/include/lex_lexertl.hpp>
 #include <boost/spirit/include/phoenix_operator.hpp>
 #include <boost/spirit/include/phoenix_container.hpp>
 


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