[antlr-interest] Duplicate nodes on a parse tree?

Vadim Tropashko vadimtro at yahoo.com
Wed Feb 28 14:51:17 PST 2007


I'm leveraging debugger parse tree generation as
described in
http://www.antlr.org/wiki/pages/viewpage.action?pageId=1760

Everything works as advertised, although I'm getting
duplicate nodes. For example given the rule:

boolean_primary options { backtrack=true; }
:         sim_expr
|
 member_predicate
|                          comparison_predicate
;

I'm getting the tree branch like this

boolean_primary
    sim_expr
        ....
    sim_expr
        ....

Is the duplicate "sim_expr" branch occurrence due to
backtracking?  Then what would be the right way to
filter out those ghost nodes? 


 
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news


More information about the antlr-interest mailing list