ALEX(1)
okay bestie, welcome to the Alex Lexical Analyser Generator manual π (aka the alex command, and yes, it's iconic)
β¨ NAME β¨
alex - the lexical analyser generator for Haskell π
π SYNOPSIS π
alex [OPTION]... file [OPTION]...
π¦ DESCRIPTION π¦
So this page is a quick little intro to the alex command πΈ
This page was written for the Debian GNU/Linux distribution, ngl, because the original program doesn't come with a manual page of its own π. It has docs in other formats instead, including DVI, Info and HTML, which I'll mention below π.
Alex is a lexical analyser generator system for Haskell π it's giving lex or flex vibes for C/C++.
Input files should be file.x, and alex spits out file.y π§
Caveat, bestie π: if you're using hbc (Chalmers Haskell), the command arguments are set up a little differently. That's because the hbc run time system grabs some flags for itself (for setting things like the heap size, etc). You can get around it by adding a single dash (-) to your command line. So with an hbc generated version of Alex, the argument structure is:
alex - [OPTION]... file [OPTION]...
π· OPTIONS
Alex uses the usual GNU command line style, so long options start with two dashes (--) π Here's a quick summary of the options. For the full deal, check out the other docs.
-d,--debugβ tells Alex to make a lexer that prints debugging messages while it runs π-g,--ghcβ makes a lexer that's optimised for compiling with GHC π It's significantly more efficient, both in terms of the size of the compiled lexer and its runtime π₯-o FILE,--outfile=FILEβ picks where the output goes π By default, it's the name of the input file with the.xsuffix swapped out for.hs-i [FILE],--info[=FILE]β makes a human-readable version of the state machine (DFA) that Alex builds from your lexer, in FILE (default:file.infowhere the input file isfile.x) π- heads up, the info file format is kinda basic right now and not super informative π
-v,--versionβ prints version info to standard output, then exits successfully β
ποΈ FILES
Just one thing here: @DATADIR@ π
π SEE ALSO
/usr/share/doc/alex, the Alex homepage (http://haskell.org/alex/) π¦
π·οΈ COPYRIGHT
Alex Version 3.5.4.0
Copyright (c) 1995-2003, Chris Dornan and Simon Marlow
π AUTHOR
This page was written by Ian Lynagh <igloo@debian.org>, based on the happy manpage, for the Debian GNU/Linux system. Anyone else is welcome to use it too π«Ά
That's the tea, from Glasgow FP Suite, dated 2003-09-09, filed under ALEX(1)! Stay iconic, bestie π β¨
π¦ where this page comes from
- ubuntu resolute: alex 3.5.4.0-1 Β· BSD3
- ubuntu stonking: alex 3.5.4.0-1 Β· BSD3
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms