[−][src]Trait parser_fuck::Parser
Abstract Parser with chain call
Associated Types
type Output
Required methods
Loading content...Provided methods
fn map<U, F>(self, f: F) -> Map<Self, I, F> where
Self: Sized,
F: FnMut(Self::Output) -> U,
Self: Sized,
F: FnMut(Self::Output) -> U,
Map a Parser<Output = T>
to Parser<Output = U>
by applying a function to a contained value
fn and<B>(self, b: B) -> And<Self, B, I> where
Self: Sized,
B: Parser<I>,
Self: Sized,
B: Parser<I>,
Only pass if both subparsers pass
fn or<B>(self, b: B) -> Or<Self, B, I> where
Self: Sized,
B: Parser<I, Output = Self::Output>,
Self: Sized,
B: Parser<I, Output = Self::Output>,
Pass when any subparser passes
fn not(self) -> Not<Self, I> where
Self: Sized,
Self: Sized,
Pass if the subparser fail
fn many(self) -> Many<Self, I> where
Self: Sized,
Self: Sized,
*, >= 0
fn many1(self) -> Many<Self, I> where
Self: Sized,
Self: Sized,
+, >= 1
fn many_min(self, min: usize) -> Many<Self, I> where
Self: Sized,
Self: Sized,
{n,}, >= n
fn many_max(self, max: usize) -> Many<Self, I> where
Self: Sized,
Self: Sized,
{,m}, <= m
fn many1_max(self, max: usize) -> Many<Self, I> where
Self: Sized,
Self: Sized,
{1,m}, >= 1 && <= m
fn many_min_max(self, min: usize, max: usize) -> Many<Self, I> where
Self: Sized,
Self: Sized,
{n,m}, >= n && <= m
fn some(self, count: usize) -> Many<Self, I> where
Self: Sized,
Self: Sized,
{n}, == n
fn may(self) -> May<Self, I> where
Self: Sized,
Self: Sized,
?, 0 or 1
fn iter(self) -> Iter<Self, I> where
Self: Sized,
Self: Sized,
Continuously parse into iterators
fn and_then<U, F>(self, f: F) -> AndThen<Self, I, F> where
Self: Sized,
U: Parser<I>,
F: FnMut(Self::Output) -> U,
Self: Sized,
U: Parser<I>,
F: FnMut(Self::Output) -> U,
Fail if the subparser fail, otherwise calls f with the new Parser and parse the Parser
fn or_else<U, F>(self, f: F) -> OrElse<Self, I, F> where
Self: Sized,
U: Parser<I, Output = Self::Output>,
F: FnMut() -> U,
Self: Sized,
U: Parser<I, Output = Self::Output>,
F: FnMut() -> U,
Pass if subparser pass, otherwise calls f and parse the result Parser
fn or_trans<F>(self, f: F) -> OrTrans<Self, I, F> where
Self: Sized,
F: FnMut(I, Range<usize>) -> Self::Output,
Self: Sized,
F: FnMut(I, Range<usize>) -> Self::Output,
Pass if subparser pass, otherwise calls f with error point
fn dyns(self) -> Dyn<I, Self::Output> where
Self: Sized + 'static,
Self: Sized + 'static,
Wrap to dynamic
Implementors
impl<B: Parser<I>, I: TimeTravel, F> Parser<I> for OrTrans<B, I, F> where
F: FnMut(I, Range<usize>) -> B::Output,
[src]
F: FnMut(I, Range<usize>) -> B::Output,
impl<B: Parser<I>, I: TimeTravel, U, F> Parser<I> for AndThen<B, I, F> where
U: Parser<I>,
F: FnMut(B::Output) -> U,
[src]
U: Parser<I>,
F: FnMut(B::Output) -> U,
impl<B: Parser<I>, I: TimeTravel, U, F> Parser<I> for Map<B, I, F> where
F: FnMut(B::Output) -> U,
[src]
F: FnMut(B::Output) -> U,
impl<B: Parser<I>, I: TimeTravel, U, F> Parser<I> for OrElse<B, I, F> where
U: Parser<I, Output = B::Output>,
F: FnMut() -> U,
[src]
U: Parser<I, Output = B::Output>,
F: FnMut() -> U,
impl<I, F> Parser<I> for Satisfy<F, I> where
I: TimeTravel,
F: FnMut(I::Item) -> bool,
[src]
I: TimeTravel,
F: FnMut(I::Item) -> bool,
impl<I, U, F> Parser<I> for F where
I: TimeTravel,
F: Fn(I) -> Option<U>,
[src]
I: TimeTravel,
F: Fn(I) -> Option<U>,
impl<I: TimeTravel, A> Parser<I> for Many<A, I> where
A: Parser<I>,
[src]
A: Parser<I>,
impl<I: TimeTravel, A> Parser<I> for May<A, I> where
A: Parser<I>,
[src]
A: Parser<I>,
impl<I: TimeTravel, A> Parser<I> for Not<A, I> where
A: Parser<I>,
[src]
A: Parser<I>,
impl<I: TimeTravel, A, B> Parser<I> for And<A, B, I> where
A: Parser<I>,
B: Parser<I>,
[src]
A: Parser<I>,
B: Parser<I>,
impl<I: TimeTravel, A, B> Parser<I> for Or<A, B, I> where
A: Parser<I>,
B: Parser<I, Output = A::Output>,
[src]
A: Parser<I>,
B: Parser<I, Output = A::Output>,
impl<I: TimeTravel, A: Clone> Parser<I> for Iter<A, I> where
A: Parser<I>,
[src]
A: Parser<I>,
impl<I: TimeTravel, O> Parser<I> for Dyn<I, O>
[src]
impl<I: TimeTravel, T> Parser<I> for One<T> where
I::Item: PartialEq<T>,
[src]
I::Item: PartialEq<T>,
impl<I: TimeTravel, T> Parser<I> for Sub<T> where
I::Item: PartialEq<T>,
[src]
I::Item: PartialEq<T>,