Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69899 - branches/msm/v2_30/boost/msm/lpp
From: christophe.j.henry_at_[hidden]
Date: 2011-03-12 12:24:15


Author: chenry
Date: 2011-03-12 12:24:14 EST (Sat, 12 Mar 2011)
New Revision: 69899
URL: http://svn.boost.org/trac/boost/changeset/69899

Log:
cleanup
Added:
   branches/msm/v2_30/boost/msm/lpp/tags.hpp (contents, props changed)
Text files modified:
   branches/msm/v2_30/boost/msm/lpp/basic_grammar.hpp | 309 ++++++++++++---------------------------
   branches/msm/v2_30/boost/msm/lpp/common_types.hpp | 301 ++++++++++++++++++++++++++------------
   branches/msm/v2_30/boost/msm/lpp/function.hpp | 8
   branches/msm/v2_30/boost/msm/lpp/lpp.hpp | 2
   branches/msm/v2_30/boost/msm/lpp/operator.hpp | 10
   5 files changed, 311 insertions(+), 319 deletions(-)

Modified: branches/msm/v2_30/boost/msm/lpp/basic_grammar.hpp
==============================================================================
--- branches/msm/v2_30/boost/msm/lpp/basic_grammar.hpp (original)
+++ branches/msm/v2_30/boost/msm/lpp/basic_grammar.hpp 2011-03-12 12:24:14 EST (Sat, 12 Mar 2011)
@@ -5,220 +5,13 @@
 #ifndef BOOST_MSM_LPP_BASIC_GRAMMAR_H
 #define BOOST_MSM_LPP_BASIC_GRAMMAR_H
 
-#include <boost/mpl/int.hpp>
-#include <boost/mpl/min_max.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/identity.hpp>
-#include <boost/mpl/next_prior.hpp>
-#include <boost/mpl/deref.hpp>
-#include <boost/mpl/for_each.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/proto/core.hpp>
-#include <boost/proto/context.hpp>
-#include <boost/proto/transform.hpp>
 #include <boost/fusion/container/list/cons.hpp>
-#include <boost/typeof/typeof.hpp>
-#include <boost/utility/result_of.hpp>
 
+#include <boost/msm/lpp/common_types.hpp>
 
-namespace boost { namespace msm { namespace lpp
-{
-struct action_tag {};
-
-template <class T,class Arg1=void,class Arg2=void,class Arg3=void,class Arg4=void>
-struct get_fct
-{
- typedef typename T::template In<Arg1,Arg2,Arg3,Arg4>::type type;
-};
-
-// wrapper for mpl::for_each as showed in the C++ Template Metaprogramming ch. 9
-template <class T>
-struct wrap{};
-
-template <class Sequence>
-struct LambdaSequence_
-{
- typedef Sequence sequence;
- typedef typename ::boost::mpl::deref< typename ::boost::mpl::prior< typename ::boost::mpl::end<Sequence>::type >::type>::type last;
-
- template<class Sig> struct result;
- template<class This,class B, class A0>
- struct result<This(B& block,A0& a0)>
- {
- static B& block;
- static A0& a0;
- BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested,last()(block,a0) )
- typedef typename nested::type type;
- };
- template<class This,class B, class A0, class A1>
- struct result<This(B& block,A0& a0,A1& a1)>
- {
- static B& block;
- static A0& a0;
- static A1& a1;
- BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested,last()(block,a0,a1) )
- typedef typename nested::type type;
- };
-
- template <typename B,class A0,class A1=void>
- struct Call
- {
- Call(B& block,A0& a0,A1& a1): block_(block),a0_(a0),a1_(a1){}
- template <class FCT>
- void operator()(wrap<FCT> const& )
- {
- FCT()(block_,a0_,a1_);
- }
- private:
- B& block_;
- A0& a0_;
- A1& a1_;
- };
- template <typename B,class A0>
- struct Call<B,A0,void>
- {
- Call(B& block,A0& a0): block_(block),a0_(a0){}
- template <class FCT>
- void operator()(wrap<FCT> const& )
- {
- FCT()(block_,a0_);
- }
- private:
- B& block_;
- A0& a0_;
- };
-
- template<typename B,typename A0>
- typename boost::result_of<LambdaSequence_(B&,A0&)>::type
- operator ()(B& block, A0 & a0) const
- {
- mpl::for_each< typename ::boost::mpl::pop_back<Sequence>::type,
- wrap< ::boost::mpl::placeholders::_1> >
- (Call<B,A0>(block,a0));
- return last()(block,a0);
- }
- template<typename B,typename A0,typename A1>
- typename boost::result_of<LambdaSequence_(B&,A0&,A1&)>::type
- operator ()(B& block, A0 & a0, A1 & a1) const
- {
- mpl::for_each< typename ::boost::mpl::pop_back<Sequence>::type,
- wrap< ::boost::mpl::placeholders::_1> >
- (Call<B,A0,A1>(block,a0,a1));
- return last()(block,a0,a1);
- }
-};
-
-struct if_then_tag
-{
-};
-template <class T>
-struct get_condition
-{
- typedef typename T::condition type;
-};
-template <class T>
-struct get_ifclause
-{
- typedef typename T::ifclause type;
-};
-struct ignored {};
-template <class Condition,class IfClause=void>
-struct if_then_
-{
- typedef Condition condition;
- typedef IfClause ifclause;
-
- template<class Sig> struct result;
- template<class This,class B, class A0>
- struct result<This(B& block,A0& a0)>
- {
- typedef ignored type;
- };
- template<class This,class B, class A0, class A1>
- struct result<This(B& block,A0& a0,A1& a1)>
- {
- typedef ignored type;
- };
- template<typename B,typename A0>
- typename boost::result_of<if_then_(B&,A0&)>::type
- operator()(B& block, A0 & a0)const
- {
- if (Condition()(block,a0))
- {
- IfClause()(block,a0);
- }
- return ignored();
- }
- template<typename B,typename A0,typename A1>
- typename boost::result_of<if_then_(B&,A0&,A1&)>::type
- operator()(B& block, A0 & a0, A0 & a1)const
- {
- if (Condition()(block,a0,a1))
- {
- IfClause()(block,a0,a1);
- }
- return ignored();
- }
-};
-
-struct if_then_helper : proto::extends< proto::terminal<if_then_tag>::type, if_then_helper >
-{
- template <class Arg1,class Arg2,class Arg3,class Arg4>
- struct In {typedef if_then_<Arg1,Arg2> type;};
-};
-if_then_helper const if_;
 
-
-template <class Condition,class IfClause,class ElseClause>
-struct if_then_else
+namespace boost { namespace msm { namespace lpp
 {
- template<class Sig> struct result;
- template<class This,class B, class A0>
- struct result<This(B& block,A0& a0)>
- {
- static B& block;
- static A0& a0;
- BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested,IfClause()(block,a0))
- typedef typename nested::type type;
- };
- template<class This,class B, class A0, class A1>
- struct result<This(B& block,A0& a0,A1& a1)>
- {
- static B& block;
- static A0& a0;
- static A1& a1;
- BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested,IfClause()(block,a0,a1))
- typedef typename nested::type type;
- };
- template<typename B,typename A0>
- typename boost::result_of<if_then_else(B&,A0&)>::type
- operator()(B& block, A0 & a0)const
- {
- if (Condition()(block,a0))
- {
- return IfClause()(block,a0);
- }
- else
- {
- return ElseClause()(block,a0);
- }
- }
- template<typename B,typename A0,typename A1>
- typename boost::result_of<if_then_else(B&,A0&,A1&)>::type
- operator()(B& block, A0 & a0, A0 & a1)const
- {
- if (Condition()(block,a0,a1))
- {
- return IfClause()(block,a0,a1);
- }
- else
- {
- return ElseClause()(block,a0,a1);
- }
- }
-};
-
-
 struct BuildLambda;
 
 struct BuildLambdaSequence
@@ -287,7 +80,7 @@
 
 struct IfThenCondition:
     proto::when<
- proto::function<proto::terminal<if_then_tag>,BuildLambdaSequence >,
+ proto::function<proto::terminal<tag::if_then>,BuildLambdaSequence >,
                 if_then_< LambdaSequence_<BuildLambdaSequence(proto::_child_c<1>)>() >()
 
>
@@ -319,13 +112,12 @@
     : proto::switch_<BuildLambdaCases>
 {};
 
-struct params_tag{};
 // Eric Niebler's FoldToList
 struct FoldToList
   : proto::or_<
         // Don't add the params_ terminal to the list
         proto::when<
- proto::terminal< params_tag >
+ proto::terminal< tag::param >
           , proto::_state
>
         // Put all other terminals at the head of the
@@ -350,6 +142,99 @@
>
 {};
 
+struct BuildParams
+ : proto::or_<
+ proto::when<
+ proto::subscript< proto::terminal<tag::lambda> , FoldToList >,
+ FoldToList(proto::_child_c<1>, boost::fusion::nil())
+ >
+ >
+{};
+
+struct Lambda:
+ proto::when<
+ BuildLambdaSequence, LambdaSequence_<BuildLambdaSequence(proto::_child_c<1>) >()
+ >
+{};
+#define BOOST_MSM_LPP_LAMBDA_EXPR(expr) BOOST_TYPEOF( Lambda()(expr) )
+
+
+
+struct BuildLambdaWithParams
+ : proto::or_<
+ proto::when<
+ proto::subscript< proto::terminal<tag::lambda> ,BuildLambdaSequence>,
+ Block<LambdaSequence_<BuildLambdaSequence(proto::_child_c<1>) > >()
+ >,
+ proto::when<
+ proto::subscript< BuildParams , BuildLambdaSequence >,
+ Block<
+ LambdaSequence_<BuildLambdaSequence(proto::_child_c<1>)>,
+ boost::fusion::result_of::as_vector<BuildParams(proto::_child_c<0>)> >
+ ( (BuildParams(proto::_value) ) )
+ >
+ >
+{};
+
+template<typename Expr>
+struct lambda_expr;
+
+struct lambda_dom
+ : proto::domain<proto::pod_generator<lambda_expr>, BuildLambdaWithParams>
+{};
+
+template<typename Expr>
+struct lambda_expr
+{
+ BOOST_PROTO_BASIC_EXTENDS(Expr, lambda_expr<Expr>, lambda_dom)
+ BOOST_PROTO_EXTENDS_SUBSCRIPT()
+ template<class Sig> struct result;
+ template<class This,class B, class A0>
+ struct result<This(B& block,A0& a0)>
+ {
+ static A0& a0;
+ typedef A0& type;
+ };
+ template<typename A0>
+ typename ::boost::result_of<
+ typename ::boost::result_of<BuildLambdaWithParams(Expr,A0&)>::type (A0&)
+ >::type
+ operator()(A0 &a0)const
+ {
+ BOOST_MPL_ASSERT((proto::matches<Expr, BuildLambdaWithParams>));
+ return BuildLambdaWithParams()(*this)(a0);
+ }
+ template<typename A0>
+ typename ::boost::result_of<
+ typename ::boost::result_of<BuildLambdaWithParams(Expr,A0&)>::type (A0&)
+ >::type
+ operator()(A0 const &a0)const
+ {
+ BOOST_MPL_ASSERT((proto::matches<Expr, BuildLambdaWithParams>));
+ return BuildLambdaWithParams()(*this)(a0);
+ }
+
+ template<typename A0,typename A1>
+ typename ::boost::result_of<
+ typename ::boost::result_of<BuildLambdaWithParams(Expr,A0&,A1&)>::type (A0&,A1&)
+ >::type
+ operator()(A0 &a0,A1 &a1)const
+ {
+ BOOST_MPL_ASSERT((proto::matches<Expr, BuildLambdaWithParams>));
+ return BuildLambdaWithParams()(*this)(a0,a1);
+ }
+ template<typename A0,typename A1>
+ typename ::boost::result_of<
+ typename ::boost::result_of<BuildLambdaWithParams(Expr,A0&,A1&)>::type (A0&,A1&)
+ >::type
+ operator()(A0 const &a0,A1 const &a1)const
+ {
+ BOOST_MPL_ASSERT((proto::matches<Expr, BuildLambdaWithParams>));
+ return BuildLambdaWithParams()(*this)(a0,a1);
+ }
+};
+
+lambda_expr<proto::terminal<tag::lambda>::type> const lambda = {{{}}};
 
 } } }// boost::msm::lpp
 #endif //BOOST_MSM_LPP_BASIC_GRAMMAR_H

