org.kiama.example.minijava

SemanticAnalyser

class SemanticAnalyser extends AnyRef

Semantic analysis module containing static checking of Minijava semantic rules, most notably name analysis.

Source
SemanticAnalyser.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SemanticAnalyser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SemanticAnalyser()

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. 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.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. 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.

  10. 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 chain method, which threads the attribute through the tree in a depth-first left-to-right order. The envin and envout definitions are used to (optionally) update attribute value as it proceeds through the tree.

  11. def defenvin(in: (MiniJavaTree) ⇒ SymbolTable.Environment): ==>[MiniJavaTree, SymbolTable.Environment]

  12. def defenvout(out: (MiniJavaTree) ⇒ SymbolTable.Environment): ==>[MiniJavaTree, SymbolTable.Environment]

  13. lazy val entity: (IdnTree) ⇒ Entity

    The program entity referred to by an identifier definition or use.

  14. 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.

  15. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  17. val errors: attribution.Attribution.CachedAttribute[Any, Seq[Message]]

    The semantic error messages for a given tree.

  18. 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.

  19. lazy val exptipe: (Expression) ⇒ Type

    What is the expected type of an expression?

  20. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def findMethod(decl: Class, i: String): Entity

    Find the entity for a method called i in the class defined by decl.

    Find the entity for a method called i in the class defined by decl. 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.

  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. 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.

  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. 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

  31. lazy val tipe: (Expression) ⇒ Type

    What is the type of an expression?

  32. def toString(): String

    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped