1 diff -urN alex-2.0.org/alex/doc/alex.1.in alex-2.0/alex/doc/alex.1.in
2 --- alex-2.0.org/alex/doc/alex.1.in 1970-01-01 01:00:00.000000000 +0100
3 +++ alex-2.0/alex/doc/alex.1.in 2004-06-10 02:33:10.570352072 +0200
5 +.TH ALEX 1 "2003-09-09" "Glasgow FP Suite" "Alex Lexical Analyser Generator"
7 +alex \- the lexical analyser generator for Haskell
11 +[\fIOPTION\fR]... \fIfile\fR [\fIOPTION\fR]...
14 +This manual page documents briefly the
19 +This manual page was written for the Debian GNU/Linux distribution
20 +because the original program does not have a manual page. Instead, it
21 +has documentation in various other formats, including DVI, Info and
26 +is a lexical analyser generator system for Haskell. It is similar to the
27 +tool lex or flex for C/C++.
30 +Input files are expected to be of the form
34 +will produce output in
40 +(Chalmers Haskell) the command argument structure is slightly
41 +different. This is because the hbc run time system takes some flags
42 +as its own (for setting things like the heap size, etc). This problem
43 +can be circumvented by adding a single dash (`-') to your command
44 +line. So when using a hbc generated version of Alex, the argument
48 +[\fIOPTION\fR]... \fIfile\fR [\fIOPTION\fR]...
51 +The programs follow the usual GNU command line syntax, with long
52 +options starting with two dashes (`--'). A summary of options is
53 +included below. For a complete description, see the other
57 +.BR \-d ", " \-\-debug
58 +Instructs Alex to generate a lexer which will output debugging messsages
63 +Instructs Alex to generate a lexer which is optimised for compiling with
64 +GHC. The lexer will be significantly more efficient, both in terms of
65 +the size of the compiled lexer and its runtime.
68 +\fB\-o\fR \fIFILE\fR, \fB\-\-outfile=\fIFILE
69 +Specifies the filename in which the output is to be placed. By default,
70 +this is the name of the input file with the
76 +\fB\-i\fR [\fIFILE\fR], \fB\-\-info\fR[=\fIFILE\fR]
77 +Produces a human-readable rendition of the state machine (DFA) that
78 +Alex derives from the lexer, in
82 +where the input file is
86 +The format of the info file is currently a bit basic, and not
87 +particularly informative.
90 +.BR \-v ", " \-\-version
91 +Print version information on standard output then exit successfully.
99 +.UR http://haskell.org/alex/
100 +(http://haskell.org/alex/)
104 +Alex Version @VERSION@
106 +Copyright (c) 1995-2003, Chris Dornan and Simon Marlow
109 +This manual page was written by Ian Lynagh
110 +<igloo@debian.org>, based on the happy manpage, for the Debian GNU/Linux
111 +system (but may be used by others).
113 +.\" Local variables:
116 diff -urN alex-2.0.org/alex/doc/alex.sgml alex-2.0/alex/doc/alex.sgml
117 --- alex-2.0.org/alex/doc/alex.sgml 2004-06-10 02:33:04.891215432 +0200
118 +++ alex-2.0/alex/doc/alex.sgml 2004-06-10 02:33:10.568352376 +0200
119 @@ -1330,8 +1330,8 @@
120 <term><option>-g</option></term>
121 <term><option>--ghc</option></term>
123 - <para>Causes Alex to produce a parser which is optimised for
124 - compiling with GHC. The parser will be significantly more
125 + <para>Causes Alex to produce a lexer which is optimised for
126 + compiling with GHC. The lexer will be significantly more
127 efficient, both in terms of the size of the compiled
128 lexer and its runtime.</para>
130 @@ -1368,8 +1368,8 @@
131 <term><option>-v</option></term>
132 <term><option>--version</option></term>
134 - <para>Be more verbose. This currently doesn't do
135 - anything, but it might in the future.</para>
136 + <para>Print version information on standard output then exit
137 + successfully.</para>
141 diff -urN alex-2.0.org/alex/src/alex.sh alex-2.0/alex/src/alex.sh
142 --- alex-2.0.org/alex/src/alex.sh 2004-06-10 02:33:04.904213456 +0200
143 +++ alex-2.0/alex/src/alex.sh 2004-06-10 02:33:10.574351464 +0200
148 -*--template*) $ALEXBIN $*;;
149 -*) $ALEXBIN --template $ALEXLIB $*;;
150 +*--template*) $ALEXBIN "$@";;
151 +*) $ALEXBIN --template $ALEXLIB ${1+"$@"};;
153 diff -urN alex-2.0.org/alex/src/Main.hs alex-2.0/alex/src/Main.hs
154 --- alex-2.0.org/alex/src/Main.hs 2004-06-10 02:33:04.900214064 +0200
155 +++ alex-2.0/alex/src/Main.hs 2004-06-10 02:33:10.572351768 +0200
160 - prog <- getProgName
161 - die (concat errors ++ usageInfo (usageHeader prog) argInfo)
162 + die (concat errors ++ usageInfo usageHeader argInfo)
164 copyright = "Alex version " ++ version ++ ", (c) 2003 Chris Dornan and Simon Marlow\n"
166 -usageHeader prog = prog ++ " [OPTION...] file"
167 +usageHeader = "alex [OPTION...] file"
169 runAlex cli file = do
170 basename <- case (reverse file) of
171 diff -urN alex-2.0.org/configure.in alex-2.0/configure.in
172 --- alex-2.0.org/configure.in 2004-06-10 02:33:04.910212544 +0200
173 +++ alex-2.0/configure.in 2004-06-10 02:34:13.848732296 +0200
178 -alpha*-unknown-linux*)
180 HostPlatform=alpha-unknown-linux
181 TargetPlatform=alpha-unknown-linux
182 BuildPlatform=alpha-unknown-linux
188 + HostPlatform=mips-unknown-linux # hack again
189 + TargetPlatform=mips-unknown-linux
190 + BuildPlatform=mips-unknown-linux
191 + HostPlatform_CPP='mips_unknown_linux'
192 + HostArch_CPP='mips'
193 + HostVendor_CPP='unknown'
197 + HostPlatform=hppa-unknown-linux # hack again
198 + TargetPlatform=hppa-unknown-linux
199 + BuildPlatform=hppa-unknown-linux
200 + HostPlatform_CPP='hppa_unknown_linux'
201 + HostArch_CPP='hppa'
202 + HostVendor_CPP='unknown'
206 + HostPlatform=arm-unknown-linux # hack again
207 + TargetPlatform=arm-unknown-linux
208 + BuildPlatform=arm-unknown-linux
209 + HostPlatform_CPP='arm_unknown_linux'
211 + HostVendor_CPP='unknown'
215 HostPlatform=ia64-unknown-linux # hack again
216 TargetPlatform=ia64-unknown-linux
218 HostVendor_CPP='unknown'
222 + HostPlatform=m68k-unknown-linux # hack again
223 + TargetPlatform=m68k-unknown-linux
224 + BuildPlatform=m68k-unknown-linux
225 + HostPlatform_CPP='m68k_unknown_linux'
226 + HostArch_CPP='m68k'
227 + HostVendor_CPP='unknown'
231 HostPlatform_CPP='m68k_next_nextstep2'
234 HostVendor_CPP='apple'
238 + HostPlatform=powerpc-unknown-linux
239 + TargetPlatform=powerpc-unknown-linux
240 + BuildPlatform=powerpc-unknown-linux
241 + HostPlatform_CPP='powerpc_unknown_linux'
242 + HostArch_CPP='powerpc'
243 + HostVendor_CPP='unknown'
247 HostPlatform=sparc-sun-sunos4
248 TargetPlatform=sparc-sun-sunos4 #hack
251 HostOS_CPP='solaris2'
253 +sparc*-unknown-linux*)
254 + HostPlatform=sparc-unknown-linux
255 + TargetPlatform=sparc-unknown-linux
256 + BuildPlatform=sparc-unknown-linux
257 + HostPlatform_CPP='sparc-unknown-linux'
258 + HostArch_CPP='sparc'
259 + HostVendor_CPP='unknown'
263 + HostPlatform=s390-ibm-linux
264 + TargetPlatform=s390-ibm-linux #hack
265 + BuildPlatform=s390-ibm-linux #hack
266 + HostPlatform_CPP='s390_ibm_linux'
267 + HostArch_CPP='s390'
268 + HostVendor_CPP='ibm'
272 echo "Unrecognised platform: $HostPlatform"
275 dnl ** Find lex command (lex or flex) - *doesn't* use autoconf's
276 dnl AC_PROG_LEX, since it doesn't actually check whether 'lex'
277 dnl exists if 'flex' doesn't.
279 +dnl AC_PROG_LEX_STRICT
281 dnl ** figure out how to do a BSD-ish install