[antlr-interest] add a tree visitor?

Terence Parr parrt at cs.usfca.edu
Thu Oct 23 18:15:46 PDT 2008


On Oct 23, 2008, at 6:12 PM, Terence Parr wrote:
>    public static void visit(CommonTree t, TreeVisitorAction action) {
>         if ( t.getChildCount()>0 ) {
>             List children = t.getChildren();
>             for (int i=0; i<children.size(); i++) {
>                 CommonTree child = (CommonTree)children.get(i);
>                 filter(child, action);

Ooops...make that visit(child, action)

Ter



More information about the antlr-interest mailing list