Header menu logo XParsec.ActiveParsers

XParsec.ActiveParsers Namespace

Type/Module Description

ActiveParser

Functions that convert between XParsec parsers and active parsers.

ActiveParser<'Parsed, 'T, 'State, 'Input>

A parser that can be used as a partial active pattern: it returns the parsed value and the cursor after it, or ValueNone when it does not match.

BytePatterns

Active patterns over a Cursor{T,S,I} of bytes: the parsers of XParsec.ByteParsers as patterns. Each binds the number and the cursor after its bytes:

 match cursor with
 | PUInt16BE(tag, PInt32LE(length, next)) -> ...
val tag: obj
val length: obj
val next: obj

CharPatterns

Active patterns over a Cursor{T,S,I} of characters: the parsers of XParsec.CharParsers as patterns, and Until and Delimited.

CombinatorPatterns

The combinators of XParsec.Combinators as active patterns. Each takes XParsec parsers, as its combinator does, runs the combinator, and binds its value and the cursor after it.

Cursor<'T, 'State, 'Input>

An immutable view of a Reader{T,S,I} at a fixed Position{S}.

Patterns

Active patterns over a Cursor{T,S,I} for any item type: the parsers of XParsec.Parsers as patterns, and patterns to run other parsers.

Unfold<'A>

What a step of unfold asks for: go on or stop, with or without a value.

Type something to start searching.