$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r49249 - in branches/release/boost/spirit/home: . classic/iterator classic/iterator/impl karma karma/action karma/auxiliary karma/binary karma/char karma/directive/detail karma/numeric karma/operator karma/operator/karma-alt karma/stream karma/string lex/qi lex/qi/state phoenix/core/detail phoenix/operator/detail phoenix/scope phoenix/scope/detail phoenix/stl/container qi qi/auxiliary qi/operator qi/string support support/auxiliary support/char_class support/detail support/detail/lexer support/detail/lexer/containers support/detail/lexer/conversion support/detail/lexer/parser support/detail/lexer/parser/tokeniser support/detail/lexer/parser/tree support/detail/lexer/partition
From: joel_at_[hidden]
Date: 2008-10-10 10:39:01
Author: djowel
Date: 2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
New Revision: 49249
URL: http://svn.boost.org/trac/boost/changeset/49249
Log:
Merge from Trunk
Added:
   branches/release/boost/spirit/home/karma/auxiliary/confix.hpp   (contents, props changed)
   branches/release/boost/spirit/home/qi/auxiliary/confix.hpp   (contents, props changed)
   branches/release/boost/spirit/home/support.hpp   (contents, props changed)
   branches/release/boost/spirit/home/support/auxiliary/confix.hpp   (contents, props changed)
   branches/release/boost/spirit/home/support/detail/lexer/
      - copied from r49234, /trunk/boost/spirit/home/support/detail/lexer/
   branches/release/boost/spirit/home/support/detail/lexer/char_traits.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/char_traits.hpp
   branches/release/boost/spirit/home/support/detail/lexer/consts.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/consts.hpp
   branches/release/boost/spirit/home/support/detail/lexer/containers/
      - copied from r49234, /trunk/boost/spirit/home/support/detail/lexer/containers/
   branches/release/boost/spirit/home/support/detail/lexer/containers/ptr_list.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/containers/ptr_list.hpp
   branches/release/boost/spirit/home/support/detail/lexer/containers/ptr_vector.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/containers/ptr_vector.hpp
   branches/release/boost/spirit/home/support/detail/lexer/conversion/
      - copied from r49234, /trunk/boost/spirit/home/support/detail/lexer/conversion/
   branches/release/boost/spirit/home/support/detail/lexer/conversion/char_state_machine.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/conversion/char_state_machine.hpp
   branches/release/boost/spirit/home/support/detail/lexer/debug.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/debug.hpp
   branches/release/boost/spirit/home/support/detail/lexer/file_input.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/file_input.hpp
   branches/release/boost/spirit/home/support/detail/lexer/generate_cpp.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/generate_cpp.hpp
   branches/release/boost/spirit/home/support/detail/lexer/generator.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/generator.hpp
   branches/release/boost/spirit/home/support/detail/lexer/input.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/input.hpp
   branches/release/boost/spirit/home/support/detail/lexer/parser/
      - copied from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/
   branches/release/boost/spirit/home/support/detail/lexer/parser/parser.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/parser.hpp
   branches/release/boost/spirit/home/support/detail/lexer/parser/tokeniser/
      - copied from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tokeniser/
   branches/release/boost/spirit/home/support/detail/lexer/parser/tokeniser/num_token.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tokeniser/num_token.hpp
   branches/release/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser.hpp
   branches/release/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_helper.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_helper.hpp
   branches/release/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_state.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_state.hpp
   branches/release/boost/spirit/home/support/detail/lexer/parser/tree/
      - copied from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tree/
   branches/release/boost/spirit/home/support/detail/lexer/parser/tree/end_node.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tree/end_node.hpp
   branches/release/boost/spirit/home/support/detail/lexer/parser/tree/iteration_node.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tree/iteration_node.hpp
   branches/release/boost/spirit/home/support/detail/lexer/parser/tree/leaf_node.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tree/leaf_node.hpp
   branches/release/boost/spirit/home/support/detail/lexer/parser/tree/node.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tree/node.hpp
   branches/release/boost/spirit/home/support/detail/lexer/parser/tree/selection_node.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tree/selection_node.hpp
   branches/release/boost/spirit/home/support/detail/lexer/parser/tree/sequence_node.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/parser/tree/sequence_node.hpp
   branches/release/boost/spirit/home/support/detail/lexer/partition/
      - copied from r49234, /trunk/boost/spirit/home/support/detail/lexer/partition/
   branches/release/boost/spirit/home/support/detail/lexer/partition/charset.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/partition/charset.hpp
   branches/release/boost/spirit/home/support/detail/lexer/partition/equivset.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/partition/equivset.hpp
   branches/release/boost/spirit/home/support/detail/lexer/rules.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/rules.hpp
   branches/release/boost/spirit/home/support/detail/lexer/runtime_error.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/runtime_error.hpp
   branches/release/boost/spirit/home/support/detail/lexer/serialise.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/serialise.hpp
   branches/release/boost/spirit/home/support/detail/lexer/size_t.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/size_t.hpp
   branches/release/boost/spirit/home/support/detail/lexer/state_machine.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/state_machine.hpp
   branches/release/boost/spirit/home/support/detail/lexer/string_token.hpp
      - copied unchanged from r49234, /trunk/boost/spirit/home/support/detail/lexer/string_token.hpp
Text files modified: 
   branches/release/boost/spirit/home/classic/iterator/impl/file_iterator.ipp              |     4                                         
   branches/release/boost/spirit/home/classic/iterator/impl/position_iterator.ipp          |     3                                         
   branches/release/boost/spirit/home/classic/iterator/position_iterator.hpp               |    21 +++---                                  
   branches/release/boost/spirit/home/karma/action/meta_grammar.hpp                        |     2                                         
   branches/release/boost/spirit/home/karma/auxiliary.hpp                                  |     1                                         
   branches/release/boost/spirit/home/karma/auxiliary/functor.hpp                          |     8 +-                                      
   branches/release/boost/spirit/home/karma/auxiliary/meta_grammar.hpp                     |    16 +++++                                   
   branches/release/boost/spirit/home/karma/binary/binary.hpp                              |     2                                         
   branches/release/boost/spirit/home/karma/char/char.hpp                                  |     4                                         
   branches/release/boost/spirit/home/karma/directive/detail/center_alignment_generate.hpp |     6 +-                                      
   branches/release/boost/spirit/home/karma/numeric/int.hpp                                |     2                                         
   branches/release/boost/spirit/home/karma/numeric/real.hpp                               |    11 ++-                                     
   branches/release/boost/spirit/home/karma/numeric/uint.hpp                               |     2                                         
   branches/release/boost/spirit/home/karma/operator/karma-alt/alternative.hpp             |     6 +-                                      
   branches/release/boost/spirit/home/karma/operator/kleene.hpp                            |     2                                         
   branches/release/boost/spirit/home/karma/operator/optional.hpp                          |    65 ++++++++++++++-------                   
   branches/release/boost/spirit/home/karma/operator/plus.hpp                              |     2                                         
   branches/release/boost/spirit/home/karma/stream/stream.hpp                              |     2                                         
   branches/release/boost/spirit/home/karma/string/lit.hpp                                 |     4                                         
   branches/release/boost/spirit/home/lex/qi/meta_grammar.hpp                              |     2                                         
   branches/release/boost/spirit/home/lex/qi/state/in_state.hpp                            |    17 +++--                                   
   branches/release/boost/spirit/home/phoenix/core/detail/function_eval.hpp                |    16 ++++-                                   
   branches/release/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp       |     6 ++                                      
   branches/release/boost/spirit/home/phoenix/scope/detail/local_gen.hpp                   |     4 -                                       
   branches/release/boost/spirit/home/phoenix/scope/detail/local_variable.hpp              |    25 --------                                
   branches/release/boost/spirit/home/phoenix/scope/local_variable.hpp                     |     2                                         
   branches/release/boost/spirit/home/phoenix/stl/container/container.hpp                  |     2                                         
   branches/release/boost/spirit/home/qi/auxiliary.hpp                                     |     1                                         
   branches/release/boost/spirit/home/qi/auxiliary/functor.hpp                             |     6 +-                                      
   branches/release/boost/spirit/home/qi/auxiliary/meta_grammar.hpp                        |    13 ++++                                    
   branches/release/boost/spirit/home/qi/operator/difference.hpp                           |    10 ++-                                     
   branches/release/boost/spirit/home/qi/operator/list.hpp                                 |     4                                         
   branches/release/boost/spirit/home/qi/string/tst.hpp                                    |     2                                         
   branches/release/boost/spirit/home/support/char_class/iso8859_1.hpp                     |   120 ++++++++++++++++++++--------------------
   branches/release/boost/spirit/home/support/detail/what_function.hpp                     |     2                                         
   branches/release/boost/spirit/home/support/placeholders.hpp                             |     8 +-                                      
   36 files changed, 224 insertions(+), 179 deletions(-)
