Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-03-05 11:32:38


Author: eric_niebler
Date: 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
New Revision: 43515
URL: http://svn.boost.org/trac/boost/changeset/43515

Log:
misc clean-up
Added:
   branches/proto/v3/boost/xpressive/detail/static/grammar2.hpp
      - copied, changed from r42450, /branches/proto/v3/boost/xpressive/detail/static/grammar.hpp
Removed:
   branches/proto/v3/boost/xpressive/detail/static/grammar.hpp
Text files modified:
   branches/proto/v3/boost/xpressive/detail/core/matcher/action_matcher.hpp | 14 +++---
   branches/proto/v3/boost/xpressive/detail/core/matcher/alternate_matcher.hpp | 14 +++--
   branches/proto/v3/boost/xpressive/detail/core/matcher/literal_matcher.hpp | 4 +
   branches/proto/v3/boost/xpressive/detail/core/matcher/predicate_matcher.hpp | 6 +-
   branches/proto/v3/boost/xpressive/detail/core/peeker.hpp | 2
   branches/proto/v3/boost/xpressive/detail/detail_fwd.hpp | 39 +++++++++++++++++
   branches/proto/v3/boost/xpressive/detail/static/compile.hpp | 2
   branches/proto/v3/boost/xpressive/detail/static/grammar2.hpp | 28 ++++++------
   branches/proto/v3/boost/xpressive/detail/static/is_pure.hpp | 2
   branches/proto/v3/boost/xpressive/detail/static/modifier.hpp | 6 +-
   branches/proto/v3/boost/xpressive/detail/static/width_of.hpp | 2
   branches/proto/v3/boost/xpressive/detail/utility/any.hpp | 4
   branches/proto/v3/boost/xpressive/detail/utility/chset/range_run.hpp | 2
   branches/proto/v3/boost/xpressive/detail/utility/traits_utils.hpp | 8 +-
   branches/proto/v3/boost/xpressive/match_results.hpp | 2
   branches/proto/v3/boost/xpressive/proto/args.hpp | 12 +++++
   branches/proto/v3/boost/xpressive/proto/context/callable.hpp | 2
   branches/proto/v3/boost/xpressive/proto/context/default.hpp | 16 +++---
   branches/proto/v3/boost/xpressive/proto/context/null.hpp | 4
   branches/proto/v3/boost/xpressive/proto/debug.hpp | 10 ++-
   branches/proto/v3/boost/xpressive/proto/deep_copy.hpp | 2
   branches/proto/v3/boost/xpressive/proto/detail/bind.hpp | 2
   branches/proto/v3/boost/xpressive/proto/detail/call.hpp | 2
   branches/proto/v3/boost/xpressive/proto/detail/fun_call_ex.hpp | 5 +
   branches/proto/v3/boost/xpressive/proto/detail/make.hpp | 4
   branches/proto/v3/boost/xpressive/proto/detail/make_expr_ex.hpp | 1
   branches/proto/v3/boost/xpressive/proto/detail/nary_expr.hpp | 4
   branches/proto/v3/boost/xpressive/proto/detail/when.hpp | 2
   branches/proto/v3/boost/xpressive/proto/expr.hpp | 33 +++++++-------
   branches/proto/v3/boost/xpressive/proto/extends.hpp | 6 +-
   branches/proto/v3/boost/xpressive/proto/fusion.hpp | 10 ++--
   branches/proto/v3/boost/xpressive/proto/make_expr.hpp | 4
   branches/proto/v3/boost/xpressive/proto/matches.hpp | 6 +-
   branches/proto/v3/boost/xpressive/proto/traits.hpp | 9 ++-
   branches/proto/v3/boost/xpressive/proto/transform/arg.hpp | 8 +-
   branches/proto/v3/boost/xpressive/proto/transform/bind.hpp | 4
   branches/proto/v3/boost/xpressive/proto/transform/call.hpp | 14 +++---
   branches/proto/v3/boost/xpressive/proto/transform/fold.hpp | 4
   branches/proto/v3/boost/xpressive/proto/transform/fold_tree.hpp | 4
   branches/proto/v3/boost/xpressive/proto/transform/make.hpp | 20 ++++----
   branches/proto/v3/boost/xpressive/proto/transform/when.hpp | 2
   branches/proto/v3/boost/xpressive/regex_actions.hpp | 64 ++++++++++++++--------------
   branches/proto/v3/boost/xpressive/regex_compiler.hpp | 2
   branches/proto/v3/boost/xpressive/regex_primitives.hpp | 86 +++++++++++++++++++++++++--------------
   branches/proto/v3/libs/xpressive/proto/doc/grammars.qbk | 2
   branches/proto/v3/libs/xpressive/proto/example/calc1.cpp | 2
   branches/proto/v3/libs/xpressive/proto/example/calc2.cpp | 18 ++++----
   branches/proto/v3/libs/xpressive/proto/example/calc3.cpp | 16 +++---
   branches/proto/v3/libs/xpressive/proto/example/lazy_vector.cpp | 4
   branches/proto/v3/libs/xpressive/proto/example/mixed.cpp | 16 +++---
   branches/proto/v3/libs/xpressive/proto/example/tarray.cpp | 22 +++++-----
   branches/proto/v3/libs/xpressive/proto/example/vec3.cpp | 10 ++--
   branches/proto/v3/libs/xpressive/proto/example/vector.cpp | 6 +-
   branches/proto/v3/libs/xpressive/proto/test/calculator.cpp | 14 +++---
   branches/proto/v3/libs/xpressive/proto/test/examples.cpp | 6 +-
   branches/proto/v3/libs/xpressive/proto/test/lambda.cpp | 8 +-
   branches/proto/v3/libs/xpressive/proto/test/main.cpp | 12 ++--
   branches/proto/v3/libs/xpressive/proto/test/proto_fusion.cpp | 2
   branches/proto/v3/libs/xpressive/proto/test/proto_fusion_s.cpp | 2
   branches/proto/v3/libs/xpressive/proto/test/toy_spirit.cpp | 22 +++++-----
   branches/proto/v3/libs/xpressive/test/test.hpp | 2
   61 files changed, 361 insertions(+), 280 deletions(-)

Modified: branches/proto/v3/boost/xpressive/detail/core/matcher/action_matcher.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/core/matcher/action_matcher.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/core/matcher/action_matcher.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -85,7 +85,7 @@
             typename fusion::result_of::invoke<function_type, evaluated_args>::type
         result_type;
 
- result_type operator()(Expr &expr, Context &ctx) const
+ result_type operator ()(Expr &expr, Context &ctx) const
         {
             return fusion::invoke<function_type>(
                 proto::arg(proto::arg_c<0>(proto::right(expr)))
@@ -118,7 +118,7 @@
             function_type(typename proto::result_of::eval<left_type, Context>::type)
>::type result_type;
 
- result_type operator()(Expr &expr, Context &ctx) const
+ result_type operator ()(Expr &expr, Context &ctx) const
         {
             return proto::arg(proto::right(expr))(
                 proto::eval(proto::left(expr), ctx)
@@ -157,7 +157,7 @@
         struct eval_terminal<Expr, reference_wrapper<Arg> >
         {
             typedef Arg &result_type;
- result_type operator()(Expr &expr, action_context const &) const
+ result_type operator ()(Expr &expr, action_context const &) const
             {
                 return proto::arg(expr).get();
             }
@@ -167,7 +167,7 @@
         struct eval_terminal<Expr, opt<Arg> >
         {
             typedef Arg const &result_type;
- result_type operator()(Expr &expr, action_context const &) const
+ result_type operator ()(Expr &expr, action_context const &) const
             {
                 return proto::arg(expr);
             }
@@ -177,7 +177,7 @@
         struct eval_terminal<Expr, action_arg<Type, Int> >
         {
             typedef typename action_arg<Type, Int>::reference result_type;
- result_type operator()(Expr &expr, action_context const &ctx) const
+ result_type operator ()(Expr &expr, action_context const &ctx) const
             {
                 action_args_type::const_iterator where_ = ctx.args().find(&typeid(proto::arg(expr)));
                 if(where_ == ctx.args().end())
@@ -275,7 +275,7 @@
         };
 
         template<typename State, typename Index>
- sub_match<typename State::iterator> operator()(State const &state, Index i)
+ sub_match<typename State::iterator> operator ()(State const &state, Index i)
         {
             return state.sub_matches_[i];
         }
@@ -294,7 +294,7 @@
 
         template<typename State, typename Attr>
         typename Attr::matcher_type::value_type::second_type const *
- operator()(State const &state, Attr const &)
+ operator ()(State const &state, Attr const &)
         {
             typedef typename Attr::matcher_type::value_type::second_type attr_type;
             int slot = typename Attr::nbr_type();

Modified: branches/proto/v3/boost/xpressive/detail/core/matcher/alternate_matcher.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/core/matcher/alternate_matcher.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/core/matcher/alternate_matcher.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -59,18 +59,20 @@
     // alt_match
     //
     template<typename BidiIter, typename Next>
- inline bool alt_match
- (
- alternates_vector<BidiIter> const &alts, match_state<BidiIter> &state, Next const &
+ inline bool alt_match(
+ alternates_vector<BidiIter> const &alts
+ , match_state<BidiIter> &state
+ , Next const &
     )
     {
         return detail::any(alts.begin(), alts.end(), alt_match_pred<BidiIter, Next>(state));
     }
 
     template<typename Head, typename Tail, typename BidiIter, typename Next>
- inline bool alt_match
- (
- alternates_list<Head, Tail> const &alts, match_state<BidiIter> &state, Next const &
+ inline bool alt_match(
+ alternates_list<Head, Tail> const &alts
+ , match_state<BidiIter> &state
+ , Next const &
     )
     {
         return fusion::any(alts, alt_match_pred<BidiIter, Next>(state));

Modified: branches/proto/v3/boost/xpressive/detail/core/matcher/literal_matcher.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/core/matcher/literal_matcher.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/core/matcher/literal_matcher.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -33,6 +33,10 @@
         typedef ICase icase_type;
         char_type ch_;
 
+ explicit literal_matcher(char_type ch)
+ : ch_(ch)
+ {}
+
         template<typename Char>
         literal_matcher(Char ch, Traits const &traits)
           : ch_(detail::translate(detail::char_cast<char_type>(ch, traits), traits, icase_type()))

Modified: branches/proto/v3/boost/xpressive/detail/core/matcher/predicate_matcher.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/core/matcher/predicate_matcher.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/core/matcher/predicate_matcher.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -44,7 +44,7 @@
         struct eval_terminal<Expr, reference_wrapper<Arg> >
         {
             typedef Arg &result_type;
- result_type operator()(Expr &expr, predicate_context const &) const
+ result_type operator ()(Expr &expr, predicate_context const &) const
             {
                 return proto::arg(expr).get();
             }
@@ -54,7 +54,7 @@
         struct eval_terminal<Expr, any_matcher>
         {
             typedef sub_match<BidiIter> const &result_type;
- result_type operator()(Expr &, predicate_context const &ctx) const
+ result_type operator ()(Expr &, predicate_context const &ctx) const
             {
                 return ctx.sub_matches_[ctx.sub_];
             }
@@ -64,7 +64,7 @@
         struct eval_terminal<Expr, mark_placeholder>
         {
             typedef sub_match<BidiIter> const &result_type;
- result_type operator()(Expr &expr, predicate_context const &ctx) const
+ result_type operator ()(Expr &expr, predicate_context const &ctx) const
             {
                 return ctx.sub_matches_[proto::arg(expr).mark_number_];
             }

Modified: branches/proto/v3/boost/xpressive/detail/core/peeker.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/core/peeker.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/core/peeker.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -75,7 +75,7 @@
       , traits_(traits)
     {}
 
- void operator()(char_type ch) const
+ void operator ()(char_type ch) const
     {
         this->bset_.set_char(ch, ICase, this->traits_);
     }

Modified: branches/proto/v3/boost/xpressive/detail/detail_fwd.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/detail_fwd.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/detail_fwd.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -384,14 +384,49 @@
     };
     #endif
 
- struct true_ : mpl::true_ {};
- struct false_ : mpl::false_ {};
+ using mpl::true_;
+ using mpl::false_;
 
     typedef true_ greedy_t;
     typedef false_ non_greedy_t;
 
 }}} // namespace boost::xpressive::detail
 
+namespace boost { namespace xpressive { namespace grammar_detail
+{
+ using proto::_;
+ using proto::or_;
+ using proto::if_;
+ using proto::call;
+ using proto::when;
+ using proto::otherwise;
+ using proto::switch_;
+ using proto::make;
+ using proto::_arg;
+ using proto::_left;
+ using proto::_right;
+ using proto::not_;
+ using proto::_state;
+ using proto::_visitor;
+ using proto::callable;
+ using proto::reverse_fold;
+ using proto::reverse_fold_tree;
+ using proto::terminal;
+ using proto::shift_right;
+ using proto::bitwise_or;
+ using proto::logical_not;
+ using proto::dereference;
+ using proto::posit;
+ using proto::negate;
+ using proto::complement;
+ using proto::comma;
+ using proto::assign;
+ using proto::subscript;
+ using proto::unary_expr;
+ using proto::binary_expr;
+ namespace tag = proto::tag;
+}}}
+
 namespace boost { namespace xpressive { namespace op
 {
     struct push;

Modified: branches/proto/v3/boost/xpressive/detail/static/compile.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/static/compile.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/static/compile.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -41,7 +41,7 @@
         // "compile" the regex and wrap it in an xpression_adaptor.
         xpression_visitor<BidiIter, mpl::false_, Traits> visitor(traits, impl);
         intrusive_ptr<matchable_ex<BidiIter> const> adxpr = make_adaptor<matchable_ex<BidiIter> >(
- Grammar<char_type>()(xpr >> end_matcher(), no_next(), visitor)
+ Grammar<char_type>()(xpr, end_xpression(), visitor)
         );
 
         // Link and optimize the regex

Deleted: branches/proto/v3/boost/xpressive/detail/static/grammar.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/static/grammar.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
+++ (empty file)
@@ -1,1041 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// grammar.hpp
-//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_XPRESSIVE_DETAIL_STATIC_GRAMMAR2_HPP_EAN_11_12_2006
-#define BOOST_XPRESSIVE_DETAIL_STATIC_GRAMMAR2_HPP_EAN_11_12_2006
-
-// MS compatible compilers support #pragma once
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/min_max.hpp>
-#include <boost/mpl/next_prior.hpp>
-#include <boost/fusion/include/cons.hpp>
-#include <boost/xpressive/proto/proto.hpp>
-#include <boost/xpressive/proto/transform.hpp>
-#include <boost/xpressive/detail/detail_fwd.hpp>
-#include <boost/xpressive/detail/static/static.hpp>
-#include <boost/xpressive/detail/static/is_pure.hpp>
-
-#define CV(T)\
- typename add_const<T>::type
-
-#define REF(T)\
- typename add_reference<T>::type
-
-#define CVREF(T)\
- REF(CV(T))
-
-#define UNCV(T)\
- typename remove_cv<T>::type
-
-#define UNREF(T)\
- typename remove_reference<T>::type
-
-#define UNCVREF(T)\
- UNCV(UNREF(T))
-
-#define BOOST_XPRESSIVE_CHECK_REGEX(Expr, Char)\
- BOOST_MPL_ASSERT\
- ((\
- typename boost::mpl::if_<\
- boost::xpressive::is_valid_regex<Expr, Char>\
- , boost::mpl::true_\
- , boost::xpressive::INVALID_REGULAR_EXPRESSION\
- >::type\
- ));
-
-//////////////////////////////////////////////////////////////////////////
-//**********************************************************************//
-//* << NOTE! >> *//
-//* *//
-//* Whenever you change this grammar, you MUST also make corresponding *//
-//* changes to width_of.hpp and is_pure.hpp. *//
-//* *//
-//**********************************************************************//
-//////////////////////////////////////////////////////////////////////////
-
-namespace boost { namespace proto
-{
- template<>
- struct is_aggregate<xpressive::detail::mark_placeholder>
- : mpl::true_
- {};
-}}
-
-namespace boost { namespace xpressive
-{
- template<typename Char>
- struct Grammar;
-
- template<typename Char>
- struct ActionableGrammar;
-
- namespace detail
- {
- ///////////////////////////////////////////////////////////////////////////////
- // generic_quant_tag
- template<uint_t Min, uint_t Max>
- struct generic_quant_tag
- {
- typedef mpl::integral_c<uint_t, Min> min_type;
- typedef mpl::integral_c<uint_t, Max> max_type;
- };
-
- ///////////////////////////////////////////////////////////////////////////////
- // min_type / max_type
- template<typename Tag>
- struct min_type : Tag::min_type {};
-
- template<>
- struct min_type<proto::tag::posit> : mpl::integral_c<uint_t, 1> {};
-
- template<>
- struct min_type<proto::tag::dereference> : mpl::integral_c<uint_t, 0> {};
-
- template<>
- struct min_type<proto::tag::logical_not> : mpl::integral_c<uint_t, 0> {};
-
- template<typename Tag>
- struct max_type : Tag::max_type {};
-
- template<>
- struct max_type<proto::tag::posit> : mpl::integral_c<uint_t, UINT_MAX-1> {};
-
- template<>
- struct max_type<proto::tag::dereference> : mpl::integral_c<uint_t, UINT_MAX-1> {};
-
- template<>
- struct max_type<proto::tag::logical_not> : mpl::integral_c<uint_t, 1> {};
-
- ///////////////////////////////////////////////////////////////////////////////
- // alternates_list
- // a fusion-compatible sequence of alternate expressions, that also keeps
- // track of the list's width and purity.
- template<typename Head, typename Tail>
- struct alternates_list
- : fusion::cons<Head, Tail>
- {
- BOOST_STATIC_CONSTANT(std::size_t, width = Head::width == Tail::width ? Head::width : unknown_width::value);
- BOOST_STATIC_CONSTANT(bool, pure = Head::pure && Tail::pure);
-
- alternates_list(Head const &head, Tail const &tail)
- : fusion::cons<Head, Tail>(head, tail)
- {
- }
- };
-
- template<typename Head>
- struct alternates_list<Head, fusion::nil>
- : fusion::cons<Head, fusion::nil>
- {
- BOOST_STATIC_CONSTANT(std::size_t, width = Head::width);
- BOOST_STATIC_CONSTANT(bool, pure = Head::pure);
-
- alternates_list(Head const &head, fusion::nil const &tail)
- : fusion::cons<Head, fusion::nil>(head, tail)
- {
- }
- };
- }
-
- namespace grammar_detail
- {
- using namespace proto;
- using namespace transform;
- using namespace xpressive::detail;
-
- struct MarkedSubExpr
- : proto::assign<terminal<mark_placeholder>, _>
- {};
-
- struct MarkedSubExprEx
- : or_<
- proto::assign<terminal<mark_placeholder>, _>
- , shift_right<terminal<mark_begin_matcher>, _>
- , shift_right<
- terminal<repeat_begin_matcher>
- , shift_right<shift_right<terminal<mark_begin_matcher>, _>, _>
- >
- >
- {};
-
- template<typename Tag>
- struct is_generic_quant_tag
- : mpl::false_
- {};
-
- template<uint_t Min, uint_t Max>
- struct is_generic_quant_tag<generic_quant_tag<Min,Max> >
- : mpl::true_
- {};
-
- struct as_matcher : callable
- {
- template<typename Sig>
- struct result;
-
- template<typename This, typename T, typename Visitor>
- struct result<This(T, Visitor)>
- : remove_reference<Visitor>::type::template apply<UNCVREF(T)>
- {};
-
- template<typename T, typename Visitor>
- typename Visitor::template apply<T>::type
- operator()(T const &t, Visitor &visitor) const
- {
- return visitor.call(t);
- }
- };
-
- struct get_width : callable
- {
- typedef std::size_t result_type;
-
- template<typename Xpr>
- std::size_t operator()(Xpr const &xpr) const
- {
- return xpr.get_width().value();
- }
- };
-
- struct mark_number : callable
- {
- typedef int result_type;
-
- template<typename Expr>
- int operator()(Expr const &expr) const
- {
- return expr.mark_number_;
- }
- };
-
- struct get_hidden_mark : callable
- {
- typedef int result_type;
-
- template<typename Visitor>
- int operator()(Visitor &visitor) const
- {
- return visitor.get_hidden_mark();
- }
- };
-
- struct traits : callable
- {
- template<typename Sig>
- struct result;
-
- template<typename This, typename Visitor>
- struct result<This(Visitor)>
- {
- typedef UNREF(Visitor)::traits_type const &type;
- };
-
- template<typename Visitor>
- typename Visitor::traits_type const &
- operator()(Visitor &visitor) const
- {
- return visitor.traits();
- }
- };
-
- struct newline : callable
- {
- template<typename Sig>
- struct result;
-
- template<typename This, typename Traits>
- struct result<This(Traits)>
- {
- typedef UNREF(Traits)::char_class_type type;
- };
-
- template<typename Traits>
- typename Traits::char_class_type
- operator()(Traits const &traits) const
- {
- return lookup_classname(traits, "newline");
- }
- };
-
- struct as_posix_charset : callable
- {
- template<typename Sig>
- struct result;
-
- template<typename This, typename Posix, typename Visitor, typename YesNo>
- struct result<This(Posix, Visitor, YesNo)>
- {
- typedef posix_charset_matcher<UNREF(Visitor)::traits_type> type;
- };
-
- template<typename Posix, typename Visitor>
- posix_charset_matcher<typename Visitor::traits_type>
- operator()(Posix const &posix, Visitor const &visitor, bool yes_no) const
- {
- char const *name_end = posix.name_ + std::strlen(posix.name_);
- return posix_charset_matcher<typename Visitor::traits_type>(
- visitor.traits().lookup_classname(posix.name_, name_end, Visitor::icase_type::value)
- , yes_no == posix.not_
- );
- }
- };
-
- template<typename Visitor>
- struct icase
- {
- typedef typename Visitor::icase_type type;
- };
-
- // Place a head and a tail in sequence, if it's not
- // already in sequence.
- struct in_sequence
- : if_<
- is_static_xpression<_>()
- , _
- , static_xpression<_, _state>(_, _state)
- >
- {};
-
- ///////////////////////////////////////////////////////////////////////////
- // CharLiteral
- template<typename Char>
- struct CharLiteral
- : proto::or_<
- proto::terminal<char>
- , proto::terminal<Char>
- >
- {};
-
- template<>
- struct CharLiteral<char>
- : proto::terminal<char>
- {};
-
- ///////////////////////////////////////////////////////////////////////////
- // ListSet
- // matches expressions like (set= 'a','b','c')
- // calculates the size of the set
- template<typename Char, typename Dummy = callable>
- struct ListSet
- : or_<
- when<
- comma<ListSet<Char>, CharLiteral<Char> >
- , mpl::next<ListSet<Char>(_left)>()
- >
- , when<
- proto::assign<terminal<set_initializer>, CharLiteral<Char> >
- , mpl::int_<1>()
- >
- >
- {};
-
- struct fill_list_set : callable
- {
- template<typename Sig>
- struct result;
-
- template<typename This, typename Set, typename Expr, typename Visitor>
- struct result<This(Set, Expr, Visitor)>
- {
- typedef UNCVREF(Set) type;
- };
-
- template<typename Set, typename Expr, typename Visitor>
- Set operator()(Set set, Expr const &expr, Visitor &visitor) const
- {
- typename Set::char_type *buffer = set.set_;
- this->fill(buffer, expr, visitor.traits());
- return set;
- }
-
- private:
- template<typename Char, typename Expr, typename Traits>
- void fill(Char *&buffer, Expr const &expr, Traits const &traits) const
- {
- this->fill(buffer, proto::left(expr), traits);
- *buffer++ = traits.translate(
- char_cast<Char>(proto::arg(proto::right(expr)), traits)
- );
- }
-
- template<typename Char, typename Traits>
- void fill(Char *&, set_initializer_type, Traits const &) const
- {}
- };
-
- template<typename T>
- T &uncv(T const &t)
- {
- return const_cast<T &>(t);
- }
-
- struct merge_charset : callable
- {
- template<typename Sig>
- struct result;
-
- template<typename This, typename CharSet, typename Xpr, typename Visitor>
- struct result<This(CharSet, Xpr, Visitor)>
- {
- typedef CVREF(UNREF(CharSet)) type;
- };
-
- template<typename CharSet, typename Traits, typename ICase, typename Not, typename Visitor>
- CharSet const &
- operator()(CharSet const &charset, literal_matcher<Traits, ICase, Not> const &ch, Visitor &visitor) const
- {
- BOOST_MPL_ASSERT_NOT((Not)); // TODO fixme!
- set_char(uncv(charset.charset_), ch.ch_, visitor.traits(), ICase());
- return charset;
- }
-
- template<typename CharSet, typename Traits, typename ICase, typename Visitor>
- CharSet const &
- operator()(CharSet const &charset, range_matcher<Traits, ICase> const &rg, Visitor &visitor) const
- {
- BOOST_ASSERT(!rg.not_); // TODO fixme!
- set_range(uncv(charset.charset_), rg.ch_min_, rg.ch_max_, visitor.traits(), ICase());
- return charset;
- }
-
- template<typename CharSet, typename Traits, typename Size, typename Visitor>
- CharSet const &
- operator()(CharSet const &charset, set_matcher<Traits, Size> const &set_, Visitor &visitor) const
- {
- BOOST_ASSERT(!set_.not_); // TODO fixme!
- for(int i=0; i < Size::value; ++i)
- {
- set_char(uncv(charset.charset_), set_.set_[i], visitor.traits(), Visitor::icase_type::value);
- }
- return charset;
- }
-
- template<typename CharSet, typename Traits, typename Visitor>
- CharSet const &
- operator()(CharSet const &charset, posix_charset_matcher<Traits> const &posix, Visitor &visitor) const
- {
- set_class(uncv(charset.charset_), posix.mask_, posix.not_, visitor.traits());
- return charset;
- }
- };
-
- struct invert : callable
- {
- template<typename Sig>
- struct result;
-
- template<typename This, typename Set>
- struct result<This(Set)>
- {
- typedef UNCVREF(Set) type;
- };
-
- template<typename Set>
- Set operator()(Set set) const
- {
- set.inverse();
- return set;
- }
- };
-
- struct modify : callable
- {
- template<typename Sig>
- struct result;
-
- template<typename This, typename Modifier, typename Visitor>
- struct result<This(Modifier, Visitor)>
- : remove_reference<Modifier>::type::template apply<UNCVREF(Visitor)>
- {};
-
- template<typename Modifier, typename Visitor>
- typename Modifier::template apply<Visitor>::type
- operator()(Modifier const &modifier, Visitor &visitor) const
- {
- return modifier.call(visitor);
- }
- };
-
- struct as_marker
- : call<
- _make_shift_right(
- mark_begin_matcher(mark_number(_arg(_left)))
- , _make_shift_right(
- _right
- , mark_end_matcher(mark_number(_arg(_left)))
- )
- )
- >
- {};
-
- struct add_hidden_mark
- : or_<
- when<MarkedSubExpr, _>
- , otherwise<_make_assign(mark_placeholder(get_hidden_mark(_visitor)), _)>
- >
- {};
-
- ///////////////////////////////////////////////////////////////////////////////
- // FindAttr
- // Look for patterns like (a1= terminal<RHS>) and return the type of the RHS.
- template<typename Nbr>
- struct FindAttr
- : or_<
- // Ignore nested actions, because attributes are scoped
- when< subscript<_, _>, _state >
- , when< terminal<_>, _state >
- , when< proto::assign<terminal<attribute_placeholder<Nbr> >, _>, _arg(_right) >
- , otherwise< fold<_, _state, FindAttr<Nbr> > >
- >
- {};
-
- ///////////////////////////////////////////////////////////////////////////////
- // read_attr
- // Placeholder that knows the slot number of an attribute as well as the type
- // of the object stored in it.
- template<typename Nbr, typename Matcher>
- struct read_attr
- {
- read_attr() {}
- typedef Nbr nbr_type;
- typedef Matcher matcher_type;
- };
-
- template<typename Attr>
- struct attr_number
- {
- typedef typename Attr::nbr_type type;
- };
-
- struct as_read_attr
- : call<
- _make_terminal(
- read_attr<
- attr_number<_>
- , bind<FindAttr<attr_number<_> >(_state, mpl::void_())>
- >()
- )
- >
- {};
-
- ///////////////////////////////////////////////////////////////////////////////
- // DeepCopy
- // Turn all refs into values, and also bind all attribute placeholders with
- // the types from which they are being assigned.
- struct DeepCopy
- : or_<
- when< terminal<attribute_placeholder<_> >, as_read_attr(_arg) >
- , when< terminal<_>, _deep_copy(_) >
- , otherwise< nary_expr<_, vararg<DeepCopy> > >
- >
- {};
-
- ///////////////////////////////////////////////////////////////////////////////
- // MaxAttr
- // In an action (rx)[act], find the largest attribute slot being used.
- struct MaxAttr
- : or_<
- when< terminal<attribute_placeholder<_> >, attr_number<_arg>() >
- , when< terminal<_>, mpl::int_<0>() >
- // Ignore nested actions, because attributes are scoped:
- , when< subscript<_, _>, mpl::int_<0>() >
- , otherwise< fold<_, mpl::int_<0>(), mpl::max<MaxAttr, _state>() > >
- >
- {};
-
- // _expr is (a1 = sym)
- struct as_attr_matcher
- : make<
- attr_matcher<
- _arg(_right)
- , traits(_visitor)
- , icase<_visitor>
- >(attr_number<_arg(_left)>(), _arg(_right), traits(_visitor))
- >
- {};
-
- struct add_attrs
- : call<
- _make_shift_right(
- attr_begin_matcher<MaxAttr>()
- , _make_shift_right(
- _
- , attr_end_matcher()
- )
- )
- >
- {};
-
- ///////////////////////////////////////////////////////////////////////////////
- // add_attrs_if
- struct add_attrs_if
- : if_<MaxAttr, add_attrs, _>
- {};
-
- ///////////////////////////////////////////////////////////////////////////////
- // CheckAssertion
- struct CheckAssertion
- : proto::function<terminal<check_tag>, _>
- {};
-
- ///////////////////////////////////////////////////////////////////////////////
- // action_transform
- // Turn A[B] into (mark_begin(n) >> A >> mark_end(n) >> action_matcher<B>(n))
- // If A and B use attributes, wrap the above expression in
- // a attr_begin_matcher<Count> / attr_end_matcher pair, where Count is
- // the number of attribute slots used by the pattern/action.
- struct as_action
- : call<
- add_attrs_if(
- _make_shift_right(
- _left
- , _make_terminal(
- or_<
- when<
- subscript<_, CheckAssertion>
- , predicate_matcher<DeepCopy(_right, _left)>(
- DeepCopy(_right, _left)
- , mark_number(_arg(_left(_left)))
- )
- >
- , otherwise<
- action_matcher<DeepCopy(_right, _left)>(
- DeepCopy(_right, _left)
- , mark_number(_arg(_left(_left)))
- )
- >
- >
- )
- )
- )
- >
- {};
-
- ///////////////////////////////////////////////////////////////////////////
- // Cases
- template<typename Char, typename Gram>
- struct Cases
- {
- // Some simple grammars...
- struct GenericQuant
- : and_<
- if_<is_generic_quant_tag<tag_of<_> >()>
- , unary_expr<_, Gram>
- >
- {};
-
- // Here are some transforms ...
- typedef
- call<Gram>
- as_regex;
-
- typedef
- call<as_regex(_make_shift_right(_, true_matcher()), no_next())>
- as_independent;
-
- typedef
- call<as_regex(_make_shift_right(_, alternate_end_matcher()), no_next())>
- as_alternate;
-
- typedef
- reverse_fold_tree<
- _
- , fusion::nil()
- , alternates_list<as_alternate, _state>(as_alternate, _state)
- >
- as_alternates_list;
-
- template<typename Greedy, typename Tag, typename Base = callable>
- struct as_repeater
- : call<
- _make_shift_right(
- repeat_begin_matcher(mark_number(_arg(_left)))
- , _make_shift_right(
- _
- , repeat_end_matcher<Greedy>(
- mark_number(_arg(_left))
- , min_type<Tag>()
- , max_type<Tag>()
- )
- )
- )
- >
- {};
-
- template<typename Greedy, typename Tag, uint_t = min_type<Tag>::value, uint_t = max_type<Tag>::value>
- struct as_default_repeat_impl
- : call<as_repeater<Greedy, Tag>(as_marker(add_hidden_mark(_arg)))>
- {};
-
- template<typename Greedy, typename Tag, uint_t Max>
- struct as_default_repeat_impl<Greedy, Tag, 0, Max>
- : if_<
- Greedy()
- , _make_logical_not(as_default_repeat_impl<Greedy, generic_quant_tag<1, Max> >)
- , _make_negate(_make_logical_not(as_default_repeat_impl<Greedy, generic_quant_tag<1, Max> >))
- >
- {};
-
- template<typename Greedy, typename Tag>
- struct as_default_repeat_impl<Greedy, Tag, 0, 1>
- : if_<
- Greedy()
- , _make_logical_not(_arg)
- , _make_negate(_make_logical_not(_arg))
- >
- {};
-
- template<typename Greedy, typename Tag , typename Base = callable >
- struct as_default_repeat
- : as_default_repeat_impl<Greedy, Tag>
- {};
-
- template<typename Greedy , typename Base = callable >
- struct as_simple_repeat
- : make<
- simple_repeat_matcher<as_independent(_arg), Greedy>(
- as_independent(_arg)
- , min_type<tag_of<_> >()
- , max_type<tag_of<_> >()
- , get_width(as_independent(_arg))
- )
- >
- {};
-
- template<typename Greedy, typename Base = callable>
- struct as_repeat
- : if_<
- use_simple_repeat<_arg, Char>()
- , as_simple_repeat<Greedy>
- , as_regex(bind<as_default_repeat<Greedy, tag_of<_> > >)
- >
- {};
-
- template<typename Greedy, typename Base = callable>
- struct as_optional
- // BUGBUG if_< matches<_, Foo>() ... Foo can be treated as a transform!
- : or_<
- when<
- MarkedSubExprEx
- , optional_mark_matcher<as_alternate, Greedy>(as_alternate, mark_number(_arg(_left)))
- >
- , otherwise<
- optional_matcher<as_alternate, Greedy>(as_alternate)
- >
- >
- {};
-
- typedef
- call<
- fill_list_set(
- set_matcher<traits(_visitor), ListSet<Char> >()
- , _
- , _visitor
- )
- >
- as_list_set;
-
- typedef
- fold_tree<
- _
- , charset_matcher<
- traits(_visitor)
- , icase<_visitor>
- , if_<
- is_narrow_char<Char>()
- , basic_chset<Char>()
- , compound_charset<traits(_visitor)>()
- >
- >()
- , merge_charset(_state, as_regex(_make_shift_right(_, end_matcher()), no_next()), _visitor)
- >
- as_set;
-
- // Here are the cases, which use the transforms defined above.
- template<typename Tag, typename Dummy = void>
- struct case_
- : not_<_>
- {};
-
- template<typename Dummy>
- struct case_<tag::terminal, Dummy>
- // 'a'
- : when<_, as_matcher(_arg, _visitor)>
- {};
-
- template<typename Dummy>
- struct case_<tag::shift_right, Dummy>
- : when<
- // _ >> 'a'
- shift_right<Gram, Gram>
- , reverse_fold_tree<_, _state, in_sequence(as_regex)>
- >
- {};
-
- template<typename Dummy>
- struct case_<tag::bitwise_or, Dummy>
- : when<
- // _ | 'a'
- bitwise_or<Gram, Gram>
- , alternate_matcher<as_alternates_list, traits(_visitor)>(as_alternates_list)
- >
- {};
-
- template<typename Dummy>
- struct case_<tag::dereference, Dummy>
- // *_
- : when<dereference<Gram>, as_repeat<greedy_t> >
- {};
-
- template<typename Dummy>
- struct case_<tag::posit, Dummy>
- // +_
- : when<posit<Gram>, as_repeat<greedy_t> >
- {};
-
- template<uint_t Min, uint_t Max, typename Dummy>
- struct case_<generic_quant_tag<Min, Max>, Dummy>
- // repeat<0,42>(_)
- : when<unary_expr<generic_quant_tag<Min, Max>, Gram>, as_repeat<greedy_t> >
- {};
-
- template<typename Dummy>
- struct case_<tag::logical_not, Dummy>
- // !_
- : when<logical_not<Gram>, as_optional<greedy_t>(_arg)>
- {};
-
- template<typename Dummy>
- struct case_<tag::negate, Dummy>
- : or_<
- // -*_
- when<negate<dereference<Gram> > , as_repeat<non_greedy_t>(_arg)>
- // -+_
- , when<negate<posit<Gram> > , as_repeat<non_greedy_t>(_arg)>
- // -repeat<0,42>(_)
- , when<negate<GenericQuant> , as_repeat<non_greedy_t>(_arg)>
- // -!_
- , when<negate<logical_not<Gram> > , as_optional<non_greedy_t>(_arg(_arg))>
- >
- {};
-
- template<typename Dummy>
- struct case_<tag::assign, Dummy>
- : or_<
- // (s1= ...)
- when<proto::assign<terminal<mark_placeholder>, Gram>, as_regex(as_marker)>
- // (set= 'a')
- , when<ListSet<Char>, as_matcher(_arg(_right), _visitor)>
- >
- {};
-
- template<typename Dummy>
- struct case_<tag::comma, Dummy>
- // (set= 'a','b','c')
- : when<ListSet<Char>, as_list_set>
- {};
-
- template<typename Dummy>
- struct case_<keeper_tag, Dummy>
- : when<
- // keep(...)
- unary_expr<keeper_tag, Gram>
- , keeper_matcher<as_independent(_arg)>(as_independent(_arg))
- >
- {};
-
- template<typename Dummy>
- struct case_<lookahead_tag, Dummy>
- : when<
- // before(...)
- unary_expr<lookahead_tag, Gram>
- , lookahead_matcher<as_independent(_arg)>(as_independent(_arg), false_())
- >
- {};
-
- template<typename Dummy>
- struct case_<lookbehind_tag, Dummy>
- : when<
- // after(...)
- unary_expr<lookbehind_tag, Gram>
- , lookbehind_matcher<as_independent(_arg)>(
- as_independent(_arg)
- , get_width(as_independent(_arg))
- , false_()
- )
- >
- {};
-
- template<typename Dummy>
- struct case_<tag::complement, Dummy>
- : or_<
- // ~_b
- when<
- complement<terminal<assert_word_placeholder<word_boundary<true_> > > >
- , assert_word_matcher<word_boundary<false_>, traits(_visitor)>(traits(_visitor))
- >
- // ~_n
- , when<
- complement<CharLiteral<Char> >
- , literal_matcher<traits(_visitor), icase<_visitor>, true_>(_arg(_arg), traits(_visitor))
- >
- // ~_ln
- , when<
- complement<terminal<logical_newline_placeholder> >
- , posix_charset_matcher<traits(_visitor)>(newline(traits(_visitor)), true_())
- >
- // ~alpha
- , when<
- complement<terminal<posix_charset_placeholder> >
- , as_posix_charset(_arg(_arg), _visitor, false_())
- >
- // ~range('a','z')
- , when<
- complement<terminal<range_placeholder<_> > >
- , range_matcher<traits(_visitor), icase<_visitor> >(_arg(_arg), true_())
- >
- // ~before(...)
- , when<
- complement<unary_expr<lookahead_tag, Gram> >
- , lookahead_matcher<as_independent(_arg(_arg))>(
- as_independent(_arg(_arg))
- , true_()
- )
- >
- // ~after(...)
- , when<
- complement<unary_expr<lookbehind_tag, Gram> >
- , lookbehind_matcher<as_independent(_arg(_arg))>(
- as_independent(_arg(_arg))
- , get_width(as_independent(_arg(_arg)))
- , true_()
- )
- >
- // ~set[~alpha]
- , when<
- complement<subscript<terminal<set_initializer>, complement<terminal<_> > > >
- , as_matcher(_arg(_arg(_right(_arg))), _visitor)
- >
- // ~set['a'] or ~(set='a')
- , when<
- or_<
- complement<subscript<terminal<set_initializer>, terminal<_> > >
- , complement<proto::assign<terminal<set_initializer>, terminal<_> > >
- >
- , as_regex(_make_complement(_right(_arg)))
- >
- // ~set['a' | alpha | ... ] or ~(set='a','b','c')
- , when<
- or_<
- complement<subscript<terminal<set_initializer>, bitwise_or<Gram, Gram> > >
- , complement<ListSet<Char> >
- >
- , invert(as_regex(_arg))
- >
- >
- {};
-
- template<typename Dummy>
- struct case_<tag::subscript, Dummy>
- : or_<
- // set['a' | alpha | ... ]
- when<
- subscript<terminal<set_initializer>, bitwise_or<Gram, Gram> >
- , as_set(_right)
- >
- // set['a']
- , when<
- subscript<terminal<set_initializer>, terminal<_> >
- , as_matcher(_arg(_right), _visitor)
- >
- // set[~alpha]
- , when<
- subscript<terminal<set_initializer>, complement<terminal<_> > >
- , as_regex(_right)
- >
- , when<
- subscript<ActionableGrammar<Char>, _>
- , call<ActionableGrammar<Char>(as_action(_make_subscript(add_hidden_mark(_left), _right)))>
- >
- >
- {};
-
- template<typename Dummy>
- struct case_<modifier_tag, Dummy>
- : when<
- binary_expr<modifier_tag, terminal<_>, Gram>
- , as_regex(_right, _state, modify(_arg(_left), _visitor))
- >
- {};
- };
-
- ///////////////////////////////////////////////////////////////////////////
- // ActionableCases
- template<typename Char, typename Gram>
- struct ActionableCases
- {
- template<typename Tag, typename Dummy = void>
- struct case_
- : Cases<Char, Gram>::template case_<Tag>
- {};
-
- // Only in sub-expressions with actions attached do we allow attribute assignements
- template<typename Dummy>
- struct case_<tag::assign, Dummy>
- : or_<
- typename Cases<Char, Gram>::template case_<tag::assign>
- , when<
- proto::assign<terminal<attribute_placeholder<_> >, _>
- , as_attr_matcher
- >
- >
- {};
- };
- } // namespace detail
-
- ///////////////////////////////////////////////////////////////////////////
- // Grammar
- template<typename Char>
- struct Grammar
- : proto::switch_<grammar_detail::Cases<Char, Grammar<Char> > >
- {};
-
- template<typename Char>
- struct ActionableGrammar
- : proto::switch_<grammar_detail::ActionableCases<Char, ActionableGrammar<Char> > >
- {};
-
- ///////////////////////////////////////////////////////////////////////////
- // INVALID_REGULAR_EXPRESSION
- struct INVALID_REGULAR_EXPRESSION
- : mpl::false_
- {};
-
- ///////////////////////////////////////////////////////////////////////////
- // is_valid_regex
- template<typename Expr, typename Char>
- struct is_valid_regex
- : proto::matches<Expr, Grammar<Char> >
- {};
-
-}} // namespace boost::xpressive
-
-#undef CV
-#undef REF
-#undef CVREF
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
-
-#endif

Copied: branches/proto/v3/boost/xpressive/detail/static/grammar2.hpp (from r42450, /branches/proto/v3/boost/xpressive/detail/static/grammar.hpp)
==============================================================================
--- /branches/proto/v3/boost/xpressive/detail/static/grammar.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/static/grammar2.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -191,7 +191,7 @@
 
             template<typename T, typename Visitor>
             typename Visitor::template apply<T>::type
- operator()(T const &t, Visitor &visitor) const
+ operator ()(T const &t, Visitor &visitor) const
             {
                 return visitor.call(t);
             }
@@ -202,7 +202,7 @@
             typedef std::size_t result_type;
 
             template<typename Xpr>
- std::size_t operator()(Xpr const &xpr) const
+ std::size_t operator ()(Xpr const &xpr) const
             {
                 return xpr.get_width().value();
             }
@@ -213,7 +213,7 @@
             typedef int result_type;
 
             template<typename Expr>
- int operator()(Expr const &expr) const
+ int operator ()(Expr const &expr) const
             {
                 return expr.mark_number_;
             }
@@ -224,7 +224,7 @@
             typedef int result_type;
 
             template<typename Visitor>
- int operator()(Visitor &visitor) const
+ int operator ()(Visitor &visitor) const
             {
                 return visitor.get_hidden_mark();
             }
@@ -243,7 +243,7 @@
 
             template<typename Visitor>
             typename Visitor::traits_type const &
- operator()(Visitor &visitor) const
+ operator ()(Visitor &visitor) const
             {
                 return visitor.traits();
             }
@@ -262,7 +262,7 @@
 
             template<typename Traits>
             typename Traits::char_class_type
- operator()(Traits const &traits) const
+ operator ()(Traits const &traits) const
             {
                 return lookup_classname(traits, "newline");
             }
@@ -281,7 +281,7 @@
 
             template<typename Posix, typename Visitor>
             posix_charset_matcher<typename Visitor::traits_type>
- operator()(Posix const &posix, Visitor const &visitor, bool yes_no) const
+ operator ()(Posix const &posix, Visitor const &visitor, bool yes_no) const
             {
                 char const *name_end = posix.name_ + std::strlen(posix.name_);
                 return posix_charset_matcher<typename Visitor::traits_type>(
@@ -352,7 +352,7 @@
             };
 
             template<typename Set, typename Expr, typename Visitor>
- Set operator()(Set set, Expr const &expr, Visitor &visitor) const
+ Set operator ()(Set set, Expr const &expr, Visitor &visitor) const
             {
                 typename Set::char_type *buffer = set.set_;
                 this->fill(buffer, expr, visitor.traits());
@@ -393,7 +393,7 @@
 
             template<typename CharSet, typename Traits, typename ICase, typename Not, typename Visitor>
             CharSet const &
- operator()(CharSet const &charset, literal_matcher<Traits, ICase, Not> const &ch, Visitor &visitor) const
+ operator ()(CharSet const &charset, literal_matcher<Traits, ICase, Not> const &ch, Visitor &visitor) const
             {
                 BOOST_MPL_ASSERT_NOT((Not)); // TODO fixme!
                 set_char(uncv(charset.charset_), ch.ch_, visitor.traits(), ICase());
@@ -402,7 +402,7 @@
 
             template<typename CharSet, typename Traits, typename ICase, typename Visitor>
             CharSet const &
- operator()(CharSet const &charset, range_matcher<Traits, ICase> const &rg, Visitor &visitor) const
+ operator ()(CharSet const &charset, range_matcher<Traits, ICase> const &rg, Visitor &visitor) const
             {
                 BOOST_ASSERT(!rg.not_); // TODO fixme!
                 set_range(uncv(charset.charset_), rg.ch_min_, rg.ch_max_, visitor.traits(), ICase());
@@ -411,7 +411,7 @@
 
             template<typename CharSet, typename Traits, typename Size, typename Visitor>
             CharSet const &
- operator()(CharSet const &charset, set_matcher<Traits, Size> const &set_, Visitor &visitor) const
+ operator ()(CharSet const &charset, set_matcher<Traits, Size> const &set_, Visitor &visitor) const
             {
                 BOOST_ASSERT(!set_.not_); // TODO fixme!
                 for(int i=0; i < Size::value; ++i)
@@ -423,7 +423,7 @@
 
             template<typename CharSet, typename Traits, typename Visitor>
             CharSet const &
- operator()(CharSet const &charset, posix_charset_matcher<Traits> const &posix, Visitor &visitor) const
+ operator ()(CharSet const &charset, posix_charset_matcher<Traits> const &posix, Visitor &visitor) const
             {
                 set_class(uncv(charset.charset_), posix.mask_, posix.not_, visitor.traits());
                 return charset;
@@ -442,7 +442,7 @@
             };
 
             template<typename Set>
- Set operator()(Set set) const
+ Set operator ()(Set set) const
             {
                 set.inverse();
                 return set;
@@ -461,7 +461,7 @@
 
             template<typename Modifier, typename Visitor>
             typename Modifier::template apply<Visitor>::type
- operator()(Modifier const &modifier, Visitor &visitor) const
+ operator ()(Modifier const &modifier, Visitor &visitor) const
             {
                 return modifier.call(visitor);
             }

Modified: branches/proto/v3/boost/xpressive/detail/static/is_pure.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/static/is_pure.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/static/is_pure.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -140,7 +140,7 @@
       : mpl::true_
     {};
 
- // The subscript operator[] is used for sets, as in set['a' | range('b','h')]
+ // The subscript operator [] is used for sets, as in set['a' | range('b','h')]
     // It is also used for actions, which by definition have side-effects and thus are impure
     template<typename Expr, typename Char, typename Left>
     struct use_simple_repeat_subscript

Modified: branches/proto/v3/boost/xpressive/detail/static/modifier.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/static/modifier.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/static/modifier.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -32,14 +32,14 @@
 
         template<typename Expr>
         struct apply
- : proto::result_of::make_expr_ref<modifier_tag, Modifier, Expr const>
+ : proto::result_of::make_expr_ref<modifier_tag, proto::default_domain, Modifier, Expr const &>
         {};
 
         template<typename Expr>
- typename proto::result_of::make_expr_ref<modifier_tag, Modifier, Expr const>::type
+ typename proto::result_of::make_expr_ref<modifier_tag, Modifier, Expr const &>::type
         operator ()(Expr const &expr) const
         {
- return proto::make_expr_ref<modifier_tag>(this->mod_, expr);
+ return proto::result_of::make_expr_ref<modifier_tag, proto::default_domain, Modifier, Expr const &>::call(this->mod_, expr);
         }
 
         operator opt_type() const

Modified: branches/proto/v3/boost/xpressive/detail/static/width_of.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/static/width_of.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/static/width_of.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -233,7 +233,7 @@
       : mpl::size_t<1>
     {};
 
- // The subscript operator[] is used for sets, as in set['a' | range('b','h')],
+ // The subscript operator [] is used for sets, as in set['a' | range('b','h')],
     // or for actions as in (any >> expr)[ action ]
     template<typename Expr, typename Char, typename Left>
     struct width_of_subscript

Modified: branches/proto/v3/boost/xpressive/detail/utility/any.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/utility/any.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/utility/any.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -74,7 +74,7 @@
 
             template <typename Sequence, typename F>
             inline bool
- operator()(Sequence const& seq, F const& f) const
+ operator ()(Sequence const& seq, F const& f) const
             {
                 return detail::any(
                         fusion::begin(seq)
@@ -87,7 +87,7 @@
 
             template <typename Sequence, typename F>
             inline bool
- operator()(Sequence& seq, F const& f) const
+ operator ()(Sequence& seq, F const& f) const
             {
                 return detail::any(
                         fusion::begin(seq)

Modified: branches/proto/v3/boost/xpressive/detail/utility/chset/range_run.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/utility/chset/range_run.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/utility/chset/range_run.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -46,7 +46,7 @@
 template<typename Char>
 struct range_compare
 {
- bool operator()(range<Char> const &x, range<Char> const &y) const
+ bool operator ()(range<Char> const &x, range<Char> const &y) const
     {
         return x.first_ < y.first_;
     }

Modified: branches/proto/v3/boost/xpressive/detail/utility/traits_utils.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/utility/traits_utils.hpp (original)
+++ branches/proto/v3/boost/xpressive/detail/utility/traits_utils.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -55,7 +55,7 @@
           : traits_(traits)
         {}
 
- result_type operator()(char ch) const
+ result_type operator ()(char ch) const
         {
             return this->traits_.widen(ch);
         }
@@ -77,7 +77,7 @@
         BOOST_MPL_ASSERT((is_same<FromChar, char>));
         typedef To const result_type;
         template<typename Traits>
- result_type operator()(From const &from, Traits const &traits) const
+ result_type operator ()(From const &from, Traits const &traits) const
         {
             widen_fun<Traits> widen(traits);
             To to(
@@ -93,7 +93,7 @@
     {
         typedef To const result_type;
         template<typename Traits>
- result_type operator()(From const &from, Traits const &) const
+ result_type operator ()(From const &from, Traits const &) const
         {
             To to(detail::data_begin(from), detail::data_end(from));
             return to;
@@ -105,7 +105,7 @@
     {
         typedef From const &result_type;
         template<typename Traits>
- result_type operator()(From const &from, Traits const &) const
+ result_type operator ()(From const &from, Traits const &) const
         {
             return from;
         }

Modified: branches/proto/v3/boost/xpressive/match_results.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/match_results.hpp (original)
+++ branches/proto/v3/boost/xpressive/match_results.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -55,7 +55,7 @@
 //
 struct type_info_less
 {
- bool operator()(std::type_info const *left, std::type_info const *right) const
+ bool operator ()(std::type_info const *left, std::type_info const *right) const
     {
         return 0 != left->before(*right);
     }

Modified: branches/proto/v3/boost/xpressive/proto/args.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/args.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/args.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -11,12 +11,20 @@
     #define BOOST_PROTO_ARGS_HPP_EAN_10_28_2007
 
     #include <utility>
+ #include <boost/config.hpp>
     #include <boost/mpl/assert.hpp>
     #include <boost/type_traits.hpp>
     #include <boost/utility/result_of.hpp>
     #include <boost/xpressive/proto/proto_fwd.hpp>
     #include <boost/xpressive/proto/detail/define.hpp>
 
+ #if BOOST_MSVC
+ #pragma warning(push)
+ #pragma warning(disable : 4510) // default constructor could not be generated
+ #pragma warning(disable : 4512) // assignment operator could not be generated
+ #pragma warning(disable : 4610) // can never be instantiated - user defined constructor required
+ #endif
+
     namespace boost { namespace proto
     {
 
@@ -127,6 +135,10 @@
 
     #include <boost/xpressive/proto/detail/undef.hpp>
 
+ #if BOOST_MSVC
+ #pragma warning(pop)
+ #endif
+
     #endif
 
 #else

Modified: branches/proto/v3/boost/xpressive/proto/context/callable.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/context/callable.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/context/callable.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -32,7 +32,7 @@
 
         struct private_type_
         {
- private_type_ const &operator,(int) const;
+ private_type_ const &operator ,(int) const;
         };
 
         template<typename T>

Modified: branches/proto/v3/boost/xpressive/proto/context/default.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/context/default.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/context/default.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -183,7 +183,7 @@
             typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0; \
         public: \
             BOOST_PROTO_DECLTYPE_(Op proto::detail::make<r0>(), result_type) \
- result_type operator()(Expr &expr, Context &ctx) const \
+ result_type operator ()(Expr &expr, Context &ctx) const \
             { \
                 return Op proto::eval(proto::arg_c<0>(expr), ctx); \
             } \
@@ -203,7 +203,7 @@
             typedef typename proto::result_of::eval<UNREF(e1), Context>::type r1; \
         public: \
             BOOST_PROTO_DECLTYPE_(proto::detail::make<r0>() Op proto::detail::make<r1>(), result_type)\
- result_type operator()(Expr &expr, Context &ctx) const \
+ result_type operator ()(Expr &expr, Context &ctx) const \
             { \
                 return proto::eval(proto::arg_c<0>(expr), ctx) Op proto::eval(proto::arg_c<1>(expr), ctx);\
             } \
@@ -256,7 +256,7 @@
         {
             typedef typename proto::result_of::arg<Expr>::type result_type;
 
- result_type operator()(Expr &expr, Context &) const
+ result_type operator ()(Expr &expr, Context &) const
             {
                 return proto::arg(expr);
             }
@@ -271,7 +271,7 @@
             typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0;
         public:
             BOOST_PROTO_DECLTYPE_(proto::detail::make<r0>() ++, result_type)
- result_type operator()(Expr &expr, Context &ctx) const
+ result_type operator ()(Expr &expr, Context &ctx) const
             {
                 return proto::eval(proto::arg_c<0>(expr), ctx) ++;
             }
@@ -286,7 +286,7 @@
             typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0;
         public:
             BOOST_PROTO_DECLTYPE_(proto::detail::make<r0>() --, result_type)
- result_type operator()(Expr &expr, Context &ctx) const
+ result_type operator ()(Expr &expr, Context &ctx) const
             {
                 return proto::eval(proto::arg_c<0>(expr), ctx) --;
             }
@@ -303,7 +303,7 @@
             typedef typename proto::result_of::eval<UNREF(e1), Context>::type r1;
         public:
             BOOST_PROTO_DECLTYPE_(proto::detail::make<r0>()[proto::detail::make<r1>()], result_type)
- result_type operator()(Expr &expr, Context &ctx) const
+ result_type operator ()(Expr &expr, Context &ctx) const
             {
                 return proto::eval(proto::arg_c<0>(expr), ctx)[proto::eval(proto::arg_c<1>(expr), ctx)];
             }
@@ -327,7 +327,7 @@
               : proto::detail::make<r2>()
               , result_type
             )
- result_type operator()(Expr &expr, Context &ctx) const
+ result_type operator ()(Expr &expr, Context &ctx) const
             {
                 return proto::eval(proto::arg_c<0>(expr), ctx)
                      ? proto::eval(proto::arg_c<1>(expr), ctx)
@@ -346,7 +346,7 @@
             typedef typename proto::result_of::eval<UNREF(e1), Context>::type r1;
         public:
             typedef typename proto::detail::comma_result<r0, r1>::type result_type;
- result_type operator()(Expr &expr, Context &ctx) const
+ result_type operator ()(Expr &expr, Context &ctx) const
             {
                 return proto::eval(proto::arg_c<0>(expr), ctx), proto::eval(proto::arg_c<1>(expr), ctx);
             }

Modified: branches/proto/v3/boost/xpressive/proto/context/null.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/context/null.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/context/null.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -26,7 +26,7 @@
         struct null_eval
         {
             typedef void result_type;
- void operator()(Expr &expr, Context &ctx) const
+ void operator ()(Expr &expr, Context &ctx) const
             {
                 this->call_(expr.proto_base().proto_args_, ctx);
             }
@@ -47,7 +47,7 @@
         struct null_eval<Expr, Context, 0>
         {
             typedef void result_type;
- void operator()(Expr &, Context &) const
+ void operator ()(Expr &, Context &) const
             {}
         };
 

Modified: branches/proto/v3/boost/xpressive/proto/debug.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/debug.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/debug.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -30,7 +30,7 @@
         namespace hidden_detail_
         {
             typedef char (&not_ostream)[sizeof(std::ostream)+1];
- not_ostream operator<<(std::ostream &, proto::detail::dont_care);
+ not_ostream operator <<(std::ostream &, proto::detail::dont_care);
 
             template<typename Tag, std::size_t S>
             struct printable_tag_
@@ -125,7 +125,7 @@
             {}
 
             template<typename Args>
- void operator()(expr<tag::terminal, Args, 0> const &expr) const
+ void operator ()(expr<tag::terminal, Args, 0> const &expr) const
             {
                 this->sout_ << std::setw(this->depth_) << (this->first_? "" : ", ")
                     << "terminal(" << proto::arg(expr) << ")\n";
@@ -133,7 +133,7 @@
             }
 
             template<typename Tag, typename Args, long N>
- void operator()(expr<Tag, Args, N> const &expr) const
+ void operator ()(expr<Tag, Args, N> const &expr) const
             {
                 using namespace tag;
                 this->sout_ << std::setw(this->depth_) << (this->first_? "" : ", ")
@@ -145,12 +145,14 @@
             }
 
             template<typename T>
- void operator()(T const &t) const
+ void operator ()(T const &t) const
             {
                 (*this)(t.proto_base());
             }
 
         private:
+ display_expr &operator=(display_expr const &);
+
             static void call_(display_expr &, argsns_::nil)
             {}
 

Modified: branches/proto/v3/boost/xpressive/proto/deep_copy.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/deep_copy.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/deep_copy.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -53,7 +53,7 @@
 
             template<typename Expr>
             typename result_of::deep_copy<Expr>::type const
- operator()(Expr const &expr) const
+ operator ()(Expr const &expr) const
             {
                 return result_of::deep_copy<Expr>::call(expr);
             }

Modified: branches/proto/v3/boost/xpressive/proto/detail/bind.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/detail/bind.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/detail/bind.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -31,7 +31,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<bind(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 return call<
                     typename boost::result_of<make<Return>(Expr const &, State const &, Visitor &)>::type(BOOST_PP_ENUM_PARAMS(N, A))

Modified: branches/proto/v3/boost/xpressive/proto/detail/call.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/detail/call.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/detail/call.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -33,7 +33,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<call(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 Fun f;
                 #define TMP(Z, M, DATA) when<_, BOOST_PP_CAT(A, M)>()(expr, state, visitor)

Modified: branches/proto/v3/boost/xpressive/proto/detail/fun_call_ex.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/detail/fun_call_ex.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/detail/fun_call_ex.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -8,13 +8,14 @@
     // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
     #define M1(Z, N, _) ((0)(1))
+ //#define M1(Z, N, _) ((1))
 
     #define M2(R, PRODUCT) M3(R, BOOST_PP_SEQ_SIZE(PRODUCT), PRODUCT)
 
     #define M3(R, SIZE, PRODUCT) \
         template<BOOST_PP_ENUM_PARAMS(SIZE, typename A)> \
         expr<tag::function, args<expr &, BOOST_PP_SEQ_FOR_EACH_I_R(R, M5, ~, PRODUCT)> > const \
- operator()(BOOST_PP_SEQ_FOR_EACH_I_R(R, M4, ~, PRODUCT)) \
+ operator ()(BOOST_PP_SEQ_FOR_EACH_I_R(R, M4, ~, PRODUCT)) \
         { \
             typedef args<expr &, BOOST_PP_SEQ_FOR_EACH_I_R(R, M5, ~, PRODUCT)> args_type; \
             expr<tag::function, args_type> that = { \
@@ -28,7 +29,7 @@
                                                                                                     \
         template<BOOST_PP_ENUM_PARAMS(SIZE, typename A)> \
         expr<tag::function, args<expr const &, BOOST_PP_SEQ_FOR_EACH_I_R(R, M5, ~, PRODUCT)> > const\
- operator()(BOOST_PP_SEQ_FOR_EACH_I_R(R, M4, ~, PRODUCT)) const \
+ operator ()(BOOST_PP_SEQ_FOR_EACH_I_R(R, M4, ~, PRODUCT)) const \
         { \
             typedef args<expr const &, BOOST_PP_SEQ_FOR_EACH_I_R(R, M5, ~, PRODUCT)> args_type; \
             expr<tag::function, args_type> that = { \

Modified: branches/proto/v3/boost/xpressive/proto/detail/make.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/detail/make.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/detail/make.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -83,7 +83,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<make(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 typedef typename result<make(Expr const &, State const &, Visitor &)>::type result_type;
                 return detail::construct<result_type>(
@@ -106,7 +106,7 @@
             };
 
             template<typename Expr, typename State, typename Visitor>
- expr<Tag, Args, Arity> operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ expr<Tag, Args, Arity> operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 return proto::construct<proto::expr<Tag, Args, Arity> >(
                     #define TMP(Z, M, DATA) detail::as_lvalue(when<_, BOOST_PP_CAT(A, M)>()(expr, state, visitor))

Modified: branches/proto/v3/boost/xpressive/proto/detail/make_expr_ex.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/detail/make_expr_ex.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/detail/make_expr_ex.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -8,6 +8,7 @@
     // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
     #define M1(Z, N, _) ((0)(1))
+ //#define M1(Z, N, _) ((1))
 
     #define M2(R, PRODUCT) M3(R, BOOST_PP_SEQ_SIZE(PRODUCT), PRODUCT)
 

Modified: branches/proto/v3/boost/xpressive/proto/detail/nary_expr.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/detail/nary_expr.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/detail/nary_expr.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -45,7 +45,7 @@
 
                 template<typename Expr, typename State, typename Visitor>
                 typename result<nary_expr(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
                 {
                     typedef result<nary_expr(Expr const &, State const &, Visitor &)> result_;
                     typename result_::type that = {
@@ -100,7 +100,7 @@
 
                 template<typename Expr, typename State, typename Visitor>
                 typename result<nary_expr(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
                 {
                     typedef result<nary_expr(Expr const &, State const &, Visitor &)> result_;
                     typename result_::type that = {

Modified: branches/proto/v3/boost/xpressive/proto/detail/when.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/detail/when.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/detail/when.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -42,7 +42,7 @@
 
         template<typename Expr, typename State, typename Visitor>
         typename result<when(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
         {
             return typename mpl::if_<
                 is_callable<Return>

Modified: branches/proto/v3/boost/xpressive/proto/expr.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/expr.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/expr.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -76,7 +76,7 @@
 
             template<typename A>
             expr<tag::assign, args<expr &, typename result_of::as_expr_ref<A>::type> > const
- operator=(A &&a)
+ operator =(A &&a)
             {
                 expr<tag::assign, args<expr &, typename result_of::as_expr_ref<A>::type> > that =
                     {{*this, {result_of::as_expr_ref<A>::call(a)}}};
@@ -85,7 +85,7 @@
 
             template<typename A>
             expr<tag::assign, args<expr const &, typename result_of::as_expr_ref<A>::type> > const
- operator=(A &&a) const
+ operator =(A &&a) const
             {
                 expr<tag::assign, args<expr const &, typename result_of::as_expr_ref<A>::type> > that =
                     {{*this, {result_of::as_expr_ref<A>::call(a)}}};
@@ -94,7 +94,7 @@
 
             template<typename A>
             expr<tag::subscript, args<expr &, typename result_of::as_expr_ref<A>::type> > const
- operator[](A &&a)
+ operator [](A &&a)
             {
                 expr<tag::subscript, args<expr &, typename result_of::as_expr_ref<A>::type> > that =
                     {{*this, {result_of::as_expr_ref<A>::call(a)}}};
@@ -103,7 +103,7 @@
 
             template<typename A>
             expr<tag::subscript, args<expr const &, typename result_of::as_expr_ref<A>::type> > const
- operator[](A &&a) const
+ operator [](A &&a) const
             {
                 expr<tag::subscript, args<expr const &, typename result_of::as_expr_ref<A>::type> > that =
                     {{*this, {result_of::as_expr_ref<A>::call(a)}}};
@@ -112,7 +112,7 @@
 
             template<typename... A>
             expr<tag::function, args<expr &, typename result_of::as_expr_ref<A>::type...> > const
- operator()(A &&... a)
+ operator ()(A &&... a)
             {
                 typedef args<expr &, typename result_of::as_expr_ref<A>::type...> args_type;
                 expr<tag::function, args_type> that =
@@ -122,7 +122,7 @@
 
             template<typename... A>
             expr<tag::function, args<expr const &, typename result_of::as_expr_ref<A>::type...> > const
- operator()(A &&... a) const
+ operator ()(A &&... a) const
             {
                 typedef args<expr const &, typename result_of::as_expr_ref<A>::type...> args_type;
                 expr<tag::function, args_type> that =
@@ -134,7 +134,7 @@
 
             template<typename A>
             expr<tag::assign, args<expr &, typename result_of::as_expr_ref<A &>::type> > const
- operator=(A &a)
+ operator =(A &a)
             {
                 expr<tag::assign, args<expr &, typename result_of::as_expr_ref<A &>::type> > that =
                     {{*this, {result_of::as_expr_ref<A &>::call(a)}}};
@@ -143,7 +143,7 @@
 
             template<typename A>
             expr<tag::assign, args<expr const &, typename result_of::as_expr_ref<A &>::type> > const
- operator=(A &a) const
+ operator =(A &a) const
             {
                 expr<tag::assign, args<expr const &, typename result_of::as_expr_ref<A &>::type> > that =
                     {{*this, {result_of::as_expr_ref<A &>::call(a)}}};
@@ -152,7 +152,7 @@
 
             template<typename A>
             expr<tag::assign, args<expr &, typename result_of::as_expr_ref<A const &>::type> > const
- operator=(A const &a)
+ operator =(A const &a)
             {
                 expr<tag::assign, args<expr &, typename result_of::as_expr_ref<A const &>::type> > that =
                     {{*this, {result_of::as_expr_ref<A const &>::call(a)}}};
@@ -161,7 +161,7 @@
 
             template<typename A>
             expr<tag::assign, args<expr const &, typename result_of::as_expr_ref<A const &>::type> > const
- operator=(A const &a) const
+ operator =(A const &a) const
             {
                 expr<tag::assign, args<expr const &, typename result_of::as_expr_ref<A const &>::type> > that =
                     {{*this, {result_of::as_expr_ref<A const &>::call(a)}}};
@@ -170,7 +170,7 @@
 
             template<typename A>
             expr<tag::subscript, args<expr &, typename result_of::as_expr_ref<A &>::type> > const
- operator[](A &a)
+ operator [](A &a)
             {
                 expr<tag::subscript, args<expr &, typename result_of::as_expr_ref<A &>::type> > that =
                     {{*this, {result_of::as_expr_ref<A &>::call(a)}}};
@@ -179,7 +179,7 @@
 
             template<typename A>
             expr<tag::subscript, args<expr const &, typename result_of::as_expr_ref<A &>::type> > const
- operator[](A &a) const
+ operator [](A &a) const
             {
                 expr<tag::subscript, args<expr const &, typename result_of::as_expr_ref<A &>::type> > that =
                     {{*this, {result_of::as_expr_ref<A &>::call(a)}}};
@@ -188,7 +188,7 @@
 
             template<typename A>
             expr<tag::subscript, args<expr &, typename result_of::as_expr_ref<A const &>::type> > const
- operator[](A const &a)
+ operator [](A const &a)
             {
                 expr<tag::subscript, args<expr &, typename result_of::as_expr_ref<A const &>::type> > that =
                     {{*this, {result_of::as_expr_ref<A const &>::call(a)}}};
@@ -197,7 +197,7 @@
 
             template<typename A>
             expr<tag::subscript, args<expr const &, typename result_of::as_expr_ref<A const &>::type> > const
- operator[](A const &a) const
+ operator [](A const &a) const
             {
                 expr<tag::subscript, args<expr const &, typename result_of::as_expr_ref<A const &>::type> > that =
                     {{*this, {result_of::as_expr_ref<A const &>::call(a)}}};
@@ -205,19 +205,20 @@
             }
 
             expr<tag::function, args<expr &> > const
- operator()()
+ operator ()()
             {
                 expr<tag::function, args<expr &> > that = {{*this}};
                 return that;
             }
 
             expr<tag::function, args<expr const &> > const
- operator()() const
+ operator ()() const
             {
                 expr<tag::function, args<expr const &> > that = {{*this}};
                 return that;
             }
 
+// BUGBUG this absolutely slaughters compile time
             #include <boost/xpressive/proto/detail/fun_call_ex.hpp>
 
         #endif

Modified: branches/proto/v3/boost/xpressive/proto/extends.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/extends.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/extends.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -211,8 +211,8 @@
 
         /// INTERNAL ONLY
         ///
- #define BOOST_PROTO_EXTENDS_FUNCTION_IMPL_1 \
- ((0)(1))
+ #define BOOST_PROTO_EXTENDS_FUNCTION_IMPL_1 ((0)(1))
+ //#define BOOST_PROTO_EXTENDS_FUNCTION_IMPL_1 ((1))
 
         /// INTERNAL ONLY
         ///
@@ -330,7 +330,7 @@
         ///
         /// // ...
         /// my_terminal<int> _1, _2;
- /// _1 + _2; // OK, uses proto::operator+
+ /// _1 + _2; // OK, uses proto::operator +
         /// \endcode
         ///
         /// Without the second \c Dummy template parameter, Proto's operator

Modified: branches/proto/v3/boost/xpressive/proto/fusion.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/fusion.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/fusion.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -82,7 +82,7 @@
             };
 
             template<typename Expr>
- flat_view<Expr const> operator()(Expr const &expr) const
+ flat_view<Expr const> operator ()(Expr const &expr) const
             {
                 return flat_view<Expr const>(expr);
             }
@@ -100,7 +100,7 @@
 
             template<typename Expr>
             typename fusion::result_of::pop_front<Expr const>::type
- operator()(Expr const &expr) const
+ operator ()(Expr const &expr) const
             {
                 return fusion::pop_front(expr);
             }
@@ -118,7 +118,7 @@
 
             template<typename Expr>
             typename fusion::result_of::reverse<Expr const>::type
- operator()(Expr const &expr) const
+ operator ()(Expr const &expr) const
             {
                 return fusion::reverse(expr);
             }
@@ -160,7 +160,7 @@
 
         template<typename Expr>
         typename proto::result_of::eval<Expr, Context>::type
- operator()(Expr &expr) const
+ operator ()(Expr &expr) const
         {
             return proto::eval(expr, this->ctx_);
         }
@@ -419,7 +419,7 @@
 
             template<typename Expr>
             typename result<as_element(Expr &)>::type
- operator()(Expr &expr) const
+ operator ()(Expr &expr) const
             {
                 return typename result<as_element(Expr &)>::type(expr);
             }

Modified: branches/proto/v3/boost/xpressive/proto/make_expr.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/make_expr.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/make_expr.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -333,14 +333,14 @@
 
         #ifdef BOOST_HAS_VARIADIC_TMPL
             template<typename... Args>
- Cons operator()(Args &... args) const
+ Cons operator ()(Args &... args) const
             {
                 return argsns_::make_cons_<Cons>(args...);
             }
         #else
             #define TMP(Z, N, DATA) \
             template<BOOST_PP_ENUM_PARAMS_Z(Z, N, typename A)> \
- Cons operator()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, &a)) const \
+ Cons operator ()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, &a)) const \
             { \
                 return argsns_::make_cons_<Cons>(BOOST_PP_ENUM_PARAMS_Z(Z, N, a)); \
             }

Modified: branches/proto/v3/boost/xpressive/proto/matches.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/matches.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/matches.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -693,7 +693,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<or_(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 typedef typename proto::result_of::detail::matches_<typename Expr::proto_base_expr, or_>::which which;
                 return which()(expr, state, visitor);
@@ -734,7 +734,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<if_(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 typedef
                     typename mpl::if_<
@@ -769,7 +769,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<switch_(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 typedef typename Cases::template case_<typename Expr::proto_tag> case_;
                 return case_()(expr, state, visitor);

Modified: branches/proto/v3/boost/xpressive/proto/traits.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/traits.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/traits.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -41,7 +41,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             Expr const &
- operator()(Expr const &expr, State const &, Visitor &) const
+ operator ()(Expr const &expr, State const &, Visitor &) const
             {
                 return expr;
             }
@@ -68,7 +68,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<unary_expr(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 typename result<unary_expr(Expr const &, State const &, Visitor &)>::type that = {
                     {T()(proto::arg_c<0>(expr), state, visitor)}
@@ -97,7 +97,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<binary_expr(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 typename result<binary_expr(Expr const &, State const &, Visitor &)>::type that = {
                     {T()(proto::arg_c<0>(expr), state, visitor)
@@ -210,7 +210,8 @@
             typedef expr<tag::terminal, term<value_type> > expr_type;
             typedef typename Domain::template apply<expr_type>::type type;
 
- static type const call(CVREF(T) t)
+ template<typename U>
+ static type const call(U &t)
             {
                 return Domain::make(proto::construct<expr_type>(t));
             }

Modified: branches/proto/v3/boost/xpressive/proto/transform/arg.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/arg.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/arg.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -38,7 +38,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             Expr const &
- operator()(Expr const &expr, State const &, Visitor &) const
+ operator ()(Expr const &expr, State const &, Visitor &) const
             {
                 return expr;
             }
@@ -63,7 +63,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             State const &
- operator()(Expr const &, State const &state, Visitor &) const
+ operator ()(Expr const &, State const &state, Visitor &) const
             {
                 return state;
             }
@@ -82,7 +82,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             Visitor &
- operator()(Expr const &, State const &, Visitor &visitor) const
+ operator ()(Expr const &, State const &, Visitor &visitor) const
             {
                 return visitor;
             }
@@ -106,7 +106,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename proto::result_of::arg_c<Expr const &, I>::type
- operator()(Expr const &expr, State const &, Visitor &) const
+ operator ()(Expr const &expr, State const &, Visitor &) const
             {
                 return proto::arg_c<I>(expr);
             }

Modified: branches/proto/v3/boost/xpressive/proto/transform/bind.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/bind.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/bind.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -36,7 +36,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<bind(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 return call<
                     typename boost::result_of<make<Fun>(Expr const &, State const &, Visitor &)>::type
@@ -62,7 +62,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<bind(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 return call<
                     typename boost::result_of<make<Return>(Expr const &, State const &, Visitor &)>::type(Args...)

Modified: branches/proto/v3/boost/xpressive/proto/transform/call.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/call.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/call.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -30,7 +30,7 @@
 
             struct private_type_
             {
- private_type_ const &operator,(int) const;
+ private_type_ const &operator ,(int) const;
             };
 
             template<typename T>
@@ -178,7 +178,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<call(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 Fun f;
                 return f(expr, state, visitor);
@@ -203,7 +203,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<call(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 return result<call(Expr const &, State const &, Visitor &)>::call(
                     expr
@@ -231,7 +231,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<call(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 return result<call(Expr const &, State const &, Visitor &)>::call(
                     when<_, Arg0>()(expr, state, visitor)
@@ -259,7 +259,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<call(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 return result<call(Expr const &, State const &, Visitor &)>::call(
                     when<_, Arg0>()(expr, state, visitor)
@@ -288,7 +288,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<call(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 Fun f;
                 return f(
@@ -315,7 +315,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<call(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 Fun f;
                 return f(when<_, Args>()(expr, state, visitor)...);

Modified: branches/proto/v3/boost/xpressive/proto/transform/fold.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/fold.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/fold.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -44,7 +44,7 @@
 
                 template<typename Expr, typename State>
                 typename boost::result_of<Tfx(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state) const
+ operator ()(Expr const &expr, State const &state) const
                 {
                     return Tfx()(expr, state, this->v_);
                 }
@@ -72,7 +72,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<fold(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 detail::as_callable<Fun, Visitor> fun(visitor);
                 return fusion::fold(

Modified: branches/proto/v3/boost/xpressive/proto/transform/fold_tree.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/fold_tree.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/fold_tree.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -66,7 +66,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<fold_tree(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 typedef typename result<fold_tree(Expr const &, State const &, Visitor &)>::impl impl;
                 return impl()(expr, state, visitor);
@@ -97,7 +97,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<reverse_fold_tree(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 typedef typename result<reverse_fold_tree(Expr const &, State const &, Visitor &)>::impl impl;
                 return impl()(expr, state, visitor);

Modified: branches/proto/v3/boost/xpressive/proto/transform/make.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/make.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/make.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -129,19 +129,19 @@
 
                 #ifdef BOOST_HAS_VARIADIC_TMPL
                 template<typename... Args>
- Type operator()(Args &... args) const
+ Type operator ()(Args &... args) const
                 {
                     return Type(args...);
                 }
                 #else
- Type operator()() const
+ Type operator ()() const
                 {
                     return Type();
                 }
 
                 #define TMP(Z, N, DATA) \
                 template<BOOST_PP_ENUM_PARAMS_Z(Z, N, typename A)> \
- Type operator()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, &a)) const \
+ Type operator ()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, &a)) const \
                 { \
                     return Type(BOOST_PP_ENUM_PARAMS_Z(Z, N, a)); \
                 }
@@ -155,14 +155,14 @@
             {
                 typedef Type result_type;
 
- Type operator()() const
+ Type operator ()() const
                 {
                     return Type();
                 }
 
                 #ifdef BOOST_HAS_VARIADIC_TMPL
                 template<typename... Args>
- Type operator()(Args &... args) const
+ Type operator ()(Args &... args) const
                 {
                     Type that = {args...};
                     return that;
@@ -170,7 +170,7 @@
                 #else
                 #define TMP(Z, N, DATA) \
                 template<BOOST_PP_ENUM_PARAMS_Z(Z, N, typename A)> \
- Type operator()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, &a)) const \
+ Type operator ()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, &a)) const \
                 { \
                     Type that = {BOOST_PP_ENUM_PARAMS_Z(Z, N, a)}; \
                     return that; \
@@ -187,14 +187,14 @@
 
                 #ifdef BOOST_HAS_VARIADIC_TMPL
                 template<typename... Args>
- result_type operator()(Args &... args) const
+ result_type operator ()(Args &... args) const
                 {
                     return proto::construct<result_type>(args...);
                 }
                 #else
                 #define TMP(Z, N, DATA) \
                 template<BOOST_PP_ENUM_PARAMS_Z(Z, N, typename A)> \
- result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, &a)) const \
+ result_type operator ()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, &a)) const \
                 { \
                     return proto::construct<result_type>(BOOST_PP_ENUM_PARAMS_Z(Z, N, a)); \
                 }
@@ -234,7 +234,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<make(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 typedef typename result<make(Expr const &, State const &, Visitor &)>::type result_type;
                 return result_type();
@@ -255,7 +255,7 @@
 
             template<typename Expr, typename State, typename Visitor>
             typename result<make(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
                 typedef typename result<make(Expr const &, State const &, Visitor &)>::type result_type;
                 return detail::construct<result_type>(

Modified: branches/proto/v3/boost/xpressive/proto/transform/when.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/when.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/when.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -73,7 +73,7 @@
 
         template<typename Expr, typename State, typename Visitor>
         typename result<when(Expr const &, State const &, Visitor &)>::type
- operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ operator ()(Expr const &expr, State const &state, Visitor &visitor) const
         {
             return typename mpl::if_<
                 is_callable<Return>

Modified: branches/proto/v3/boost/xpressive/regex_actions.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/regex_actions.hpp (original)
+++ branches/proto/v3/boost/xpressive/regex_actions.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -91,7 +91,7 @@
             typedef int result_type;
 
             template<typename Visitor, typename Expr>
- int operator()(Visitor &visitor, Expr const &expr) const
+ int operator ()(Visitor &visitor, Expr const &expr) const
             {
                 visitor.let(expr);
                 return 0;
@@ -140,7 +140,7 @@
             typedef void result_type;
 
             template<typename Sequence, typename Value>
- void operator()(Sequence &seq, Value const &val) const
+ void operator ()(Sequence &seq, Value const &val) const
             {
                 seq.push(val);
             }
@@ -151,7 +151,7 @@
             typedef void result_type;
 
             template<typename Sequence, typename Value>
- void operator()(Sequence &seq, Value const &val) const
+ void operator ()(Sequence &seq, Value const &val) const
             {
                 seq.push_back(val);
             }
@@ -162,7 +162,7 @@
             typedef void result_type;
 
             template<typename Sequence, typename Value>
- void operator()(Sequence &seq, Value const &val) const
+ void operator ()(Sequence &seq, Value const &val) const
             {
                 seq.push_front(val);
             }
@@ -173,7 +173,7 @@
             typedef void result_type;
 
             template<typename Sequence>
- void operator()(Sequence &seq) const
+ void operator ()(Sequence &seq) const
             {
                 seq.pop();
             }
@@ -184,7 +184,7 @@
             typedef void result_type;
 
             template<typename Sequence>
- void operator()(Sequence &seq) const
+ void operator ()(Sequence &seq) const
             {
                 seq.pop_back();
             }
@@ -195,7 +195,7 @@
             typedef void result_type;
 
             template<typename Sequence>
- void operator()(Sequence &seq) const
+ void operator ()(Sequence &seq) const
             {
                 seq.pop_front();
             }
@@ -220,7 +220,7 @@
             };
 
             template<typename Sequence>
- typename result<front(Sequence &)>::type operator()(Sequence &seq) const
+ typename result<front(Sequence &)>::type operator ()(Sequence &seq) const
             {
                 return seq.front();
             }
@@ -245,7 +245,7 @@
             };
 
             template<typename Sequence>
- typename result<back(Sequence &)>::type operator()(Sequence &seq) const
+ typename result<back(Sequence &)>::type operator ()(Sequence &seq) const
             {
                 return seq.back();
             }
@@ -270,7 +270,7 @@
             };
 
             template<typename Sequence>
- typename result<top(Sequence &)>::type operator()(Sequence &seq) const
+ typename result<top(Sequence &)>::type operator ()(Sequence &seq) const
             {
                 return seq.top();
             }
@@ -288,7 +288,7 @@
             };
 
             template<typename Pair>
- typename Pair::first_type operator()(Pair const &p) const
+ typename Pair::first_type operator ()(Pair const &p) const
             {
                 return p.first;
             }
@@ -306,7 +306,7 @@
             };
 
             template<typename Pair>
- typename Pair::second_type operator()(Pair const &p) const
+ typename Pair::second_type operator ()(Pair const &p) const
             {
                 return p.second;
             }
@@ -317,7 +317,7 @@
             typedef bool result_type;
 
             template<typename Sub>
- bool operator()(Sub const &sub) const
+ bool operator ()(Sub const &sub) const
             {
                 return sub.matched;
             }
@@ -335,7 +335,7 @@
             };
 
             template<typename Sub>
- typename Sub::difference_type operator()(Sub const &sub) const
+ typename Sub::difference_type operator ()(Sub const &sub) const
             {
                 return sub.length();
             }
@@ -353,7 +353,7 @@
             };
 
             template<typename Sub>
- typename Sub::string_type operator()(Sub const &sub) const
+ typename Sub::string_type operator ()(Sub const &sub) const
             {
                 return sub.str();
             }
@@ -429,11 +429,11 @@
                 typedef UNREF(Cont) &type;
             };
 
- /// operator()
+ /// operator ()
             ///
             template<typename Cont, typename A0>
             typename result<insert(Cont &, A0 const &)>::type
- operator()(Cont &cont, A0 const &a0) const
+ operator ()(Cont &cont, A0 const &a0) const
             {
                 return cont.insert(a0);
             }
@@ -442,7 +442,7 @@
             ///
             template<typename Cont, typename A0, typename A1>
             typename result<insert(Cont &, A0 const &, A1 const &)>::type
- operator()(Cont &cont, A0 const &a0, A1 const &a1) const
+ operator ()(Cont &cont, A0 const &a0, A1 const &a1) const
             {
                 return cont.insert(a0, a1);
             }
@@ -451,7 +451,7 @@
             ///
             template<typename Cont, typename A0, typename A1, typename A2>
             typename result<insert(Cont &, A0 const &, A1 const &, A2 const &)>::type
- operator()(Cont &cont, A0 const &a0, A1 const &a1, A2 const &a2) const
+ operator ()(Cont &cont, A0 const &a0, A1 const &a1, A2 const &a2) const
             {
                 return cont.insert(a0, a1, a2);
             }
@@ -469,7 +469,7 @@
             };
 
             template<typename First, typename Second>
- std::pair<First, Second> operator()(First const &first, Second const &second) const
+ std::pair<First, Second> operator ()(First const &first, Second const &second) const
             {
                 return std::make_pair(first, second);
             }
@@ -481,7 +481,7 @@
             typedef T result_type;
 
             template<typename Value>
- T operator()(Value const &val) const
+ T operator ()(Value const &val) const
             {
                 return lexical_cast<T>(val);
             }
@@ -493,7 +493,7 @@
             typedef T result_type;
 
             template<typename Value>
- T operator()(Value const &val) const
+ T operator ()(Value const &val) const
             {
                 return static_cast<T>(val);
             }
@@ -505,7 +505,7 @@
             typedef T result_type;
 
             template<typename Value>
- T operator()(Value const &val) const
+ T operator ()(Value const &val) const
             {
                 return dynamic_cast<T>(val);
             }
@@ -517,7 +517,7 @@
             typedef T result_type;
 
             template<typename Value>
- T operator()(Value const &val) const
+ T operator ()(Value const &val) const
             {
                 return const_cast<T>(val);
             }
@@ -528,25 +528,25 @@
         {
             typedef T result_type;
 
- T operator()() const
+ T operator ()() const
             {
                 return T();
             }
 
             template<typename A0>
- T operator()(A0 const &a0) const
+ T operator ()(A0 const &a0) const
             {
                 return T(a0);
             }
 
             template<typename A0, typename A1>
- T operator()(A0 const &a0, A1 const &a1) const
+ T operator ()(A0 const &a0, A1 const &a1) const
             {
                 return T(a0, a1);
             }
 
             template<typename A0, typename A1, typename A2>
- T operator()(A0 const &a0, A1 const &a1, A2 const &a2) const
+ T operator ()(A0 const &a0, A1 const &a1, A2 const &a2) const
             {
                 return T(a0, a1, a2);
             }
@@ -557,25 +557,25 @@
         {
             typedef void result_type;
 
- void operator()() const
+ void operator ()() const
             {
                 boost::throw_exception(Except());
             }
 
             template<typename A0>
- void operator()(A0 const &a0) const
+ void operator ()(A0 const &a0) const
             {
                 boost::throw_exception(Except(a0));
             }
 
             template<typename A0, typename A1>
- void operator()(A0 const &a0, A1 const &a1) const
+ void operator ()(A0 const &a0, A1 const &a1) const
             {
                 boost::throw_exception(Except(a0, a1));
             }
 
             template<typename A0, typename A1, typename A2>
- void operator()(A0 const &a0, A1 const &a1, A2 const &a2) const
+ void operator ()(A0 const &a0, A1 const &a1, A2 const &a2) const
             {
                 boost::throw_exception(Except(a0, a1, a2));
             }

Modified: branches/proto/v3/boost/xpressive/regex_compiler.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/regex_compiler.hpp (original)
+++ branches/proto/v3/boost/xpressive/regex_compiler.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -144,7 +144,7 @@
     }
 
     ///////////////////////////////////////////////////////////////////////////
- // operator[]
+ // operator []
     /// Return a reference to the named regular expression. If no such named
     /// regular expression exists, create a new regular expression and return
     /// a reference to it.

Modified: branches/proto/v3/boost/xpressive/regex_primitives.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/regex_primitives.hpp (original)
+++ branches/proto/v3/boost/xpressive/regex_primitives.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -57,38 +57,38 @@
         typedef int result_type;
 
         template<typename Subs>
- int operator()(Subs &subs, int i) const
+ int operator ()(Subs &subs, int i) const
         {
             subs.push_back(i);
             return i;
         }
     };
 
- using grammar_detail::mark_number;
+ //using grammar_detail::mark_number;
 
- // s1 or -s1
- struct SubMatch
- : proto::or_<
- proto::when<basic_mark_tag, push_back(proto::_visitor, mark_number(proto::_arg)) >
- , proto::when<proto::negate<basic_mark_tag>, push_back(proto::_visitor, mpl::int_<-1>()) >
- >
- {};
-
- struct SubMatchList
- : proto::or_<SubMatch, proto::comma<SubMatchList, SubMatch> >
- {};
-
- template<typename Subs>
- typename enable_if<
- mpl::and_<proto::is_expr<Subs>, proto::matches<Subs, SubMatchList> >
- , std::vector<int>
- >::type
- to_vector(Subs const &subs)
- {
- std::vector<int> subs_;
- SubMatchList()(subs, 0, subs_);
- return subs_;
- }
+ //// s1 or -s1
+ //struct SubMatch
+ // : proto::or_<
+ // proto::when<basic_mark_tag, push_back(proto::_visitor, mark_number(proto::_arg)) >
+ // , proto::when<proto::negate<basic_mark_tag>, push_back(proto::_visitor, mpl::int_<-1>()) >
+ // >
+ //{};
+
+ //struct SubMatchList
+ // : proto::or_<SubMatch, proto::comma<SubMatchList, SubMatch> >
+ //{};
+
+ //template<typename Subs>
+ //typename enable_if<
+ // mpl::and_<proto::is_expr<Subs>, proto::matches<Subs, SubMatchList> >
+ // , std::vector<int>
+ //>::type
+ //to_vector(Subs const &subs)
+ //{
+ // std::vector<int> subs_;
+ // SubMatchList()(subs, 0, subs_);
+ // return subs_;
+ //}
 
 
 /*
@@ -500,7 +500,11 @@
>::type const
 optional(Expr const &expr)
 {
- return !proto::as_expr(expr);
+ return proto::result_of::make_expr_ref<
+ proto::tag::logical_not
+ , proto::default_domain
+ , Expr const &
+ >::call(expr);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -522,7 +526,11 @@
>::type const
 repeat(Expr const &expr)
 {
- return proto::make_expr_ref<detail::generic_quant_tag<Min, Max>, proto::default_domain>(expr);
+ return proto::result_of::make_expr_ref<
+ detail::generic_quant_tag<Min, Max>
+ , proto::default_domain
+ , Expr const &
+ >::call(expr);
 }
 
 /// \overload
@@ -535,7 +543,11 @@
>::type const
 repeat(Expr2 const &expr2)
 {
- return proto::make_expr_ref<detail::generic_quant_tag<Count, Count>, proto::default_domain>(expr2);
+ return proto::result_of::make_expr_ref<
+ detail::generic_quant_tag<Count, Count>
+ , proto::default_domain
+ , Expr2 const &
+ >::call(expr2);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -556,7 +568,11 @@
>::type const
 keep(Expr const &expr)
 {
- return proto::make_expr_ref<detail::keeper_tag, proto::default_domain>(expr);
+ return proto::result_of::make_expr_ref<
+ detail::keeper_tag
+ , proto::default_domain
+ , Expr const &
+ >::call(expr);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -580,7 +596,11 @@
>::type const
 before(Expr const &expr)
 {
- return proto::make_expr_ref<detail::lookahead_tag, proto::default_domain>(expr);
+ return proto::result_of::make_expr_ref<
+ detail::lookahead_tag
+ , proto::default_domain
+ , Expr const &
+ >::call(expr);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -606,7 +626,11 @@
>::type const
 after(Expr const &expr)
 {
- return proto::make_expr_ref<detail::lookbehind_tag, proto::default_domain>(expr);
+ return proto::result_of::make_expr_ref<
+ detail::lookbehind_tag
+ , proto::default_domain
+ , Expr const &
+ >::call(expr);
 }
 
 ///////////////////////////////////////////////////////////////////////////////

Modified: branches/proto/v3/libs/xpressive/proto/doc/grammars.qbk
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/doc/grammars.qbk (original)
+++ branches/proto/v3/libs/xpressive/proto/doc/grammars.qbk 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -421,7 +421,7 @@
 in C++ grouping is already handled for us with the use of parenthesis, so we
 don't have to code that into our grammar.
 
-Let's begin our grammar for forward-declaring it:
+Let's begin our grammar by forward-declaring it:
 
     struct CalculatorGrammar;
 

Modified: branches/proto/v3/libs/xpressive/proto/example/calc1.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/example/calc1.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/example/calc1.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -36,7 +36,7 @@
 
     // Handle the evaluation of the placeholder terminals
     template<typename I>
- double operator()(proto::tag::terminal, arg<I>) const
+ double operator ()(proto::tag::terminal, arg<I>) const
     {
         return d[ I() - 1 ];
     }

Modified: branches/proto/v3/libs/xpressive/proto/example/calc2.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/example/calc2.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/example/calc2.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -5,7 +5,7 @@
 //
 // This example enhances the simple arithmetic expression evaluator
 // in calc1.cpp by using proto::extends to make arithemetic
-// expressions immediately evaluatable with operator(), a-la a
+// expressions immediately evaluatable with operator (), a-la a
 // function object
 
 #include <iostream>
@@ -17,7 +17,7 @@
 // Will be used to define the placeholders _1 and _2
 template<typename I> struct arg {};
 
-// For expressions in the calculator domain, operator()
+// For expressions in the calculator domain, operator ()
 // will be special; it will evaluate the expression.
 struct calculator_domain;
 
@@ -40,14 +40,14 @@
 
     // Handle the evaluation of the placeholder terminals
     template<typename I>
- double operator()(proto::tag::terminal, arg<I>) const
+ double operator ()(proto::tag::terminal, arg<I>) const
     {
         return d[ I() - 1 ];
     }
 };
 
 // Wrap all calculator expressions in this type, which defines
-// operator() to evaluate the expression.
+// operator () to evaluate the expression.
 template<typename Expr>
 struct calculator_expression
   : proto::extends<Expr, calculator_expression<Expr>, calculator_domain>
@@ -60,22 +60,22 @@
       : base_type(expr)
     {}
 
- using base_type::operator=;
+ using base_type::operator =;
 
- // Override operator() to evaluate the expression
- double operator()() const
+ // Override operator () to evaluate the expression
+ double operator ()() const
     {
         calculator_context const ctx;
         return proto::eval(*this, ctx);
     }
 
- double operator()(double d1) const
+ double operator ()(double d1) const
     {
         calculator_context const ctx(d1);
         return proto::eval(*this, ctx);
     }
 
- double operator()(double d1, double d2) const
+ double operator ()(double d1, double d2) const
     {
         calculator_context const ctx(d1, d2);
         return proto::eval(*this, ctx);

Modified: branches/proto/v3/libs/xpressive/proto/example/calc3.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/example/calc3.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/example/calc3.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -55,7 +55,7 @@
   : boost::result_of<CalculatorGrammar(Expr, mpl::int_<0>, mpl::void_)>
 {};
 
-// For expressions in the calculator domain, operator()
+// For expressions in the calculator domain, operator ()
 // will be special; it will evaluate the expression.
 struct calculator_domain;
 
@@ -78,14 +78,14 @@
 
     // Handle the evaluation of the placeholder terminals
     template<typename I>
- double operator()(proto::tag::terminal, arg<I>) const
+ double operator ()(proto::tag::terminal, arg<I>) const
     {
         return d[ I() - 1 ];
     }
 };
 
 // Wrap all calculator expressions in this type, which defines
-// operator() to evaluate the expression.
+// operator () to evaluate the expression.
 template<typename Expr>
 struct calculator_expression
   : proto::extends<Expr, calculator_expression<Expr>, calculator_domain>
@@ -98,10 +98,10 @@
       : base_type(expr)
     {}
 
- using base_type::operator=;
+ using base_type::operator =;
 
- // Override operator() to evaluate the expression
- double operator()() const
+ // Override operator () to evaluate the expression
+ double operator ()() const
     {
         // Assert that the expression has arity 0
         BOOST_MPL_ASSERT_RELATION(0, ==, calculator_arity<Expr>::type::value);
@@ -109,7 +109,7 @@
         return proto::eval(*this, ctx);
     }
 
- double operator()(double d1) const
+ double operator ()(double d1) const
     {
         // Assert that the expression has arity 1
         BOOST_MPL_ASSERT_RELATION(1, ==, calculator_arity<Expr>::type::value);
@@ -117,7 +117,7 @@
         return proto::eval(*this, ctx);
     }
 
- double operator()(double d1, double d2) const
+ double operator ()(double d1, double d2) const
     {
         // Assert that the expression has arity 2
         BOOST_MPL_ASSERT_RELATION(2, ==, calculator_arity<Expr>::type::value);

Modified: branches/proto/v3/libs/xpressive/proto/example/lazy_vector.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/example/lazy_vector.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/example/lazy_vector.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -57,7 +57,7 @@
     {
         typedef typename proto::result_of::value_at_c<Expr, 0>::type::value_type result_type;
 
- result_type operator()( Expr const & expr, lazy_subscript_context & ctx ) const
+ result_type operator ()( Expr const & expr, lazy_subscript_context & ctx ) const
         {
             return proto::arg( expr )[ ctx.subscript_ ];
         }
@@ -67,7 +67,7 @@
 };
 
 // Here is the domain-specific expression wrapper, which overrides
-// operator[] to evaluate the expression using the lazy_subscript_context.
+// operator [] to evaluate the expression using the lazy_subscript_context.
 template<typename Expr>
 struct lazy_vector_expr
   : proto::extends<Expr, lazy_vector_expr<Expr>, lazy_vector_domain>

Modified: branches/proto/v3/libs/xpressive/proto/example/mixed.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/example/mixed.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/example/mixed.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -62,7 +62,7 @@
     
     template<typename Cont>
     typename result<begin(Cont const &)>::type
- operator()(Cont const &cont) const
+ operator ()(Cont const &cont) const
     {
         iterator_wrapper<typename Cont::const_iterator> it(cont.begin());
         return proto::as_expr(it);
@@ -97,7 +97,7 @@
     {
         typedef typename std::iterator_traits<Iter>::reference result_type;
 
- result_type operator()(Expr &expr, DereferenceCtx const &) const
+ result_type operator ()(Expr &expr, DereferenceCtx const &) const
         {
             return *proto::arg(expr).it;
         }
@@ -121,7 +121,7 @@
     {
         typedef void result_type;
 
- result_type operator()(Expr &expr, IncrementCtx const &) const
+ result_type operator ()(Expr &expr, IncrementCtx const &) const
         {
             ++proto::arg(expr).it;
         }
@@ -179,7 +179,7 @@
     {}
 private:
     // hide this:
- using proto::extends<Expr, MixedExpr<Expr>, MixedDomain>::operator[];
+ using proto::extends<Expr, MixedExpr<Expr>, MixedDomain>::operator [];
 };
 
 // Define a trait type for detecting vector and list terminals, to
@@ -208,7 +208,7 @@
     struct assign_op
     {
         template<typename T, typename U>
- void operator()(T &t, U const &u) const
+ void operator ()(T &t, U const &u) const
         {
             t = u;
         }
@@ -217,7 +217,7 @@
     struct plus_assign_op
     {
         template<typename T, typename U>
- void operator()(T &t, U const &u) const
+ void operator ()(T &t, U const &u) const
         {
             t += u;
         }
@@ -226,7 +226,7 @@
     struct minus_assign_op
     {
         template<typename T, typename U>
- void operator()(T &t, U const &u) const
+ void operator ()(T &t, U const &u) const
         {
             t -= u;
         }
@@ -241,7 +241,7 @@
         {};
 
         template<typename Arg>
- Arg operator()(Arg const &arg) const
+ Arg operator ()(Arg const &arg) const
         {
             return std::sin(arg);
         }

Modified: branches/proto/v3/libs/xpressive/proto/example/tarray.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/example/tarray.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/example/tarray.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -52,7 +52,7 @@
 
     // Index array terminals with our subscript. Everything
     // else will be handled by the default evaluation context.
- int operator()(proto::tag::terminal, int const (&data)[3]) const
+ int operator ()(proto::tag::terminal, int const (&data)[3]) const
     {
         return data[this->i_];
     }
@@ -68,43 +68,43 @@
 
     TArrayPrintCtx() {}
 
- std::ostream &operator()(proto::tag::terminal, int i) const
+ std::ostream &operator ()(proto::tag::terminal, int i) const
     {
         return std::cout << i;
     }
 
- std::ostream &operator()(proto::tag::terminal, int const (&arr)[3]) const
+ std::ostream &operator ()(proto::tag::terminal, int const (&arr)[3]) const
     {
         return std::cout << '{' << arr[0] << ", " << arr[1] << ", " << arr[2] << '}';
     }
 
     template<typename L, typename R>
- std::ostream &operator()(proto::tag::plus, L const &l, R const &r) const
+ std::ostream &operator ()(proto::tag::plus, L const &l, R const &r) const
     {
         return std::cout << '(' << l << " + " << r << ')';
     }
 
     template<typename L, typename R>
- std::ostream &operator()(proto::tag::minus, L const &l, R const &r) const
+ std::ostream &operator ()(proto::tag::minus, L const &l, R const &r) const
     {
         return std::cout << '(' << l << " - " << r << ')';
     }
 
     template<typename L, typename R>
- std::ostream &operator()(proto::tag::multiplies, L const &l, R const &r) const
+ std::ostream &operator ()(proto::tag::multiplies, L const &l, R const &r) const
     {
         return std::cout << l << " * " << r;
     }
 
     template<typename L, typename R>
- std::ostream &operator()(proto::tag::divides, L const &l, R const &r) const
+ std::ostream &operator ()(proto::tag::divides, L const &l, R const &r) const
     {
         return std::cout << l << " / " << r;
     }
 };
 
 // Here is the domain-specific expression wrapper, which overrides
-// operator[] to evaluate the expression using the TArraySubscriptCtx.
+// operator [] to evaluate the expression using the TArraySubscriptCtx.
 template<typename Expr>
 struct TArrayExpr
   : proto::extends<Expr, TArrayExpr<Expr>, TArrayDomain>
@@ -143,9 +143,9 @@
         (*this)[2] = k;
     }
 
- // Here we override operator[] to give read/write access to
+ // Here we override operator [] to give read/write access to
     // the elements of the array. (We could use the TArrayExpr
- // operator[] if we made the subscript context smarter about
+ // operator [] if we made the subscript context smarter about
     // returning non-const reference when appropriate.)
     int &operator [](std::ptrdiff_t i)
     {
@@ -157,7 +157,7 @@
         return proto::arg(*this)[i];
     }
 
- // Here we define a operator= for TArray terminals that
+ // Here we define a operator = for TArray terminals that
     // takes a TArray expression.
     template< typename Expr >
     TArray &operator =(Expr const & expr)

Modified: branches/proto/v3/libs/xpressive/proto/example/vec3.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/example/vec3.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/example/vec3.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -34,7 +34,7 @@
 
     // Index array terminals with our subscript. Everything
     // else will be handled by the default evaluation context.
- int operator()(tag::terminal, int const (&arr)[3]) const
+ int operator ()(tag::terminal, int const (&arr)[3]) const
     {
         return arr[this->i_];
     }
@@ -53,7 +53,7 @@
 
       typedef void result_type;
 
- void operator()(tag::terminal, int const(&)[3])
+ void operator ()(tag::terminal, int const(&)[3])
       {
           ++this->count;
       }
@@ -91,17 +91,17 @@
         (*this)[2] = k;
     }
 
- int &operator[](int i)
+ int &operator [](int i)
     {
         return arg(*this)[i];
     }
 
- int const &operator[](int i) const
+ int const &operator [](int i) const
     {
         return arg(*this)[i];
     }
 
- // Here we define a operator= for Vec3 terminals that
+ // Here we define a operator = for Vec3 terminals that
     // takes a Vec3 expression.
     template< typename Expr >
     Vec3 &operator =(Expr const & expr)

Modified: branches/proto/v3/libs/xpressive/proto/example/vector.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/example/vector.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/example/vector.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -51,7 +51,7 @@
     {
         typedef T result_type;
 
- T operator()(Expr &expr, VectorSubscriptCtx const &ctx) const
+ T operator ()(Expr &expr, VectorSubscriptCtx const &ctx) const
         {
             return proto::arg(expr)[ctx.i_];
         }
@@ -82,7 +82,7 @@
     {
         typedef void result_type;
 
- result_type operator()(Expr &expr, VectorSizeCtx const &ctx) const
+ result_type operator ()(Expr &expr, VectorSizeCtx const &ctx) const
         {
             if(ctx.size_ != proto::arg(expr).size())
             {
@@ -133,7 +133,7 @@
 {};
 
 // Here is VectorExpr, which extends a proto expr type by
-// giving it an operator[] which uses the VectorSubscriptCtx
+// giving it an operator [] which uses the VectorSubscriptCtx
 // to evaluate an expression with a given index.
 template<typename Expr>
 struct VectorExpr

Modified: branches/proto/v3/libs/xpressive/proto/test/calculator.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/test/calculator.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/test/calculator.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -22,36 +22,36 @@
       : i_(i)
     {}
 
- int operator()(proto::tag::terminal, placeholder) const
+ int operator ()(proto::tag::terminal, placeholder) const
     {
         return this->i_;
     }
 
- int operator()(proto::tag::terminal, int j) const
+ int operator ()(proto::tag::terminal, int j) const
     {
         return j;
     }
 
     template<typename Left, typename Right>
- int operator()(proto::tag::plus, Left const &left, Right const &right) const
+ int operator ()(proto::tag::plus, Left const &left, Right const &right) const
     {
         return proto::eval(left, *this) + proto::eval(right, *this);
     }
 
     template<typename Left, typename Right>
- int operator()(proto::tag::minus, Left const &left, Right const &right) const
+ int operator ()(proto::tag::minus, Left const &left, Right const &right) const
     {
         return proto::eval(left, *this) - proto::eval(right, *this);
     }
 
     template<typename Left, typename Right>
- int operator()(proto::tag::multiplies, Left const &left, Right const &right) const
+ int operator ()(proto::tag::multiplies, Left const &left, Right const &right) const
     {
         return proto::eval(left, *this) * proto::eval(right, *this);
     }
 
     template<typename Left, typename Right>
- int operator()(proto::tag::divides, Left const &left, Right const &right) const
+ int operator ()(proto::tag::divides, Left const &left, Right const &right) const
     {
         return proto::eval(left, *this) / proto::eval(right, *this);
     }
@@ -70,7 +70,7 @@
     {}
 
     template<typename T>
- result_type operator()(T const &t) const
+ result_type operator ()(T const &t) const
     {
         Fun fun(t);
         return proto::eval(this->expr_, fun);

Modified: branches/proto/v3/libs/xpressive/proto/test/examples.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/test/examples.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/test/examples.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -82,8 +82,8 @@
 
     template<typename Expr, typename State, typename Visitor>
     typename result<unary_arity(Expr const &, State const &, Visitor &)>::type
- /*<< Transforms have a nested `operator()` member function. >>*/
- operator()(Expr const &, State const &, Visitor &) const
+ /*<< Transforms have a nested `operator ()` member function. >>*/
+ operator ()(Expr const &, State const &, Visitor &) const
     {
         /*<< The `unary_arity` transform doesn't have an interesting
         runtime counterpart, so just return a default-constructed object
@@ -124,7 +124,7 @@
     template<typename Expr, typename State, typename Visitor>
     typename result<binary_arity(Expr const &, State const &, Visitor &)>::type
     /*<< Transforms have a nested `call()` member function. >>*/
- operator()(Expr const &, State const &, Visitor &) const
+ operator ()(Expr const &, State const &, Visitor &) const
     {
         /*<< The `binary_arity` transform doesn't have an interesting
         runtime counterpart, so just return a default-constructed object

Modified: branches/proto/v3/libs/xpressive/proto/test/lambda.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/test/lambda.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/test/lambda.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -123,8 +123,8 @@
       , proto::result_of::eval<T const, lambda_context<fusion::tuple<> > >
>::type nullary_type;
 
- // Define our operator() that evaluates the lambda expression.
- nullary_type operator()() const
+ // Define our operator () that evaluates the lambda expression.
+ nullary_type operator ()() const
     {
         fusion::tuple<> args;
         lambda_context<fusion::tuple<> > ctx(args);
@@ -133,7 +133,7 @@
 
     template<typename A0>
     typename proto::result_of::eval<T const, lambda_context<fusion::tuple<A0 const &> > >::type
- operator()(A0 const &a0) const
+ operator ()(A0 const &a0) const
     {
         fusion::tuple<A0 const &> args(a0);
         lambda_context<fusion::tuple<A0 const &> > ctx(args);
@@ -142,7 +142,7 @@
 
     template<typename A0, typename A1>
     typename proto::result_of::eval<T const, lambda_context<fusion::tuple<A0 const &, A1 const &> > >::type
- operator()(A0 const &a0, A1 const &a1) const
+ operator ()(A0 const &a0, A1 const &a1) const
     {
         fusion::tuple<A0 const &, A1 const &> args(a0, a1);
         lambda_context<fusion::tuple<A0 const &, A1 const &> > ctx(args);

Modified: branches/proto/v3/libs/xpressive/proto/test/main.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/test/main.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/test/main.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -14,7 +14,7 @@
 
 namespace boost { namespace fusion
 {
- inline std::ostream &operator<<(std::ostream &sout, nil)
+ inline std::ostream &operator <<(std::ostream &sout, nil)
     {
         return sout << "<nil>";
     }
@@ -58,7 +58,7 @@
 
     template<typename T>
     typename negate<T>::type
- operator()(T const &t) const
+ operator ()(T const &t) const
     {
         typename negate<T>::type that = {t};
         return that;
@@ -77,7 +77,7 @@
 //
 // template<typename T, typename U>
 // fusion::cons<T, U>
-// operator()(T const &t, U const &u) const
+// operator ()(T const &t, U const &u) const
 // {
 // return fusion::cons<T, U>(t, u);
 // }
@@ -152,13 +152,13 @@
     ~noncopy() {}
 private:
     noncopy(const noncopy &);
- noncopy &operator=(const noncopy &);
+ noncopy &operator =(const noncopy &);
 };
 
 struct disp
 {
     template<typename T>
- void operator()(T const &t) const
+ void operator ()(T const &t) const
     {
         std::printf("%s\n", typeid(T).name());
     }
@@ -180,7 +180,7 @@
       : extends<E, byvalexpr<E>, byvaldom>(e)
     {}
 
- using extends<E, byvalexpr<E>, byvaldom>::operator=;
+ using extends<E, byvalexpr<E>, byvaldom>::operator =;
 };
 
 byvalexpr<terminal<int>::type> A;

Modified: branches/proto/v3/libs/xpressive/proto/test/proto_fusion.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/test/proto_fusion.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/test/proto_fusion.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -65,7 +65,7 @@
     {}
 
     template<typename Op>
- void operator()(Op const &op) const
+ void operator ()(Op const &op) const
     {
         this->sout_ << '(' << boost::addressof(op) << ')';
     }

Modified: branches/proto/v3/libs/xpressive/proto/test/proto_fusion_s.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/test/proto_fusion_s.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/test/proto_fusion_s.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -55,7 +55,7 @@
     {}
 
     template<typename Op>
- void operator()(Op const &op) const
+ void operator ()(Op const &op) const
     {
         this->sout_ << '(' << boost::addressof(op.proto_base()) << ')';
     }

Modified: branches/proto/v3/libs/xpressive/proto/test/toy_spirit.cpp
==============================================================================
--- branches/proto/v3/libs/xpressive/proto/test/toy_spirit.cpp (original)
+++ branches/proto/v3/libs/xpressive/proto/test/toy_spirit.cpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -268,7 +268,7 @@
         {}
 
         template<typename T>
- bool operator()(T const &t) const
+ bool operator ()(T const &t) const
         {
             Iterator tmp = this->first;
             if((*static_cast<Derived const *>(this))(t))
@@ -307,24 +307,24 @@
         #endif
 
         template<typename T>
- bool operator()(T const &t, bool success) const // used by fusion::fold
+ bool operator ()(T const &t, bool success) const // used by fusion::fold
         {
             return success && (*this)(t);
         }
 
         template<typename List>
- bool operator()(alternate<List> const &alternates) const
+ bool operator ()(alternate<List> const &alternates) const
         {
             return fusion::any(alternates.elems, *static_cast<with_reset const *>(this));
         }
 
         template<typename List>
- bool operator()(sequence<List> const &sequence) const
+ bool operator ()(sequence<List> const &sequence) const
         {
             return fusion::fold(sequence.elems, true, *this);
         }
 
- bool operator()(char_tag ch) const
+ bool operator ()(char_tag ch) const
         {
             if(this->done())
                 return false;
@@ -332,7 +332,7 @@
             return true;
         }
 
- bool operator()(char ch) const
+ bool operator ()(char ch) const
         {
             if(this->done() || ch != *this->first)
                 return false;
@@ -340,7 +340,7 @@
             return true;
         }
 
- bool operator()(ichar ich) const
+ bool operator ()(ichar ich) const
         {
             if(this->done() || !utility::char_icmp(*this->first, ich.lo_, ich.hi_))
                 return false;
@@ -348,17 +348,17 @@
             return true;
         }
 
- bool operator()(char const *sz) const
+ bool operator ()(char const *sz) const
         {
             return utility::string_cmp(sz, this->first, this->second);
         }
 
- bool operator()(istr const &s) const
+ bool operator ()(istr const &s) const
         {
             return utility::string_icmp(s.str_, this->first, this->second);
         }
 
- bool operator()(char_range rng) const
+ bool operator ()(char_range rng) const
         {
             if(this->done() || !utility::in_range(*this->first, rng.first, rng.second))
                 return false;
@@ -366,7 +366,7 @@
             return true;
         }
 
- bool operator()(ichar_range rng) const
+ bool operator ()(ichar_range rng) const
         {
             if(this->done() || !utility::in_irange(*this->first, rng.first, rng.second))
                 return false;

Modified: branches/proto/v3/libs/xpressive/test/test.hpp
==============================================================================
--- branches/proto/v3/libs/xpressive/test/test.hpp (original)
+++ branches/proto/v3/libs/xpressive/test/test.hpp 2008-03-05 11:32:33 EST (Wed, 05 Mar 2008)
@@ -30,8 +30,6 @@
 #define BOOST_XPR_CHECK(pred) \
     if( pred ) {} else { BOOST_ERROR( this->section_ << " : " << #pred ); }
 
-using namespace boost::xpressive;
-
 ///////////////////////////////////////////////////////////////////////////////
 // backrefs
 //


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