[m-dev.] for review: rename the lexer and parser modules

Zoltan Somogyi zs at cs.mu.OZ.AU
Wed Aug 23 12:57:46 AEST 2000


On 22-Aug-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> The other downside is that this change would break backwards
> compatibility.  The "lexer" and "parser" modules are publically
> accessible parts of the interface to the Mercury standard library,
> documented in the library reference manual.

You are right. However, I thought of a way to avoid this problem.
I can leave a lexer.m and parser.m in place, but make all their
interface predicates call the corresponding predicates in mer_lexer
and mer_parser, and make the types they define be just equivalences
of the types defined in mer_lexer and mer_parser.

This way, people who import modules lexer or parser expecting the
old modules will get them, but since the rest of the Mercury library
will not refer to the lexer and parser modules, they will not be linked
into programs that have their own lexer or parser modules. I *think*
this works even with shared objects, although I am not sure, and I don't
know about DLLs at all.

How about it?

Zoltan.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list