Crate futures_await_synom [−] [src]
nom by removing the
IPResult::Incomplete variant which:
- we don't need,
- is an unintuitive footgun when working with non-streaming use cases, and
- more than doubles compilation time.
As (sy)nom is a parser combinator library, the parsers provided here and
that you implement yourself are all made up of successively more primitive
parsers, eventually culminating in a small number of fundamental parsers
that are implemented in Rust. Among these are
All synom fundamental parsers (those not combined out of other parsers) should be written to skip over leading whitespace in their input. This way, as long as every parser eventually boils down to some combination of fundamental parsers, we get correct whitespace handling at all levels for free.
For our use case, this strategy is a huge improvement in usability,
correctness, and compile time over nom's
This module defines a cheaply-copyable cursor into a TokenStream's data.
Discrete tokens that can be parsed out by synom.
Run a series of parsers, returning the result of the first one which succeeds.
Invoke the given parser function with the passed in arguments.
Conditionally execute the given parser.
Fail to parse if condition is false, otherwise parse the given parser.
Run a series of parsers, one after another, optionally assigning the results a name. Fail if any of the parsers fails.
Parse zero or more values using the given parser.
Transform the result of a parser by applying a function or closure.
Define a function from a parser combination.
Parses successfully if the given parser fails to parse. Does not consume any of the input.
Parse a value without consuming it from the input data.
Pattern-match the result of a parser to select which other parser to run.
Parse two things, returning the value of the first.
Run a series of parsers and produce all of the results in a tuple.
Produce the given value without parsing anything. Useful as an argument to
An error with a default error message.
The result of a parser