object Rule extends Rule0 with RuleRunnable
THIS IS NOT PUBLIC API and might become hidden in future. Use only if you know what you are doing!
- Alphabetic
- By Inheritance
- Rule
- RuleRunnable
- Rule
- RuleX
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def *(separator: Rule0)(implicit l: Lifter[Seq, HNil, HNil]): Rule[In, OptionalOut]
Postfix shortcut for
zeroOrMore(...).separatedBy(...).Postfix shortcut for
zeroOrMore(...).separatedBy(...).- Definition Classes
- Rule
- Annotations
- @compileTimeOnly("Calls to `.*` must be inside `rule` macro")
- def *(implicit l: Lifter[Seq, HNil, HNil]): Rule[In, OptionalOut] with Repeated
Postfix shortcut for
zeroOrMore.Postfix shortcut for
zeroOrMore.- Definition Classes
- Rule
- Annotations
- @compileTimeOnly("Calls to `.*` must be inside `rule` macro")
- def +(separator: Rule0)(implicit l: Lifter[Seq, HNil, HNil]): Rule[In, StrictOut]
Postfix shortcut for
oneOrMore(...).separatedBy(...).Postfix shortcut for
oneOrMore(...).separatedBy(...).- Definition Classes
- Rule
- Annotations
- @compileTimeOnly("Calls to `.+` must be inside `rule` macro")
- def +(implicit l: Lifter[Seq, HNil, HNil]): Rule[In, StrictOut] with Repeated
Postfix shortcut for
oneOrMore.Postfix shortcut for
oneOrMore.- Definition Classes
- Rule
- Annotations
- @compileTimeOnly("Calls to `.+` must be inside `rule` macro")
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ?(implicit l: Lifter[Option, HNil, HNil]): Rule[In, OptionalOut]
Postfix shortcut for
optional.Postfix shortcut for
optional.- Definition Classes
- Rule
- Annotations
- @compileTimeOnly("Calls to `.?` must be inside `rule` macro")
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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
- def named(name: String): Rule.this.type
Attaches the given explicit name to this rule.
Attaches the given explicit name to this rule.
- Definition Classes
- Rule
- Annotations
- @compileTimeOnly("Calls to `named` must be inside `rule` macro")
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unary_!: Rule0
Creates a "negative syntactic predicate", i.e.
Creates a "negative syntactic predicate", i.e. a rule that matches only if this rule mismatches and vice versa. The resulting rule doesn't cause the parser to make any progress (i.e. match any input) and also clears out all effects that the underlying rule might have had on the value stack.
- Definition Classes
- Rule
- Annotations
- @compileTimeOnly("Calls to `unary_!` must be inside `rule` macro")
- 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()
- def |[I2 <: HNil, O2 >: HNil <: HList](that: Rule[I2, O2]): Rule[I2, O2]
Combines this rule with the given other one in a way that the resulting rule matches if this rule matches or the other one matches.
Combines this rule with the given other one in a way that the resulting rule matches if this rule matches or the other one matches. If this rule doesn't match the parser is reset and the given alternative tried. This operators therefore implements the "ordered choice' PEG combinator.
- Definition Classes
- Rule
- Annotations
- @compileTimeOnly("Calls to `|` must be inside `rule` macro")
- def ~[I2 <: HList, O2 <: HList](that: Rule[I2, O2])(implicit i: TailSwitch[I2, HNil, HNil], o: TailSwitch[HNil, I2, O2]): Rule[Out, Out]
Concatenates this rule with the given other one.
Concatenates this rule with the given other one. The resulting rule type is computed on a type-level. Here is an illustration (using an abbreviated HList notation): Rule[, A] ~ Rule[, B] = Rule[, A:B] Rule[A:B:C, D:E:F] ~ Rule[F, G:H] = Rule[A:B:C, D:E:G:H] Rule[A, B:C] ~ Rule[D:B:C, E:F] = Rule[D:A, E:F]
- Definition Classes
- Rule
- Annotations
- @compileTimeOnly("Calls to `~` must be inside `rule` macro")
- def ~!~[I2 <: HList, O2 <: HList](that: Rule[I2, O2])(implicit i: TailSwitch[I2, HNil, HNil], o: TailSwitch[HNil, I2, O2]): Rule[Out, Out]
Same as
~but with "cut" semantics, meaning that the parser will never backtrack across this boundary.Same as
~but with "cut" semantics, meaning that the parser will never backtrack across this boundary. If the rule being concatenated doesn't match a parse error will be triggered immediately.- Definition Classes
- Rule
- Annotations
- @compileTimeOnly("Calls to `~!~` must be inside `rule` macro")