Modified: branches/release/boost/spirit/home/classic/iterator/impl/file_iterator.ipp
==============================================================================
--- branches/release/boost/spirit/home/classic/iterator/impl/file_iterator.ipp	(original)
+++ branches/release/boost/spirit/home/classic/iterator/impl/file_iterator.ipp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -322,7 +322,7 @@
 
         ~mapping()
         {
-            munmap(data, size);
+            munmap(static_cast<char*>(data), size);
         }
 
     private:
@@ -377,7 +377,7 @@
         }
         catch(...)
         {
-            munmap(p, stat_buf.st_size);
+            munmap(static_cast<char*>(p), stat_buf.st_size);
             throw;
         }
 
Modified: branches/release/boost/spirit/home/classic/iterator/impl/position_iterator.ipp
==============================================================================
--- branches/release/boost/spirit/home/classic/iterator/impl/position_iterator.ipp	(original)
+++ branches/release/boost/spirit/home/classic/iterator/impl/position_iterator.ipp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -124,7 +124,8 @@
     typedef boost::iterator_adaptor<
         main_iter_t,
         ForwardIterT,
-        const_value_type
+        const_value_type,
+        boost::forward_traversal_tag
     > type;
 };
 
Modified: branches/release/boost/spirit/home/classic/iterator/position_iterator.hpp
==============================================================================
--- branches/release/boost/spirit/home/classic/iterator/position_iterator.hpp	(original)
+++ branches/release/boost/spirit/home/classic/iterator/position_iterator.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -252,19 +252,19 @@
     void increment()
     {
         typename base_t::reference val = *(this->base());
-        if (val == '\n' || val == '\r') {
+        if (val == '\n') {
             ++this->base_reference();
-            if (this->base_reference() != _end) {
-                typename base_t::reference val2 = *(this->base());
-                if ((val == '\n' && val2 == '\r')
-                    || (val == '\r' && val2 == '\n'))
-                {
-                    ++this->base_reference();
-                }
-            }
             this->next_line(_pos);
             static_cast<main_iter_t &>(*this).newline();
         }
+        else if ( val == '\r') {
+            ++this->base_reference();
+            if (this->base_reference() == _end || *(this->base()) != '\n')
+            {
+                this->next_line(_pos);
+                static_cast<main_iter_t &>(*this).newline();
+            }
+        }
         else if (val == '\t') {
             this->tabulation(_pos);
             ++this->base_reference();
@@ -289,8 +289,7 @@
         OtherDerivedT const &rhs = static_cast<OtherDerivedT const &>(x);
         bool x_is_end = rhs._isend;
 
-        return (_isend && x_is_end) ||
-            (!_isend && !x_is_end && this->base() == rhs.base());
+        return (_isend && x_is_end) || (this->base() == rhs.base());
     }
 
 protected:
Modified: branches/release/boost/spirit/home/karma/action/meta_grammar.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/action/meta_grammar.hpp	(original)
+++ branches/release/boost/spirit/home/karma/action/meta_grammar.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -20,7 +20,7 @@
     // forwards
     /////////////////////////////////////////////////////////////////////////// 
     struct action;
-    
+
     struct main_meta_grammar;
 
     template <typename Expr, typename Enable>
Modified: branches/release/boost/spirit/home/karma/auxiliary.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/auxiliary.hpp	(original)
+++ branches/release/boost/spirit/home/karma/auxiliary.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -7,6 +7,7 @@
 #define BOOST_SPIRIT_KARMA_AUXILIARY_MAR_26_2007_1225PM
 
 #include <boost/spirit/home/karma/auxiliary/none.hpp>
+#include <boost/spirit/home/karma/auxiliary/confix.hpp>
 #include <boost/spirit/home/karma/auxiliary/eps.hpp>
 #include <boost/spirit/home/karma/auxiliary/eol.hpp>
 #include <boost/spirit/home/karma/auxiliary/lazy.hpp>
Added: branches/release/boost/spirit/home/karma/auxiliary/confix.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/spirit/home/karma/auxiliary/confix.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -0,0 +1,121 @@
+//  Copyright (c) 2001-2008 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_CONFIX_AUG_19_2008_1041AM)
+#define BOOST_SPIRIT_KARMA_CONFIX_AUG_19_2008_1041AM
+
+#include <boost/spirit/home/karma/domain.hpp>
+#include <boost/spirit/home/karma/delimit.hpp>
+#include <boost/spirit/home/support/component.hpp>
+#include <boost/spirit/home/support/attribute_of.hpp>
+#include <boost/spirit/home/support/unused.hpp>
+#include <boost/spirit/home/support/auxiliary/confix.hpp>
+
+///////////////////////////////////////////////////////////////////////////////
+namespace boost { namespace spirit { namespace karma
+{
+    ///////////////////////////////////////////////////////////////////////////
+    // the director for a confix() generated generator
+    struct confix_director
+    {
+        template <typename Component, typename Context, typename Unused>
+        struct attribute
+        {
+            typedef typename
+                result_of::subject<Component>::type
+            subject_type;
+
+            typedef typename
+                traits::attribute_of<karma::domain, subject_type, Context>::type
+            type;
+        };
+
+    private:
+        ///////////////////////////////////////////////////////////////////////
+        template <typename OutputIterator, typename Context, 
+            typename Delimiter, typename Expr>
+        static void
+        generate_helper(OutputIterator& sink, Context& ctx, Delimiter const& d,
+            Expr const& e)
+        {
+            BOOST_MPL_ASSERT_MSG(
+                (spirit::traits::is_component<karma::domain, Expr>::value), 
+                expression_is_not_convertible_to_a_generator, (Context, Expr));
+
+            typedef 
+                typename result_of::as_component<karma::domain, Expr>::type 
+            expr;
+
+            expr eg = spirit::as_component(karma::domain(), e);
+            typedef typename expr::director director;
+            director::generate(eg, sink, ctx, d, unused);
+        }
+
+        template <typename Context, typename Expr>
+        static std::string what_helper(Expr const& e, Context& ctx)
+        {
+            typedef 
+                typename result_of::as_component<karma::domain, Expr>::type 
+            expr;
+
+            expr eg = spirit::as_component(karma::domain(), e);
+            typedef typename expr::director director;
+            return director::what(eg, ctx);
+        }
+
+    public:
+        ///////////////////////////////////////////////////////////////////////
+        template <typename Component, typename OutputIterator, 
+            typename Context, typename Delimiter, typename Parameter>
+        static bool 
+        generate(Component const& component, OutputIterator& sink, 
+            Context& ctx, Delimiter const& d, Parameter const& param) 
+        {
+            // generate the prefix
+            generate_helper(sink, ctx, d, 
+                spirit::detail::confix_extractor::prefix(
+                    proto::arg_c<0>(spirit::argument1(component))));
+
+            // generate the embedded items
+            typedef typename
+                spirit::result_of::subject<Component>::type::director
+            director;
+            bool result = director::generate(spirit::subject(component), sink, 
+                ctx, d, param);
+
+            // append the suffix 
+            generate_helper(sink, ctx, d, 
+                spirit::detail::confix_extractor::suffix(
+                    proto::arg_c<0>(spirit::argument1(component))));
+
+            return result;
+        }
+
+        template <typename Component, typename Context>
+        static std::string what(Component const& component, Context const& ctx)
+        {
+            std::string result = "confix(";
+
+            result += what_helper(spirit::detail::confix_extractor::prefix(
+                    proto::arg_c<0>(spirit::argument1(component))), ctx);
+            result += ", ";
+
+            result += what_helper(spirit::detail::confix_extractor::suffix(
+                    proto::arg_c<0>(spirit::argument1(component))), ctx);
+            result += ")[";
+
+            typedef typename
+                spirit::result_of::subject<Component>::type::director
+            director;
+            result += director::what(spirit::subject(component), ctx);
+            result += "]";
+
+            return result;
+        }
+    };
+
+}}}
+
+#endif
Modified: branches/release/boost/spirit/home/karma/auxiliary/functor.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/auxiliary/functor.hpp	(original)
+++ branches/release/boost/spirit/home/karma/auxiliary/functor.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -178,7 +178,7 @@
     //              typedef unspecified type;
     //          };
     //
-    //      which declares the given type as the expected parameter type for 
+    //      which declares the given type as the expected attribute type for 
     //      the generator to create.
     ///////////////////////////////////////////////////////////////////////////
     template <typename Functor>
@@ -187,10 +187,10 @@
     {
         return functor_generator<Functor>(func);
     }
-    
+
     ///////////////////////////////////////////////////////////////////////////
     //  The as_generator_mf generator function is equivalent to the function
-    //  as_generator above except that the user has explicitly to specify a
+    //  as_generator above except that the user has to explicitly specify a
     //  type exposing an embedded apply meta function declaring the expected
     //  parameter type for the generator to create.
     ///////////////////////////////////////////////////////////////////////////
@@ -200,7 +200,7 @@
     {
         return functor_generator<Functor, ParameterMF>(func, mf);
     }
-    
+
     template <typename ParameterMF, typename Functor>
     inline typename result_of::as_generator_mf<Functor, ParameterMF>::type
     as_generator_mf(Functor const& func)
Modified: branches/release/boost/spirit/home/karma/auxiliary/meta_grammar.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/auxiliary/meta_grammar.hpp	(original)
+++ branches/release/boost/spirit/home/karma/auxiliary/meta_grammar.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -22,13 +22,16 @@
     ///////////////////////////////////////////////////////////////////////////
     // forwards
     ///////////////////////////////////////////////////////////////////////////
+    struct main_meta_grammar;
+
     struct none;
     struct eps_generator;
     struct eol_generator;
     struct semantic_predicate;
     struct lazy_generator;
     struct functor_director;
-    
+    struct confix_director;
+
     template <typename Expr, typename Enable>
     struct is_valid_expr;
 
@@ -42,20 +45,31 @@
     // none, and lazy
     struct auxiliary_meta_grammar
       : proto::or_<
+            // none
             meta_grammar::empty_terminal_rule<
                 karma::domain, tag::none, none>,
+            // eps
             meta_grammar::empty_terminal_rule<
                 karma::domain, tag::eps, eps_generator>,
+            // eol
             meta_grammar::empty_terminal_rule<
                 karma::domain, tag::eol, eol_generator>,
+            // eps(...)
             meta_grammar::function1_rule<
                 karma::domain, tag::eps, semantic_predicate>,
+            // lazy(...)
             meta_grammar::function1_rule<
                 karma::domain, tag::lazy, lazy_generator>,
+            // functor generators
             meta_grammar::terminal_rule<
                 karma::domain, 
                 functor_holder<proto::_, proto::_>,
                 functor_director
+            >,
+            // confix("...", "...")[...]
+            meta_grammar::subscript_rule<
+                karma::domain, tag::confix<proto::_, proto::_>, 
+                confix_director, main_meta_grammar
             >
         >
     {
Modified: branches/release/boost/spirit/home/karma/binary/binary.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/binary/binary.hpp	(original)
+++ branches/release/boost/spirit/home/karma/binary/binary.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -132,7 +132,7 @@
             unused_type)
         {
             BOOST_MPL_ASSERT_MSG(false,
-                binary_generator_not_usable_without_parameter, ());
+                binary_generator_not_usable_without_attribute, ());
             return false;
         }
 
Modified: branches/release/boost/spirit/home/karma/char/char.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/char/char.hpp	(original)
+++ branches/release/boost/spirit/home/karma/char/char.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -63,7 +63,7 @@
         generate(Component const&, OutputIterator&, Context&, Delimiter const&,
             unused_type)
         {
-            BOOST_MPL_ASSERT_MSG(false, char__not_usable_without_parameter, ());
+            BOOST_MPL_ASSERT_MSG(false, char__not_usable_without_attribute, ());
             return false;
         }
 
@@ -187,7 +187,7 @@
         generate(Component const&, OutputIterator&, Context&, Delimiter const&,
             unused_type)
         {
-            BOOST_MPL_ASSERT_MSG(false, char__not_usable_without_parameter, ());
+            BOOST_MPL_ASSERT_MSG(false, char__not_usable_without_attribute, ());
             return false;
         }
 
Modified: branches/release/boost/spirit/home/karma/directive/detail/center_alignment_generate.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/directive/detail/center_alignment_generate.hpp	(original)
+++ branches/release/boost/spirit/home/karma/directive/detail/center_alignment_generate.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -35,17 +35,17 @@
         BOOST_MPL_ASSERT_MSG(
             (spirit::traits::is_component<karma::domain, Padding>::value), 
             padding_is_not_convertible_to_a_generator, (Context, Padding));
-            
+
         typedef 
             typename result_of::as_component<karma::domain, Embedded>::type 
         embedded;
         typedef 
             typename result_of::as_component<karma::domain, Padding>::type 
         padding;
-        
+
         // wrap the given output iterator to allow left padding
         detail::enable_buffering<OutputIterator> buffering(sink, width);
-        
+
         // first generate the embedded output 
         embedded ec = spirit::as_component(karma::domain(), e);
         typedef typename embedded::director director;
Modified: branches/release/boost/spirit/home/karma/numeric/int.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/numeric/int.hpp	(original)
+++ branches/release/boost/spirit/home/karma/numeric/int.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -69,7 +69,7 @@
         generate(Component const&, OutputIterator&, Context&, Delimiter const&,
             unused_type)
         {
-            BOOST_MPL_ASSERT_MSG(false, int__not_usable_without_parameter, ());
+            BOOST_MPL_ASSERT_MSG(false, int__not_usable_without_attribute, ());
             return false;
         }
 
Modified: branches/release/boost/spirit/home/karma/numeric/real.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/numeric/real.hpp	(original)
+++ branches/release/boost/spirit/home/karma/numeric/real.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -49,8 +49,9 @@
         generate(Component const& component, OutputIterator& sink,
             Context& /*ctx*/, Delimiter const& d, Parameter const& param)
         {
-            RealPolicies const& p = detail::real_policy<RealPolicies>::get(
-                fusion::at_c<0>(component.elements));
+            RealPolicies const& p = 
+                detail::real_policy<RealPolicies>::get(spirit::subject(component));
+
             bool result = real_inserter<T, RealPolicies, Tag>::
                 call(sink, param, p);
 
@@ -66,13 +67,13 @@
         generate(Component const&, OutputIterator&, Context&, Delimiter const&,
             unused_type)
         {
-            BOOST_MPL_ASSERT_MSG(false, real_not_usable_without_parameter,
+            BOOST_MPL_ASSERT_MSG(false, real_not_usable_without_attribute,
                 (Component, Context));
             return false;
         }
 
         template <typename Component, typename Context>
-        static std::string what(Component const& component, Context const& ctx)
+        static std::string what(Component const& /*component*/, Context const& /*ctx*/)
         {
             return "real number";
         }
@@ -107,7 +108,7 @@
         }
 
         template <typename Component, typename Context>
-        static std::string what(Component const& component, Context const& ctx)
+        static std::string what(Component const& /*component*/, Context const& /*ctx*/)
         {
             return "real number";
         }
Modified: branches/release/boost/spirit/home/karma/numeric/uint.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/numeric/uint.hpp	(original)
+++ branches/release/boost/spirit/home/karma/numeric/uint.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -60,7 +60,7 @@
         generate(Component const&, OutputIterator&, Context&, Delimiter const&,
             unused_type)
         {
-            BOOST_MPL_ASSERT_MSG(false, uint_not_usable_without_parameter, ());
+            BOOST_MPL_ASSERT_MSG(false, uint_not_usable_without_attribute, ());
             return false;
         }
 
Modified: branches/release/boost/spirit/home/karma/operator/karma-alt/alternative.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/operator/karma-alt/alternative.hpp	(original)
+++ branches/release/boost/spirit/home/karma/operator/karma-alt/alternative.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -65,12 +65,12 @@
             return fusion::any(component.elements, f);
         }
 
-        template <typename Component>
-        static std::string what(Component const& component)
+        template <typename Component, typename Context>
+        static std::string what(Component const& component, Context const& ctx)
         {
             std::string result = "alternatives[";
             fusion::for_each(component.elements,
-                spirit::detail::what_function(result));
+                spirit::detail::what_function<Context>(result), ctx);
             result += "]";
             return result;
         }
