Parser composition
Parser.FlatMapinterface
Selects the next Parser from a successful value and continues at the remaining input.
Parser.FlatMapTointerface
Binds a Parser and dependent mapping lambda for reuse.
Parser.Mapinterface
Transforms a successful parser value without changing its remaining input.
Parser.MapTointerface
Binds a Parser and mapping lambda for reuse as a type lambda.
Parser.Optionalinterface
Returns
undefinedand the original input when its parser fails.Parser.OptionalOfinterface
Binds a Parser for optional evaluation.
Parser.OrElseinterface
Runs the fallback parser from the original input when the first parser fails.
Parser.OrElseWithinterface
Binds a fallback Parser for later composition.
Parser.Zipinterface
Runs two parsers sequentially and returns both values.
Parser.ZipWithinterface
Binds a second Parser for later sequential composition.
Parser contracts
Parsetype-alias
Applies a type-level Parser to a string literal input.
Parserinterface
A type lambda from a string literal to a parse result.
Parser.Anytype-alias
A Parser whose output is intentionally widened to unknown.
Parser.Runtype-alias
Runs a Parser against a string literal input.
Resulttype-alias
A parsed value paired with the unconsumed string suffix.
Parser primitives
Parser.AlphaNumerictype-alias
The ASCII alphabet-or-digit character union.
Parser.Alphabettype-alias
The ASCII uppercase and lowercase character union.
Parser.Charinterface
Consumes one exact leading character.
Parser.Digittype-alias
The decimal digit character union.
Parser.Failinterface
A parser that always produces
never.Parser.LowercaseAlphabettype-alias
The lowercase ASCII character union.
Parser.Stringinterface
Consumes one exact leading string literal.
Parser.Succeedinterface
Succeeds with a constant value without consuming input.
Parser.UppercaseAlphabettype-alias
The uppercase ASCII character union.
Parser repetition
Parser.Manyinterface
Repeats a parser until failure and returns every value.
Parser.Many1interface
Repeats a parser at least once.
Parser.Many1Internaltype-alias
Runs one required repetition before delegating to zero-or-more parsing.
Parser.Many1Ofinterface
Binds the repeated Parser for one-or-more evaluation.
Parser.ManyInternaltype-alias
Recursively repeats a Parser while it succeeds and consumes input.
Parser.ManyOfinterface
Binds the repeated Parser for zero-or-more evaluation.
Parser.TakeWhileinterface
Consumes zero or more characters from an allowed union.
Parser.TakeWhile1interface
Consumes one or more allowed characters and fails on an empty prefix.
Parser.TakeWhile1Internaltype-alias
Requires the type-level allowed-character prefix to be non-empty.
Parser.TakeWhileInternaltype-alias
Recursively consumes an allowed character prefix at the type level.