OS Manuals

/usr/bin/ragel

Finite state machine compiler

From ragel 7.1.0_pre1-r4 (os), captured 2026-11-05 by running ragel --help (exit 0). permalink

usage: ragel [options] file
general:
   -h, -H, -?, --help   Print this usage and exit
   -v, --version        Print version information and exit
   -o <file>            Write output to <file>
   -s                   Print some statistics and compilation info to stderr
   -d                   Do not remove duplicates from action lists
   -I <dir>             Add <dir> to the list of directories to search
                        for included an imported files
   --rlhc               Show the rlhc command used to compile
   --save-temps         Do not delete intermediate file during compilation
   --no-intermediate    Disable call to rlhc, leave behind intermediate
error reporting format:
   --error-format=gnu   file:line:column: message (default)
   --error-format=msvc  file(line,column): message
fsm minimization:
   -n                   Do not perform minimization
   -m                   Minimize at the end of the compilation
   -l                   Minimize after most operations (default)
   -e                   Minimize after every operation
visualization:
   -V                   Generate a dot file for Graphviz
   -p                   Display printable characters on labels
   -S <spec>            FSM specification to output (for graphviz output)
   -M <machine>         Machine definition/instantiation to output (for
                        graphviz output)
host language binaries:
   ragel, ragel-c       C, C++, Obj-C or Obj-C++
                        All code styles supported.
   ragel-asm            GNU AS, x86_64, System V ABI.
                        Generated in a code style equivalent to -G2
   ragel-d              D           All code styles supported
   ragel-go             Go          All code styles supported
   ragel-csharp         C#          -T0 -T1 -F0 -F1 -G0 -G1
   ragel-java           Java        -T0 -T1 -F0 -F1
   ragel-ruby           Ruby        -T0 -T1 -F0 -F1
   ragel-ocaml          OCaml       -T0 -T1 -F0 -F1
   ragel-rust           Rust        -T0 -T1 -F0 -F1
   ragel-julia          Julia       -T0 -T1 -F0 -F1
   ragel-crack          Crack       -T0 -T1 -F0 -F1
   ragel-js             JavaScript  -T0 -T1 -F0 -F1
line directives:
   -L                   Inhibit writing of #line directives
code style:
   -T0                  Binary search (default)
   -T1                  Binary search with expanded actions
   -F0                  Flat table
   -F1                  Flat table with expanded actions
   -G0                  Switch-driven
   -G1                  Switch-driven with expanded actions
   -G2                  Goto-driven with expanded actions
large machines:
   --integral-tables    Use integers for table data (default)
   --string-tables      Encode table data into strings for faster host lang
                        compilation
analysis:
   --prior-interaction          Search for condition-based general repetitions
                                that will not function properly due to state mod
                                overlap and must be NFA reps.
   --conds-depth=D              Search for high-cost conditions inside a prefix
                                of the machine (depth D from start state).
   --state-limit=L              Report fail if number of states exceeds this
                                during compilation.
   --breadth-check=E1,E2,..     Report breadth cost of named entry points and
                                the start state.
   --input-histogram=FN         Input char histogram for breadth check. If
                                unspecified a flat histogram is used.
testing:
   --kelbt-frontend        Compile using original ragel + kelbt frontend
                           Requires ragel be built with ragel + kelbt support
   --colm-frontend         Compile using a colm-based recursive descent
                           frontend
   --reduce-frontend       Compile using a colm-based reducer (default)
   --var-backend           Use the variable-based backend even if the host lang
                           supports goto-based
   --supported-host-langs  Show supported host languages by command line arg
   --supported-frontends   Show supported frontends
   --supported-backends    Show supported backends
   --force-libragel        Cause mainline to behave like libragel
