coins.ast
Class ASTree
java.lang.Object
coins.ast.ASTree
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- Aggregate, ASTList, ConstantExpr, Declarator, Enum, Function, LeafStmnt, OperatorExpr, Pair, Pragma, StringLiteral, TreeStmnt, VariableExpr
- public abstract class ASTree
- extends java.lang.Object
- implements java.io.Serializable
Abstract Syntax Tree. An ASTree object represents a node of
a binary tree. If the node is a leaf node, both getLeft()
and getRight() returns null.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ASTree
public ASTree()
getLeft
public abstract ASTree getLeft()
getRight
public abstract ASTree getRight()
setLeft
public abstract void setLeft(ASTree _left)
setRight
public abstract void setRight(ASTree _right)
accept
public abstract void accept(Visitor v)
- Is a method for the visitor pattern. It calls
atXXX() on the given visitor, where
XXX is the class name of the node object.
toString
public java.lang.String toString()
getTag
protected java.lang.String getTag()
- Returns the type of this node. This method is used by
toString().
putSeparator
protected void putSeparator(java.lang.StringBuffer sbuf)
toString1
protected final void toString1(java.lang.StringBuffer sbuf,
ASTree node)
rightToString
protected void rightToString(java.lang.StringBuffer sbuf,
ASTree right)