[antlr-interest] TokenStreamRewriteEngine problem

Tov, Amatzia ATov at nds.com
Thu Mar 24 07:27:16 PST 2005


Hi all,

I have a problem with the TokenStreamRewriteEngine class.

I'm trying to add tokens to the stream, but whenever I manipulate two adjacent tokens, the stream gets scrambled.

For example, when adding a token after the method header, I can't remove the first line in the method - when doing so, the first added token is also removed.

Is it because the "lazy" approach of the class? Is there a way to "flatten" the stream and add all the new changes to it (not via toString)?

Is there any other solution?

Thanks,

Amatzia
***********************************************************************************
Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the postmaster at nds.com and destroy the original message.
***********************************************************************************


More information about the antlr-interest mailing list