Trait rusty_parser::Parser

source ·
pub trait Parser<It>{
    type Output: Tuple;

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

    // Provided method
    fn match_pattern(&self, it: It) -> ParseResult<(), It> { ... }
}
Expand description

Parser trait. Every parser object must implement this trait.

for crate::parse(), crate::match_pattern() functions

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>

Implementations on Foreign Types§

source§

impl<ParserType, It> Parser<It> for Rc<ParserType>
where It: InputIteratorTrait, ParserType: Parser<It>,

§

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

source§

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

source§

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

source§

impl<ParserType, It> Parser<It> for RefCell<ParserType>
where It: InputIteratorTrait, ParserType: Parser<It>,

§

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

source§

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

source§

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

Implementors§

source§

impl<'a, Output> Parser<Chars<'a>> for DynBoxChars<Output>
where Output: Tuple,

§

type Output = Output

source§

impl<'a, Output, T> Parser<Cloned<Iter<'a, T>>> for DynBoxSlice<Output, T>
where Output: Tuple, T: Clone,

§

type Output = Output

source§

impl<'a, Output, T> Parser<Copied<Iter<'a, T>>> for DynBoxSliceCopied<Output, T>
where Output: Tuple, T: Copy,

§

type Output = Output

source§

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

§

type Output = Output

source§

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

§

type Output = Output