Class TraversalHelper
- java.lang.Object
-
- org.codehaus.groovy.antlr.treewalker.TraversalHelper
-
- All Implemented Interfaces:
AntlrASTProcessor
- Direct Known Subclasses:
FlatNodeListTraversal
,PreOrderTraversal
,SourceCodeTraversal
public abstract class TraversalHelper extends Object implements AntlrASTProcessor
Helper Class for Antlr AST traversal and visitation.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<GroovySourceAST>
unvisitedNodes
-
Constructor Summary
Constructors Constructor Description TraversalHelper(Visitor visitor)
-
Method Summary
-
-
-
Field Detail
-
unvisitedNodes
protected List<GroovySourceAST> unvisitedNodes
-
-
Constructor Detail
-
TraversalHelper
public TraversalHelper(Visitor visitor)
-
-
Method Detail
-
setUp
protected void setUp(GroovySourceAST ast)
-
tearDown
protected void tearDown(GroovySourceAST ast)
-
push
protected void push(GroovySourceAST ast)
-
pop
protected GroovySourceAST pop()
-
visitNode
protected void visitNode(GroovySourceAST ast, int n)
-
accept
protected abstract void accept(GroovySourceAST currentNode)
-
accept_v_FirstChildsFirstChild_v_Child2_Child3_v_Child4_v___v_LastChild
protected void accept_v_FirstChildsFirstChild_v_Child2_Child3_v_Child4_v___v_LastChild(GroovySourceAST t)
-
accept_v_FirstChildsFirstChild_v_RestOfTheChildren
protected void accept_v_FirstChildsFirstChild_v_RestOfTheChildren(GroovySourceAST t)
-
accept_FirstChild_v_SecondChild
protected void accept_FirstChild_v_SecondChild(GroovySourceAST t)
-
accept_FirstChild_v_SecondChild_v
protected void accept_FirstChild_v_SecondChild_v(GroovySourceAST t)
-
accept_SecondChild_v_ThirdChild_v
protected void accept_SecondChild_v_ThirdChild_v(GroovySourceAST t)
-
accept_FirstChild_v_SecondChildsChildren_v
protected void accept_FirstChild_v_SecondChildsChildren_v(GroovySourceAST t)
-
accept_v_FirstChild_SecondChild_v_ThirdChild_v
protected void accept_v_FirstChild_SecondChild_v_ThirdChild_v(GroovySourceAST t)
-
accept_FirstChild_v_SecondChild_v_ThirdChild_v
protected void accept_FirstChild_v_SecondChild_v_ThirdChild_v(GroovySourceAST t)
-
accept_FirstSecondAndThirdChild_v_v_ForthChild
protected void accept_FirstSecondAndThirdChild_v_v_ForthChild(GroovySourceAST t)
-
accept_v_FirstChild_2ndv_SecondChild_v___LastChild_v
protected void accept_v_FirstChild_2ndv_SecondChild_v___LastChild_v(GroovySourceAST t)
-
accept_v_FirstChild_v_SecondChild_v___LastChild_v
protected void accept_v_FirstChild_v_SecondChild_v___LastChild_v(GroovySourceAST t)
-
accept_v_FirstChild_v
protected void accept_v_FirstChild_v(GroovySourceAST t)
-
accept_v_Siblings_v
protected void accept_v_Siblings_v(GroovySourceAST t)
-
accept_v_AllChildren_v_Siblings
protected void accept_v_AllChildren_v_Siblings(GroovySourceAST t)
-
accept_v_AllChildren_v
protected void accept_v_AllChildren_v(GroovySourceAST t)
-
accept_FirstChild_v_RestOfTheChildren
protected void accept_FirstChild_v_RestOfTheChildren(GroovySourceAST t)
-
accept_FirstChild_v_RestOfTheChildren_v_LastChild
protected void accept_FirstChild_v_RestOfTheChildren_v_LastChild(GroovySourceAST t)
-
accept_FirstChild_v_RestOfTheChildren_v
protected void accept_FirstChild_v_RestOfTheChildren_v(GroovySourceAST t)
-
accept_v_FirstChild_v_RestOfTheChildren
protected void accept_v_FirstChild_v_RestOfTheChildren(GroovySourceAST t)
-
accept_v_FirstChild_v_RestOfTheChildren_v
protected void accept_v_FirstChild_v_RestOfTheChildren_v(GroovySourceAST t)
-
acceptSiblings
protected void acceptSiblings(GroovySourceAST t)
-
acceptChildren
protected void acceptChildren(GroovySourceAST t)
-
skip
protected void skip(GroovySourceAST expr)
-
openingVisit
protected void openingVisit(GroovySourceAST t)
-
secondVisit
protected void secondVisit(GroovySourceAST t)
-
subsequentVisit
protected void subsequentVisit(GroovySourceAST t)
-
closingVisit
protected void closingVisit(GroovySourceAST t)
-
process
public AST process(AST t)
Description copied from interface:AntlrASTProcessor
performs some processing on the supplied AST node.- Specified by:
process
in interfaceAntlrASTProcessor
- Parameters:
t
- the AST node to process.- Returns:
- possibly returns the AST modified or null, depends on the implementation.
-
-