antlr

Class ASTIterator

public class ASTIterator extends Object

Field Summary
protected ASTcursor
protected ASToriginal
Constructor Summary
ASTIterator(AST t)
Method Summary
booleanisSubtree(AST t, AST sub)
Is 'sub' a subtree of 't' beginning at the root?
ASTnext(AST template)
Find the next subtree with structure and token types equal to those of 'template'.

Field Detail

cursor

protected AST cursor

original

protected AST original

Constructor Detail

ASTIterator

public ASTIterator(AST t)

Method Detail

isSubtree

public boolean isSubtree(AST t, AST sub)
Is 'sub' a subtree of 't' beginning at the root?

next

public AST next(AST template)
Find the next subtree with structure and token types equal to those of 'template'.