Zed Shaw's article about building state machines with ragel might interest you: http://www.zedshaw.com/essays/ragel_state_charts.html
Re:State Machines
by userdeveloper on Tuesday May 15, 2012 @07:23PM
(#3979502)
That write-up contains a little too much hype for my tastes. And as soon as I saw the words Java and C++ I lost 95% of any curiousity I have about ragel.
This is great thread. I have only used lex/flex to make my state machines. I'd like to try something new eventually.