This is a video tutorial that explains the implementation of the StateMachine example.
See the blog post about this language implementation.