Skip to content

ribs_parse

Classes

ClassDescription
Accumulator<A, B>A one-or-more accumulator: builds a result B from one or more items of type A.
Accumulator0<A, B>A zero-or-more accumulator: builds a result B from zero or more items of type A.
AnyChar
Appender<A, B>A mutable builder that accumulates items of type A and produces a result of type B via finish.
Backtrack<A>
Backtrack0<A>
CharIn
CharsWhileScans forward while predicate holds on each successive code unit, then returns the matched substring in one call. This avoids the per-character virtual-dispatch + BitSet-lookup overhead of charIn(set).rep().string.
CharsWhile0Like CharsWhile but succeeds with an empty string when no characters match (zero-or-more).
Defer<A>
Defer0<A>
EndOfStringExpected the input to end here.
EndParser
ExpectationRepresents what was expected at a given offset when a parse failed.
ExpectationFailThe parser explicitly failed (via Parser0.fail).
ExpectationFailWithThe parser explicitly failed with a descriptive message.
ExpectedFailureAtA not/peek-style parser failed because matched was present at offset.
Fail<A>
FailWith<A>
FlatMap<A, B>
FlatMap0<A, B>
GetCaret
IgnoreCase
Index
InRangeExpected a character whose code unit falls in the range [lower, upper].
LengthThe input ended unexpectedly (needed more characters).
Map<A, B>
Map0<A, B>
Not
OneOf<A>
OneOf0<A>
OneOfStrExpected one of the literal strings strs at offset.
Parser<A>A parser that is guaranteed to consume at least one character of input on every successful match.
Parser0<A>A parser that may succeed without consuming any input.
ParsersStatic factory and combinator namespace for Parser0 and Parser.
Peek
Prod<A, B>
Prod0<A, B>
Pure<A>
Rep<A, B>
RepSep<A>A direct, loop-based implementation of repSep (one-or-more with separator).
Select<A, B, C>
Select0<A, B, C>
Soft<A>Soft0 specialization for Parser, where all combinators return Parser.
Soft0<A>A view of a Parser0 that uses soft (backtracking) product combinators.
SoftProd<A, B>
SoftProd0<A, B>
StartOfStringExpected the input to start here (i.e. expected offset 0).
StartParser
StateMutable parse state threaded through all parser combinators during a single Parser0.parse or Parser0.parseAll invocation.
Str
StringIn
StringP<A>
StringP0<A>
Void<A>
Void0<A>
WithContextA named context wrapping another expectation (from Parser0.withContext).
WithContextP<A>
WithContextP0<A>
WithStringP<A>
WithStringP0<A>

Exceptions

ExceptionDescription
ParseErrorA parse error, consisting of the offset at which the failure occurred and the list of expectations that were not met.

Extension Types

Extension TypeDescription
CharA single UTF-16 code unit, represented as a zero-cost extension type over int.
Soft01<A>A soft Parser0 view whose combinators require a Parser on the other side, producing a Parser result.
With1<A>A view of a Parser0 that exposes combinators returning Parser.

Functions

Function
filterFails
withString0<A>