Below are revisions for this snippet.

Groovy FSM DSL (with closures)





Syndication

Revision Revison 1
Try to create a DSL for a finite state machine.

Inspired by Chris vanBuskirk version on this site and the Ruby article at

http://www-128.ibm.com/developerworks/java/library/j-cb03137/index.html