Wikipedia
Ragel
Ragel is a finite-state machine compiler with output support for C, C++ and Assembly source code. It supports the generation of table or control flow driven state machines from regular expressions and/or state charts and can also build lexical analysers via the longest-match method. Ragel specifically targets text parsing and input validation.