|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62182 - in trunk/boost/spirit/home/lex: . lexer/lexertl
From: hartmut.kaiser_at_[hidden]
Date: 2010-05-24 18:43:34
Author: hkaiser
Date: 2010-05-24 18:43:31 EDT (Mon, 24 May 2010)
New Revision: 62182
URL: http://svn.boost.org/trac/boost/changeset/62182
Log:
Spirit: fixed a problem with lex::_val
Text files modified:
trunk/boost/spirit/home/lex/argument.hpp | 2 +-
trunk/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp | 7 +++++--
trunk/boost/spirit/home/lex/lexer/lexertl/static_functor_data.hpp | 7 +++++--
trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp | 10 +++++++++-
4 files changed, 20 insertions(+), 6 deletions(-)
Modified: trunk/boost/spirit/home/lex/argument.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/argument.hpp (original)
+++ trunk/boost/spirit/home/lex/argument.hpp 2010-05-24 18:43:31 EDT (Mon, 24 May 2010)
@@ -157,7 +157,7 @@
>::type
context_type;
- typedef typename context_type::token_value_type& type;
+ typedef typename context_type::get_value_type type;
};
template <typename Env>
Modified: trunk/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp 2010-05-24 18:43:31 EDT (Mon, 24 May 2010)
@@ -39,7 +39,8 @@
public:
typedef Iterator base_iterator_type;
- typedef unused_type token_value_type;
+ typedef iterator_range<Iterator> token_value_type;
+ typedef token_value_type get_value_type;
typedef std::size_t state_type;
typedef char_type const* state_name_type;
typedef unused_type semantic_actions_type;
@@ -194,7 +195,8 @@
public:
typedef Iterator base_iterator_type;
- typedef unused_type token_value_type;
+ typedef iterator_range<Iterator> token_value_type;
+ typedef token_value_type get_value_type;
typedef typename base_type::state_type state_type;
typedef typename base_type::state_name_type state_name_type;
typedef typename base_type::semantic_actions_type
@@ -271,6 +273,7 @@
public:
typedef Iterator base_iterator_type;
typedef TokenValue token_value_type;
+ typedef TokenValue const& get_value_type;
typedef typename base_type::state_type state_type;
typedef typename base_type::state_name_type state_name_type;
Modified: trunk/boost/spirit/home/lex/lexer/lexertl/static_functor_data.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/static_functor_data.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/static_functor_data.hpp 2010-05-24 18:43:31 EDT (Mon, 24 May 2010)
@@ -53,7 +53,8 @@
public:
typedef Iterator base_iterator_type;
- typedef unused_type token_value_type;
+ typedef iterator_range<Iterator> token_value_type;
+ typedef token_value_type get_value_type;
typedef std::size_t state_type;
typedef char_type const* state_name_type;
typedef unused_type semantic_actions_type;
@@ -212,7 +213,8 @@
public:
typedef Iterator base_iterator_type;
- typedef unused_type token_value_type;
+ typedef iterator_range<Iterator> token_value_type;
+ typedef token_value_type get_value_type;
typedef typename base_type::state_type state_type;
typedef typename base_type::state_name_type state_name_type;
typedef typename base_type::semantic_actions_type
@@ -292,6 +294,7 @@
public:
typedef Iterator base_iterator_type;
typedef TokenValue token_value_type;
+ typedef TokenValue const& get_value_type;
typedef typename base_type::state_type state_type;
typedef typename base_type::state_name_type state_name_type;
Modified: trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/token.hpp 2010-05-24 18:43:31 EDT (Mon, 24 May 2010)
@@ -161,6 +161,14 @@
}
#if defined(BOOST_SPIRIT_DEBUG)
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1600)
+ // workaround for MSVC10 which has problems copying a default
+ // constructed iterator_range
+ token& operator= (token const& rhs)
+ {
+ return *this;
+ }
+#endif
std::pair<Iterator, Iterator> matched_;
#endif
@@ -352,7 +360,7 @@
{
if (this != &rhs)
{
- this->base_type::operator=(rhs);
+ this->base_type::operator=(static_cast<base_type const&>(rhs));
if (this->id_ != boost::lexer::npos && this->id_ != 0)
value_ = rhs.value_;
}
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