man rlcodegen (Commandes) - code generator for Ragel State Machine Compiler

NAME

rlcodegen - code generator for Ragel State Machine Compiler

SYNOPSIS

rlcodegen [options] file

DESCRIPTION

Note: this is the backend component of Ragel. This program accepts a machine compiled by the frontend program ragel(1) and generates either code or a graphviz dot file.

OPTIONS

-h, -H, -?, --help
Display help and exit.
-o file
Write output to file. If -o is not given, a default file name is chosen by replacing the suffix of the input. For source files ending in .rh the suffix .h is used. For all other source files a suffix based on the output language is used (.c, .cpp, .m, .dot)
-m
Find the minimal FSM accepting the language. This is the default behaviour. Minimization reduces the number of states in the final FSM. The algorithm implemented is similar to Hopcroft's state minimization algorithm. Differences are due to Ragel supporting arbitrary integer alphabets. Though exact analysis is very difficult, it runs close to O(n*log(n)) and requires O(n) temporary storage where n is the number of states.
-n
Do not perform state minimization.
-C
Generate C/C++/Objective-C code. -D Generate D code.
-V
Generate a Graphviz dotfile. By default writes the dotfile to standard output. May use the -M option to specify the machine to write.
-T0
Generate a table driven FSM. This is the default code style. The table driven FSM represents the state machine as static data. There are tables of states, transitions, indicies and actions. The current state is stored in a variable. The execution is a loop that looks that given the current state and current character to process looks up the transition to take using a binary search, executes any actions and moves to the target state. In general, the table driven FSM produces a smaller binary and requires a less expensive host language compile but results in slower running code. The table driven FSM is suitable for any FSM.
-T1
Generate a faster table driven FSM by expanding action lists in the action execute code.
-F0
Generate a flat table driven FSM. Transitions are represented as an array indexed by the current alphabet character. This eliminates the need for a binary search to locate transitions and produces faster code, however it is only suitable for small alphabets.
-F1
Generate a faster flat table driven FSM by expanding action lists in the action execute code.
-G0
Generate a goto driven FSM. The goto driven FSM represents the state machine as a series of goto statements. While in the machine, the current state is stored by the processor's instruction pointer. The execution is a flat function where control is passed from state to state using gotos. In general, the goto FSM produces faster code but results in a larger binary and a more expensive host language compile.
-G1
Generate a faster goto driven FSM by expanding action lists in the action execute code.
-G2
Generate a really fast goto driven FSM by embedding action lists in the state machine control code.

BUGS

Ragel is still under development and has not yet matured. There are probably many bugs.

CREDITS

Ragel was written by Adrian Thurston <thurston@cs.queensu.ca>. Objective-C output contributed by Eric Ocean. D output contributed by Alan West.

SEE ALSO

ragel(1), re2c(1), flex(1)

Homepage: http://www.elude.ca/ragel/