A provider that produces an error message for this failure based on its ParserContext
The parser's unconsumed input at the point where the failure occurred.
The result value from the parser invocation.
Returns the result value from the parser invocation if the parser succeeded or otherwise the specified fallback value.
Returns the result value from the parser invocation if the parser succeeded or otherwise the specified fallback value.
Indicates whether this results represents an unsuccessful parser invocation.
Indicates whether this results represents an unsuccessful
parser invocation. The get
method will throw on instances
where this method returns true
.
Indicates whether this results represents a successful parser invocation.
Builds a new Parsed
instance by applying the specified function
to the result of this instance.
The message specifying the cause of the failure.
A provider that produces an error message for this failure based on its ParserContext
The parser's unconsumed input at the point where the failure occurred.
Returns this Parsed
instance if the parser suceeded or
otherwise the specified fallback instance.
Returns this Parsed
instance if the parser suceeded or
otherwise the specified fallback instance.
The failure case of
Parsed
containing an error message and the remaining input.Implementation note: The message property is of type
Message
, to allow for lazy message creation. The former SDK parser combinators which this API is partially inspired by contained a lot of unnecessary string concatenations for messages which were then never read. This implementation avoids this extra cost and the result is measurable (about 15% performance gain for a typical Markdown document for example).A provider that produces an error message for this failure based on its ParserContext
The parser's unconsumed input at the point where the failure occurred.