trait RuleDSLActions extends AnyRef
- Alphabetic
- By Inheritance
- RuleDSLActions
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait ActionOperator[I <: HList, O <: HList, Ops] extends AnyRef
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def capture[I <: HList, O <: HList](r: Rule[I, O])(implicit p: Prepend[O, ::[String, HNil]]): Rule[I, Out]
Pushes the input text matched by its inner rule onto the value stack after its inner rule has been run successfully (and only then).
Pushes the input text matched by its inner rule onto the value stack after its inner rule has been run successfully (and only then).
- Annotations
- @compileTimeOnly("Calls to `capture` must be inside `rule` macro")
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def drop[T](implicit h: HListable[T]): PopRule[Out]
Drops one or more values from the top of the value stack.
Drops one or more values from the top of the value stack. E.g.
drop[Int]will drop the topvalue andIntdrop[Int :: String :: HNil]will drop the top two values, which must be anunderneath aInt(the string being the top stack element).String- Annotations
- @compileTimeOnly("Calls to `drop` must be inside `rule` macro")
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def push[T](value: T)(implicit h: HListable[T]): RuleN[Out]
Pushes the given value onto the value stack.
Pushes the given value onto the value stack. - if
TisUnitnothing is pushed (i.e.pushwith a block/expression evaluating toUnitis identical torun) - ifT <: HListall values of the HList is pushed as individual elements - otherwise a single value of typeTis pushed.- Annotations
- @compileTimeOnly("Calls to `push` must be inside `rule` macro")
- implicit def rule2ActionOperator[I <: HList, O <: HList](r: Rule[I, O])(implicit ops: ActionOps[I, O]): ActionOperator[I, O, Out]
- Annotations
- @compileTimeOnly("Calls to `rule2ActionOperator` must be inside `rule` macro")
- def run[T](arg: T)(implicit rr: RunResult[T]): Out
Runs the given block / expression / action function.
Runs the given block / expression / action function. A
runrule can have several shapes, depending on its argument type. If theargevaluates to- a rule (i.e. has type
R <: Rule[_, _]) the result type ofrunis this rule's type (i.e.R) and the produced rule is immediately executed.- a function with 1 to 5 parameters these parameters are mapped against the top of the value stack, popped and the function executed. Thereby the function behaves just like an action function for the
~>operator, i.e. if it produces a Unit value this result is simply dropped. HList results are pushed onto the value stack (all their elements individually), rule results are immediately executed and other result values are pushed onto the value stack as a single element.- a function with one HList parameter the behavior is similar to the previous case with the difference that the elements of this parameter HList are mapped against the value stack top. This allows for consumption of an arbitrary number of value stack elements. (Note: This feature of
is not yet currently implemented.)run- any other value the result type of
runis an always succeedingRule0.NOTE: Even though the block is not a call-by-name parameter it will be executed for every rule application anew! (Since the expression is directly transplanted into the rule method by the
rulemacro.- Annotations
- @compileTimeOnly("Calls to `run` must be inside `rule` macro")
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def test(condition: Boolean): Rule0
Implements a semantic predicate.
Implements a semantic predicate. If the argument expression evaluates to
truethe created rule matches otherwise it doesn't.- Annotations
- @compileTimeOnly("Calls to `test` must be inside `rule` macro")
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()