Modified: branches/release/boost/spirit/home/karma/operator/kleene.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/operator/kleene.hpp	(original)
+++ branches/release/boost/spirit/home/karma/operator/kleene.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -68,7 +68,7 @@
 //         generate(Component const&, OutputIterator&, Context&, Delimiter const&,
 //             unused_type)
 //         {
-//             BOOST_MPL_ASSERT_MSG(false, kleene_not_usable_without_parameter, ());
+//             BOOST_MPL_ASSERT_MSG(false, kleene_not_usable_without_attribute, ());
 //             return false;
 //         }
 
Modified: branches/release/boost/spirit/home/karma/operator/optional.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/operator/optional.hpp	(original)
+++ branches/release/boost/spirit/home/karma/operator/optional.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -12,6 +12,7 @@
 #endif
 
 #include <boost/spirit/home/support/component.hpp>
+#include <boost/spirit/home/support/attribute_of.hpp>
 #include <boost/spirit/home/support/attribute_transform.hpp>
 #include <boost/mpl/assert.hpp>
 #include <boost/optional.hpp>
@@ -21,30 +22,44 @@
     namespace detail
     {
         template <typename Parameter>
-        inline bool
-        optional_is_valid(boost::optional<Parameter> const& opt)
+        struct optional_attribute
         {
-            return opt;
-        }
+            static inline bool
+            is_valid(boost::optional<Parameter> const& opt)
+            {
+                return opt;
+            }
 
-        inline bool
-        optional_is_valid(unused_type)
-        {
-            return true;
-        }
+            static inline bool
+            is_valid(Parameter const&)
+            {
+                return true;
+            }
 
-        template <typename Parameter>
-        inline Parameter const&
-        optional_get(boost::optional<Parameter> const& opt)
-        {
-            return get(opt) ;
-        }
+            static inline bool
+            is_valid(unused_type)
+            {
+                return true;
+            }
 
-        inline unused_type
-        optional_get(unused_type)
-        {
-            return unused;
-        }
+            static inline Parameter const&
+            get(boost::optional<Parameter> const& opt)
+            {
+                return boost::get(opt);
+            }
+
+            static inline Parameter const&
+            get(Parameter const& p)
+            {
+                return p;
+            }
+
+            static inline unused_type
+            get(unused_type)
+            {
+                return unused;
+            }
+        };
     }
 
     struct optional
@@ -71,10 +86,16 @@
                 result_of::subject<Component>::type::director
             director;
 
-            if (detail::optional_is_valid(param))
+            typedef typename traits::attribute_of<
+                karma::domain, typename result_of::subject<Component>::type, 
+                Context, unused_type
+            >::type attribute_type;
+
+            typedef detail::optional_attribute<attribute_type> optional_type;
+            if (optional_type::is_valid(param))
             {
                 director::generate(subject(component), sink, ctx, d,
-                    detail::optional_get(param));
+                    optional_type::get(param));
             }
             return true;
         }
Modified: branches/release/boost/spirit/home/karma/operator/plus.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/operator/plus.hpp	(original)
+++ branches/release/boost/spirit/home/karma/operator/plus.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -71,7 +71,7 @@
 //         generate(Component const&, OutputIterator&, Context&, Delimiter const&,
 //             unused_type)
 //         {
-//             BOOST_MPL_ASSERT_MSG(false, plus_not_usable_without_parameter, ());
+//             BOOST_MPL_ASSERT_MSG(false, plus_not_usable_without_attribute, ());
 //             return false;
 //         }
 
Modified: branches/release/boost/spirit/home/karma/stream/stream.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/stream/stream.hpp	(original)
+++ branches/release/boost/spirit/home/karma/stream/stream.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -103,7 +103,7 @@
         generate(Component const&, OutputIterator&, Context&, Delimiter const&,
             unused_type)
         {
-            BOOST_MPL_ASSERT_MSG(false, stream__not_usable_without_parameter,
+            BOOST_MPL_ASSERT_MSG(false, stream__not_usable_without_attribute,
               (Component, OutputIterator, Delimiter));
             return false;
         }
Modified: branches/release/boost/spirit/home/karma/string/lit.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/string/lit.hpp	(original)
+++ branches/release/boost/spirit/home/karma/string/lit.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -55,7 +55,7 @@
         generate(Component const& component, OutputIterator& sink,
             Context& /*ctx*/, Delimiter const& d, unused_type)
         {
-            BOOST_MPL_ASSERT_MSG(false, lit_not_usable_without_parameter, ());
+            BOOST_MPL_ASSERT_MSG(false, lit_not_usable_without_attribute, ());
             return false;
         }
 
@@ -165,7 +165,7 @@
         generate(Component const& component, OutputIterator& sink,
             Context& /*ctx*/, Delimiter const& d, unused_type)
         {
-            BOOST_MPL_ASSERT_MSG(false, lit_not_usable_without_parameter, ());
+            BOOST_MPL_ASSERT_MSG(false, lit_not_usable_without_attribute, ());
             return false;
         }
 
Modified: branches/release/boost/spirit/home/lex/qi/meta_grammar.hpp
==============================================================================
--- branches/release/boost/spirit/home/lex/qi/meta_grammar.hpp	(original)
+++ branches/release/boost/spirit/home/lex/qi/meta_grammar.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -27,7 +27,7 @@
 
     struct state_switcher;
     struct state_switcher_context;
-    
+
     struct plain_token;
 
     template <typename Expr, typename Enable>
Modified: branches/release/boost/spirit/home/lex/qi/state/in_state.hpp
==============================================================================
--- branches/release/boost/spirit/home/lex/qi/state/in_state.hpp	(original)
+++ branches/release/boost/spirit/home/lex/qi/state/in_state.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -22,7 +22,7 @@
     {
         String name;
     };
-    
+
     ///////////////////////////////////////////////////////////////////////////
     // These are the different overloads allowed for the in_state(...) 
     // construct
@@ -33,23 +33,26 @@
         proto::terminal<in_state_tag<char const*> >::type that = {{s}};
         return that;
     }
