class
Opt[E, T] extends Parsec[E, T]
Instance Constructors
-
new
Opt(p: Parsec[E, T], otherwise: T)
Value Members
-
def
!(s: State[E]): T
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): scala.Int
-
def
*>[B](mb: Parsec[E, B]): Parsec[E, B]
-
def
<*[_](mb: Parsec[E, _]): Parsec[E, T]
-
def
<*>[B](f: (T) ⇒ B): Parsec[E, B]
-
def
<:>[B](f: (T) ⇒ B): Parsec[E, B]
-
def
<?>[U >: T](message: String): Parsec[E, U]
-
def
<|>[U >: T](parsec: Parsec[E, U]): Parsec[E, U]
-
final
def
==(arg0: Any): Boolean
-
def
>>[B](m: Parsec[E, B]): Parsec[E, B]
-
def
>>=[B](f: (T) ⇒ Parsec[E, B]): Parsec[E, B]
-
def
?(s: Seq[E]): Try[T]
-
def
?(s: State[E]): Try[T]
-
def
apply(s: State[E]): Try[T]
-
final
def
asInstanceOf[T0]: T0
-
def
ask(s: Seq[E]): Try[T]
-
def
ask(s: State[E]): Try[T]
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
flatMap[B](f: (T) ⇒ Parsec[E, B]): Parsec[E, B]
-
final
def
getClass(): Class[_]
-
def
hashCode(): scala.Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
liftA2[B, C](f: (T, B) ⇒ C): (Parsec[E, B]) ⇒ Parsec[E, C]
-
def
map[B](f: (T) ⇒ B): Parsec[E, B]
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
option(s: State[E]): Option[T]
-
val
otherwise: T
-
val
p: Parsec[E, T]
-
def
parse(s: State[E]): T
-
lazy val
psc: Attempt[E, T]
-
val
self: Parsec[E, T]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(arg0: Long, arg1: scala.Int): Unit
-
final
def
wait(arg0: Long): Unit
-
final
def
wait(): Unit
Deprecated Value Members
-
def
finalize(): Unit
Inherited from AnyRef
Inherited from Any
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.
1.0.0