Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70687 - in trunk: boost/spirit/home/karma/numeric boost/spirit/home/karma/stream boost/spirit/home/lex/lexer/lexertl boost/spirit/home/qi/numeric boost/spirit/home/support boost/spirit/home/support/detail boost/spirit/include libs/spirit/test libs/spirit/test/lex libs/spirit/test/qi
From: hartmut.kaiser_at_[hidden]
Date: 2011-03-28 20:11:47


Author: hkaiser
Date: 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
New Revision: 70687
URL: http://svn.boost.org/trac/boost/changeset/70687

Log:
Spirit: more adjustments for Phoenix V3
Added:
   trunk/boost/spirit/home/support/detail/is_spirit_tag.hpp (contents, props changed)
Text files modified:
   trunk/boost/spirit/home/karma/numeric/int.hpp | 6
   trunk/boost/spirit/home/karma/numeric/uint.hpp | 6
   trunk/boost/spirit/home/karma/stream/stream.hpp | 6
   trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp | 34 ---
   trunk/boost/spirit/home/qi/numeric/int.hpp | 6
   trunk/boost/spirit/home/qi/numeric/real.hpp | 2
   trunk/boost/spirit/home/qi/numeric/uint.hpp | 6
   trunk/boost/spirit/home/support/char_class.hpp | 330 ++++++++++++++++++++--------------------
   trunk/boost/spirit/home/support/lazy.hpp | 6
   trunk/boost/spirit/home/support/terminal.hpp | 11
   trunk/boost/spirit/include/phoenix_container.hpp | 2
   trunk/libs/spirit/test/Jamfile | 5
   trunk/libs/spirit/test/lex/regression_file_iterator3.cpp | 8
   trunk/libs/spirit/test/qi/regression_numeric_alternatives.cpp | 7
   trunk/libs/spirit/test/qi/terminal_ex.cpp | 65 +++++++
   15 files changed, 278 insertions(+), 222 deletions(-)

Modified: trunk/boost/spirit/home/karma/numeric/int.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/int.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/int.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -22,6 +22,7 @@
 #include <boost/spirit/home/support/char_class.hpp>
 #include <boost/spirit/home/support/container.hpp>
 #include <boost/spirit/home/support/detail/get_encoding.hpp>
+#include <boost/spirit/home/support/detail/is_spirit_tag.hpp>
 #include <boost/spirit/home/karma/meta_compiler.hpp>
 #include <boost/spirit/home/karma/delimit_out.hpp>
 #include <boost/spirit/home/karma/auxiliary/lazy.hpp>
@@ -40,7 +41,10 @@
     namespace tag
     {
         template <typename T, unsigned Radix, bool force_sign>
- struct int_generator {};
+ struct int_generator
+ {
+ BOOST_SPIRIT_IS_TAG()
+ };
     }
 
     namespace karma

Modified: trunk/boost/spirit/home/karma/numeric/uint.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/uint.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/uint.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -22,6 +22,7 @@
 #include <boost/spirit/home/support/char_class.hpp>
 #include <boost/spirit/home/support/container.hpp>
 #include <boost/spirit/home/support/detail/get_encoding.hpp>
+#include <boost/spirit/home/support/detail/is_spirit_tag.hpp>
 #include <boost/spirit/home/karma/meta_compiler.hpp>
 #include <boost/spirit/home/karma/delimit_out.hpp>
 #include <boost/spirit/home/karma/auxiliary/lazy.hpp>
@@ -39,7 +40,10 @@
     namespace tag
     {
         template <typename T, unsigned Radix>
- struct uint_generator {};
+ struct uint_generator
+ {
+ BOOST_SPIRIT_IS_TAG()
+ };
     }
 
     namespace karma

Modified: trunk/boost/spirit/home/karma/stream/stream.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/stream/stream.hpp (original)
+++ trunk/boost/spirit/home/karma/stream/stream.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -15,6 +15,7 @@
 #include <boost/spirit/home/support/container.hpp>
 #include <boost/spirit/home/support/detail/hold_any.hpp>
 #include <boost/spirit/home/support/detail/get_encoding.hpp>
+#include <boost/spirit/home/support/detail/is_spirit_tag.hpp>
 #include <boost/spirit/home/karma/domain.hpp>
 #include <boost/spirit/home/karma/meta_compiler.hpp>
 #include <boost/spirit/home/karma/delimit_out.hpp>
@@ -37,7 +38,10 @@
     namespace tag
     {
         template <typename Char = char>
- struct stream_tag {};
+ struct stream_tag
+ {
+ BOOST_SPIRIT_IS_TAG()
+ };
     }
 
     namespace karma

Modified: trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -29,44 +29,14 @@
           , typename IdType>
         struct wrap_action
         {
- // plain functions with 5 arguments and function objects are not
- // touched at all
+ // plain functions with 5 arguments, function objects (including
+ // phoenix actors) are not touched at all
             template <typename F>
             static FunctionType call(F const& f)
             {
                 return f;
             }
 
- // wrap phoenix actor
- struct phoenix_action
- {
- typedef void result_type;
-
- template <typename F, typename T1, typename T2, typename T3
- , typename T4, typename T5>
- struct result { typedef result_type type; };
-
- template <typename Eval>
- void operator()(phoenix::actor<Eval> const& f, Iterator& start
- , Iterator& end, BOOST_SCOPED_ENUM(pass_flags)& pass
- , IdType& id, Context& ctx) const
- {
- f (start, end, pass, id, ctx);
- }
- };
-
- template <typename Eval>
- static FunctionType call(phoenix::actor<Eval> const& f)
- {
- using phoenix::arg_names::_1;
- using phoenix::arg_names::_2;
- using phoenix::arg_names::_3;
- using phoenix::arg_names::_4;
- using phoenix::arg_names::_5;
- return phoenix::bind(phoenix_action(), phoenix::lambda[f],
- _1, _2, _3, _4, _5);
- }
-
             // semantic actions with 4 arguments
             template <typename F>
             static void arg4_action(F* f, Iterator& start, Iterator& end

Modified: trunk/boost/spirit/home/qi/numeric/int.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/numeric/int.hpp (original)
+++ trunk/boost/spirit/home/qi/numeric/int.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -19,6 +19,7 @@
 #include <boost/spirit/home/qi/parser.hpp>
 #include <boost/spirit/home/support/common_terminals.hpp>
 #include <boost/spirit/home/support/info.hpp>
+#include <boost/spirit/home/support/detail/is_spirit_tag.hpp>
 #include <boost/mpl/assert.hpp>
 #include <boost/type_traits/is_same.hpp>
 
@@ -28,7 +29,10 @@
     {
         template <typename T, unsigned Radix, unsigned MinDigits
                 , int MaxDigits>
- struct int_parser {};
+ struct int_parser
+ {
+ BOOST_SPIRIT_IS_TAG()
+ };
     }
 
     namespace qi

Modified: trunk/boost/spirit/home/qi/numeric/real.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/numeric/real.hpp (original)
+++ trunk/boost/spirit/home/qi/numeric/real.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -207,7 +207,7 @@
         template <typename Iterator, typename Context
           , typename Skipper, typename Attribute>
         bool parse(Iterator& first, Iterator const& last
- , Context& context, Skipper const& skipper
+ , Context&, Skipper const& skipper
           , Attribute& attr) const
         {
             typedef detail::real_impl<T, RealPolicies> extract;

Modified: trunk/boost/spirit/home/qi/numeric/uint.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/numeric/uint.hpp (original)
+++ trunk/boost/spirit/home/qi/numeric/uint.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -19,6 +19,7 @@
 #include <boost/spirit/home/qi/parser.hpp>
 #include <boost/spirit/home/support/common_terminals.hpp>
 #include <boost/spirit/home/support/info.hpp>
+#include <boost/spirit/home/support/detail/is_spirit_tag.hpp>
 #include <boost/mpl/assert.hpp>
 #include <boost/type_traits/is_same.hpp>
 
@@ -28,7 +29,10 @@
     {
         template <typename T, unsigned Radix, unsigned MinDigits
                 , int MaxDigits>
- struct uint_parser {};
+ struct uint_parser
+ {
+ BOOST_SPIRIT_IS_TAG()
+ };
     }
 
     namespace qi

Modified: trunk/boost/spirit/home/support/char_class.hpp
==============================================================================
--- trunk/boost/spirit/home/support/char_class.hpp (original)
+++ trunk/boost/spirit/home/support/char_class.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -18,6 +18,7 @@
 #include <boost/config.hpp>
 #include <boost/mpl/bool.hpp>
 #include <boost/spirit/home/support/unused.hpp>
+#include <boost/spirit/home/support/detail/is_spirit_tag.hpp>
 #include <boost/type_traits/is_signed.hpp>
 #include <boost/type_traits/make_unsigned.hpp>
 #include <boost/type_traits/make_signed.hpp>
@@ -66,192 +67,192 @@
 
 namespace boost { namespace spirit { namespace tag
 {
- struct char_ {};
- struct string {};
+ struct char_ { BOOST_SPIRIT_IS_TAG() };
+ struct string { BOOST_SPIRIT_IS_TAG() };
 
     ///////////////////////////////////////////////////////////////////////////
     // classification tags
- struct alnum {};
- struct alpha {};
- struct digit {};
- struct xdigit {};
- struct cntrl {};
- struct graph {};
- struct print {};
- struct punct {};
- struct space {};
- struct blank {};
+ struct alnum { BOOST_SPIRIT_IS_TAG() };
+ struct alpha { BOOST_SPIRIT_IS_TAG() };
+ struct digit { BOOST_SPIRIT_IS_TAG() };
+ struct xdigit { BOOST_SPIRIT_IS_TAG() };
+ struct cntrl { BOOST_SPIRIT_IS_TAG() };
+ struct graph { BOOST_SPIRIT_IS_TAG() };
+ struct print { BOOST_SPIRIT_IS_TAG() };
+ struct punct { BOOST_SPIRIT_IS_TAG() };
+ struct space { BOOST_SPIRIT_IS_TAG() };
+ struct blank { BOOST_SPIRIT_IS_TAG() };
 
     ///////////////////////////////////////////////////////////////////////////
     // classification/conversion tags
- struct no_case {};
- struct lower {};
- struct upper {};
- struct lowernum {};
- struct uppernum {};
- struct ucs4 {};
- struct encoding {};
+ struct no_case { BOOST_SPIRIT_IS_TAG() };
+ struct lower { BOOST_SPIRIT_IS_TAG() };
+ struct upper { BOOST_SPIRIT_IS_TAG() };
+ struct lowernum { BOOST_SPIRIT_IS_TAG() };
+ struct uppernum { BOOST_SPIRIT_IS_TAG() };
+ struct ucs4 { BOOST_SPIRIT_IS_TAG() };
+ struct encoding { BOOST_SPIRIT_IS_TAG() };
 
 #if defined(BOOST_SPIRIT_UNICODE)
 ///////////////////////////////////////////////////////////////////////////
 // Unicode Major Categories
 ///////////////////////////////////////////////////////////////////////////
- struct letter {};
- struct mark {};
- struct number {};
- struct separator {};
- struct other {};
- struct punctuation {};
- struct symbol {};
+ struct letter { BOOST_SPIRIT_IS_TAG() };
+ struct mark { BOOST_SPIRIT_IS_TAG() };
+ struct number { BOOST_SPIRIT_IS_TAG() };
+ struct separator { BOOST_SPIRIT_IS_TAG() };
+ struct other { BOOST_SPIRIT_IS_TAG() };
+ struct punctuation { BOOST_SPIRIT_IS_TAG() };
+ struct symbol { BOOST_SPIRIT_IS_TAG() };
 
 ///////////////////////////////////////////////////////////////////////////
 // Unicode General Categories
 ///////////////////////////////////////////////////////////////////////////
- struct uppercase_letter {};
- struct lowercase_letter {};
- struct titlecase_letter {};
- struct modifier_letter {};
- struct other_letter {};
-
- struct nonspacing_mark {};
- struct enclosing_mark {};
- struct spacing_mark {};
-
- struct decimal_number {};
- struct letter_number {};
- struct other_number {};
-
- struct space_separator {};
- struct line_separator {};
- struct paragraph_separator {};
-
- struct control {};
- struct format {};
- struct private_use {};
- struct surrogate {};
- struct unassigned {};
-
- struct dash_punctuation {};
- struct open_punctuation {};
- struct close_punctuation {};
- struct connector_punctuation {};
- struct other_punctuation {};
- struct initial_punctuation {};
- struct final_punctuation {};
-
- struct math_symbol {};
- struct currency_symbol {};
- struct modifier_symbol {};
- struct other_symbol {};
+ struct uppercase_letter { BOOST_SPIRIT_IS_TAG() };
+ struct lowercase_letter { BOOST_SPIRIT_IS_TAG() };
+ struct titlecase_letter { BOOST_SPIRIT_IS_TAG() };
+ struct modifier_letter { BOOST_SPIRIT_IS_TAG() };
+ struct other_letter { BOOST_SPIRIT_IS_TAG() };
+
+ struct nonspacing_mark { BOOST_SPIRIT_IS_TAG() };
+ struct enclosing_mark { BOOST_SPIRIT_IS_TAG() };
+ struct spacing_mark { BOOST_SPIRIT_IS_TAG() };
+
+ struct decimal_number { BOOST_SPIRIT_IS_TAG() };
+ struct letter_number { BOOST_SPIRIT_IS_TAG() };
+ struct other_number { BOOST_SPIRIT_IS_TAG() };
+
+ struct space_separator { BOOST_SPIRIT_IS_TAG() };
+ struct line_separator { BOOST_SPIRIT_IS_TAG() };
+ struct paragraph_separator { BOOST_SPIRIT_IS_TAG() };
+
+ struct control { BOOST_SPIRIT_IS_TAG() };
+ struct format { BOOST_SPIRIT_IS_TAG() };
+ struct private_use { BOOST_SPIRIT_IS_TAG() };
+ struct surrogate { BOOST_SPIRIT_IS_TAG() };
+ struct unassigned { BOOST_SPIRIT_IS_TAG() };
+
+ struct dash_punctuation { BOOST_SPIRIT_IS_TAG() };
+ struct open_punctuation { BOOST_SPIRIT_IS_TAG() };
+ struct close_punctuation { BOOST_SPIRIT_IS_TAG() };
+ struct connector_punctuation { BOOST_SPIRIT_IS_TAG() };
+ struct other_punctuation { BOOST_SPIRIT_IS_TAG() };
+ struct initial_punctuation { BOOST_SPIRIT_IS_TAG() };
+ struct final_punctuation { BOOST_SPIRIT_IS_TAG() };
+
+ struct math_symbol { BOOST_SPIRIT_IS_TAG() };
+ struct currency_symbol { BOOST_SPIRIT_IS_TAG() };
+ struct modifier_symbol { BOOST_SPIRIT_IS_TAG() };
+ struct other_symbol { BOOST_SPIRIT_IS_TAG() };
 
 ///////////////////////////////////////////////////////////////////////////
 // Unicode Derived Categories
 ///////////////////////////////////////////////////////////////////////////
- struct alphabetic {};
- struct uppercase {};
- struct lowercase {};
- struct white_space {};
- struct hex_digit {};
- struct noncharacter_code_point {};
- struct default_ignorable_code_point {};
+ struct alphabetic { BOOST_SPIRIT_IS_TAG() };
+ struct uppercase { BOOST_SPIRIT_IS_TAG() };
+ struct lowercase { BOOST_SPIRIT_IS_TAG() };
+ struct white_space { BOOST_SPIRIT_IS_TAG() };
+ struct hex_digit { BOOST_SPIRIT_IS_TAG() };
+ struct noncharacter_code_point { BOOST_SPIRIT_IS_TAG() };
+ struct default_ignorable_code_point { BOOST_SPIRIT_IS_TAG() };
 
 ///////////////////////////////////////////////////////////////////////////
 // Unicode Scripts
 ///////////////////////////////////////////////////////////////////////////
- struct arabic {};
- struct imperial_aramaic {};
- struct armenian {};
- struct avestan {};
- struct balinese {};
- struct bamum {};
- struct bengali {};
- struct bopomofo {};
- struct braille {};
- struct buginese {};
- struct buhid {};
- struct canadian_aboriginal {};
- struct carian {};
- struct cham {};
- struct cherokee {};
- struct coptic {};
- struct cypriot {};
- struct cyrillic {};
- struct devanagari {};
- struct deseret {};
- struct egyptian_hieroglyphs {};
- struct ethiopic {};
- struct georgian {};
- struct glagolitic {};
- struct gothic {};
- struct greek {};
- struct gujarati {};
- struct gurmukhi {};
- struct hangul {};
- struct han {};
- struct hanunoo {};
- struct hebrew {};
- struct hiragana {};
- struct katakana_or_hiragana {};
- struct old_italic {};
- struct javanese {};
- struct kayah_li {};
- struct katakana {};
- struct kharoshthi {};
- struct khmer {};
- struct kannada {};
- struct kaithi {};
- struct tai_tham {};
- struct lao {};
- struct latin {};
- struct lepcha {};
- struct limbu {};
- struct linear_b {};
- struct lisu {};
- struct lycian {};
- struct lydian {};
- struct malayalam {};
- struct mongolian {};
- struct meetei_mayek {};
- struct myanmar {};
- struct nko {};
- struct ogham {};
- struct ol_chiki {};
- struct old_turkic {};
- struct oriya {};
- struct osmanya {};
- struct phags_pa {};
- struct inscriptional_pahlavi {};
- struct phoenician {};
- struct inscriptional_parthian {};
- struct rejang {};
- struct runic {};
- struct samaritan {};
- struct old_south_arabian {};
- struct saurashtra {};
- struct shavian {};
- struct sinhala {};
- struct sundanese {};
- struct syloti_nagri {};
- struct syriac {};
- struct tagbanwa {};
- struct tai_le {};
- struct new_tai_lue {};
- struct tamil {};
- struct tai_viet {};
- struct telugu {};
- struct tifinagh {};
- struct tagalog {};
- struct thaana {};
- struct thai {};
- struct tibetan {};
- struct ugaritic {};
- struct vai {};
- struct old_persian {};
- struct cuneiform {};
- struct yi {};
- struct inherited {};
- struct common {};
- struct unknown {};
+ struct arabic { BOOST_SPIRIT_IS_TAG() };
+ struct imperial_aramaic { BOOST_SPIRIT_IS_TAG() };
+ struct armenian { BOOST_SPIRIT_IS_TAG() };
+ struct avestan { BOOST_SPIRIT_IS_TAG() };
+ struct balinese { BOOST_SPIRIT_IS_TAG() };
+ struct bamum { BOOST_SPIRIT_IS_TAG() };
+ struct bengali { BOOST_SPIRIT_IS_TAG() };
+ struct bopomofo { BOOST_SPIRIT_IS_TAG() };
+ struct braille { BOOST_SPIRIT_IS_TAG() };
+ struct buginese { BOOST_SPIRIT_IS_TAG() };
+ struct buhid { BOOST_SPIRIT_IS_TAG() };
+ struct canadian_aboriginal { BOOST_SPIRIT_IS_TAG() };
+ struct carian { BOOST_SPIRIT_IS_TAG() };
+ struct cham { BOOST_SPIRIT_IS_TAG() };
+ struct cherokee { BOOST_SPIRIT_IS_TAG() };
+ struct coptic { BOOST_SPIRIT_IS_TAG() };
+ struct cypriot { BOOST_SPIRIT_IS_TAG() };
+ struct cyrillic { BOOST_SPIRIT_IS_TAG() };
+ struct devanagari { BOOST_SPIRIT_IS_TAG() };
+ struct deseret { BOOST_SPIRIT_IS_TAG() };
+ struct egyptian_hieroglyphs { BOOST_SPIRIT_IS_TAG() };
+ struct ethiopic { BOOST_SPIRIT_IS_TAG() };
+ struct georgian { BOOST_SPIRIT_IS_TAG() };
+ struct glagolitic { BOOST_SPIRIT_IS_TAG() };
+ struct gothic { BOOST_SPIRIT_IS_TAG() };
+ struct greek { BOOST_SPIRIT_IS_TAG() };
+ struct gujarati { BOOST_SPIRIT_IS_TAG() };
+ struct gurmukhi { BOOST_SPIRIT_IS_TAG() };
+ struct hangul { BOOST_SPIRIT_IS_TAG() };
+ struct han { BOOST_SPIRIT_IS_TAG() };
+ struct hanunoo { BOOST_SPIRIT_IS_TAG() };
+ struct hebrew { BOOST_SPIRIT_IS_TAG() };
+ struct hiragana { BOOST_SPIRIT_IS_TAG() };
+ struct katakana_or_hiragana { BOOST_SPIRIT_IS_TAG() };
+ struct old_italic { BOOST_SPIRIT_IS_TAG() };
+ struct javanese { BOOST_SPIRIT_IS_TAG() };
+ struct kayah_li { BOOST_SPIRIT_IS_TAG() };
+ struct katakana { BOOST_SPIRIT_IS_TAG() };
+ struct kharoshthi { BOOST_SPIRIT_IS_TAG() };
+ struct khmer { BOOST_SPIRIT_IS_TAG() };
+ struct kannada { BOOST_SPIRIT_IS_TAG() };
+ struct kaithi { BOOST_SPIRIT_IS_TAG() };
+ struct tai_tham { BOOST_SPIRIT_IS_TAG() };
+ struct lao { BOOST_SPIRIT_IS_TAG() };
+ struct latin { BOOST_SPIRIT_IS_TAG() };
+ struct lepcha { BOOST_SPIRIT_IS_TAG() };
+ struct limbu { BOOST_SPIRIT_IS_TAG() };
+ struct linear_b { BOOST_SPIRIT_IS_TAG() };
+ struct lisu { BOOST_SPIRIT_IS_TAG() };
+ struct lycian { BOOST_SPIRIT_IS_TAG() };
+ struct lydian { BOOST_SPIRIT_IS_TAG() };
+ struct malayalam { BOOST_SPIRIT_IS_TAG() };
+ struct mongolian { BOOST_SPIRIT_IS_TAG() };
+ struct meetei_mayek { BOOST_SPIRIT_IS_TAG() };
+ struct myanmar { BOOST_SPIRIT_IS_TAG() };
+ struct nko { BOOST_SPIRIT_IS_TAG() };
+ struct ogham { BOOST_SPIRIT_IS_TAG() };
+ struct ol_chiki { BOOST_SPIRIT_IS_TAG() };
+ struct old_turkic { BOOST_SPIRIT_IS_TAG() };
+ struct oriya { BOOST_SPIRIT_IS_TAG() };
+ struct osmanya { BOOST_SPIRIT_IS_TAG() };
+ struct phags_pa { BOOST_SPIRIT_IS_TAG() };
+ struct inscriptional_pahlavi { BOOST_SPIRIT_IS_TAG() };
+ struct phoenician { BOOST_SPIRIT_IS_TAG() };
+ struct inscriptional_parthian { BOOST_SPIRIT_IS_TAG() };
+ struct rejang { BOOST_SPIRIT_IS_TAG() };
+ struct runic { BOOST_SPIRIT_IS_TAG() };
+ struct samaritan { BOOST_SPIRIT_IS_TAG() };
+ struct old_south_arabian { BOOST_SPIRIT_IS_TAG() };
+ struct saurashtra { BOOST_SPIRIT_IS_TAG() };
+ struct shavian { BOOST_SPIRIT_IS_TAG() };
+ struct sinhala { BOOST_SPIRIT_IS_TAG() };
+ struct sundanese { BOOST_SPIRIT_IS_TAG() };
+ struct syloti_nagri { BOOST_SPIRIT_IS_TAG() };
+ struct syriac { BOOST_SPIRIT_IS_TAG() };
+ struct tagbanwa { BOOST_SPIRIT_IS_TAG() };
+ struct tai_le { BOOST_SPIRIT_IS_TAG() };
+ struct new_tai_lue { BOOST_SPIRIT_IS_TAG() };
+ struct tamil { BOOST_SPIRIT_IS_TAG() };
+ struct tai_viet { BOOST_SPIRIT_IS_TAG() };
+ struct telugu { BOOST_SPIRIT_IS_TAG() };
+ struct tifinagh { BOOST_SPIRIT_IS_TAG() };
+ struct tagalog { BOOST_SPIRIT_IS_TAG() };
+ struct thaana { BOOST_SPIRIT_IS_TAG() };
+ struct thai { BOOST_SPIRIT_IS_TAG() };
+ struct tibetan { BOOST_SPIRIT_IS_TAG() };
+ struct ugaritic { BOOST_SPIRIT_IS_TAG() };
+ struct vai { BOOST_SPIRIT_IS_TAG() };
+ struct old_persian { BOOST_SPIRIT_IS_TAG() };
+ struct cuneiform { BOOST_SPIRIT_IS_TAG() };
+ struct yi { BOOST_SPIRIT_IS_TAG() };
+ struct inherited { BOOST_SPIRIT_IS_TAG() };
+ struct common { BOOST_SPIRIT_IS_TAG() };
+ struct unknown { BOOST_SPIRIT_IS_TAG() };
 #endif
 
     ///////////////////////////////////////////////////////////////////////////
@@ -269,11 +270,10 @@
     struct char_code
         : char_code_base<CharClass>, char_encoding_base<CharEncoding>
     {
- typedef void is_spirit_tag;
+ BOOST_SPIRIT_IS_TAG()
         typedef CharEncoding char_encoding; // e.g. ascii
         typedef CharClass char_class; // e.g. tag::alnum
     };
-
 }}}
 
 namespace boost { namespace spirit { namespace char_class

Added: trunk/boost/spirit/home/support/detail/is_spirit_tag.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/spirit/home/support/detail/is_spirit_tag.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -0,0 +1,20 @@
+/*=============================================================================
+ Copyright (c) 2001-2011 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_SUPPORT_DETAIL_IS_SPIRIT_TAG_MAR_28_2011_0341PM)
+#define BOOST_SPIRIT_SUPPORT_DETAIL_IS_SPIRIT_TAG_MAR_28_2011_0341PM
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#ifndef BOOST_SPIRIT_USE_SPIRIT_V3
+#define BOOST_SPIRIT_IS_TAG()
+#else
+#define BOOST_SPIRIT_IS_TAG() typedef void is_spirit_tag;
+#endif
+
+#endif

Modified: trunk/boost/spirit/home/support/lazy.hpp
==============================================================================
--- trunk/boost/spirit/home/support/lazy.hpp (original)
+++ trunk/boost/spirit/home/support/lazy.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -14,6 +14,7 @@
 #include <boost/spirit/include/phoenix_core.hpp>
 #include <boost/proto/proto.hpp>
 #include <boost/spirit/home/support/modify.hpp>
+#include <boost/spirit/home/support/detail/is_spirit_tag.hpp>
 
 namespace boost { namespace spirit
 {
@@ -26,7 +27,10 @@
 
     namespace tag
     {
- struct lazy_eval {};
+ struct lazy_eval
+ {
+ BOOST_SPIRIT_IS_TAG()
+ };
     }
 
     template <typename Domain>

Modified: trunk/boost/spirit/home/support/terminal.hpp
==============================================================================
--- trunk/boost/spirit/home/support/terminal.hpp (original)
+++ trunk/boost/spirit/home/support/terminal.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -20,6 +20,7 @@
 #include <boost/spirit/home/support/meta_compiler.hpp>
 #include <boost/spirit/home/support/detail/make_vector.hpp>
 #include <boost/spirit/home/support/unused.hpp>
+#include <boost/spirit/home/support/detail/is_spirit_tag.hpp>
 #include <boost/preprocessor/tuple/elem.hpp>
 
 #include <boost/spirit/home/support/terminal_expression.hpp>
@@ -487,7 +488,7 @@
           , typename DataTag1 = unused_type, typename DataTag2 = unused_type>
         struct stateful_tag
         {
- typedef void is_spirit_tag;
+ BOOST_SPIRIT_IS_TAG()
 
             typedef Data data_type;
 
@@ -573,7 +574,7 @@
 #ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
 
 #define BOOST_SPIRIT_TERMINAL_NAME(name, type_name) \
- namespace tag { struct name { typedef void is_spirit_tag; }; } \
+ namespace tag { struct name { BOOST_SPIRIT_IS_TAG() }; } \
     typedef boost::proto::terminal<tag::name>::type type_name; \
     type_name const name = {{}}; \
     inline void BOOST_PP_CAT(silence_unused_warnings_, name)() { (void) name; } \
@@ -582,7 +583,7 @@
 #else
 
 #define BOOST_SPIRIT_TERMINAL_NAME(name, type_name) \
- namespace tag { struct name { typedef void is_spirit_tag; }; } \
+ namespace tag { struct name { BOOST_SPIRIT_IS_TAG() }; } \
     typedef boost::proto::terminal<tag::name>::type type_name; \
     /***/
 
@@ -611,7 +612,7 @@
 #ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
 
 #define BOOST_SPIRIT_TERMINAL_NAME_EX(name, type_name) \
- namespace tag { struct name { typedef void is_spirit_tag; }; } \
+ namespace tag { struct name { BOOST_SPIRIT_IS_TAG() }; } \
     typedef boost::spirit::terminal<tag::name> type_name; \
     type_name const name = type_name(); \
     inline void BOOST_PP_CAT(silence_unused_warnings_, name)() { (void) name; } \
@@ -620,7 +621,7 @@
 #else
 
 #define BOOST_SPIRIT_TERMINAL_NAME_EX(name, type_name) \
- namespace tag { struct name { typedef void is_spirit_tag; }; } \
+ namespace tag { struct name { BOOST_SPIRIT_IS_TAG() }; } \
     typedef boost::spirit::terminal<tag::name> type_name; \
     /***/
 

Modified: trunk/boost/spirit/include/phoenix_container.hpp
==============================================================================
--- trunk/boost/spirit/include/phoenix_container.hpp (original)
+++ trunk/boost/spirit/include/phoenix_container.hpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -12,7 +12,7 @@
 #ifndef BOOST_SPIRIT_USE_PHOENIX_V3
 #include <boost/spirit/home/phoenix/container.hpp>
 #else
-#include <boost/phoenix/container.hpp>
+#include <boost/phoenix/stl/container.hpp>
 #endif
 
 #endif

Modified: trunk/libs/spirit/test/Jamfile
==============================================================================
--- trunk/libs/spirit/test/Jamfile (original)
+++ trunk/libs/spirit/test/Jamfile 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -24,6 +24,7 @@
     : <define>BOOST_SPIRIT_USE_PHOENIX_V3=1
         <define>BOOST_PROTO_MAX_ARITY=11
         <define>BOOST_PROTO_MAX_LOGICAL_ARITY=11
+ <define>BOOST_MPL_LIMIT_METAFUNCTION_ARITY=12
     ;
 
 ###############################################################################
@@ -36,7 +37,7 @@
     :
     ;
 
-# use this alias to buil Spirit against Phoenix V2
+# use this alias to build Spirit against Phoenix V2
 alias test_using_phoenix_v2
     : spirit_v2/qi
         spirit_v2/qi_regressions
@@ -48,7 +49,7 @@
         spirit_v2/support_regressions
     ;
 
-# use this alias to buil Spirit against Phoenix V3
+# use this alias to build Spirit against Phoenix V3
 alias test_using_phoenix_v3
     : spirit_v2/qi
         spirit_v2/qi_regressions

Modified: trunk/libs/spirit/test/lex/regression_file_iterator3.cpp
==============================================================================
--- trunk/libs/spirit/test/lex/regression_file_iterator3.cpp (original)
+++ trunk/libs/spirit/test/lex/regression_file_iterator3.cpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -60,7 +60,7 @@
     {
         lex::token_def<> string_lookahead('\'');
         self("LA") = string_lookahead;
-
+
         // make sure lookahead is implicitly evaluated using the lexer state
         // the token_def has been associated with
         self = st [
@@ -78,14 +78,14 @@
 {
     std::stringstream ss;
     ss << "'foo''bar'";
-
+
     file_iterator begin = make_file_iterator(ss, "SS");
     file_iterator end;
-
+
     lexer l;
     token_iterator begin2 = l.begin(begin, end);
     token_iterator end2 = l.end();
-
+
     char const* test_data[] = { "1,'foo'", "1,'foo''bar'" };
     std::size_t const test_data_size = sizeof(test_data)/sizeof(test_data[0]);
 

Modified: trunk/libs/spirit/test/qi/regression_numeric_alternatives.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/regression_numeric_alternatives.cpp (original)
+++ trunk/libs/spirit/test/qi/regression_numeric_alternatives.cpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -3,11 +3,14 @@
 // 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)
 
-#include "test.hpp"
 #include <boost/detail/lightweight_test.hpp>
 #include <boost/spirit/include/qi.hpp>
+#include <boost/spirit/include/phoenix.hpp>
+
+#include "test.hpp"
 
-int main() {
+int main()
+{
     using spirit_test::test;
     using boost::spirit::qi::rule;
     using boost::spirit::qi::parse;

Modified: trunk/libs/spirit/test/qi/terminal_ex.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/terminal_ex.cpp (original)
+++ trunk/libs/spirit/test/qi/terminal_ex.cpp 2011-03-28 20:11:41 EDT (Mon, 28 Mar 2011)
@@ -316,10 +316,6 @@
     using spirit_test::test_attr;
     using spirit_test::test;
 
- using boost::phoenix::val;
- using boost::phoenix::actor;
- using boost::phoenix::value;
-
     using testns::ops;
     using testns::check_type_1;
     using testns::check_type_2;
@@ -345,6 +341,12 @@
         BOOST_TEST(test_attr("++---****/", IP4 >> '/', c) && c == 9);
     }
 
+#ifndef BOOST_SPIRIT_USE_PHOENIX_V3
+
+ using boost::phoenix::val;
+ using boost::phoenix::actor;
+ using boost::phoenix::value;
+
     { // all lazy args
         int c = 0;
 #define LP1 ops(val(1))
@@ -393,6 +395,61 @@
         BOOST_TEST(test_attr("++--**/", MP5 >> '/', c) && c == 6);
     }
 
+#else // BOOST_SPIRIT_USE_PHOENIX_V3
+
+ using boost::phoenix::val;
+ using boost::phoenix::actor;
+ using boost::phoenix::expression::value;
+
+ { // all lazy args
+ int c = 0;
+#define LP1 ops(val(1))
+ check_type_1<value<int>::type>(LP1);
+ BOOST_TEST(test_attr("+/", LP1 >> '/', c) && c == 1);
+
+ c = 0;
+#define LP2 ops(val(1), val(4))
+ check_type_2<value<int>::type, value<int>::type>(LP2);
+ BOOST_TEST(test_attr("+----/", LP2 >> '/', c) && c == 5);
+
+ c = 0;
+#define LP3 ops(val((char)2), val(3.), val(4))
+ check_type_3<value<char>::type, value<double>::type, value<int>::type>(LP3);
+ BOOST_TEST(!test("++---***/", LP3 >> '/'));
+#define LP4 ops(val(1), val(2), val(3))
+ check_type_3<value<int>::type, value<int>::type, value<int>::type>(LP4);
+ BOOST_TEST(test_attr("+--***/", LP4 >> '/', c) && c == 6);
+ }
+
+ { // mixed immediate and lazy args
+ namespace fusion = boost::fusion;
+ namespace phx = boost::phoenix;
+
+ int c = 0;
+#define MP1 ops(val(3), 2)
+ check_type_2<value<int>::type, int>(MP1);
+ BOOST_TEST(test_attr("+++--/", MP1 >> '/', c) && c == 5);
+
+ c = 0;
+#define MP2 ops(4, val(1))
+ check_type_2<int, value<int>::type>(MP2);
+ BOOST_TEST(test_attr("++++-/", MP2 >> '/', c) && c == 5);
+
+ c = 0;
+#define MP3 ops(2, val(2), val(2))
+ check_type_3<int, value<int>::type, value<int>::type>(MP3);
+ BOOST_TEST(!test("++-**/", MP3 >> '/'));
+#define MP4 ops(2, val(2), 2)
+ check_type_3<int, value<int>::type, int>(MP4);
+ BOOST_TEST(test_attr("++--**/", MP4 >> '/', c) && c == 6);
+
+ c = 0;
+#define MP5 ops(val(5) - val(3), 2, val(2))
+ check_type_3<phx::expression::minus<value<int>::type, value<int>::type>::type, int, value<int>::type>(MP5);
+ BOOST_TEST(test_attr("++--**/", MP5 >> '/', c) && c == 6);
+ }
+#endif
+
     return boost::report_errors();
 }
 


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