|
Boost-Commit : |
From: hartmut.kaiser_at_[hidden]
Date: 2008-04-13 18:40:00
Author: hkaiser
Date: 2008-04-13 18:39:59 EDT (Sun, 13 Apr 2008)
New Revision: 44382
URL: http://svn.boost.org/trac/boost/changeset/44382
Log:
Spirit V2: Fixes to new multi?pass iterator
Text files modified:
trunk/boost/spirit/home/classic/iterator/multi_pass.hpp | 8 ++++++--
trunk/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp | 4 ++--
trunk/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp | 6 +++---
trunk/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp | 4 ++--
trunk/boost/spirit/home/support/multi_pass.hpp | 20 ++++++++++++++++++--
5 files changed, 31 insertions(+), 11 deletions(-)
Modified: trunk/boost/spirit/home/classic/iterator/multi_pass.hpp
==============================================================================
--- trunk/boost/spirit/home/classic/iterator/multi_pass.hpp (original)
+++ trunk/boost/spirit/home/classic/iterator/multi_pass.hpp 2008-04-13 18:39:59 EDT (Sun, 13 Apr 2008)
@@ -1222,10 +1222,14 @@
///// Generator function
template <typename InputT>
-inline multi_pass<InputT>
+inline multi_pass<InputT,
+ multi_pass_policies::input_iterator, multi_pass_policies::ref_counted,
+ multi_pass_policies::buf_id_check, multi_pass_policies::std_deque>
make_multi_pass(InputT i)
{
- return multi_pass<InputT>(i);
+ return multi_pass<InputT,
+ multi_pass_policies::input_iterator, multi_pass_policies::ref_counted,
+ multi_pass_policies::buf_id_check, multi_pass_policies::std_deque>(i);
}
// this could be a template typedef, since such a thing doesn't
Modified: trunk/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp
==============================================================================
--- trunk/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp (original)
+++ trunk/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp 2008-04-13 18:39:59 EDT (Sun, 13 Apr 2008)
@@ -28,7 +28,7 @@
// is done, except on creation of the queue (fixed_size_queue constructor).
///////////////////////////////////////////////////////////////////////////
template <std::size_t N>
- class fixed_size_queue
+ struct fixed_size_queue
{
///////////////////////////////////////////////////////////////////////
template <typename Value>
@@ -45,7 +45,7 @@
: queuePosition(x.queuePosition)
{}
- void swap(inner& x)
+ void swap(unique& x)
{
spirit::detail::swap(queuePosition, x.queuePosition);
}
Modified: trunk/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp
==============================================================================
--- trunk/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp (original)
+++ trunk/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp 2008-04-13 18:39:59 EDT (Sun, 13 Apr 2008)
@@ -14,7 +14,7 @@
namespace boost { namespace spirit { namespace multi_pass_policies
{
- namespace is_valid_test_
+ namespace input_iterator_is_valid_test_
{
template <typename Token>
inline bool token_is_valid(Token const&)
@@ -59,7 +59,7 @@
unique() {}
explicit unique(T x) : input(x) {}
- void swap(inner& x)
+ void swap(unique& x)
{
spirit::detail::swap(input, x.input);
}
@@ -85,7 +85,7 @@
template <typename MultiPass>
static bool input_is_valid(MultiPass const& mp, value_type const& t)
{
- using namespace is_valid_test_;
+ using namespace input_iterator_is_valid_test_;
return token_is_valid(t);
}
Modified: trunk/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp
==============================================================================
--- trunk/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp (original)
+++ trunk/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp 2008-04-13 18:39:59 EDT (Sun, 13 Apr 2008)
@@ -13,7 +13,7 @@
namespace boost { namespace spirit { namespace multi_pass_policies
{
- namespace is_valid_test_
+ namespace split_functor_input_is_valid_test_
{
template <typename Token>
inline bool token_is_valid(Token const&)
@@ -96,7 +96,7 @@
template <typename MultiPass>
static bool input_is_valid(MultiPass const&, value_type const& t)
{
- using namespace is_valid_test_;
+ using namespace split_functor_input_is_valid_test_;
return token_is_valid(t);
}
Modified: trunk/boost/spirit/home/support/multi_pass.hpp
==============================================================================
--- trunk/boost/spirit/home/support/multi_pass.hpp (original)
+++ trunk/boost/spirit/home/support/multi_pass.hpp 2008-04-13 18:39:59 EDT (Sun, 13 Apr 2008)
@@ -7,10 +7,26 @@
#define BOOST_SPIRIT_ITERATOR_MULTI_PASS_MAR_16_2007_0201AM
// Include everything needed for the default configuration of 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/lex_input_policy.hpp>
+#include <boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp>
+
+// Checking policies
#include <boost/spirit/home/support/iterators/detail/buf_id_check_policy.hpp>
-#include <boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp>
-#include <boost/spirit/home/support/iterators/detail/std_deque_policy.hpp>
+#include <boost/spirit/home/support/iterators/detail/no_check_policy.hpp>
+
+// Storage policies
+#include <boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp>
+#include <boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp>
+
+// Main multi_pass iterator
+#include <boost/spirit/home/support/iterators/detail/combine_policies.hpp>
+#include <boost/spirit/home/support/iterators/detail/multi_pass.hpp>
#include <boost/spirit/home/support/iterators/multi_pass.hpp>
#endif
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