[m-rev.] for review: tuple syntax fix
    Fergus Henderson 
    fjh at cs.mu.OZ.AU
       
    Wed Mar 13 20:27:48 AEDT 2002
    
    
  
On 08-Mar-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 08-Mar-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> 
> > library/parser.m:
> > 	Change the parsing for tuples to be similar to the parsing
> > 	for functor arguments, so that e.g. "{(x,y)}" parses as
> > 	"'{}'(','(x,y))" rather than as "'{}'(x,y)", and "{ x :- y }"
> > 	parses successfully as is, rather than needing to be rewritten as
> > 	"{ (x :- y) }".
...
> > +		; { Token = close } ->
> 
> Shouldn't that be `close_curly'?
Yes.  As you can see, I hadn't tested the change.
When I did test the change, I found that it doesn't work, even with
the fix that you mentioned.   It causes problems parsing goals such as
	{ a, b -> c, d ; e, f }
The problem is that with this change, that term parses as
	'{}'(a, (b -> c), (d ; e), f)
which causes an error (`->' without `;') when the term is interpreted
as a goal.
Unfortunately I can't think of any simple solution to this problem.
-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
    
    
More information about the reviews
mailing list