Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56640 - in branches/release: boost/spirit boost/spirit/home/karma boost/spirit/home/qi/detail boost/spirit/home/qi/operator boost/spirit/include boost/spirit/repository/home/karma/nonterminal boost/spirit/repository/home/qi/nonterminal libs/spirit/repository/test/test_headers libs/spirit/test libs/spirit/test/karma libs/spirit/test/qi
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-07 20:50:05


Author: hkaiser
Date: 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
New Revision: 56640
URL: http://svn.boost.org/trac/boost/changeset/56640

Log:
Spirit: removing features not to be meant to be released yet.
Removed:
   branches/release/boost/spirit/home/karma/phoenix_attributes.hpp
   branches/release/boost/spirit/include/karma_phoenix_attributes.hpp
Text files modified:
   branches/release/boost/spirit/home/qi/detail/alternative_function.hpp | 18 +++++++--
   branches/release/boost/spirit/home/qi/operator/alternative.hpp | 57 +--------------------------------
   branches/release/boost/spirit/repository/home/karma/nonterminal/subrule.hpp | 17 +++++----
   branches/release/boost/spirit/repository/home/qi/nonterminal/subrule.hpp | 38 +++++++++++++++++++---
   branches/release/boost/spirit/version.hpp | 8 ----
   branches/release/libs/spirit/repository/test/test_headers/Jamfile | 9 ++++-
   branches/release/libs/spirit/test/CMakeLists.txt | 5 ++
   branches/release/libs/spirit/test/karma/binary.cpp | 67 ----------------------------------------
   branches/release/libs/spirit/test/karma/bool.cpp | 12 -------
   branches/release/libs/spirit/test/karma/char.cpp | 14 --------
   branches/release/libs/spirit/test/karma/int_numerics.cpp | 10 -----
   branches/release/libs/spirit/test/karma/real_numerics.cpp | 11 ------
   branches/release/libs/spirit/test/karma/repeat.cpp | 12 -------
   branches/release/libs/spirit/test/qi/alternative.cpp | 13 -------
   14 files changed, 71 insertions(+), 220 deletions(-)

Deleted: branches/release/boost/spirit/home/karma/phoenix_attributes.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/phoenix_attributes.hpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
+++ (empty file)
@@ -1,99 +0,0 @@
-// Copyright (c) 2001-2009 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#if !defined(BOOST_SPIRIT_KARMA_PHOENIX_ATTRIBUTES_OCT_01_2009_1128AM)
-#define BOOST_SPIRIT_KARMA_PHOENIX_ATTRIBUTES_OCT_01_2009_1128AM
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/spirit/home/support/attributes.hpp>
-#include <boost/spirit/home/support/container.hpp>
-
-#include <boost/spirit/include/phoenix_core.hpp>
-#include <boost/utility/result_of.hpp>
-
-///////////////////////////////////////////////////////////////////////////////
-namespace boost { namespace spirit { namespace traits
-{
- ///////////////////////////////////////////////////////////////////////////
- // Provide customization points allowing the use of phoenix expressions as
- // generator functions in the context of generators expecting a container
- // attribute (Kleene, plus, list, repeat, etc.)
- ///////////////////////////////////////////////////////////////////////////
- template <typename Eval>
- struct container_iterator<phoenix::actor<Eval> const>
- {
- typedef phoenix::actor<Eval> const& type;
- };
-
- template <typename Eval>
- struct begin_container<phoenix::actor<Eval> const>
- {
- typedef phoenix::actor<Eval> const& type;
- static type call(phoenix::actor<Eval> const& f)
- {
- return f;
- }
- };
-
- template <typename Eval>
- struct end_container<phoenix::actor<Eval> const>
- {
- typedef phoenix::actor<Eval> const& type;
- static type call(phoenix::actor<Eval> const& f)
- {
- return f;
- }
- };
-
- template <typename Eval>
- struct deref_iterator<phoenix::actor<Eval> const>
- {
- typedef typename boost::result_of<phoenix::actor<Eval>()>::type type;
- static type call(phoenix::actor<Eval> const& f)
- {
- return f();
- }
- };
-
- template <typename Eval>
- struct next_iterator<phoenix::actor<Eval> const>
- {
- typedef phoenix::actor<Eval> const& type;
- static type call(phoenix::actor<Eval> const& f)
- {
- return f;
- }
- };
-
- template <typename Eval>
- struct compare_iterators<phoenix::actor<Eval> const>
- {
- static bool
- call(phoenix::actor<Eval> const&, phoenix::actor<Eval> const&)
- {
- return false;
- }
- };
-
- ///////////////////////////////////////////////////////////////////////////
- // Handle Phoenix actors as attributes, just invoke the function object
- // and deal with the result as the attribute.
- ///////////////////////////////////////////////////////////////////////////
- template <typename Eval>
- struct extract_from_attribute<phoenix::actor<Eval> >
- {
- typedef typename boost::result_of<phoenix::actor<Eval>()>::type type;
- static type call(phoenix::actor<Eval> const& f)
- {
- return f();
- }
- };
-
-}}}
-
-#endif

