[−][src]Trait rcombinators::parser::Parser
Parser is the central trait of rcombinators
. Every object that can convert input into a Rust
value implements this trait.
For example, the Int32
parser parses a 32 bit signed integer,
the whitespace
parser consumes whitespace, and the Sequence
combinator runs a sequence of
sub-parser, succeeding only if every parser succeeds:
use rcombinators::combinators; use rcombinators::primitives; use rcombinators::ParseState; use rcombinators::Parser; let mut ps = ParseState::new("123 456"); let mut parser = combinators::Sequence::new((primitives::Int32::new(), primitives::whitespace(), primitives::Int32::new())); assert_eq!(Ok((123, (), 456)), parser.parse(&mut ps));
Associated Types
type Result
Required methods
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
parse consumes input from st
and returns a result or an error.
NOTE: This could be generalized to apply to any item yielded by ParseState.
Provided methods
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
apply
transforms the result of this parser using a Transform combinator.
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
Self: Sized,
then
attempts to parse input, and if it succeeds, executes parser p
, only returning
p
's result. This is useful for chaining parsers of which the results are not need.
Implementors
impl Parser for Nothing
[src]
type Result = ()
fn parse(
&mut self,
_: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
_: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl Parser for OneOf
[src]
type Result = char
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl Parser for StringParser
[src]
type Result = String
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<A: Parser, B: Parser> Parser for Then<A, B>
[src]
type Result = B::Result
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<IType: Default + FromStr<Err = ParseIntError> + TryFrom<i8>> Parser for Int<IType>
[src]
type Result = IType
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>> Parser for PartialSequence<(P0, P1)>
[src]
type Result = (Option<P0::Result>, Option<P1::Result>)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>> Parser for Sequence<(P0, P1)>
[src]
type Result = (P0::Result, P1::Result)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>> Parser for PartialSequence<(P0, P1, P2)>
[src]
type Result = (Option<P0::Result>, Option<P1::Result>, Option<P2::Result>)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>> Parser for Sequence<(P0, P1, P2)>
[src]
type Result = (P0::Result, P1::Result, P2::Result)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>> Parser for PartialSequence<(P0, P1, P2, P3)>
[src]
type Result = (Option<P0::Result>, Option<P1::Result>, Option<P2::Result>, Option<P3::Result>)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>> Parser for Sequence<(P0, P1, P2, P3)>
[src]
type Result = (P0::Result, P1::Result, P2::Result, P3::Result)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>> Parser for PartialSequence<(P0, P1, P2, P3, P4)>
[src]
type Result = (Option<P0::Result>, Option<P1::Result>, Option<P2::Result>, Option<P3::Result>, Option<P4::Result>)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>> Parser for Sequence<(P0, P1, P2, P3, P4)>
[src]
type Result = (P0::Result, P1::Result, P2::Result, P3::Result, P4::Result)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>, P5: Parser<Result = impl Default>> Parser for PartialSequence<(P0, P1, P2, P3, P4, P5)>
[src]
type Result = (Option<P0::Result>, Option<P1::Result>, Option<P2::Result>, Option<P3::Result>, Option<P4::Result>, Option<P5::Result>)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>, P5: Parser<Result = impl Default>> Parser for Sequence<(P0, P1, P2, P3, P4, P5)>
[src]
type Result = (P0::Result, P1::Result, P2::Result, P3::Result, P4::Result, P5::Result)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>, P5: Parser<Result = impl Default>, P6: Parser<Result = impl Default>> Parser for PartialSequence<(P0, P1, P2, P3, P4, P5, P6)>
[src]
type Result = (Option<P0::Result>, Option<P1::Result>, Option<P2::Result>, Option<P3::Result>, Option<P4::Result>, Option<P5::Result>, Option<P6::Result>)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>, P5: Parser<Result = impl Default>, P6: Parser<Result = impl Default>> Parser for Sequence<(P0, P1, P2, P3, P4, P5, P6)>
[src]
type Result = (P0::Result, P1::Result, P2::Result, P3::Result, P4::Result, P5::Result, P6::Result)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>, P5: Parser<Result = impl Default>, P6: Parser<Result = impl Default>, P7: Parser<Result = impl Default>> Parser for PartialSequence<(P0, P1, P2, P3, P4, P5, P6, P7)>
[src]
type Result = (Option<P0::Result>, Option<P1::Result>, Option<P2::Result>, Option<P3::Result>, Option<P4::Result>, Option<P5::Result>, Option<P6::Result>, Option<P7::Result>)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>, P5: Parser<Result = impl Default>, P6: Parser<Result = impl Default>, P7: Parser<Result = impl Default>> Parser for Sequence<(P0, P1, P2, P3, P4, P5, P6, P7)>
[src]
type Result = (P0::Result, P1::Result, P2::Result, P3::Result, P4::Result, P5::Result, P6::Result, P7::Result)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>, P5: Parser<Result = impl Default>, P6: Parser<Result = impl Default>, P7: Parser<Result = impl Default>, P8: Parser<Result = impl Default>> Parser for PartialSequence<(P0, P1, P2, P3, P4, P5, P6, P7, P8)>
[src]
type Result = (Option<P0::Result>, Option<P1::Result>, Option<P2::Result>, Option<P3::Result>, Option<P4::Result>, Option<P5::Result>, Option<P6::Result>, Option<P7::Result>, Option<P8::Result>)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>, P5: Parser<Result = impl Default>, P6: Parser<Result = impl Default>, P7: Parser<Result = impl Default>, P8: Parser<Result = impl Default>> Parser for Sequence<(P0, P1, P2, P3, P4, P5, P6, P7, P8)>
[src]
type Result = (P0::Result, P1::Result, P2::Result, P3::Result, P4::Result, P5::Result, P6::Result, P7::Result, P8::Result)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>, P5: Parser<Result = impl Default>, P6: Parser<Result = impl Default>, P7: Parser<Result = impl Default>, P8: Parser<Result = impl Default>, P9: Parser<Result = impl Default>> Parser for PartialSequence<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)>
[src]
type Result = (Option<P0::Result>, Option<P1::Result>, Option<P2::Result>, Option<P3::Result>, Option<P4::Result>, Option<P5::Result>, Option<P6::Result>, Option<P7::Result>, Option<P8::Result>, Option<P9::Result>)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>, P2: Parser<Result = impl Default>, P3: Parser<Result = impl Default>, P4: Parser<Result = impl Default>, P5: Parser<Result = impl Default>, P6: Parser<Result = impl Default>, P7: Parser<Result = impl Default>, P8: Parser<Result = impl Default>, P9: Parser<Result = impl Default>> Parser for Sequence<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)>
[src]
type Result = (P0::Result, P1::Result, P2::Result, P3::Result, P4::Result, P5::Result, P6::Result, P7::Result, P8::Result, P9::Result)
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P0: Parser<Result = R>, P1: Parser<Result = R>> Parser for Alternative<(P0, P1)>
[src]
type Result = R
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P0: Parser<Result = R>, P1: Parser<Result = R>, P2: Parser<Result = R>> Parser for Alternative<(P0, P1, P2)>
[src]
type Result = R
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P0: Parser<Result = R>, P1: Parser<Result = R>, P2: Parser<Result = R>, P3: Parser<Result = R>> Parser for Alternative<(P0, P1, P2, P3)>
[src]
type Result = R
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P0: Parser<Result = R>, P1: Parser<Result = R>, P2: Parser<Result = R>, P3: Parser<Result = R>, P4: Parser<Result = R>> Parser for Alternative<(P0, P1, P2, P3, P4)>
[src]
type Result = R
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P0: Parser<Result = R>, P1: Parser<Result = R>, P2: Parser<Result = R>, P3: Parser<Result = R>, P4: Parser<Result = R>, P5: Parser<Result = R>> Parser for Alternative<(P0, P1, P2, P3, P4, P5)>
[src]
type Result = R
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P0: Parser<Result = R>, P1: Parser<Result = R>, P2: Parser<Result = R>, P3: Parser<Result = R>, P4: Parser<Result = R>, P5: Parser<Result = R>, P6: Parser<Result = R>> Parser for Alternative<(P0, P1, P2, P3, P4, P5, P6)>
[src]
type Result = R
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P0: Parser<Result = R>, P1: Parser<Result = R>, P2: Parser<Result = R>, P3: Parser<Result = R>, P4: Parser<Result = R>, P5: Parser<Result = R>, P6: Parser<Result = R>, P7: Parser<Result = R>> Parser for Alternative<(P0, P1, P2, P3, P4, P5, P6, P7)>
[src]
type Result = R
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P0: Parser<Result = R>, P1: Parser<Result = R>, P2: Parser<Result = R>, P3: Parser<Result = R>, P4: Parser<Result = R>, P5: Parser<Result = R>, P6: Parser<Result = R>, P7: Parser<Result = R>, P8: Parser<Result = R>> Parser for Alternative<(P0, P1, P2, P3, P4, P5, P6, P7, P8)>
[src]
type Result = R
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P0: Parser<Result = R>, P1: Parser<Result = R>, P2: Parser<Result = R>, P3: Parser<Result = R>, P4: Parser<Result = R>, P5: Parser<Result = R>, P6: Parser<Result = R>, P7: Parser<Result = R>, P8: Parser<Result = R>, P9: Parser<Result = R>> Parser for Alternative<(P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)>
[src]
type Result = R
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P: Parser<Result = R>> Parser for Ignore<P>
[src]
type Result = ()
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P: Parser<Result = R>> Parser for Maybe<P>
[src]
type Result = Option<R>
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P: Parser<Result = R>> Parser for Repeat<P>
[src]
type Result = Vec<R>
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, P: Parser<Result = R>, F: FnMut() -> P> Parser for Lazy<P, F>
[src]
type Result = R
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,
impl<R, R2, P: Parser<Result = R>, F: Fn(R) -> ParseResult<R2>> Parser for Transform<R, R2, P, F>
[src]
type Result = R2
fn parse(
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
[src]
&mut self,
st: &mut ParseState<impl Iterator<Item = char>>
) -> ParseResult<Self::Result>
fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
[src]
self,
f: F
) -> Transform<Self::Result, R2, Self, F> where
Self: Sized,
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
Self: Sized,
[src]
Self: Sized,