mads
Type members
Classlikes
A parser that produces a value of type A.
A parser that produces a value of type A.
The context is used to represent the possibility of resuming the parser with additional input and, optionally, already parsed input. There are two context types provided:
Completewhich is the result type for parsers that cannot be resumed.Resumable, which is the result type for parsers that can be resumed.
There are three cases within Complete:
Epsilon, for a parser that failed but did not consume any input;Committed, for a parser that failed after consuming some input; andSuccess, for a parser that successfully parsed a portion of it's input and produced a value of typeA.
Resumable adds an additional cause for a parser that can be resumed.
Parsers can be resumed if they accept their complete input but do not parse
it. In other words, a parser that Committed to its entire input.
Additionally, the programmer must indicate that a parser can be resumed
using the resumable method.
Resumption is quite limited. The original input is not reparsed on resumption. Parsing starts again on the new input and hence a parser cannot carry state across resumption boundaries.
- Companion
- object
Parsers constructed through these methods consume zero or more characters
Parsers constructed through these methods consume zero or more characters
A result type for a parser that may be able to be resumed with additional input
A result type for a parser that may be able to be resumed with additional input
- A is the type of output
- S is the type of suspended output
- Companion
- object
A parser that can be suspended
A parser that can be suspended
- S is the type of suspended values
- A is the type of output
- Companion
- object