Modified: branches/release/boost/spirit/home/qi/detail/alternative_function.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/detail/alternative_function.hpp (original)
+++ branches/release/boost/spirit/home/qi/detail/alternative_function.hpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -33,17 +33,18 @@
         }
 
         template <typename Component>
- bool operator()(Component const& component) const
+ bool call(Component const& component, mpl::true_) const
         {
             // if Attribute is not a variant, then pass it as-is
             return component.parse(first, last, context, skipper, attr);
         }
 
- template <typename Component, typename T>
- bool operator()(Component const& component, mpl::identity<T>) const
+ template <typename Component>
+ bool call(Component const& component, mpl::false_) const
         {
- // if Attribute is a variant, then create an attribute.
- T val;
+ // if Attribute is a variant, then create an attribute for
+ // the Component with its expected type.
+ typename traits::attribute_of<Component, Context, Iterator>::type val;
             if (component.parse(first, last, context, skipper, val))
             {
                 traits::assign_to(val, attr);
@@ -52,6 +53,13 @@
             return false;
         }
 
+ template <typename Component>
+ bool operator()(Component const& component) const
+ {
+ // return true if the parser succeeds
+ return call(component, spirit::traits::not_is_variant<Attribute>());
+ }
+
         Iterator& first;
         Iterator const& last;
         Context& context;

Modified: branches/release/boost/spirit/home/qi/operator/alternative.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/operator/alternative.hpp (original)
+++ branches/release/boost/spirit/home/qi/operator/alternative.hpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -19,7 +19,7 @@
 #include <boost/spirit/home/support/detail/what_function.hpp>
 #include <boost/spirit/home/support/unused.hpp>
 #include <boost/spirit/home/support/info.hpp>
-#include <boost/spirit/home/support/algorithm/any.hpp>
+#include <boost/fusion/include/any.hpp>
 #include <boost/fusion/include/mpl.hpp>
 #include <boost/fusion/include/for_each.hpp>
 
@@ -39,31 +39,6 @@
 
 namespace boost { namespace spirit { namespace qi
 {
- namespace detail
- {
- template <typename T>
- struct get_variant_element
- : mpl::identity<T> {};
-
- template <typename T>
- struct get_variant_element<recursive_wrapper<T> >
- : mpl::identity<T> {};
-
- template <typename T>
- struct get_variant_types;
-
-#define BOOST_SPIRIT_IDENTITY(z, n, data) get_variant_element<BOOST_PP_CAT(T, n)>
- template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
- struct get_variant_types<variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
- {
- typedef mpl::vector<
- BOOST_PP_ENUM(
- BOOST_VARIANT_LIMIT_TYPES, BOOST_SPIRIT_IDENTITY, _)>
- type;
- };
-#undef BOOST_SPIRIT_IDENTITY
- }
-
     template <typename Elements>
     struct alternative : nary_parser<alternative<Elements> >
     {
@@ -90,42 +65,16 @@
 
         template <typename Iterator, typename Context
           , typename Skipper, typename Attribute>
- bool parse_impl(Iterator& first, Iterator const& last
+ bool parse(Iterator& first, Iterator const& last
           , Context& context, Skipper const& skipper
- , Attribute& attr, mpl::true_) const
+ , Attribute& attr) const
         {
- // This branch is chosen if attr *is not* a variant
             detail::alternative_function<Iterator, Context, Skipper, Attribute>
                 f(first, last, context, skipper, attr);
 
             // return true if *any* of the parsers succeed
             return fusion::any(elements, f);
         }
-
- template <typename Iterator, typename Context
- , typename Skipper, typename Attribute>
- bool parse_impl(Iterator& first, Iterator const& last
- , Context& context, Skipper const& skipper
- , Attribute& attr, mpl::false_) const
- {
- // This branch is chosen if attr *is* a variant
- detail::alternative_function<Iterator, Context, Skipper, Attribute>
- f(first, last, context, skipper, attr);
-
- // return true if *any* of the parsers succeed
- typename detail::get_variant_types<Attribute>::type vtypes;
- return spirit::any(elements, vtypes, f);
- }
-
- template <typename Iterator, typename Context
- , typename Skipper, typename Attribute>
- bool parse(Iterator& first, Iterator const& last
- , Context& context, Skipper const& skipper
- , Attribute& attr) const
- {
- return parse_impl(first, last, context, skipper, attr,
- spirit::traits::not_is_variant<Attribute>());
- }
 
         template <typename Context>
         info what(Context& context) const

Deleted: branches/release/boost/spirit/include/karma_phoenix_attributes.hpp
==============================================================================
--- branches/release/boost/spirit/include/karma_phoenix_attributes.hpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
+++ (empty file)
@@ -1,18 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2009 Joel de Guzman
- Copyright (c) 2001-2009 Hartmut Kaiser
- http://spirit.sourceforge.net/
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-=============================================================================*/
-#ifndef BOOST_SPIRIT_INCLUDE_KARMA_PHOENIX_ATTRIBUTES
-#define BOOST_SPIRIT_INCLUDE_KARMA_PHOENIX_ATTRIBUTES
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/spirit/home/karma/phoenix_attributes.hpp>
-
-#endif

Modified: branches/release/boost/spirit/repository/home/karma/nonterminal/subrule.hpp
==============================================================================
--- branches/release/boost/spirit/repository/home/karma/nonterminal/subrule.hpp (original)
+++ branches/release/boost/spirit/repository/home/karma/nonterminal/subrule.hpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -200,13 +200,15 @@
             context_type;
 
             // Create an attribute if none is supplied.
- typedef traits::make_transformed_attribute<
- subrule_attr_type, Attribute const> make_attribute;
+ typedef traits::make_attribute<subrule_attr_type, Attribute>
+ make_attribute;
 
             // If you are seeing a compilation error here, you are probably
             // trying to use a subrule which has inherited attributes,
             // without passing values for them.
- context_type context(*this, make_attribute::call(attr));
+ context_type context(*this
+ , traits::pre_transform<subrule_attr_type>(
+ make_attribute::call(attr)));
 
             return def.binder(sink, context, delimiter);
         }
@@ -233,14 +235,15 @@
             context_type;
 
             // Create an attribute if none is supplied.
- typedef traits::make_transformed_attribute<
- subrule_attr_type, Attribute const> make_attribute;
+ typedef traits::make_attribute<subrule_attr_type, Attribute>
+ make_attribute;
 
             // If you are seeing a compilation error here, you are probably
             // trying to use a subrule which has inherited attributes,
             // passing values of incompatible types for them.
- context_type context(*this, make_attribute::call(attr), params
- , caller_context);
+ context_type context(*this
+ , traits::pre_transform<subrule_attr_type>(
+ make_attribute::call(attr)), params, caller_context);
 
             return def.binder(sink, context, delimiter);
         }

Modified: branches/release/boost/spirit/repository/home/qi/nonterminal/subrule.hpp
==============================================================================
--- branches/release/boost/spirit/repository/home/qi/nonterminal/subrule.hpp (original)
+++ branches/release/boost/spirit/repository/home/qi/nonterminal/subrule.hpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -196,17 +196,30 @@
             context_type;
 
             // prepare attribute
- typedef traits::make_transformed_attribute<
+ typedef traits::make_attribute<
                 subrule_attr_type, Attribute> make_attribute;
 
- typename make_attribute::type attr_ = make_attribute::call(attr);
+ // do down-stream transformation, provides attribute for
+ // rhs parser
+ typedef traits::transform_attribute<
+ typename make_attribute::type, subrule_attr_type> transform;
+
+ typename transform::type attr_ =
+ transform::pre(make_attribute::call(attr));
 
             // If you are seeing a compilation error here, you are probably
             // trying to use a subrule which has inherited attributes,
             // without passing values for them.
             context_type context(*this, attr_);
 
- return def.binder(first, last, context, skipper);
+ if (def.binder(first, last, context, skipper))
+ {
+ // do up-stream transformation, this integrates the results
+ // back into the original attribute value, if appropriate
+ traits::post_transform(attr, attr_);
+ return true;
+ }
+ return false;
         }
 
         template <typename Def
@@ -233,17 +246,30 @@
             context_type;
 
             // prepare attribute
- typedef traits::make_transformed_attribute<
+ typedef traits::make_attribute<
                 subrule_attr_type, Attribute> make_attribute;
 
- typename make_attribute::type attr_ = make_attribute::call(attr);
+ // do down-stream transformation, provides attribute for
+ // rhs parser
+ typedef traits::transform_attribute<
+ typename make_attribute::type, subrule_attr_type> transform;
+
+ typename transform::type attr_ =
+ transform::pre(make_attribute::call(attr));
 
             // If you are seeing a compilation error here, you are probably
             // trying to use a subrule which has inherited attributes,
             // passing values of incompatible types for them.
             context_type context(*this, attr_, params, caller_context);
 
- return def.binder(first, last, context, skipper);
+ if (def.binder(first, last, context, skipper))
+ {
+ // do up-stream transformation, this integrates the results
+ // back into the original attribute value, if appropriate
+ traits::post_transform(attr, attr_);
+ return true;
+ }
+ return false;
         }
 
         template <typename Context>

Modified: branches/release/boost/spirit/version.hpp
==============================================================================
--- branches/release/boost/spirit/version.hpp (original)
+++ branches/release/boost/spirit/version.hpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -9,12 +9,6 @@
 #if !defined(SPIRIT_VERSION_NOVEMBER_13_2008_0834AM)
 #define SPIRIT_VERSION_NOVEMBER_13_2008_0834AM
 
-///////////////////////////////////////////////////////////////////////////////
-//
-// This is the version of the current Spirit distribution
-//
-///////////////////////////////////////////////////////////////////////////////
-#define SPIRIT_VERSION 0x2010
-#define SPIRIT_PIZZA_VERSION COSMIC_KARMA // :-)
+#include <boost/spirit/include/version.hpp>
 
 #endif

Modified: branches/release/libs/spirit/repository/test/test_headers/Jamfile
==============================================================================
--- branches/release/libs/spirit/repository/test/test_headers/Jamfile (original)
+++ branches/release/libs/spirit/repository/test/test_headers/Jamfile 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -29,6 +29,11 @@
     path.glob-tree ../../../../../boost/spirit/repository/include : *.hpp
 ] ;
 
