|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54712 - trunk/boost/spirit/home/lex/lexer/lexertl
From: hartmut.kaiser_at_[hidden]
Date: 2009-07-06 11:13:16
Author: hkaiser
Date: 2009-07-06 11:13:15 EDT (Mon, 06 Jul 2009)
New Revision: 54712
URL: http://svn.boost.org/trac/boost/changeset/54712
Log:
Spirit: added missing tzpedef, fixed iterator_range initialization
Text files modified:
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 | 1 +
3 files changed, 7 insertions(+), 8 deletions(-)
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 2009-07-06 11:13:15 EDT (Mon, 06 Jul 2009)
@@ -257,8 +257,9 @@
template <typename IterData>
data (IterData const& data, Iterator& first, Iterator const& last)
: base_type(data, first, last)
- , actions_(data.actions_), hold_(), has_hold_(false)
- , has_value_(false) {}
+ , actions_(data.actions_), hold_()
+ , value_(iterator_range<Iterator>(first, last))
+ , has_hold_(false), has_value_(false) {}
// invoke attached semantic actions, if defined
BOOST_SCOPED_ENUM(pass_flags) invoke_actions(std::size_t state
@@ -324,8 +325,6 @@
TokenValue const& get_value() const
{
- if (!has_value_)
- value_ = base_type::get_value();
return value_;
}
template <typename Value>
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 2009-07-06 11:13:15 EDT (Mon, 06 Jul 2009)
@@ -279,8 +279,9 @@
static_data (IterData const& data, Iterator& first
, Iterator const& last)
: base_type(data, first, last)
- , actions_(data.actions_), hold_(), has_hold_(false)
- , has_value_(false) {}
+ , actions_(data.actions_), hold_()
+ , value_(iterator_range<Iterator>(first, last))
+ , has_hold_(false), has_value_(false) {}
// invoke attached semantic actions, if defined
BOOST_SCOPED_ENUM(pass_flags) invoke_actions(std::size_t state
@@ -346,8 +347,6 @@
TokenValue const& get_value() const
{
- if (!has_value_)
- value_ = base_type::get_value();
return value_;
}
template <typename Value>
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 2009-07-06 11:13:15 EDT (Mon, 06 Jul 2009)
@@ -198,6 +198,7 @@
typedef typename base_type::id_type id_type;
typedef Iterator iterator_type;
typedef mpl::true_ has_state;
+ typedef unused_type token_value_type;
// default constructed tokens correspond to EOI tokens
token() : state_(boost::lexer::npos) {}
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