Boost logo

Boost-Commit :

From: joel_at_[hidden]
Date: 2008-07-13 02:10:53


Author: djowel
Date: 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
New Revision: 47380
URL: http://svn.boost.org/trac/boost/changeset/47380

Log:
added context to the what function
Text files modified:
   trunk/boost/spirit/home/karma/action/action.hpp | 6
   trunk/boost/spirit/home/karma/auxiliary/eol.hpp | 4
   trunk/boost/spirit/home/karma/auxiliary/eps.hpp | 28 ++++----
   trunk/boost/spirit/home/karma/auxiliary/functor_director.hpp | 4
   trunk/boost/spirit/home/karma/auxiliary/lazy.hpp | 4
   trunk/boost/spirit/home/karma/auxiliary/none.hpp | 4
   trunk/boost/spirit/home/karma/binary/binary.hpp | 8 +-
   trunk/boost/spirit/home/karma/binary/padding.hpp | 4
   trunk/boost/spirit/home/karma/char/char.hpp | 138 ++++++++++++++++++++--------------------
   trunk/boost/spirit/home/karma/char/space.hpp | 52 +++++++-------
   trunk/boost/spirit/home/karma/directive/center_alignment.hpp | 116 ++++++++++++++++----------------
   trunk/boost/spirit/home/karma/directive/delimit.hpp | 60 ++++++++--------
   trunk/boost/spirit/home/karma/directive/left_alignment.hpp | 116 ++++++++++++++++----------------
   trunk/boost/spirit/home/karma/directive/right_alignment.hpp | 116 ++++++++++++++++----------------
   trunk/boost/spirit/home/karma/directive/verbatim.hpp | 6
   trunk/boost/spirit/home/karma/nonterminal/nonterminal_director.hpp | 4
   trunk/boost/spirit/home/karma/numeric/int.hpp | 74 ++++++++++----------
   trunk/boost/spirit/home/karma/numeric/real.hpp | 80 +++++++++++-----------
   trunk/boost/spirit/home/karma/numeric/uint.hpp | 62 ++++++++--------
   trunk/boost/spirit/home/karma/operator/alternative.hpp | 6
   trunk/boost/spirit/home/karma/operator/karma-alt/alternative.hpp | 6
   trunk/boost/spirit/home/karma/operator/kleene.hpp | 6
   trunk/boost/spirit/home/karma/operator/list.hpp | 8 +-
   trunk/boost/spirit/home/karma/operator/optional.hpp | 6
   trunk/boost/spirit/home/karma/operator/plus.hpp | 6
   trunk/boost/spirit/home/karma/operator/sequence.hpp | 6
   trunk/boost/spirit/home/karma/stream/stream.hpp | 114 ++++++++++++++++----------------
   trunk/boost/spirit/home/karma/string/lit.hpp | 114 ++++++++++++++++----------------
   trunk/boost/spirit/home/karma/what.hpp | 2
   trunk/boost/spirit/home/lex/lexer/terminal_director.hpp | 4
   trunk/boost/spirit/home/lex/qi/state/state_switcher.hpp | 10 +-
   trunk/boost/spirit/home/lex/qi/utility/plain_token.hpp | 4
   trunk/boost/spirit/home/qi/action/action.hpp | 6
   trunk/boost/spirit/home/qi/auxiliary/eps.hpp | 8 +-
   trunk/boost/spirit/home/qi/auxiliary/functor_director.hpp | 4
   trunk/boost/spirit/home/qi/auxiliary/lazy.hpp | 6
   trunk/boost/spirit/home/qi/auxiliary/none.hpp | 4
   trunk/boost/spirit/home/qi/auxiliary/primitives.hpp | 34 ++++----
   trunk/boost/spirit/home/qi/binary/binary.hpp | 8 +-
   trunk/boost/spirit/home/qi/char/char.hpp | 37 +++++----
   trunk/boost/spirit/home/qi/char/char_class.hpp | 4
   trunk/boost/spirit/home/qi/char/char_parser.hpp | 6
   trunk/boost/spirit/home/qi/detail/expect_function.hpp | 4
   trunk/boost/spirit/home/qi/directive/lexeme.hpp | 6
   trunk/boost/spirit/home/qi/directive/omit.hpp | 6
   trunk/boost/spirit/home/qi/directive/raw.hpp | 6
   trunk/boost/spirit/home/qi/nonterminal/nonterminal_director.hpp | 4
   trunk/boost/spirit/home/qi/numeric/int.hpp | 4
   trunk/boost/spirit/home/qi/numeric/real.hpp | 4
   trunk/boost/spirit/home/qi/numeric/uint.hpp | 4
   trunk/boost/spirit/home/qi/operator/alternative.hpp | 6
   trunk/boost/spirit/home/qi/operator/and_predicate.hpp | 6
   trunk/boost/spirit/home/qi/operator/difference.hpp | 8 +-
   trunk/boost/spirit/home/qi/operator/kleene.hpp | 6
   trunk/boost/spirit/home/qi/operator/list.hpp | 8 +-
   trunk/boost/spirit/home/qi/operator/not_predicate.hpp | 6
   trunk/boost/spirit/home/qi/operator/optional.hpp | 6
   trunk/boost/spirit/home/qi/operator/permutation.hpp | 6
   trunk/boost/spirit/home/qi/operator/plus.hpp | 6
   trunk/boost/spirit/home/qi/operator/sequence_base.hpp | 6
   trunk/boost/spirit/home/qi/operator/sequential_or.hpp | 6
   trunk/boost/spirit/home/qi/stream/stream.hpp | 4
   trunk/boost/spirit/home/qi/string/lit.hpp | 18 +++--
   trunk/boost/spirit/home/qi/string/symbols.hpp | 4
   trunk/boost/spirit/home/qi/what.hpp | 2
   trunk/boost/spirit/home/support/detail/what_function.hpp | 8 +
   66 files changed, 724 insertions(+), 715 deletions(-)

Modified: trunk/boost/spirit/home/karma/action/action.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/action/action.hpp (original)
+++ trunk/boost/spirit/home/karma/action/action.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -74,13 +74,13 @@
                 director::generate(spirit::left(component), sink, ctx, d, p);
         }
 
- 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)
         {
             typedef typename
                 spirit::result_of::left<Component>::type::director
             director;
- return director::what(spirit::left(component));
+ return director::what(spirit::left(component), ctx);
         }
     };
 

Modified: trunk/boost/spirit/home/karma/auxiliary/eol.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/auxiliary/eol.hpp (original)
+++ trunk/boost/spirit/home/karma/auxiliary/eol.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -32,8 +32,8 @@
             return true;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "eol";
         }

Modified: trunk/boost/spirit/home/karma/auxiliary/eps.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/auxiliary/eps.hpp (original)
+++ trunk/boost/spirit/home/karma/auxiliary/eps.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2008 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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_EPS_APRIL_21_2007_0246PM)
@@ -21,18 +21,18 @@
             typedef unused_type type;
         };
 
- template <typename Component, typename OutputIterator,
+ 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*/)
+ static bool
+ generate(Component const& /*component*/, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& /*param*/)
         {
             karma::delimit(sink, d);
             return true;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "eps";
         }
@@ -46,18 +46,18 @@
             typedef unused_type type;
         };
 
- template <typename Component, typename OutputIterator,
+ 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*/)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& /*param*/)
         {
             karma::delimit(sink, d);
             return fusion::at_c<0>(component.elements)(unused, ctx);
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "semantic-predicate";
         }

Modified: trunk/boost/spirit/home/karma/auxiliary/functor_director.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/auxiliary/functor_director.hpp (original)
+++ trunk/boost/spirit/home/karma/auxiliary/functor_director.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -41,8 +41,8 @@
             return result;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "functor";
         }

Modified: trunk/boost/spirit/home/karma/auxiliary/lazy.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/auxiliary/lazy.hpp (original)
+++ trunk/boost/spirit/home/karma/auxiliary/lazy.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -74,8 +74,8 @@
                 generate(subject, sink, ctx, d, param);
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             std::string result = "lazy[";
             // FIXME: need to get at the what of the embedded component

Modified: trunk/boost/spirit/home/karma/auxiliary/none.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/auxiliary/none.hpp (original)
+++ trunk/boost/spirit/home/karma/auxiliary/none.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -30,8 +30,8 @@
             return false;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "none";
         }

Modified: trunk/boost/spirit/home/karma/binary/binary.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/binary/binary.hpp (original)
+++ trunk/boost/spirit/home/karma/binary/binary.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -136,8 +136,8 @@
             return false;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return karma::detail::what<endian>::is();
         }
@@ -173,8 +173,8 @@
             return true;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return karma::detail::what<endian>::is();
         }

Modified: trunk/boost/spirit/home/karma/binary/padding.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/binary/padding.hpp (original)
+++ trunk/boost/spirit/home/karma/binary/padding.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -44,8 +44,8 @@
             return result;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return std::string("pad(") +
                 boost::lexical_cast<std::string>(

Modified: trunk/boost/spirit/home/karma/char/char.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/char/char.hpp (original)
+++ trunk/boost/spirit/home/karma/char/char.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2008 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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_CHAR_FEB_21_2007_0543PM)
@@ -24,13 +24,13 @@
 #include <boost/fusion/include/cons.hpp>
 #include <boost/utility/enable_if.hpp>
 
