class SemanticAnalyser extends AnyRef
Semantic analysis module containing static checking of Minijava semantic rules, most notably name analysis.
- Source
- SemanticAnalyser.scala
- Alphabetic
- By Inheritance
- SemanticAnalyser
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SemanticAnalyser()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
actualTypeOf(t: Type): Type
Return the internal type of a syntactic type.
Return the internal type of a syntactic type. In most cases they are the same. The exception is class types since the class type refers to the class by name, but we need to have it as a reference type that refers to the declaration of that class.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
lazy val
defentity: (IdnDef) ⇒ Entity
The entity defined by a defining occurrence of an identifier.
The entity defined by a defining occurrence of an identifier. Defined by the context of the occurrence.
-
lazy val
defenv: Chain[MiniJavaTree, SymbolTable.Environment]
The environment containing bindings for things that are being defined.
The environment containing bindings for things that are being defined. Much of the power of this definition comes from the Kiama
chainmethod, which threads the attribute through the tree in a depth-first left-to-right order. Theenvinandenvoutdefinitions are used to (optionally) update attribute value as it proceeds through the tree. - def defenvin(in: (MiniJavaTree) ⇒ SymbolTable.Environment): ==>[MiniJavaTree, SymbolTable.Environment]
- def defenvout(out: (MiniJavaTree) ⇒ SymbolTable.Environment): ==>[MiniJavaTree, SymbolTable.Environment]
-
lazy val
entity: (IdnTree) ⇒ Entity
The program entity referred to by an identifier definition or use.
-
lazy val
env: (MiniJavaTree) ⇒ SymbolTable.Environment
The environment to use to lookup names at a node.
The environment to use to lookup names at a node. Defined to be the completed defining environment for the smallest enclosing scope.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
errors: (MiniJavaTree) ⇒ Messages
The semantic error messages for a given tree.
-
def
expTypeOfArg(method: Method, index: Int): Type
Return the expected type of a method argument.
Return the expected type of a method argument. We are given the declaration of the method and the argument index. The latter is the count of the node as a child of the CallExp node. The base expression is index 0, the name of the called method is index 1, and the arguments start at index 2. Thus, to lookup this argument in the formal arguments is we need to adjust by two.
-
lazy val
exptipe: (Expression) ⇒ Type
What is the expected type of an expression?
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
findMethod(decl: Class, i: String): Entity
Find the entity for a method called
iin the class defined bydecl.Find the entity for a method called
iin the class defined bydecl. If the method is not found there and decl's class has a superclass, look there. Repeat until either the definition is found or no more superclasses exist, in which case return an the unknown entity. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
iscompatible(t1: Type, t2: Type): Boolean
Are two types compatible? If either of them are unknown then we assume an error has already been raised elsewhere so we say they are compatible with anything.
Are two types compatible? If either of them are unknown then we assume an error has already been raised elsewhere so we say they are compatible with anything. Otherwise the two types have to be the same.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
lazy val
thistype: (MiniJavaTree) ⇒ Type
The type of the normal class in which this node occurs.
The type of the normal class in which this node occurs. Rule 17
-
lazy val
tipe: (Expression) ⇒ Type
What is the type of an expression?
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )