[antlr-interest] Identify parts of if-else statements

Bryan Ewbank ewbank at gmail.com
Mon Feb 7 10:57:33 PST 2005


To identify sections, one way that works is to add extra nodes so that
your traversal only needs to recognize those nodes and so that the
tree is regular.  E.g., always provide an else node, even if it's
empty.

There are other ways, as I'm sure you will soon be hearing :-)


On Mon, 7 Feb 2005 09:41:33 -0600, Manaloto-Raymond
<Manaloto-Raymond at norc.org> wrote:
>  
>  
> 
> Anybody have ideas of the best way to alter the Java parser/treewalker in
> the examples to identify the different parts of an if-else statement (if
> part, then part, else if part, else part)? I need an easy way to identify
> these sections in the treewalk. 
> 
>   
> 
> 
> Raymond Manaloto 
> 
> NORC 
> 
> 55 East Monroe Street Suite 1840
>  Chicago, IL 60603 
> 
> Software Engineer 
> 
> Work: (312) 759.5061 
> 
> Fax: (312) 759.4200 
> 
> Mobile: (773) 814.9666 
> 
> manaloto-raymond at norc.org 
> 
> AIM: sortakool 
> 
>


More information about the antlr-interest mailing list