I made a state machine compiler
github.com
github.com
BTW: If anyone remembers Zed Shaw, he wrote some interesting stuff on using Ragel as a state machine for his Utu protocol:
http://web.archive.org/web/20090214182920/http://www.zedshaw...
Thanks for sharing it.