Class

org.bitbucket.inkytonik.kiama.rewriting

PlusStrategy

Related Doc: package rewriting

Permalink

class PlusStrategy extends Strategy

Helper class to contain commonality of choice in non-deterministic choice operator and then-else part of a conditional choice. Only returned by the non-deterministic choice operator. The first argument specifies a name for the constructed strategy. p and q are evaluated at most once.

Source
PlusStrategy.scala
Linear Supertypes
Strategy, (Any) ⇒ Option[Any], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PlusStrategy
  2. Strategy
  3. Function1
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PlusStrategy(name: String, p: ⇒ Strategy, q: ⇒ Strategy)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(name: String, q: ⇒ Strategy): PlusStrategy

    Permalink

    As for the other + with the first argument specifying a name for the constructed strategy.

    As for the other + with the first argument specifying a name for the constructed strategy.

    Definition Classes
    Strategy
  4. macro def +(q: Strategy): PlusStrategy

    Permalink

    Non-deterministic choice.

    Non-deterministic choice. Normally, construct a strategy that first applies either this strategy or the given strategy. If it succeeds, succeed with the resulting term. Otherwise, apply q. Currently implemented as deterministic choice, but this behaviour should not be relied upon. When used as the argument to the < conditional choice combinator, + just serves to hold the two strategies that are chosen between by the conditional choice. q is evaluated at most once.

    Definition Classes
    Strategy
  5. def <(name: String, lr: ⇒ PlusStrategy): Strategy

    Permalink

    As for the other < with the first argument specifying a name for the constructed strategy.

    As for the other < with the first argument specifying a name for the constructed strategy.

    Definition Classes
    Strategy
  6. macro def <(lr: PlusStrategy): Strategy

    Permalink

    Conditional choice: c < l + r.

    Conditional choice: c < l + r. Construct a strategy that first applies this strategy (c). If c succeeds, the strategy applies l to the resulting term, otherwise it applies r to the original subject term. lr is evaluated at most once.

    Definition Classes
    Strategy
  7. def <*(name: String, q: ⇒ Strategy): Strategy

    Permalink

    As for the other <* with the first argument specifying a name for the constructed strategy.

    As for the other <* with the first argument specifying a name for the constructed strategy.

    Definition Classes
    Strategy
  8. macro def <*(q: Strategy): Strategy

    Permalink

    Sequential composition.

    Sequential composition. Construct a strategy that first applies this strategy. If it succeeds, then apply q to the new subject term. Otherwise fail. q is evaluated at most once.

    Definition Classes
    Strategy
  9. def <+(name: String, q: ⇒ Strategy): Strategy

    Permalink

    As for the other <+ with the first argument specifying a name for the constructed strategy.

    As for the other <+ with the first argument specifying a name for the constructed strategy.

    Definition Classes
    Strategy
  10. macro def <+(q: Strategy): Strategy

    Permalink

    Deterministic choice.

    Deterministic choice. Construct a strategy that first applies this strategy. If it succeeds, succeed with the resulting term. Otherwise, apply q to the original subject term. q is evaluated at most once.

    Definition Classes
    Strategy
  11. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def andThen[A](g: (Option[Any]) ⇒ A): (Any) ⇒ A

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  13. def apply(r: Any): Option[Any]

    Permalink

    Apply this strategy to a term.

    Apply this strategy to a term. By default, just run the implementation body wrapped in profiling.

    Definition Classes
    Strategy → Function1
  14. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  15. val body: (Any) ⇒ Option[Any]

    Permalink

    Implementation of this strategy.

    Implementation of this strategy. Just apply s.

    Definition Classes
    PlusStrategyStrategy
  16. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def compose[A](g: (A) ⇒ Any): (A) ⇒ Option[Any]

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  18. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. lazy val left: Strategy

    Permalink

    The left alternative of the choice.

  25. def mkStrategy(name: String, f: (Any) ⇒ Option[Any]): Strategy

    Permalink

    Make one of these strategies with the given name and body f.

    Make one of these strategies with the given name and body f.

    Definition Classes
    Strategy
  26. val name: String

    Permalink
    Definition Classes
    Strategy
  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. lazy val right: Strategy

    Permalink

    The right alternative of the choice.

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

    Permalink
    Definition Classes
    AnyRef
  32. def toString(): String

    Permalink

    Identify this strategy by its name.

    Identify this strategy by its name.

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Strategy

Inherited from (Any) ⇒ Option[Any]

Inherited from AnyRef

Inherited from Any

Ungrouped