[m-rev.] Change compiler output to use `.' as module separator

Ralph Becket rafe at cs.mu.OZ.AU
Tue Dec 24 10:39:45 AEDT 2002


Fergus Henderson, Thursday, 19 December 2002:
> On 19-Dec-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> > +++ library/term_io.m	5 Dec 2002 05:22:10 -0000
> > @@ -346,6 +346,14 @@
> > +		; { OpName = "." } ->
> > +				% If the operator is '.'/2 then we must
> > +				% not put spaces around it (or at the
> > +				% very least, we should not put spaces
> > +				% afterwards, since otherwise it will
> > +				% not be seen as an operator by the parser.)
> > +				%
> > +			io__write_string(".")
> 
> I think that will do the wrong thing for terms such as '.'(1,2).
> Note that term_io is used for parsing Prolog code, not just Mercury code...

I agree.  Also, it's not clear to me whether a file containing
 | 1.
 | 2.
will be read as containing one term, '.'(1, 2), or two terms, 1 and 2.

This is why I originally started by parsing names looking for `.'s
rather than treating `.' as an infix operator.

Any thoughts?

> > +	string__append_list([PredOrFuncString, " ", ModuleNameString, ".",
> >  		FullPredName, "/", ArityStr, "-", ProcNumStr], PushMsg).
> 
> I think that will do the wrong thing if ModuleNameString and/or
> FullPredName happen to be numeric. Probably that case is not worth
> worrying about, but I guess we should dcument this issue.

I'll add a comment to this effect.

- Ralph
--------------------------------------------------------------------------
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