+main_headers =
+[
+ path.glob-tree ../../../../../boost/spirit/include : *.hpp : classic* phoenix1*
+] ;
+
 for local file in $(headers)
 {
     compile test.cpp
@@ -60,12 +65,12 @@
 }
 
 make auto_all1.cpp
- : $(headers)
+ : $(headers) $(main_headers)
     : @generate-include-all
     ;
 
 make auto_all2.cpp
- : $(headers)
+ : $(headers) $(main_headers)
     : @generate-include-all
     : <generate-include-all-order>reverse
     ;

Modified: branches/release/libs/spirit/test/CMakeLists.txt
==============================================================================
--- branches/release/libs/spirit/test/CMakeLists.txt (original)
+++ branches/release/libs/spirit/test/CMakeLists.txt 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -120,6 +120,11 @@
 
 boost_test_run(lex_regression001 lex/regression001.cpp COMPILE_FLAGS ${test_compile_flags})
 boost_test_run(lex_regression002 lex/regression002.cpp COMPILE_FLAGS ${test_compile_flags})
+boost_test_run(lex_regression004 lex/regression004.cpp COMPILE_FLAGS ${test_compile_flags})
+
+# how to express dependencies? lex_regression003 depends on lex_regression003_generate to be executed first
+# boost_test_run(lex_regression003_generate lex/regression003_generate.cpp COMPILE_FLAGS ${test_compile_flags})
+# boost_test_run(lex_regression003 lex/regression003.cpp COMPILE_FLAGS ${test_compile_flags})
 
 # run support tests
 # boost_test_run(support_hold_any support/hold_any.cpp COMPILE_FLAGS ${test_compile_flags})