-namespace boost { namespace spirit { namespace karma
-{
+namespace boost { namespace spirit { namespace karma
+{
     ///////////////////////////////////////////////////////////////////////////
     //
- // any_char
+ // any_char
     // generates a single character from the associated parameter
- //
+ //
     // Note: this generator has to have an associated parameter
     //
     ///////////////////////////////////////////////////////////////////////////
@@ -44,31 +44,31 @@
         };
 
         // any_char has a parameter attached
- template <typename Component, typename OutputIterator,
+ template <typename Component, typename OutputIterator,
             typename Context, typename Delimiter, typename Parameter>
- static bool
- generate(Component const&, OutputIterator& sink,
- Context& /*ctx*/, Delimiter const& d, Parameter const& param)
+ static bool
+ generate(Component const&, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& param)
         {
             detail::generate_to(sink, param);
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return true;
         }
 
- // this any_char has no parameter attached, it needs to have been
+ // this any_char has no parameter attached, it needs to have been
         // initialized from a direct literal
- template <typename Component, typename OutputIterator,
+ template <typename Component, typename OutputIterator,
             typename Context, typename Delimiter>
- static bool
- generate(Component const&, OutputIterator&, Context&, Delimiter const&,
- unused_type)
+ static bool
+ generate(Component const&, OutputIterator&, Context&, Delimiter const&,
+ unused_type)
         {
             BOOST_MPL_ASSERT_MSG(false, char__not_usable_without_parameter, ());
             return false;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "any-char";
         }
@@ -76,13 +76,13 @@
 
     ///////////////////////////////////////////////////////////////////////////
     //
- // literal_char
+ // literal_char
     // generates a single character given by a literal it was initialized
     // from
     //
     ///////////////////////////////////////////////////////////////////////////
     template <typename Char>
- struct literal_char
+ struct literal_char
     {
         template <typename Component, typename Context, typename Unused>
         struct attribute
@@ -91,19 +91,19 @@
         };
 
         // any_char has a parameter attached
- template <typename Component, typename OutputIterator,
+ 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*/)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& /*param*/)
         {
             detail::generate_to(sink, fusion::at_c<0>(component.elements));
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return true;
         }
 
- 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)
         {
             return std::string("'")
                 + spirit::detail::to_narrow_char(
@@ -114,12 +114,12 @@
 
     ///////////////////////////////////////////////////////////////////////////
     //
- // lazy_char
- // generates a single character given by a functor it was initialized
+ // lazy_char
+ // generates a single character given by a functor it was initialized
     // from
     //
     ///////////////////////////////////////////////////////////////////////////
- struct lazy_char
+ struct lazy_char
     {
         template <typename Component, typename Context, typename Unused>
         struct attribute
@@ -128,20 +128,20 @@
         };
 
         // any_char has a parameter attached
- template <typename Component, typename OutputIterator,
+ 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*/)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& /*param*/)
         {
- detail::generate_to(sink,
+ detail::generate_to(sink,
                 fusion::at_c<0>(component.elements)(unused, ctx));
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return true;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "char";
         }
@@ -154,7 +154,7 @@
     //
     ///////////////////////////////////////////////////////////////////////////
     template <typename Char, typename Tag>
- struct case_any_char
+ struct case_any_char
     {
         template <typename Component, typename Context, typename Unused>
         struct attribute
@@ -166,42 +166,42 @@
         typedef typename Tag::char_class char_class_;
 
         // case_any_char has a parameter attached
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& /*component*/, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& param)
         {
             using spirit::char_class::convert;
             Char p = convert<char_set>::to(char_class_(), param);
             detail::generate_to(sink, p);
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return true;
         }
 
- // this case_any_char has no parameter attached, it needs to have been
+ // this case_any_char has no parameter attached, it needs to have been
         // initialized from a direct literal
- template <typename Component, typename OutputIterator,
+ template <typename Component, typename OutputIterator,
             typename Context, typename Delimiter>
- static bool
- generate(Component const&, OutputIterator&, Context&, Delimiter const&,
- unused_type)
+ static bool
+ generate(Component const&, OutputIterator&, Context&, Delimiter const&,
+ unused_type)
         {
             BOOST_MPL_ASSERT_MSG(false, char__not_usable_without_parameter, ());
             return false;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             std::string result;
- result = std::string("any-") +
- spirit::char_class::what<char_set>::is(char_class_()) +
+ result = std::string("any-") +
+ spirit::char_class::what<char_set>::is(char_class_()) +
                 "case-char";
             return result;
         }
     };
-
+
 }}} // namespace boost::spirit::karma
 
 namespace boost { namespace spirit { namespace traits
@@ -218,20 +218,20 @@
>::type
>
     {
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 0>::type
         char_type;
         typedef fusion::vector<char_type> vector_type;
 
         typedef component<
- karma::domain, karma::literal_char<Char>, vector_type>
+ karma::domain, karma::literal_char<Char>, vector_type>
         type;
-
+
         static type
         call(Elements const& elements)
         {
             typedef typename Modifier::char_set char_set;
-
+
             char_type ch = fusion::at_c<0>(elements);
             vector_type v(char_set::tolower(ch));
             return type(v);
@@ -247,20 +247,20 @@
>::type
>
     {
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 0>::type
         char_type;
         typedef fusion::vector<char_type> vector_type;
 
- typedef
- component<karma::domain, karma::literal_char<Char>, vector_type>
+ typedef
+ component<karma::domain, karma::literal_char<Char>, vector_type>
         type;
-
+
         static type
         call(Elements const& elements)
         {
             typedef typename Modifier::char_set char_set;
-
+
             char_type ch = fusion::at_c<0>(elements);
             vector_type v(char_set::toupper(ch));
             return type(v);
@@ -282,11 +282,11 @@
         typedef typename Modifier::char_set char_set;
         typedef spirit::char_class::tag::lower char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
-
+
         typedef component<
- karma::domain, karma::case_any_char<Char, key_tag>, fusion::nil>
+ karma::domain, karma::case_any_char<Char, key_tag>, fusion::nil>
         type;
-
+
         static type
         call(Elements const&)
         {
@@ -306,11 +306,11 @@
         typedef typename Modifier::char_set char_set;
         typedef spirit::char_class::tag::upper char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
-
+
         typedef component<
- karma::domain, karma::case_any_char<Char, key_tag>, fusion::nil>
+ karma::domain, karma::case_any_char<Char, key_tag>, fusion::nil>
         type;
-
+
         static type
         call(Elements const&)
         {

Modified: trunk/boost/spirit/home/karma/char/space.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/char/space.hpp (original)
+++ trunk/boost/spirit/home/karma/char/space.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2008 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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_SPACE_MAR_06_2007_0934PM)
@@ -20,13 +20,13 @@
 #include <boost/spirit/home/support/standard.hpp>
 #include <boost/spirit/home/support/standard_wide.hpp>
 
-namespace boost { namespace spirit { namespace karma
-{
+namespace boost { namespace spirit { namespace karma
+{
     ///////////////////////////////////////////////////////////////////////////
     //
- // space
+ // space
     // generates a single character from the associated parameter
- //
+ //
     ///////////////////////////////////////////////////////////////////////////
     template <typename Tag, typename Char>
     struct any_space_char
@@ -41,33 +41,33 @@
         typedef typename Tag::char_class char_class_;
 
         // space has a parameter attached
- template <typename Component, typename OutputIterator,
+ 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& ch)
+ static bool
+ generate(Component const& /*component*/, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& ch)
         {
             using spirit::char_class::classify;
             BOOST_ASSERT(classify<char_set>::is(char_class_(), ch));
             detail::generate_to(sink, ch);
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return true;
         }
 
         // this space has no parameter attached, just generate a single ' '
- template <typename Component, typename OutputIterator,
+ template <typename Component, typename OutputIterator,
             typename Context, typename Delimiter>
- static bool
- generate(Component const&, OutputIterator& sink, Context&,
- Delimiter const& d, unused_type)
+ static bool
+ generate(Component const&, OutputIterator& sink, Context&,
+ Delimiter const& d, unused_type)
         {
             detail::generate_to(sink, ' '); // generate a single space
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return true;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "any-space";
         }
@@ -76,7 +76,7 @@
     ///////////////////////////////////////////////////////////////////////////
     //
     // space(...)
- // generates a single space character given by a literal it was
+ // generates a single space character given by a literal it was
     // initialized from
     //
     ///////////////////////////////////////////////////////////////////////////
@@ -90,19 +90,19 @@
         };
 
         // any_char has a parameter attached
- template <typename Component, typename OutputIterator,
+ 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*/)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& /*param*/)
         {
             detail::generate_to(sink, fusion::at_c<0>(component.elements));
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return true;
         }
 
- 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)
         {
             return std::string("space('")
                 + spirit::detail::to_narrow_char(

Modified: trunk/boost/spirit/home/karma/directive/center_alignment.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/directive/center_alignment.hpp (original)
+++ trunk/boost/spirit/home/karma/directive/center_alignment.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2008 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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_CENTER_ALIGNMENT_FEB_27_2007_1216PM)
@@ -18,7 +18,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 //
-// The BOOST_KARMA_DEFAULT_FIELD_LENGTH specifies the default field length
+// The BOOST_KARMA_DEFAULT_FIELD_LENGTH specifies the default field length
 // to be used for padding.
 //
 ///////////////////////////////////////////////////////////////////////////////
@@ -26,10 +26,10 @@
 #define BOOST_KARMA_DEFAULT_FIELD_LENGTH 10
 #endif
 
-namespace boost { namespace spirit { namespace karma
+namespace boost { namespace spirit { namespace karma
 {
     ///////////////////////////////////////////////////////////////////////////
- // The simple center alignment directive is used for center[...]
+ // The simple center alignment directive is used for center[...]
     // generators. It uses default values for the generated width (defined via
     // the BOOST_KARMA_DEFAULT_FIELD_LENGTH constant) and for the padding
     // generator (always spaces).
@@ -40,25 +40,25 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::argument1<Component>::type,
+ typename result_of::argument1<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::center_generate(sink, ctx, d, param,
- argument1(component), BOOST_KARMA_DEFAULT_FIELD_LENGTH,
+ return detail::center_generate(sink, ctx, d, param,
+ argument1(component), BOOST_KARMA_DEFAULT_FIELD_LENGTH,
                 spirit::as_component(karma::domain(), ' '));
         }
 
- 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 = "center[";
 
@@ -66,12 +66,12 @@
                 spirit::result_of::argument1<Component>::type::director
             director;
 
- result += director::what(spirit::argument1(component));
+ result += director::what(spirit::argument1(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
     // The center alignment with width directive, is used for generators
     // like center(width)[...]. It uses a default value for the padding
@@ -83,27 +83,27 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::subject<Component>::type,
+ typename result_of::subject<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::center_generate(sink, ctx, d, param,
+ return detail::center_generate(sink, ctx, d, param,
                 subject(component), proto::arg_c<0>(argument1(component)), ' ');
         }
 
- 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 = "center(";
-
+
             result += boost::lexical_cast<std::string>(
                 proto::arg_c<0>(argument1(component)));
             result += ")[";
@@ -112,16 +112,16 @@
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
     // The center alignment directive with padding, is used for generators like
- // center(padding)[...], where padding is a arbitrary generator
- // expression. It uses a default value for the generated width (defined
+ // center(padding)[...], where padding is a arbitrary generator
+ // expression. It uses a default value for the generated width (defined
     // via the BOOST_KARMA_DEFAULT_FIELD_LENGTH constant).
     ///////////////////////////////////////////////////////////////////////////
     struct padding_center_aligment
@@ -130,49 +130,49 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::subject<Component>::type,
+ typename result_of::subject<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::center_generate(sink, ctx, d, param,
- subject(component), BOOST_KARMA_DEFAULT_FIELD_LENGTH,
+ return detail::center_generate(sink, ctx, d, param,
+ subject(component), BOOST_KARMA_DEFAULT_FIELD_LENGTH,
                 argument1(component));
         }
 
- 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 = "center(";
-
+
             typedef typename
                 spirit::result_of::argument1<Component>::type::director
             padding;
 
- result += padding::what(spirit::argument1(component));
+ result += padding::what(spirit::argument1(component), ctx);
             result += ")[";
 
             typedef typename
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
- // The full center alignment directive, is used for generators like
- // center(width, padding)[...], where width is a integer value to be
- // used as the field width and padding is a arbitrary generator
+ // The full center alignment directive, is used for generators like
+ // center(width, padding)[...], where width is a integer value to be
+ // used as the field width and padding is a arbitrary generator
     // expression.
     ///////////////////////////////////////////////////////////////////////////
     struct full_center_aligment
@@ -181,28 +181,28 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::subject<Component>::type,
+ typename result_of::subject<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::center_generate(sink, ctx, d, param,
- subject(component), proto::arg_c<0>(argument1(component)),
+ return detail::center_generate(sink, ctx, d, param,
+ subject(component), proto::arg_c<0>(argument1(component)),
                 argument2(component));
         }
 
- 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 = "center(";
-
+
             result += boost::lexical_cast<std::string>(
                 proto::arg_c<0>(argument1(component)));
             result += ", ";
@@ -211,19 +211,19 @@
                 spirit::result_of::argument2<Component>::type::director
             padding;
 
- result += padding::what(spirit::argument2(component));
+ result += padding::what(spirit::argument2(component), ctx);
             result += ")[";
 
             typedef typename
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
 }}} // namespace boost::spirit::karma
 
 #endif

Modified: trunk/boost/spirit/home/karma/directive/delimit.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/directive/delimit.hpp (original)
+++ trunk/boost/spirit/home/karma/directive/delimit.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2008 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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_DELIMIT_MAR_02_2007_0217PM)
@@ -27,31 +27,31 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::right<Component>::type,
+ typename result_of::right<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& /*d*/, Parameter const& param)
         {
- // the delimit_space generator simply dispatches to the embedded
+ // the delimit_space generator simply dispatches to the embedded
             // generator while supplying a single space as the new delimiter
             // to use
- typedef typename
+ typedef typename
                 result_of::right<Component>::type::director
             director;
-
- return director::generate(spirit::right(component),
+
+ return director::generate(spirit::right(component),
                 sink, ctx, spirit::as_component(karma::domain(), ' '), param);
         }
 
- 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 = "delimit[";
 
@@ -59,7 +59,7 @@
                 spirit::result_of::right<Component>::type::director
             director;
 
- result += director::what(spirit::right(component));
+ result += director::what(spirit::right(component), ctx);
             result += "]";
             return result;
         }
@@ -74,48 +74,48 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::subject<Component>::type,
+ typename result_of::subject<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& /*d*/, Parameter const& param)
         {
- // the delimit generator simply dispatches to the embedded
+ // the delimit generator simply dispatches to the embedded
             // generator while supplying it's argument as the new delimiter
             // to use
- typedef typename
+ typedef typename
                 spirit::result_of::subject<Component>::type::director
             director;
-
- return director::generate(spirit::subject(component), sink, ctx,
+
+ return director::generate(spirit::subject(component), sink, ctx,
                 spirit::as_component(
- karma::domain(), spirit::argument1(component)),
+ karma::domain(), spirit::argument1(component)),
                 param);
         }
 
- 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 = "delimit(";
-
+
             typedef typename
                 spirit::result_of::argument1<Component>::type::director
             delimiter;
-
- result += delimiter::what(spirit::argument1(component));
+
+ result += delimiter::what(spirit::argument1(component), ctx);
             result +=")[";
 
             typedef typename
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/karma/directive/left_alignment.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/directive/left_alignment.hpp (original)
+++ trunk/boost/spirit/home/karma/directive/left_alignment.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2008 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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_LEFT_ALIGNMENT_FEB_27_2007_1216PM)
@@ -18,7 +18,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 //
-// The BOOST_KARMA_DEFAULT_FIELD_LENGTH specifies the default field length
+// The BOOST_KARMA_DEFAULT_FIELD_LENGTH specifies the default field length
 // to be used for padding.
 //
 ///////////////////////////////////////////////////////////////////////////////
@@ -26,10 +26,10 @@
 #define BOOST_KARMA_DEFAULT_FIELD_LENGTH 10
 #endif
 
-namespace boost { namespace spirit { namespace karma
+namespace boost { namespace spirit { namespace karma
 {
     ///////////////////////////////////////////////////////////////////////////
- // The simple left alignment directive is used for left_align[...]
+ // The simple left alignment directive is used for left_align[...]
     // generators. It uses default values for the generated width (defined via
     // the BOOST_KARMA_DEFAULT_FIELD_LENGTH constant) and for the padding
     // generator (always spaces).
@@ -37,27 +37,27 @@
     struct simple_left_aligment
     {
         template <typename Component, typename Context, typename Unused>
- struct attribute
+ struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::argument1<Component>::type,
+ typename result_of::argument1<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::left_align_generate(sink, ctx, d, param,
+ return detail::left_align_generate(sink, ctx, d, param,
                 argument1(component), BOOST_KARMA_DEFAULT_FIELD_LENGTH, ' ');
         }
 
- 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 = "left_align[";
 
@@ -65,12 +65,12 @@
                 spirit::result_of::argument1<Component>::type::director
             director;
 
- result += director::what(spirit::argument1(component));
+ result += director::what(spirit::argument1(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
     // The left alignment with width directive, is used for generators
     // like left_align(width)[...]. It uses a default value for the padding
@@ -82,27 +82,27 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::subject<Component>::type,
+ typename result_of::subject<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::left_align_generate(sink, ctx, d, param,
+ return detail::left_align_generate(sink, ctx, d, param,
                 subject(component), proto::arg_c<0>(argument1(component)), ' ');
         }
 
- 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 = "left_align(";
-
+
             result += boost::lexical_cast<std::string>(
                 proto::arg_c<0>(argument1(component)));
             result += ")[";
@@ -111,16 +111,16 @@
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
     // The left alignment directive with padding, is used for generators like
- // left_align(padding)[...], where padding is a arbitrary generator
- // expression. It uses a default value for the generated width (defined
+ // left_align(padding)[...], where padding is a arbitrary generator
+ // expression. It uses a default value for the generated width (defined
     // via the BOOST_KARMA_DEFAULT_FIELD_LENGTH constant).
     ///////////////////////////////////////////////////////////////////////////
     struct padding_left_aligment
@@ -129,49 +129,49 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::subject<Component>::type,
+ typename result_of::subject<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::left_align_generate(sink, ctx, d, param,
- subject(component), BOOST_KARMA_DEFAULT_FIELD_LENGTH,
+ return detail::left_align_generate(sink, ctx, d, param,
+ subject(component), BOOST_KARMA_DEFAULT_FIELD_LENGTH,
                 argument1(component));
         }
 
- 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 = "left_align(";
-
+
             typedef typename
                 spirit::result_of::argument1<Component>::type::director
             padding;
 
- result += padding::what(spirit::argument1(component));
+ result += padding::what(spirit::argument1(component), ctx);
             result += ")[";
 
             typedef typename
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
- // The full left alignment directive, is used for generators like
- // left_align(width, padding)[...], where width is a integer value to be
- // used as the field width and padding is a arbitrary generator
+ // The full left alignment directive, is used for generators like
+ // left_align(width, padding)[...], where width is a integer value to be
+ // used as the field width and padding is a arbitrary generator
     // expression.
     ///////////////////////////////////////////////////////////////////////////
     struct full_left_aligment
@@ -180,28 +180,28 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::subject<Component>::type,
+ typename result_of::subject<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::left_align_generate(sink, ctx, d, param,
- subject(component), proto::arg_c<0>(argument1(component)),
+ return detail::left_align_generate(sink, ctx, d, param,
+ subject(component), proto::arg_c<0>(argument1(component)),
                 argument2(component));
         }
 
- 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 = "left_align(";
-
+
             result += boost::lexical_cast<std::string>(
                 proto::arg_c<0>(argument1(component)));
             result += ", ";
@@ -210,19 +210,19 @@
                 spirit::result_of::argument2<Component>::type::director
             padding;
 
- result += padding::what(spirit::argument2(component));
+ result += padding::what(spirit::argument2(component), ctx);
             result += ")[";
 
             typedef typename
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
 }}} // namespace boost::spirit::karma
 
 #endif

Modified: trunk/boost/spirit/home/karma/directive/right_alignment.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/directive/right_alignment.hpp (original)
+++ trunk/boost/spirit/home/karma/directive/right_alignment.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2008 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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_RIGHT_ALIGNMENT_FEB_27_2007_1216PM)
@@ -18,7 +18,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 //
-// The BOOST_KARMA_DEFAULT_FIELD_LENGTH specifies the default field length
+// The BOOST_KARMA_DEFAULT_FIELD_LENGTH specifies the default field length
 // to be used for padding.
 //
 ///////////////////////////////////////////////////////////////////////////////
@@ -26,10 +26,10 @@
 #define BOOST_KARMA_DEFAULT_FIELD_LENGTH 10
 #endif
 
-namespace boost { namespace spirit { namespace karma
+namespace boost { namespace spirit { namespace karma
 {
     ///////////////////////////////////////////////////////////////////////////
- // The simple right alignment directive is used for right_align[...]
+ // The simple right alignment directive is used for right_align[...]
     // generators. It uses default values for the generated width (defined via
     // the BOOST_KARMA_DEFAULT_FIELD_LENGTH constant) and for the padding
     // generator (always spaces).
@@ -40,25 +40,25 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::argument1<Component>::type,
+ typename result_of::argument1<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::right_align_generate(sink, ctx, d, param,
- argument1(component), BOOST_KARMA_DEFAULT_FIELD_LENGTH,
+ return detail::right_align_generate(sink, ctx, d, param,
+ argument1(component), BOOST_KARMA_DEFAULT_FIELD_LENGTH,
                 spirit::as_component(karma::domain(), ' '));
         }
 
- 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 = "right_align[";
 
@@ -66,12 +66,12 @@
                 spirit::result_of::argument1<Component>::type::director
             director;
 
- result += director::what(spirit::argument1(component));
+ result += director::what(spirit::argument1(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
     // The right alignment with width directive, is used for generators
     // like right_align(width)[...]. It uses a default value for the padding
@@ -83,27 +83,27 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::subject<Component>::type,
+ typename result_of::subject<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::right_align_generate(sink, ctx, d, param,
+ return detail::right_align_generate(sink, ctx, d, param,
                 subject(component), proto::arg_c<0>(argument1(component)), ' ');
         }
 
- 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 = "right_align(";
-
+
             result += boost::lexical_cast<std::string>(
                 proto::arg_c<0>(argument1(component)));
             result += ")[";
@@ -112,16 +112,16 @@
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
     // The right alignment directive with padding, is used for generators like
- // right_align(padding)[...], where padding is a arbitrary generator
- // expression. It uses a default value for the generated width (defined
+ // right_align(padding)[...], where padding is a arbitrary generator
+ // expression. It uses a default value for the generated width (defined
     // via the BOOST_KARMA_DEFAULT_FIELD_LENGTH constant).
     ///////////////////////////////////////////////////////////////////////////
     struct padding_right_aligment
@@ -130,49 +130,49 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::subject<Component>::type,
+ typename result_of::subject<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::right_align_generate(sink, ctx, d, param,
- subject(component), BOOST_KARMA_DEFAULT_FIELD_LENGTH,
+ return detail::right_align_generate(sink, ctx, d, param,
+ subject(component), BOOST_KARMA_DEFAULT_FIELD_LENGTH,
                 argument1(component));
         }
 
- 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 = "right_align(";
-
+
             typedef typename
                 spirit::result_of::argument1<Component>::type::director
             padding;
 
- result += padding::what(spirit::argument1(component));
+ result += padding::what(spirit::argument1(component), ctx);
             result += ")[";
 
             typedef typename
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
- // The full right alignment directive, is used for generators like
- // right_align(width, padding)[...], where width is a integer value to be
- // used as the field width and padding is a arbitrary generator
+ // The full right alignment directive, is used for generators like
+ // right_align(width, padding)[...], where width is a integer value to be
+ // used as the field width and padding is a arbitrary generator
     // expression.
     ///////////////////////////////////////////////////////////////////////////
     struct full_right_aligment
@@ -181,28 +181,28 @@
         struct attribute
           : traits::attribute_of<
                 karma::domain,
- typename result_of::subject<Component>::type,
+ typename result_of::subject<Component>::type,
                 Context
>
         {
         };
 
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& param)
         {
- return detail::right_align_generate(sink, ctx, d, param,
- subject(component), proto::arg_c<0>(argument1(component)),
+ return detail::right_align_generate(sink, ctx, d, param,
+ subject(component), proto::arg_c<0>(argument1(component)),
                 argument2(component));
         }
 
- 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 = "right_align(";
-
+
             result += boost::lexical_cast<std::string>(
                 proto::arg_c<0>(argument1(component)));
             result += ", ";
@@ -211,19 +211,19 @@
                 spirit::result_of::argument2<Component>::type::director
             padding;
 
- result += padding::what(spirit::argument2(component));
+ result += padding::what(spirit::argument2(component), ctx);
             result += ")[";
 
             typedef typename
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }
     };
-
+
 }}} // namespace boost::spirit::karma
 
 #endif

Modified: trunk/boost/spirit/home/karma/directive/verbatim.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/directive/verbatim.hpp (original)
+++ trunk/boost/spirit/home/karma/directive/verbatim.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -55,8 +55,8 @@
             return false;
         }
 
- 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 = "verbatim[";
 
@@ -64,7 +64,7 @@
                 spirit::result_of::right<Component>::type::director
             director;
 
- result += director::what(spirit::right(component));
+ result += director::what(spirit::right(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/karma/nonterminal/nonterminal_director.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/nonterminal/nonterminal_director.hpp (original)
+++ trunk/boost/spirit/home/karma/nonterminal/nonterminal_director.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -148,8 +148,8 @@
             return x.ptr->what();
         }
 
- 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)
         {
             return what_nonterminal(subject(component).held);
         }

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 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2008 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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_INT_FEB_23_2007_0840PM)
@@ -25,8 +25,8 @@
 namespace boost { namespace spirit { namespace karma
 {
     ///////////////////////////////////////////////////////////////////////////
- // This specialization is used for int generators not having a direct
- // initializer: int_, long_ etc. These generators must be used in
+ // This specialization is used for int generators not having a direct
+ // initializer: int_, long_ etc. These generators must be used in
     // conjunction with a parameter.
     ///////////////////////////////////////////////////////////////////////////
     template <typename T, unsigned Radix, bool ForceSign, typename Tag>
@@ -45,44 +45,44 @@
 
         BOOST_MPL_ASSERT_MSG(std::numeric_limits<T>::is_signed,
             signed_unsigned_mismatch, ());
-
+
         // int has a parameter attached
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& /*component*/, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& param)
         {
- sign_inserter<ForceSign>::call(sink, detail::is_zero(param),
+ sign_inserter<ForceSign>::call(sink, detail::is_zero(param),
                 detail::is_negative(param));
- bool result = int_inserter<Radix, Tag>::call(sink,
+ bool result = int_inserter<Radix, Tag>::call(sink,
                 detail::absolute_value(param));
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return result;
         }
 
- // this int has no parameter attached, it needs to have been
+ // this int has no parameter attached, it needs to have been
         // initialized from a direct literal
- template <typename Component, typename OutputIterator,
+ template <typename Component, typename OutputIterator,
             typename Context, typename Delimiter>
- static bool
- generate(Component const&, OutputIterator&, Context&, Delimiter const&,
- unused_type)
+ static bool
+ generate(Component const&, OutputIterator&, Context&, Delimiter const&,
+ unused_type)
         {
             BOOST_MPL_ASSERT_MSG(false, int__not_usable_without_parameter, ());
             return false;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "integer";
         }
     };
 
     ///////////////////////////////////////////////////////////////////////////
- // This specialization is used for int generators having a direct
- // initializer: int_(10), long_(20) etc.
+ // This specialization is used for int generators having a direct
+ // initializer: int_(10), long_(20) etc.
     ///////////////////////////////////////////////////////////////////////////
     template <typename T, unsigned Radix, bool ForceSign, typename Tag>
     struct int_generator<true, T, Radix, ForceSign, Tag>
@@ -100,24 +100,24 @@
 
         BOOST_MPL_ASSERT_MSG(std::numeric_limits<T>::is_signed,
             signed_unsigned_mismatch, ());
-
- template <typename Component, typename OutputIterator,
+
+ 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*/)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& /*param*/)
         {
             T n = fusion::at_c<0>(component.elements);
- sign_inserter<ForceSign>::call(sink, detail::is_zero(n),
+ sign_inserter<ForceSign>::call(sink, detail::is_zero(n),
                 detail::is_negative(n));
- bool result = int_inserter<Radix, Tag>::call(sink,
+ bool result = int_inserter<Radix, Tag>::call(sink,
                 detail::absolute_value(n));
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return result;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "integer";
         }
@@ -145,7 +145,7 @@
 
         typedef karma::int_generator<false, T, Radix, ForceSign, key_tag> int_type;
         typedef component<karma::domain, int_type, fusion::nil> type;
-
+
         static type
         call(Elements const&)
         {
@@ -166,14 +166,14 @@
         typedef spirit::char_class::tag::lower char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
 
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 0>::type
         int_data_type;
         typedef fusion::vector<int_data_type> vector_type;
 
         typedef karma::int_generator<true, T, Radix, ForceSign, key_tag> int_type;
         typedef component<karma::domain, int_type, vector_type> type;
-
+
         static type
         call(Elements const& elements)
         {
@@ -199,7 +199,7 @@
 
         typedef karma::int_generator<false, T, Radix, ForceSign, key_tag> int_type;
         typedef component<karma::domain, int_type, fusion::nil> type;
-
+
         static type
         call(Elements const&)
         {
@@ -220,14 +220,14 @@
         typedef spirit::char_class::tag::upper char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
 
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 0>::type
         int_data_type;
         typedef fusion::vector<int_data_type> vector_type;
 
         typedef karma::int_generator<true, T, Radix, ForceSign, key_tag> int_type;
         typedef component<karma::domain, int_type, vector_type> type;
-
+
         static type
         call(Elements const& elements)
         {

Modified: trunk/boost/spirit/home/karma/numeric/real.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/real.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/real.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2008 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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_REAL_FEB_26_2007_0512PM)
@@ -20,17 +20,17 @@
 #include <boost/spirit/home/karma/numeric/detail/numeric_utils.hpp>
 #include <cmath>
 
-namespace boost { namespace spirit { namespace karma
+namespace boost { namespace spirit { namespace karma
 {
     namespace detail
     {
         template <typename RealPolicies>
         struct real_policy;
     }
-
+
     ///////////////////////////////////////////////////////////////////////////
- // This specialization is used for real generators not having a direct
- // initializer: float_, double_ etc. These generators must be used in
+ // This specialization is used for real generators not having a direct
+ // initializer: float_, double_ etc. These generators must be used in
     // conjunction with a parameter.
     ///////////////////////////////////////////////////////////////////////////
     template <typename T, typename RealPolicies, typename Tag>
@@ -43,44 +43,44 @@
         };
 
         // double_/float_/etc. has a parameter attached
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ 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));
             bool result = real_inserter<T, RealPolicies, Tag>::
                 call(sink, param, p);
 
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return result;
         }
 
- // this double_/float_/etc. has no parameter attached, it needs to have
+ // this double_/float_/etc. has no parameter attached, it needs to have
         // been initialized from a direct literal
- template <typename Component, typename OutputIterator,
+ template <typename Component, typename OutputIterator,
             typename Context, typename Delimiter>
- static bool
- generate(Component const&, OutputIterator&, Context&, Delimiter const&,
- unused_type)
+ static bool
+ 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_parameter,
                 (Component, Context));
             return false;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "real number";
         }
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
- // This specialization is used for real generators having a direct
- // initializer: float_(10.), double_(20.) etc.
+ // This specialization is used for real generators having a direct
+ // initializer: float_(10.), double_(20.) etc.
     ///////////////////////////////////////////////////////////////////////////
     template <typename T, typename RealPolicies, typename Tag>
     struct real_generator<true, T, RealPolicies, Tag>
@@ -91,28 +91,28 @@
             typedef unused_type type;
         };
 
- template <typename Component, typename OutputIterator,
+ 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*/)
+ static bool
+ 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));
             T n = fusion::at_c<1>(component.elements);
             bool result = real_inserter<T, RealPolicies, Tag>::call(sink, n, p);
 
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return result;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "real number";
         }
     };
-
+
 }}}
 
 namespace boost { namespace spirit { namespace traits
@@ -133,14 +133,14 @@
         typedef spirit::char_class::tag::lower char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
 
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 0>::type
         real_policy_type;
         typedef fusion::vector<real_policy_type> vector_type;
 
         typedef karma::real_generator<false, T, RealPolicies, key_tag> real_type;
         typedef component<karma::domain, real_type, vector_type> type;
-
+
         static type
         call(Elements const& elements)
         {
@@ -161,17 +161,17 @@
         typedef spirit::char_class::tag::lower char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
 
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 0>::type
         real_policy_type;
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 1>::type
         real_data_type;
         typedef fusion::vector<real_policy_type, real_data_type> vector_type;
 
         typedef karma::real_generator<true, T, RealPolicies, key_tag> real_type;
         typedef component<karma::domain, real_type, vector_type> type;
-
+
         static type
         call(Elements const& elements)
         {
@@ -195,14 +195,14 @@
         typedef spirit::char_class::tag::upper char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
 
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 0>::type
         real_policy_type;
         typedef fusion::vector<real_policy_type> vector_type;
 
         typedef karma::real_generator<false, T, RealPolicies, key_tag> real_type;
         typedef component<karma::domain, real_type, vector_type> type;
-
+
         static type
         call(Elements const& elements)
         {
@@ -223,17 +223,17 @@
         typedef spirit::char_class::tag::upper char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
 
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 0>::type
         real_policy_type;
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 1>::type
         real_data_type;
         typedef fusion::vector<real_policy_type, real_data_type> vector_type;
 
         typedef karma::real_generator<true, T, RealPolicies, key_tag> real_type;
         typedef component<karma::domain, real_type, vector_type> type;
-
+
         static type
         call(Elements const& elements)
         {

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 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2008 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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_UINT_FEB_23_2007_0840PM)
@@ -39,33 +39,33 @@
 
         BOOST_MPL_ASSERT_MSG(!std::numeric_limits<T>::is_signed,
             signed_unsigned_mismatch, ());
-
+
         // uint has a parameter attached
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& /*component*/, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& param)
         {
             bool result = int_inserter<Radix, Tag>::call(sink, param);
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return result;
         }
 
- // this uint has no parameter attached, it needs to have been
+ // this uint has no parameter attached, it needs to have been
         // initialized from a direct literal
- template <typename Component, typename OutputIterator,
+ template <typename Component, typename OutputIterator,
             typename Context, typename Delimiter>
- static bool
- generate(Component const&, OutputIterator&, Context&, Delimiter const&,
- unused_type)
+ static bool
+ generate(Component const&, OutputIterator&, Context&, Delimiter const&,
+ unused_type)
         {
             BOOST_MPL_ASSERT_MSG(false, uint_not_usable_without_parameter, ());
             return false;
         }
-
- template <typename Component>
- static std::string what(Component const&)
+
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "unsigned integer";
         }
@@ -87,21 +87,21 @@
 
         BOOST_MPL_ASSERT_MSG(!std::numeric_limits<T>::is_signed,
             signed_unsigned_mismatch, ());
-
- template <typename Component, typename OutputIterator,
+
+ 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*/)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& /*param*/)
         {
             T n = fusion::at_c<0>(component.elements);
             bool result = int_inserter<Radix, Tag>::call(sink, n);
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return result;
         }
-
- template <typename Component>
- static std::string what(Component const&)
+
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "unsigned integer";
         }
@@ -129,7 +129,7 @@
 
         typedef karma::uint_generator<false, T, Radix, ForceSign, key_tag> int_type;
         typedef component<karma::domain, int_type, fusion::nil> type;
-
+
         static type
         call(Elements const&)
         {
@@ -150,14 +150,14 @@
         typedef spirit::char_class::tag::lower char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
 
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 0>::type
         int_data_type;
         typedef fusion::vector<int_data_type> vector_type;
 
         typedef karma::uint_generator<true, T, Radix, ForceSign, key_tag> int_type;
         typedef component<karma::domain, int_type, vector_type> type;
-
+
         static type
         call(Elements const& elements)
         {
@@ -183,7 +183,7 @@
 
         typedef karma::uint_generator<false, T, Radix, ForceSign, key_tag> int_type;
         typedef component<karma::domain, int_type, fusion::nil> type;
-
+
         static type
         call(Elements const&)
         {
@@ -204,14 +204,14 @@
         typedef spirit::char_class::tag::upper char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
 
- typedef typename
+ typedef typename
             fusion::result_of::value_at_c<Elements, 0>::type
         int_data_type;
         typedef fusion::vector<int_data_type> vector_type;
 
         typedef karma::uint_generator<true, T, Radix, ForceSign, key_tag> int_type;
         typedef component<karma::domain, int_type, vector_type> type;
-
+
         static type
         call(Elements const& elements)
         {

Modified: trunk/boost/spirit/home/karma/operator/alternative.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/operator/alternative.hpp (original)
+++ trunk/boost/spirit/home/karma/operator/alternative.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 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: trunk/boost/spirit/home/karma/operator/karma-alt/alternative.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/operator/karma-alt/alternative.hpp (original)
+++ trunk/boost/spirit/home/karma/operator/karma-alt/alternative.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 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: trunk/boost/spirit/home/karma/operator/kleene.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/operator/kleene.hpp (original)
+++ trunk/boost/spirit/home/karma/operator/kleene.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -72,8 +72,8 @@
 // return false;
 // }
 
- 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 = "kleene[";
 
@@ -81,7 +81,7 @@
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/karma/operator/list.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/operator/list.hpp (original)
+++ trunk/boost/spirit/home/karma/operator/list.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -70,8 +70,8 @@
             return false;
         }
 
- 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 = "list[";
 
@@ -83,9 +83,9 @@
                 spirit::result_of::right<Component>::type::director
             rdirector;
 
- result += ldirector::what(spirit::left(component));
+ result += ldirector::what(spirit::left(component), ctx);
             result += ", ";
- result += rdirector::what(spirit::right(component));
+ result += rdirector::what(spirit::right(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/karma/operator/optional.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/operator/optional.hpp (original)
+++ trunk/boost/spirit/home/karma/operator/optional.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -79,8 +79,8 @@
             return true;
         }
 
- 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 = "optional[";
 
@@ -88,7 +88,7 @@
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/karma/operator/plus.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/operator/plus.hpp (original)
+++ trunk/boost/spirit/home/karma/operator/plus.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -75,8 +75,8 @@
 // return false;
 // }
 
- 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 = "plus[";
 
@@ -84,7 +84,7 @@
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(spirit::subject(component));
+ result += director::what(spirit::subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/karma/operator/sequence.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/operator/sequence.hpp (original)
+++ trunk/boost/spirit/home/karma/operator/sequence.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -73,12 +73,12 @@
             return !spirit::any_if(component.elements, param, f, predicate());
         }
 
- 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 = "sequence[";
             fusion::for_each(component.elements,
- spirit::detail::what_function(result));
+ spirit::detail::what_function<Context>(result, ctx));
             result += "]";
             return result;
         }

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 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -17,20 +17,20 @@
 #include <iosfwd>
 
 ///////////////////////////////////////////////////////////////////////////////
-namespace boost { namespace spirit
-{
+namespace boost { namespace spirit
+{
     // overload the streaming operators for the unused_type
     template <typename Char, typename Traits>
- inline std::basic_ostream<Char, Traits>&
+ inline std::basic_ostream<Char, Traits>&
     operator<< (std::basic_ostream<Char, Traits>& os, unused_type)
     {
         return os;
     }
-
+
 }}
 
 ///////////////////////////////////////////////////////////////////////////////
-namespace boost { namespace spirit { namespace karma
+namespace boost { namespace spirit { namespace karma
 {
     template <typename Char>
     struct any_stream
@@ -42,24 +42,24 @@
         };
 
         // any_stream has a parameter attached
-
+
         // this overload will be used in the normal case (not called from
         // format_manip).
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& param)
         {
- typedef
- karma::detail::iterator_sink<OutputIterator, Char>
+ typedef
+ karma::detail::iterator_sink<OutputIterator, Char>
             sink_device;
 
             iostreams::stream<sink_device> ostr(sink);
             ostr << param << std::flush; // use existing operator<<()
-
+
             if (ostr.good()) {
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
                 return true;
             }
             return false;
@@ -68,48 +68,48 @@
         // this is a special overload to detect if the output iterator has been
         // generated by a format_manip object.
         template <
- typename Component, typename T, typename Traits,
+ typename Component, typename T, typename Traits,
             typename Context, typename Delimiter, typename Parameter
>
- static bool
- generate(Component const& component,
+ static bool
+ generate(Component const& component,
             karma::detail::output_iterator<
- karma::detail::ostream_iterator<T, Char, Traits>
- >& sink, Context&, Delimiter const& d, Parameter const& param)
+ karma::detail::ostream_iterator<T, Char, Traits>
+ >& sink, Context&, Delimiter const& d, Parameter const& param)
         {
             typedef karma::detail::output_iterator<
- karma::detail::ostream_iterator<T, Char, Traits>
+ karma::detail::ostream_iterator<T, Char, Traits>
> output_iterator;
- typedef
- karma::detail::iterator_sink<output_iterator, Char>
+ typedef
+ karma::detail::iterator_sink<output_iterator, Char>
             sink_device;
 
             iostreams::stream<sink_device> ostr(sink);
             ostr.imbue(sink.get_ostream().getloc());
             ostr << param << std::flush; // use existing operator<<()
-
+
             if (ostr.good()) {
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
                 return true;
             }
             return false;
         }
-
- // this any_stream has no parameter attached, it needs to have been
+
+ // this any_stream has no parameter attached, it needs to have been
         // initialized from a value/variable
- template <typename Component, typename OutputIterator,
+ template <typename Component, typename OutputIterator,
             typename Context, typename Delimiter>
- static bool
- generate(Component const&, OutputIterator&, Context&, Delimiter const&,
- unused_type)
+ static bool
+ 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_parameter,
               (Component, OutputIterator, Delimiter));
             return false;
         }
 
- 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)
         {
             return "any-stream";
         }
@@ -126,22 +126,22 @@
         };
 
         // stream_director has a parameter attached
- template <typename Component, typename OutputIterator,
+ 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&)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const&)
         {
- typedef
- karma::detail::iterator_sink<OutputIterator, Char>
+ typedef
+ karma::detail::iterator_sink<OutputIterator, Char>
             sink_device;
 
             // use existing operator<<()
             iostreams::stream<sink_device> ostr(sink);
- ostr << fusion::at_c<0>(component.elements) << std::flush;
-
+ ostr << fusion::at_c<0>(component.elements) << std::flush;
+
             if (ostr.good()) {
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
                 return true;
             }
             return false;
@@ -150,41 +150,41 @@
         // this is a special overload to detect if the output iterator has been
         // generated by a format_manip object.
         template <
- typename Component, typename T, typename Traits,
+ typename Component, typename T, typename Traits,
             typename Context, typename Delimiter, typename Parameter
>
- static bool
- generate(Component const& component,
+ static bool
+ generate(Component const& component,
             karma::detail::output_iterator<
- karma::detail::ostream_iterator<T, Char, Traits>
- >& sink, Context&, Delimiter const& d, Parameter const&)
+ karma::detail::ostream_iterator<T, Char, Traits>
+ >& sink, Context&, Delimiter const& d, Parameter const&)
         {
             typedef karma::detail::output_iterator<
- karma::detail::ostream_iterator<T, Char, Traits>
+ karma::detail::ostream_iterator<T, Char, Traits>
> output_iterator;
- typedef
- karma::detail::iterator_sink<output_iterator, Char>
+ typedef
+ karma::detail::iterator_sink<output_iterator, Char>
             sink_device;
 
             // use existing operator<<()
             iostreams::stream<sink_device> ostr(sink);
             ostr.imbue(sink.get_ostream().getloc());
- ostr << fusion::at_c<0>(component.elements) << std::flush;
-
+ ostr << fusion::at_c<0>(component.elements) << std::flush;
+
             if (ostr.good()) {
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
                 return true;
             }
             return false;
         }
-
- 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)
         {
             return "stream";
         }
     };
-
+
 }}}
 
 #endif

Modified: trunk/boost/spirit/home/karma/string/lit.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/string/lit.hpp (original)
+++ trunk/boost/spirit/home/karma/string/lit.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -1,6 +1,6 @@
 // Copyright (c) 2001-2008 Hartmut Kaiser
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+//
+// 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_LIT_FEB_22_2007_0534PM)
@@ -35,32 +35,32 @@
         };
 
         // lit has a parameter attached
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& /*component*/, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& param)
         {
             bool result = detail::string_generate(sink, param);
             if (result)
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return result;
         }
 
- // this lit has no parameter attached, it needs to have been
+ // this lit has no parameter attached, it needs to have been
         // initialized from a direct literal
- template <typename Component, typename OutputIterator,
+ template <typename Component, typename OutputIterator,
             typename Context, typename Delimiter>
- static bool
- generate(Component const& component, OutputIterator& sink,
- Context& /*ctx*/, Delimiter const& d, unused_type)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, unused_type)
         {
             BOOST_MPL_ASSERT_MSG(false, lit_not_usable_without_parameter, ());
             return false;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "any-string";
         }
@@ -78,21 +78,21 @@
             typedef unused_type type;
         };
 
- template <typename Component, typename OutputIterator,
+ 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*/)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& /*param*/)
         {
             bool result = detail::string_generate(sink,
                 fusion::at_c<0>(component.elements));
-
- karma::delimit(sink, d); // always do post-delimiting
+
+ karma::delimit(sink, d); // always do post-delimiting
             return result;
         }
 
- 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)
         {
             return std::string("\"")
                 + spirit::detail::to_narrow_string(
@@ -113,21 +113,21 @@
             typedef unused_type type;
         };
 
- template <typename Component, typename OutputIterator,
+ 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*/)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& ctx, Delimiter const& d, Parameter const& /*param*/)
         {
             bool result = detail::string_generate(sink,
                 fusion::at_c<0>(component.elements)(unused, ctx));
-
- karma::delimit(sink, d); // always do post-delimiting
+
+ karma::delimit(sink, d); // always do post-delimiting
             return result;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "string";
         }
