lexical description problem in language report?

Memovich, Gary GARY.MEMOVICH@kla-tencor.com
Wed, 18 Jul 2001 11:51:40 -0700


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C10FBA.AE008D50
Content-Type: text/plain;
	charset="iso-8859-1"

I believe I've found a problem, or at least a confusion, in the Haskell 98
Language Report.  The section on lexical structure seems to use the term
"lexeme" in an inconsistent way.  "lexeme" is one of the productions in the
lexical grammar in section 2.2, but the term is also used 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.  Is section 2.3,
and the discussion of the maximal-munch rule, using the term lexeme in a
different way than the grammar production in section 2.2?  If so, maybe a
new term should be introduced such as "rawlexeme", with a production like:
 
rawlexeme -> lexeme | opencom | closecom | dashes
 
Then perhaps the maximal-munch rule could be described in terms of
"rawlexeme".
 
Any thoughts?
-- Gary

------_=_NextPart_001_01C10FBA.AE008D50
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=312112418-18072001>I believe I've found 
a problem, or at least a confusion, in the Haskell 98 Language Report.&nbsp; The 
section on&nbsp;lexical structure seems to use the term "lexeme" in an 
inconsistent way.&nbsp; "lexeme" is one of the productions in the lexical 
grammar in section 2.2, but the term is also used 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.&nbsp; Is section 2.3, and&nbsp;the 
discussion of the maximal-munch rule, using the term lexeme in a different way 
than the grammar production in section 2.2?&nbsp; If so, maybe a new term should 
be introduced such as "rawlexeme", with a production like:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=312112418-18072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=312112418-18072001>rawlexeme -&gt; 
lexeme | opencom | closecom | dashes</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=312112418-18072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=312112418-18072001>Then perhaps the 
maximal-munch rule could be described in terms of 
"rawlexeme".</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=312112418-18072001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=312112418-18072001>Any 
thoughts?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=312112418-18072001>-- 
Gary</SPAN></FONT></DIV></BODY></HTML>

------_=_NextPart_001_01C10FBA.AE008D50--