Modified: branches/msm/v2_30/boost/msm/lpp/common_types.hpp
==============================================================================
--- branches/msm/v2_30/boost/msm/lpp/common_types.hpp (original)
+++ branches/msm/v2_30/boost/msm/lpp/common_types.hpp 2011-03-12 12:24:14 EST (Sat, 12 Mar 2011)
@@ -9,17 +9,218 @@
 #include <boost/fusion/container/vector.hpp>
 #include <boost/fusion/include/as_vector.hpp>
 
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/for_each.hpp>
+#include <boost/mpl/vector.hpp>
+
+#include <boost/proto/core.hpp>
+#include <boost/proto/context.hpp>
+#include <boost/proto/transform.hpp>
+
 #include <boost/type_traits/remove_reference.hpp>
 #include <boost/type_traits/add_reference.hpp>
 #include <boost/utility/enable_if.hpp>
 #include <boost/typeof/typeof.hpp>
-#include <boost/msm/lpp/basic_grammar.hpp>
+#include <boost/utility/result_of.hpp>
+
+#include <boost/msm/lpp/tags.hpp>
 
 
 namespace boost { namespace msm { namespace lpp
 {
 
-struct lambda_tag{};
+template <class T,class Arg1=void,class Arg2=void,class Arg3=void,class Arg4=void>
+struct get_fct
+{
+ typedef typename T::template In<Arg1,Arg2,Arg3,Arg4>::type type;
+};
+
+// wrapper for mpl::for_each as showed in the C++ Template Metaprogramming ch. 9
+template <class T>
+struct wrap{};
+
+template <class Sequence>
+struct LambdaSequence_
+{
+ typedef Sequence sequence;
+ typedef typename ::boost::mpl::deref< typename ::boost::mpl::prior< typename ::boost::mpl::end<Sequence>::type >::type>::type last;
+
+ template<class Sig> struct result;
+ template<class This,class B, class A0>
+ struct result<This(B& block,A0& a0)>
+ {
+ static B& block;
+ static A0& a0;
+ BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested,last()(block,a0) )
+ typedef typename nested::type type;
+ };
+ template<class This,class B, class A0, class A1>
+ struct result<This(B& block,A0& a0,A1& a1)>
+ {
+ static B& block;
+ static A0& a0;
+ static A1& a1;
+ BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested,last()(block,a0,a1) )
+ typedef typename nested::type type;
+ };
+
+ template <typename B,class A0,class A1=void>
+ struct Call
+ {
+ Call(B& block,A0& a0,A1& a1): block_(block),a0_(a0),a1_(a1){}
+ template <class FCT>
+ void operator()(wrap<FCT> const& )
+ {
+ FCT()(block_,a0_,a1_);
+ }
+ private:
+ B& block_;
+ A0& a0_;
+ A1& a1_;
+ };
+ template <typename B,class A0>
+ struct Call<B,A0,void>
+ {
+ Call(B& block,A0& a0): block_(block),a0_(a0){}
+ template <class FCT>
+ void operator()(wrap<FCT> const& )
+ {
+ FCT()(block_,a0_);
+ }
+ private:
+ B& block_;
+ A0& a0_;
+ };
+
+ template<typename B,typename A0>
+ typename boost::result_of<LambdaSequence_(B&,A0&)>::type
+ operator ()(B& block, A0 & a0) const
+ {
+ boost::mpl::for_each< typename ::boost::mpl::pop_back<Sequence>::type,
+ wrap< ::boost::mpl::placeholders::_1> >
+ (Call<B,A0>(block,a0));
+ return last()(block,a0);
+ }
+ template<typename B,typename A0,typename A1>
+ typename boost::result_of<LambdaSequence_(B&,A0&,A1&)>::type
+ operator ()(B& block, A0 & a0, A1 & a1) const
+ {
+ boost::mpl::for_each< typename ::boost::mpl::pop_back<Sequence>::type,
+ wrap< ::boost::mpl::placeholders::_1> >
+ (Call<B,A0,A1>(block,a0,a1));
+ return last()(block,a0,a1);
+ }
+};
+
+
+template <class T>
+struct get_condition
+{
+ typedef typename T::condition type;
+};
+template <class T>
+struct get_ifclause
+{
+ typedef typename T::ifclause type;
+};
+struct ignored {};
+template <class Condition,class IfClause=void>
+struct if_then_
+{
+ typedef Condition condition;
+ typedef IfClause ifclause;
+
+ template<class Sig> struct result;
+ template<class This,class B, class A0>
+ struct result<This(B& block,A0& a0)>
+ {
+ typedef ignored type;
+ };
+ template<class This,class B, class A0, class A1>
+ struct result<This(B& block,A0& a0,A1& a1)>
+ {
+ typedef ignored type;
+ };
+ template<typename B,typename A0>
+ typename boost::result_of<if_then_(B&,A0&)>::type
+ operator()(B& block, A0 & a0)const
+ {
+ if (Condition()(block,a0))
+ {
+ IfClause()(block,a0);
+ }
+ return ignored();
+ }
+ template<typename B,typename A0,typename A1>
+ typename boost::result_of<if_then_(B&,A0&,A1&)>::type
+ operator()(B& block, A0 & a0, A0 & a1)const
+ {
+ if (Condition()(block,a0,a1))
+ {
+ IfClause()(block,a0,a1);
+ }
+ return ignored();
+ }
+};
+
+struct if_then_helper : proto::extends< proto::terminal<tag::if_then>::type, if_then_helper >
+{
+ template <class Arg1,class Arg2,class Arg3,class Arg4>
+ struct In {typedef if_then_<Arg1,Arg2> type;};
+};
+if_then_helper const if_;
+
+
+template <class Condition,class IfClause,class ElseClause>
+struct if_then_else
+{
+ template<class Sig> struct result;
+ template<class This,class B, class A0>
+ struct result<This(B& block,A0& a0)>
+ {
+ static B& block;
+ static A0& a0;
+ BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested,IfClause()(block,a0))
+ typedef typename nested::type type;
+ };
+ template<class This,class B, class A0, class A1>
+ struct result<This(B& block,A0& a0,A1& a1)>
+ {
+ static B& block;
+ static A0& a0;
+ static A1& a1;
+ BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested,IfClause()(block,a0,a1))
+ typedef typename nested::type type;
+ };
+ template<typename B,typename A0>
+ typename boost::result_of<if_then_else(B&,A0&)>::type
+ operator()(B& block, A0 & a0)const
+ {
+ if (Condition()(block,a0))
+ {
+ return IfClause()(block,a0);
+ }
+ else
+ {
+ return ElseClause()(block,a0);
+ }
+ }
+ template<typename B,typename A0,typename A1>
+ typename boost::result_of<if_then_else(B&,A0&,A1&)>::type
+ operator()(B& block, A0 & a0, A0 & a1)const
+ {
+ if (Condition()(block,a0,a1))
+ {
+ return IfClause()(block,a0,a1);
+ }
+ else
+ {
+ return ElseClause()(block,a0,a1);
+ }
+ }
+};
 
 template <class T>
 struct get_nested_type
