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

Ralph Becket rafe at cs.mu.OZ.AU
Fri Jan 17 15:32:31 AEDT 2003


Fergus Henderson, Monday,  6 January 2003:
> 
> What about if the LHS ends with a digit?
> e.g. consider "'.'(3,e9)".  That should be output as "3'.'e1",
> not "3.e9".

Trying to compile this module:

:- module dot_separator.
:- interface.



    :- module foo_1.
    :- interface.

    :- type foo_1.bar ---> bar.
    :- type foo_1.'234' ---> foo_1.'234'.
    :- type foo_1.'345bar' ---> '345bar'.
    :- type foo_1.'.bar' ---> '.bar'.

    :- end_module foo_1.

    :- module 'foo.'.
    :- interface.

    :- type 'foo.'.bar ---> bar.
    :- type 'foo.'.'234' ---> 'foo.'.'234'.
    :- type 'foo.'.'345bar' ---> '345bar'.
    :- type 'foo.'.'.bar' ---> '.bar'.

    :- end_module 'foo.'.

    :- module ('=..').
    :- interface.

    :- type ('=..').baz ---> baz.
    :- type ('=..').'456' ---> '456'.
    :- type ('=..').'567baz' ---> '567baz'.
    :- type ('=..').'.baz' ---> '.baz'.

    :- end_module ('=..').

I get

res:~/mercury/ws-dot/mercury/tests/hard_coded $ mmc --make dot_separator
Making dot_separator.int3
Making dot_separator.int0
Making dot_separator.c
Making dot_separator.o
Making dot_separator.=...o
Making dot_separator.foo_1.o
** Error making `dot_separator'.
mkinit: sorry, file names containing special characters are not
supported.
File name `dot_separator.=...c' contains special character `='.

If I comment out the '=..' submodule then compilation works fine.

If I introduce syntax errors (e.g. from 'foo.'.'234' to 'foo.'.234 or
from foo_1.'234' to foo_1.234) then the qualified name is quoted
correctly in the error reports.

Do you want me to add an error test case or is the file above (with the
'=..' module commented out with an explanation) sufficient?

	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