Options (59)
OptionDescriptionSource
-h, -H, -?, --helpPrint this usage and exithelp + man
-v, --versionPrint version information and exit.help + man
-o fileWrite output to <file>help + man
-sPrint some statistics and compilation info to stderrhelp + man
-dDo not remove duplicate actions from action lists.help + man
-I dirAdd <dir> to the list of directories to search for included an imported fileshelp + man
--rlhcShow the rlhc command used to compilehelp
--save-tempsDo not delete intermediate file during compilationhelp
--no-intermediateDisable call to rlhc, leave behind intermediatehelp
--error-format gnuPrint error messages using the format "file:line:column:" (default)help + man
-nDo not perform state minimization.help + man
-mPerform minimization once, at the end of the state machine compilation.help + man
-lMinimize after most operations (default)help + man
-eMinimize after every operation.help + man
-VGenerate a dot file for Graphviz.help + man
-pDisplay printable characters on labels.help + man
-S specFSM specification to output (for graphviz output)help + man
-M machineMachine definition/instantiation to output (for graphviz output)help + man
-LInhibit writing of #line directives.help + man
-T0(C/D/Java/Ruby/C#) Generate a table driven FSM.help + man
-T1(C/D/Ruby/C#) Generate a faster table driven FSM by expanding action lists in the action execute code.help + man
-F0(C/D/Ruby/C#) Generate a flat table driven FSM.help + man
-F1(C/D/Ruby/C#) Generate a faster flat table driven FSM by expanding action lists in the action execute code.help + man
-G0(C/D/C#) Generate a goto driven FSM.help + man
-G1(C/D/C#) Generate a faster goto driven FSM by expanding action lists in the action execute code.help + man
-G2(C/D/Go) Generate a really fast goto driven FSM by embedding action lists in the state machine control code.help + man
--integral-tablesUse integers for table data (default)help
--string-tablesEncode table data into strings for faster host lang compilationhelp
--prior-interactionSearch for condition-based general repetitions that will not function properly due to state mod overlap and must be NFA reps.help
--conds-depth DSearch for high-cost conditions inside a prefix of the machine (depth D from start state).help
--state-limit LReport fail if number of states exceeds this during compilation.help
--breadth-check E1Report breadth cost of named entry points and the start state.help
--input-histogram FNInput char histogram for breadth check.help + man
--kelbt-frontendCompile using original ragel + kelbt frontend Requires ragel be built with ragel + kelbt supporthelp
--colm-frontendCompile using a colm-based recursive descent frontendhelp
--reduce-frontendCompile using a colm-based reducer (default)help
--var-backendUse the variable-based backend even if the host lang supports goto-basedhelp
--supported-host-langsShow supported host languages by command line arghelp
--supported-frontendsShow supported frontendshelp
--supported-backendsShow supported backendshelp
--force-libragelCause mainline to behave like libragelhelp
-xCompile the state machines and emit an XML representation of the host data and the machines. (in the manual page but not in --help)man
-CThe host language is C, C++, Obj-C or Obj-C++. (in the manual page but not in --help)man
--asm --gas-x86-64-sys-vGNU AS, x86_64, System V ABI ASM is generated in a code style equiv to -G2 (in the manual page but not in --help)man
-DThe host language is D. (in the manual page but not in --help)man
-ZThe host language is Go. (in the manual page but not in --help)man
-JThe host language is Java. (in the manual page but not in --help)man
-RThe host language is Ruby. (in the manual page but not in --help)man
-AThe host language is C# (in the manual page but not in --help)man
-OThe host language is OCaml. (in the manual page but not in --help)man
-UThe host language is Rust. (in the manual page but not in --help)man
-YThe host language is Julia. (in the manual page but not in --help)man
-KThe host language is Crack. (in the manual page but not in --help)man
-PThe host language is JavaScript. (in the manual page but not in --help)man
--nfa-conds-depth DSearch for high-cost conditions inside a prefix of the machine (depth D from start state). (in the manual page but not in --help)man
--nfa-term-checkSearch for condition-based general repetitions that will not function properly and must be NFA reps. (in the manual page but not in --help)man
--nfa-intermed-state-limit LReport fail if number of states exceeds this during compilation. (in the manual page but not in --help)man
--nfa-final-state-limit LReport a fail if number states in final machine exceeds this. (in the manual page but not in --help)man
--nfa-breadth-check E1Report breadth cost of named entry points by (and start). (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.