Boost logo

Boost :

Subject: Re: [boost] [msm] eUML guard/action location
From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2009-12-08 09:26:12

On Tue, Dec 8, 2009 at 11:57 AM, Stewart, Robert <Robert.Stewart_at_[hidden]> wrote:
> Michael Caisse wrote:
>> Christophe Henry wrote:


> With whitespace, I agree that there's little difference between the two.
> Here's another suggestion, though it breaks from the logical UML ordering Michael posted previously:
>   DestState() = CurrentState() + cool_event()[guard()]/(action())
> This is in keeping with Spirit's syntax in that the guard/action expression is positioned like a semantic action.  It also reads better in C++ because we think in terms of evaluating the RHS and assigning the result to the LHS, and the RHS results in the state on the LHS in the above syntax.

How about:

CurrentState() + cool_event()[guard()]/(action()) -> DestState()

Might not be as easy because of operator precedence. But it can be
made to work with proto without much problems.


Felipe Magno de Almeida

Boost list run by bdawes at, gregod at, cpdaniel at, john at