Struct combine_language::LanguageParser
[−]
[src]
pub struct LanguageParser<'a: 'b, 'b, I: 'b, T> where I: Stream<Item=char> {
// some fields omitted
}A language parser
Trait Implementations
impl<'a, 'b, I, O> Parser for LanguageParser<'a, 'b, I, O> where I: Stream<Item=char>[src]
type Output = O
The type which is returned if the parser is successful.
type Input = I
The type which is take as input for the parser. The type must implement the Stream trait which allows the parser to read item from the type. Read more
fn parse_lazy(&mut self, input: State<I>) -> ParseResult<O, I>
Specialized version of parse_state where the parser does not need to add an error to the ParseError when it does not consume any input before encountering the error. Instead the error can be added later through the add_error method Read more
fn add_error(&mut self, errors: &mut ParseError<I>)
Adds the first error that would normally be returned by this parser if it failed
fn parse(&mut self, input: Self::Input) -> Result<(Self::Output, Self::Input), ParseError<Self::Input>>
Entrypoint of the parser Takes some input and tries to parse it returning a ParseResult Read more
fn parse_state(&mut self, input: State<Self::Input>) -> Result<(Self::Output, Consumed<State<Self::Input>>), Consumed<ParseError<Self::Input>>>
Parses using the state input by calling Stream::uncons one or more times On success returns Ok((value, new_state)) on failure it returns Err(error) Read more