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

    Support for unique ids for named things.

  5. trait NamedEntity extends Entity with Named

    A named entity.

  6. type Scope = Map[String, Entity]

    A scope maps identifiers to entities.

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

  7. object Named extends AnyRef

    Static support for entity names.

  8. object UnknownEntity extends Entity with ErrorEntity with Product with Serializable

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

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

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

  12. def enter(env: Environment): Environment

    Enter a new empty scope nested within the given environment.

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

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

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

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

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

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

    Say whether i is defined in any scope of env.

  19. 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).

  20. 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).

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

    Say whether i is defined in the given scope.

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

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

  23. final def isInstanceOf[T0]: Boolean

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

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

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

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

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

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

    Definition Classes
    AnyRef
  29. def resetEnvironments: Unit

    Reset the environment module.

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

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

    Definition Classes
    AnyRef
  32. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any