@@ -146,36 +146,36 @@
         };
 
         // case_any_string has a parameter attached
- template <typename Component, typename OutputIterator,
+ 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)
+ static bool
+ generate(Component const& /*component*/, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, Parameter const& param)
         {
             bool result = detail::string_generate(sink, param, Tag());
- karma::delimit(sink, d); // always do post-delimiting
+ karma::delimit(sink, d); // always do post-delimiting
             return result;
         }
 
- // this case_any_string has no parameter attached, it needs to have been
+ // this case_any_string has no parameter attached, it needs to have been
         // initialized from a direct literal
- template <typename Component, typename OutputIterator,
+ template <typename Component, typename OutputIterator,
             typename Context, typename Delimiter>
- static bool
- generate(Component const& component, OutputIterator& sink,
- Context& /*ctx*/, Delimiter const& d, unused_type)
+ static bool
+ generate(Component const& component, OutputIterator& sink,
+ Context& /*ctx*/, Delimiter const& d, unused_type)
         {
             BOOST_MPL_ASSERT_MSG(false, lit_not_usable_without_parameter, ());
             return false;
         }
 
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             typedef typename Tag::char_set char_set;
             typedef typename Tag::char_class char_class_;
- return std::string("any-") +
+ return std::string("any-") +
                 spirit::char_class::what<char_set>::is(char_class_())
                 + "case-string";
         }
