Packages

case class SymbolTable(container: AST.Definition) extends Product with Serializable

Symbol Table for Validation and other purposes. This symbol table is built from the AST model after syntactic parsing is complete. It will also work for any sub-tree of the model that is rooted by a ParentDefOf[Definition] node.

The symbol tree contains a mapping from leaf name to the entire list of parent definitions (symbols) as well as a mapping from definitions to their parents (parentage). Bot maps are built during a single pass of the AST.

container

The node from which to build the symbol table

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SymbolTable
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SymbolTable(container: AST.Definition)

    container

    The node from which to build the symbol table

Type Members

  1. type LookupResult[D <: AST.Definition] = List[(AST.Definition, Option[D])]

    The result of a lookupSymbol request A lookupSymbol request returns a list of tuples that contain the generic definition, as a Definition, and, if the definition matches the type of interest, D, then an Option[D] for convenience.

  2. type Parentage = HashMap[AST.Definition, Parents]
  3. type Parents = Seq[AST.Definition]
  4. type SymTab = HashMap[String, Seq[SymTabItem]]
  5. type SymTabItem = (AST.Definition, Parents)

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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. val container: AST.Definition
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def foreachOverloadedSymbol[T](process: (Seq[Seq[AST.Definition]]) => T): T
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. def lookup[D <: AST.Definition](id: Seq[String])(implicit arg0: ClassTag[D]): List[D]
  12. def lookup[D <: AST.Definition](ref: AST.Reference[D])(implicit arg0: ClassTag[D]): List[D]
  13. def lookupParentage(names: Seq[String]): List[SymTabItem]

    Look up a symbol in the table

    Look up a symbol in the table

    returns

    A list of matching definitions of 2-tuples giving the definition as a Definition type and optionally as the requested type

  14. def lookupSymbol[D <: AST.Definition](id: Seq[String])(implicit arg0: ClassTag[D]): LookupResult[D]

    Look up a symbol in the table

    Look up a symbol in the table

    D

    The expected type of definition

    id

    The multi-part identifier of the symbol, from leaf to root, that is from most nested to least nested.

    returns

    A list of matching definitions of 2-tuples giving the definition as a Definition type and optionally as the requested type

  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. def parentOf(definition: AST.Definition): Option[AST.Definition]

    Get the parent of a definition

    Get the parent of a definition

    definition

    The definition whose parent is to be sought.

    returns

    optionally, the parent definition of the given definition

  19. def parentsOf(definition: AST.Definition): Seq[AST.Definition]

    Get all parents of a definition

    Get all parents of a definition

    definition

    The defintiion whose parents are to be sought.

    returns

    the sequence of ParentDefOf parents or empty if none.

  20. def pathOf(definition: AST.Definition): Seq[String]

    Get the full path of a definition

    Get the full path of a definition

    definition

    The definition for which the path name is sought.

    returns

    A list of strings from leaf to root giving the names of the definition and its parents.

  21. def productElementNames: Iterator[String]
    Definition Classes
    Product
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped