antlr.collections
Interface AST

All Known Implementing Classes:
ASTNULLType, BaseAST

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)
           
 AST getFirstChild()
          Get the first child of this node; null if no children
 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

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


equals

public boolean equals(AST t)

equalsList

public boolean equalsList(AST t)

equalsListPartial

public boolean equalsListPartial(AST t)

equalsTree

public boolean equalsTree(AST t)

equalsTreePartial

public boolean equalsTreePartial(AST t)

findAll

public ASTEnumeration findAll(AST tree)

findAllPartial

public ASTEnumeration findAllPartial(AST subtree)

getFirstChild

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


getNextSibling

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


getText

public String getText()
Get the token text for this node


getType

public int getType()
Get the token type for this node


getNumberOfChildren

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


initialize

public void initialize(int t,
                       String txt)

initialize

public void initialize(AST t)

initialize

public void initialize(Token t)

setFirstChild

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


setNextSibling

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


setText

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


setType

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


toString

public String toString()
Overrides:
toString in class Object

toStringList

public String toStringList()

toStringTree

public String toStringTree()


Copyright 1999-2003 Oliver Zeigermann. All Rights Reserved.