good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
What kind of interface / API would you be interested in seeing? I see two phases. First, I need an API to lay out the network. For my purposes each state has to have:
I don't know what this API should look like. Maybe each state is a Perl module implementing a few methods. Maybe it's just a big data structure made of hashes and arrays. Whatever it is it has to be easy to change later when the businessmen change their minds. Next I need to give the machine a starting state and an event. The machine should either tell me what the next state is or produce an error if the event doesn't trigger a valid next state. Something like:
-sam In reply to Re^2: Are state machines just for parsing?
by samtregar
|
|