Automata

AUTOMATA
Is there a possibility to enforce a state? without codeing a line for each state.

Ex. (for state: reset)
CODE
do forever (
if (input=OnReset) then (currentstate:=reset) and (DoReset)
if (currentstate=reset) and (input=Foo) then (currentstate:=Foo) and (DoFoo)
if (currentstate=Foo) and (input=OnSet) then (currentstate:=set) and (DoSet)
)

sory.

i dont see a way other then defining OnReset for every possible state you have.