in reply to Usage of FSA::Rules to parse log files
Looking at the code details of the module I saw that if the switch method does not find any rules method that returns true it will raise the exception. The thing is, "greetings" state has only one possibility to go to another state ("command_submission") and should keep processing until this state is reached.
I know nothing about the module, but a FSM generally does not have an implied "if nothing matched, stay in the state" rule. If you want to keep a state until you find the trigger for a different state you have to explicitly make a rule that goes from 'greetings' to 'greetings'.
Have you seen those pictures with circles and arrows usually used to depict a FSM? If a state is kept until something happens, there is an explicit arrow from the circle representing the state to itself. It is not implicit and often you don't want it to be.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Usage of FSA::Rules to parse log files
by glasswalk3r (Friar) on Jul 13, 2011 at 01:22 UTC |