Semant
Class Semant

java.lang.Object
  extended by Semant.Semant
All Implemented Interfaces:
Visitor

public class Semant
extends java.lang.Object
implements Visitor<Type>


Field Summary
 boolean anyErrors
           
static BOOLEAN BOOLEAN
           
 Table<java.lang.String,CLASS> classEnv
          The classes defined by this compilation.
static INT INT
           
static NIL NIL
           
static CLASS STRING
           
static CLASS SYSTEM
           
static VOID VOID
           
 
Constructor Summary
Semant(java.util.List<ClassDec> classes, java.lang.String mainClassName)
           
 
Method Summary
 Type visit(AddExp e)
           
 Type visit(AndExp e)
           
 Type visit(ArrayExp e)
           
 Type visit(ArrayType t)
           
 Type visit(AssignExp e)
           
 Type visit(Block b)
           
 Type visit(BoolType t)
           
 Type visit(CallExp e)
           
 Type visit(CharExp e)
           
 Type visit(ClassDec d)
           
 Type visit(DivExp e)
           
 Type visit(EqExp e)
           
 Type visit(ExpStm s)
           
 Type visit(FalseExp e)
           
 Type visit(FieldDec f)
           
 Type visit(FieldVar v)
           
 Type visit(Formal f)
           
 Type visit(GreaterEqExp e)
           
 Type visit(GreaterExp e)
           
 Type visit(IfStm s)
           
 Type visit(IntExp e)
           
 Type visit(IntType t)
           
 Type visit(LessEqExp e)
           
 Type visit(LessExp e)
           
 Type visit(MethodDec m)
           
 Type visit(MulExp e)
           
 Type visit(Name v)
           
 Type visit(NameType t)
           
 Type visit(NegateExp e)
           
 Type visit(NotEqExp e)
           
 Type visit(NotExp e)
           
 Type visit(NullExp e)
           
 Type visit(ObjectExp e)
           
 Type visit(OrExp e)
           
 Type visit(ReturnStm s)
           
 Type visit(StringExp e)
           
 Type visit(SubExp e)
           
 Type visit(SubscriptVar v)
           
 Type visit(SuperExp e)
           
 Type visit(ThisExp e)
           
 Type visit(TrueExp e)
           
 Type visit(VarDec v)
           
 Type visit(VoidType t)
           
 Type visit(WhileStm s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classEnv

public Table<java.lang.String,CLASS> classEnv
The classes defined by this compilation.


anyErrors

public boolean anyErrors

VOID

public static final VOID VOID

BOOLEAN

public static final BOOLEAN BOOLEAN

INT

public static final INT INT

NIL

public static final NIL NIL

STRING

public static final CLASS STRING

SYSTEM

public static final CLASS SYSTEM
Constructor Detail

Semant

public Semant(java.util.List<ClassDec> classes,
              java.lang.String mainClassName)
Method Detail

visit

public Type visit(MethodDec m)
Specified by:
visit in interface Visitor

visit

public Type visit(ClassDec d)
Specified by:
visit in interface Visitor

visit

public Type visit(Formal f)
Specified by:
visit in interface Visitor

visit

public Type visit(FieldDec f)
Specified by:
visit in interface Visitor

visit

public Type visit(VarDec v)
Specified by:
visit in interface Visitor

visit

public Type visit(BoolType t)
Specified by:
visit in interface Visitor

visit

public Type visit(IntType t)
Specified by:
visit in interface Visitor

visit

public Type visit(VoidType t)
Specified by:
visit in interface Visitor

visit

public Type visit(ArrayType t)
Specified by:
visit in interface Visitor

visit

public Type visit(NameType t)
Specified by:
visit in interface Visitor

visit

public Type visit(Block b)
Specified by:
visit in interface Visitor

visit

public Type visit(ExpStm s)
Specified by:
visit in interface Visitor

visit

public Type visit(IfStm s)
Specified by:
visit in interface Visitor

visit

public Type visit(ReturnStm s)
Specified by:
visit in interface Visitor

visit

public Type visit(WhileStm s)
Specified by:
visit in interface Visitor

visit

public Type visit(AssignExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(AddExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(AndExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(DivExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(MulExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(OrExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(SubExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(GreaterEqExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(GreaterExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(LessEqExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(LessExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(NegateExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(NotExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(EqExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(NotEqExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(ArrayExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(CallExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(CharExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(FalseExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(IntExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(NullExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(ObjectExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(StringExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(ThisExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(SuperExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(TrueExp e)
Specified by:
visit in interface Visitor

visit

public Type visit(FieldVar v)
Specified by:
visit in interface Visitor

visit

public Type visit(Name v)
Specified by:
visit in interface Visitor

visit

public Type visit(SubscriptVar v)
Specified by:
visit in interface Visitor