object ParserOp
- Alphabetic
- By Inheritance
- ParserOp
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class CheckEnd() extends ParserOp with Product with Serializable
Pushes a failure if the current position is not at the end
- case class InitialParser(op: ParserOp, initialStack: Stack[ParserOp], initialPositions: Array[Int], initialPositionIndex: Int, initialNames: List[String], initialBuilders: Chunk[Int]) extends Product with Serializable
- final case class Lazy(op: () => ParserOp) extends ParserOp with Product with Serializable
Deferred parser operation, used for recursion
- final case class MatchRegex(regex: Compiled, pushAs: RegexResultPush, failAs: Option[Any]) extends ParserOp with Product with Serializable
Match a compiled regex on the input, and push a result with the given strategy or failure on the result stack
- final case class MatchSeq(sequence: Chunk[Any], as: AnyRef, createParserFailure: (Int, Any) => Any) extends ParserOp with Product with Serializable
Match a sequence on the input, and push the given value or failure on the result stack
- sealed trait PairTransformation extends AnyRef
- case class PopResultPushOp(f: (Any) => ParserOp) extends ParserOp with Product with Serializable
Pop the last result and use the function to push it as parser operation (flatmap)
- final case class ProcessRepeatedElement(parseElement: ParserOp, min: Int, max: Option[Int]) extends ParserOp with Product with Serializable
Pushes the last result to the top chunk builder.
Pushes the last result to the top chunk builder. If the last result was successful, repush the element parser and itself. If the last result is a failure, finish building the result and check the min/max constraints.
- final case class PushCapturedResult() extends ParserOp with Product with Serializable
Pops the last stored branch position and the last result, and replaces it with the captured string as a result.
- final case class PushChunkBuilder(sizeHint: Int) extends ParserOp with Product with Serializable
Creates a chunk builder and pushes on the chunk builder stack
- final case class PushCurrentPosition() extends ParserOp with Product with Serializable
Pushes the current input position as a result
- final case class PushName(name: String) extends ParserOp with Product with Serializable
Store a name in the name stack
- final case class PushOp2(a: ParserOp, b: ParserOp, pushBranchPosition: Boolean) extends ParserOp with Product with Serializable
Push a and then b to the operation stack
- final case class PushOp3(a: ParserOp, b: ParserOp, c: ParserOp) extends ParserOp with Product with Serializable
Push a, b and then c to the operation stack
- final case class PushOp4(a: ParserOp, b: ParserOp, c: ParserOp, d: ParserOp, pushBranchPosition: Boolean) extends ParserOp with Product with Serializable
Push a, b, c and then d to the operation stack
- final case class PushResult(success: AnyRef, failure: ParserError[Any], popFirst: Boolean) extends ParserOp with Product with Serializable
Store a result.
Store a result. One of success or failure must be null. If popFirst is true, the last result will be replaced but only if it was a success.
- sealed trait RegexResultPush extends AnyRef
- final case class SkipOnSuccess2(checkBranchPosition: Boolean, transform: (Any) => Any) extends ParserOp with Product with Serializable
If the result is success, skip the next two parser operations.
If the result is success, skip the next two parser operations. Optionally if the transform is not null, it replaces the result with the transform function applied to it. This can be used to shortcut the right side of an or operation. If checkBranchPosition is true, the last branch position will be popped and checked and if the position was moved the left failure is kept and the next operations get skipped.
- final case class TransformLast2Results(strategy: PairTransformation) extends ParserOp with Product with Serializable
Pop the last two results from the stack and if both were success, create a single value based on the given strategy and push it back.
Pop the last two results from the stack and if both were success, create a single value based on the given strategy and push it back. If any of them failed, push back a single failure.
- final case class TransformResult(onSuccess: (Any) => Any, onFailure: (ParserError[Any]) => ParserError[Any]) extends ParserOp with Product with Serializable
Pop the last result from the stack, transform it and with one of the functions and push back.
Pop the last result from the stack, transform it and with one of the functions and push back. It is possible to pass null to onSuccess or onFailure in which case it does not touch the result.
- final case class TransformResultEither(f: (Any) => Either[Any, Any]) extends ParserOp with Product with Serializable
Pop the last result from the stack, transform it to either a success or a failure and push back
- final case class TransformResultFlipped(onSuccess: (Int, Any) => ParserError[Any], onFailure: (Int, ParserError[Any]) => Any) extends ParserOp with Product with Serializable
Pop the last result from the stack, transform it and with one of the functions and push back.
Pop the last result from the stack, transform it and with one of the functions and push back. It converts success to failure and failure to success.
- final case class TransformResultToOption(checkBranchPosition: Boolean) extends ParserOp with Product with Serializable
Pop the last result from the stack and if it was success, respush wrapped in Some, if it was failure, repush as a successful None.
Pop the last result from the stack and if it was success, respush wrapped in Some, if it was failure, repush as a successful None. When checkBranchPosition is true, if position was moved compared to the last branch position then keep the failure.
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 clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compile(syntax: ErasedParser): InitialParser
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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()
- case object BacktrackOnFailure extends ParserOp with Product with Serializable
Pop the last branch position, and in case of failure, reset the position to it.
- case object Cut extends ParserOp with Product with Serializable
Cut stored bookmarks if result is a success
- object PairTransformation
- case object PopName extends ParserOp with Product with Serializable
Pop the last pushed name from the name stack
- case object ReadInputToResult extends ParserOp with Product with Serializable
Read an item from the input and push it to the result stack
- object RegexResultPush
- case object SkipOnFailure2 extends ParserOp with Product with Serializable
If the result is failure, skip the next two parser operations.
If the result is failure, skip the next two parser operations. This can be used to shortcut the right side of a zip operation.