[antlr-interest] Who calls CommonTree.setTokenStartIndex ?
kevin_mitchell at agilent.com
kevin_mitchell at agilent.com
Tue Sep 30 04:15:06 PDT 2008
I'm using Antlr 3.1 with the Java backend, and generating Antlr-style abstract syntax trees. When I look at these trees I find that getTokenStartIndex (and StopIndex) are always set to -1. I was expecting either the parser to emit calls to setTokenStartIndex, or some code in addChild to call this method whenever a new child was added. But the parser doesn't seem to call this method, and adding a child doesn't seem to update the value either. So where does the code to set the start index of a compound tree get called? Is there some post-processing method I should be calling to set this, or some flag to tell the parser to generate such calls?
Thanks,
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080930/addb6961/attachment.html
More information about the antlr-interest
mailing list