|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61004 - sandbox/msm/boost/msm/front/euml
From: christophe.j.henry_at_[hidden]
Date: 2010-04-02 14:00:05
Author: chenry
Date: 2010-04-02 14:00:04 EDT (Fri, 02 Apr 2010)
New Revision: 61004
URL: http://svn.boost.org/trac/boost/changeset/61004
Log:
new fork grammar
Text files modified:
sandbox/msm/boost/msm/front/euml/stt_grammar.hpp | 55 +++++++++++++++++++++++++++++----------
1 files changed, 40 insertions(+), 15 deletions(-)
Modified: sandbox/msm/boost/msm/front/euml/stt_grammar.hpp
==============================================================================
--- sandbox/msm/boost/msm/front/euml/stt_grammar.hpp (original)
+++ sandbox/msm/boost/msm/front/euml/stt_grammar.hpp 2010-04-02 14:00:04 EDT (Fri, 02 Apr 2010)
@@ -46,6 +46,14 @@
typedef Internal<typename TEMP_ROW::Evt,
typename TEMP_ROW::Action,typename TEMP_ROW::Guard> type;
};
+// explicit + fork + entry point + exit point grammar
+struct BuildEntry
+ : proto::when<
+ proto::function<proto::terminal<proto::_>,proto::terminal<state_tag>,proto::terminal<state_tag> >,
+ get_fct<proto::_child_c<0>,proto::_child_c<1>,proto::_child_c<2> >()
+ >
+{};
+
// row grammar
struct BuildNextStates
: proto::or_<
@@ -53,17 +61,21 @@
proto::terminal<state_tag>,
proto::_
>,
- proto::when <
- proto::comma<proto::terminal<state_tag>,proto::terminal<state_tag> >,
+ proto::when<
+ BuildEntry,
+ BuildEntry
+ >,
+ proto::when<
+ proto::comma<BuildEntry,BuildEntry >,
::boost::mpl::push_back<
- make_vector_one_row<proto::_left>(),
- proto::_right>()
- >,
+ make_vector_one_row<BuildEntry(proto::_left)>(),
+ BuildEntry(proto::_right)>()
+ >,
proto::when <
- proto::comma<BuildNextStates,proto::terminal<state_tag> >,
+ proto::comma<BuildNextStates,BuildEntry >,
::boost::mpl::push_back<
BuildNextStates(proto::_left),
- proto::_right >()
+ BuildEntry(proto::_right) >()
>
>
{};
@@ -99,10 +111,23 @@
>
{};
+struct BuildSourceState
+ : proto::or_<
+ proto::when<
+ proto::terminal<state_tag>,
+ proto::_
+ >,
+ proto::when<
+ BuildEntry,
+ BuildEntry
+ >
+ >
+{};
+
struct BuildSourcePlusGuard
: proto::when<
- proto::subscript<proto::terminal<state_tag>,BuildGuards >,
- TempRow<proto::_left,none,none,none,BuildGuards(proto::_right)>()
+ proto::subscript<BuildSourceState,BuildGuards >,
+ TempRow<BuildSourceState(proto::_left),none,none,none,BuildGuards(proto::_right)>()
>
{};
@@ -135,17 +160,17 @@
: proto::or_<
// after == if just state without event or guard/action
proto::when<
- proto::terminal<state_tag>,
- TempRow<proto::_,none,none>() >
+ BuildSourceState,
+ TempRow<BuildSourceState(proto::_),none,none>() >
// == source / action
, proto::when<
- proto::divides<proto::terminal<state_tag>,BuildActionSequence >,
- TempRow<proto::_left,none,none,
+ proto::divides<BuildSourceState,BuildActionSequence >,
+ TempRow<BuildSourceState(proto::_left),none,none,
BuildActionSequence(proto::_right) >() >
// == source [ guard ]
, proto::when<
- proto::subscript<proto::terminal<state_tag>,BuildGuards >,
- TempRow<proto::_left,none,none,none,BuildGuards(proto::_right)>() >
+ proto::subscript<BuildSourceState,BuildGuards >,
+ TempRow<BuildSourceState(proto::_left),none,none,none,BuildGuards(proto::_right)>() >
// == source [ guard ] / action
, proto::when<
proto::divides<BuildSourcePlusGuard,
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