coins.ast
Class ASTree

java.lang.Object
  extended bycoins.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

Constructor Summary
ASTree()
           
 
Method Summary
abstract  void accept(Visitor v)
          Is a method for the visitor pattern.
abstract  ASTree getLeft()
           
abstract  ASTree getRight()
           
protected  java.lang.String getTag()
          Returns the type of this node.
protected  void putSeparator(java.lang.StringBuffer sbuf)
           
protected  void rightToString(java.lang.StringBuffer sbuf, ASTree right)
           
abstract  void setLeft(ASTree _left)
           
abstract  void setRight(ASTree _right)
           
 java.lang.String toString()
           
protected  void toString1(java.lang.StringBuffer sbuf, ASTree node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASTree

public ASTree()
Method Detail

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)