[antlr-interest] antlr translation doubts

Bart Kiers bkiers at gmail.com
Sat Oct 2 00:58:52 PDT 2010


On Fri, Oct 1, 2010 at 7:51 PM, vijay e <vijaydone at gmail.com> wrote:

> Thanks for ur reply,
> Ya i followed ur idea, but the problem i am getting in using filter is ,
> when i set the filter as true, my common token stream contains only the
> tokens of my interst, , i can do all modifications in those tokens only
> ,but, how can i make those token changes reflect in my original file with
> all the other non intersted tokens untouched


Every CommonToken has the following methods:

int getLine ()
int getCharPositionInLine ()


which should give you enough information to modify the original source file.

Bart.


More information about the antlr-interest mailing list