Ragel State Machine Compiler 6.6

Ragel State Machine Compiler compiles state machines from regular languages.
Ragel State Machine Compiler
  1 Screenshot
Ragel State Machine Compiler compiles finite state machines from regular languages into executable C/C /Objective-C code. Ragel state machines can not only recognize byte sequences as regular expression machines do, but can also execute code at arbitrary points in the recognition of a regular language.

Ragel can also be thought of as a finite state transducer compiler where output symbols represent blocks of code that get executed instead of written to the output stream.

When you wish to write down a regular language you start with some simple regular language and build a bigger one using the regular language operators union, concatenation, kleene star, intersection and subtraction.

This is precisely the way you describe to Ragel how to compile your finite state machines. Ragel also understands operators that embed actions into machines and operators that control any non-determinism in machines.

Ragel FSMs are closed under all of Ragel's regular language, action specification and priority assignment operators. This property allows arbitrary regular languages to be described. Complexity is limited only by available processing resources.

For example, you can make one machine that picks out specially formatted comments in C code, another machine that builds a list all function declarations and a third that identifies string constants then "or" them all together to make a single machine that performs all of these tasks concurrently and independently on one pass of the input.

Main features:

  • Describe arbitrary state machines using regular language operators and/or state tables.
  • NFA to DFA conversion.
  • Hopcroft's state minimization.
  • Embed any number of actions into machines at arbitrary places.
  • Control non-determinism using priorities on transitions.
  • Visualize output with Graphviz.
  • Use byte, double byte or word sized alphabets.
  • Generate C/C /Objective-C code with no dependencies.
  • Choose from table or control flow driven output.

last updated on:
December 3rd, 2009, 10:17 GMT
license type:
GPL (GNU General Public License) 
developed by:
Adrian Thurston
ROOT \ Programming \ Code Generators
Ragel State Machine Compiler
Download Button

In a hurry? Add it to your Download Basket!

user rating 19



Rate it!
What's New in version 6.4
  • The backend programs were removed and merged into the frontend.
  • New write commands were added.
  • Bugs were fixed.
read full changelog

Add your review!