Trait rusty_parser::Parser

source ·
pub trait Parser<It>
where It: Iterator + Clone,
{ type Output: Tuple; // Required method fn parse(&self, it: It) -> ParseResult<Self::Output, It>; // Provided methods fn match_pattern(&self, it: It) -> ParseResult<(), It> { ... } fn map<ClosureType, ClosureOutput>( self, map: ClosureType ) -> MapParser<Self, ClosureType, ClosureOutput, It> where Self: Sized, ClosureType: Fn(Self::Output) -> ClosureOutput, ClosureOutput: Tuple { ... } fn seq<RhsParser>(self, rhs: RhsParser) -> SeqParser<Self, RhsParser, It> where Self: Sized, RhsParser: Parser<It>, Self::Output: AppendTupleToTuple<<RhsParser as Parser<It>>::Output>, <Self::Output as AppendTupleToTuple<<RhsParser as Parser<It>>::Output>>::Output: Tuple { ... } fn or_<RhsParser>(self, rhs: RhsParser) -> OrParser<Self, RhsParser, It> where Self: Sized, RhsParser: Parser<It, Output = Self::Output> { ... } fn repeat<RangeType, Idx>( self, range: RangeType ) -> RepeatParser<Self, RangeType, Idx, It> where Self: Sized, RangeType: RangeBounds<Idx>, Idx: PartialOrd + PartialEq + PartialOrd<i32> + PartialEq<i32>, i32: PartialOrd + PartialEq + PartialOrd<Idx> + PartialEq<Idx>, Self::Output: VectorOutputSpecialize, <Self::Output as VectorOutputSpecialize>::Output: Tuple { ... } fn void_(self) -> VoidParser<Self, It> where Self: Sized { ... } fn ref_<'a>(&'a self) -> ReferenceParser<'a, Self, It> where Self: Sized { ... } fn boxed<'a>(self) -> BoxedParser<'a, Self::Output, It> where Self: Sized + 'a { ... } fn refcelled(self) -> RefCelledParser<Self, It> where Self: Sized { ... } fn rced(self) -> RcedParser<Self, It> where Self: Sized { ... } }

Required Associated Types§

source

type Output: Tuple

Required Methods§

source

fn parse(&self, it: It) -> ParseResult<Self::Output, It>

Provided Methods§

source

fn match_pattern(&self, it: It) -> ParseResult<(), It>

source

fn map<ClosureType, ClosureOutput>( self, map: ClosureType ) -> MapParser<Self, ClosureType, ClosureOutput, It>
where Self: Sized, ClosureType: Fn(Self::Output) -> ClosureOutput, ClosureOutput: Tuple,

source

fn seq<RhsParser>(self, rhs: RhsParser) -> SeqParser<Self, RhsParser, It>
where Self: Sized, RhsParser: Parser<It>, Self::Output: AppendTupleToTuple<<RhsParser as Parser<It>>::Output>, <Self::Output as AppendTupleToTuple<<RhsParser as Parser<It>>::Output>>::Output: Tuple,

source

fn or_<RhsParser>(self, rhs: RhsParser) -> OrParser<Self, RhsParser, It>
where Self: Sized, RhsParser: Parser<It, Output = Self::Output>,

source

fn repeat<RangeType, Idx>( self, range: RangeType ) -> RepeatParser<Self, RangeType, Idx, It>
where Self: Sized, RangeType: RangeBounds<Idx>, Idx: PartialOrd + PartialEq + PartialOrd<i32> + PartialEq<i32>, i32: PartialOrd + PartialEq + PartialOrd<Idx> + PartialEq<Idx>, Self::Output: VectorOutputSpecialize, <Self::Output as VectorOutputSpecialize>::Output: Tuple,

source

fn void_(self) -> VoidParser<Self, It>
where Self: Sized,

source

fn ref_<'a>(&'a self) -> ReferenceParser<'a, Self, It>
where Self: Sized,

source

fn boxed<'a>(self) -> BoxedParser<'a, Self::Output, It>
where Self: Sized + 'a,

source

fn refcelled(self) -> RefCelledParser<Self, It>
where Self: Sized,

source

fn rced(self) -> RcedParser<Self, It>
where Self: Sized,

Implementors§

source§

impl<'a, Output, It> Parser<It> for BoxedParser<'a, Output, It>
where It: Iterator + Clone, Output: Tuple,

§

type Output = Output

source§

impl<Output, CharType, It> Parser<It> for DictBTreeParser<Output, CharType, It>
where Output: Clone + Tuple, CharType: Ord, It: Iterator<Item = CharType> + Clone,

§

type Output = Output

source§

impl<Output, CharType, It> Parser<It> for DictHashMapParser<Output, CharType, It>
where It: Iterator<Item = CharType> + Clone, CharType: Hash + Eq, Output: Clone + Tuple,

§

type Output = Output

source§

impl<ParserType, It> Parser<It> for RcedParser<ParserType, It>
where It: Iterator + Clone, ParserType: Parser<It>,

§

type Output = <ParserType as Parser<It>>::Output

source§

impl<ParserType, It> Parser<It> for RefCelledParser<ParserType, It>
where It: Iterator + Clone, ParserType: Parser<It>,

§

type Output = <ParserType as Parser<It>>::Output