Suspendable

enum Suspendable[S, A]

A parser that can be suspended

A parser that can be suspended

  • S is the type of suspended values
  • A is the type of output
Companion
object
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case Backtrack[S, A]
case Map[S, A, B]
case OrElse[S, A]
case Product[S, A, B]
case Rep[S, A]
case Suspend[A]
case Advance[S, A]
case Unsuspendable[S, A]

Type members

Enum entries

case Advance[S, A](parser: Parser[A]) extends Suspendable[S, A]

Lift a Parser into a Supspendable parser that will continue to next parser when input ends

Lift a Parser into a Supspendable parser that will continue to next parser when input ends

case Backtrack[S, A](parser: Suspendable[S, A]) extends Suspendable[S, A]
case Map[S, A, B](source: Suspendable[S, A], f: A => B) extends Suspendable[S, B]
case OrElse[S, A](left: Suspendable[S, A], right: Suspendable[S, A]) extends Suspendable[S, A]
case Product[S, A, B](left: Suspendable[S, A], right: Suspendable[S, B]) extends Suspendable[S, (A, B)]
case Rep[S, A](source: Suspendable[S, A]) extends Suspendable[S, Type[A]]
case Suspend[A](parser: Parser[A], lift: String => A, semigroup: Semigroup[A]) extends Suspendable[A, A]

Lift a Parser into a Suspendable parser allowing for resumption

Lift a Parser into a Suspendable parser allowing for resumption

case Unsuspendable[S, A](parser: Parser[A]) extends Suspendable[S, A]

Lift a Parser into a Suspendable parser without allowing for resumption

Lift a Parser into a Suspendable parser without allowing for resumption