[mercury-users] lex updates?

Holger Krug hkrug at rationalizer.com
Mon Sep 24 17:01:51 AEST 2001

On Mon, Sep 24, 2001 at 04:17:07PM +1000, Michael Day wrote:
> > One further issue: We also regularly use a combination of lex and
> > moose for prototypical work. It works quite well. It is based on a
> > version of moose which I create based on the one in cvs. The new
> > version allows unique modes.
> I'm a little curious about this. I believe you said that you added a
> command line option to moose to choose between unique and non-unique
> modes; was this just to make it easier for you to develop the patch, or
> are there benefits to using the old code when using non-unique modes?

Actually I didn't think about use cases of moose where the generated
parser code should handle as well non-unique mode input sources as
also unique mode input sources. I currently do not know if you simple
had to add non-unique mode declarations to the code generator to get a
double moded parser, it I think it code be done this way. Anyway it
should be far simpler than what I had to do when I wanted to add
unique modes.

> Otherwise it seems like you could just switch to your new code exclusively
> and give the parser two mode declarations. 

As said above, I think you are right.

> (Although... this would double
> the code size for most users unnecessarily? Oh well, forget it then).

It would only double the size of the binary, but this should not
matter. (Or does anybody want to use a moose generated parser on an
ancient mobile phone or a similar device ?)

> It would be nice if this was available too, even if it doesn't get checked
> in immediately. lex and moose are both very handy :)

Concerning moose I'll send the diff to mercury-dev (I think it's still
in a pre-review stage and is not yet in the format as required for a
formal review) for discussion.

Concerning lex please come back if there is no check-in by Ralph
within the next couple of days or if you or anybody else needs the
changes immediately.

Holger Krug
hkrug at rationalizer.com

mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe

More information about the users mailing list