Module pex::helpers

source ·
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

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