Modified: branches/release/libs/spirit/test/karma/binary.cpp
==============================================================================
--- branches/release/libs/spirit/test/karma/binary.cpp (original)
+++ branches/release/libs/spirit/test/karma/binary.cpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -8,7 +8,6 @@
 
 #include <boost/spirit/include/karma_binary.hpp>
 #include <boost/spirit/include/karma_generate.hpp>
-#include <boost/spirit/include/karma_phoenix_attributes.hpp>
 
 #include <boost/spirit/include/phoenix_core.hpp>
 #include <boost/spirit/include/phoenix_operator.hpp>
@@ -185,71 +184,5 @@
 #endif
     }
 
- { // test Phoenix expression attributes, only supported if
- // karma_phoenix_attributes.hpp is included
- namespace phoenix = boost::phoenix;
-
-#ifdef BOOST_LITTLE_ENDIAN
- BOOST_TEST(binary_test("\x01", 1, byte_, phoenix::val(0x01)));
- BOOST_TEST(binary_test("\x01\0x02", 2, byte_, phoenix::val(0x0201)));
- BOOST_TEST(binary_test("\x01\x02\x03\x04", 4, dword,
- phoenix::val(0x04030201)));
-
- boost::uint8_t v8 (0x01);
- BOOST_TEST(binary_test("\x01", 1, byte_, phoenix::ref(v8)));
- BOOST_TEST(binary_test("\x02", 1, byte_, ++phoenix::ref(v8)));
-
- boost::uint16_t v16 (0x0201);
- BOOST_TEST(binary_test("\x01\x02", 2, word, phoenix::ref(v16)));
- BOOST_TEST(binary_test("\x02\x02", 2, word, ++phoenix::ref(v16)));
-
- boost::uint32_t v32 (0x04030201);
- BOOST_TEST(binary_test("\x01\x02\x03\x04", 4, dword, phoenix::ref(v32)));
- BOOST_TEST(binary_test("\x02\x02\x03\x04", 4, dword, ++phoenix::ref(v32)));
-
-#ifdef BOOST_HAS_LONG_LONG
- BOOST_TEST(binary_test("\x01\x02\x03\x04\x05\x06\x07\x08", 8, qword,
- phoenix::val(0x0807060504030201LL)));
-
- boost::uint64_t v64 (0x0807060504030201LL);
- BOOST_TEST(binary_test("\x01\x02\x03\x04\x05\x06\x07\x08", 8, qword,
- phoenix::ref(v64)));
- BOOST_TEST(binary_test("\x02\x02\x03\x04\x05\x06\x07\x08", 8, qword,
- ++phoenix::ref(v64)));
-#endif
-
-#else // BOOST_LITTLE_ENDIAN
-
- BOOST_TEST(binary_test("\x01", 1, byte_, phoenix::val(0x01)));
- BOOST_TEST(binary_test("\x01\x02", 2, byte_, phoenix::val(0x0102)));
- BOOST_TEST(binary_test("\x01\x02\x03\x04", 4, dword,
- phoenix::val(0x01020304)));
-
- boost::uint8_t v8 (0x01);
- BOOST_TEST(binary_test("\x01", 1, byte_, phoenix::ref(v8)));
- BOOST_TEST(binary_test("\x02", 1, byte_, ++phoenix::ref(v8)));
-
- boost::uint16_t v16 (0x0102);
- BOOST_TEST(binary_test("\x01\x02", 2, word, phoenix::ref(v16)));
- BOOST_TEST(binary_test("\x01\x03", 2, word, ++phoenix::ref(v16)));
-
- boost::uint32_t v32 (0x01020304);
- BOOST_TEST(binary_test("\x01\x02\x03\x04", 4, dword, phoenix::ref(v32)));
- BOOST_TEST(binary_test("\x01\x02\x03\x05", 4, dword, ++phoenix::ref(v32)));
-
-#ifdef BOOST_HAS_LONG_LONG
- BOOST_TEST(binary_test("\x01\x02\x03\x04\x05\x06\x07\x08", 8, qword,
- phoenix::val(0x0102030405060708LL)));
-
- boost::uint64_t v64 (0x0102030405060708LL);
- BOOST_TEST(binary_test("\x01\x02\x03\x04\x05\x06\x07\x08", 8, qword,
- phoenix::ref(v64)));
- BOOST_TEST(binary_test("\x01\x02\x03\x04\x05\x06\x07\x09", 8, qword,
- ++phoenix::ref(v64)));
-#endif
-
-#endif
- }
-
     return boost::report_errors();
 }