-    
+
     inline proto::terminal<in_state_tag<wchar_t const*> >::type
     in_state(wchar_t const *s)
     {
         proto::terminal<in_state_tag<wchar_t const*> >::type that = {{s}};
         return that;
     }
-    
+
     template <typename Char, typename Traits, typename Allocator>
-    inline proto::terminal<in_state_tag<char const*> >::type
+    inline typename proto::terminal<in_state_tag<Char const*> >::type
     in_state(std::basic_string<Char, Traits, Allocator> const& s)
     {
-        typename proto::terminal<in_state_tag<Char const*> >::type that = 
-            {{s.c_str()}};
+        typedef std::basic_string<Char, Traits, Allocator> string_type;
+
+        typename proto::terminal<in_state_tag<string_type> >::type that;
+        that.s = s;
+
         return that;
     }
-    
+
     ///////////////////////////////////////////////////////////////////////////
     // The following is a helper template allowing to use the in_state()[] as 
     // a skip parser
Modified: branches/release/boost/spirit/home/phoenix/core/detail/function_eval.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/core/detail/function_eval.hpp	(original)
+++ branches/release/boost/spirit/home/phoenix/core/detail/function_eval.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -32,8 +32,12 @@
         template <typename Env, typename F>
         struct result
         {
-            typedef typename F::template result<Env>::type function;
-            typedef typename function::result_type type;
+            typedef typename
+                remove_reference<
+                    typename F::template result<Env>::type 
+                >::type
+            fn;
+            typedef typename fn::result_type type;
         };
 
         template <typename RT, typename Env, typename F>
@@ -96,7 +100,11 @@
           , BOOST_PP_ENUM_PARAMS(N, typename A)>
         struct result
         {
-            typedef typename F::template result<Env>::type function;
+            typedef typename
+                remove_reference<
+                    typename F::template result<Env>::type 
+                >::type
+            fn;
             BOOST_PP_REPEAT(N, PHOENIX_GET_ARG, _)
 
             typedef BOOST_PP_CAT(mpl::vector, N)
@@ -104,7 +112,7 @@
             args;
 
             typedef typename
-                function::template result<BOOST_PP_ENUM_PARAMS(N, a)>
+                fn::template result<BOOST_PP_ENUM_PARAMS(N, a)>
             function_apply;
 
             typedef typename
Modified: branches/release/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp	(original)
+++ branches/release/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -25,6 +25,12 @@
     {
         typedef Ret type;
     };
+    
+    template<typename Ret, typename Class>
+    struct mem_fun_ptr_return<Ret (Class::*)() const>
+    {
+        typedef Ret type;
+    };
 
 #define BOOST_PP_ITERATION_PARAMS_1                                                           \
         (3, (1, PHOENIX_MEMBER_LIMIT, "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp"))
Modified: branches/release/boost/spirit/home/phoenix/scope/detail/local_gen.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/scope/detail/local_gen.hpp	(original)
+++ branches/release/boost/spirit/home/phoenix/scope/detail/local_gen.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -5,8 +5,7 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 #ifndef BOOST_PP_IS_ITERATING
-#ifndef PHOENIX_SCOPE_DETAIL_LOCAL_GEN_HPP
-#define PHOENIX_SCOPE_DETAIL_LOCAL_GEN_HPP
+// Allow multiple inclusion. let.hpp and lambda.hpp will have the guards
 
 #include <boost/preprocessor/iterate.hpp>
 #include <boost/preprocessor/repetition/enum.hpp>
@@ -26,7 +25,6 @@
 
 #undef PHOENIX_LOCAL_GEN_PARAM
 #undef PHOENIX_LOCAL_GEN_ACTOR
-#endif
 
 ///////////////////////////////////////////////////////////////////////////////
 //
Modified: branches/release/boost/spirit/home/phoenix/scope/detail/local_variable.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/scope/detail/local_variable.hpp	(original)
+++ branches/release/boost/spirit/home/phoenix/scope/detail/local_variable.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -21,7 +21,6 @@
 #include <boost/preprocessor/repeat.hpp>
 #include <boost/type_traits/remove_reference.hpp>
 #include <boost/type_traits/is_reference.hpp>
-#include <boost/spirit/home/phoenix/detail/local_reference.hpp>
 
 #define PHOENIX_MAP_LOCAL_TEMPLATE_PARAM(z, n, data) \
     typename T##n = unused<n>
@@ -109,35 +108,13 @@
             type;
         };
 
