[antlr-interest] Walking TreeParser question

mzukowski at yci.com mzukowski at yci.com
Mon Sep 22 08:27:30 PDT 2003


The source code that has the main() method in it.  Should be easy to find in
the example.

Monty

-----Original Message-----
From: Nico [mailto:nico123 at adinet.com.uy] 
Sent: Friday, September 19, 2003 4:38 PM
To: antlr-interest at yahoogroups.com
Subject: Re: [antlr-interest] Walking TreeParser question


What source code? the one generated for the treeparser?
Can you paste an example of this? Thanks.
----- Original Message ----- 
From: <mzukowski at yci.com>
To: <antlr-interest at yahoogroups.com>
Sent: Friday, September 19, 2003 2:28 PM
Subject: RE: [antlr-interest] Walking TreeParser question


> Look at the source code.  Your main program calls the tree parser, you 
> can call it as many times as you want.
>
> Monty
>
> -----Original Message-----
> From: Nico [mailto:nico123 at adinet.com.uy]
> Sent: Thursday, September 18, 2003 8:38 PM
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] Walking TreeParser question
>
>
> Hi all:
>
> 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?
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list