The Ragel State Machine Compiler creates state machines out of regular languages through compilation.
Ragel has another great feature that lets you think of it as a finite state transducer compiler. It allows output symbols to represent blocks of code that get executed instead of written to the output stream. When you need to write down a regular language, you start with some simple regular language and build a bigger one using the regular language operators like union, concatenation, kleene star, intersection, and subtraction. Ragel takes information about these operators to compile your finite state machines precisely.
Ragel even understands operators that embed actions into machines and operators that control any non-determinism in machines. FSMs generated with Ragel are closed under all of Ragel's regular language, action specification, and priority assignment operators. This property allows arbitrary regular languages to be described. The complexity is limited only by available processing resources.
With Ragel, you can make one machine that picks out specially formatted comments in C code, another machine that builds a list of all function declarations, and a third that identifies string constants. You can "or" them all together to make a single machine that performs all of these tasks concurrently and independently on one pass of the input. These features make Ragel a must-have tool for programmers who want to build accurate and efficient state machines.
Version 6.5: N/A