Semant
Class Semant
java.lang.Object
Semant.Semant
- All Implemented Interfaces:
- Visitor
- public class Semant
- extends java.lang.Object
- implements Visitor<Type>
Constructor Summary |
Semant(java.util.List<ClassDec> classes,
java.lang.String mainClassName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Semant
public Semant(java.util.List<ClassDec> classes,
java.lang.String mainClassName)
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