Simon
-----Original Message-----
From: Memovich, Gary [mailto:[EMAIL PROTECTED]]
Sent: 19 July 2001 18:53
To: Simon Peyton-Jones
Subject: Haskell 98 report problem re lexical structure.Hello, I've been studying the Haskell 98 report and think there are a few problems in the section on lexical structure. First, the difference between "lexeme" considered as a production in the grammar and "lexeme" used in the more general sense is very confusing. The fact that "lexeme" as a grammar production is only distinguished by being in italic font is easy to overlook. Also, no definition of "lexeme" in the general sense, is given. I gather that strings matching the productions "dashes", "opencom", and "closecom" are all considered lexemes, but that strings matching "comment" and "ncomment" are not. But this is not explicitly stated anywhere.
Also the string "---", for example, matches both the productions "varsym" and "dashes", so the fact that it should be considered the beginning of a comment is not decided by the maximal-munch rule alone. Perhaps the definition of "varsym" should explicitly rule out strings matching "dashes" in the same way it rules out strings matching "reservedop".
As a second issue, it is stated at the end of section 2.2 that characters not in the category "ANY" are not valid in Haskell programs. But the productions "return", "linefeed", and "uniWhite", which are not included in the production "ANY", are explicitly included in the production "whitechar" which implies that they can be used in programs, at least in a limited way.
I recently posted a message to the Haskell mailing list that was related to some of these same issues, but I now consider that message obsolete.
Thanks for your time and attention,
-- Gary
