// Copyright 2008 Christophe Henry // henry UNDERSCORE christophe AT hotmail DOT com // This is an extended version of the state machine available in the boost::mpl library // Distributed under the same license as the original. // Copyright for the original version: // Copyright 2005 David Abrahams and Aleksey Gurtovoy. 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_FRONT_EUML_GUARD_GRAMMAR_H #define BOOST_MSM_FRONT_EUML_GUARD_GRAMMAR_H #include #include #include namespace boost { namespace msm { namespace front { namespace euml { struct BuildGuards; struct BuildActions; struct BuildGuardsCases { // The primary template matches nothing: template struct case_ : proto::not_ {}; }; template<> struct BuildGuardsCases::case_ : proto::when< proto::logical_or, Or_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::logical_and, And_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::logical_not, Not_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::less, Less_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::less_equal, LessEqual_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::greater, Greater_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::greater_equal, GreaterEqual_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::equal_to, EqualTo_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::not_equal_to, NotEqualTo_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::pre_inc, Pre_inc_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::dereference, Deref_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::pre_dec, Pre_dec_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::post_inc, Post_inc_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::post_dec, Post_dec_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::plus, Plus_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::minus, Minus_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::multiplies, Multiplies_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::divides, Divides_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::modulus, Modulus_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::bitwise_and, Bitwise_And_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::bitwise_or, Bitwise_Or_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::subscript, Subscript_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::plus_assign, Plus_Assign_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::minus_assign, Minus_Assign_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::multiplies_assign, Multiplies_Assign_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::divides_assign, Divides_Assign_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::modulus_assign, Modulus_Assign_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::shift_left_assign, ShiftLeft_Assign_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::shift_right_assign, ShiftRight_Assign_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::shift_left, ShiftLeft_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::shift_right, ShiftRight_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::assign, Assign_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::bitwise_xor, Bitwise_Xor_() > {}; template<> struct BuildGuardsCases::case_ : proto::when< proto::negate, Unary_Minus_() > {}; template<> struct BuildGuardsCases::case_ : proto::or_< proto::when< proto::function,BuildGuards,BuildGuards,BuildGuards >, If_Else_), BuildGuards(proto::_child_c<2>), BuildGuards(proto::_child_c<3>) >() >, proto::when< proto::function >, get_fct >() >, proto::when< proto::function,BuildActions >, get_fct,BuildActions(proto::_child_c<1>) >() >, proto::when< proto::function,BuildActions,BuildActions >, get_fct,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) >() >, proto::when< proto::function,BuildActions,BuildActions,BuildActions >, get_fct,BuildActions(proto::_child_c<1>) ,BuildActions(proto::_child_c<2>),BuildActions(proto::_child_c<3>) >() >, proto::when< proto::function,BuildActions,BuildActions,BuildActions,BuildActions >, get_fct ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>) >() >, proto::when< proto::function,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >, get_fct ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>),BuildActions(proto::_child_c<5>) >() > #ifdef BOOST_MSVC ,proto::when< proto::function,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >, get_fct ,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) ,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>) ,BuildActions(proto::_child_c<5>),BuildActions(proto::_child_c<6>) >() > #endif > {}; template<> struct BuildGuardsCases::case_ : proto::or_< proto::when < proto::terminal, get_action_name() >, proto::when< proto::terminal, proto::_ >, proto::when< proto::terminal, proto::_ >, proto::when< proto::terminal, proto::_ >, proto::when< proto::terminal, get_fct() >, proto::when< proto::terminal, proto::_child > > {}; struct BuildGuards : proto::switch_ {}; }}}} #endif //BOOST_MSM_FRONT_EUML_GUARD_GRAMMAR_H