uk.ac.man.cs.rainbow.compiler.expressions
Class Expression

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.compiler.CompilerThing
        |
        +--uk.ac.man.cs.rainbow.compiler.CompilerNode
              |
              +--uk.ac.man.cs.rainbow.compiler.expressions.Expression
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
BinaryOp, CallExp, CastExp, CondExp, Constant, EmptyExp, GuardExp, IdExp, RecordConstructor, RecordFieldSelect, RepeatedExp, UnaryOp, UnionConstructor, VectorConstructor, VectorSelector

public class Expression
extends CompilerNode
implements Cloneable, Serializable

See Also:
Serialized Form

Fields inherited from class uk.ac.man.cs.rainbow.compiler.CompilerNode
next, sourcepos
 
Constructor Summary
Expression()
           
Expression(SourcePosition sourcepos)
           
Expression(SourcePosition sourcepos, CompilerType spec)
           
 
Method Summary
 TCEnv check_nominal(TCEnv env, Errors errors, String context, CompilerType expected, CompilerType found)
           
 Expression cloneExpression()
           
 Expression cloneExpressionNoParent()
           
 CompilerType getSpec()
           
 Constant map_accumulate_reduce_to_constant(TCEnv env, Errors errors)
           
 Constant reduce_to_constant(TCEnv env, Errors errors)
           
 int reduce_to_integer_constant(TCEnv env, Errors errors)
           
 void setSpec(CompilerType spec)
           
 int size_allowing_for_repeats()
           
 CompilerType specList()
           
 String toString()
           
 Expression typecheckExpr(TCEnv env, Errors errors, CompilerType expected, String context)
           
 Expression typecheckExprList(TCEnv env, Errors errors, CompilerType expectedList, String context)
           
 
Methods inherited from class uk.ac.man.cs.rainbow.compiler.CompilerNode
append, appendNotParent, dumpNode, dumpTree, getParent, indent, iterator, list_typecheck, list_typecheck, listLength, listToString, noParent, rasm_list, rasm, rasm, setParent, typecheck, typecheck, typecheckGreen, typecheckGreen
 
Methods inherited from class uk.ac.man.cs.rainbow.compiler.CompilerThing
className, crashHere, getSerial
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Expression

public Expression(SourcePosition sourcepos,
                  CompilerType spec)

Expression

public Expression(SourcePosition sourcepos)

Expression

public Expression()
Method Detail

setSpec

public void setSpec(CompilerType spec)

getSpec

public CompilerType getSpec()

toString

public String toString()
Overrides:
toString in class CompilerNode

cloneExpression

public Expression cloneExpression()

cloneExpressionNoParent

public Expression cloneExpressionNoParent()

typecheckExprList

public Expression typecheckExprList(TCEnv env,
                                    Errors errors,
                                    CompilerType expectedList,
                                    String context)

typecheckExpr

public Expression typecheckExpr(TCEnv env,
                                Errors errors,
                                CompilerType expected,
                                String context)

check_nominal

public TCEnv check_nominal(TCEnv env,
                           Errors errors,
                           String context,
                           CompilerType expected,
                           CompilerType found)

specList

public CompilerType specList()

reduce_to_constant

public Constant reduce_to_constant(TCEnv env,
                                   Errors errors)

reduce_to_integer_constant

public int reduce_to_integer_constant(TCEnv env,
                                      Errors errors)

map_accumulate_reduce_to_constant

public Constant map_accumulate_reduce_to_constant(TCEnv env,
                                                  Errors errors)

size_allowing_for_repeats

public int size_allowing_for_repeats()