case class Failure(msg: String, next: Input) extends NoSuccess with Product with Serializable
The failure case of ParseResult
: contains an error-message and the remaining input.
Parsing will back-track when a failure occurs.
- msg
An error message string describing the failure.
- next
The parser's unconsumed input at the point where the failure occurred.
- Source
- Parsers.scala
- Alphabetic
- By Inheritance
- Failure
- Serializable
- Serializable
- Product
- Equals
- NoSuccess
- ParseResult
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
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
-
def
append[U](a: ⇒ ParseResult[U]): ParseResult[U]
- Definition Classes
- Failure → ParseResult
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
filterWithError(p: (Nothing) ⇒ Boolean, error: (Nothing) ⇒ String, position: Input): ParseResult[Nothing]
- Definition Classes
- NoSuccess → ParseResult
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMapWithNext[U](f: (Nothing) ⇒ (Input) ⇒ ParseResult[U]): ParseResult[U]
- Definition Classes
- NoSuccess → ParseResult
-
def
get: Nothing
Returns the embedded result.
Returns the embedded result.
- Definition Classes
- NoSuccess → ParseResult
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getOrElse[B >: Nothing](default: ⇒ B): B
- Definition Classes
- ParseResult
-
def
isEmpty: Boolean
- Definition Classes
- ParseResult
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[U](f: (Nothing) ⇒ U): NoSuccess
Functional composition of ParseResults.
Functional composition of ParseResults.
- f
the function to be lifted over this result
- returns
f
applied to the result of thisParseResult
, packaged up as a newParseResult
- Definition Classes
- NoSuccess → ParseResult
-
def
mapPartial[U](f: PartialFunction[Nothing, U], error: (Nothing) ⇒ String): ParseResult[U]
Partial functional composition of ParseResults.
Partial functional composition of ParseResults.
- f
the partial function to be lifted over this result
- error
a function that takes the same argument as
f
and produces an error message to explain whyf
wasn't applicable (it is called when this is the case)- returns
if
f
f is defined at the result in thisParseResult
,f
applied to the result of thisParseResult
, packaged up as a newParseResult
. Iff
is not defined,Failure
.
- Definition Classes
- NoSuccess → ParseResult
- val msg: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
val
next: Input
- Definition Classes
- Failure → NoSuccess → ParseResult
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
successful: Boolean
- Definition Classes
- NoSuccess → ParseResult
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
The toString method of a Failure yields an error message.
The toString method of a Failure yields an error message.
- Definition Classes
- Failure → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )