Memovich, Gary wrote:
... in section 2.3 where it is claimed that the string "{-" is a lexeme. However the string "{-" cannot be produced by the given grammar production. ...
There seems to be a similar problem with qualified identifiers. The production for lexeme includes varid, conid, etc, rather than qvarid, qconid, etc. (Perhaps someone forgot to update it when qualified names were introduced, in Haskell 1.3...) This might lead you to believe that qualified names are part of the context-free syntax rather than the lexical syntax, and hence that spaces are allowed in them. Qualified names are discussed briefly near the end of section 2.4, but their lexical properties are not explained here. Instead the reader is refered to section 5.3. This reference probably meant to lead to 5.5.1, where the text makes it clear that qualified names are part of the lexical syntax. The same problem is present in Appendix B. Suggestions: include qvarid, qconid in the production for lexeme. Move the explanation of the lexical properties of qualified names from section 5.5.1 to section 2.4. Thomas Hallgren