pub trait Parser<'src, I: Input<'src>, O, E: ParserExtra<'src, I> = Default> {
Show 49 methods
// Provided methods
fn parse(&self, input: I) -> ParseResult<O, E::Error>
where I: Input<'src>,
E::State: Default,
E::Context: Default { ... }
fn parse_with_state(
&self,
input: I,
state: &mut E::State,
) -> ParseResult<O, E::Error>
where I: Input<'src>,
E::Context: Default { ... }
fn check(&self, input: I) -> ParseResult<(), E::Error>
where Self: Sized,
I: Input<'src>,
E::State: Default,
E::Context: Default { ... }
fn check_with_state(
&self,
input: I,
state: &mut E::State,
) -> ParseResult<(), E::Error>
where Self: Sized,
I: Input<'src>,
E::Context: Default { ... }
fn to_slice(self) -> ToSlice<Self, O>
where Self: Sized { ... }
fn filter<F: Fn(&O) -> bool>(self, f: F) -> Filter<Self, F>
where Self: Sized { ... }
fn map<U, F: Fn(O) -> U>(self, f: F) -> Map<Self, O, F>
where Self: Sized { ... }
fn map_with<U, F: Fn(O, &mut MapExtra<'src, '_, I, E>) -> U>(
self,
f: F,
) -> MapWith<Self, O, F>
where Self: Sized { ... }
fn map_group<F: Fn<O>>(self, f: F) -> MapGroup<Self, O, F>
where Self: Sized,
O: Tuple { ... }
fn to_span(self) -> ToSpan<Self, O>
where Self: Sized { ... }
fn try_foldl<B, F, OB>(self, other: B, f: F) -> TryFoldl<F, Self, B, OB, E>
where F: Fn(O, OB, &mut MapExtra<'src, '_, I, E>) -> Result<O, E::Error>,
B: IterParser<'src, I, OB, E>,
Self: Sized { ... }
fn try_map<U, F: Fn(O, I::Span) -> Result<U, E::Error>>(
self,
f: F,
) -> TryMap<Self, O, F>
where Self: Sized { ... }
fn try_map_with<U, F: Fn(O, &mut MapExtra<'src, '_, I, E>) -> Result<U, E::Error>>(
self,
f: F,
) -> TryMapWith<Self, O, F>
where Self: Sized { ... }
fn ignored(self) -> Ignored<Self, O>
where Self: Sized { ... }
fn memoized(self) -> Memoized<Self>
where Self: Sized { ... }
fn to<U: Clone>(self, to: U) -> To<Self, O, U>
where Self: Sized { ... }
fn labelled<L>(self, label: L) -> Labelled<Self, L>
where Self: Sized,
E::Error: LabelError<'src, I, L> { ... }
fn then<U, B: Parser<'src, I, U, E>>(
self,
other: B,
) -> Then<Self, B, O, U, E>
where Self: Sized { ... }
fn ignore_then<U, B: Parser<'src, I, U, E>>(
self,
other: B,
) -> IgnoreThen<Self, B, O, E>
where Self: Sized { ... }
fn then_ignore<U, B: Parser<'src, I, U, E>>(
self,
other: B,
) -> ThenIgnore<Self, B, U, E>
where Self: Sized { ... }
fn nested_in<B: Parser<'src, J, I, F>, J, F>(
self,
other: B,
) -> NestedIn<Self, B, J, F, O, E>
where Self: Sized,
I: 'src,
J: Input<'src>,
F: ParserExtra<'src, J> { ... }
fn ignore_with_ctx<U, P>(
self,
then: P,
) -> IgnoreWithCtx<Self, P, O, I, Full<E::Error, E::State, O>>
where Self: Sized,
O: 'src,
P: Parser<'src, I, U, Full<E::Error, E::State, O>> { ... }
fn then_with_ctx<U, P>(
self,
then: P,
) -> ThenWithCtx<Self, P, O, I, Full<E::Error, E::State, O>>
where Self: Sized,
O: 'src,
P: Parser<'src, I, U, Full<E::Error, E::State, O>> { ... }
fn with_ctx(self, ctx: E::Context) -> WithCtx<Self, E::Context>
where Self: Sized,
E::Context: Clone { ... }
fn with_state<State>(self, state: State) -> WithState<Self, State>
where Self: Sized,
State: 'src + Clone { ... }
fn and_is<U, B>(self, other: B) -> AndIs<Self, B, U>
where Self: Sized,
B: Parser<'src, I, U, E> { ... }
fn delimited_by<U, V, B, C>(
self,
start: B,
end: C,
) -> DelimitedBy<Self, B, C, U, V>
where Self: Sized,
B: Parser<'src, I, U, E>,
C: Parser<'src, I, V, E> { ... }
fn padded_by<U, B>(self, padding: B) -> PaddedBy<Self, B, U>
where Self: Sized,
B: Parser<'src, I, U, E> { ... }
fn or<B>(self, other: B) -> Or<Self, B>
where Self: Sized,
B: Parser<'src, I, O, E> { ... }
fn or_not(self) -> OrNot<Self>
where Self: Sized { ... }
fn not(self) -> Not<Self, O>
where Self: Sized { ... }
fn repeated(self) -> Repeated<Self, O, I, E>
where Self: Sized { ... }
fn separated_by<U, B>(
self,
separator: B,
) -> SeparatedBy<Self, B, O, U, I, E>
where Self: Sized,
B: Parser<'src, I, U, E> { ... }
fn foldl<B, F, OB>(self, other: B, f: F) -> Foldl<F, Self, B, OB, E>
where F: Fn(O, OB) -> O,
B: IterParser<'src, I, OB, E>,
Self: Sized { ... }
fn foldl_with<B, F, OB>(
self,
other: B,
f: F,
) -> FoldlWith<F, Self, B, OB, E>
where F: Fn(O, OB, &mut MapExtra<'src, '_, I, E>) -> O,
B: IterParser<'src, I, OB, E>,
Self: Sized { ... }
fn rewind(self) -> Rewind<Self>
where Self: Sized { ... }
fn lazy(self) -> Lazy<'src, Self, I, E>
where Self: Sized,
I: ValueInput<'src> { ... }
fn padded(self) -> Padded<Self>
where Self: Sized,
I: Input<'src>,
I::Token: Char { ... }
fn recover_with<S: Strategy<'src, I, O, E>>(
self,
strategy: S,
) -> RecoverWith<Self, S>
where Self: Sized { ... }
fn map_err<F>(self, f: F) -> MapErr<Self, F>
where Self: Sized,
F: Fn(E::Error) -> E::Error { ... }
fn map_err_with_state<F>(self, f: F) -> MapErrWithState<Self, F>
where Self: Sized,
F: Fn(E::Error, I::Span, &mut E::State) -> E::Error { ... }
fn validate<U, F>(self, f: F) -> Validate<Self, O, F>
where Self: Sized,
F: Fn(O, &mut MapExtra<'src, '_, I, E>, &mut Emitter<E::Error>) -> U { ... }
fn from_str<U>(self) -> Map<Self, O, fn(O) -> Result<U, U::Err>>
where Self: Sized,
U: FromStr,
O: AsRef<str> { ... }
fn unwrapped(self) -> Unwrapped<Self, O>
where Self: Sized { ... }
fn into_iter(self) -> IntoIter<Self, O>
where Self: Sized,
O: IntoIterator { ... }
fn boxed<'b>(self) -> Boxed<'src, 'b, I, O, E>
where Self: Sized + 'b { ... }
fn simplify(self) -> impl Parser<'src, I, O, E>
where Self: Sized + 'src { ... }
fn contextual(self) -> Contextual<Self>
where Self: Sized { ... }
fn pratt<Ops>(self, ops: Ops) -> Pratt<Self, Ops>
where Self: Sized { ... }
}Expand description
A trait implemented by parsers.
Parsers take inputs of type I, which will implement Input. Refer to the documentation on Input for examples
of common input types. It will then attempt to parse them into a value of type O, which may be just about any type.
In doing so, they may encounter errors. These need not be fatal to the parsing process: syntactic errors can be
recovered from and a valid output may still be generated alongside any syntax errors that were encountered along the
way. Usually, this output comes in the form of an
Abstract Syntax Tree (AST).
The final type parameter, E, is expected to be one of the type in the extra module,
implementing ParserExtra. This trait is used to encapsulate the various types a parser
uses that are not simply its input and output. Refer to the documentation on the ParserExtra trait
for more detail on the contained types. If not provided, it will default to extra::Default,
which will have the least overhead, but also the least meaningful errors.
The lifetime of the parser is used for zero-copy output - the input is bound by the lifetime, and returned values or parser state may take advantage of this to borrow tokens or slices of the input and hold on to them, if the input supports this.
§Stability
This trait is not intended to be implemented by downstream users of chumsky. While you can technically implement
it, doing so is considered to be outside the stability guarantees of the crate. Your code may break with a future,
semver-compatible release! Instead of implementing this trait, you should consider other options:
-
Try using combinators like
Parser::try_mapandParser::validateto implement custom error generation -
Use
customto implement your own parsing logic inline within an existing parser -
Use chumsky’s
extensionAPI to write an extension parser that feels like it’s native to chumsky -
If you believe you’ve found a common use-case that’s missing from chumsky, you could open a pull request to implement it in chumsky itself rather than implementing
Parseryourself.
Provided Methods§
Sourcefn parse(&self, input: I) -> ParseResult<O, E::Error>
fn parse(&self, input: I) -> ParseResult<O, E::Error>
Parse a stream of tokens, yielding an output if possible, and any errors encountered along the way.
If None is returned (i.e: parsing failed) then there will always be at least one item in the error Vec.
If you want to include non-default state, use Parser::parse_with_state instead.
Although the signature of this function looks complicated, it’s simpler than you think! You can pass a
[&[T]], a &str, Stream, or anything implementing Input to it.
Sourcefn parse_with_state(
&self,
input: I,
state: &mut E::State,
) -> ParseResult<O, E::Error>
fn parse_with_state( &self, input: I, state: &mut E::State, ) -> ParseResult<O, E::Error>
Parse a stream of tokens, yielding an output if possible, and any errors encountered along the way.
The provided state will be passed on to parsers that expect it, such as map_with.
If None is returned (i.e: parsing failed) then there will always be at least one item in the error Vec.
If you want to just use a default state value, use Parser::parse instead.
Although the signature of this function looks complicated, it’s simpler than you think! You can pass a
[&[T]], a &str, Stream, or anything implementing Input to it.
Sourcefn check(&self, input: I) -> ParseResult<(), E::Error>
fn check(&self, input: I) -> ParseResult<(), E::Error>
Parse a stream of tokens, ignoring any output, and returning any errors encountered along the way.
If parsing failed, then there will always be at least one item in the returned Vec.
If you want to include non-default state, use Parser::check_with_state instead.
Although the signature of this function looks complicated, it’s simpler than you think! You can pass a
[&[T]], a &str, Stream, or anything implementing Input to it.
Sourcefn check_with_state(
&self,
input: I,
state: &mut E::State,
) -> ParseResult<(), E::Error>
fn check_with_state( &self, input: I, state: &mut E::State, ) -> ParseResult<(), E::Error>
Parse a stream of tokens, ignoring any output, and returning any errors encountered along the way.
If parsing failed, then there will always be at least one item in the returned Vec.
If you want to just use a default state value, use Parser::check instead.
Although the signature of this function looks complicated, it’s simpler than you think! You can pass a
[&[T]], a &str, Stream, or anything implementing Input to it.
Sourcefn to_slice(self) -> ToSlice<Self, O>where
Self: Sized,
fn to_slice(self) -> ToSlice<Self, O>where
Self: Sized,
Convert the output of this parser into a slice of the input, based on the current parser’s span.
Note: unlike the parser .repeated().collect(), this method includes all tokens that are
“ignored” by the parser, including any padding, separators, and sub-parsers with
Parser::ignored, Parser::ignore_then, and Parser::then_ignore.
§Examples
Example with input of type &str (token type is char).
// Matches a number with underscores that is surrounded by apostrophes.
let quoted_numeric = any::<&str, extra::Err<Simple<char>>>()
.filter(|c: &char| c.is_digit(10))
.separated_by(just("_").repeated().at_most(1))
.to_slice()
.padded_by(just("'"));
assert_eq!(quoted_numeric.parse("'1_23'").into_result(), Ok("1_23"));Example with input of type &[u32] (token type is u32).
// Matches even numbers, then ignoring the rest of the input when an odd number is reached.
let even_matcher = any::<&[u32], extra::Err<Simple<u32>>>()
.filter(|c: &u32| c % 2 == 0)
.repeated()
.to_slice()
.lazy();
assert_eq!(even_matcher.parse(&[2, 4, 8, 5, 6]).unwrap(), &[2, 4, 8]);Sourcefn filter<F: Fn(&O) -> bool>(self, f: F) -> Filter<Self, F>where
Self: Sized,
fn filter<F: Fn(&O) -> bool>(self, f: F) -> Filter<Self, F>where
Self: Sized,
Filter the output of this parser, accepting only inputs that match the given predicate.
The output type of this parser is I, the input that was found.
§Examples
let lowercase = any::<_, extra::Err<Simple<char>>>()
.filter(char::is_ascii_lowercase)
.repeated()
.at_least(1)
.collect::<String>();
assert_eq!(lowercase.parse("hello").into_result(), Ok("hello".to_string()));
assert!(lowercase.parse("Hello").has_errors());Sourcefn map<U, F: Fn(O) -> U>(self, f: F) -> Map<Self, O, F>where
Self: Sized,
fn map<U, F: Fn(O) -> U>(self, f: F) -> Map<Self, O, F>where
Self: Sized,
Map the output of this parser to another value.
The output type of this parser is U, the same as the function’s output.
§Examples
#[derive(Debug, PartialEq)]
enum Token { Word(String), Num(u64) }
let word = any::<_, extra::Err<Simple<char>>>()
.filter(|c: &char| c.is_alphabetic())
.repeated().at_least(1)
.collect::<String>()
.map(Token::Word);
let num = any::<_, extra::Err<Simple<char>>>()
.filter(|c: &char| c.is_ascii_digit())
.repeated().at_least(1)
.collect::<String>()
.map(|s| Token::Num(s.parse().unwrap()));
let token = word.or(num);
assert_eq!(token.parse("test").into_result(), Ok(Token::Word("test".to_string())));
assert_eq!(token.parse("42").into_result(), Ok(Token::Num(42)));Sourcefn map_with<U, F: Fn(O, &mut MapExtra<'src, '_, I, E>) -> U>(
self,
f: F,
) -> MapWith<Self, O, F>where
Self: Sized,
fn map_with<U, F: Fn(O, &mut MapExtra<'src, '_, I, E>) -> U>(
self,
f: F,
) -> MapWith<Self, O, F>where
Self: Sized,
Map the output of this parser to another value, with the opportunity to get extra metadata from the parse like the span or parser state.
See the docs for MapExtra for examples of metadata that can be fetched.
The output type of this parser is U, the same as the function’s output.
§Examples
Using the span of the output in the mapping function:
// It's common for AST nodes to use a wrapper type that allows attaching span information to them
#[derive(Debug, PartialEq)]
pub struct Spanned<T>(T, SimpleSpan<usize>);
let ident = text::ascii::ident::<_, extra::Err<Simple<char>>>()
.map_with(|ident, e| Spanned(ident, e.span())) // Equivalent to `.map_with_span(|ident, span| Spanned(ident, span))`
.padded();
assert_eq!(ident.parse("hello").into_result(), Ok(Spanned("hello", (0..5).into())));
assert_eq!(ident.parse(" hello ").into_result(), Ok(Spanned("hello", (7..12).into())));Using the parser state in the mapping function to intern strings:
use std::ops::Range;
use lasso::{Rodeo, Spur};
// It's common for AST nodes to use interned versions of identifiers
// Keys are generally smaller, faster to compare, and can be `Copy`
#[derive(Copy, Clone)]
pub struct Ident(Spur);
let ident = text::ascii::ident::<_, extra::Full<Simple<char>, extra::SimpleState<Rodeo>, ()>>()
.map_with(|ident, e| Ident(e.state().get_or_intern(ident)))
.padded()
.repeated()
.at_least(1)
.collect::<Vec<_>>();
// Test out parser
let mut interner = extra::SimpleState(Rodeo::new());
match ident.parse_with_state("hello", &mut interner).into_result() {
Ok(idents) => {
assert_eq!(interner.resolve(&idents[0].0), "hello");
}
Err(e) => panic!("Parsing Failed: {:?}", e),
}
match ident.parse_with_state("hello hello", &mut interner).into_result() {
Ok(idents) => {
assert_eq!(idents[0].0, idents[1].0);
}
Err(e) => panic!("Parsing Failed: {:?}", e),
}Using the parse context in the mapping function:
fn palindrome_parser<'src>() -> impl Parser<'src, &'src str, String> {
recursive(|chain| {
choice((
just(String::new())
.configure(|cfg, ctx: &String| cfg.seq(ctx.clone()))
.then_ignore(end()),
any()
.map_with(|x, e| format!("{x}{}", e.ctx()))
.ignore_with_ctx(chain),
))
})
.with_ctx(String::new())
}
assert_eq!(palindrome_parser().parse("abccba").into_result().as_deref(), Ok("cba"));
assert_eq!(palindrome_parser().parse("hello olleh").into_result().as_deref(), Ok(" olleh"));
assert!(palindrome_parser().parse("abccb").into_result().is_err());Sourcefn map_group<F: Fn<O>>(self, f: F) -> MapGroup<Self, O, F>
Available on crate feature nightly only.
fn map_group<F: Fn<O>>(self, f: F) -> MapGroup<Self, O, F>
nightly only.Map the output of this parser to another value.
If the output of this parser isn’t a tuple, use Parser::map.
The output type of this parser is U, the same as the function’s output.
§Examples
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Value {
One(u8),
Two(u8, u8),
Three(u8, u8, u8),
}
fn parser<'src>() -> impl Parser<'src, &'src [u8], Vec<Value>> {
choice((
just(1).ignore_then(any()).map(Value::One),
just(2)
.ignore_then(group((any(), any())))
.map_group(Value::Two),
just(3)
.ignore_then(group((any(), any(), any())))
.map_group(Value::Three),
))
.repeated()
.collect()
}
let bytes = &[3, 1, 2, 3, 1, 127, 2, 21, 69];
assert_eq!(
parser().parse(bytes).into_result(),
Ok(vec![
Value::Three(1, 2, 3),
Value::One(127),
Value::Two(21, 69)
])
);Sourcefn to_span(self) -> ToSpan<Self, O>where
Self: Sized,
fn to_span(self) -> ToSpan<Self, O>where
Self: Sized,
Transform the output of this parser to the pattern’s span.
This is commonly used when you know what pattern you’ve parsed and are only interested in the span of the pattern.
The output type of this parser is I::Span.
§Examples
// It's common for AST nodes to use a wrapper type that allows attaching span information to them
#[derive(Debug, PartialEq)]
pub enum Expr<'src> {
Int(&'src str, SimpleSpan),
// The span is that of the operator, '+'
Add(Box<Expr<'src>>, SimpleSpan, Box<Expr<'src>>),
}
let int = text::int::<_, extra::Err<Simple<char>>>(10)
.to_slice()
.map_with(|int, e| Expr::Int(int, e.span()))
.padded();
let add_op = just('+').to_span().padded();
let sum = int.foldl(
add_op.then(int).repeated(),
|a, (op_span, b)| Expr::Add(Box::new(a), op_span, Box::new(b)),
);
assert_eq!(sum.parse("42 + 7 + 13").into_result(), Ok(Expr::Add(
Box::new(Expr::Add(
Box::new(Expr::Int("42", (0..2).into())),
(3..4).into(),
Box::new(Expr::Int("7", (5..6).into())),
)),
(7..8).into(),
Box::new(Expr::Int("13", (9..11).into())),
)));Sourcefn try_foldl<B, F, OB>(self, other: B, f: F) -> TryFoldl<F, Self, B, OB, E>
fn try_foldl<B, F, OB>(self, other: B, f: F) -> TryFoldl<F, Self, B, OB, E>
Left-fold the output of the parser into a single value, possibly failing during the reduction. The parser only consumes input from the inner parser until it either completes or the reduction step fails (“short circuting”).
The output type of this parser is A, the left-hand component of the original parser’s output.
§Examples
let int = text::int::<_, extra::Err<Simple<char>>>(10)
.from_str::<u8>()
.unwrapped();
let sum = int
.clone()
.try_foldl(just('+').ignore_then(int).repeated(), |a, b, e| a.checked_add(b).ok_or(Simple::new(None, e.span())));
assert_eq!(sum.parse("1+12+3+9").into_result(), Ok(25));
assert_eq!(sum.parse("6").into_result(), Ok(6));
assert!(sum.parse("255+1").has_errors()); // due to u8 overflowSourcefn try_map<U, F: Fn(O, I::Span) -> Result<U, E::Error>>(
self,
f: F,
) -> TryMap<Self, O, F>where
Self: Sized,
fn try_map<U, F: Fn(O, I::Span) -> Result<U, E::Error>>(
self,
f: F,
) -> TryMap<Self, O, F>where
Self: Sized,
After a successful parse, apply a fallible function to the output. If the function produces an error, treat it as a parsing error.
If you wish parsing of this pattern to continue when an error is generated instead of halting, consider using
Parser::validate instead.
The output type of this parser is U, the Ok return value of the function.
§Examples
let byte = text::int::<_, extra::Err<Rich<char>>>(10)
.try_map(|s: &str, span| s
.parse::<u8>()
.map_err(|e| Rich::custom(span, e)));
assert!(byte.parse("255").has_output());
assert!(byte.parse("256").has_errors()); // Out of rangeSourcefn try_map_with<U, F: Fn(O, &mut MapExtra<'src, '_, I, E>) -> Result<U, E::Error>>(
self,
f: F,
) -> TryMapWith<Self, O, F>where
Self: Sized,
fn try_map_with<U, F: Fn(O, &mut MapExtra<'src, '_, I, E>) -> Result<U, E::Error>>(
self,
f: F,
) -> TryMapWith<Self, O, F>where
Self: Sized,
After a successful parse, apply a fallible function to the output, with the opportunity to get extra metadata. If the function produces an error, treat it as a parsing error.
If you wish parsing of this pattern to continue when an error is generated instead of halting, consider using
Parser::validate instead.
The output type of this parser is U, the Ok return value of the function.
Sourcefn ignored(self) -> Ignored<Self, O>where
Self: Sized,
fn ignored(self) -> Ignored<Self, O>where
Self: Sized,
Ignore the output of this parser, yielding () as an output instead.
This can be used to reduce the cost of parsing by avoiding unnecessary allocations (most collections containing
ZSTs
do not allocate). For example, it’s common to
want to ignore whitespace in many grammars (see text::whitespace).
The output type of this parser is ().
§Examples
// A parser that parses any number of whitespace characters without allocating
let whitespace = any::<_, extra::Err<Simple<char>>>()
.filter(|c: &char| c.is_whitespace())
.ignored()
.repeated()
.collect::<Vec<_>>();
assert_eq!(whitespace.parse(" ").into_result(), Ok(vec![(); 4]));
assert!(whitespace.parse(" hello").has_errors());Sourcefn memoized(self) -> Memoized<Self>where
Self: Sized,
Available on crate feature memoization only.
fn memoized(self) -> Memoized<Self>where
Self: Sized,
memoization only.Memoize the parser such that later attempts to parse the same input ‘remember’ the attempt and exit early.
If you’re finding that certain inputs produce exponential behavior in your parser, strategically applying
memoization to a ‘garden path’ rule is often an effective
way to solve the problem. At the limit, applying memoization to all combinators will turn any parser into one
with O(n), albeit with very significant per-element overhead and high memory usage.
Memoization also works with recursion, so this can be used to write parsers using left recursion.
Sourcefn to<U: Clone>(self, to: U) -> To<Self, O, U>where
Self: Sized,
fn to<U: Clone>(self, to: U) -> To<Self, O, U>where
Self: Sized,
Transform all outputs of this parser to a predetermined value.
The output type of this parser is U, the type of the predetermined value.
§Examples
#[derive(Clone, Debug, PartialEq)]
enum Op { Add, Sub, Mul, Div }
let op = just::<_, _, extra::Err<Simple<char>>>('+').to(Op::Add)
.or(just('-').to(Op::Sub))
.or(just('*').to(Op::Mul))
.or(just('/').to(Op::Div));
assert_eq!(op.parse("+").into_result(), Ok(Op::Add));
assert_eq!(op.parse("/").into_result(), Ok(Op::Div));Sourcefn labelled<L>(self, label: L) -> Labelled<Self, L>
fn labelled<L>(self, label: L) -> Labelled<Self, L>
Label this parser with the given label.
Labelling a parser makes all errors generated by the parser refer to the label rather than any sub-elements within the parser. For example, labelling a parser for an expression would yield “expected expression” errors rather than “expected integer, string, binary op, etc.” errors.
Sourcefn then<U, B: Parser<'src, I, U, E>>(self, other: B) -> Then<Self, B, O, U, E>where
Self: Sized,
fn then<U, B: Parser<'src, I, U, E>>(self, other: B) -> Then<Self, B, O, U, E>where
Self: Sized,
Parse one thing and then another thing, yielding a tuple of the two outputs.
The output type of this parser is (O, U), a combination of the outputs of both parsers.
If you instead only need the output of one of the parsers, use ignore_then
or then_ignore.
§Examples
let word = any::<_, extra::Err<Simple<char>>>()
.filter(|c: &char| c.is_alphabetic())
.repeated()
.at_least(1)
.collect::<String>();
let two_words = word.then_ignore(just(' ')).then(word);
assert_eq!(two_words.parse("dog cat").into_result(), Ok(("dog".to_string(), "cat".to_string())));
assert!(two_words.parse("hedgehog").has_errors());Sourcefn ignore_then<U, B: Parser<'src, I, U, E>>(
self,
other: B,
) -> IgnoreThen<Self, B, O, E>where
Self: Sized,
fn ignore_then<U, B: Parser<'src, I, U, E>>(
self,
other: B,
) -> IgnoreThen<Self, B, O, E>where
Self: Sized,
Parse one thing and then another thing, yielding only the output of the latter.
The output type of this parser is U, the same as the second parser.
If you instead only need the output of the first parser, use then_ignore.
If you need the output of both parsers, use then.
§Examples
let zeroes = any::<_, extra::Err<Simple<char>>>().filter(|c: &char| *c == '0').ignored().repeated().collect::<Vec<_>>();
let digits = any().filter(|c: &char| c.is_ascii_digit())
.repeated()
.collect::<String>();
let integer = zeroes
.ignore_then(digits)
.from_str()
.unwrapped();
assert_eq!(integer.parse("00064").into_result(), Ok(64));
assert_eq!(integer.parse("32").into_result(), Ok(32));Sourcefn then_ignore<U, B: Parser<'src, I, U, E>>(
self,
other: B,
) -> ThenIgnore<Self, B, U, E>where
Self: Sized,
fn then_ignore<U, B: Parser<'src, I, U, E>>(
self,
other: B,
) -> ThenIgnore<Self, B, U, E>where
Self: Sized,
Parse one thing and then another thing, yielding only the output of the former.
The output type of this parser is O, the same as the original parser.
If you instead only need the output of the second parser, use ignore_then.
If you need the output of both parsers, use then.
§Examples
let word = any::<_, extra::Err<Simple<char>>>()
.filter(|c: &char| c.is_alphabetic())
.repeated()
.at_least(1)
.collect::<String>();
let punctuated = word
.then_ignore(just('!').or(just('?')).or_not());
let sentence = punctuated
.padded() // Allow for whitespace gaps
.repeated()
.collect::<Vec<_>>();
assert_eq!(
sentence.parse("hello! how are you?").into_result(),
Ok(vec![
"hello".to_string(),
"how".to_string(),
"are".to_string(),
"you".to_string(),
]),
);Sourcefn nested_in<B: Parser<'src, J, I, F>, J, F>(
self,
other: B,
) -> NestedIn<Self, B, J, F, O, E>
fn nested_in<B: Parser<'src, J, I, F>, J, F>( self, other: B, ) -> NestedIn<Self, B, J, F, O, E>
Parse input as part of a token-tree - using an input generated from within the current
input. In other words, this parser will attempt to create a new input stream from within
the one it is being run on, and the parser it was called on will be provided this new input.
By default, the original parser is expected to consume up to the end of the new stream. To
allow only consuming part of the stream, use Parser::lazy to ignore trailing tokens.
The provided parser P is expected to have both an input and output type which match the input
type of the parser it is called on. As an example, if the original parser takes an input of
Stream<Iterator<Item = T>>, P will be run first against that input, and is expected to
output a new Stream<Iterator<Item = T>> which the original parser will be run against.
The output of this parser is O, the output of the parser it is called on.
§Examples
#[derive(Debug, Clone, PartialEq)]
enum Token<'src> {
Struct,
Ident(&'src str),
Item(&'src str),
Group(Vec<Token<'src>>),
}
let group = select_ref! { Token::Group(g) => g.as_slice() };
let ident = select_ref! { Token::Ident(i) => *i };
let items = select_ref! { Token::Item(i) => *i }
.repeated()
.collect::<Vec<_>>()
.nested_in(group);
let struc = just::<_, _, extra::Err<Simple<_>>>(&Token::Struct)
.ignore_then(ident)
.then(items);
let tl = struc
.repeated()
.collect::<Vec<_>>();
let tokens = [
Token::Struct,
Token::Ident("foo"),
Token::Group(vec![
Token::Item("a"),
Token::Item("b"),
]),
];
assert_eq!(tl.parse(&tokens).into_result(), Ok(vec![("foo", vec!["a", "b"])]));Sourcefn ignore_with_ctx<U, P>(
self,
then: P,
) -> IgnoreWithCtx<Self, P, O, I, Full<E::Error, E::State, O>>
fn ignore_with_ctx<U, P>( self, then: P, ) -> IgnoreWithCtx<Self, P, O, I, Full<E::Error, E::State, O>>
Parse one thing and then another thing, creating the second parser from the result of
the first. If you do need the context in the output, use Parser::then_with_ctx.
The output of this parser is U, the result of the second parser
Error recovery for this parser may be sub-optimal, as if the first parser succeeds on recovery then the second produces an error, the primary error will point to the location in the second parser which failed, ignoring that the first parser may be the root cause. There may be other pathological errors cases as well.
§Examples
let successor = just(b'\0').configure(|cfg, ctx: &u8| cfg.seq(*ctx + 1));
// A parser that parses a single letter and then its successor
let successive_letters = one_of::<_, _, extra::Err<Simple<u8>>>(b'a'..=b'z')
.ignore_with_ctx(successor);
assert_eq!(successive_letters.parse(b"ab").into_result(), Ok(b'b')); // 'b' follows 'a'
assert!(successive_letters.parse(b"ac").has_errors()); // 'c' does not follow 'a'Sourcefn then_with_ctx<U, P>(
self,
then: P,
) -> ThenWithCtx<Self, P, O, I, Full<E::Error, E::State, O>>
fn then_with_ctx<U, P>( self, then: P, ) -> ThenWithCtx<Self, P, O, I, Full<E::Error, E::State, O>>
Parse one thing and then another thing, creating the second parser from the result of
the first. If you don’t need the context in the output, prefer Parser::ignore_with_ctx.
The output of this parser is (E::Context, O),
a combination of the context and the output of the parser.
Error recovery for this parser may be sub-optimal, as if the first parser succeeds on recovery then the second produces an error, the primary error will point to the location in the second parser which failed, ignoring that the first parser may be the root cause. There may be other pathological errors cases as well.
Sourcefn with_ctx(self, ctx: E::Context) -> WithCtx<Self, E::Context>
fn with_ctx(self, ctx: E::Context) -> WithCtx<Self, E::Context>
Run the previous contextual parser with the provided context.
let generic = just(b'0').configure(|cfg, ctx: &u8| cfg.seq(*ctx));
let parse_a = just::<_, _, extra::Default>(b'b').ignore_then(generic.with_ctx(b'a'));
let parse_b = just::<_, _, extra::Default>(b'a').ignore_then(generic.with_ctx(b'b'));
assert_eq!(parse_a.parse(b"ba" as &[_]).into_result(), Ok::<_, Vec<EmptyErr>>(b'a'));
assert!(parse_a.parse(b"bb").has_errors());
assert_eq!(parse_b.parse(b"ab" as &[_]).into_result(), Ok(b'b'));
assert!(parse_b.parse(b"aa").has_errors());Sourcefn with_state<State>(self, state: State) -> WithState<Self, State>
fn with_state<State>(self, state: State) -> WithState<Self, State>
Runs the previous parser with the provided state.
This is very uncommonly used and exists mostly for completeness.
One possible use-case is ‘glueing’ together parsers declared in different places with incompatible state types.
Note that the state value will be cloned and dropping during parsing, so it is recommended to ensure that this is a relatively performant operation.
Sourcefn and_is<U, B>(self, other: B) -> AndIs<Self, B, U>
fn and_is<U, B>(self, other: B) -> AndIs<Self, B, U>
Applies both parsers to the same position in the input, succeeding
only if both succeed. The returned value will be that of the first parser,
and the input will be at the end of the first parser if and_is succeeds.
The second parser is allowed to consume more or less input than the first parser, but like its output, how much it consumes won’t affect the final result.
The motivating use-case is in combination with Parser::not, allowing a parser
to consume something only if it isn’t also something like an escape sequence or a nested block.
§Examples
let escape = just("\\n").to('\n');
// C-style string literal
let string = none_of::<_, _, extra::Err<Simple<char>>>('"')
.and_is(escape.not())
.or(escape)
.repeated()
.collect::<String>()
.padded_by(just('"'));
assert_eq!(
string.parse("\"wxyz\"").into_result().as_deref(),
Ok("wxyz"),
);
assert_eq!(
string.parse("\"a\nb\"").into_result().as_deref(),
Ok("a\nb"),
);Sourcefn delimited_by<U, V, B, C>(
self,
start: B,
end: C,
) -> DelimitedBy<Self, B, C, U, V>
fn delimited_by<U, V, B, C>( self, start: B, end: C, ) -> DelimitedBy<Self, B, C, U, V>
Parse the pattern surrounded by the given delimiters.
The output type of this parser is O, the same as the original parser.
§Examples
// A LISP-style S-expression
#[derive(Debug, PartialEq)]
enum SExpr {
Ident(String),
Num(u64),
List(Vec<SExpr>),
}
let ident = any::<_, extra::Err<Simple<char>>>().filter(|c: &char| c.is_alphabetic())
.repeated()
.at_least(1)
.collect::<String>();
let num = text::int(10)
.from_str()
.unwrapped();
let s_expr = recursive(|s_expr| s_expr
.padded()
.repeated()
.collect::<Vec<_>>()
.map(SExpr::List)
.delimited_by(just('('), just(')'))
.or(ident.map(SExpr::Ident))
.or(num.map(SExpr::Num)));
// A valid input
assert_eq!(
s_expr.parse("(add (mul 42 3) 15)").into_result(),
Ok(SExpr::List(vec![
SExpr::Ident("add".to_string()),
SExpr::List(vec![
SExpr::Ident("mul".to_string()),
SExpr::Num(42),
SExpr::Num(3),
]),
SExpr::Num(15),
])),
);Sourcefn padded_by<U, B>(self, padding: B) -> PaddedBy<Self, B, U>
fn padded_by<U, B>(self, padding: B) -> PaddedBy<Self, B, U>
Parse a pattern, but with an instance of another pattern on either end, yielding the output of the inner.
The output type of this parser is O, the same as the original parser.
§Examples
let ident = text::ascii::ident::<_, extra::Err<Simple<char>>>()
.padded_by(just('!'));
assert_eq!(ident.parse("!hello!").into_result(), Ok("hello"));
assert!(ident.parse("hello!").has_errors());
assert!(ident.parse("!hello").has_errors());
assert!(ident.parse("hello").has_errors());Sourcefn or<B>(self, other: B) -> Or<Self, B>
fn or<B>(self, other: B) -> Or<Self, B>
Parse one thing or, on failure, another thing.
The output of both parsers must be of the same type, because either output can be produced.
If both parser succeed, the output of the first parser is guaranteed to be prioritized over the output of the second.
If both parsers produce errors, the combinator will attempt to select from or combine the errors to produce an error that is most likely to be useful to a human attempting to understand the problem. The exact algorithm used is left unspecified, and is not part of the crate’s semver guarantees, although regressions in error quality should be reported in the issue tracker of the main repository.
Please note that long chains of Parser::or combinators have been known to result in poor compilation times.
If you feel you are experiencing this, consider using choice instead.
The output type of this parser is O, the output of both parsers.
§Examples
let op = just::<_, _, extra::Err<Simple<char>>>('+')
.or(just('-'))
.or(just('*'))
.or(just('/'));
assert_eq!(op.parse("+").into_result(), Ok('+'));
assert_eq!(op.parse("/").into_result(), Ok('/'));
assert!(op.parse("!").has_errors());Sourcefn or_not(self) -> OrNot<Self>where
Self: Sized,
fn or_not(self) -> OrNot<Self>where
Self: Sized,
Attempt to parse something, but only if it exists.
If parsing of the pattern is successful, the output is Some(_). Otherwise, the output is None.
The output type of this parser is Option<O>.
§Examples
let word = any::<_, extra::Err<Simple<char>>>().filter(|c: &char| c.is_alphabetic())
.repeated()
.at_least(1)
.collect::<String>();
let word_or_question = word
.then(just('?').or_not());
assert_eq!(word_or_question.parse("hello?").into_result(), Ok(("hello".to_string(), Some('?'))));
assert_eq!(word_or_question.parse("wednesday").into_result(), Ok(("wednesday".to_string(), None)));Sourcefn not(self) -> Not<Self, O>where
Self: Sized,
fn not(self) -> Not<Self, O>where
Self: Sized,
Invert the result of the contained parser, failing if it succeeds and succeeding if it fails.
The output of this parser is always (), the unit type.
The motivating case for this is in combination with Parser::and_is, allowing a parser
to consume something only if it isn’t also something like an escape sequence or a nested block.
Caveats:
- The error message produced by
notby default will likely be fairly unhelpful - it can only tell the span that was wrong. - If not careful, it’s fairly easy to create non-intuitive behavior due to end-of-input
being a valid token for a parser to consume, and as most parsers fail at end of input,
notwill succeed on it.
#[derive(Debug, PartialEq)]
enum Tree<'src> {
Text(&'src str),
Group(Vec<Self>),
}
// Arbitrary text, nested in a tree with { ... } delimiters
let tree = recursive::<_, _, extra::Err<Simple<char>>, _, _>(|tree| {
let text = any()
.and_is(one_of("{}").not())
.repeated()
.at_least(1)
.to_slice()
.map(Tree::Text);
let group = tree
.repeated()
.collect()
.delimited_by(just('{'), just('}'))
.map(Tree::Group);
text.or(group)
});
assert_eq!(
tree.parse("{abcd{efg{hijk}lmn{opq}rs}tuvwxyz}").into_result(),
Ok(Tree::Group(vec![
Tree::Text("abcd"),
Tree::Group(vec![
Tree::Text("efg"),
Tree::Group(vec![
Tree::Text("hijk"),
]),
Tree::Text("lmn"),
Tree::Group(vec![
Tree::Text("opq"),
]),
Tree::Text("rs"),
]),
Tree::Text("tuvwxyz"),
])),
);Sourcefn repeated(self) -> Repeated<Self, O, I, E>where
Self: Sized,
fn repeated(self) -> Repeated<Self, O, I, E>where
Self: Sized,
Parse a pattern zero or more times (analog to Regex’s <PAT>*).
Input is eagerly parsed. Be aware that the parser will accept no occurrences of the pattern too. Consider using
Repeated::at_least instead if you wish to parse a minimum number of elements.
The output type of this parser is, by default, (). If you want to collect the items into a Container
(such as a Vec), use IterParser::collect.
§Examples
let num = any::<_, extra::Err<Simple<char>>>()
.filter(|c: &char| c.is_ascii_digit())
.repeated()
.at_least(1)
.collect::<String>()
.from_str()
.unwrapped();
let sum = num.clone()
.foldl(just('+').ignore_then(num).repeated(), |a, b| a + b);
assert_eq!(sum.parse("2+13+4+0+5").into_result(), Ok(24));Sourcefn separated_by<U, B>(self, separator: B) -> SeparatedBy<Self, B, O, U, I, E>
fn separated_by<U, B>(self, separator: B) -> SeparatedBy<Self, B, O, U, I, E>
Parse a pattern, separated by another, any number of times.
You can use SeparatedBy::allow_leading or SeparatedBy::allow_trailing to allow leading or trailing
separators.
The output type of this parser can be any Container.
§Examples
let shopping = text::ascii::ident::<_, extra::Err<Simple<char>>>()
.padded()
.separated_by(just(','))
.collect::<Vec<_>>();
assert_eq!(shopping.parse("eggs").into_result(), Ok(vec!["eggs"]));
assert_eq!(shopping.parse("eggs, flour, milk").into_result(), Ok(vec!["eggs", "flour", "milk"]));See SeparatedBy::allow_leading and SeparatedBy::allow_trailing for more examples.
Sourcefn foldl<B, F, OB>(self, other: B, f: F) -> Foldl<F, Self, B, OB, E>
fn foldl<B, F, OB>(self, other: B, f: F) -> Foldl<F, Self, B, OB, E>
Left-fold the output of the parser into a single value.
The output of the original parser must be of type (A, impl IntoIterator<Item = B>).
The output type of this parser is A, the left-hand component of the original parser’s output.
§Examples
let int = text::int::<_, extra::Err<Simple<char>>>(10)
.from_str()
.unwrapped();
let sum = int
.clone()
.foldl(just('+').ignore_then(int).repeated(), |a, b| a + b);
assert_eq!(sum.parse("1+12+3+9").into_result(), Ok(25));
assert_eq!(sum.parse("6").into_result(), Ok(6));Sourcefn foldl_with<B, F, OB>(self, other: B, f: F) -> FoldlWith<F, Self, B, OB, E>
fn foldl_with<B, F, OB>(self, other: B, f: F) -> FoldlWith<F, Self, B, OB, E>
Left-fold the output of the parser into a single value, making use of the parser’s state when doing so.
The output of the original parser must be of type (A, impl IntoIterator<Item = B>).
The output type of this parser is A, the left-hand component of the original parser’s output.
§Examples
§General
let int = text::int::<_, extra::Full<Simple<char>, SimpleState<i32>, ()>>(10)
.from_str()
.unwrapped();
let sum = int
.clone()
.foldl_with(just('+').ignore_then(int).repeated(), |a, b, e| (a + b) * **e.state());
let mut multiplier = SimpleState(2i32);
assert_eq!(sum.parse_with_state("1+12+3+9", &mut multiplier).into_result(), Ok(134));
assert_eq!(sum.parse_with_state("6", &mut multiplier).into_result(), Ok(6));§Interning / Arena Allocation
This example assumes use of the slotmap crate for arena allocation.
use slotmap::{new_key_type, SlotMap};
// Metadata type for node Ids for extra type safety
new_key_type! {
pub struct NodeId;
}
// AST nodes reference other nodes with `NodeId`s instead of containing boxed/owned values
#[derive(Copy, Clone, Debug, PartialEq)]
enum Expr {
Int(i32),
Add(NodeId, NodeId),
}
type NodeArena = SlotMap<NodeId, Expr>;
// Now, define our parser
let int = text::int::<&str, extra::Full<Simple<char>, extra::SimpleState<NodeArena>, ()>>(10)
.padded()
.map_with(|s, e|
// Return the ID of the new integer node
e.state().insert(Expr::Int(s.parse().unwrap()))
);
let sum = int.foldl_with(
just('+').padded().ignore_then(int).repeated(),
|a: NodeId, b: NodeId, e| {
// Inserting an item into the arena returns its ID
e.state().insert(Expr::Add(a, b))
}
);
// Test our parser
let mut arena = extra::SimpleState(NodeArena::default());
let four_plus_eight = sum.parse_with_state("4 + 8", &mut arena).unwrap();
if let Expr::Add(a, b) = arena[four_plus_eight] {
assert_eq!(arena[a], Expr::Int(4));
assert_eq!(arena[b], Expr::Int(8));
} else {
panic!("Not an Expr::Add");
}Sourcefn rewind(self) -> Rewind<Self>where
Self: Sized,
fn rewind(self) -> Rewind<Self>where
Self: Sized,
Parse a pattern. Afterwards, the input stream will be rewound to its original state, as if parsing had not occurred.
This combinator is useful for cases in which you wish to avoid a parser accidentally consuming too much input, causing later parsers to fail as a result. A typical use-case of this is that you want to parse something that is not followed by something else.
The output type of this parser is O, the same as the original parser.
§Examples
let just_numbers = text::digits::<_, extra::Err<Simple<char>>>(10)
.to_slice()
.padded()
.then_ignore(none_of("+-*/").rewind())
.separated_by(just(','))
.collect::<Vec<_>>();
// 3 is not parsed because it's followed by '+'.
assert_eq!(just_numbers.lazy().parse("1, 2, 3 + 4").into_result(), Ok(vec!["1", "2"]));Sourcefn lazy(self) -> Lazy<'src, Self, I, E>where
Self: Sized,
I: ValueInput<'src>,
fn lazy(self) -> Lazy<'src, Self, I, E>where
Self: Sized,
I: ValueInput<'src>,
Make the parser lazy, such that it parses as much of the input as it can finishes successfully, leaving the trailing input untouched.
The output type of this parser is O, the same as the original parser.
§Examples
let digits = one_of::<_, _, extra::Err<Simple<char>>>('0'..='9')
.repeated()
.collect::<String>()
.lazy();
assert_eq!(digits.parse("12345abcde").into_result().as_deref(), Ok("12345"));Sourcefn padded(self) -> Padded<Self>
fn padded(self) -> Padded<Self>
Parse a pattern, ignoring any amount of whitespace both before and after the pattern.
The output type of this parser is O, the same as the original parser.
§Examples
let ident = text::ascii::ident::<_, extra::Err<Simple<char>>>().padded();
// A pattern with no whitespace surrounding it is accepted
assert_eq!(ident.parse("hello").into_result(), Ok("hello"));
// A pattern with arbitrary whitespace surrounding it is also accepted
assert_eq!(ident.parse(" \t \n \t world \t ").into_result(), Ok("world"));Sourcefn recover_with<S: Strategy<'src, I, O, E>>(
self,
strategy: S,
) -> RecoverWith<Self, S>where
Self: Sized,
fn recover_with<S: Strategy<'src, I, O, E>>(
self,
strategy: S,
) -> RecoverWith<Self, S>where
Self: Sized,
Apply a fallback recovery strategy to this parser should it fail.
There is no silver bullet for error recovery, so this function allows you to specify one of several different strategies at the location of your choice. Prefer an error recovery strategy that more precisely mirrors valid syntax where possible to make error recovery more reliable.
Because chumsky is a PEG parser, which always take the first successful parsing route through a grammar, recovering from an error may cause the parser to erroneously miss alternative valid routes through the grammar that do not generate recoverable errors. If you run into cases where valid syntax fails to parse without errors, this might be happening: consider removing error recovery or switching to a more specific error recovery strategy.
The output type of this parser is O, the same as the original parser.
§Examples
#[derive(Debug, PartialEq)]
enum Expr<'src> {
Error,
Int(&'src str),
List(Vec<Expr<'src>>),
}
let recovery = just::<_, _, extra::Err<Simple<char>>>('[')
.then(none_of(']').repeated().then(just(']')));
let expr = recursive::<_, _, extra::Err<Simple<char>>, _, _>(|expr| expr
.separated_by(just(','))
.collect::<Vec<_>>()
.delimited_by(just('['), just(']'))
.map(Expr::List)
// If parsing a list expression fails, recover at the next delimiter, generating an error AST node
.recover_with(via_parser(recovery.map(|_| Expr::Error)))
.or(text::int(10).map(Expr::Int))
.padded());
assert!(expr.parse("five").has_errors()); // Text is not a valid expression in this language...
assert_eq!(
expr.parse("[1, 2, 3]").into_result(),
Ok(Expr::List(vec![Expr::Int("1"), Expr::Int("2"), Expr::Int("3")])),
); // ...but lists and numbers are!
// This input has two syntax errors...
let res = expr.parse("[[1, two], [3, four]]");
// ...and error recovery allows us to catch both of them!
assert_eq!(res.errors().len(), 2);
// Additionally, the AST we get back still has useful information.
assert_eq!(res.output(), Some(&Expr::List(vec![Expr::Error, Expr::Error])));Sourcefn map_err<F>(self, f: F) -> MapErr<Self, F>
fn map_err<F>(self, f: F) -> MapErr<Self, F>
Map the primary error of this parser to another value.
This function is most useful when using a custom error type, allowing you to augment errors according to context.
The output type of this parser is O, the same as the original parser.
Sourcefn map_err_with_state<F>(self, f: F) -> MapErrWithState<Self, F>
fn map_err_with_state<F>(self, f: F) -> MapErrWithState<Self, F>
Map the primary error of this parser to another value, making use of the parser state.
This function is useful for augmenting errors to allow them to include context in non context-free languages, or provide contextual notes on possible causes.
The output type of this parser is O, the same as the original parser.
Sourcefn validate<U, F>(self, f: F) -> Validate<Self, O, F>
fn validate<U, F>(self, f: F) -> Validate<Self, O, F>
Validate an output, producing non-terminal errors if it does not fulfill certain criteria. The errors will not immediately halt parsing on this path, but instead it will continue, potentially emitting one or more other errors, only failing after the pattern has otherwise successfully, or emitted another terminal error.
This function also permits mapping the output to a value of another type, similar to Parser::map.
If you wish parsing of this pattern to halt when an error is generated instead of continuing, consider using
Parser::try_map instead.
The output type of this parser is U, the result of the validation closure.
§Examples
let large_int = text::int::<_, extra::Err<Rich<char>>>(10)
.from_str()
.unwrapped()
.validate(|x: u32, e, emitter| {
if x < 256 { emitter.emit(Rich::custom(e.span(), format!("{} must be 256 or higher.", x))) }
x
});
assert_eq!(large_int.parse("537").into_result(), Ok(537));
assert!(large_int.parse("243").into_result().is_err());To show the difference in behavior from Parser::try_map:
// Start with the same large_int validator
let large_int_val = text::int::<_, extra::Err<Rich<char>>>(10)
.from_str()
.unwrapped()
.validate(|x: u32, e, emitter| {
if x < 256 { emitter.emit(Rich::custom(e.span(), format!("{} must be 256 or higher", x))) }
x
});
// A try_map version of the same parser
let large_int_tm = text::int::<_, extra::Err<Rich<char>>>(10)
.from_str()
.unwrapped()
.try_map(|x: u32, span| {
if x < 256 {
Err(Rich::custom(span, format!("{} must be 256 or higher", x)))
} else {
Ok(x)
}
});
// Parser that uses the validation version
let multi_step_val = large_int_val.then(text::ascii::ident().padded());
// Parser that uses the try_map version
let multi_step_tm = large_int_tm.then(text::ascii::ident().padded());
// On success, both parsers are equivalent
assert_eq!(
multi_step_val.parse("512 foo").into_result(),
Ok((512, "foo"))
);
assert_eq!(
multi_step_tm.parse("512 foo").into_result(),
Ok((512, "foo"))
);
// However, on failure, they may produce different errors:
assert_eq!(
multi_step_val.parse("100 2").into_result(),
Err(vec![
Rich::<char>::custom((0..3).into(), "100 must be 256 or higher"),
<Rich<char> as LabelError<&str, _>>::expected_found([TextExpected::<&str>::IdentifierPart], Some(MaybeRef::Val('2')), (4..5).into()),
])
);
assert_eq!(
multi_step_tm.parse("100 2").into_result(),
Err(vec![Rich::<char>::custom((0..3).into(), "100 must be 256 or higher")])
);As is seen in the above example, validation doesn’t prevent the emission of later errors in the same parser, but still produces an error in the output.
Sourcefn from_str<U>(self) -> Map<Self, O, fn(O) -> Result<U, U::Err>>
fn from_str<U>(self) -> Map<Self, O, fn(O) -> Result<U, U::Err>>
Attempt to convert the output of this parser into something else using Rust’s FromStr trait.
This is most useful when wanting to convert literal values into their corresponding Rust type, such as when parsing integers.
The output type of this parser is Result<U, U::Err>, the result of attempting to parse the output, O, into
the value U.
§Examples
let uint64 = text::int::<_, extra::Err<Simple<char>>>(10)
.from_str::<u64>()
.unwrapped();
assert_eq!(uint64.parse("7").into_result(), Ok(7));
assert_eq!(uint64.parse("42").into_result(), Ok(42));Sourcefn unwrapped(self) -> Unwrapped<Self, O>where
Self: Sized,
fn unwrapped(self) -> Unwrapped<Self, O>where
Self: Sized,
For parsers that produce a Result as their output, unwrap the result (panicking if an Err is
encountered).
In general, this method should be avoided except in cases where all possible that the parser might produce can
by parsed using FromStr without producing an error.
This combinator is not named unwrap to avoid confusion: it unwraps during parsing, not immediately.
The output type of this parser is U, the Ok value of the Result.
§Examples
let boolean = just::<_, _, extra::Err<Simple<char>>>("true")
.or(just("false"))
.from_str::<bool>()
.unwrapped(); // Cannot panic: the only possible outputs generated by the parser are "true" or "false"
assert_eq!(boolean.parse("true").into_result(), Ok(true));
assert_eq!(boolean.parse("false").into_result(), Ok(false));
// Does not panic, because the original parser only accepts "true" or "false"
assert!(boolean.parse("42").has_errors());Sourcefn into_iter(self) -> IntoIter<Self, O>where
Self: Sized,
O: IntoIterator,
fn into_iter(self) -> IntoIter<Self, O>where
Self: Sized,
O: IntoIterator,
Turn this Parser into an IterParser if its output type implements IntoIterator.
The resulting iterable parser will emit each element of the output type in turn.
This is broadly analogous to functions like Vec::into_iter, but operating at the level of parser outputs.
§Examples
// Parses whole integers
let num = text::int::<&str, extra::Default>(10).padded().map(|x: &str| x.parse::<u64>().unwrap());
// Parses a range like `0..4` into a vector like `[0, 1, 2, 3]`
let range = num.then_ignore(just("..")).then(num)
.map(|(x, y)| x..y)
.into_iter()
.collect::<Vec<u64>>();
// Parses a list of numbers into a vector
let list = num.separated_by(just(',')).collect::<Vec<u64>>();
let set = range.or(list);
assert_eq!(set.parse("0, 1, 2, 3").unwrap(), [0, 1, 2, 3]);
assert_eq!(set.parse("0..4").unwrap(), [0, 1, 2, 3]);Sourcefn boxed<'b>(self) -> Boxed<'src, 'b, I, O, E>where
Self: Sized + 'b,
fn boxed<'b>(self) -> Boxed<'src, 'b, I, O, E>where
Self: Sized + 'b,
Box the parser, yielding a parser that performs parsing through dynamic dispatch.
Boxing a parser might be useful for:
-
Dynamically building up parsers at run-time
-
Improving compilation times (Rust can struggle to compile code containing very long types)
-
Passing a parser over an FFI boundary
-
Getting around compiler implementation problems with long types such as this.
-
Places where you need to name the type of a parser
Boxing a parser is broadly equivalent to boxing other combinators via dynamic dispatch, such as Iterator.
The output type of this parser is O, the same as the original parser.
§Examples
When not using boxed, the following patterns are either impossible or very difficult to express:
pub trait Parseable: Sized {
type Parser<'src>: Parser<'src, &'src str, Self>;
fn parser<'src>() -> Self::Parser<'src>;
}
impl Parseable for i32 {
// We *can* write this type, but it will be very impractical, and change on any alterations
// to the implementation
type Parser<'src> = ???;
fn parser<'src>() -> Self::Parser<'src> {
todo()
}
}
let user_input = user_input();
let mut parser = just('a');
for i in user_input {
// Doesn't work due to type mismatch - since every combinator creates a unique type
parser = parser.or(i);
}
let parser = parser.then(just('z'));
let _ = parser.parse("b").into_result();However, with boxed, we can express them by making the parsers all share a common type:
use chumsky::prelude::*;
pub trait Parseable: Sized {
fn parser<'src>() -> Boxed<'src, 'src, &'src str, Self>;
}
impl Parseable for i32 {
fn parser<'src>() -> Boxed<'src, 'src, &'src str, Self> {
todo().boxed()
}
}let user_input = user_input();
let mut parser = just('a').boxed();
for i in user_input {
// Doesn't work due to type mismatch - since every combinator creates a unique type
parser = parser.or(i).boxed();
}
let parser = parser.then(just('z'));
parser.parse("az").into_result().unwrap();Sourcefn simplify(self) -> impl Parser<'src, I, O, E>where
Self: Sized + 'src,
Available on crate feature nightly only.
fn simplify(self) -> impl Parser<'src, I, O, E>where
Self: Sized + 'src,
nightly only.Simplify the type of the parser using Rust’s impl Trait syntax.
The only reason for using this function is to make Rust’s compiler errors easier to debug: it does not change the behaviour of the parser at all, and is in fact just a simple identity function.
Sourcefn contextual(self) -> Contextual<Self>where
Self: Sized,
fn contextual(self) -> Contextual<Self>where
Self: Sized,
Have this parser be enabled or disabled depending on context.
This method, by itself, does nothing: you must use ConfigParser::configure to specify when the parser is
enabled.
§Example
// Our parser can be in two modes depending on context: hexadecimal, or denary
#[derive(Clone)]
enum Mode { Hex, Dec }
let digits = one_of::<_, _, extra::Context<Mode>>("0123456789")
.or(one_of("abcdef").contextual().configure(|cfg, ctx| matches!(ctx, Mode::Hex)))
.repeated();
let num = just::<_, _, extra::Default>("0x").ignore_then(digits.with_ctx(Mode::Hex))
// Fallback: when '0x' isn't present, parse using denary mode
.or(digits.with_ctx(Mode::Dec))
.to_slice();
assert_eq!(num.parse("0x1a3f5b").into_result(), Ok("0x1a3f5b"));
assert_eq!(num.parse("12345").into_result(), Ok("12345"));
// Without the '0x' prefix, hexadecimal digits are invalid
assert!(num.parse("1a3f5b").has_errors());Sourcefn pratt<Ops>(self, ops: Ops) -> Pratt<Self, Ops>where
Self: Sized,
Available on crate feature pratt only.
fn pratt<Ops>(self, ops: Ops) -> Pratt<Self, Ops>where
Self: Sized,
pratt only.Use Pratt parsing to ergonomically parse this pattern separated by prefix, postfix, and infix operators of various associativites and precedence.
Pratt parsing is a powerful technique and is recommended when writing parsers for expressions.
§Example
See the documentation in pratt for more extensive examples and details.
use chumsky::pratt::*;
let int = text::int::<_, extra::Err<Rich<char>>>(10)
.from_str()
.unwrapped()
.padded();
let op = |c| just(c).padded();
let expr = int.pratt((
prefix(2, op('-'), |_, x: i64, _| -x),
infix(left(1), op('*'), |x, _, y, _| x * y),
infix(left(1), op('/'), |x, _, y, _| x / y),
infix(left(0), op('+'), |x, _, y, _| x + y),
infix(left(0), op('-'), |x, _, y, _| x - y),
));
// Pratt parsing can handle unary operators...
assert_eq!(expr.parse("-7").into_result(), Ok(-7));
// ...and infix binary operators...
assert_eq!(expr.parse("6 + 3").into_result(), Ok(9));
// ...and arbitrary precedence levels between them.
assert_eq!(expr.parse("2 + 3 * -4").into_result(), Ok(-10));Implementations on Foreign Types§
impl<'src, I, O, E> Parser<'src, I, O, E> for !where
I: Input<'src>,
E: ParserExtra<'src, I>,
nightly only.impl<'src, I, O, E, T> Parser<'src, I, O, E> for Box<T>
impl<'src, I, O, E, T> Parser<'src, I, O, E> for Rc<T>
impl<'src, I, O, E, T> Parser<'src, I, O, E> for Arc<T>
impl<'src, L, R, I, O, E> Parser<'src, I, O, E> for Either<L, R>
either only.impl<'src, T, I, O, E> Parser<'src, I, O, E> for &T
Implementors§
impl<'src, A, I, O, E> Parser<'src, I, <I as SliceInput<'src>>::Slice, E> for ToSlice<A, O>
impl<'src, A, I, O, E> Parser<'src, I, O, E> for Choice<&[A]>
impl<'src, A, I, O, E> Parser<'src, I, O, E> for Choice<Vec<A>>
impl<'src, A, I, O, E, F> Parser<'src, I, O, E> for Filter<A, F>
impl<'src, A, I, O, E, const N: usize> Parser<'src, I, O, E> for Choice<[A; N]>
impl<'src, A, O, I, E> Parser<'src, I, (), E> for IntoIter<A, O>
impl<'src, I, E> Parser<'src, I, &'src <I as Input<'src>>::Token, E> for AnyRef<I, E>where
I: BorrowInput<'src>,
E: ParserExtra<'src, I>,
impl<'src, I, E> Parser<'src, I, <I as Input<'src>>::Token, E> for Any<I, E>where
I: ValueInput<'src>,
E: ParserExtra<'src, I>,
impl<'src, I, E> Parser<'src, I, (), E> for Empty<I, E>where
I: Input<'src>,
E: ParserExtra<'src, I>,
impl<'src, I, E> Parser<'src, I, (), E> for End<I, E>where
I: Input<'src>,
E: ParserExtra<'src, I>,
impl<'src, I, E, A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A2: Parser<'src, I, A1, E>,
B2: Parser<'src, I, B1, E>,
C2: Parser<'src, I, C1, E>,
D2: Parser<'src, I, D1, E>,
E2: Parser<'src, I, E1, E>,
F2: Parser<'src, I, F1, E>,
G2: Parser<'src, I, G1, E>,
H2: Parser<'src, I, H1, E>,
I2: Parser<'src, I, I1, E>,
J2: Parser<'src, I, J1, E>,
K2: Parser<'src, I, K1, E>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, A, B, C, OA, OB, OC> Parser<'src, I, OA, E> for DelimitedBy<A, B, C, OB, OC>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: Parser<'src, I, OA, E>,
B: Parser<'src, I, OB, E>,
C: Parser<'src, I, OC, E>,
impl<'src, I, E, A, B, OA, OB> Parser<'src, I, (OA, OB), E> for Then<A, B, OA, OB, E>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: Parser<'src, I, OA, E>,
B: Parser<'src, I, OB, E>,
impl<'src, I, E, A, B, OA, OB> Parser<'src, I, (OA, OB), E> for ThenWithCtx<A, B, OA, I, Full<E::Error, E::State, OA>>
impl<'src, I, E, A, B, OA, OB> Parser<'src, I, (), E> for SeparatedBy<A, B, OA, OB, I, E>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: Parser<'src, I, OA, E>,
B: Parser<'src, I, OB, E>,
impl<'src, I, E, A, B, OA, OB> Parser<'src, I, OA, E> for AndIs<A, B, OB>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: Parser<'src, I, OA, E>,
B: Parser<'src, I, OB, E>,
impl<'src, I, E, A, B, OA, OB> Parser<'src, I, OA, E> for PaddedBy<A, B, OB>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: Parser<'src, I, OA, E>,
B: Parser<'src, I, OB, E>,
impl<'src, I, E, A, B, OA, OB> Parser<'src, I, OA, E> for ThenIgnore<A, B, OB, E>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: Parser<'src, I, OA, E>,
B: Parser<'src, I, OB, E>,
impl<'src, I, E, A, B, OA, OB> Parser<'src, I, OB, E> for IgnoreThen<A, B, OA, E>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: Parser<'src, I, OA, E>,
B: Parser<'src, I, OB, E>,
impl<'src, I, E, A, B, OA, OB> Parser<'src, I, OB, E> for IgnoreWithCtx<A, B, OA, I, Full<E::Error, E::State, OA>>
impl<'src, I, E, A, O> Parser<'src, I, O, E> for Memoized<A>
memoization only.impl<'src, I, E, A, O> Parser<'src, I, O, E> for Unwrapped<A, Option<O>>
impl<'src, I, E, A, O, U> Parser<'src, I, O, E> for Unwrapped<A, Result<O, U>>
impl<'src, I, E, A, OA> Parser<'src, I, (), E> for Ignored<A, OA>
impl<'src, I, E, A, OA> Parser<'src, I, (), E> for Not<A, OA>
impl<'src, I, E, A, OA> Parser<'src, I, (), E> for Repeated<A, OA, I, E>
impl<'src, I, E, A_, B_, C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(A_, B_, C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A_: Parser<'src, I, O, E>,
B_: Parser<'src, I, O, E>,
C_: Parser<'src, I, O, E>,
D_: Parser<'src, I, O, E>,
E_: Parser<'src, I, O, E>,
F_: Parser<'src, I, O, E>,
G_: Parser<'src, I, O, E>,
H_: Parser<'src, I, O, E>,
I_: Parser<'src, I, O, E>,
J_: Parser<'src, I, O, E>,
K_: Parser<'src, I, O, E>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, A_, B_, C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OA, OB, OC, OD, OE, OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OA, OB, OC, OD, OE, OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(A_, B_, C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A_: Parser<'src, I, OA, E>,
B_: Parser<'src, I, OB, E>,
C_: Parser<'src, I, OC, E>,
D_: Parser<'src, I, OD, E>,
E_: Parser<'src, I, OE, E>,
F_: Parser<'src, I, OF, E>,
G_: Parser<'src, I, OG, E>,
H_: Parser<'src, I, OH, E>,
I_: Parser<'src, I, OI, E>,
J_: Parser<'src, I, OJ, E>,
K_: Parser<'src, I, OK, E>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
B2: Parser<'src, I, B1, E>,
C2: Parser<'src, I, C1, E>,
D2: Parser<'src, I, D1, E>,
E2: Parser<'src, I, E1, E>,
F2: Parser<'src, I, F1, E>,
G2: Parser<'src, I, G1, E>,
H2: Parser<'src, I, H1, E>,
I2: Parser<'src, I, I1, E>,
J2: Parser<'src, I, J1, E>,
K2: Parser<'src, I, K1, E>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, B_, C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(B_, C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
B_: Parser<'src, I, O, E>,
C_: Parser<'src, I, O, E>,
D_: Parser<'src, I, O, E>,
E_: Parser<'src, I, O, E>,
F_: Parser<'src, I, O, E>,
G_: Parser<'src, I, O, E>,
H_: Parser<'src, I, O, E>,
I_: Parser<'src, I, O, E>,
J_: Parser<'src, I, O, E>,
K_: Parser<'src, I, O, E>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, B_, C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OB, OC, OD, OE, OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OB, OC, OD, OE, OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(B_, C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
B_: Parser<'src, I, OB, E>,
C_: Parser<'src, I, OC, E>,
D_: Parser<'src, I, OD, E>,
E_: Parser<'src, I, OE, E>,
F_: Parser<'src, I, OF, E>,
G_: Parser<'src, I, OG, E>,
H_: Parser<'src, I, OH, E>,
I_: Parser<'src, I, OI, E>,
J_: Parser<'src, I, OJ, E>,
K_: Parser<'src, I, OK, E>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (C1, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(C2, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
C2: Parser<'src, I, C1, E>,
D2: Parser<'src, I, D1, E>,
E2: Parser<'src, I, E1, E>,
F2: Parser<'src, I, F1, E>,
G2: Parser<'src, I, G1, E>,
H2: Parser<'src, I, H1, E>,
I2: Parser<'src, I, I1, E>,
J2: Parser<'src, I, J1, E>,
K2: Parser<'src, I, K1, E>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
C_: Parser<'src, I, O, E>,
D_: Parser<'src, I, O, E>,
E_: Parser<'src, I, O, E>,
F_: Parser<'src, I, O, E>,
G_: Parser<'src, I, O, E>,
H_: Parser<'src, I, O, E>,
I_: Parser<'src, I, O, E>,
J_: Parser<'src, I, O, E>,
K_: Parser<'src, I, O, E>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OC, OD, OE, OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OC, OD, OE, OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(C_, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
C_: Parser<'src, I, OC, E>,
D_: Parser<'src, I, OD, E>,
E_: Parser<'src, I, OE, E>,
F_: Parser<'src, I, OF, E>,
G_: Parser<'src, I, OG, E>,
H_: Parser<'src, I, OH, E>,
I_: Parser<'src, I, OI, E>,
J_: Parser<'src, I, OJ, E>,
K_: Parser<'src, I, OK, E>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (D1, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(D2, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
D2: Parser<'src, I, D1, E>,
E2: Parser<'src, I, E1, E>,
F2: Parser<'src, I, F1, E>,
G2: Parser<'src, I, G1, E>,
H2: Parser<'src, I, H1, E>,
I2: Parser<'src, I, I1, E>,
J2: Parser<'src, I, J1, E>,
K2: Parser<'src, I, K1, E>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
D_: Parser<'src, I, O, E>,
E_: Parser<'src, I, O, E>,
F_: Parser<'src, I, O, E>,
G_: Parser<'src, I, O, E>,
H_: Parser<'src, I, O, E>,
I_: Parser<'src, I, O, E>,
J_: Parser<'src, I, O, E>,
K_: Parser<'src, I, O, E>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OD, OE, OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OD, OE, OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(D_, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
D_: Parser<'src, I, OD, E>,
E_: Parser<'src, I, OE, E>,
F_: Parser<'src, I, OF, E>,
G_: Parser<'src, I, OG, E>,
H_: Parser<'src, I, OH, E>,
I_: Parser<'src, I, OI, E>,
J_: Parser<'src, I, OJ, E>,
K_: Parser<'src, I, OK, E>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (E1, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(E2, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
E2: Parser<'src, I, E1, E>,
F2: Parser<'src, I, F1, E>,
G2: Parser<'src, I, G1, E>,
H2: Parser<'src, I, H1, E>,
I2: Parser<'src, I, I1, E>,
J2: Parser<'src, I, J1, E>,
K2: Parser<'src, I, K1, E>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
E_: Parser<'src, I, O, E>,
F_: Parser<'src, I, O, E>,
G_: Parser<'src, I, O, E>,
H_: Parser<'src, I, O, E>,
I_: Parser<'src, I, O, E>,
J_: Parser<'src, I, O, E>,
K_: Parser<'src, I, O, E>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OE, OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OE, OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(E_, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
E_: Parser<'src, I, OE, E>,
F_: Parser<'src, I, OF, E>,
G_: Parser<'src, I, OG, E>,
H_: Parser<'src, I, OH, E>,
I_: Parser<'src, I, OI, E>,
J_: Parser<'src, I, OJ, E>,
K_: Parser<'src, I, OK, E>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (F1, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(F2, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
F2: Parser<'src, I, F1, E>,
G2: Parser<'src, I, G1, E>,
H2: Parser<'src, I, H1, E>,
I2: Parser<'src, I, I1, E>,
J2: Parser<'src, I, J1, E>,
K2: Parser<'src, I, K1, E>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
F_: Parser<'src, I, O, E>,
G_: Parser<'src, I, O, E>,
H_: Parser<'src, I, O, E>,
I_: Parser<'src, I, O, E>,
J_: Parser<'src, I, O, E>,
K_: Parser<'src, I, O, E>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OF, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(F_, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
F_: Parser<'src, I, OF, E>,
G_: Parser<'src, I, OG, E>,
H_: Parser<'src, I, OH, E>,
I_: Parser<'src, I, OI, E>,
J_: Parser<'src, I, OJ, E>,
K_: Parser<'src, I, OK, E>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (G1, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(G2, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
G2: Parser<'src, I, G1, E>,
H2: Parser<'src, I, H1, E>,
I2: Parser<'src, I, I1, E>,
J2: Parser<'src, I, J1, E>,
K2: Parser<'src, I, K1, E>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
G_: Parser<'src, I, O, E>,
H_: Parser<'src, I, O, E>,
I_: Parser<'src, I, O, E>,
J_: Parser<'src, I, O, E>,
K_: Parser<'src, I, O, E>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OG, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(G_, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
G_: Parser<'src, I, OG, E>,
H_: Parser<'src, I, OH, E>,
I_: Parser<'src, I, OI, E>,
J_: Parser<'src, I, OJ, E>,
K_: Parser<'src, I, OK, E>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (H1, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(H2, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
H2: Parser<'src, I, H1, E>,
I2: Parser<'src, I, I1, E>,
J2: Parser<'src, I, J1, E>,
K2: Parser<'src, I, K1, E>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
H_: Parser<'src, I, O, E>,
I_: Parser<'src, I, O, E>,
J_: Parser<'src, I, O, E>,
K_: Parser<'src, I, O, E>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OH, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(H_, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
H_: Parser<'src, I, OH, E>,
I_: Parser<'src, I, OI, E>,
J_: Parser<'src, I, OJ, E>,
K_: Parser<'src, I, OK, E>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (I1, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(I2, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
I2: Parser<'src, I, I1, E>,
J2: Parser<'src, I, J1, E>,
K2: Parser<'src, I, K1, E>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
I_: Parser<'src, I, O, E>,
J_: Parser<'src, I, O, E>,
K_: Parser<'src, I, O, E>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OI, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(I_, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
I_: Parser<'src, I, OI, E>,
J_: Parser<'src, I, OJ, E>,
K_: Parser<'src, I, OK, E>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (J1, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(J2, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
J2: Parser<'src, I, J1, E>,
K2: Parser<'src, I, K1, E>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
J_: Parser<'src, I, O, E>,
K_: Parser<'src, I, O, E>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OJ, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(J_, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
J_: Parser<'src, I, OJ, E>,
K_: Parser<'src, I, OK, E>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (K1, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(K2, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
K2: Parser<'src, I, K1, E>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
K_: Parser<'src, I, O, E>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OK, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(K_, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
K_: Parser<'src, I, OK, E>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (L1, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(L2, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
L2: Parser<'src, I, L1, E>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
L_: Parser<'src, I, O, E>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OL, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(L_, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
L_: Parser<'src, I, OL, E>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (M1, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(M2, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
M2: Parser<'src, I, M1, E>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
M_: Parser<'src, I, O, E>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OM, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(M_, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
M_: Parser<'src, I, OM, E>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (N1, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(N2, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
N2: Parser<'src, I, N1, E>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
N_: Parser<'src, I, O, E>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (ON, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(N_, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
N_: Parser<'src, I, ON, E>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (O1, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(O2, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
O2: Parser<'src, I, O1, E>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
O_: Parser<'src, I, O, E>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OO, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(O_, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
O_: Parser<'src, I, OO, E>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (P1, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(P2, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
P2: Parser<'src, I, P1, E>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
P_: Parser<'src, I, O, E>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OP, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(P_, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
P_: Parser<'src, I, OP, E>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (Q1, R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(Q2, R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
Q2: Parser<'src, I, Q1, E>,
R2: Parser<'src, I, R1, E>,
S2: Parser<'src, I, S1, E>,
T2: Parser<'src, I, T1, E>,
U2: Parser<'src, I, U1, E>,
V2: Parser<'src, I, V1, E>,
W2: Parser<'src, I, W1, E>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
Q_: Parser<'src, I, O, E>,
R_: Parser<'src, I, O, E>,
S_: Parser<'src, I, O, E>,
T_: Parser<'src, I, O, E>,
U_: Parser<'src, I, O, E>,
V_: Parser<'src, I, O, E>,
W_: Parser<'src, I, O, E>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OQ, OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(Q_, R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
Q_: Parser<'src, I, OQ, E>,
R_: Parser<'src, I, OR, E>,
S_: Parser<'src, I, OS, E>,
T_: Parser<'src, I, OT, E>,
U_: Parser<'src, I, OU, E>,
V_: Parser<'src, I, OV, E>,
W_: Parser<'src, I, OW, E>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, R2, S2, T2, U2, V2, W2, X2, Y2, Z2, R1, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (R1, S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(R2, S2, T2, U2, V2, W2, X2, Y2, Z2)>
impl<'src, I, E, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>
impl<'src, I, E, R_, S_, T_, U_, V_, W_, X_, Y_, Z_, OR, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OR, OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(R_, S_, T_, U_, V_, W_, X_, Y_, Z_)>
impl<'src, I, E, S2, T2, U2, V2, W2, X2, Y2, Z2, S1, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (S1, T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(S2, T2, U2, V2, W2, X2, Y2, Z2)>
impl<'src, I, E, S_, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(S_, T_, U_, V_, W_, X_, Y_, Z_)>
impl<'src, I, E, S_, T_, U_, V_, W_, X_, Y_, Z_, OS, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OS, OT, OU, OV, OW, OX, OY, OZ), E> for Group<(S_, T_, U_, V_, W_, X_, Y_, Z_)>
impl<'src, I, E, T2, U2, V2, W2, X2, Y2, Z2, T1, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (T1, U1, V1, W1, X1, Y1, Z1), E> for Set<(T2, U2, V2, W2, X2, Y2, Z2)>
impl<'src, I, E, T> Parser<'src, I, <I as Input<'src>>::Token, E> for NoneOf<T, I, E>
impl<'src, I, E, T> Parser<'src, I, <I as Input<'src>>::Token, E> for OneOf<T, I, E>
impl<'src, I, E, T> Parser<'src, I, T, E> for Just<T, I, E>where
I: Input<'src>,
E: ParserExtra<'src, I>,
I::Token: PartialEq,
T: OrderedSeq<'src, I::Token> + Clone,
impl<'src, I, E, T_, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(T_, U_, V_, W_, X_, Y_, Z_)>
impl<'src, I, E, T_, U_, V_, W_, X_, Y_, Z_, OT, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OT, OU, OV, OW, OX, OY, OZ), E> for Group<(T_, U_, V_, W_, X_, Y_, Z_)>
impl<'src, I, E, U2, V2, W2, X2, Y2, Z2, U1, V1, W1, X1, Y1, Z1> Parser<'src, I, (U1, V1, W1, X1, Y1, Z1), E> for Set<(U2, V2, W2, X2, Y2, Z2)>
impl<'src, I, E, U_, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(U_, V_, W_, X_, Y_, Z_)>
impl<'src, I, E, U_, V_, W_, X_, Y_, Z_, OU, OV, OW, OX, OY, OZ> Parser<'src, I, (OU, OV, OW, OX, OY, OZ), E> for Group<(U_, V_, W_, X_, Y_, Z_)>
impl<'src, I, E, V2, W2, X2, Y2, Z2, V1, W1, X1, Y1, Z1> Parser<'src, I, (V1, W1, X1, Y1, Z1), E> for Set<(V2, W2, X2, Y2, Z2)>
impl<'src, I, E, V_, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(V_, W_, X_, Y_, Z_)>
impl<'src, I, E, V_, W_, X_, Y_, Z_, OV, OW, OX, OY, OZ> Parser<'src, I, (OV, OW, OX, OY, OZ), E> for Group<(V_, W_, X_, Y_, Z_)>
impl<'src, I, E, W2, X2, Y2, Z2, W1, X1, Y1, Z1> Parser<'src, I, (W1, X1, Y1, Z1), E> for Set<(W2, X2, Y2, Z2)>
impl<'src, I, E, W_, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(W_, X_, Y_, Z_)>
impl<'src, I, E, W_, X_, Y_, Z_, OW, OX, OY, OZ> Parser<'src, I, (OW, OX, OY, OZ), E> for Group<(W_, X_, Y_, Z_)>
impl<'src, I, E, X2, Y2, Z2, X1, Y1, Z1> Parser<'src, I, (X1, Y1, Z1), E> for Set<(X2, Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
X2: Parser<'src, I, X1, E>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, X_, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
X_: Parser<'src, I, O, E>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, X_, Y_, Z_, OX, OY, OZ> Parser<'src, I, (OX, OY, OZ), E> for Group<(X_, Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
X_: Parser<'src, I, OX, E>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, Y2, Z2, Y1, Z1> Parser<'src, I, (Y1, Z1), E> for Set<(Y2, Z2)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
Y2: Parser<'src, I, Y1, E>,
Z2: Parser<'src, I, Z1, E>,
impl<'src, I, E, Y_, Z_, O> Parser<'src, I, O, E> for Choice<(Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
Y_: Parser<'src, I, O, E>,
Z_: Parser<'src, I, O, E>,
impl<'src, I, E, Y_, Z_, OY, OZ> Parser<'src, I, (OY, OZ), E> for Group<(Y_, Z_)>where
I: Input<'src>,
E: ParserExtra<'src, I>,
Y_: Parser<'src, I, OY, E>,
Z_: Parser<'src, I, OZ, E>,
impl<'src, I, E, Z2, Z1> Parser<'src, I, (Z1,), E> for Set<(Z2,)>
impl<'src, I, E, Z_, O> Parser<'src, I, O, E> for Choice<(Z_,)>
impl<'src, I, E, Z_, OZ> Parser<'src, I, (OZ,), E> for Group<(Z_,)>
impl<'src, I, F, A, B, O, OA, E> Parser<'src, I, O, E> for Foldr<F, A, B, OA, E>where
I: Input<'src>,
A: IterParser<'src, I, OA, E>,
B: Parser<'src, I, O, E>,
E: ParserExtra<'src, I>,
F: Fn(OA, O) -> O,
impl<'src, I, F, A, B, O, OA, E> Parser<'src, I, O, E> for FoldrWith<F, A, B, OA, E>where
I: Input<'src>,
A: IterParser<'src, I, OA, E>,
B: Parser<'src, I, O, E>,
E: ParserExtra<'src, I>,
F: Fn(OA, O, &mut MapExtra<'src, '_, I, E>) -> O,
impl<'src, I, F, A, B, O, OB, E> Parser<'src, I, O, E> for Foldl<F, A, B, OB, E>where
I: Input<'src>,
A: Parser<'src, I, O, E>,
B: IterParser<'src, I, OB, E>,
E: ParserExtra<'src, I>,
F: Fn(O, OB) -> O,
impl<'src, I, F, A, B, O, OB, E> Parser<'src, I, O, E> for FoldlWith<F, A, B, OB, E>where
I: Input<'src>,
A: Parser<'src, I, O, E>,
B: IterParser<'src, I, OB, E>,
E: ParserExtra<'src, I>,
F: Fn(O, OB, &mut MapExtra<'src, '_, I, E>) -> O,
impl<'src, I, F, A, B, OA, OB, E> Parser<'src, I, OA, E> for TryFoldl<F, A, B, OB, E>where
I: Input<'src>,
A: Parser<'src, I, OA, E>,
B: IterParser<'src, I, OB, E>,
E: ParserExtra<'src, I>,
F: Fn(OA, OB, &mut MapExtra<'src, '_, I, E>) -> Result<OA, E::Error>,
impl<'src, I, J, E, F, A, B, O> Parser<'src, I, O, E> for NestedIn<A, B, J, F, O, E>where
I: Input<'src>,
E: ParserExtra<'src, I>,
B: Parser<'src, I, J, E>,
J: Input<'src>,
F: ParserExtra<'src, J, State = E::State, Context = E::Context, Error = E::Error>,
A: Parser<'src, J, O, F>,
impl<'src, I, O, E> Parser<'src, I, O, E> for Todo<I, O, E>where
I: Input<'src>,
E: ParserExtra<'src, I>,
impl<'src, I, O, E> Parser<'src, I, O, E> for Recursive<Indirect<'src, '_, I, O, E>>where
I: Input<'src>,
E: ParserExtra<'src, I>,
impl<'src, I, O, E> Parser<'src, I, O, E> for Recursive<Direct<'src, '_, I, O, E>>where
I: Input<'src>,
E: ParserExtra<'src, I>,
impl<'src, I, O, E> Parser<'src, I, O, E> for Boxed<'src, '_, I, O, E>where
I: Input<'src>,
E: ParserExtra<'src, I>,
impl<'src, I, O, E, A> Parser<'src, I, Option<O>, E> for OrNot<A>
impl<'src, I, O, E, A> Parser<'src, I, O, E> for Contextual<A>
impl<'src, I, O, E, A> Parser<'src, I, O, E> for Rewind<A>
impl<'src, I, O, E, A> Parser<'src, I, O, E> for Padded<A>
impl<'src, I, O, E, A, B> Parser<'src, I, O, E> for Or<A, B>
impl<'src, I, O, E, A, C> Parser<'src, I, C, E> for Collect<A, O, C>
impl<'src, I, O, E, A, C> Parser<'src, I, C, E> for CollectExactly<A, O, C>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: IterParser<'src, I, O, E>,
C: ContainerExactly<O>,
impl<'src, I, O, E, A, Ctx> Parser<'src, I, O, E> for WithCtx<A, Ctx>
impl<'src, I, O, E, A, F> Parser<'src, I, O, E> for Configure<A, F>where
A: ConfigParser<'src, I, O, E>,
F: Fn(A::Config, &E::Context) -> A::Config,
I: Input<'src>,
E: ParserExtra<'src, I>,
impl<'src, I, O, E, A, F> Parser<'src, I, O, E> for MapErr<A, F>
impl<'src, I, O, E, A, F> Parser<'src, I, O, E> for MapErrWithState<A, F>
impl<'src, I, O, E, A, L> Parser<'src, I, O, E> for Labelled<A, L>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: Parser<'src, I, O, E>,
L: Clone,
E::Error: LabelError<'src, I, L>,
impl<'src, I, O, E, A, OA> Parser<'src, I, O, E> for To<A, OA, O>
impl<'src, I, O, E, A, OA, F> Parser<'src, I, O, E> for Map<A, OA, F>
impl<'src, I, O, E, A, OA, F> Parser<'src, I, O, E> for MapGroup<A, OA, F>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: Parser<'src, I, OA, E>,
F: Fn<OA, Output = O>,
OA: Tuple,
nightly only.impl<'src, I, O, E, A, OA, F> Parser<'src, I, O, E> for MapWith<A, OA, F>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: Parser<'src, I, OA, E>,
F: Fn(OA, &mut MapExtra<'src, '_, I, E>) -> O,
impl<'src, I, O, E, A, OA, F> Parser<'src, I, O, E> for TryMap<A, OA, F>
impl<'src, I, O, E, A, OA, F> Parser<'src, I, O, E> for TryMapWith<A, OA, F>
impl<'src, I, O, E, A, S> Parser<'src, I, O, E> for RecoverWith<A, S>where
I: Input<'src>,
E: ParserExtra<'src, I>,
A: Parser<'src, I, O, E>,
S: Strategy<'src, I, O, E>,
impl<'src, I, O, E, A, State> Parser<'src, I, O, E> for WithState<A, State>
impl<'src, I, O, E, Atom, Ops> Parser<'src, I, O, E> for Pratt<Atom, Ops>where
I: Input<'src>,
E: ParserExtra<'src, I>,
Atom: Parser<'src, I, O, E>,
Ops: Operator<'src, I, O, E>,
pratt only.impl<'src, I, O, E, EI, A, F> Parser<'src, I, O, E> for MapCtx<A, EI, F, E>where
I: Input<'src>,
E: ParserExtra<'src, I>,
EI: ParserExtra<'src, I, Error = E::Error, State = E::State>,
A: Parser<'src, I, O, EI>,
F: Fn(&E::Context) -> EI::Context,
EI::Context: 'src,
impl<'src, I, O, E, F> Parser<'src, I, O, E> for Custom<F, I, O, E>
impl<'src, I, O, E, F> Parser<'src, I, O, E> for Select<F, I, O, E>
impl<'src, I, O, E, F> Parser<'src, I, O, E> for SelectRef<F, I, O, E>where
I: BorrowInput<'src>,
I::Token: 'src,
E: ParserExtra<'src, I>,
F: Fn(&'src I::Token, &mut MapExtra<'src, '_, I, E>) -> Option<O>,
impl<'src, I, O, E, P> Parser<'src, I, O, E> for Ext<P>
extension only.impl<'src, I, O, E, P, const N: usize> Parser<'src, I, [O; N], E> for Group<[P; N]>
impl<'src, I, OA, E, A> Parser<'src, I, <I as Input<'src>>::Span, E> for ToSpan<A, OA>
impl<'src, I, OA, E, A, F> Parser<'src, I, (), E> for IterConfigure<A, F, OA>where
A: ConfigIterParser<'src, I, OA, E>,
F: Fn(A::Config, &E::Context) -> A::Config,
I: Input<'src>,
E: ParserExtra<'src, I>,
impl<'src, I, OA, E, A, F> Parser<'src, I, (), E> for TryIterConfigure<A, F, OA>where
A: ConfigIterParser<'src, I, OA, E>,
F: Fn(A::Config, &E::Context, I::Span) -> Result<A::Config, E::Error>,
I: Input<'src>,
E: ParserExtra<'src, I>,
impl<'src, I, OA, U, E, A, F> Parser<'src, I, U, E> for Validate<A, OA, F>
impl<'src, P, I, O, E> Parser<'src, I, Vec<O>, E> for Set<Vec<P>>
impl<'src, P, I, O, E, const N: usize> Parser<'src, I, [O; N], E> for Set<[P; N]>
impl<'src, S, I, E> Parser<'src, I, &'src S, E> for Regex<I, E>
regex only.impl<'src, const F: u128, I, O, E> Parser<'src, I, O, E> for Number<F, I, O, E>where
O: FromLexical,
I: SliceInput<'src, Cursor = usize>,
<I as SliceInput<'src>>::Slice: AsRef<[u8]>,
E: ParserExtra<'src, I>,
E::Error: LabelError<'src, I, ExpectedNumber>,
lexical-numbers only.