Header menu logo XParsec

Combinators Module

Types

Type Description

ParserCE

Functions and values

Function or value Description

(.>>) p1 p2 reader

Full Usage: (.>>) p1 p2 reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'A, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B

Applies the parsers `p1` and `p2` in sequence. If both succeed, returns the result of `p1`.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'A, 'T, 'State>

(.>>.) p1 p2 reader

Full Usage: (.>>.) p1 p2 reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<('A * 'B), 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B

Applies the parsers `p1` and `p2` in sequence. If both succeed, returns the result of `p1` and `p2`.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<('A * 'B), 'T, 'State>

() p1 message reader

Full Usage: () p1 message reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    message : string
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: Result<ParseSuccess<'A>, ParseError<'T, 'State>>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p1`, if it succeeds, returns the result of `p1`. If `p1` fails without consuming input, the parser fails with the given `message`. If `p1` fails and consumes input, the parser fails with the result of `p1`.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
message : string
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: Result<ParseSuccess<'A>, ParseError<'T, 'State>>

() p1 message reader

Full Usage: () p1 message reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    message : string
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: Result<ParseSuccess<'A>, ParseError<'T, 'State>>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p1`, if it succeeds, returns the result of `p1`. If `p1` fails without consuming input, the parser fails with the given `message`. If `p1` fails and consumes input, the parser fails with a nested error of the given `message` and the result of `p1`.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
message : string
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: Result<ParseSuccess<'A>, ParseError<'T, 'State>>

(<|>%) p1 x reader

Full Usage: (<|>%) p1 x reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    x : 'A
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: Result<ParseSuccess<'A>, ParseError<'T, 'State>>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p1` and, if it fails, returns the value `x`. If `p1` succeeds, the input is consumed. If `p1` fails, no input is consumed.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
x : 'A
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: Result<ParseSuccess<'A>, ParseError<'T, 'State>>

(<|>) p1 p2 reader

Full Usage: (<|>) p1 p2 reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: Result<ParseSuccess<'A>, ParseError<'T, 'State>>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p1` and, if it fails, applies the parser `p2`. Returns the result of the first parser that succeeds, or both errors if both fail.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: Result<ParseSuccess<'A>, ParseError<'T, 'State>>

(>>%) p x reader

Full Usage: (>>%) p x reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    x : 'a
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'a, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'a

Applies the parser `p` and, if it succeeds, returns the value `x`.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
x : 'a
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'a, 'T, 'State>

(>>.) p1 p2 reader

Full Usage: (>>.) p1 p2 reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'B, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B

Applies the parsers `p1` and `p2` in sequence. If both succeed, returns the result of `p2`.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'B, 'T, 'State>

p >>= binder

Full Usage: p >>= binder

Parameters:
    p : Parser<'a, 'b, 'c, 'd, 'e>
    binder : 'a -> Parser<'f, 'b, 'c, 'd, 'e>

Returns: Reader<'b, 'c, 'd, 'e> -> ParseResult<'f, 'b, 'c>
Modifiers: inline
Type parameters: 'a, 'b, 'c, 'd, 'e, 'f

Applies the parser `p` and, if it succeeds, computes the parser `p2` of `binder` with the result of `p`. Finally, it returns the result of `p2`.

p : Parser<'a, 'b, 'c, 'd, 'e>
binder : 'a -> Parser<'f, 'b, 'c, 'd, 'e>
Returns: Reader<'b, 'c, 'd, 'e> -> ParseResult<'f, 'b, 'c>

(|>>) p mapping reader

Full Usage: (|>>) p mapping reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    mapping : 'A -> 'B
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'B, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B

Applies the parser `p` and, if it succeeds, computes the function `mapping` with the result of `p`.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
mapping : 'A -> 'B
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'B, 'T, 'State>

between pOpen pClose p reader

Full Usage: between pOpen pClose p reader

Parameters:
    pOpen : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pClose : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    p : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'C, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B, 'C

Applies the parsers `pOpen`, `p` and `pClose` in sequence. If all succeed, returns the result of `p`.

pOpen : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pClose : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
p : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'C, 'T, 'State>

bind p binder reader

Full Usage: bind p binder reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    binder : 'A -> Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'B, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B

Applies the parser `p` and, if it succeeds, computes the parser `p2` of `binder` with the result of `p`. Finally, it returns the result of `p2`.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
binder : 'A -> Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'B, 'T, 'State>

chainl p pOp orElse reader

Full Usage: chainl p pOp orElse reader

