Ragel finite-state-machine compiler
Ragel compiles a declarative machine description syntax into a source code file in Java, Ruby, or a bunch of C-like languages. In addition, Ragel can generate a graphviz .dot file containing a diagram of the states and interaction of the input machine.
Ragel can be used to generate general purpose Finite State Machines (FSMs), which are commonly used in embedded systems and in protocol-driven applications like telephony and internet servers.
Ragel can also be used to generate a "lexer" (or "scanner") - a piece of code that scans an input text and divides it into "tokens". This lexical analysis is traditionally the first step in interpreting or compiling computer languages:
input -> lexer -> parser -> AST -> execution or code generation