[antlr-interest] More on _saveIndex bugs in 2.7.5

Luis Leal luisl at scarab.co.za
Tue Nov 1 08:40:52 PST 2005


Perfect. I think it's a good idea to document it in the 2.x branch.

Regards

Luis

-----Original Message-----
From: Micheal J [mailto:open.zone at virgin.net]
Sent: 31 October 2005 03:11 AM
To: ''antlr-interest' Interest'
Subject: RE: [antlr-interest] More on _saveIndex bugs in 2.7.5


-- begin ---
> We don't think we can fix this without fairly involved
> changes to the 2.x codegen. The need to predict future
> _saveIndex usage in nested blocks being the showstopper.

It might be possible to alter the 2.x codegen so that it can switch the
destination of the output statements to a temp buffer. We can then flush the
temp buffer to the output file later. With this hack, it may be possible to
implement a fix to the current issue with _saveIndex without actually
solving (or needing to solve) the "future use prediction problem" above.

It looks possible but it's still quite a bit of work. I've got too much on
my plate currently so, perhaps save this for another time?. Or maybe drop
and fix in 3.x codegen.

Kunle
-- end   ---


I think we got most use cases with our _saveIndex fix in the 2.7.5 release.
My inclination is to document this as a known issue with some grammars with
the ANTLR2 branch and, look to fixing it for the ANTLR3 branch.

Cheers,

Micheal






More information about the antlr-interest mailing list