Last active
September 25, 2023 01:13
-
-
Save frame-lang/cac0a49613ee241b563845b789e06652 to your computer and use it in GitHub Desktop.
Frame Hierarchical State Machine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`import sys` | |
#![generate_frame_event] | |
fn main { | |
var hsm:# = #HierarchicalStateMachine() | |
hsm.start() | |
hsm.stop() | |
} | |
#HierarchicalStateMachine | |
-interface- | |
start | |
stop | |
-machine- | |
$Begin | |
|start| | |
-> "start" $Working ^ | |
$Working => $Default | |
|>| | |
print("Hello World") ^ | |
$End | |
|>| | |
print("End of the World") ^ | |
$Default | |
|stop| | |
-> "stop" $End ^ | |
## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment