Struct peresil::ParseMaster
[−]
[src]
pub struct ParseMaster<P, E> { // some fields omitted }
The main entrypoint to parsing.
This tracks the collection of outstanding errors and provides helper methods for parsing alternative paths and sequences of other parsers.
Methods
impl<'a, P, E> ParseMaster<P, E> where P: Point, E: Recoverable
[src]
fn new() -> ParseMaster<P, E>
fn alternate<'pm, T>(&'pm mut self) -> Alternate<'pm, P, T, E>
Run sub-parsers in order until one succeeds.
fn zero_or_more<F, T>(&mut self, point: P, parser: F) -> Progress<P, Vec<T>, E> where F: FnMut(&mut ParseMaster<P, E>, P) -> Progress<P, T, E>
Runs the parser until it fails.
If the parser fails due to a recoverable error, a collection of values will be returned and the point will be at the end of the last successful parse. If the error is not recoverable, the error will be passed through directly.
fn finish<T>(self, progress: Progress<P, T, E>) -> Progress<P, T, Vec<E>>
When parsing is complete, provide the final result and gain access to all failures.
Trait Implementations
impl<P: PartialEq, E: PartialEq> PartialEq for ParseMaster<P, E>
[src]
fn eq(&self, __arg_0: &ParseMaster<P, E>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ParseMaster<P, E>) -> bool
This method tests for !=
.