-        template <typename T>
-        struct local_reference_identity
-        {
-            typedef local_reference<T> type;
-        };
-
-        template <typename Locals, typename Index>
-        struct make_local_reference
-        {
-            typedef typename
-                fusion::result_of::value_at<Locals, Index>::type
-            value_at;
-
-            typedef typename
-                mpl::eval_if<
-                    is_reference<value_at>
-                  , mpl::identity<value_at>
-                  , local_reference_identity<value_at>
-                >::type
-            type;
-        };
-
         template <typename Locals, typename Index>
         struct get_local_or_void
         {
             typedef typename
                 mpl::eval_if<
                     mpl::less<Index, mpl::size<Locals> >
-                  , make_local_reference<Locals, Index>
+                  , fusion::result_of::at<Locals, Index>
                   , mpl::identity<fusion::void_>
                 >::type
             type;
Modified: branches/release/boost/spirit/home/phoenix/scope/local_variable.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/scope/local_variable.hpp	(original)
+++ branches/release/boost/spirit/home/phoenix/scope/local_variable.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -36,7 +36,7 @@
         struct result : detail::apply_local<local_variable<Key>, Env> {};
 
         template <typename Env>
-        typename result<Env>::type const
+        typename result<Env>::type 
         eval(Env const& env) const
         {
             typedef typename result<Env>::type return_type;
Modified: branches/release/boost/spirit/home/phoenix/stl/container/container.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/stl/container/container.hpp	(original)
+++ branches/release/boost/spirit/home/phoenix/stl/container/container.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -268,7 +268,7 @@
                 typedef
                     boost::mpl::eval_if<
                         boost::is_same<Arg1, typename iterator_of<C>::type>
-#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1400)
+#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1500)
                       , iterator_of<C>
 #else
                       , boost::mpl::identity<void>
Modified: branches/release/boost/spirit/home/qi/auxiliary.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/auxiliary.hpp	(original)
+++ branches/release/boost/spirit/home/qi/auxiliary.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -9,6 +9,7 @@
 #define BOOST_SPIRIT_STRING_FEB_03_2007_0355PM
 
 #include <boost/spirit/home/qi/auxiliary/none.hpp>
+#include <boost/spirit/home/qi/auxiliary/confix.hpp>
 #include <boost/spirit/home/qi/auxiliary/eps.hpp>
 #include <boost/spirit/home/qi/auxiliary/lazy.hpp>
 #include <boost/spirit/home/qi/auxiliary/functor.hpp>
Added: branches/release/boost/spirit/home/qi/auxiliary/confix.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/spirit/home/qi/auxiliary/confix.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -0,0 +1,127 @@
+//  Copyright (c) 2001-2008 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_QI_CONFIX_AUG_26_2008_1012AM)
+#define BOOST_SPIRIT_QI_CONFIX_AUG_26_2008_1012AM
+
+#include <boost/spirit/home/qi/domain.hpp>
+#include <boost/spirit/home/qi/skip.hpp>
+#include <boost/spirit/home/support/component.hpp>
+#include <boost/spirit/home/support/attribute_of.hpp>
+#include <boost/spirit/home/support/unused.hpp>
+#include <boost/spirit/home/support/auxiliary/confix.hpp>
+
+///////////////////////////////////////////////////////////////////////////////
+namespace boost { namespace spirit { namespace qi
+{
+    ///////////////////////////////////////////////////////////////////////////
+    // the director for a confix() generated parser
+    struct confix_director
+    {
+        template <typename Component, typename Context, typename Iterator>
+        struct attribute
+        {
+            typedef typename
+                result_of::subject<Component>::type
+            subject_type;
+
+            typedef typename
+                traits::attribute_of<
+                    qi::domain, subject_type, Context, Iterator>::type
+            type;
+        };
+
+    private:
+        ///////////////////////////////////////////////////////////////////////
+        template <
+            typename Iterator, typename Context
+          , typename Skipper, typename Expr>
+        static void parse_helper(
+            Iterator& first, Iterator const& last
+          , Context& context, Skipper const& skipper, Expr const& e)
+        {
+            BOOST_MPL_ASSERT_MSG(
+                (spirit::traits::is_component<qi::domain, Expr>::value), 
+                expression_is_not_convertible_to_a_parser, (Context, Expr));
+
+            typedef 
+                typename result_of::as_component<qi::domain, Expr>::type 
+            expr;
+
+            expr eg = spirit::as_component(qi::domain(), e);
+            typedef typename expr::director director;
+            director::parse(eg, first, last, context, skipper, unused);
+        }
+
+        template <typename Context, typename Expr>
+        static std::string what_helper(Expr const& e, Context& ctx)
+        {
+            typedef 
+                typename result_of::as_component<qi::domain, Expr>::type 
+            expr;
+
+            expr eg = spirit::as_component(qi::domain(), e);
+            typedef typename expr::director director;
+            return director::what(eg, ctx);
+        }
+
+    public:
+        ///////////////////////////////////////////////////////////////////////
+        template <
+            typename Component
+          , typename Iterator, typename Context
+          , typename Skipper, typename Attribute>
+        static bool parse(
+            Component const& component
+          , Iterator& first, Iterator const& last
+          , Context& context, Skipper const& skipper
+          , Attribute& attr)
+        {
+            // parse the prefix
+            parse_helper(first, last, context, skipper, 
+                spirit::detail::confix_extractor::prefix(
+                    proto::arg_c<0>(spirit::argument1(component))));
+
+            // generate the embedded items
+            typedef typename
+                spirit::result_of::subject<Component>::type::director
+            director;
+            bool result = director::parse(spirit::subject(component), 
+                first, last, context, skipper, attr);
+
+            // append the suffix 
+            parse_helper(first, last, context, skipper, 
+                spirit::detail::confix_extractor::suffix(
+                    proto::arg_c<0>(spirit::argument1(component))));
+
+            return result;
+        }
+
+        template <typename Component, typename Context>
+        static std::string what(Component const& component, Context const& ctx)
+        {
+            std::string result = "confix(";
+
+            result += what_helper(spirit::detail::confix_extractor::prefix(
+                    proto::arg_c<0>(spirit::argument1(component))), ctx);
+            result += ", ";
+
+            result += what_helper(spirit::detail::confix_extractor::suffix(
+                    proto::arg_c<0>(spirit::argument1(component))), ctx);
+            result += ")[";
+
+            typedef typename
+                spirit::result_of::subject<Component>::type::director
+            director;
+            result += director::what(spirit::subject(component), ctx);
+            result += "]";
+
+            return result;
+        }
+    };
+
+}}}
+
+#endif
Modified: branches/release/boost/spirit/home/qi/auxiliary/functor.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/auxiliary/functor.hpp	(original)
+++ branches/release/boost/spirit/home/qi/auxiliary/functor.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -175,8 +175,8 @@
     //              typedef unspecified type;
     //          };
     //
-    //      which declares the given type as the expected parameter type for 
-    //      the generator to create.
+    //      which declares the given type as the expected attribute type for 
+    //      the parser to create.
     ///////////////////////////////////////////////////////////////////////////
     template <typename Functor>
     inline typename result_of::as_parser<Functor>::type
@@ -187,7 +187,7 @@
     
     ///////////////////////////////////////////////////////////////////////////
     //  The as_parser_mf generator function is equivalent to the function
-    //  as_parser above except that the user has explicitly to specify a
+    //  as_parser above except that the user has to explicitly specify a
     //  type exposing an embedded apply meta function declaring the expected
     //  parameter type for the generator to create.
     ///////////////////////////////////////////////////////////////////////////
Modified: branches/release/boost/spirit/home/qi/auxiliary/meta_grammar.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/auxiliary/meta_grammar.hpp	(original)
+++ branches/release/boost/spirit/home/qi/auxiliary/meta_grammar.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -24,11 +24,14 @@
     ///////////////////////////////////////////////////////////////////////////
     // forwards
     ///////////////////////////////////////////////////////////////////////////
+    struct main_meta_grammar;
+
     struct none;
     struct eps_parser;
     struct semantic_predicate;
     struct lazy_parser;
     struct functor_director;
+    struct confix_director;
 
     struct eol_director;
     struct eoi_director;
@@ -50,19 +53,29 @@
     // none, eps and eps(f)
     struct auxiliary_meta_grammar1
       : proto::or_<
+        // none
             meta_grammar::empty_terminal_rule<
                 qi::domain, tag::none, none>
+        // eps
           , meta_grammar::empty_terminal_rule<
                 qi::domain, tag::eps, eps_parser>
+        // eps()
           , meta_grammar::function1_rule<
                 qi::domain, tag::eps, semantic_predicate>
+        // lazy()
           , meta_grammar::function1_rule<
                 qi::domain, tag::lazy, lazy_parser>
+        // functor parser
           , meta_grammar::terminal_rule<
                 qi::domain
               , functor_holder<proto::_, proto::_>
               , functor_director
             >
+        // confix(..., ...)[...]
+          , meta_grammar::subscript_rule<
+                qi::domain, tag::confix<proto::_, proto::_>, 
+                confix_director, main_meta_grammar
+            >
         >
     {
     };
Modified: branches/release/boost/spirit/home/qi/operator/difference.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/operator/difference.hpp	(original)
+++ branches/release/boost/spirit/home/qi/operator/difference.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -56,14 +56,16 @@
 
             // Try RHS first
             Iterator start = first;
-            if (rdirector::parse(right(component), first, last, context, skipper, unused))
+            if (rdirector::parse(spirit::right(component), first, last, context, 
+                skipper, unused))
             {
                 // RHS succeeds, we fail.
                 first = start;
                 return false;
             }
             // RHS fails, now try LHS
-            return ldirector::parse(left(component), first, last, context, skipper, attr);
+            return ldirector::parse(spirit::left(component), first, last, 
+                context, skipper, attr);
         }
 
         template <typename Component, typename Context>
@@ -79,9 +81,9 @@
                 result_of::right<Component>::type::director
             rdirector;
 
-            result += ldirector::what(left(component), ctx);
+            result += ldirector::what(spirit::left(component), ctx);
             result += ", ";
-            result += rdirector::what(right(component), ctx);
+            result += rdirector::what(spirit::right(component), ctx);
             result += "]";
             return result;
         }
