Expand description
Text-specific parsers and utilities.
“Ford!“ he said, “there’s an infinite number of monkeys outside who want to talk to us about this script for Hamlet they’ve worked out.”
The parsers in this module are generic over both Unicode (char
) and ASCII (u8
) characters. Most parsers take
a type parameter, C
, that can be either u8
or char
in order to handle either case.
The TextParser
trait is an extension on top of the main Parser
trait that adds combinators unique to the
parsing of text.
Structs
- The type of a parser that accepts (and ignores) any number of whitespace characters before or after another pattern. A parser that accepts (and ignores) any number of whitespace characters before or after another pattern.
Traits
- A trait containing text-specific functionality that extends the
Parser
trait.
Functions
- A parser that accepts one or more ASCII digits.
- A parser that accepts a C-style identifier.
- A parser that accepts a non-negative integer.
- Like
ident
, but only accepts an exact identifier while ignoring trailing identifier characters. - A parser that accepts (and ignores) any newline characters or character sequences.
- A parser that consumes text and generates tokens using semantic whitespace rules and the given token parser.
- A parser that accepts (and ignores) any number of whitespace characters.
Type Definitions
- The type of a parser that accepts (and ignores) any number of whitespace characters.