lexer puzzle
Simon Marlow
simonmar at microsoft.com
Mon Sep 15 16:41:36 EDT 2003
> I agree with Marcin,
>
> A... should be split into "A.." and "."
>
> As I read the (on-line) report the "maximal munch" rule says that you
> should read the longest lexeme. It does not say that two
> operators have
> to be separated by whitespace.
>
> Because A... is not a lexeme, the longest lexeme you can read from
> "A..." is "A.." (qualified dot-operator).
Wow! I hadn't noticed that before. This means that for example,
'M.where '
must be interpreted as the two tokens
'M.wher' 'e'
This is bound to keep the Obfuscated Haskell programmers happy :-)
Cheers,
Simon
More information about the Haskell
mailing list