I agree with Thomas's suggestion:

a) Change the definition of lexeme
b) Move lexical discussion from 5.5.1 to 2.4

It also looks that Christian is correct in revising the details of (a).

Thomas, do you agree?

Would this resolve the various lexical issues?

Thanks for your help.

Simon


| -----Original Message-----
| From: Christian Sievers [mailto:[EMAIL PROTECTED]] 
| Sent: 24 July 2001 20:45
| To: [EMAIL PROTECTED]
| Subject: Re: lexical description problem in language report?
| 
| 
| Thomas Hallgren wrote:
| 
| >   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.
| 
| You could still parse a qualified name as three lexemes.
| Of course you don't want this, as this would allow white 
| space between them. For the same reason, you want backquoted 
| functions and constructors to be only one lexeme. In order to 
| achieve this, just use qop instead of qvarsym and qconsym. 
| And we need opencom, as the report says {- is a lexeme.
| 
| So I suggest:
| 
|   lexeme  -> qvarid  | qconid  | qop
|            | literal | special | reservedop | reservedid | opencom
| 
| 
| It's all not new. See: 
| http://www.dcs.gla.ac.uk/mail-| www/haskell/msg01596.html
| 
| 
http://www.dcs.gla.ac.uk/mail-www/haskell/msg01730.html


All the best
Christian Sievers

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to