@@ -200,18 +200,18 @@
         typedef std::basic_string<Char> string_type;
         typedef fusion::vector<string_type> vector_type;
 
- typedef
- component<karma::domain, karma::literal_string<Char>, vector_type>
+ typedef
+ component<karma::domain, karma::literal_string<Char>, vector_type>
         type;
-
+
         static type
         call(Elements const& elements)
         {
             typedef typename Modifier::char_set char_set;
-
+
             string_type val(fusion::at_c<0>(elements));
             typename string_type::iterator end = val.end();
- for (typename string_type::iterator it = val.begin();
+ for (typename string_type::iterator it = val.begin();
                  it != end; ++it)
             {
                 *it = char_set::tolower(*it);
@@ -233,18 +233,18 @@
         typedef std::basic_string<Char> string_type;
         typedef fusion::vector<string_type> vector_type;
 
- typedef
- component<karma::domain, karma::literal_string<Char>, vector_type>
+ typedef
+ component<karma::domain, karma::literal_string<Char>, vector_type>
         type;
-
+
         static type
         call(Elements const& elements)
         {
             typedef typename Modifier::char_set char_set;
-
+
             string_type val(fusion::at_c<0>(elements));
             typename string_type::iterator end = val.end();
- for (typename string_type::iterator it = val.begin();
+ for (typename string_type::iterator it = val.begin();
                  it != end; ++it)
             {
                 *it = char_set::toupper(*it);
@@ -269,11 +269,11 @@
         typedef typename Modifier::char_set char_set;
         typedef spirit::char_class::tag::lower char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
-
+
         typedef component<
             karma::domain, karma::case_any_string<Char, key_tag>, fusion::nil
> type;
-
+
         static type
         call(Elements const&)
         {
@@ -293,11 +293,11 @@
         typedef typename Modifier::char_set char_set;
         typedef spirit::char_class::tag::upper char_class_;
         typedef spirit::char_class::key<char_set, char_class_> key_tag;
-
+
         typedef component<
             karma::domain, karma::case_any_string<Char, key_tag>, fusion::nil
> type;
-
+
         static type
         call(Elements const&)
         {

Modified: trunk/boost/spirit/home/karma/what.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/what.hpp (original)
+++ trunk/boost/spirit/home/karma/what.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -28,7 +28,7 @@
         typedef typename component::director director;
 
         component c = spirit::as_component(karma::domain(), xpr);
- return director::what(c);
+ return director::what(c, unused);
     }
 }}}
 

Modified: trunk/boost/spirit/home/lex/lexer/terminal_director.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/terminal_director.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/terminal_director.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -45,8 +45,8 @@
                 first, last, context, skipper, attr);
         }
 
- 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)
         {
             return subject(component).held->what();
         }

Modified: trunk/boost/spirit/home/lex/qi/state/state_switcher.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/qi/state/state_switcher.hpp (original)
+++ trunk/boost/spirit/home/lex/qi/state/state_switcher.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -71,8 +71,8 @@
             return true;
         }
 
- 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("set_state(\"");
             result += spirit::detail::to_narrow_string(
@@ -148,8 +148,8 @@
                 last, context, skipper, attr);
         }
 
- 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("in_state(\"");
             result += spirit::detail::to_narrow_string(
@@ -160,7 +160,7 @@
                 spirit::result_of::subject<Component>::type::director
             director;
 
- result += director::what(subject(component));
+ result += director::what(subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/lex/qi/utility/plain_token.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/qi/utility/plain_token.hpp (original)
+++ trunk/boost/spirit/home/lex/qi/utility/plain_token.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -56,8 +56,8 @@
             return false;
         }
         
- 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("token(\"");
             result += lexical_cast<std::string>(

Modified: trunk/boost/spirit/home/qi/action/action.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/action/action.hpp (original)
+++ trunk/boost/spirit/home/qi/action/action.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -81,14 +81,14 @@
             return false;
         }
 
- 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)
         {
             typedef typename
                 result_of::left<Component>::type::director
             director;
 
- return director::what(spirit::left(component));
+ return director::what(spirit::left(component), ctx);
         }
     };
 }}}

Modified: trunk/boost/spirit/home/qi/auxiliary/eps.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/auxiliary/eps.hpp (original)
+++ trunk/boost/spirit/home/qi/auxiliary/eps.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -36,8 +36,8 @@
             return true;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "eps";
         }
