CharParsers Module
Defines parsers for characters and strings. These parsers are more optimized for working with strings than the general parsers in `XParsec.Parsers`.
Nested modules
| Modules | Description |
Functions and values
| Function or value | Description |
Full Usage:
anyChar reader
Parameters:
Reader<char, 'State, 'Input>
Returns: ParseResult<char, char, 'State>
Modifiers: inline Type parameters: 'State, 'Input |
|
Full Usage:
anyOf chars
Parameters:
char seq
Returns: Reader<char, 'a, 'b> -> ParseResult<char, char, 'a>
|
|
Full Usage:
anyString xs
Parameters:
string seq
Returns: Reader<char, 'a, 'b> -> ParseResult<string, char, 'a>
|
|
Full Usage:
anyStringBy comp xs
Parameters:
StringComparison
xs : string seq
Returns: Reader<char, 'a, 'b> -> ParseResult<string, char, 'a>
|
|
Full Usage:
anyStringByL comp xs message
Parameters:
StringComparison
xs : string seq
message : string
Returns: Reader<char, 'a, 'b> -> ParseResult<string, char, 'a>
|
|
Full Usage:
anyStringByReturn comp xs
Parameters:
StringComparison
xs : (string * 'T) seq
Returns: Reader<char, 'a, 'b> -> ParseResult<'T, char, 'a>
|
|
Full Usage:
anyStringByReturnL comp xs message
Parameters:
StringComparison
xs : (string * 'T) seq
message : string
Returns: Reader<char, 'a, 'b> -> ParseResult<'T, char, 'a>
|
|
Full Usage:
anyStringCI xs
Parameters:
string seq
Returns: Reader<char, 'a, 'b> -> ParseResult<string, char, 'a>
|
|
Full Usage:
anyStringCIL xs message
Parameters:
string seq
message : string
Returns: Reader<char, 'a, 'b> -> ParseResult<string, char, 'a>
|
|
Full Usage:
anyStringCIReturn xs
Parameters:
(string * 'T) seq
Returns: Reader<char, 'a, 'b> -> ParseResult<'T, char, 'a>
|
|
Full Usage:
anyStringCIReturnL xs message
Parameters:
(string * 'T) seq
message : string
Returns: Reader<char, 'a, 'b> -> ParseResult<'T, char, 'a>
|
|
Full Usage:
anyStringL xs message
Parameters:
string seq
message : string
Returns: Reader<char, 'a, 'b> -> ParseResult<string, char, 'a>
|
|
Full Usage:
anyStringReturn xs
Parameters:
(string * 'T) seq
Returns: Reader<char, 'a, 'b> -> ParseResult<'T, char, 'a>
|
|
Full Usage:
anyStringReturnL xs message
Parameters:
(string * 'T) seq
message : string
Returns: Reader<char, 'a, 'b> -> ParseResult<'T, char, 'a>
|
|
Full Usage:
asciiLetter reader
Parameters:
Reader<char, 'State, 'Input>
Returns: ParseResult<char, char, 'State>
|
|
Full Usage:
charReturn c result reader
Parameters:
char
result : 'a
reader : Reader<char, 'State, 'Input>
Returns: ParseResult<'a, char, 'State>
Modifiers: inline Type parameters: 'a, 'State, 'Input |
|
Full Usage:
digit reader
Parameters:
Reader<char, 'State, 'Input>
Returns: ParseResult<char, char, 'State>
|
|
Full Usage:
isAsciiLetter c
Parameters:
char
Returns: bool
|
|
Full Usage:
isDigit c
Parameters:
char
Returns: bool
|
|
Full Usage:
isLetter c
Parameters:
char
Returns: bool
|
|
|
Matches one or more characters that satisfy the given parser `p1`, and returns the string of matched characters. This parser fails if no characters are matched. Raises `InfiniteLoopException` if `p1` succeeds without consuming input — matches the behaviour of `many1`, `sepBy1`, `many1Till`, and `chainl1`.
|
Full Usage:
many1Chars2 p1 p reader
Parameters:
Parser<char, char, 'State, 'Input>
p : Parser<char, char, 'State, 'Input>
reader : Reader<char, 'State, 'Input>
Returns: ParseResult<string, char, 'State>
|
|
|
Matches zero or more characters that satisfy the given parser `p1`, and returns the string of matched characters. This parser always succeeds, even if no characters are matched, returning an empty string. Raises `InfiniteLoopException` if `p1` succeeds without consuming input — matches the behaviour of `many`, `sepBy*`, `manyTill`, and `chainl1`.
|
Full Usage:
manyCharsTill p pEnd reader
Parameters:
Parser<'A, char, 'State, 'Input>
pEnd : Parser<'B, char, 'State, 'Input>
reader : Reader<char, 'State, 'Input>
Returns: ParseResult<(string * 'B), char, 'State>
|
|
Full Usage:
newline reader
Parameters:
Reader<char, 'State, 'Input>
Returns: ParseResult<char, char, 'State>
|
|
Full Usage:
newlineReturn result reader
Parameters:
'a
reader : Reader<char, 'State, 'Input>
Returns: ParseResult<'a, char, 'State>
|
|
Full Usage:
pbigint reader
Parameters:
Reader<char, 'State, 'Input>
Returns: ParseResult<BigInteger, char, 'State>
|
The parser fails - in place, if not at least one digit (including the 0 in the format specifiers 0x etc.) can be parsed, - if no digit comes after the format specifier.
|
Full Usage:
pchar c reader
Parameters:
char
reader : Reader<char, 'State, 'Input>
Returns: ParseResult<char, char, 'State>
Modifiers: inline Type parameters: 'State, 'Input |
|
Full Usage:
pfloat reader
Parameters:
Reader<char, 'State, 'Input>
Returns: ParseResult<float, char, 'State>
|
Decimal: Fails in place if no digit (including the 0 in 0x) is parsed. Fails after consuming input if a format prefix is followed by no digits.
|
Full Usage:
pint16 reader
Parameters:
Reader<char, 'a, 'b>
Returns: ParseResult<int16, char, 'a>
|
The parser fails - in place, if not at least one digit (including the 0 in the format specifiers 0x etc.) can be parsed, - if no digit comes after the format specifier, - if the value represented by the input string is greater than Int16.MaxValue or less than Int16.MinValue.
|
Full Usage:
pint32 reader
Parameters:
Reader<char, 'a, 'b>
Returns: ParseResult<int, char, 'a>
|
The parser fails - in place, if not at least one digit (including the 0 in the format specifiers 0x etc.) can be parsed, - if no digit comes after the format specifier, - if the value represented by the input string is greater than Int32.MaxValue or less than Int32.MinValue.
|
Full Usage:
pint64 reader
Parameters:
Reader<char, 'a, 'b>
Returns: ParseResult<int64, char, 'a>
|
The parser fails - in place, if not at least one digit (including the 0 in the format specifiers 0x etc.) can be parsed, - if no digit comes after the format specifier, - if the value represented by the input string is greater than Int64.MaxValue or less than Int64.MinValue.
|
Full Usage:
pint8 reader
Parameters:
Reader<char, 'a, 'b>
Returns: ParseResult<int8, char, 'a>
|
The parser fails - in place, if not at least one digit (including the 0 in the format specifiers 0x etc.) can be parsed, - if no digit comes after the format specifier, - if the value represented by the input string is greater than SByte.MaxValue or less than SByte.MinValue.
|
Full Usage:
pstring s reader
Parameters:
string
reader : Reader<char, 'State, 'Input>
Returns: ParseResult<string, char, 'State>
Modifiers: inline Type parameters: 'State, 'Input |
|
Full Usage:
puint16 reader
Parameters:
Reader<char, 'a, 'b>
Returns: ParseResult<uint16, char, 'a>
|
The parser fails - in place, if not at least one digit (including the 0 in the format specifiers 0x etc.) can be parsed, - if no digit comes after the format specifier, - if the value represented by the input string is greater than UInt16.MaxValue.
|
Full Usage:
puint32 reader
Parameters:
Reader<char, 'a, 'b>
Returns: ParseResult<uint32, char, 'a>
|
The parser fails - in place, if not at least one digit (including the 0 in the format specifiers 0x etc.) can be parsed, - if no digit comes after the format specifier, - if the value represented by the input string is greater than UInt32.MaxValue.
|
Full Usage:
puint64 reader
Parameters:
Reader<char, 'a, 'b>
Returns: ParseResult<uint64, char, 'a>
|
The parser fails - in place, if not at least one digit (including the 0 in the format specifiers 0x etc.) can be parsed, - if no digit comes after the format specifier, - if the value represented by the input string is greater than UInt64.MaxValue.
|
Full Usage:
puint8 reader
Parameters:
Reader<char, 'a, 'b>
Returns: ParseResult<uint8, char, 'a>
|
The parser fails - in place, if not at least one digit (including the 0 in the format specifiers 0x etc.) can be parsed, - if no digit comes after the format specifier, - if the value represented by the input string is greater than Byte.MaxValue.
|
Full Usage:
skipAnyChar reader
Parameters:
Reader<char, 'State, 'Input>
Returns: ParseResult<unit, char, 'State>
Modifiers: inline Type parameters: 'State, 'Input |
|
Full Usage:
skipChar c reader
Parameters:
char
reader : Reader<char, 'State, 'Input>
Returns: ParseResult<unit, char, 'State>
Modifiers: inline Type parameters: 'State, 'Input |
|
Full Usage:
skipNewline reader
Parameters:
Reader<char, 'State, 'Input>
Returns: ParseResult<unit, char, 'State>
|
|
Full Usage:
spaces reader
Parameters:
Reader<char, 'State, 'Input>
Returns: ParseResult<unit, char, 'State>
|
|
Full Usage:
spaces1 reader
Parameters:
Reader<char, 'State, 'Input>
Returns: Result<unit, ParseError<char, 'State>>
|
|
Full Usage:
stringCIReturn s result reader
Parameters:
string
result : 'a
reader : Reader<char, 'State, 'Input>
Returns: ParseResult<'a, char, 'State>
Modifiers: inline Type parameters: 'a, 'State, 'Input |
|
Full Usage:
stringReturn s result reader
Parameters:
string
result : 'a
reader : Reader<char, 'State, 'Input>
Returns: ParseResult<'a, char, 'State>
Modifiers: inline Type parameters: 'a, 'State, 'Input |