org.problets.domain.model.expression
Class StandAloneExpression

java.lang.Object
  extended by org.problets.domain.model.DomainModel
      extended by org.problets.domain.model.expression.Expression
          extended by org.problets.domain.model.expression.StandAloneExpression
All Implemented Interfaces:
java.lang.Cloneable

public class StandAloneExpression
extends Expression

StandAloneExpression Handles expressions for expression tutor - not to be used in code. Resets SymbolTable, creates an activation record for the expression before creating the expression.

Author:
Amruth Kumar

Field Summary
 
Fields inherited from class org.problets.domain.model.expression.Expression
IDENTITY, MAX_PRECEDENCE_LEVELS
 
Fields inherited from class org.problets.domain.model.DomainModel
BOOLEAN, BREAKPOINT, CHARACTER, DOUBLE_PRECISION_REAL, ERROR_TYPE, EVAL_STATUS, expACTION, expASSIGNMENT, expAUTO_DEALLOCATION, expCALL, expCONDITION, expDECLARATION, expDEREFERENCING, expDYNAMIC_ALLOCATION, expDYNAMIC_ALLOCATION_INITIALIZATION, expDYNAMIC_DEALLOCATION, expELSE_CLAUSE, expERROR, expEXECUTION, expIF_CLAUSE, expINITIALIZATION, expINPUT, expPARAMETER_PASSING, expPRINT, expQUESTIONABLE, expREFERENCING, expRETURN, expRUNTIME_ERROR, expSEMANTIC_ERROR, expSYNTAX_ERROR, expUPDATE, MAX_OBJECT_IDENTITY, MIN_OBJECT_IDENTITY, QUADRUPLE_PRECISION_REAL, RUNTIME_ERROR, SEMANTIC_ERROR, SIGNED_INTEGER, SIGNED_LONG, SIGNED_SHORT, SINGLE_PRECISION_REAL, SYNTAX_ERROR, UNDEFINED_TYPE, UNSIGNED_INTEGER, UNSIGNED_LONG, UNSIGNED_SHORT, WARNING
 
Constructor Summary
StandAloneExpression(java.lang.String template)
           
 
Method Summary
 Value evaluate()
          Meant to be used by standalone expressions which want the activation record to be evaluated for variable declarations
static void main(java.lang.String[] args)
           
 void update(java.lang.String template)
           
 
Methods inherited from class org.problets.domain.model.expression.Expression
containsOperator, evaluate, explainObject, explainPrinting, explainProcess, getActivationRecord, getCode, getExpressionVariables, getFunctionCalls, getNumOperators, getOperatorFromSymbol, getOperatorListString, getOperatorPrecedenceTable, getPossibleErrors, getPreliminaryCode, getProcessedExpression, getRoot, getType, grade, isArithmetic, isAssignment, isBitwise, isConstant, isLiteralExpression, isLogical, isRelational, isValidOperator, isVariable, printExpression, sortExplanation, tokenize, toString
 
Methods inherited from class org.problets.domain.model.DomainModel
clone, getId, getIdName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StandAloneExpression

public StandAloneExpression(java.lang.String template)
Method Detail

update

public void update(java.lang.String template)

evaluate

public Value evaluate()
Meant to be used by standalone expressions which want the activation record to be evaluated for variable declarations

Overrides:
evaluate in class Expression

main

public static void main(java.lang.String[] args)