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. Hide All
  2. Show all
  1. Environments
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. abstract class Entity extends AnyRef

    An entity that represents some program object.

  2. type Environment = Stack[Scope]

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

  3. trait ErrorEntity extends Entity

    An entity that represents an error situation.

  4. case class MultipleEntity() extends Entity with ErrorEntity with Product with Serializable

    A entity represented by names for whom we have seen more than one declaration so we are unsure what is being represented.

  5. trait Named extends AnyRef

    Support for unique ids for named things.

  6. trait NamedEntity extends Entity with Named

    A named entity.

  7. type Scope = Map[String, Entity]

    A scope maps identifiers to entities.

  8. case class UnknownEntity() extends Entity with ErrorEntity with Product with Serializable

    An unknown entity, represented by names whose declarations are missing.

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. object Named extends AnyRef

    Static support for entity names.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

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

  10. def enter(env: Environment): Environment

    Enter a new empty scope nested within the given environment.

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

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

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. final def getClass(): java.lang.Class[_]

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

    Definition Classes
    AnyRef → Any
  16. def isDefinedInEnv(env: Environment, i: String): Boolean

    Say whether i is defined in any scope of env.

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

    Say whether i is defined in an innermost scope of env (i.

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

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

    Say whether i is defined in an outer scope of env (i.

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

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

    Say whether i is defined in the given scope.

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

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

  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. def leave(env: Environment): Environment

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

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

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

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

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

    Definition Classes
    AnyRef
  27. def resetEnvironments: Unit

    Reset the environment module.

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

    Create a root environment, i.

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

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

    Definition Classes
    AnyRef
  30. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any