ActiveParser Module
Functions that convert between XParsec parsers and active parsers.
Functions and values
| Function or value | Description |
|
A parser that returns a cursor at the current position without consuming input.
With seek, it lets a
|
Full Usage:
ActiveParser.map mapping p cursor
Parameters:
'A -> 'B
p : ActiveParser<'A, 'T, 'State, 'Input>
cursor : Cursor<'T, 'State, 'Input>
Returns: ('B * Cursor<'T, 'State, 'Input>) voption
Modifiers: inline Type parameters: 'A, 'B, 'T, 'State, 'Input |
|
|
|
|
|
|
|
|
|
Full Usage:
ActiveParser.toParser p reader
Parameters:
ActiveParser<'A, 'T, 'State, 'Input>
reader : Reader<'T, 'State, 'Input>
Returns: ParseResult<'A, 'T, 'State>
Modifiers: inline Type parameters: 'A, 'T, 'State, 'Input |
Turns an active parser into an XParsec parser that fails with noMatch when p does not match. On failure the reader is left where it started. The usual source of p is a function that matches its cursor:
val token: obj
union case ValueOption.ValueSome: 'T -> ValueOption<'T>
union case ValueOption.ValueNone: ValueOption<'T>
|
Full Usage:
ActiveParser.toParserL message p
Parameters:
string
p : ActiveParser<'A, 'T, 'State, 'Input>
Returns: Parser<'A, 'T, 'State, 'Input>
Modifiers: inline Type parameters: 'A, 'T, 'State, 'Input |
|
|
This is the shape of a tokenizer written with active patterns:
val tokens: obj
Raises InfiniteLoopException{S} when a
|
XParsec.ActiveParsers