statemachine

Boost MSM only processing internal transitions

I'm using the new Boost 1.44.0 MSM library to produce a state machine. In this state machine there are two classes of events class1 and class2. class1 events can be processed by either states S1 or S2 while class2 events can only be processed by state S2. A special class1 event upgrade_req requests an upgrade from state S1 to state S2....

Rails, "Weaker validations," and state machines.

I'm writing a Rails ActiveRecord model that needs a weaker version of validations. Essentially, the flow goes like so: Email is received and parsed by application. (already handled) Input from email is used to create/populate new model instance. (already handled) Model is checked for a series of conditions. (conditions already wr...

Setting UI control properties from delegate function invoked in another class.

I have a ASP.NET web form that implements a wizard using a simple state machine, defined in another class and stored in a session variable. The functions to be executed when different states are reached are defined in the web form class, which passes a delegate array to the state machine during initialization. When the state machine ar...

State Machine Question

Hello. There is a State Machine with two Transitions in the same function. static readonly object _object = new object(); lock (_object) { // I want Host received the event of SMTrans01 first . Obj.StateMachine.Send((int)MyStateMachine.EventType.SMTrans01, new object[2] { Obj, MyStateMachine.EventType.SMTrans01 }); } lock (_o...

How can I remove the function call ambiguity from a Lemon grammar?

I have the following lemon grammar (simplified from the real grammar): %right ASSIGN . %nonassoc FN_CALL . program ::= expression . expression ::= expression ASSIGN expression . expression ::= function_call . [FN_CALL] expression ::= IDENTIFIER . function_call ::= expression LPAREN RPAREN . [FN_CALL] I'm not able to fix the shift-r...

Designing a simple state machine generator

I know that designing state machine generators for regular expressions is not trivial, but what about simple strings (when I say a simple string, I mean something like "abcd" -- something without any regular expression syntax). I was thinking of writing a simple string matcher using state machines, but I wanted the state machine to be ge...