|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58723 - in branches/release: boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/karma/auto boost/spirit/home/karma/directive boost/spirit/home/lex/lexer boost/spirit/home/lex/lexer/lexertl boost/spirit/home/lex/qi boost/spirit/home/qi boost/spirit/home/qi/stream boost/spirit/home/qi/stream/detail boost/spirit/home/support boost/spirit/home/support/auto boost/spirit/home/support/detail/lexer/parser boost/spirit/home/support/iterators boost/spirit/home/support/iterators/detail boost/spirit/include libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/phoenix libs/spirit/test libs/spirit/test/qi
From: hartmut.kaiser_at_[hidden]
Date: 2010-01-05 13:42:34
Author: hkaiser
Date: 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
New Revision: 58723
URL: http://svn.boost.org/trac/boost/changeset/58723
Log:
Spirit: merging from trunk
Added:
branches/release/boost/spirit/home/support/iterators/detail/istream_policy.hpp
- copied unchanged from r58695, /trunk/boost/spirit/home/support/iterators/detail/istream_policy.hpp
branches/release/boost/spirit/home/support/iterators/istream_iterator.hpp
- copied unchanged from r58695, /trunk/boost/spirit/home/support/iterators/istream_iterator.hpp
branches/release/boost/spirit/include/support_istream_iterator.hpp
- copied unchanged from r58699, /trunk/boost/spirit/include/support_istream_iterator.hpp
Properties modified:
branches/release/boost/spirit/ (props changed)
branches/release/boost/spirit/home/ (props changed)
branches/release/boost/spirit/home/karma/ (props changed)
branches/release/boost/spirit/home/support/attributes.hpp (props changed)
branches/release/libs/spirit/ (props changed)
branches/release/libs/spirit/classic/example/ (props changed)
branches/release/libs/spirit/doc/ (props changed)
branches/release/libs/spirit/example/ (props changed)
branches/release/libs/spirit/phoenix/ (props changed)
branches/release/libs/spirit/test/ (props changed)
branches/release/libs/spirit/test/qi/optional.cpp (props changed)
Text files modified:
branches/release/boost/spirit/home/karma/auto/auto.hpp | 79 ++++++++++++++++++++++++++++++++++++++++
branches/release/boost/spirit/home/karma/directive/maxwidth.hpp | 4 +-
branches/release/boost/spirit/home/karma/generate.hpp | 1
branches/release/boost/spirit/home/karma/generate_attr.hpp | 6 +-
branches/release/boost/spirit/home/lex/lexer/lexer.hpp | 2
branches/release/boost/spirit/home/lex/lexer/lexertl/token.hpp | 15 +++++++
branches/release/boost/spirit/home/lex/lexer/token_def.hpp | 2
branches/release/boost/spirit/home/lex/qi/plain_token.hpp | 2
branches/release/boost/spirit/home/qi/parse.hpp | 26 +++++++++++++
branches/release/boost/spirit/home/qi/parse_attr.hpp | 12 ++++++
branches/release/boost/spirit/home/qi/stream/detail/match_manip.hpp | 13 ++++--
branches/release/boost/spirit/home/qi/stream/match_manip.hpp | 3 +
branches/release/boost/spirit/home/support/auto/meta_create.hpp | 10 ++--
branches/release/boost/spirit/home/support/common_terminals.hpp | 2
branches/release/boost/spirit/home/support/detail/lexer/parser/parser.hpp | 12 +++---
branches/release/boost/spirit/home/support/iterators/detail/combine_policies.hpp | 75 +++++++++++++++++++++++++------------
branches/release/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp | 10 ++---
branches/release/boost/spirit/home/support/iterators/detail/functor_input_policy.hpp | 26 ++++++++----
branches/release/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp | 13 +++++-
branches/release/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp | 27 ++++++++++---
branches/release/boost/spirit/home/support/iterators/detail/multi_pass.hpp | 9 +++-
branches/release/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp | 65 +++++++++++++++++++++++---------
branches/release/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp | 56 ++++++++++++++--------------
branches/release/boost/spirit/home/support/iterators/multi_pass.hpp | 24 +++++++++---
branches/release/boost/spirit/home/support/iterators/multi_pass_fwd.hpp | 1
branches/release/boost/spirit/home/support/multi_pass.hpp | 3 +
26 files changed, 366 insertions(+), 132 deletions(-)
Modified: branches/release/boost/spirit/home/karma/auto/auto.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/auto/auto.hpp (original)
+++ branches/release/boost/spirit/home/karma/auto/auto.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -31,12 +31,24 @@
template <>
struct use_terminal<karma::domain, tag::auto_> // enables auto_
: mpl::true_ {};
+
+ template <typename A0>
+ struct use_terminal<karma::domain // enables auto_(...)
+ , terminal_ex<tag::auto_, fusion::vector1<A0> >
+ > : mpl::true_ {};
+
+ template <> // enables auto_(f)
+ struct use_lazy_terminal<
+ karma::domain, tag::auto_, 1 /*arity*/
+ > : mpl::true_ {};
+
}}
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace karma
{
using spirit::auto_;
+ using spirit::auto__type;
///////////////////////////////////////////////////////////////////////////
template <typename Modifiers>
@@ -90,8 +102,58 @@
};
///////////////////////////////////////////////////////////////////////////
+ template <typename T, typename Modifiers>
+ struct lit_auto_generator
+ : generator<lit_auto_generator<T, Modifiers> >
+ {
+ typedef mpl::int_<generator_properties::all_properties> properties;
+
+ template <typename Context, typename Unused>
+ struct attribute
+ {
+ typedef unused_type type;
+ };
+
+ lit_auto_generator(typename add_reference<T>::type t, Modifiers const& modifiers)
+ : t_(t)
+ , generator_(compile<karma::domain>(create_generator<T>(), modifiers))
+ {}
+
+ // auto_generator has an attached attribute
+ template <
+ typename OutputIterator, typename Context, typename Delimiter
+ , typename Attribute>
+ bool generate(OutputIterator& sink, Context& context
+ , Delimiter const& d, Attribute const&) const
+ {
+ return generator_.generate(sink, context, d, t_);
+ }
+
+ template <typename Context>
+ info what(Context& /*context*/) const
+ {
+ return info("auto_");
+ }
+
+ typedef typename spirit::result_of::create_generator<T>::type
+ generator_type;
+
+ typedef typename spirit::result_of::compile<
+ karma::domain, generator_type, Modifiers>::type generator_impl_type;
+
+ T t_;
+ generator_impl_type generator_;
+
+ private:
+ // silence MSVC warning C4512: assignment operator could not be generated
+ lit_auto_generator& operator= (lit_auto_generator const&);
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
// Generator generators: make_xxx function (objects)
///////////////////////////////////////////////////////////////////////////
+
+ // auto_
template <typename Modifiers>
struct make_primitive<tag::auto_, Modifiers>
{
@@ -102,6 +164,23 @@
return result_type(modifiers);
}
};
+
+ // auto_(...)
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::auto_, fusion::vector1<A0> >, Modifiers>
+ {
+ typedef typename add_const<A0>::type const_attribute;
+
+ typedef lit_auto_generator<const_attribute, Modifiers> result_type;
+
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, Modifiers const& modifiers) const
+ {
+ return result_type(fusion::at_c<0>(term.args), modifiers);
+ }
+ };
+
}}}
#endif
Modified: branches/release/boost/spirit/home/karma/directive/maxwidth.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/directive/maxwidth.hpp (original)
+++ branches/release/boost/spirit/home/karma/directive/maxwidth.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -224,8 +224,8 @@
namespace boost { namespace spirit { namespace traits
{
- template <typename Subject>
- struct has_semantic_action<karma::maxwidth_width<Subject> >
+ template <typename Subject, typename Width, typename Rest>
+ struct has_semantic_action<karma::maxwidth_width<Subject, Width, Rest> >
: unary_has_semantic_action<Subject> {};
}}}
Modified: branches/release/boost/spirit/home/karma/generate.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/generate.hpp (original)
+++ branches/release/boost/spirit/home/karma/generate.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -59,6 +59,7 @@
// If you got an error_invalid_expression error message here,
// then the expression (expr) is not a valid spirit karma expression.
BOOST_SPIRIT_ASSERT_MATCH(karma::domain, Expr);
+
return compile<karma::domain>(expr).generate(sink, unused, unused, attr);
}
Modified: branches/release/boost/spirit/home/karma/generate_attr.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/generate_attr.hpp (original)
+++ branches/release/boost/spirit/home/karma/generate_attr.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -73,7 +73,7 @@
// wrap user supplied iterator into our own output iterator
detail::output_iterator<OutputIterator
, mpl::int_<properties::value> > sink(target_sink);
- return generate(sink, expr, BOOST_PP_ENUM_PARAMS(N, attr));
+ return karma::generate(sink, expr, BOOST_PP_ENUM_PARAMS(N, attr));
}
///////////////////////////////////////////////////////////////////////////
@@ -133,7 +133,7 @@
detail::output_iterator<OutputIterator
, mpl::int_<properties::value | delimiter_properties::value>
> sink(target_sink);
- return generate_delimited(sink, expr, delimiter, pre_delimit
+ return karma::generate_delimited(sink, expr, delimiter, pre_delimit
, BOOST_PP_ENUM_PARAMS(N, attr));
}
@@ -157,7 +157,7 @@
detail::output_iterator<OutputIterator
, mpl::int_<properties::value | delimiter_properties::value>
> sink(target_sink);
- return generate_delimited(sink, expr, delimiter
+ return karma::generate_delimited(sink, expr, delimiter
, delimit_flag::dont_predelimit, BOOST_PP_ENUM_PARAMS(N, attr));
}
Modified: branches/release/boost/spirit/home/lex/lexer/lexer.hpp
==============================================================================
--- branches/release/boost/spirit/home/lex/lexer/lexer.hpp (original)
+++ branches/release/boost/spirit/home/lex/lexer/lexer.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -86,7 +86,7 @@
boost::detail::iterator_traits<Iterator>::value_type
token_type;
- token_type &t = *first;
+ token_type const& t = *first;
if (token_is_valid(t) && t.state() == first.get_state()) {
// any of the token definitions matched
spirit::traits::assign_to(t, attr);
Modified: branches/release/boost/spirit/home/lex/lexer/lexertl/token.hpp
==============================================================================
--- branches/release/boost/spirit/home/lex/lexer/lexertl/token.hpp (original)
+++ branches/release/boost/spirit/home/lex/lexer/lexertl/token.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -345,6 +345,21 @@
token_value_type& value() { return value_; }
token_value_type const& value() const { return value_; }
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1600)
+ // workaround for MSVC10 which has problems copying a default
+ // constructed iterator_range
+ token& operator= (token const& rhs)
+ {
+ if (this != &rhs)
+ {
+ this->base_type::operator=(rhs);
+ if (this->id_ != boost::lexer::npos && this->id_ != 0)
+ value_ = rhs.value_;
+ }
+ return *this;
+ }
+#endif
+
protected:
token_value_type value_; // token value, by default a pair of iterators
};
Modified: branches/release/boost/spirit/home/lex/lexer/token_def.hpp
==============================================================================
--- branches/release/boost/spirit/home/lex/lexer/token_def.hpp (original)
+++ branches/release/boost/spirit/home/lex/lexer/token_def.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -96,7 +96,7 @@
// associate this token definition with a lexer instance.
BOOST_ASSERT(std::size_t(~0) != token_state_);
- token_type &t = *first;
+ token_type const& t = *first;
if (token_id_ == t.id() && token_state_ == t.state()) {
spirit::traits::assign_to(t, attr);
++first;
Modified: branches/release/boost/spirit/home/lex/qi/plain_token.hpp
==============================================================================
--- branches/release/boost/spirit/home/lex/qi/plain_token.hpp (original)
+++ branches/release/boost/spirit/home/lex/qi/plain_token.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -81,7 +81,7 @@
token_type;
typedef typename token_type::id_type id_type;
- token_type &t = *first;
+ token_type const& t = *first;
if (id_type(id) == t.id()) {
spirit::traits::assign_to(t, attr);
++first;
Modified: branches/release/boost/spirit/home/qi/parse.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/parse.hpp (original)
+++ branches/release/boost/spirit/home/qi/parse.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -13,6 +13,7 @@
#endif
#include <boost/spirit/home/qi/detail/parse.hpp>
+#include <boost/concept_check.hpp>
namespace boost { namespace spirit { namespace qi
{
@@ -24,6 +25,12 @@
, Iterator last
, Expr const& expr)
{
+ // Make sure the iterator is at least a forward_iterator. If you got an
+ // compilation error here, then you are using an input_iterator while
+ // calling this function, you need to supply at least a
+ // forward_iterator instead.
+ BOOST_CONCEPT_ASSERT((ForwardIterator<Iterator>));
+
return detail::parse_impl<Expr>::call(first, last, expr);
}
@@ -35,10 +42,17 @@
, Expr const& expr
, Attr& attr)
{
+ // Make sure the iterator is at least a forward_iterator. If you got an
+ // compilation error here, then you are using an input_iterator while
+ // calling this function, you need to supply at least a
+ // forward_iterator instead.
+ BOOST_CONCEPT_ASSERT((ForwardIterator<Iterator>));
+
// Report invalid expression error as early as possible.
// If you got an error_invalid_expression error message here,
// then the expression (expr) is not a valid spirit qi expression.
BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Expr);
+
return compile<qi::domain>(expr).parse(first, last, unused, unused, attr);
}
@@ -52,6 +66,12 @@
, Skipper const& skipper
, BOOST_SCOPED_ENUM(skip_flag) post_skip = skip_flag::postskip)
{
+ // Make sure the iterator is at least a forward_iterator. If you got an
+ // compilation error here, then you are using an input_iterator while
+ // calling this function, you need to supply at least a
+ // forward_iterator instead.
+ BOOST_CONCEPT_ASSERT((ForwardIterator<Iterator>));
+
return detail::phrase_parse_impl<Expr>::call(
first, last, expr, skipper, post_skip);
}
@@ -66,6 +86,12 @@
, BOOST_SCOPED_ENUM(skip_flag) post_skip
, Attr& attr)
{
+ // Make sure the iterator is at least a forward_iterator. If you got an
+ // compilation error here, then you are using an input_iterator while
+ // calling this function, you need to supply at least a
+ // forward_iterator instead.
+ BOOST_CONCEPT_ASSERT((ForwardIterator<Iterator>));
+
// Report invalid expression error as early as possible.
// If you got an error_invalid_expression error message here,
// then either the expression (expr) or skipper is not a valid
Modified: branches/release/boost/spirit/home/qi/parse_attr.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/parse_attr.hpp (original)
+++ branches/release/boost/spirit/home/qi/parse_attr.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -46,6 +46,12 @@
, Expr const& expr
, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & attr))
{
+ // Make sure the iterator is at least a forward_iterator. If you got an
+ // compilation error here, then you are using an input_iterator while
+ // calling this function, you need to supply at least a
+ // forward_iterator instead.
+ BOOST_CONCEPT_ASSERT((ForwardIterator<Iterator>));
+
// Report invalid expression error as early as possible.
// If you got an error_invalid_expression error message here,
// then the expression (expr) is not a valid spirit qi expression.
@@ -71,6 +77,12 @@
, BOOST_SCOPED_ENUM(skip_flag) post_skip
, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & attr))
{
+ // Make sure the iterator is at least a forward_iterator. If you got an
+ // compilation error here, then you are using an input_iterator while
+ // calling this function, you need to supply at least a
+ // forward_iterator instead.
+ BOOST_CONCEPT_ASSERT((ForwardIterator<Iterator>));
+
// Report invalid expression error as early as possible.
// If you got an error_invalid_expression error message here,
// then either the expression (expr) or skipper is not a valid
Modified: branches/release/boost/spirit/home/qi/stream/detail/match_manip.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/stream/detail/match_manip.hpp (original)
+++ branches/release/boost/spirit/home/qi/stream/detail/match_manip.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -12,6 +12,7 @@
#endif
#include <boost/spirit/home/qi/parse.hpp>
+#include <boost/spirit/home/support/iterators/istream_iterator.hpp>
#include <boost/spirit/home/support/unused.hpp>
#include <boost/mpl/bool.hpp>
@@ -152,7 +153,8 @@
operator>>(std::basic_istream<Char, Traits> &is,
match_manip<Expr, CopyExpr, CopyAttr> const& fm)
{
- typedef std::istream_iterator<Char, Char, Traits> input_iterator;
+ typedef spirit::basic_istream_iterator<Char, Traits> input_iterator;
+
input_iterator f(is);
input_iterator l;
if (!qi::parse(f, l, fm.expr))
@@ -170,7 +172,8 @@
operator>>(std::basic_istream<Char, Traits> &is,
match_manip<Expr, CopyExpr, CopyAttr, unused_type, Attribute> const& fm)
{
- typedef std::istream_iterator<Char, Char, Traits> input_iterator;
+ typedef spirit::basic_istream_iterator<Char, Traits> input_iterator;
+
input_iterator f(is);
input_iterator l;
if (!qi::parse(f, l, fm.expr, fm.attr))
@@ -188,7 +191,8 @@
operator>>(std::basic_istream<Char, Traits> &is,
match_manip<Expr, CopyExpr, CopyAttr, Skipper> const& fm)
{
- typedef std::istream_iterator<Char, Char, Traits> input_iterator;
+ typedef spirit::basic_istream_iterator<Char, Traits> input_iterator;
+
input_iterator f(is);
input_iterator l;
if (!qi::phrase_parse(
@@ -209,7 +213,8 @@
std::basic_istream<Char, Traits> &is,
match_manip<Expr, CopyExpr, CopyAttr, Attribute, Skipper> const& fm)
{
- typedef std::istream_iterator<Char, Char, Traits> input_iterator;
+ typedef spirit::basic_istream_iterator<Char, Traits> input_iterator;
+
input_iterator f(is);
input_iterator l;
if (!qi::phrase_parse(
Modified: branches/release/boost/spirit/home/qi/stream/match_manip.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/stream/match_manip.hpp (original)
+++ branches/release/boost/spirit/home/qi/stream/match_manip.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -106,7 +106,8 @@
inline std::basic_istream<Char, Traits>&
operator>>(std::basic_istream<Char, Traits>& is, parser<Derived> const& p)
{
- typedef std::istream_iterator<Char, Char, Traits> input_iterator;
+ typedef spirit::basic_istream_iterator<Char, Traits> input_iterator;
+
input_iterator f(is);
input_iterator l;
if (!p.derived().parse(f, l, unused, unused, unused))
Modified: branches/release/boost/spirit/home/support/auto/meta_create.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/auto/meta_create.hpp (original)
+++ branches/release/boost/spirit/home/support/auto/meta_create.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -22,7 +22,7 @@
#include <boost/fusion/include/fold.hpp>
// needed for workaround below
-#if defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ < 1))
+#if defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ < 3))
#include <boost/type_traits/is_same.hpp>
#endif
@@ -64,9 +64,9 @@
template <typename T>
struct result;
-// this is a workaround for older versions of g++ (< V4.2) which apparently have
+// this is a workaround for older versions of g++ (< V4.3) which apparently have
// problems with the following template specialization
-#if defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ < 2))
+#if defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ < 3))
template <typename F, typename T1, typename T2>
struct result<F(T1, T2)>
{
@@ -113,9 +113,9 @@
template <typename T>
struct result;
-// this is a workaround for older versions of g++ (< V4.2) which apparently have
+// this is a workaround for older versions of g++ (< V4.3) which apparently have
// problems with the following template specialization
-#if defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ < 2))
+#if defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ < 3))
template <typename F, typename T1, typename T2>
struct result<F(T1, T2)>
{
Modified: branches/release/boost/spirit/home/support/common_terminals.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/common_terminals.hpp (original)
+++ branches/release/boost/spirit/home/support/common_terminals.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -33,7 +33,6 @@
( buffer )
( true_ )
( false_ )
- ( auto_ )
)
// Here we are reusing proto::lit
@@ -82,6 +81,7 @@
( token )
( attr )
( columns )
+ ( auto_ )
)
// special tags (used mainly for stateful tag types)
Modified: branches/release/boost/spirit/home/support/detail/lexer/parser/parser.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/detail/lexer/parser/parser.hpp (original)
+++ branches/release/boost/spirit/home/support/detail/lexer/parser/parser.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -452,7 +452,7 @@
for (std::size_t i_ = 2; i_ < top_; ++i_)
{
curr_ = prev_->copy (node_ptr_vector_);
- tree_node_stack_.push (0);
+ tree_node_stack_.push (static_cast<node*>(0));
tree_node_stack_.top () = prev_;
sequence (node_ptr_vector_, tree_node_stack_);
prev_ = curr_;
@@ -463,7 +463,7 @@
if (token_._min > 1)
{
curr_ = prev_->copy (node_ptr_vector_);
- tree_node_stack_.push (0);
+ tree_node_stack_.push (static_cast<node*>(0));
tree_node_stack_.top () = prev_;
sequence (node_ptr_vector_, tree_node_stack_);
prev_ = curr_;
@@ -471,7 +471,7 @@
if (token_._comma && token_._max)
{
- tree_node_stack_.push (0);
+ tree_node_stack_.push (static_cast<node*>(0));
tree_node_stack_.top () = prev_;
optional (greedy_, node_ptr_vector_, tree_node_stack_);
prev_ = tree_node_stack_.top ();
@@ -482,7 +482,7 @@
for (std::size_t i_ = 1; i_ < count_; ++i_)
{
curr_ = prev_->copy (node_ptr_vector_);
- tree_node_stack_.push (0);
+ tree_node_stack_.push (static_cast<node*>(0));
tree_node_stack_.top () = prev_;
sequence (node_ptr_vector_, tree_node_stack_);
prev_ = curr_;
@@ -490,7 +490,7 @@
}
else
{
- tree_node_stack_.push (0);
+ tree_node_stack_.push (static_cast<node*>(0));
tree_node_stack_.top () = prev_;
zero_or_more (greedy_, node_ptr_vector_, tree_node_stack_);
prev_ = tree_node_stack_.top ();
@@ -498,7 +498,7 @@
}
}
- tree_node_stack_.push (0);
+ tree_node_stack_.push (static_cast<node*>(0));
tree_node_stack_.top () = prev_;
sequence (node_ptr_vector_, tree_node_stack_);
}
Modified: branches/release/boost/spirit/home/support/iterators/detail/combine_policies.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/iterators/detail/combine_policies.hpp (original)
+++ branches/release/boost/spirit/home/support/iterators/detail/combine_policies.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -30,6 +30,7 @@
: Ownership, Checking, Input, Storage
{
multi_pass_unique() {}
+ multi_pass_unique(T& x) : Input(x) {}
multi_pass_unique(T const& x) : Input(x) {}
template <typename MultiPass>
@@ -66,6 +67,7 @@
: Ownership, Checking, Input, Storage
{
multi_pass_unique() {}
+ multi_pass_unique(T& x) : Input(x) {}
multi_pass_unique(T const& x) : Input(x) {}
template <typename MultiPass>
@@ -111,13 +113,17 @@
}
// implement input policy functions by forwarding to the Input type
- template <typename MultiPass, typename TokenType>
- inline static TokenType& advance_input(MultiPass& mp, TokenType& curtok)
- { return Input::advance_input(mp, curtok); }
+ template <typename MultiPass>
+ inline static void advance_input(MultiPass& mp)
+ { Input::advance_input(mp); }
- template <typename MultiPass, typename TokenType>
- inline static bool input_at_eof(MultiPass const& mp, TokenType& curtok)
- { return Input::input_at_eof(mp, curtok); }
+ template <typename TokenType, typename MultiPass>
+ inline static TokenType const& get_input(MultiPass& mp)
+ { return Input::template get_input<TokenType>(mp); }
+
+ template <typename MultiPass>
+ inline static bool input_at_eof(MultiPass const& mp)
+ { return Input::input_at_eof(mp); }
template <typename MultiPass, typename TokenType>
inline static bool input_is_valid(MultiPass& mp, TokenType& curtok)
@@ -132,6 +138,7 @@
: Ownership, Input, Storage
{
multi_pass_unique() {}
+ multi_pass_unique(T& x) : Input(x) {}
multi_pass_unique(T const& x) : Input(x) {}
template <typename MultiPass>
@@ -182,13 +189,17 @@
}
// implement input policy functions by forwarding to the Input type
- template <typename MultiPass, typename TokenType>
- inline static TokenType& advance_input(MultiPass& mp, TokenType& curtok)
- { return Input::advance_input(mp, curtok); }
+ template <typename MultiPass>
+ inline static void advance_input(MultiPass& mp)
+ { Input::advance_input(mp); }
- template <typename MultiPass, typename TokenType>
- inline static bool input_at_eof(MultiPass const& mp, TokenType& curtok)
- { return Input::input_at_eof(mp, curtok); }
+ template <typename TokenType, typename MultiPass>
+ inline static TokenType const& get_input(MultiPass& mp)
+ { return Input::template get_input<TokenType>(mp); }
+
+ template <typename MultiPass>
+ inline static bool input_at_eof(MultiPass const& mp)
+ { return Input::input_at_eof(mp); }
template <typename MultiPass, typename TokenType>
inline static bool input_is_valid(MultiPass& mp, TokenType& curtok)
@@ -212,6 +223,7 @@
: Checking, Input, Storage
{
multi_pass_unique() {}
+ multi_pass_unique(T& x) : Input(x) {}
multi_pass_unique(T const& x) : Input(x) {}
template <typename MultiPass>
@@ -266,13 +278,17 @@
}
// implement input policy functions by forwarding to the Input type
- template <typename MultiPass, typename TokenType>
- inline static TokenType& advance_input(MultiPass& mp, TokenType& curtok)
- { return Input::advance_input(mp, curtok); }
+ template <typename MultiPass>
+ inline static void advance_input(MultiPass& mp)
+ { Input::advance_input(mp); }
- template <typename MultiPass, typename TokenType>
- inline static bool input_at_eof(MultiPass const& mp, TokenType& curtok)
- { return Input::input_at_eof(mp, curtok); }
+ template <typename TokenType, typename MultiPass>
+ inline static TokenType const& get_input(MultiPass& mp)
+ { return Input::template get_input<TokenType>(mp); }
+
+ template <typename MultiPass>
+ inline static bool input_at_eof(MultiPass const& mp)
+ { return Input::input_at_eof(mp); }
template <typename MultiPass, typename TokenType>
inline static bool input_is_valid(MultiPass& mp, TokenType& curtok)
@@ -300,8 +316,9 @@
: Input, Storage
{
multi_pass_unique() {}
+ multi_pass_unique(T& x) : Input(x) {}
multi_pass_unique(T const& x) : Input(x) {}
-
+
template <typename MultiPass>
static void destroy(MultiPass& mp)
{
@@ -359,13 +376,17 @@
}
// implement input policy functions by forwarding to the Input type
- template <typename MultiPass, typename TokenType>
- inline static TokenType& advance_input(MultiPass& mp, TokenType& curtok)
- { return Input::advance_input(mp, curtok); }
+ template <typename MultiPass>
+ inline static void advance_input(MultiPass& mp)
+ { Input::advance_input(mp); }
- template <typename MultiPass, typename TokenType>
- inline static bool input_at_eof(MultiPass const& mp, TokenType& curtok)
- { return Input::input_at_eof(mp, curtok); }
+ template <typename TokenType, typename MultiPass>
+ inline static TokenType const& get_input(MultiPass& mp)
+ { return Input::template get_input<TokenType>(mp); }
+
+ template <typename MultiPass>
+ inline static bool input_at_eof(MultiPass const& mp)
+ { return Input::input_at_eof(mp); }
template <typename MultiPass, typename TokenType>
inline static bool input_is_valid(MultiPass& mp, TokenType& curtok)
@@ -403,6 +424,7 @@
, typename Storage>
struct multi_pass_shared : Ownership, Checking, Input, Storage
{
+ explicit multi_pass_shared(T& input) : Input(input) {}
explicit multi_pass_shared(T const& input) : Input(input) {}
};
@@ -438,6 +460,7 @@
, input_policy, storage_policy> unique_base_type;
unique() {}
+ explicit unique(T& input) : unique_base_type(input) {}
explicit unique(T const& input) : unique_base_type(input) {}
};
@@ -460,6 +483,8 @@
typedef multi_pass_shared<T, ownership_policy, checking_policy
, input_policy, storage_policy> shared_base_type;
+ explicit shared(T& input)
+ : shared_base_type(input), inhibit_clear_queue_(false) {}
explicit shared(T const& input)
: shared_base_type(input), inhibit_clear_queue_(false) {}
Modified: branches/release/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp (original)
+++ branches/release/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -57,12 +57,9 @@
{
if (mp.queuePosition == mp.shared()->queuedElements.end())
{
- return MultiPass::get_input(mp);
- }
- else
- {
- return *mp.queuePosition;
+ return MultiPass::template get_input<Value>(mp);
}
+ return *mp.queuePosition;
}
// This is called when the iterator is incremented. It's a
@@ -77,7 +74,8 @@
if (mp.shared()->queuedElements.size() >= N)
mp.shared()->queuedElements.pop_front();
- mp.shared()->queuedElements.push_back(MultiPass::get_input(mp));
+ mp.shared()->queuedElements.push_back(
+ MultiPass::template get_input<Value>(mp));
MultiPass::advance_input(mp);
}
++mp.queuePosition;
Modified: branches/release/boost/spirit/home/support/iterators/detail/functor_input_policy.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/iterators/detail/functor_input_policy.hpp (original)
+++ branches/release/boost/spirit/home/support/iterators/detail/functor_input_policy.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -58,21 +58,29 @@
public:
// get the next token
+ template <typename ValueType, typename MultiPass>
+ static ValueType const& get_input(MultiPass& mp)
+ {
+ value_type& curtok = mp.shared()->curtok;
+ if (!input_is_valid(mp, curtok))
+ curtok = mp.ftor();
+ return curtok;
+ }
+
template <typename MultiPass>
- static void advance_input(MultiPass& mp, value_type& t)
+ static void advance_input(MultiPass& mp)
{
// if mp.shared is NULL then this instance of the multi_pass
- // represents a end iterator, so no advance functionality is
- // needed
- if (0 != mp.shared())
- t = mp.ftor();
+ // represents a end iterator
+ BOOST_ASSERT(0 != mp.shared());
+ mp.shared()->curtok = mp.ftor();
}
// test, whether we reached the end of the underlying stream
template <typename MultiPass>
- static bool input_at_eof(MultiPass const& mp, value_type const& t)
+ static bool input_at_eof(MultiPass const& mp)
{
- return t == mp.ftor.eof;
+ return mp.shared()->curtok == mp.ftor.eof;
}
template <typename MultiPass>
@@ -95,9 +103,9 @@
template <typename Functor>
struct shared
{
- explicit shared(Functor const& x) {}
+ explicit shared(Functor const& x) : curtok(0) {}
- // no shared data elements
+ result_type curtok;
};
};
Modified: branches/release/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp (original)
+++ branches/release/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -16,6 +16,7 @@
{
namespace input_iterator_is_valid_test_
{
+ ///////////////////////////////////////////////////////////////////////
template <typename Token>
inline bool token_is_valid(Token const& c)
{
@@ -65,15 +66,21 @@
template <typename MultiPass>
static void destroy(MultiPass&) {}
+ template <typename ValueType, typename MultiPass>
+ static ValueType const& get_input(MultiPass& mp)
+ {
+ return *mp.shared()->input_;
+ }
+
template <typename MultiPass>
- static value_type& advance_input(MultiPass& mp, value_type& t)
+ static void advance_input(MultiPass& mp)
{
- return t = *mp.shared()->input_++;
+ ++mp.shared()->input_;
}
// test, whether we reached the end of the underlying stream
template <typename MultiPass>
- static bool input_at_eof(MultiPass const& mp, value_type const&)
+ static bool input_at_eof(MultiPass const& mp)
{
static T const end_iter;
return mp.shared()->input_ == end_iter;
Modified: branches/release/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp (original)
+++ branches/release/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -20,12 +20,13 @@
///////////////////////////////////////////////////////////////////////////
struct lex_input
{
+ typedef int value_type;
+
///////////////////////////////////////////////////////////////////////
template <typename T>
class unique : public detail::default_input_policy
{
public:
- typedef int value_type;
typedef std::ptrdiff_t difference_type;
typedef std::ptrdiff_t distance_type;
typedef int* pointer;
@@ -37,17 +38,29 @@
public:
template <typename MultiPass>
- static value_type& advance_input(MultiPass& mp, value_type& t)
+ static value_type const& get_input(MultiPass& mp)
+ {
+ value_type& curtok = mp.shared()->curtok;
+ if (-1 == curtok)
+ {
+ extern int yylex();
+ curtok = yylex();
+ }
+ return curtok;
+ }
+
+ template <typename MultiPass>
+ static void advance_input(MultiPass& mp)
{
extern int yylex();
- return t = yylex();
+ mp.shared()->curtok = yylex();
}
// test, whether we reached the end of the underlying stream
template <typename MultiPass>
- static bool input_at_eof(MultiPass const&, value_type const& t)
+ static bool input_at_eof(MultiPass const& mp)
{
- return 0 == t;
+ return mp.shared()->curtok == 0;
}
template <typename MultiPass>
@@ -61,9 +74,9 @@
template <typename T>
struct shared
{
- explicit shared(T) {}
+ explicit shared(T) : curtok(-1) {}
- // no shared data elements
+ value_type curtok;
};
};
Modified: branches/release/boost/spirit/home/support/iterators/detail/multi_pass.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/iterators/detail/multi_pass.hpp (original)
+++ branches/release/boost/spirit/home/support/iterators/detail/multi_pass.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -67,10 +67,13 @@
void swap(default_input_policy&) {}
template <typename MultiPass, typename TokenType>
- static TokenType& advance_input(MultiPass& mp, TokenType& curtok);
+ static void advance_input(MultiPass& mp);
- template <typename MultiPass, typename TokenType>
- static bool input_at_eof(MultiPass const& mp, TokenType& curtok);
+ template <typename TokenType, typename MultiPass>
+ static TokenType const& get_input(MultiPass& mp);
+
+ template <typename MultiPass>
+ static bool input_at_eof(MultiPass const& mp);
template <typename MultiPass, typename TokenType>
static bool input_is_valid(MultiPass& mp, TokenType& curtok);
Modified: branches/release/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp (original)
+++ branches/release/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -64,8 +64,8 @@
typedef result_type value_type;
typedef std::ptrdiff_t difference_type;
typedef std::ptrdiff_t distance_type;
- typedef result_type* pointer;
- typedef result_type& reference;
+ typedef result_type const* pointer;
+ typedef result_type const& reference;
protected:
unique() {}
@@ -75,20 +75,27 @@
void swap(unique&) {}
// get the next token
+ template <typename ValueType, typename MultiPass>
+ static ValueType const& get_input(MultiPass& mp)
+ {
+ value_type& curtok = mp.shared()->curtok;
+ using namespace split_functor_input_is_valid_test_;
+ if (!token_is_valid(curtok))
+ functor_type::get_next(mp, curtok);
+ return curtok;
+ }
+
template <typename MultiPass>
- static value_type& advance_input(MultiPass& mp, value_type& t)
+ static void advance_input(MultiPass& mp)
{
- // passing a refernec to the current token instance as a
- // parameter helps generating better code if compared to
- // assigning the result of the functor to this instance
- return functor_type::get_next(mp, t);
+ functor_type::get_next(mp, mp.shared()->curtok);
}
// test, whether we reached the end of the underlying stream
template <typename MultiPass>
- static bool input_at_eof(MultiPass const&, value_type const& t)
+ static bool input_at_eof(MultiPass const& mp)
{
- return t == functor_type::eof;
+ return mp.shared()->curtok == functor_type::eof;
}
template <typename MultiPass>
@@ -126,25 +133,39 @@
typedef result_type value_type;
typedef std::ptrdiff_t difference_type;
typedef std::ptrdiff_t distance_type;
- typedef result_type* pointer;
- typedef result_type& reference;
+ typedef result_type const* pointer;
+ typedef result_type const& reference;
public:
// get the next token
+ template <typename ValueType, typename MultiPass>
+ static ValueType const& get_input(MultiPass& mp)
+ {
+ value_type& curtok = mp.shared()->curtok;
+ using namespace split_functor_input_is_valid_test_;
+ if (!token_is_valid(curtok))
+ functor_type::get_next(mp, curtok);
+ return curtok;
+ }
+
+ template <typename MultiPass>
+ static void advance_input(MultiPass& mp)
+ {
+ mp.ftor.get_next(mp, mp.shared()->curtok);
+ }
+
template <typename MultiPass>
- static value_type& advance_input(MultiPass& mp, value_type& t)
+ static bool input_is_valid(MultiPass const&, value_type const& t)
{
- // passing a refernec to the current token instance as a
- // parameter helps generating better code if compared to
- // assigning the result of the functor to this instance
- return mp.ftor.get_next(mp, t);
+ using namespace split_functor_input_is_valid_test_;
+ return token_is_valid(t);
}
// test, whether we reached the end of the underlying stream
template <typename MultiPass>
- static bool input_at_eof(MultiPass const& mp, value_type const& t)
+ static bool input_at_eof(MultiPass const& mp)
{
- return t == mp.ftor.eof;
+ return mp.shared()->curtok == mp.ftor.eof;
}
typename Functor::first_type& get_functor() const
@@ -159,9 +180,15 @@
template <typename Functor>
struct shared
{
- explicit shared(Functor const& x) : ftor(x.second) {}
+ protected:
+ typedef typename Functor::first_type functor_type;
+ typedef typename functor_type::result_type result_type;
+
+ public:
+ explicit shared(Functor const& x) : ftor(x.second), curtok(0) {}
mutable typename Functor::second_type ftor;
+ result_type curtok;
private:
// silence MSVC warning C4512: assignment operator could not be generated
Modified: branches/release/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp (original)
+++ branches/release/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -35,7 +35,7 @@
typedef std::vector<Value> queue_type;
protected:
- unique() : queued_position(1) {}
+ unique() : queued_position(0) {}
unique(unique const& x)
: queued_position(x.queued_position) {}
@@ -53,13 +53,23 @@
dereference(MultiPass const& mp)
{
queue_type& queue = mp.shared()->queued_elements;
+ typename queue_type::size_type size = queue.size();
- BOOST_ASSERT(mp.queued_position > 0 && mp.queued_position <= queue.size());
+ BOOST_ASSERT(mp.queued_position <= size);
- Value& v(queue[mp.queued_position-1]);
- if (!MultiPass::input_is_valid(mp, v))
- return MultiPass::advance_input(mp, v);
- return v;
+ if (mp.queued_position == size)
+ {
+ // check if this is the only iterator
+ if (size >= threshold && MultiPass::is_unique(mp))
+ {
+ // free up the memory used by the queue.
+ queue.clear();
+ mp.queued_position = 0;
+ }
+ return MultiPass::template get_input<Value>(mp);
+ }
+
+ return queue[mp.queued_position];
}
// This is called when the iterator is incremented. It's a template
@@ -71,12 +81,12 @@
queue_type& queue = mp.shared()->queued_elements;
typename queue_type::size_type size = queue.size();
- BOOST_ASSERT(mp.queued_position > 0 && mp.queued_position <= size);
+ BOOST_ASSERT(mp.queued_position <= size);
- // do not increment iterator as long as the current token is
- // invalid
- if (size > 0 && !MultiPass::input_is_valid(mp, queue[mp.queued_position-1]))
- return;
+// // do not increment iterator as long as the current token is
+// // invalid
+// if (size > 0 && !MultiPass::input_is_valid(mp, queue[mp.queued_position-1]))
+// return;
if (mp.queued_position == size)
{
@@ -86,21 +96,15 @@
// free up the memory used by the queue. we avoid
// clearing the queue on every increment, though,
// because this would be too time consuming
-
- // erase all but first item in queue
- queue.erase(queue.begin()+1, queue.end());
+ queue.clear();
mp.queued_position = 0;
-
- // reuse first entry in the queue and initialize
- // it from the input
}
else
{
- // create a new entry in the queue and initialize
- // it from the input
- queue.push_back(Value(0));
+ queue.push_back(MultiPass::template get_input<Value>(mp));
+ ++mp.queued_position;
}
- MultiPass::advance_input(mp, queue[mp.queued_position++]);
+ MultiPass::advance_input(mp);
}
else
{
@@ -113,18 +117,15 @@
static void clear_queue(MultiPass& mp)
{
mp.shared()->queued_elements.clear();
- mp.shared()->queued_elements.push_back(Value(0));
- mp.queued_position = 1;
+ mp.queued_position = 0;
}
// called to determine whether the iterator is an eof iterator
template <typename MultiPass>
static bool is_eof(MultiPass const& mp)
{
- queue_type& queue = mp.shared()->queued_elements;
- return 0 != mp.queued_position &&
- mp.queued_position == queue.size() &&
- MultiPass::input_at_eof(mp, queue[mp.queued_position-1]);
+ return mp.queued_position == mp.shared()->queued_elements.size()
+ && MultiPass::input_at_eof(mp);
}
// called by operator==
@@ -155,7 +156,6 @@
shared()
{
queued_elements.reserve(threshold);
- queued_elements.push_back(Value(0));
}
typedef std::vector<Value> queue_type;
Modified: branches/release/boost/spirit/home/support/iterators/multi_pass.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/iterators/multi_pass.hpp (original)
+++ branches/release/boost/spirit/home/support/iterators/multi_pass.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -58,12 +58,9 @@
multi_pass() : member_base((shared_data_type*)0) {}
- // Newer versions of gcc (and perhaps other compilers) are known to
- // generate warnings about the base class and the 'shared' member
- // being initialized in the wrong order ('shared' is initialized before
- // the base class). This is fully intended behavior as some policies
- // rely on the fact that their shared part is initialized before their
- // unique part. Please ignore the warnings, these are harmless.
+ explicit multi_pass(T& input)
+ : member_base(new shared_data_type(input)), policies_base_type(input) {}
+
explicit multi_pass(T const& input)
: member_base(new shared_data_type(input)), policies_base_type(input) {}
@@ -202,11 +199,24 @@
///////////////////////////////////////////////////////////////////////////
template <typename Policies, typename T>
inline multi_pass<T, Policies>
+ make_multi_pass(T& i)
+ {
+ return multi_pass<T, Policies>(i);
+ }
+ template <typename Policies, typename T>
+ inline multi_pass<T, Policies>
make_multi_pass(T const& i)
{
return multi_pass<T, Policies>(i);
}
+ ///////////////////////////////////////////////////////////////////////////
+ template <typename T>
+ inline multi_pass<T>
+ make_default_multi_pass(T& i)
+ {
+ return multi_pass<T>(i);
+ }
template <typename T>
inline multi_pass<T>
make_default_multi_pass(T const& i)
@@ -214,6 +224,7 @@
return multi_pass<T>(i);
}
+ ///////////////////////////////////////////////////////////////////////////
template <typename T, typename Policies>
inline void
swap(multi_pass<T, Policies> &x, multi_pass<T, Policies> &y)
@@ -221,6 +232,7 @@
x.swap(y);
}
+ ///////////////////////////////////////////////////////////////////////////
// define special functions allowing to integrate any multi_pass iterator
// with expectation points
namespace traits
Modified: branches/release/boost/spirit/home/support/iterators/multi_pass_fwd.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/iterators/multi_pass_fwd.hpp (original)
+++ branches/release/boost/spirit/home/support/iterators/multi_pass_fwd.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -18,6 +18,7 @@
{
// input policies
struct input_iterator;
+ struct istream;
struct lex_input;
struct functor_input;
struct split_functor_input;
Modified: branches/release/boost/spirit/home/support/multi_pass.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/multi_pass.hpp (original)
+++ branches/release/boost/spirit/home/support/multi_pass.hpp 2010-01-05 13:42:31 EST (Tue, 05 Jan 2010)
@@ -10,13 +10,14 @@
#pragma once
#endif
-// Include everything needed for the default configuration of multi_pass
+// Include everything needed for the multi_pass
// Ownership policies
#include <boost/spirit/home/support/iterators/detail/first_owner_policy.hpp>
#include <boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp>
// Input policies
#include <boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp>
+#include <boost/spirit/home/support/iterators/detail/istream_policy.hpp>
#include <boost/spirit/home/support/iterators/detail/lex_input_policy.hpp>
#include <boost/spirit/home/support/iterators/detail/split_functor_input_policy.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