The command line syntax for Alex is entirely standard:
$ alex { option } file.x { option }Alex expects a single
to be named
on the command line. By default, Alex will create
file.x containing
the Haskell source for the lexer.file.hs
The options that Alex accepts are listed below:
-o file, --outfile=fileSpecifies the filename in which the output is to be
placed. By default, this is the name of the input file with
the .x suffix replaced by
.hs.
-i [file], --info [=file]Produces a human-readable rendition of the state
machine (DFA) that Alex derives from the lexer, in
file (default:
where the input file is
file.info).file.x
The format of the info file is currently a bit basic, and not particularly informative.
-t [dir], --template=dirLook in dir for template files.
-g, --ghcCauses Alex to produce a lexer which is optimised for compiling with GHC. The lexer will be significantly more efficient, both in terms of the size of the compiled lexer and its runtime.
-d, --debugCauses Alex to produce a lexer which will output debugging messsages as it runs.
-?, --helpDisplay help and exit.
-V, --versionOutput version information and exit. Note that for legacy
reasons -v is supported, too, but the use of it
is deprecated. -v will be used for verbose mode
when it is actually implemented.