org.kiama.rewriting

Rewriter

object Rewriter extends AnyRef

Strategy-based term rewriting in the style of Stratego (http://strategoxt.org/). The implementation here is partially based on the semantics given in "Program Transformation with Scoped Dynamic Rewrite Rules", by Bravenboer, van Dam, Olmos and Visser, Fundamenta Informaticae, 69, 2005. The library strategies are mostly based on the Stratego library, but also on combinators found in the Scrap Your Boilerplate and Uniplate libraries for Haskell.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Rewriter
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. class PlusStrategy extends Strategy

    Helper class to contain commonality of choice in non-deterministic choice operator and then-else part of a conditional choice.

  2. class Strategy extends (Term) ⇒ Option[Term]

    Term-rewriting strategies.

  3. type Term = Any

    The type of terms that can be rewritten.

    The type of terms that can be rewritten. Any type of value is acceptable but generic traversals will only work on Products (e.g., instances of case classes).

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. object Term extends AnyRef

    Generic term deconstruction.

  7. def all (s: ⇒ Strategy): Strategy

    Traversal to all children.

    Traversal to all children. Construct a strategy that applies s to all term children of the subject term. If s succeeds on all of the children, then succeed, forming a new term from the constructor of the original term and the result of s for each child. If s fails on any child, fail. If there are no children, succeed. If s succeeds on all children producing the same terms (by eq for references and by == for other values), then the overall strategy returns the subject term. This operation works on finite Rewritable, Product, Map and Traversable values, checked for in that order. Children of a Rewritable (resp. Product, collection) value are processed in the order returned by the value's deconstruct (resp. productElement, foreach) method.

  8. def allbu (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s in a bottom-up fashion to all subterms at each level, stopping at a frontier where s succeeds.

  9. def alldownup2 (s1: ⇒ Strategy, s2: ⇒ Strategy): Strategy

    Construct a strategy that applies s1 in a top-down, prefix fashion stopping at a frontier where s1 succeeds.

    Construct a strategy that applies s1 in a top-down, prefix fashion stopping at a frontier where s1 succeeds. s2 is applied in a bottom-up, postfix fashion to the result.

  10. def alltd (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s in a top-down fashion, stopping at a frontier where s succeeds.

  11. def alltdfold (s1: ⇒ Strategy, s2: ⇒ Strategy): Strategy

    Construct a strategy that applies s1 in a top-down, prefix fashion stopping at a frontier where s1 succeeds.

    Construct a strategy that applies s1 in a top-down, prefix fashion stopping at a frontier where s1 succeeds. s2 is applied in a bottom-up, postfix fashion to the results of the recursive calls.

  12. def and (s1: ⇒ Strategy, s2: ⇒ Strategy): Strategy

    and (s1, s2) applies s1 and s2 to the current term and succeeds if both succeed.

    and (s1, s2) applies s1 and s2 to the current term and succeeds if both succeed. s2 will always be applied, i.e., and is *not* a short-circuit operator

  13. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  14. def attempt (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s, yielding the result of s if it succeeds, otherwise leave the original subject term unchanged.

    Construct a strategy that applies s, yielding the result of s if it succeeds, otherwise leave the original subject term unchanged. In Stratego library this strategy is called "try".

  15. def bottomup (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s in a bottom-up, postfix fashion to the subject term.

  16. def bottomupS (s: ⇒ Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    Construct a strategy that applies s in a bottom-up, postfix fashion to the subject term but stops when the strategy produced by stop succeeds.

    Construct a strategy that applies s in a bottom-up, postfix fashion to the subject term but stops when the strategy produced by stop succeeds. stop is given the whole strategy itself as its argument.

  17. def breadthfirst (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s in breadth first order.

  18. def child (i: Int, s: Strategy): Strategy

    Traversal to a single child.

    Traversal to a single child. Construct a strategy that applies s to the ith child of the subject term (counting from one). If s succeeds on the ith child producing t, then succeed, forming a new term that is the same as the original term except that the ith child is now t. If s fails on the ith child or the subject term does not have an ith child, then fail. child (i, s) is equivalent to Stratego's i(s) operator. If s succeeds on the ith child producing the same term (by eq for references and by == for other values), then the overall strategy returns the subject term. This operation works for instances of Product or finite Seq values.

  19. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  20. def collect [CC[U] <: Traversable[U], T] (f: $eq$eq$greater[Term, T])(implicit cbf: CanBuildFrom[CC[T], T, CC[T]]): (Term) ⇒ CC[T]

    Collect query results in a traversable collection.

    Collect query results in a traversable collection. Run the function f as a top-down left-to-right query on the subject term. Accumulate the values produced by the function in the collection and return the final value of the list.

  21. def collectl [T] (f: $eq$eq$greater[Term, T]): (Term) ⇒ List[T]

    Collect query results in a list.

    Collect query results in a list. Run the function f as a top-down left-to-right query on the subject term. Accumulate the values produced by the function in a list and return the final value of the list.

  22. def collects [T] (f: $eq$eq$greater[Term, T]): (Term) ⇒ Set[T]

    Collect query results in a set.

    Collect query results in a set. Run the function f as a top-down left-to-right query on the subject term. Accumulate the values produced by the function in a set and return the final value of the set.

  23. def congruence (ss: Strategy*): Strategy

    Make a strategy that applies the elements of ss pairwise to the children of the subject term, returning a new term if all of the strategies succeed, otherwise failing.

    Make a strategy that applies the elements of ss pairwise to the children of the subject term, returning a new term if all of the strategies succeed, otherwise failing. The constructor of the new term is the same as that of the original term and the children are the results of the strategies. If the length of ss is not the same as the number of children, then congruence (ss) fails. If the argument strategies succeed on children producing the same terms (by eq for references and by == for other values), then the overall strategy returns the subject term. This operation works on instances of Product values.

  24. def count (f: $eq$eq$greater[Term, Int]): (Term) ⇒ Int

    Count function results.

    Count function results. Run the function f as a top-down query on the subject term. Sum the integer values returned by f from all applications.

  25. def debug (s: String, emitter: Emitter = new Emitter): Strategy

    A strategy that always succeeds with the subject term unchanged (i.

    A strategy that always succeeds with the subject term unchanged (i.e., this is the identity strategy) with the side-effect that the subject term is printed to the given emitter, prefixed by the string s. The emitter defaults to one that writes to standard output.

  26. def doloop (s: ⇒ Strategy, c: ⇒ Strategy): Strategy

    Construct a strategy that applies s at least once and then repeats s while c succeeds.

    Construct a strategy that applies s at least once and then repeats s while c succeeds. This operator is called "do-while" in the Stratego library.

  27. def dontstop (s: ⇒ Strategy): Strategy

    A unit for topdownS, bottomupS and downupS.

    A unit for topdownS, bottomupS and downupS. For example, topdown (s) is equivalent to topdownS (s, dontstop).

  28. def downup (s1: ⇒ Strategy, s2: ⇒ Strategy): Strategy

    Construct a strategy that applies s1 in a top-down, prefix fashion and s2 in a bottom-up, postfix fashion to the subject term.

  29. def downup (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s in a combined top-down and bottom-up fashion (i.

    Construct a strategy that applies s in a combined top-down and bottom-up fashion (i.e., both prefix and postfix) to the subject term.

  30. def downupS (s1: ⇒ Strategy, s2: ⇒ Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    Construct a strategy that applies s1 in a top-down, prefix fashion and s2 in a bottom-up, postfix fashion to the subject term but stops when the strategy produced by stop succeeds.

    Construct a strategy that applies s1 in a top-down, prefix fashion and s2 in a bottom-up, postfix fashion to the subject term but stops when the strategy produced by stop succeeds. stop is given the whole strategy itself as its argument.

  31. def downupS (s: ⇒ Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    Construct a strategy that applies s in a combined top-down and bottom-up fashion (i.

    Construct a strategy that applies s in a combined top-down and bottom-up fashion (i.e., both prefix and postfix) to the subject but stops when the strategy produced by stop succeeds. stop is given the whole strategy itself as its argument.

  32. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  33. val eq : Strategy

    Construct a strategy that tests whether the two sub-terms of a pair of terms are equal.

  34. val equal : Strategy

    Construct a strategy that tests whether the two sub-terms of a pair of terms are equal.

    Construct a strategy that tests whether the two sub-terms of a pair of terms are equal. Synonym for eq.

  35. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  36. def everything [T] (v: T)(f: (T, T) ⇒ T)(g: $eq$eq$greater[Term, T])(t: Term): T

    Apply the function at every term in t in a top-down, left-to-right order.

    Apply the function at every term in t in a top-down, left-to-right order. Collect the resulting T values by accumulating them using f with initial left value v. Return the final value of the accumulation.

  37. def everywhere (s: ⇒ Strategy): Strategy

    Same as everywheretd.

  38. def everywherebu (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s at all terms in a bottom-up fashion regardless of failure.

    Construct a strategy that applies s at all terms in a bottom-up fashion regardless of failure. (Sub-)terms for which the strategy fails are left unchanged.

  39. def everywheretd (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s at all terms in a top-down fashion regardless of failure.

    Construct a strategy that applies s at all terms in a top-down fashion regardless of failure. (Sub-)terms for which the strategy fails are left unchanged.

  40. val fail : Strategy

    A strategy that always fails.

  41. def finalize (): Unit

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

    Attributes
    final
    Definition Classes
    AnyRef
  43. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  44. val id : Strategy

    A strategy that always succeeds with the subject term unchanged (i.

    A strategy that always succeeds with the subject term unchanged (i.e., this is the identity strategy).

  45. def innermost (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s repeatedly to the innermost (i.

    Construct a strategy that applies s repeatedly to the innermost (i.e., lowest and left-most) (sub-)term to which it applies. Stop with the current term if s doesn't apply anywhere.

  46. def innermost2 (s: ⇒ Strategy): Strategy

    An alternative version of innermost.

  47. def ior (s1: ⇒ Strategy, s2: ⇒ Strategy): Strategy

    ior (s1, s2) implements 'inclusive or', that is, the inclusive choice of s1 and s2.

    ior (s1, s2) implements 'inclusive or', that is, the inclusive choice of s1 and s2. It first tries s1, if that fails it applies s2 (just like s1 <+ s2). However, when s1 succeeds it also tries to apply s2. The results of the transformations are returned.

  48. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  49. val isinnernode : Strategy

    Construct a strategy that succeeds if the current term has at least one direct subterm.

  50. val isleaf : Strategy

    Construct a strategy that succeeds if the current term has no direct subterms.

  51. val ispropersubterm : Strategy

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a sub-term of y but is not equal to y.

  52. val ispropersuperterm : Strategy

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a super-term of y but is not equal to y.

  53. val issubterm : Strategy

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a sub-term of y.

  54. val issuperterm : Strategy

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a superterm of y.

  55. def lastly (s: ⇒ Strategy, f: ⇒ Strategy): Strategy

    Applies s followed by f whether s failed or not.

    Applies s followed by f whether s failed or not. This operator is called "finally" in the Stratego library.

  56. def leaves (s: ⇒ Strategy, isleaf: ⇒ Strategy, skip: (Strategy) ⇒ Strategy): Strategy

    Construct a strategy that applies to all of the leaves of the current term, using isleaf as the leaf predicate, skipping subterms for which skip when applied to the result succeeds.

  57. def leaves (s: ⇒ Strategy, isleaf: ⇒ Strategy): Strategy

    Construct a strategy that applies to all of the leaves of the current term, using isleaf as the leaf predicate.

  58. def loop (c: ⇒ Strategy, s: ⇒ Strategy): Strategy

    Construct a strategy that while c succeeds applies s.

    Construct a strategy that while c succeeds applies s. This operator is called "while" in the Stratego library.

  59. def loopiter (s: (Int) ⇒ Strategy, low: Int, up: Int): Strategy

    Construct a strategy that applies s (i) for each integer i from low to up (inclusive).

    Construct a strategy that applies s (i) for each integer i from low to up (inclusive). This operator is called "for" in the Stratego library.

  60. def loopiter (i: ⇒ Strategy, c: ⇒ Strategy, s: ⇒ Strategy): Strategy

    Construct a strategy that repeats application of s while c fails, after initialization with i.

    Construct a strategy that repeats application of s while c fails, after initialization with i. This operator is called "for" in the Stratego library.

  61. def loopnot (c: ⇒ Strategy, s: ⇒ Strategy): Strategy

    Construct a strategy that while c does not succeed applies s.

    Construct a strategy that while c does not succeed applies s. This operator is called "while-not" in the Stratego library.

  62. def manybu (s: Strategy): Strategy

    Construct a strategy that applies s as many times as possible, but at least once, in bottom up order.

  63. def manytd (s: Strategy): Strategy

    Construct a strategy that applies s as many times as possible, but at least once, in top down order.

  64. def map (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s to each element of a list, returning a new list of the results if all of the applications succeed, otherwise fail.

  65. def memo (s: ⇒ Strategy): Strategy

    Return a strategy that behaves as s does, but memoises its arguments and results.

    Return a strategy that behaves as s does, but memoises its arguments and results. In other words, if memo (s) is called on a term t twice, the second time will return the same result as the first, without having to invoke s. For best results, it is important that s should have no side effects.

  66. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  67. def not (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s, then fails if s succeeded or, if s failed, succeeds with the subject term unchanged, I.

    Construct a strategy that applies s, then fails if s succeeded or, if s failed, succeeds with the subject term unchanged, I.e., it tests if s applies, but has no effect on the subject term.

  68. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  69. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  70. def oncebu (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s in a bottom-up fashion to one subterm at each level, stopping as soon as it succeeds once (at any level).

  71. def oncetd (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s in a top-down fashion to one subterm at each level, stopping as soon as it succeeds once (at any level).

  72. def one (s: ⇒ Strategy): Strategy

    Traversal to one child.

    Traversal to one child. Construct a strategy that applies s to the term children of the subject term. Assume that c is the first child on which s succeeds. Then stop applying s to the children and succeed, forming a new term from the constructor of the original term and the original children, except that c is replaced by the result of applying s to c. In the event that the strategy fails on all children, then fail. If there are no children, fail. If s succeeds on the one child producing the same term (by eq for references and by == for other values), then the overall strategy returns the subject term. This operation works on instances of finite Rewritable, Product, Map and Traversable values, checked for in that order. Children of a Rewritable (resp. Product, collection) value are processed in the order returned by the value's deconstruct (resp. productElement, foreach) method.

  73. implicit def optionToStrategy (o: Option[Term]): Strategy

    (Implicitly) construct a strategy from an option value.

    (Implicitly) construct a strategy from an option value. The strategy succeeds or fails depending on whether the option is a Some or None, respectively.

    Attributes
    implicit
  74. def or (s1: ⇒ Strategy, s2: ⇒ Strategy): Strategy

    or (s1, s2) is similar to ior (s1,s2), but the application of the strategies is only tested.

  75. def outermost (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s repeatedly in a top-down fashion stopping each time as soon as it succeeds once (at any level).

    Construct a strategy that applies s repeatedly in a top-down fashion stopping each time as soon as it succeeds once (at any level). The outermost fails when s fails to apply to any (sub-)term.

  76. def para [T] (f: (Any, Seq[T]) ⇒ T): (Any) ⇒ T

    Perform a paramorphism over a value.

    Perform a paramorphism over a value. This is a fold in which the recursive step may refer to the recursive component of the value and the results of folding over the children. When the function f is called, the first parameter is the value and the second is a sequence of the values that f has returned for the children. This will work on any value, but will only decompose Products. This operation is similar to that used in the Uniplate library.

  77. def query [T] (f: $eq$eq$greater[Term, T]): Strategy

    Define a term query.

    Define a term query. Construct a strategy that always succeeds with no effect on the subject term but applies a given partial function f to the subject term. In other words, the strategy runs f for its side-effects.

  78. def queryf [T] (f: (Term) ⇒ T): Strategy

    Define a term query.

    Define a term query. Construct a strategy that always succeeds with no effect on the subject term but applies a given (possibly partial) function f to the subject term. In other words, the strategy runs f for its side-effects.

  79. def reduce (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s repeatedly to subterms until it fails on all of them.

  80. def repeat (s: ⇒ Strategy, n: Int): Strategy

    Construct a strategy that applies s repeatedly exactly n times.

    Construct a strategy that applies s repeatedly exactly n times. If s fails at some point during the n applications, the entire strategy fails. The result of the strategy is that of the nth application of s.

  81. def repeat (s: ⇒ Strategy, c: ⇒ Strategy): Strategy

    Construct a strategy that repeatedly applies s until it fails and then terminates with application of c.

  82. def repeat (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s repeatedly until it fails.

  83. def repeat1 (s: ⇒ Strategy): Strategy

    Construct a strategy that repeatedly applies s (at least once).

  84. def repeat1 (s: ⇒ Strategy, c: ⇒ Strategy): Strategy

    Construct a strategy that repeatedly applies s (at least once) and terminates with application of c.

  85. def repeatuntil (s: ⇒ Strategy, c: ⇒ Strategy): Strategy

    Construct a strategy that repeatedly applies s until c succeeds.

  86. def restore (s: ⇒ Strategy, rest: ⇒ Strategy): Strategy

    Apply restoring action 'rest' if s fails, and then fail.

    Apply restoring action 'rest' if s fails, and then fail. Typically useful if s performs side effects that should be restored/undone in case s fails.

  87. def restorealways (s: ⇒ Strategy, rest: ⇒ Strategy): Strategy

    Apply restoring action 'rest' after s terminates, and preserve success/failure behaviour of s.

    Apply restoring action 'rest' after s terminates, and preserve success/failure behaviour of s. Typically useful if s performs side effects that should be restored always, e.g., when maintaining scope information.

  88. def rewrite [T] (s: ⇒ Strategy)(t: T): T

    Rewrite a term.

    Rewrite a term. Apply the strategy s to a term returning the result term if s succeeds, otherwise return the original term.

  89. def rule (f: $eq$eq$greater[Term, Term]): Strategy

    Define a rewrite rule using a partial function.

    Define a rewrite rule using a partial function. If the function is defined at the current term, then the strategy succeeds with the return value of the function applied to the current term. Otherwise the strategy fails.

  90. def rulef (f: (Term) ⇒ Term): Strategy

    Define a rewrite rule using a function that returns a term.

    Define a rewrite rule using a function that returns a term. The rule always succeeds with the return value of the function.

  91. def rulefs (f: $eq$eq$greater[Term, Strategy]): Strategy

    Define a rewrite rule using a function that returns a strategy.

    Define a rewrite rule using a function that returns a strategy. The rule applies the function to the subject term to get a strategy which is then applied again to the subject term. In other words, the function is only used for side-effects such as pattern matching. The whole thing also fails if f is not defined at the term in the first place.

  92. def same (v1: Any, v2: Any): Boolean

    Compare two arbitrary values.

    Compare two arbitrary values. If they are both references, use reference equality, otherwise use value equality.

  93. def some (s: ⇒ Strategy): Strategy

    Traversal to as many children as possible, but at least one.

    Traversal to as many children as possible, but at least one. Construct a strategy that applies s to the term children of the subject term. If s succeeds on any of the children, then succeed, forming a new term from the constructor of the original term and the result of s for each succeeding child, with other children unchanged. In the event that the strategy fails on all children, then fail. If there are no children, fail. If s succeeds on children producing the same terms (by eq for references and by == for other values), then the overall strategy returns the subject term. This operation works on instances of finite Rewritable, Product, Map and Traversable values, checked for in that order. Children of a Rewritable (resp. Product, collection) value are processed in the order returned by the value's deconstruct (resp. productElement, foreach) method.

  94. def somebu (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s in a bottom-up fashion to some subterms at each level, stopping as soon as it succeeds once (at any level).

  95. def somedownup (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s in a top-down, prefix fashion stopping at a frontier where s succeeds on some children.

    Construct a strategy that applies s in a top-down, prefix fashion stopping at a frontier where s succeeds on some children. s is then applied in a bottom-up, postfix fashion to the result.

  96. def sometd (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s in a top-down fashion to some subterms at each level, stopping as soon as it succeeds once (at any level).

  97. def strategy (f: $eq$eq$greater[Term, Option[Term]]): Strategy

    Make a strategy from a partial function.

    Make a strategy from a partial function. If the function is defined at the current term, then the function return value when applied to the current term determines whether the strategy succeeds or fails. If the function is not defined at the current term, the strategy fails.

  98. def strategyf (f: (Term) ⇒ Option[Term]): Strategy

    Make a strategy from a function.

    Make a strategy from a function. The function return value determines whether the strategy succeeds or fails.

  99. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  100. def term (t: Term): Strategy

    Construct a strategy that succeeds only if the subject term matches a given term.

  101. implicit def termToStrategy (t: Term): Strategy

    (Implicitly) construct a strategy that always succeeds, changing the subject term to a given term.

    (Implicitly) construct a strategy that always succeeds, changing the subject term to a given term.

    Attributes
    implicit
  102. def test (s: ⇒ Strategy): Strategy

    Construct a strategy that tests whether strategy s succeeds, restoring the original term on success.

    Construct a strategy that tests whether strategy s succeeds, restoring the original term on success. A synonym for where.

  103. def toString (): String

    Definition Classes
    AnyRef → Any
  104. def topdown (s: ⇒ Strategy): Strategy

    Construct a strategy that applies s in a top-down, prefix fashion to the subject term.

  105. def topdownS (s: ⇒ Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    Construct a strategy that applies s in a top-down, prefix fashion to the subject term but stops when the strategy produced by stop succeeds.

    Construct a strategy that applies s in a top-down, prefix fashion to the subject term but stops when the strategy produced by stop succeeds. stop is given the whole strategy itself as its argument.

  106. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  109. def where (s: ⇒ Strategy): Strategy

    Construct a strategy that tests whether strategy s succeeds, restoring the original term on success.

    Construct a strategy that tests whether strategy s succeeds, restoring the original term on success. This is similar to Stratego's "where", except that in this version any effects on bindings are not visible outside s.

Inherited from AnyRef

Inherited from Any