[][src]Trait rcombinators::parser::Parser

pub trait Parser {
    type Result;
    fn parse(
        &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
, { ... }
fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P>
    where
        Self: Sized
, { ... } }

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

Loading content...

Required methods

fn parse(
    &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.

Loading content...

Provided methods

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    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

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.

Loading content...

Implementors

impl Parser for Nothing[src]

type Result = ()

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

impl Parser for OneOf[src]

type Result = char

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

impl Parser for StringParser[src]

type Result = String

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

impl<A: Parser, B: Parser> Parser for Then<A, B>[src]

type Result = B::Result

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

impl<IType: Default + FromStr<Err = ParseIntError> + TryFrom<i8>> Parser for Int<IType>[src]

type Result = IType

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

impl<P0: Parser<Result = impl Default>, P1: Parser<Result = impl Default>> Parser for Sequence<(P0, P1)>[src]

type Result = (P0::Result, P1::Result)

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

impl<R, P0: Parser<Result = R>, P1: Parser<Result = R>> Parser for Alternative<(P0, P1)>[src]

type Result = R

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

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 apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

impl<R, P: Parser<Result = R>> Parser for Ignore<P>[src]

type Result = ()

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

impl<R, P: Parser<Result = R>> Parser for Maybe<P>[src]

type Result = Option<R>

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

impl<R, P: Parser<Result = R>> Parser for Repeat<P>[src]

type Result = Vec<R>

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

impl<R, P: Parser<Result = R>, F: FnMut() -> P> Parser for Lazy<P, F>[src]

type Result = R

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

impl<R, R2, P: Parser<Result = R>, F: Fn(R) -> ParseResult<R2>> Parser for Transform<R, R2, P, F>[src]

type Result = R2

fn apply<R2, F: Fn(Self::Result) -> ParseResult<R2>>(
    self,
    f: F
) -> Transform<Self::Result, R2, Self, F> where
    Self: Sized
[src]

fn then<R2, P: Parser<Result = R2>>(self, p: P) -> Then<Self, P> where
    Self: Sized
[src]

Loading content...