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
- 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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
decl: (NonTermUse) ⇒ Option[Rule]
Defining ocurrence that is referrred to by this applied occurrence, if there is one.
-
val
defenv: (GrammarTree) ⇒ SymbolTable.Environment
The
defenvis the environment that extendsenvinwith the bindings (if any) that are defined at this node. -
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.
-
val
env: attribution.Attribution.CachedAttribute[GrammarTree, SymbolTable.Environment]
The
envcontains all of the entities that are visible at a node.The
envcontains 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. -
val
envin: (GrammarTree) ⇒ SymbolTable.Environment
The
envincontains the bindings that are defined "before" the given node.The
envincontains 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 thedefenvof the preceding rule. -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
errors: (GrammarTree) ⇒ Messages
The semantic error messages for a given tree.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
val
first: (GrammarTree) ⇒ Set[TermSym]
FIRST set (i.e., which terminals can appear at the start of a sentence derived from a non-terminal.
-
val
follow: (NonTerm) ⇒ Set[TermSym]
FOLLOW set (i.e., which terminals can follow this non-terminal in a sentential form).
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
val
grammar: attribution.Attribution.CachedAttribute[GrammarTree, Grammar]
The grammar that contains a node.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
ntuses: attribution.Attribution.CachedAttribute[Any, List[NonTermUse]]
Non-terminal applied occurrences in a tree.
-
val
nullable: (GrammarTree) ⇒ Boolean
Nullability (i.e., can derive the empty sequence).
-
val
rule: attribution.Attribution.CachedAttribute[GrammarTree, Rule]
The rule that contains a node.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
val
uses: (NonTermDef) ⇒ Seq[NonTermUse]
Non-terminal uses that are applied occurrences of a given defining occurrence.
-
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( ... )