@@ -168,7 +369,7 @@
 // Define some lambda placeholders
 proto::terminal<placeholder< 0 > >::type const _1={{}};
 proto::terminal<placeholder< 1 > >::type const _2={{}};
-proto::terminal<params_tag>::type const _params={{}};
+proto::terminal<tag::param>::type const _params={{}};
 
 
 
@@ -220,100 +421,6 @@
 };
 
 
-struct BuildParams
- : proto::or_<
- proto::when<
- proto::subscript< proto::terminal<lambda_tag> , FoldToList >,
- FoldToList(proto::_child_c<1>, boost::fusion::nil())
- >
- >
-{};
-
-struct Lambda:
- proto::when<
- BuildLambdaSequence, LambdaSequence_<BuildLambdaSequence(proto::_child_c<1>) >()
- >
-{};
-#define BOOST_MSM_LPP_LAMBDA_EXPR(expr) BOOST_TYPEOF( Lambda()(expr) )
-
-
-
-struct BuildLambdaWithParams
- : proto::or_<
- proto::when<
- proto::subscript< proto::terminal<lambda_tag> ,BuildLambdaSequence>,
- Block<LambdaSequence_<BuildLambdaSequence(proto::_child_c<1>) > >()
- >,
- proto::when<
- proto::subscript< BuildParams , BuildLambdaSequence >,
- Block<
- LambdaSequence_<BuildLambdaSequence(proto::_child_c<1>)>,
- boost::fusion::result_of::as_vector<BuildParams(proto::_child_c<0>)> >
- ( (BuildParams(proto::_value) ) )
- >
- >
-{};
-
-template<typename Expr>
-struct lambda_expr;
-
-struct lambda_dom
- : proto::domain<proto::pod_generator<lambda_expr>, BuildLambdaWithParams>
-{};
-
-template<typename Expr>
-struct lambda_expr
-{
- BOOST_PROTO_BASIC_EXTENDS(Expr, lambda_expr<Expr>, lambda_dom)
- BOOST_PROTO_EXTENDS_SUBSCRIPT()
- template<class Sig> struct result;
- template<class This,class B, class A0>
- struct result<This(B& block,A0& a0)>
- {
- static A0& a0;
- typedef A0& type;
- };
- template<typename A0>
- typename ::boost::result_of<
- typename ::boost::result_of<BuildLambdaWithParams(Expr,A0&)>::type (A0&)
- >::type
- operator()(A0 &a0)const
- {
- BOOST_MPL_ASSERT((proto::matches<Expr, BuildLambdaWithParams>));
- return BuildLambdaWithParams()(*this)(a0);
- }
- template<typename A0>
- typename ::boost::result_of<
- typename ::boost::result_of<BuildLambdaWithParams(Expr,A0&)>::type (A0&)
- >::type
- operator()(A0 const &a0)const
- {
- BOOST_MPL_ASSERT((proto::matches<Expr, BuildLambdaWithParams>));
- return BuildLambdaWithParams()(*this)(a0);
- }
-
- template<typename A0,typename A1>
- typename ::boost::result_of<
- typename ::boost::result_of<BuildLambdaWithParams(Expr,A0&,A1&)>::type (A0&,A1&)
- >::type
- operator()(A0 &a0,A1 &a1)const
- {
- BOOST_MPL_ASSERT((proto::matches<Expr, BuildLambdaWithParams>));
- return BuildLambdaWithParams()(*this)(a0,a1);
- }
- template<typename A0,typename A1>
- typename ::boost::result_of<
- typename ::boost::result_of<BuildLambdaWithParams(Expr,A0&,A1&)>::type (A0&,A1&)
- >::type
- operator()(A0 const &a0,A1 const &a1)const
- {
- BOOST_MPL_ASSERT((proto::matches<Expr, BuildLambdaWithParams>));
- return BuildLambdaWithParams()(*this)(a0,a1);
- }
-};
-
-lambda_expr<proto::terminal<lambda_tag>::type> const lambda = {{{}}};
-
 } } }// boost::msm::lpp
 #endif //BOOST_MSM_LPP_COMMON_TYPES_H
 

Modified: branches/msm/v2_30/boost/msm/lpp/function.hpp
==============================================================================
--- branches/msm/v2_30/boost/msm/lpp/function.hpp (original)
+++ branches/msm/v2_30/boost/msm/lpp/function.hpp 2011-03-12 12:24:14 EST (Sat, 12 Mar 2011)
@@ -19,10 +19,10 @@
 //todo variadic macro for number of arguments
 #define BOOST_MSM_LPP_FUNCTION(funcname,userfunc) \
 template <class Param1=void , class Param2=void , class Param3=void , class Param4=void> \
-struct funcname ## impl : proto::extends< proto::terminal< boost::msm::lpp::action_tag>::type, \
+struct funcname ## impl : proto::extends< proto::terminal< boost::msm::lpp::tag::actor>::type, \
                           funcname ## impl<Param1,Param2,Param3,Param4> >{}; \
 template < > struct funcname ## impl< void,void,void,void> \
- : proto::extends< proto::terminal<boost::msm::lpp::action_tag>::type, funcname ## impl<void,void,void,void> > \
+ : proto::extends< proto::terminal<boost::msm::lpp::tag::actor>::type, funcname ## impl<void,void,void,void> > \
 { \
     template<class Sig> struct result; \
     template<class This,class B, class A0> \
@@ -54,7 +54,7 @@
     } \
 }; \
 template < class Param1 > struct funcname ## impl< Param1, void,void,void> \
- : proto::extends< proto::terminal<boost::msm::lpp::action_tag>::type, funcname ## impl<Param1, void,void,void> > \
+ : proto::extends< proto::terminal<boost::msm::lpp::tag::actor>::type, funcname ## impl<Param1, void,void,void> > \
 { \
     template<class Sig> struct result; \
     template<class This,class B, class A0> \
@@ -86,7 +86,7 @@
         return userfunc(Param1()(block,a0,a1)); \
     } \
 }; \
-struct funcname ## helper : proto::extends< proto::terminal< boost::msm::lpp::action_tag >::type,funcname ## helper> \
+struct funcname ## helper : proto::extends< proto::terminal< boost::msm::lpp::tag::actor >::type,funcname ## helper> \
 { \
     funcname ## helper(){} \
     template <class Arg1,class Arg2,class Arg3,class Arg4> \

Modified: branches/msm/v2_30/boost/msm/lpp/lpp.hpp
==============================================================================
--- branches/msm/v2_30/boost/msm/lpp/lpp.hpp (original)
+++ branches/msm/v2_30/boost/msm/lpp/lpp.hpp 2011-03-12 12:24:14 EST (Sat, 12 Mar 2011)
@@ -7,9 +7,9 @@
 
 //include everything (at cost of longer compile)
 
+#include <boost/msm/lpp/common_types.hpp>
 #include <boost/msm/lpp/basic_grammar.hpp>
 #include <boost/msm/lpp/operator.hpp>
-#include <boost/msm/lpp/common_types.hpp>
 #include <boost/msm/lpp/function.hpp>
 
 

Modified: branches/msm/v2_30/boost/msm/lpp/operator.hpp
==============================================================================
--- branches/msm/v2_30/boost/msm/lpp/operator.hpp (original)
+++ branches/msm/v2_30/boost/msm/lpp/operator.hpp 2011-03-12 12:24:14 EST (Sat, 12 Mar 2011)
@@ -40,7 +40,7 @@
 
 #define BOOST_MSM_LPP_BINARY_OPERATOR(functor,op) \
 template <class T1,class T2> \
-struct functor ## _ : proto::extends<typename proto::terminal<action_tag>::type, functor ## _<T1,T2> > \
+ struct functor ## _ : proto::extends<typename proto::terminal<tag::actor>::type, functor ## _<T1,T2> > \
 { \
     template<class Sig> struct result; \
     BOOST_PP_REPEAT(5, BOOST_MSM_LPP_BINARY_OPERATOR_EXECUTE, (functor ## _ ,op) ) \
@@ -107,7 +107,7 @@
 
 #define BOOST_MSM_LPP_PRE_UNARY_OPERATOR(functor,op) \
 template <class T1> \
-struct functor ## _ : proto::extends<typename proto::terminal<action_tag>::type, functor ## _ <T1> > \
+struct functor ## _ : proto::extends<typename proto::terminal<tag::actor>::type, functor ## _ <T1> > \
 { \
     template<class Sig> struct result; \
     BOOST_PP_REPEAT(5, BOOST_MSM_LPP_PRE_UNARY_OPERATOR_EXECUTE, (functor ## _ ,op) ) \
@@ -152,14 +152,14 @@
 
 #define BOOST_MSM_LPP_POST_UNARY_OPERATOR(functor,op) \
 template <class T1> \
-struct functor ## _ : proto::extends<typename proto::terminal<action_tag>::type, functor ## _<T1> > \
+struct functor ## _ : proto::extends<typename proto::terminal<tag::actor>::type, functor ## _<T1> > \
 { \
     template<class Sig> struct result; \
     BOOST_PP_REPEAT(5, BOOST_MSM_LPP_POST_UNARY_OPERATOR_EXECUTE, (functor ## _ ,op) ) \
 }; \
-template<> struct BuildLambdaCases::case_<proto::tag::functor> \
+template<> struct BuildLambdaCases::case_<proto::tag::functor> \
     : proto::when< \
- proto::functor <BuildLambda >, \
+ proto::functor <BuildLambda >, \
             functor ## _< BuildLambda(proto::_child)>() \
>{};
 

Added: branches/msm/v2_30/boost/msm/lpp/tags.hpp
==============================================================================
--- (empty file)
+++ branches/msm/v2_30/boost/msm/lpp/tags.hpp 2011-03-12 12:24:14 EST (Sat, 12 Mar 2011)
@@ -0,0 +1,20 @@
+// Copyright 2011 Christophe Henry
+// henry UNDERSCORE christophe AT hotmail DOT com
+// 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_MSM_LPP_TAGS_H
+#define BOOST_MSM_LPP_TAGS_H
+
+
+namespace boost { namespace msm { namespace lpp { namespace tag
+{
+
+ struct actor {};
+ struct param{};
+ struct if_then {};
+ struct lambda{};
+
+} } } }// boost::msm::lpp::tag
+#endif //BOOST_MSM_LPP_TAGS_H
+


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