@@ -65,8 +65,8 @@
             return fusion::at_c<0>(component.elements)(unused, context);
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "semantic-predicate";
         }

Modified: trunk/boost/spirit/home/qi/auxiliary/functor_director.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/auxiliary/functor_director.hpp (original)
+++ trunk/boost/spirit/home/qi/auxiliary/functor_director.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -40,8 +40,8 @@
             return subject(component).held->parse(first, last, context, attr);
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "functor";
         }

Modified: trunk/boost/spirit/home/qi/auxiliary/lazy.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/auxiliary/lazy.hpp (original)
+++ trunk/boost/spirit/home/qi/auxiliary/lazy.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -74,8 +74,8 @@
                 parse(subject, first, last, context, skipper, attr);
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             //~ typedef typename
                 //~ result_of::subject<Component>::type
@@ -96,7 +96,7 @@
                     //~ qi::domain(), fusion::at_c<0>(component.elements)(unused, unused));
 
             std::string result = "lazy[";
- //~ result += component_type::director::what(subject);
+ //~ result += component_type::director::what(subject, ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/auxiliary/none.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/auxiliary/none.hpp (original)
+++ trunk/boost/spirit/home/qi/auxiliary/none.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -35,8 +35,8 @@
             return false;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "none";
         }

Modified: trunk/boost/spirit/home/qi/auxiliary/primitives.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/auxiliary/primitives.hpp (original)
+++ trunk/boost/spirit/home/qi/auxiliary/primitives.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -20,7 +20,7 @@
     struct end_director_base
     {
         typedef mpl::false_ stores_iterator;
-
+
         template <typename Component, typename Context, typename Iterator>
         struct attribute
         {
@@ -46,7 +46,7 @@
         template <typename Iterator>
         bool test(Iterator& first, Iterator const& last);
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
     // same as end_director_base above, but stores iterator
     ///////////////////////////////////////////////////////////////////////////
@@ -86,13 +86,13 @@
         template <typename Iterator>
         bool test(Iterator& first, Iterator const& last);
     };
-
+
     ///////////////////////////////////////////////////////////////////////////
     // ~eoi, ~eol: 'not end of line' or 'not end of input'
     template <typename Positive>
- struct negated_end_director
+ struct negated_end_director
       : end_director_base<
- negated_end_director<Positive>,
+ negated_end_director<Positive>,
             typename Positive::director::stores_iterator
>
     {
@@ -102,11 +102,11 @@
             return !Positive::director::test(first, last);
         }
 
- 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)
         {
- return "not " +
- Positive::director::what(fusion::at_c<0>(component.elements));
+ return "not " +
+ Positive::director::what(fusion::at_c<0>(component.elements), ctx);
         }
     };
 
@@ -119,15 +119,15 @@
         {
             return first == last;
         }
-
- template <typename Component>
- static std::string what(Component const&)
+
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "eoi";
         }
     };
-
-
+
+
     ///////////////////////////////////////////////////////////////////////////
     // the eol_director matches line endings
     ///////////////////////////////////////////////////////////////////////////
@@ -150,13 +150,13 @@
             return matched;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "eol";
         }
     };
-
+
 ///////////////////////////////////////////////////////////////////////////////
 }}}
 

Modified: trunk/boost/spirit/home/qi/binary/binary.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/binary/binary.hpp (original)
+++ trunk/boost/spirit/home/qi/binary/binary.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -136,8 +136,8 @@
             return true;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return qi::detail::what<endian>::is();
         }
@@ -182,8 +182,8 @@
             return true;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return qi::detail::what<endian>::is();
         }

Modified: trunk/boost/spirit/home/qi/char/char.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/char/char.hpp (original)
+++ trunk/boost/spirit/home/qi/char/char.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -35,8 +35,8 @@
             return true;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "any-char";
         }
@@ -60,8 +60,8 @@
             return detail::get_char(fusion::at_c<0>(component.elements)) == ch;
         }
 
- 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)
         {
             return std::string("'")
                 + spirit::detail::to_narrow_char(
@@ -82,8 +82,8 @@
             return component.ptr->test(ch);
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "char-set";
         }
@@ -114,10 +114,13 @@
             return fusion::at_c<0>(component.elements)(unused, context) == ch;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
- return "char";
+ return std::string("'")
+ + spirit::detail::to_narrow_char(
+ fusion::at_c<0>(component.elements)(unused, ctx))
+ + '\'';
         }
     };
 
@@ -135,8 +138,8 @@
                 !(fusion::at_c<1>(component.elements) < ch);
         }
 
- 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;
             result += std::string("'") + fusion::at_c<0>(component.elements) + '\'';
@@ -173,8 +176,8 @@
                 !(fusion::at_c<1>(component.elements)(unused, context) < ch);
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "char-range";
         }
@@ -200,8 +203,8 @@
             ;
         }
 
- 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;
             result += std::string("'")
@@ -232,8 +235,8 @@
             ;
         }
 
- 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;
             result += std::string("'") + fusion::at_c<0>(component.elements) + '\'';

Modified: trunk/boost/spirit/home/qi/char/char_class.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/char/char_class.hpp (original)
+++ trunk/boost/spirit/home/qi/char/char_class.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -35,8 +35,8 @@
             return classify<char_set>::is(char_class_(), ch);
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             typedef spirit::char_class::what<char_set> what_;
             return what_::is(char_class_());

Modified: trunk/boost/spirit/home/qi/char/char_parser.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/char/char_parser.hpp (original)
+++ trunk/boost/spirit/home/qi/char/char_parser.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -70,11 +70,11 @@
                 fusion::at_c<0>(component.elements), ch, context);
         }
 
