cager.jexpr.ast
Class AST

java.lang.Object
  extended bycager.jexpr.ast.AST
Direct Known Subclasses:
ArgumentList, ClassDeclaration, CompilationUnit, FormalParameters, Statement, TypedAST

public abstract class AST
extends java.lang.Object

The base class for all AST classes.

Author:
Paul Cager.

Constructor Summary
AST()
           
AST(AST parent)
           
 
Method Summary
 void dump(int level)
          Dump this node and all children to System.out.
protected  void dumpChildren(int level)
           
protected static java.lang.String dumpPrefix(int level)
           
abstract  AST[] getChildren()
           
 AST getParent()
           
 void setParent(AST parent)
           
abstract  java.lang.Object visit(Visitor v, java.lang.Object o)
          Provided to implement the visitor pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AST

public AST()

AST

public AST(AST parent)
Method Detail

setParent

public void setParent(AST parent)

getParent

public AST getParent()

getChildren

public abstract AST[] getChildren()

dump

public void dump(int level)
Dump this node and all children to System.out.


dumpChildren

protected void dumpChildren(int level)

dumpPrefix

protected static java.lang.String dumpPrefix(int level)

visit

public abstract java.lang.Object visit(Visitor v,
                                       java.lang.Object o)
                                throws ParseException
Provided to implement the visitor pattern.

Throws:
ParseException