Modified: branches/release/libs/spirit/test/karma/bool.cpp
==============================================================================
--- branches/release/libs/spirit/test/karma/bool.cpp (original)
+++ branches/release/libs/spirit/test/karma/bool.cpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -12,7 +12,6 @@
 #include <boost/spirit/include/karma_string.hpp>
 #include <boost/spirit/include/karma_numeric.hpp>
 #include <boost/spirit/include/karma_directive.hpp>
-#include <boost/spirit/include/karma_phoenix_attributes.hpp>
 
 #include <boost/spirit/home/support/safe_bool.hpp>
 
@@ -99,17 +98,6 @@
         BOOST_TEST(test("true", bool_, optbool));
     }
 
- // test Phoenix expression attributes (include karma_phoenix_attributes.hpp)
- {
- namespace phoenix = boost::phoenix;
-
- BOOST_TEST(test("true", bool_, phoenix::val(true)));
-
- bool b = false;
- BOOST_TEST(test("false", bool_, phoenix::ref(b)));
- BOOST_TEST(test("true", bool_, ++phoenix::ref(b)));
- }
-
     {
         BOOST_TEST(test("false", lower[bool_], false));
         BOOST_TEST(test("true", lower[bool_], true));

Modified: branches/release/libs/spirit/test/karma/char.cpp
==============================================================================
--- branches/release/libs/spirit/test/karma/char.cpp (original)
+++ branches/release/libs/spirit/test/karma/char.cpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -11,7 +11,6 @@
 #include <boost/spirit/include/karma_char.hpp>
 #include <boost/spirit/include/karma_generate.hpp>
 #include <boost/spirit/include/karma_action.hpp>
-#include <boost/spirit/include/karma_phoenix_attributes.hpp>
 
 #include <boost/spirit/include/phoenix_core.hpp>
 #include <boost/spirit/include/phoenix_operator.hpp>
@@ -283,18 +282,5 @@
         BOOST_TEST(!test(L"", wide::char_(L'y'), w));
     }
 
