Re: [boost] [msm] eUML guard/action location

Hi Michael, hi Robert, hi Felipe,
CurrentState() + cool_event() [VeeeeeryLoooooooooongGuard()] /(LooooooooooooooooongAction()) = DestState()
I just wanted to bring an example from SimpleTimer (see doc): Ringing() + tick() == Ringing() [ Source_<m_ringing_cpt>() - Event_<m_tick>() > Int_<0>() ] / (Source_<m_ringing_cpt>() -= Event_<m_tick>() ) would become: Ringing() + tick() [ Source_<m_ringing_cpt>() - Event_<m_tick>() > Int_<0>() ] / (Source_<m_ringing_cpt>() -= Event_<m_tick>() ) == Ringing() Here, it is becoming hard to write action and target state on the same line. And the action can be as big as one wishes.
Here's another suggestion, though it breaks from the logical UML ordering Michael posted previously: DestState() = CurrentState() + cool_event()[guard()]/(action())
I like this one quite much! Not UML at all but pretty much C++-style. And it'd become easy to write guard and action on the next lines if needed.
CurrentState() + cool_event()[guard()]/(action()) -> DestState()
It's very similar with Michael's syntax but I think the operator precedence can be hard to master and we'll need extra parentheses. I think there is no operator -> in proto but ->* . We are making progress :) Christophe

On Tue, Dec 8, 2009 at 12:58 PM, Christophe Henry <christophe.j.henry@googlemail.com> wrote:
Hi Michael, hi Robert, hi Felipe,
[snip]
CurrentState() + cool_event()[guard()]/(action()) -> DestState()
It's very similar with Michael's syntax but I think the operator precedence can be hard to master and we'll need extra parentheses. I think there is no operator -> in proto but ->* .
There's for terminals AFAIK. And the precedence can be worked out with transforms in proto after the expression is mounted.
We are making progress :)
Christophe
Regards, -- Felipe Magno de Almeida
participants (2)
-
Christophe Henry
-
Felipe Magno de Almeida