Packages

c

org.kiama.example.grammar

SemanticAnalyser

class SemanticAnalyser extends AnyRef

Perform name analysis checks for the grammar language. Also, define auxiliary properties nullability, first and follow for grammar symbols. The latter are based on definitions found in the paper "Circular Reference Attributed Grammars - their Evaluation and Applications", by Magnusson and Hedin from LDTA 2003.

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
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SemanticAnalyser()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val decl: (NonTermUse) ⇒ Option[Rule]

    Defining ocurrence that is referrred to by this applied occurrence, if there is one.

  7. val defenv: (GrammarTree) ⇒ SymbolTable.Environment

    The defenv is the environment that extends envin with the bindings (if any) that are defined at this node.

  8. val entity: (NonTerm) ⇒ Entity

    The program entity referred to by a non-terminal occurrence.

    The program entity referred to by a non-terminal occurrence. We just look in the environment. If it's not there, then it's unknown.

  9. val env: attribution.Attribution.CachedAttribute[GrammarTree, SymbolTable.Environment]

    The env contains all of the entities that are visible at a node.

    The env contains all of the entities that are visible at a node. In this language, there is only one scope and all defining occurrences are visible anywhere.

  10. val envin: (GrammarTree) ⇒ SymbolTable.Environment

    The envin contains the bindings that are defined "before" the given node.

    The envin contains the bindings that are defined "before" the given node. There are none at the top of the tree and at the first rule. Each other rule gets the defenv of the preceding rule.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. val errors: (GrammarTree) ⇒ Messages

    The semantic error messages for a given tree.

  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. val first: (GrammarTree) ⇒ Set[TermSym]

    FIRST set (i.e., which terminals can appear at the start of a sentence derived from a non-terminal.

  16. val follow: (NonTerm) ⇒ Set[TermSym]

    FOLLOW set (i.e., which terminals can follow this non-terminal in a sentential form).

  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  18. val grammar: attribution.Attribution.CachedAttribute[GrammarTree, Grammar]

    The grammar that contains a node.

  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  24. val ntuses: attribution.Attribution.CachedAttribute[Any, List[NonTermUse]]

    Non-terminal applied occurrences in a tree.

  25. val nullable: (GrammarTree) ⇒ Boolean

    Nullability (i.e., can derive the empty sequence).

  26. val rule: attribution.Attribution.CachedAttribute[GrammarTree, Rule]

    The rule that contains a node.

  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    AnyRef → Any
  29. val uses: (NonTermDef) ⇒ Seq[NonTermUse]

    Non-terminal uses that are applied occurrences of a given defining occurrence.

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

Inherited from AnyRef

Inherited from Any

Ungrouped