- // yes, we can use phoenix expressions as attributes as well
- // but only if we include karma_phoenix_attributes.hpp
- {
- namespace ascii = boost::spirit::ascii;
- namespace phoenix = boost::phoenix;
-
- BOOST_TEST(test("x", ascii::char_, phoenix::val('x')));
-
- char c = 'x';
- BOOST_TEST(test("x", ascii::char_, phoenix::ref(c)));
- BOOST_TEST(test("y", ascii::char_, ++phoenix::ref(c)));
- }
-
     return boost::report_errors();
 }

Modified: branches/release/libs/spirit/test/karma/int_numerics.cpp
==============================================================================
--- branches/release/libs/spirit/test/karma/int_numerics.cpp (original)
+++ branches/release/libs/spirit/test/karma/int_numerics.cpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -21,7 +21,6 @@
 #include <boost/spirit/include/karma_numeric.hpp>
 #include <boost/spirit/include/karma_directive.hpp>
 #include <boost/spirit/include/karma_action.hpp>
-#include <boost/spirit/include/karma_phoenix_attributes.hpp>
 
 #include <limits>
 #include "test.hpp"
@@ -92,15 +91,6 @@
         BOOST_TEST(test(expected_minval, gen(minval), optmin));
         BOOST_TEST(test(expected_maxval, gen(maxval), optmax));
 
- // Phoenix expression tests (only supported while including
- // karma_phoenix_attributes.hpp
- namespace phoenix = boost::phoenix;
-
- BOOST_TEST(test("1", gen, phoenix::val(1)));
-
- T val = 1;
- BOOST_TEST(test("1", gen, phoenix::ref(val)));
- BOOST_TEST(test("2", gen, ++phoenix::ref(val)));
     }
 };
 

Modified: branches/release/libs/spirit/test/karma/real_numerics.cpp
==============================================================================
--- branches/release/libs/spirit/test/karma/real_numerics.cpp (original)
+++ branches/release/libs/spirit/test/karma/real_numerics.cpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -14,7 +14,6 @@
 #include <boost/spirit/include/karma_numeric.hpp>
 #include <boost/spirit/include/karma_generate.hpp>
 #include <boost/spirit/include/karma_directive.hpp>
-#include <boost/spirit/include/karma_phoenix_attributes.hpp>
 
 #include <boost/spirit/include/phoenix_core.hpp>
 #include <boost/spirit/include/phoenix_operator.hpp>
@@ -538,15 +537,5 @@
         BOOST_TEST(test("1.0", double_(1.0), v));
     }
 
- { // Phoenix expression tests (include karma_phoenix_attributes.hpp)
- namespace phoenix = boost::phoenix;
-
- BOOST_TEST(test("1.0", double_, phoenix::val(1.0)));
-
- double d = 1.2;
- BOOST_TEST(test("1.2", double_, phoenix::ref(d)));
- BOOST_TEST(test("2.2", double_, ++phoenix::ref(d)));
- }
-
     return boost::report_errors();
 }

Modified: branches/release/libs/spirit/test/karma/repeat.cpp
==============================================================================
--- branches/release/libs/spirit/test/karma/repeat.cpp (original)
+++ branches/release/libs/spirit/test/karma/repeat.cpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -16,7 +16,6 @@
 #include <boost/spirit/include/karma_action.hpp>
 #include <boost/spirit/include/karma_nonterminal.hpp>
 #include <boost/spirit/include/karma_auxiliary.hpp>
-#include <boost/spirit/include/karma_phoenix_attributes.hpp>
 #include <boost/spirit/include/support_argument.hpp>
 #include <boost/spirit/include/phoenix_core.hpp>
 #include <boost/spirit/include/phoenix_operator.hpp>
@@ -161,17 +160,6 @@
         BOOST_TEST(!test("", repeat(4, inf)[r], v3));
     }
 
- {
- namespace ascii = boost::spirit::ascii;
- namespace phoenix = boost::phoenix;
-
- char c = 'a';
- BOOST_TEST(test("bcd", repeat(3)[ascii::char_[_1 = ++phoenix::ref(c)]]));
-
- c = 'a';
- BOOST_TEST(test("bcd", repeat(3)[ascii::char_], ++phoenix::ref(c)));
- }
-
     return boost::report_errors();
 }
 

Modified: branches/release/libs/spirit/test/qi/alternative.cpp
==============================================================================
--- branches/release/libs/spirit/test/qi/alternative.cpp (original)
+++ branches/release/libs/spirit/test/qi/alternative.cpp 2009-10-07 20:50:02 EDT (Wed, 07 Oct 2009)
@@ -98,19 +98,6 @@
         BOOST_TEST((test_attr("x", lit("rock") | int_ | char_, v)));
         BOOST_TEST(boost::get<char>(v) == 'x');
     }
-
- { // Make sure that we are using the actual supplied attribute types
- // from the variant and not the expected type.
- boost::variant<int, std::string> v;
- BOOST_TEST((test_attr("12345", int_ | +char_, v)));
- BOOST_TEST(boost::get<int>(v) == 12345);
-//
-// BOOST_TEST((test_attr("abc", int_ | +char_, v)));
-// BOOST_TEST(boost::get<std::string>(v) == "abc");
-//
-// BOOST_TEST((test_attr("12345", +char_ | int_, v)));
-// BOOST_TEST(boost::get<std::string>(v) == "12345");
- }
 
     { // test action
 


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