antlr.collections
Interface AST

All Known Implementing Classes:
ASTNULLType, BaseAST, CommonAST, CommonASTWithHiddenTokens, ParseTree, ParseTreeRule, ParseTreeToken

public interface AST

Minimal AST node interface used by ANTLR AST generation and tree-walker.


Method Summary
 void addChild(AST c)
          Add a (rightmost) child to this node
 boolean equals(AST t)
           
 boolean equalsList(AST t)
           
 boolean equalsListPartial(AST t)
           
 boolean equalsTree(AST t)
           
 boolean equalsTreePartial(AST t)
           
 ASTEnumeration findAll(AST tree)
           
 ASTEnumeration findAllPartial(AST subtree)
           
 int getColumn()
           
 AST getFirstChild()
          Get the first child of this node; null if no children
 int getLine()
           
 AST getNextSibling()
          Get the next sibling in line after this one
 int getNumberOfChildren()
          Get number of children of this node; if leaf, returns 0
 String getText()
          Get the token text for this node
 int getType()
          Get the token type for this node
 void initialize(AST t)
           
 void initialize(int t, String txt)
           
 void initialize(Token t)
           
 void setFirstChild(AST c)
          Set the first child of a node.
 void setNextSibling(AST n)
          Set the next sibling after this one.
 void setText(String text)
          Set the token text for this node
 void setType(int ttype)
          Set the token type for this node
 String toString()
           
 String toStringList()
           
 String toStringTree()
           
 

Method Detail

addChild

void addChild(AST c)
Add a (rightmost) child to this node


equals

boolean equals(AST t)

equalsList

boolean equalsList(AST t)

equalsListPartial

boolean equalsListPartial(AST t)

equalsTree

boolean equalsTree(AST t)

equalsTreePartial

boolean equalsTreePartial(AST t)

findAll

ASTEnumeration findAll(AST tree)

findAllPartial

ASTEnumeration findAllPartial(AST subtree)

getFirstChild

AST getFirstChild()
Get the first child of this node; null if no children


getNextSibling

AST getNextSibling()
Get the next sibling in line after this one


getText

String getText()
Get the token text for this node


getType

int getType()
Get the token type for this node


getLine

int getLine()
Since:
2.7.3 Need for error handling

getColumn

int getColumn()
Since:
2.7.3 Need for error handling

getNumberOfChildren

int getNumberOfChildren()
Get number of children of this node; if leaf, returns 0


initialize

void initialize(int t,
                String txt)

initialize

void initialize(AST t)

initialize

void initialize(Token t)

setFirstChild

void setFirstChild(AST c)
Set the first child of a node.


setNextSibling

void setNextSibling(AST n)
Set the next sibling after this one.


setText

void setText(String text)
Set the token text for this node


setType

void setType(int ttype)
Set the token type for this node


toString

String toString()
Overrides:
toString in class Object

toStringList

String toStringList()

toStringTree

String toStringTree()