Expand description
combinator selection tutorial, choose your parser combinator
character
match_char_set
using the TrieSetSlice to match char set, it’s very fast.
You can also expand to or partten
, but can be very slow
string
You can also expand to or partten
, but it might be a little slow
many
There’s no combinator for a+
, a+
is recommended to expand to a a*
maybe
choice
See more in ChoiceHelper
peek
whitespace
comment
string literal
number
Structs
- Compact character set trie tree
- Parse the comment block
- Parse a comment line, note this does not catch the newline, catch all if reach EOF
- Parse color tuple from string
- Represents a three-segment string match, including the
head
,body
, andtail
, see more example in surround_pair, double_quote_string, single_quote_string - Used to parse matching surround pairs without escaping, often used to match raw strings, such as
r###"TEXT"###
in rust and"""TEXT"""
in toml. - Parse the given state as a single quote string,
\u1234
- A pattern that matches a number with a leading zero and a base mark, such as
0x0123456789ABCDEF
,0o01234567
,0b01010101
.
Functions
- Match ascii whitespace and newlines, fail if empty
- Function form of the char combinator.
- Match decimal string for later use
- Make the
from_str
function from the pex parser - Function form of the char combinator.
- Function form of the optional combinator.
- Parse the given state as a single quote string, such strings are allowed to contain escape symbols
\\
, if you want to disallow escape symbols, please use [surround_pair]. - Parse the given state as a single quote string, such strings are allowed to contain escape symbols
\\
, if you want to disallow escape symbols, please use [surround_pair]. - Parse the given state as a single quote string, such strings are allowed to contain escape symbols
\\
, if you want to disallow escape symbols, please use [surround_pair]. - Function form of the str combinator.
- Parse the given state as a single quote string, all characters are allowed in strings except
'
, but including\'
. \u{}, \u{0}, \u{1234}, \u{123456}
- Match whitespace and newlines, fail if empty