Logo Search packages:      
Sourcecode: antlr version File versions

ASTEnumeration antlr::BaseAST::findAllPartial ( AST  sub  )  [inline, inherited]

Walk the tree looking for all subtrees. Return an ASTEnumerator that lets the caller walk the list of subtree roots found herein.

Implements antlr::collections::AST.

Definition at line 232 of file BaseAST.java.

        Vector roots = new Vector(10);
        AST sibling;

        // the empty tree cannot result in an enumeration
        if (sub == null) {
            return null;

        doWorkForFindAll(roots, sub, true);  // find all matches recursively

        return new ASTEnumerator(roots);

Generated by  Doxygen 1.6.0   Back to index