[antlr-interest] Walking TreeParser question
nico123 at adinet.com.uy
Thu Sep 18 20:38:01 PDT 2003
I will use the Antlr to parse a source code and to get some metrics.
I will read source, to create the AST with parser and walk it with the TreeParser.
(as seen in the java.g and java.g.tree example)
TreeParser has the same structure to the one that were used to create the AST.
My question is:
How do I iterate recursively in the tree (or call it several times) ?
(The java tree parser example walks it once)
For example, If I want to count the number of classes, one pass is enough.
But if want to get the number of overridden methods in a sub class, I need to walk the
tree more than once.
Is my question clear?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the antlr-interest