Modified: branches/release/boost/spirit/home/qi/operator/list.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/operator/list.hpp	(original)
+++ branches/release/boost/spirit/home/qi/operator/list.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -85,9 +85,9 @@
                 result_of::right<Component>::type::director
             rdirector;
 
-            result += ldirector::what(left(component), ctx);
+            result += ldirector::what(spirit::left(component), ctx);
             result += ", ";
-            result += rdirector::what(right(component), ctx);
+            result += rdirector::what(spirit::right(component), ctx);
             result += "]";
             return result;
         }
Modified: branches/release/boost/spirit/home/qi/string/tst.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/string/tst.hpp	(original)
+++ branches/release/boost/spirit/home/qi/string/tst.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -84,7 +84,7 @@
         template <typename F>
         void for_each(F f) const
         {
-            node::for_each(root, "", f);
+            node::for_each(root, std::basic_string<Char>(), f);
         }
 
     private:
Added: branches/release/boost/spirit/home/support.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/spirit/home/support.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2001-2007 Joel de Guzman
+
+    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_SEPTEMBER_26_2008_0340AM)
+#define BOOST_SPIRIT_SUPPORT_SEPTEMBER_26_2008_0340AM
+
+#include<boost/spirit/home/support/argument.hpp>
+#include<boost/spirit/home/support/as_variant.hpp>
+#include<boost/spirit/home/support/ascii.hpp>
+#include<boost/spirit/home/support/attribute_of.hpp>
+#include<boost/spirit/home/support/attribute_transform.hpp>
+#include<boost/spirit/home/support/char_class.hpp>
+#include<boost/spirit/home/support/component.hpp>
+#include<boost/spirit/home/support/iso8859_1.hpp>
+#include<boost/spirit/home/support/meta_grammar.hpp>
+#include<boost/spirit/home/support/modifier.hpp>
+#include<boost/spirit/home/support/multi_pass.hpp>
+#include<boost/spirit/home/support/placeholders.hpp>
+#include<boost/spirit/home/support/safe_bool.hpp>
+#include<boost/spirit/home/support/standard.hpp>
+#include<boost/spirit/home/support/standard_wide.hpp>
+#include<boost/spirit/home/support/unused.hpp>
+#endif
+
Added: branches/release/boost/spirit/home/support/auxiliary/confix.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/spirit/home/support/auxiliary/confix.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -0,0 +1,87 @@
+//  Copyright (c) 2001-2008 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_CONFIX_AUG_19_2008_1103AM)
+#define BOOST_SPIRIT_SUPPORT_CONFIX_AUG_19_2008_1103AM
+
+#include <boost/spirit/home/support/placeholders.hpp>
+
+///////////////////////////////////////////////////////////////////////////////
+namespace boost { namespace spirit { namespace tag
+{
+    // This is the tag returned by the confix() function
+    template <typename Prefix, typename Suffix>
+    struct confix
+    {
+        Prefix prefix;
+        Suffix suffix;
+    };
+
+}}}
+
+///////////////////////////////////////////////////////////////////////////////
+namespace boost { namespace spirit 
+{
+    ///////////////////////////////////////////////////////////////////////////
+    template <typename Prefix, typename Suffix = Prefix>
+    struct confix_spec
+      : proto::terminal<tag::confix<Prefix, Suffix> >::type
+    {
+    private:
+        typedef typename 
+            proto::terminal<tag::confix<Prefix, Suffix> >::type
+        base_type;
+
+        base_type make_tag(Prefix const& prefix, Suffix const& suffix) const
+        {
+            base_type xpr = {{prefix, suffix}};
+            return xpr;
+        }
+
+    public:
+        confix_spec(Prefix const& prefix, Suffix const& suffix)
+          : base_type(make_tag(prefix, suffix))
+        {}
+    };
+
+    namespace detail
+    {
+        struct confix_extractor
+        {
+            template <typename Prefix, typename Suffix>
+            static Prefix const& prefix(tag::confix<Prefix, Suffix> const& c) 
+            { return c.prefix; }
+
+            template <typename Prefix, typename Suffix>
+            static Suffix const& suffix(tag::confix<Prefix, Suffix> const& c) 
+            { return c.suffix; }
+        };
+    }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // construct a confix component
+    ///////////////////////////////////////////////////////////////////////////
+    inline confix_spec<char const*>
+    confix(char const* prefix, char const* suffix)
+    {
+        return confix_spec<char const*>(prefix, suffix);
+    }
+
+    inline confix_spec<wchar_t const*>
+    confix(wchar_t const* prefix, wchar_t const* suffix)
+    {
+        return confix_spec<wchar_t const*>(prefix, suffix);
+    }
+
+    template <typename Prefix, typename Suffix>
+    inline confix_spec<Prefix, Suffix>
+    confix(Prefix const& prefix, Suffix const& suffix)
+    {
+        return confix_spec<Prefix, Suffix>(prefix, suffix);
+    }
+
+}}
+
+#endif
Modified: branches/release/boost/spirit/home/support/char_class/iso8859_1.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/char_class/iso8859_1.hpp	(original)
+++ branches/release/boost/spirit/home/support/char_class/iso8859_1.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -491,69 +491,69 @@
         /*  ½  189  bd */   '\0',
         /*  ¾  190  be */   '\0',
         /*  ¿  191  bf */   '\0',
-        /*  à  192  c0 */   0xc0,
-        /*  á  193  c1 */   0xc1,
-        /*  â  194  c2 */   0xc2,
-        /*  ã  195  c3 */   0xc3,
-        /*  ä  196  c4 */   0xc4,
-        /*  å  197  c5 */   0xc5,
-        /*  æ  198  c6 */   0xc6,
-        /*  ç  199  c7 */   0xc7,
-        /*  è  200  c8 */   0xc8,
-        /*  é  201  c9 */   0xc9,
-        /*  ê  202  ca */   0xca,
-        /*  ë  203  cb */   0xcb,
-        /*  ì  204  cc */   0xcc,
-        /*  í  205  cd */   0xcd,
-        /*  î  206  ce */   0xce,
-        /*  ï  207  cf */   0xcf,
-        /*  ð  208  d0 */   0xd0,
-        /*  ñ  209  d1 */   0xd1,
-        /*  ò  210  d2 */   0xd2,
-        /*  ó  211  d3 */   0xd3,
-        /*  ô  212  d4 */   0xd4,
-        /*  õ  213  d5 */   0xd5,
-        /*  ö  214  d6 */   0xd6,
+        /*  à  192  c0 */   0xe0,
+        /*  á  193  c1 */   0xe1,
+        /*  â  194  c2 */   0xe2,
+        /*  ã  195  c3 */   0xe3,
+        /*  ä  196  c4 */   0xe4,
+        /*  å  197  c5 */   0xe5,
+        /*  æ  198  c6 */   0xe6,
+        /*  ç  199  c7 */   0xe7,
+        /*  è  200  c8 */   0xe8,
+        /*  é  201  c9 */   0xe9,
+        /*  ê  202  ca */   0xea,
+        /*  ë  203  cb */   0xeb,
+        /*  ì  204  cc */   0xec,
+        /*  í  205  cd */   0xed,
+        /*  î  206  ce */   0xee,
+        /*  ï  207  cf */   0xef,
+        /*  ð  208  d0 */   0xf0,
+        /*  ñ  209  d1 */   0xf1,
+        /*  ò  210  d2 */   0xf2,
+        /*  ó  211  d3 */   0xf3,
+        /*  ô  212  d4 */   0xf4,
+        /*  õ  213  d5 */   0xf5,
+        /*  ö  214  d6 */   0xf6,
         /*  ×  215  d7 */   '\0',
-        /*  ø  216  d8 */   0xd8,
-        /*  ù  217  d9 */   0xd9,
-        /*  ú  218  da */   0xda,
-        /*  û  219  db */   0xdb,
-        /*  ü  220  dc */   0xdc,
-        /*  ý  221  dd */   0xdd,
-        /*  þ  222  de */   0xde,
+        /*  ø  216  d8 */   0xf8,
+        /*  ù  217  d9 */   0xf9,
+        /*  ú  218  da */   0xfa,
+        /*  û  219  db */   0xfb,
+        /*  ü  220  dc */   0xfc,
+        /*  ý  221  dd */   0xfd,
+        /*  þ  222  de */   0xfe,
         /*  ß  223  df */   '\0',
-        /*  À  224  e0 */   0xe0,
-        /*  Á  225  e1 */   0xe1,
-        /*  Â  226  e2 */   0xe2,
-        /*  Ã  227  e3 */   0xe3,
-        /*  Ä  228  e4 */   0xe4,
-        /*  Å  229  e5 */   0xe5,
-        /*  Æ  230  e6 */   0xe6,
-        /*  Ç  231  e7 */   0xe7,
-        /*  È  232  e8 */   0xe8,
-        /*  É  233  e9 */   0xe9,
-        /*  Ê  234  ea */   0xea,
-        /*  Ë  235  eb */   0xeb,
-        /*  Ì  236  ec */   0xec,
-        /*  Í  237  ed */   0xed,
-        /*  Î  238  ee */   0xee,
-        /*  Ï  239  ef */   0xef,
-        /*  Ð  240  f0 */   0xf0,
-        /*  Ñ  241  f1 */   0xf1,
-        /*  Ò  242  f2 */   0xf2,
-        /*  Ó  243  f3 */   0xf3,
-        /*  Ô  244  f4 */   0xf4,
-        /*  Õ  245  f5 */   0xf5,
-        /*  Ö  246  f6 */   0xf6,
+        /*  À  224  e0 */   0xc0,
+        /*  Á  225  e1 */   0xc1,
+        /*  Â  226  e2 */   0xc2,
+        /*  Ã  227  e3 */   0xc3,
+        /*  Ä  228  e4 */   0xc4,
+        /*  Å  229  e5 */   0xc5,
+        /*  Æ  230  e6 */   0xc6,
+        /*  Ç  231  e7 */   0xc7,
+        /*  È  232  e8 */   0xc8,
+        /*  É  233  e9 */   0xc9,
+        /*  Ê  234  ea */   0xca,
+        /*  Ë  235  eb */   0xcb,
+        /*  Ì  236  ec */   0xcc,
+        /*  Í  237  ed */   0xcd,
+        /*  Î  238  ee */   0xce,
+        /*  Ï  239  ef */   0xcf,
+        /*  Ð  240  f0 */   0xd0,
+        /*  Ñ  241  f1 */   0xd1,
+        /*  Ò  242  f2 */   0xd2,
+        /*  Ó  243  f3 */   0xd3,
+        /*  Ô  244  f4 */   0xd4,
+        /*  Õ  245  f5 */   0xd5,
+        /*  Ö  246  f6 */   0xd6,
         /*  ÷  247  f7 */   '\0',
-        /*  Ø  248  f8 */   0xf8,
-        /*  Ù  249  f9 */   0xf9,
-        /*  Ú  250  fa */   0xfa,
-        /*  Û  251  fb */   0xfb,
-        /*  Ü  252  fc */   0xfc,
-        /*  Ý  253  fd */   0xfd,
-        /*  Þ  254  fe */   0xfe,
+        /*  Ø  248  f8 */   0xd8,
+        /*  Ù  249  f9 */   0xd9,
+        /*  Ú  250  fa */   0xda,
+        /*  Û  251  fb */   0xdb,
+        /*  Ü  252  fc */   0xdc,
+        /*  Ý  253  fd */   0xdd,
+        /*  Þ  254  fe */   0xde,
         /*  ÿ  255  ff */   '\0',
     };
 
Modified: branches/release/boost/spirit/home/support/detail/what_function.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/detail/what_function.hpp	(original)
+++ branches/release/boost/spirit/home/support/detail/what_function.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -15,7 +15,7 @@
     struct what_function
     {
         what_function(std::string& str, Context const& ctx)
-          : str(str), first(true), ctx(ctx)
+          : str(str), ctx(ctx), first(true)
         {
         }
 
Modified: branches/release/boost/spirit/home/support/placeholders.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/placeholders.hpp	(original)
+++ branches/release/boost/spirit/home/support/placeholders.hpp	2008-10-10 10:38:57 EDT (Fri, 10 Oct 2008)
@@ -30,7 +30,7 @@
         struct bin {};
         struct oct {};
         struct hex {};
-        
+
         struct byte {};
         struct word {};
         struct dword {};
@@ -44,7 +44,7 @@
         struct little_qword {};
 #endif
         struct pad {};
-        
+
         struct ushort {};
         struct ulong {};
         struct uint {};
@@ -72,10 +72,10 @@
         struct lazy {};
         struct omit {};
         struct raw {};
-        
+
         struct stream {};
         struct wstream {};
-        
+
         struct token {};
     }