- 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)
         {
             return std::string("not ")
- + Positive::director::what(fusion::at_c<0>(component.elements));
+ + Positive::director::what(fusion::at_c<0>(component.elements), ctx);
         }
     };
 }}}

Modified: trunk/boost/spirit/home/qi/detail/expect_function.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/detail/expect_function.hpp (original)
+++ trunk/boost/spirit/home/qi/detail/expect_function.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -41,7 +41,7 @@
                     is_first = false;
                     return true;
                 }
- Exception x = {first, last, director::what(component) };
+ Exception x = {first, last, director::what(component, context) };
                 throw x;
             }
             is_first = false;
@@ -62,7 +62,7 @@
                     is_first = false;
                     return true;
                 }
- Exception x = {first, last, director::what(component) };
+ Exception x = {first, last, director::what(component, context) };
                 throw x;
             }
             is_first = false;

Modified: trunk/boost/spirit/home/qi/directive/lexeme.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/directive/lexeme.hpp (original)
+++ trunk/boost/spirit/home/qi/directive/lexeme.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -49,8 +49,8 @@
                 spirit::subject(component), first, last, context, unused, attr);
         }
 
- 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 = "lexeme[";
 
@@ -58,7 +58,7 @@
                 result_of::subject<Component>::type::director
             director;
 
- result += director::what(subject(component));
+ result += director::what(subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/directive/omit.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/directive/omit.hpp (original)
+++ trunk/boost/spirit/home/qi/directive/omit.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -40,8 +40,8 @@
                 spirit::subject(component), first, last, context, skipper, unused);
         }
 
- 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 = "omit[";
 
@@ -49,7 +49,7 @@
                 result_of::subject<Component>::type::director
             director;
 
- result += director::what(subject(component));
+ result += director::what(subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/directive/raw.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/directive/raw.hpp (original)
+++ trunk/boost/spirit/home/qi/directive/raw.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -47,8 +47,8 @@
             return false;
         }
 
- 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 = "raw[";
 
@@ -56,7 +56,7 @@
                 result_of::subject<Component>::type::director
             director;
 
- result += director::what(subject(component));
+ result += director::what(subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/nonterminal/nonterminal_director.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/nonterminal/nonterminal_director.hpp (original)
+++ trunk/boost/spirit/home/qi/nonterminal/nonterminal_director.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -159,8 +159,8 @@
             return x.ptr->what();
         }
 
- 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)
         {
             return what_nonterminal(subject(component).held);
         }

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 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -42,8 +42,8 @@
                 ::call(first, last, attr);
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "integer";
         }

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 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -49,8 +49,8 @@
             return detail::real_impl<T, RealPolicies>::parse(first, last, attr, p);
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "real number";
         }

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 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -42,8 +42,8 @@
                 ::call(first, last, attr);
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "unsigned integer";
         }

Modified: trunk/boost/spirit/home/qi/operator/alternative.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/alternative.hpp (original)
+++ trunk/boost/spirit/home/qi/operator/alternative.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -82,12 +82,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: trunk/boost/spirit/home/qi/operator/and_predicate.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/and_predicate.hpp (original)
+++ trunk/boost/spirit/home/qi/operator/and_predicate.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -39,8 +39,8 @@
                 subject(component), i, last, context, skipper, unused);
         }
 
- 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 = "and-predicate[";
 
@@ -48,7 +48,7 @@
                 result_of::subject<Component>::type::director
             director;
 
- result += director::what(subject(component));
+ result += director::what(subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/operator/difference.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/difference.hpp (original)
+++ trunk/boost/spirit/home/qi/operator/difference.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -66,8 +66,8 @@
             return ldirector::parse(left(component), first, last, context, skipper, attr);
         }
 
- 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 = "difference[";
 
@@ -79,9 +79,9 @@
                 result_of::right<Component>::type::director
             rdirector;
 
- result += ldirector::what(left(component));
+ result += ldirector::what(left(component), ctx);
             result += ", ";
- result += rdirector::what(right(component));
+ result += rdirector::what(right(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/operator/kleene.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/kleene.hpp (original)
+++ trunk/boost/spirit/home/qi/operator/kleene.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -66,8 +66,8 @@
             return true;
         }
 
- 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 = "kleene[";
 
@@ -75,7 +75,7 @@
                 result_of::subject<Component>::type::director
             director;
 
- result += director::what(subject(component));
+ result += director::what(subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/operator/list.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/list.hpp (original)
+++ trunk/boost/spirit/home/qi/operator/list.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -72,8 +72,8 @@
         }
 
 
- 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 = "list[";
 
@@ -85,9 +85,9 @@
                 result_of::right<Component>::type::director
             rdirector;
 
- result += ldirector::what(left(component));
+ result += ldirector::what(left(component), ctx);
             result += ", ";
- result += rdirector::what(right(component));
+ result += rdirector::what(right(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/operator/not_predicate.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/not_predicate.hpp (original)
+++ trunk/boost/spirit/home/qi/operator/not_predicate.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -39,8 +39,8 @@
                 subject(component), i, last, context, skipper, unused);
         }
 
- 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 = "not-predicate[";
 
@@ -48,7 +48,7 @@
                 result_of::subject<Component>::type::director
             director;
 
- result += director::what(subject(component));
+ result += director::what(subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/operator/optional.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/optional.hpp (original)
+++ trunk/boost/spirit/home/qi/operator/optional.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -67,8 +67,8 @@
             return true;
         }
 
- 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 = "optional[";
 
@@ -76,7 +76,7 @@
                 result_of::subject<Component>::type::director
             director;
 
- result += director::what(subject(component));
+ result += director::what(subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/operator/permutation.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/permutation.hpp (original)
+++ trunk/boost/spirit/home/qi/operator/permutation.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -81,12 +81,12 @@
             return result;
         }
 
- 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 = "permutation[";
             fusion::for_each(component.elements,
- spirit::detail::what_function(result));
+ spirit::detail::what_function<Context>(result, ctx));
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/operator/plus.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/plus.hpp (original)
+++ trunk/boost/spirit/home/qi/operator/plus.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -73,8 +73,8 @@
             return false;
         }
 
- 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 = "plus[";
 
@@ -82,7 +82,7 @@
                 result_of::subject<Component>::type::director
             director;
 
- result += director::what(subject(component));
+ result += director::what(subject(component), ctx);
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/operator/sequence_base.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/sequence_base.hpp (original)
+++ trunk/boost/spirit/home/qi/operator/sequence_base.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -75,12 +75,12 @@
             return true;
         }
 
- 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 = Derived::what_();
             fusion::for_each(component.elements,
- spirit::detail::what_function(result));
+ spirit::detail::what_function<Context>(result, ctx));
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/operator/sequential_or.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/sequential_or.hpp (original)
+++ trunk/boost/spirit/home/qi/operator/sequential_or.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -60,12 +60,12 @@
         }
 
 
- 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 = "sequential-or[";
             fusion::for_each(component.elements,
- spirit::detail::what_function(result));
+ spirit::detail::what_function<Context>(result, ctx));
             result += "]";
             return result;
         }

Modified: trunk/boost/spirit/home/qi/stream/stream.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/stream/stream.hpp (original)
+++ trunk/boost/spirit/home/qi/stream/stream.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -61,8 +61,8 @@
             return in.good() || in.eof();
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             return "any-stream";
         }

Modified: trunk/boost/spirit/home/qi/string/lit.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/string/lit.hpp (original)
+++ trunk/boost/spirit/home/qi/string/lit.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -53,8 +53,8 @@
             );
         }
 
- 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)
         {
             return std::string("\"")
                 + spirit::detail::to_narrow_string(
@@ -102,10 +102,14 @@
             );
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
- return "string";
+ return std::string("\"")
+ + spirit::detail::to_narrow_string(
+ fusion::at_c<0>(component.elements)(unused, ctx))
+ + std::string("\"")
+ ;
         }
     };
 
@@ -141,8 +145,8 @@
             );
         }
 
- 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)
         {
             return std::string("case-insensitive \"")
                 + spirit::detail::to_narrow_string(

Modified: trunk/boost/spirit/home/qi/string/symbols.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/string/symbols.hpp (original)
+++ trunk/boost/spirit/home/qi/string/symbols.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -62,8 +62,8 @@
             return false;
         }
 
- template <typename Component>
- static std::string what(Component const&)
+ template <typename Component, typename Context>
+ static std::string what(Component const& component, Context const& ctx)
         {
             // perhaps we should show some of the contents?
             return "symbols";

Modified: trunk/boost/spirit/home/qi/what.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/what.hpp (original)
+++ trunk/boost/spirit/home/qi/what.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -26,7 +26,7 @@
         typedef typename result_of::as_component<qi::domain, Expr>::type component;
         typedef typename component::director director;
         component c = spirit::as_component(qi::domain(), xpr);
- return director::what(c);
+ return director::what(c, unused);
     }
 }}}
 

Modified: trunk/boost/spirit/home/support/detail/what_function.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/what_function.hpp (original)
+++ trunk/boost/spirit/home/support/detail/what_function.hpp 2008-07-13 02:10:47 EDT (Sun, 13 Jul 2008)
@@ -11,10 +11,11 @@
 
 namespace boost { namespace spirit { namespace detail
 {
+ template <typename Context>
     struct what_function
     {
- what_function(std::string& str)
- : str(str), first(true)
+ what_function(std::string& str, Context const& ctx)
+ : str(str), first(true), ctx(ctx)
         {
         }
 
@@ -26,10 +27,11 @@
             else
                 str += ", ";
             typedef typename Component::director director;
- str += director::what(component);
+ str += director::what(component, ctx);
         }
 
         std::string& str;
+ Context const& ctx;
         mutable bool first;
     };
 }}}


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