org.holtz.zoe.zoel
Class Expression

java.lang.Object
  extended by org.holtz.zoe.zoel.Expression
Direct Known Subclasses:
ExpressionList, Operation, Value

public abstract class Expression
extends java.lang.Object

A Value, Operation, or StatementList in a Zoel program.

Author:
Brian Holtz

Constructor Summary
Expression()
           
 
Method Summary
abstract  Expression copy()
           
 boolean isFertile()
           
 ExpressionListCall nthStatement(java.lang.Integer[] nth)
           
static Expression parse(java.lang.String word1, ZoelTokenizer zoelTokenizer)
           
static Expression parse(ZoelTokenizer zoelTokenizer)
           
static Expression random(java.util.Random random, boolean actionsAllowed)
           
abstract  java.lang.String toString()
           
abstract  java.lang.String toString(java.lang.String statementSeparator, Expression currStmt, java.lang.String cursor)
           
 int totalStatements()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Expression

public Expression()
Method Detail

copy

public abstract Expression copy()

random

public static Expression random(java.util.Random random,
                                boolean actionsAllowed)

totalStatements

public int totalStatements()

nthStatement

public ExpressionListCall nthStatement(java.lang.Integer[] nth)

isFertile

public boolean isFertile()

toString

public abstract java.lang.String toString(java.lang.String statementSeparator,
                                          Expression currStmt,
                                          java.lang.String cursor)

toString

public abstract java.lang.String toString()
Overrides:
toString in class java.lang.Object

parse

public static Expression parse(java.lang.String word1,
                               ZoelTokenizer zoelTokenizer)
                        throws java.lang.Exception
Throws:
java.lang.Exception

parse

public static Expression parse(ZoelTokenizer zoelTokenizer)
                        throws java.lang.Exception
Throws:
java.lang.Exception