in reply to Re: Are state machines just for parsing?
in thread Are state machines just for parsing?
It occured to me that it might be beneficial to show the state transition diagram for the above state machine.
-- All code is 100% tested and functional unless otherwise noted.
+--------------------------------------------------+ | | | _______ | | left / \ right | | +------------|initial|-----------------+ | | | \_______/ | | | | | | | | +--------+ | | | ___V___ | | | | |left / \ right | _V__V_V_ +-----| red |--------------+ | left / \ right \_______/ | +------| blue |------+ ^ | \________/ | | | | | | | | __V____ | | left / \ right | | +-----| end |------+ | | | \_______/ | | | | ^ ^ | | | | | | | | | +-------+ +---------+ | | | +-------------------------------------------------+
-- All code is 100% tested and functional unless otherwise noted.
|
---|
In Section
Seekers of Perl Wisdom