class Opt[E, T] extends Parsec[E, T]

Opt x p tries to apply parser p. If p fails without consuming input, it returns the value x, otherwise the value returned by p.

Version

1.0.0

Linear Supertypes
Parsec[E, T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Opt
  2. Parsec
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Opt(p: Parsec[E, T], otherwise: T)

Value Members

  1. def !(s: State[E]): T
    Definition Classes
    Parsec
  2. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  3. final def ##: scala.Int
    Definition Classes
    AnyRef → Any
  4. def <?>(message: String): Parsec[E, T]
    Definition Classes
    Parsec
  5. def <|>(parsec: Parsec[E, T]): Parsec[E, T]
    Definition Classes
    Parsec
  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. def ?(s: Seq[E]): Try[T]
    Definition Classes
    Parsec
  8. def ?(s: State[E]): Try[T]
    Definition Classes
    Parsec
  9. def apply(s: State[E]): T
    Definition Classes
    Parsec
    Annotations
    @throws(scala.this.throws.<init>$default$1[java.io.EOFException]) @throws(scala.this.throws.<init>$default$1[jaskell.parsec.ParsecException])
  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. def ask(s: State[E]): Try[T]
    Definition Classes
    OptParsec
  12. def ask(s: Seq[E]): Try[T]
    Definition Classes
    Parsec
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def hashCode(): scala.Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def opt(s: State[E]): Option[T]
    Definition Classes
    Parsec
  23. val otherwise: T
  24. val p: Parsec[E, T]
  25. def parse(s: State[E]): T
    Definition Classes
    Parsec
  26. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(arg0: Long, arg1: scala.Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Parsec[E, T]

Inherited from AnyRef

Inherited from Any

Ungrouped