Parameters:
    p : Parser<'a, 'b, 'c, 'd, 'e>
    pOp : Parser<('a -> 'a -> 'a), 'b, 'c, 'd, 'e>
    orElse : 'a
    reader : Reader<'b, 'c, 'd, 'e>

Returns: Result<ParseSuccess<'a>, ParseError<'b, 'c>>

Applies the parser `p` zero or more times, separated by `pOp`. If `pOp` succeeds, combines the results of `p` before and after in a left-associative manner. If `p` fails on the first attempt, this parser returns the result of `orElse`. This parser always succeeds.

p : Parser<'a, 'b, 'c, 'd, 'e>
pOp : Parser<('a -> 'a -> 'a), 'b, 'c, 'd, 'e>
orElse : 'a
reader : Reader<'b, 'c, 'd, 'e>
Returns: Result<ParseSuccess<'a>, ParseError<'b, 'c>>

chainl1 p pOp reader

Full Usage: chainl1 p pOp reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pOp : Parser<('A -> 'A -> 'A), 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'A, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p` one or more times, separated by `pOp`. If `pOp` succeeds, combines the results of `p` before and after in a left-associative manner. If `p` fails on the first attempt, this parser fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pOp : Parser<('A -> 'A -> 'A), 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'A, 'T, 'State>

chainr p pOp orElse reader

Full Usage: chainr p pOp orElse reader

Parameters:
    p : Parser<'a, 'b, 'c, 'd, 'e>
    pOp : Parser<('a -> 'a -> 'a), 'b, 'c, 'd, 'e>
    orElse : 'a
    reader : Reader<'b, 'c, 'd, 'e>

Returns: Result<ParseSuccess<'a>, ParseError<'b, 'c>>

Applies the parser `p` zero or more times, separated by `pOp`. If `pOp` succeeds, combines the results of `p` before and after in a right-associative manner. If `p` fails on the first attempt, this parser returns the result of `orElse`. This parser always succeeds.

p : Parser<'a, 'b, 'c, 'd, 'e>
pOp : Parser<('a -> 'a -> 'a), 'b, 'c, 'd, 'e>
orElse : 'a
reader : Reader<'b, 'c, 'd, 'e>
Returns: Result<ParseSuccess<'a>, ParseError<'b, 'c>>

chainr1 p pOp reader

Full Usage: chainr1 p pOp reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pOp : Parser<('A -> 'A -> 'A), 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'A, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p` one or more times, separated by `pOp`. If `pOp` succeeds, combines the results of `p` before and after in a right-associative manner. If `p` fails on the first attempt, this parser fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pOp : Parser<('A -> 'A -> 'A), 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'A, 'T, 'State>

choice ps

Full Usage: choice ps

Parameters:
    ps : Parser<'A, 'T, 'State, 'Input, 'InputSlice> seq

Returns: Parser<'A, 'T, 'State, 'Input, 'InputSlice>

Applies the parsers `ps` in order. Returns the result of the first parser that succeeds, or all errors if all fail.

Accumulating all errors may be costly, prefer `choiceL` if the errors are not needed.

ps : Parser<'A, 'T, 'State, 'Input, 'InputSlice> seq
Returns: Parser<'A, 'T, 'State, 'Input, 'InputSlice>

choiceL ps message

Full Usage: choiceL ps message

Parameters:
    ps : Parser<'A, 'T, 'State, 'Input, 'InputSlice> seq
    message : string

Returns: Parser<'A, 'T, 'State, 'Input, 'InputSlice>

Applies the parsers `ps` in order. Returns the result of the first parser that succeeds, or fails with the given message if all fail.

ps : Parser<'A, 'T, 'State, 'Input, 'InputSlice> seq
message : string
Returns: Parser<'A, 'T, 'State, 'Input, 'InputSlice>

countMany1Satisfies predicate reader

Full Usage: countMany1Satisfies predicate reader

Parameters:
    predicate : 'a -> bool
    reader : Reader<'a, 'b, 'c, 'd>

Returns: ParseResult<int64, 'a, 'b>

Applies a predicate to the input one or more times and returns the number of successful matches.

If the predicate fails on the first element, this parser fails. It is more efficient than `many1 (satisfy predicate)` when only the count is needed.

predicate : 'a -> bool
reader : Reader<'a, 'b, 'c, 'd>
Returns: ParseResult<int64, 'a, 'b>

countManySatisfies predicate reader

Full Usage: countManySatisfies predicate reader

Parameters:
    predicate : 'a -> bool
    reader : Reader<'a, 'b, 'c, 'd>

Returns: ParseResult<int64, 'a, 'b>

Applies a predicate to the input zero or more times and returns the number of successful matches.

This parser always succeeds. It is more efficient than `many (satisfy predicate)` when only the count is needed.

predicate : 'a -> bool
reader : Reader<'a, 'b, 'c, 'd>
Returns: ParseResult<int64, 'a, 'b>

followedBy p1 reader

Full Usage: followedBy p1 reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p1`, if it succeeds, ensures that the parser has not changed the input position. If `p1` fails, no input is consumed.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

followedByL p1 message reader

Full Usage: followedByL p1 message reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    message : string
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p1`, if it succeeds, ensures that the parser has not changed the input position. If `p1` fails, no input is consumed. If `p1` succeeds and consumes input, the parser fails with the given `message`.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
message : string
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

lookAhead p1 reader

Full Usage: lookAhead p1 reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: Result<ParseSuccess<'A>, ParseError<'T, 'State>>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p1`, if it succeeds, returns the result of `p1` without consuming input.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: Result<ParseSuccess<'A>, ParseError<'T, 'State>>

many p reader

Full Usage: many p reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<ImmutableArray<'A>, 'T, 'State>

Applies the parser `p` zero or more times. If it succeeds, returns the results as an ImmutableArray. This parser always succeeds.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<ImmutableArray<'A>, 'T, 'State>

many1 p reader

Full Usage: many1 p reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<ImmutableArray<'A>, 'T, 'State>

Applies the parser `p` one or more times. If it succeeds, returns the results as an ImmutableArray. If `p` fails on the first attempt, this parser fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<ImmutableArray<'A>, 'T, 'State>

many1Items2 p1 p reader

Full Usage: many1Items2 p1 p reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<ImmutableArray<'A>, 'T, 'State>

Applies the parser `p1` followed by `p` zero or more times. If it succeeds, returns the results as an ImmutableArray. If `p1` fails, this parser fails.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<ImmutableArray<'A>, 'T, 'State>

many1Till p pEnd reader

Full Usage: many1Till p pEnd reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pEnd : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<(ImmutableArray<'A> * 'B), 'T, 'State>

Applies the parser `p` one or more times, until `pEnd` succeeds. If it succeeds, returns the results as an ImmutableArray and the result of `pEnd`. If `p` fails on the first attempt, this parser fails. This parser also fails if `pEnd` fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pEnd : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<(ImmutableArray<'A> * 'B), 'T, 'State>

manyTill p pEnd reader

Full Usage: manyTill p pEnd reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pEnd : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<(ImmutableArray<'A> * 'B), 'T, 'State>

Applies the parser `p` zero or more times, until `pEnd` succeeds. If it succeeds, returns the results as an ImmutableArray and the result of `pEnd`. This parser fails if `pEnd` fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pEnd : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<(ImmutableArray<'A> * 'B), 'T, 'State>

notEmpty p1 reader

Full Usage: notEmpty p1 reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'A, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p1`, if it succeeds, ensures that the parser has changed the input position.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'A, 'T, 'State>

notFollowedBy p1 reader

Full Usage: notFollowedBy p1 reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p1`, if it succeeds, this parser fails without consuming input. If `p1` fails without consuming input, the parser succeeds. If `p1` fails and consumes input, this parser fails without consuming input.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

notFollowedByL p1 message reader

Full Usage: notFollowedByL p1 message reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    message : string
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p1`, if it succeeds, this parser fails without consuming input, with the given `message`. If `p1` fails without consuming input, the parser succeeds. If `p1` fails and consumes input, this parser fails without consuming input, with the given `message`.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
message : string
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

opt p1 reader

Full Usage: opt p1 reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'A voption, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Applies the parser `p1` and, if it fails, returns `ValueNone`. If `p1` succeeds, the input is consumed. If `p1` fails, no input is consumed.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'A voption, 'T, 'State>

optional p1 reader

Full Usage: optional p1 reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice

Attempts to apply the parser `p1`. Always succeeds, returning `()`. If `p1` succeeds, the input is consumed. If `p1` fails, no input is consumed.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

parray n p reader

Full Usage: parray n p reader

Parameters:
    n : int
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<ImmutableArray<'A>, 'T, 'State>

Applies the parser `p` `n` times, if it always succeeds, returns the result of `p` as an ImmutableArray of size `n`.

n : int
p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<ImmutableArray<'A>, 'T, 'State>

parser

Full Usage: parser

Returns: ParserCE

A computation expression builder for parsers.

Returns: ParserCE

pipe2 p1 p2 f reader

Full Usage: pipe2 p1 p2 f reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    f : 'A -> 'B -> 'C
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'C, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B, 'C

Applies the parsers `p1` and `p2` in sequence. If both succeed, returns the result of `f` applied to the results of `p1` and `p2`.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
f : 'A -> 'B -> 'C
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'C, 'T, 'State>

pipe3 p1 p2 p3 f reader

Full Usage: pipe3 p1 p2 p3 f reader

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
    f : 'A -> 'B -> 'C -> 'D
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<'D, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B, 'C, 'D

Applies the 3 parsers in sequence. If both succeed, returns the result of `f` applied to the results of the parsers.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
f : 'A -> 'B -> 'C -> 'D
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<'D, 'T, 'State>

pipe4 p1 p2 p3 p4 f

Full Usage: pipe4 p1 p2 p3 p4 f

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
    p4 : Parser<'D, 'T, 'State, 'Input, 'InputSlice>
    f : 'A -> 'B -> 'C -> 'D -> 'E

Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<'E, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B, 'C, 'D, 'E

Applies the 4 parsers in sequence. If all succeed, returns the result of `f` applied to the results of the parsers.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
p4 : Parser<'D, 'T, 'State, 'Input, 'InputSlice>
f : 'A -> 'B -> 'C -> 'D -> 'E
Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<'E, 'T, 'State>

pipe5 p1 p2 p3 p4 p5 f

Full Usage: pipe5 p1 p2 p3 p4 p5 f

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
    p4 : Parser<'D, 'T, 'State, 'Input, 'InputSlice>
    p5 : Parser<'E, 'T, 'State, 'Input, 'InputSlice>
    f : 'A -> 'B -> 'C -> 'D -> 'E -> 'F

Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<'F, 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B, 'C, 'D, 'E, 'F

Applies the 5 parsers in sequence. If all succeed, returns the result of `f` applied to the results of the parsers.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
p4 : Parser<'D, 'T, 'State, 'Input, 'InputSlice>
p5 : Parser<'E, 'T, 'State, 'Input, 'InputSlice>
f : 'A -> 'B -> 'C -> 'D -> 'E -> 'F
Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<'F, 'T, 'State>

sepBy p pSep reader

Full Usage: sepBy p pSep reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<(ImmutableArray<'A> * ImmutableArray<'B>), 'T, 'State>

Applies the parser `p` zero or more times, separated by `pSep`. If it succeeds, returns the results as an ImmutableArray. This parser always succeeds.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<(ImmutableArray<'A> * ImmutableArray<'B>), 'T, 'State>

sepBy1 p pSep reader

Full Usage: sepBy1 p pSep reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<(ImmutableArray<'A> * ImmutableArray<'B>), 'T, 'State>

Applies the parser `p` one or more times, separated by `pSep`. If it succeeds, returns the results as an ImmutableArray. If `p` fails on the first attempt, this parser fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<(ImmutableArray<'A> * ImmutableArray<'B>), 'T, 'State>

sepEndBy p pSep reader

Full Usage: sepEndBy p pSep reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<(ImmutableArray<'A> * ImmutableArray<'B>), 'T, 'State>

Applies the parser `p` zero or more times, separated and optionally ended by `pSep`. If it succeeds, returns the results as an ImmutableArray. This parser always succeeds.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<(ImmutableArray<'A> * ImmutableArray<'B>), 'T, 'State>

sepEndBy1 p pSep reader

Full Usage: sepEndBy1 p pSep reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<(ImmutableArray<'A> * ImmutableArray<'B>), 'T, 'State>

Applies the parser `p` one or more times, separated and optionally ended by `pSep`. If it succeeds, returns the results as an ImmutableArray. If `p` fails on the first attempt, this parser fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<(ImmutableArray<'A> * ImmutableArray<'B>), 'T, 'State>

skipArray n p reader

Full Usage: skipArray n p reader

Parameters:
    n : int
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>

Applies the parser `p` `n` times, if it always succeeds, returns unit.

n : int
p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

skipMany p reader

Full Usage: skipMany p reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>

Applies the parser `p` zero or more times. If it succeeds, returns unit. This parser always succeeds.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

skipMany1 p reader

Full Usage: skipMany1 p reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>

Applies the parser `p` one or more times. If it succeeds, returns unit. If `p` fails on the first attempt, this parser fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

skipMany1Satisfies predicate reader

Full Usage: skipMany1Satisfies predicate reader

Parameters:
    predicate : 'a -> bool
    reader : Reader<'a, 'b, 'c, 'd>

Returns: ParseResult<unit, 'a, 'b>

Skips one or more input elements that satisfy the given predicate.

If the predicate fails on the first element, this parser fails.

predicate : 'a -> bool
reader : Reader<'a, 'b, 'c, 'd>
Returns: ParseResult<unit, 'a, 'b>

skipMany1Till p pEnd reader

Full Usage: skipMany1Till p pEnd reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pEnd : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>

Applies the parser `p` one or more times, until `pEnd` succeeds. If it succeeds, returns unit. If `p` fails on the first attempt, this parser fails. This parser also fails if `pEnd` fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pEnd : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

skipManySatisfies predicate reader

Full Usage: skipManySatisfies predicate reader

Parameters:
    predicate : 'a -> bool
    reader : Reader<'a, 'b, 'c, 'd>

Returns: ParseResult<unit, 'a, 'b>

Skips zero or more input elements that satisfy the given predicate.

This parser always succeeds. It is a highly efficient way to skip input like whitespace or comments.

predicate : 'a -> bool
reader : Reader<'a, 'b, 'c, 'd>
Returns: ParseResult<unit, 'a, 'b>

skipManyTill p pEnd reader

Full Usage: skipManyTill p pEnd reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pEnd : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>

Applies the parser `p` zero or more times, until `pEnd` succeeds. If it succeeds, returns unit. This parser fails if `pEnd` fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pEnd : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

skipSepBy p pSep reader

Full Usage: skipSepBy p pSep reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>

Applies the parser `p` zero or more times, separated by `pSep`. If it succeeds, returns unit. This parser always succeeds.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

skipSepBy1 p pSep reader

Full Usage: skipSepBy1 p pSep reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>

Applies the parser `p` one or more times, separated by `pSep`. If it succeeds, returns unit. If `p` fails on the first attempt, this parser fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

skipSepEndBy p pSep reader

Full Usage: skipSepEndBy p pSep reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>

Applies the parser `p` zero or more times, separated and optionally ended by `pSep`. If it succeeds, returns unit. This parser always succeeds.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

skipSepEndBy1 p pSep reader

Full Usage: skipSepEndBy1 p pSep reader

Parameters:
    p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    reader : Reader<'T, 'State, 'Input, 'InputSlice>

Returns: ParseResult<unit, 'T, 'State>

Applies the parser `p` one or more times, separated and optionally ended by `pSep`. If it succeeds, returns unit. If `p` fails on the first attempt, this parser fails.

p : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
pSep : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
reader : Reader<'T, 'State, 'Input, 'InputSlice>
Returns: ParseResult<unit, 'T, 'State>

tuple2 p1 p2

Full Usage: tuple2 p1 p2

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>

Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<('A * 'B), 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B

Applies the parsers `p1` and `p2` in sequence. If both succeed, returns the results in a tuple.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<('A * 'B), 'T, 'State>

tuple3 p1 p2 p3

Full Usage: tuple3 p1 p2 p3

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>

Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<('A * 'B * 'C), 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B, 'C

Applies the parsers `p1`, `p2` and `p3` in sequence. If all succeed, returns the results in a tuple.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<('A * 'B * 'C), 'T, 'State>

tuple4 p1 p2 p3 p4

Full Usage: tuple4 p1 p2 p3 p4

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
    p4 : Parser<'D, 'T, 'State, 'Input, 'InputSlice>

Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<('A * 'B * 'C * 'D), 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B, 'C, 'D

Applies the parsers `p1`, `p2`, `p3` and `p4` in sequence. If all succeed, returns the results in a tuple.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
p4 : Parser<'D, 'T, 'State, 'Input, 'InputSlice>
Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<('A * 'B * 'C * 'D), 'T, 'State>

tuple5 p1 p2 p3 p4 p5

Full Usage: tuple5 p1 p2 p3 p4 p5

Parameters:
    p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
    p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
    p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
    p4 : Parser<'D, 'T, 'State, 'Input, 'InputSlice>
    p5 : Parser<'E, 'T, 'State, 'Input, 'InputSlice>

Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<('A * 'B * 'C * 'D * 'E), 'T, 'State>
Modifiers: inline
Type parameters: 'A, 'T, 'State, 'Input, 'InputSlice, 'B, 'C, 'D, 'E

Applies the parsers `p1`, `p2`, `p3`, `p4` and `p5` in sequence. If all succeed, returns the results in a tuple.

p1 : Parser<'A, 'T, 'State, 'Input, 'InputSlice>
p2 : Parser<'B, 'T, 'State, 'Input, 'InputSlice>
p3 : Parser<'C, 'T, 'State, 'Input, 'InputSlice>
p4 : Parser<'D, 'T, 'State, 'Input, 'InputSlice>
p5 : Parser<'E, 'T, 'State, 'Input, 'InputSlice>
Returns: Reader<'T, 'State, 'Input, 'InputSlice> -> ParseResult<('A * 'B * 'C * 'D * 'E), 'T, 'State>

Type something to start searching.