lexical description problem in language report?

Thomas Hallgren [email protected]
Tue, 24 Jul 2001 10:50:16 -0700


  Wolfgang Lux wrote:

>Thomas Hallgren wrote
>
>>There seems to be a similar problem with qualified identifiers. The 
>>production for lexeme includes varid, conid, etc, rather than qvarid, 
>>qconid, etc.
>>
>Sorry we must have a different version of the report, but in my copy 
>and also in the version on Simon PJ's web-pages section 2.4 (in the 
>last paragraph) and appendix B include productions for the qualified 
>identifiers.
>
The version of the report I looked in is here:

http://research.microsoft.com/Users/simonpj/haskell98-revised/haskell98-report-html/lexemes.html#sect2.2 


which is probably the same one you have, so it seems I need to clarify 
what I wrote.

Although qualified names are listed in section 2.4,and in appendix B, 
the two first productions of the grammar are:

  program ->  {lexeme | whitespace }
  lexeme  ->  varid | conid | varsym | consym | literal | special | 
reservedop | reservedid

There is no reference to qualified names here. I thought the purpose of 
these productions were to say that a Haskell program is correct on the 
lexical level iff there is a derivation of it in the lexical grammar, 
starting from the nonterminal "program". Since qualified names are not 
part of this grammar, they are not part of the lexical syntax, which 
contradicts the text in section 5.5.1.

So, I repeat my improvment suggestions: include qvarid, qconid, etc, in 
the production for lexeme. Move the explanation of the lexical 
properties of qualified names from section 5.5.1 to section 2.4.

Regards,
Thomas Hallgren