1ALEX(1)                 Alex Lexical Analyser Generator                ALEX(1)
2
3
4

NAME

6       alex - the lexical analyser generator for Haskell
7
8

SYNOPSIS

10       alex [OPTION]... file [OPTION]...
11
12

DESCRIPTION

14       This manual page documents briefly the alex command.
15
16
17       This  manual  page  was  written  for the Debian GNU/Linux distribution
18       because the original program does not have a manual page.  Instead,  it
19       has  documentation  in  various  other formats, including DVI, Info and
20       HTML; see below.
21
22
23       Alex is a lexical analyser generator system for Haskell. It is  similar
24       to the tool lex or flex for C/C++.
25
26
27       Input files are expected to be of the form file.x and alex will produce
28       output in file.y
29
30
31       Caveat: When using hbc (Chalmers Haskell) the command  argument  struc‐
32       ture  is  slightly  different.  This is because the hbc run time system
33       takes some flags as its own (for setting things  like  the  heap  size,
34       etc).   This  problem can be circumvented by adding a single dash (`-')
35       to your command line.  So when using a hbc generated version  of  Alex,
36       the argument structure is:
37
38       alex - [OPTION]... file [OPTION]...
39
40

OPTIONS

42       The  programs  follow  the  usual  GNU  command  line syntax, with long
43       options starting with two dashes  (`--').   A  summary  of  options  is
44       included  below.   For a complete description, see the other documenta‐
45       tion.
46
47
48       -d, --debug
49              Instructs Alex to generate a lexer which will  output  debugging
50              messages as it runs.
51
52
53       -g, --ghc
54              Instructs  Alex  to generate a lexer which is optimised for com‐
55              piling with GHC. The lexer will be significantly more efficient,
56              both in terms of the size of the compiled lexer and its runtime.
57
58
59       -o FILE, --outfile=FILE
60              Specifies  the  filename in which the output is to be placed. By
61              default, this is the name of the input file with the  .x  suffix
62              replaced by .hs
63
64
65       -i [FILE], --info[=FILE]
66              Produces  a  human-readable rendition of the state machine (DFA)
67              that Alex derives from the lexer, in  FILE  (default:  file.info
68              where the input file is file.x ).
69
70              The  format  of  the info file is currently a bit basic, and not
71              particularly informative.
72
73
74       -v, --version
75              Print version information on standard output then exit  success‐
76              fully.
77
78

FILES

80       @DATADIR@
81
82

SEE ALSO

84       @DOCDIR@,      the     Alex     homepage     (http://haskell.org/alex/)
85http://haskell.org/alex/
86
87
89       Alex Version @VERSION@
90
91       Copyright (c) 1995-2003, Chris Dornan and Simon Marlow
92
93

AUTHOR

95       This manual page was written by Ian Lynagh <igloo@debian.org>, based on
96       the  happy manpage, for the Debian GNU/Linux system (but may be used by
97       others).
98
99
100
101
102Glasgow FP Suite                  2003-09-09                           ALEX(1)
Impressum