Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
The result of parsing some string.
- success
{α ι : Type}
(pos : ι)
(res : α)
: ParseResult α ι
Parsing succeeded, returning the new position
posand the parsed resultres. - error
{α ι : Type}
(pos : ι)
(err : Error)
: ParseResult α ι
Parsing failed, returning the position
poswhere the error occurred and the errorerr.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
A Parsec ι α represents a parser that consumes input of type ι and, produces a
ParseResult containing a value of type α (the result of parsing) and the remaining input.
Equations
- Std.Internal.Parsec ι α = (ι → Std.Internal.Parsec.ParseResult α ι)
Instances For
Interface for an input iterator with position tracking and lookahead support.
- pos : ι → idx
- next : ι → ι
- curr : ι → elem
- hasNext : ι → Bool
Instances
Equations
- Std.Internal.Parsec.instInhabited = { default := fun (it : ι) => Std.Internal.Parsec.ParseResult.error it (Std.Internal.Parsec.Error.other "") }
Equations
Instances For
Equations
- f.bind g it = match f it with | Std.Internal.Parsec.ParseResult.success rem a => g a rem | Std.Internal.Parsec.ParseResult.error pos msg => Std.Internal.Parsec.ParseResult.error pos msg
Instances For
Parser that always fails with the given error message.
Equations
Instances For
Try p, then decide what to do based on success or failure without consuming input on failure.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Try p, and if it fails without consuming input, run q () instead.
Instances For
Attempt to parse with p, but don't consume input on failure.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Succeeds only if input is at end-of-file.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Instances For
Instances For
Gets the next input element.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Checks if the next input element matches some condition.
Equations
- Std.Internal.Parsec.satisfy p = (do let c ← Std.Internal.Parsec.any if p c = true then pure c else Std.Internal.Parsec.fail "condition not satisfied").attempt
Instances For
Peeks at the next element, returns some if exists else none, does not consume input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Peeks at the next element, returns some elem if it satisfies p, else none. Does not consume input.
Equations
Instances For
Peeks at the next element, errors on EOF, does not consume input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Peeks at the next element or returns a default if at EOF, does not consume input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Consumes one element if available, otherwise errors on EOF.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Parses zero or more chars with p, accumulates into a string.
Parses zero or more chars with p into a string.
Equations
- p.manyChars = p.manyCharsCore ""
Instances For
Parses one or more chars with p into a string, errors if none.
Equations
- p.many1Chars = do let __do_lift ← p p.manyCharsCore __do_lift.toString