Packages

t

org.kiama.util

Environments

trait Environments extends AnyRef

General implementation of environments as stacked scopes. The objects associated with names in environments are of type Entity.

Source
Environments.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Environments
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Environment = List[Scope]

    An environment is a stack of scopes with the innermost scope on the top.

  2. trait Named extends AnyRef

    Support for unique ids for named things.

  3. trait NamedEntity extends Entity with Named

    A named entity.

  4. type Scope = Map[String, Entity]

    A scope maps identifiers to entities.

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. def define(env: Environment, i: String, e: Entity): Environment

    Define i to be e in the current scope of env, raising an error if the environment is empty.

  7. def enter(env: Environment): Environment

    Enter a new empty scope nested within the given environment.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  13. def isDefinedInEnv(env: Environment, i: String): Boolean

    Say whether i is defined in any scope of env.

  14. def isDefinedInInner(env: Environment, i: String): Boolean

    Say whether i is defined in an innermost scope of env (i.e., in the current scope).

  15. def isDefinedInOuter(env: Environment, i: String): Boolean

    Say whether i is defined in an outer scope of env (i.e., not in the current scope).

  16. def isDefinedInScope(scope: Scope, i: String): Boolean

    Say whether i is defined in the given scope.

  17. def isDefinedInScope(env: Environment, i: String): Boolean

    Say whether i is defined in the current scope of env.

  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def leave(env: Environment): Environment

    Leave the outermost scope of the given environment, raising an error if the environment is empty.

  20. def lookup(env: Environment, i: String, e: Entity, scope: Boolean = false): Entity

    Look up i in env, returning the mapped Entity if there is one, otherwise return e.

    Look up i in env, returning the mapped Entity if there is one, otherwise return e. If scope is true, just search the innermost scope, otherwise search outwards in all scopes, returning the first Entity found, if any.

  21. val nameCounter: Counter

    A counter to count generated names.

  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  25. def resetEnvironments(): Unit

    Reset the environment module.

  26. def rootenv(bindings: (String, Entity)*): Environment

    Create a root environment, i.e., one that has a single scope containing the given bindings.

  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped