Struct pom::parser::Parser [] [src]

pub struct Parser<'a, I, O> { /* fields omitted */ }

Parser combinator.

Methods

impl<'a, I, O> Parser<'a, I, O>
[src]

Create new parser.

Apply the parser to parse input.

Convert parser result to desired value.

Convert parser result to desired value, fail in case of conversion error.

Get input position after matching parser.

Collect all matched input symbols.

Discard parser output.

Make parser optional.

p.repeat(5) repeat p exactly 5 times p.repeat(0..) repeat p zero or more times p.repeat(1..) repeat p one or more times p.repeat(1..4) match p at least 1 and at most 3 times

Give parser a name to identify parsing errors.

Trait Implementations

impl<'b, 'a: 'b, I: Copy + 'static, O: 'static, U: 'static> Add<Parser<'b, I, U>> for Parser<'a, I, O>
[src]

Sequence reserve value

The resulting type after applying the + operator

The method for the + operator

impl<'a, 'b: 'a, I: Copy + 'static, O: 'static, U: 'static> Sub<Parser<'b, I, U>> for Parser<'a, I, O>
[src]

Sequence discard second value

The resulting type after applying the - operator

The method for the - operator

impl<'b, 'a: 'b, I: Copy + 'static, O: 'static, U: 'static> Mul<Parser<'b, I, U>> for Parser<'a, I, O>
[src]

Sequence discard first value

The resulting type after applying the * operator

The method for the * operator

impl<'b, 'a: 'b, I: Copy + 'static, O: 'static, U: 'static, F: Fn(O) -> Parser<'b, I, U> + 'b> Shr<F> for Parser<'a, I, O>
[src]

Chain two passers where the second parser depends on the first's result.

The resulting type after applying the >> operator

The method for the >> operator

impl<'a, I: 'static, O: 'static> BitOr for Parser<'a, I, O>
[src]

Ordered choice

The resulting type after applying the | operator

The method for the | operator

impl<'a, I: Copy + 'static, O: 'static> Neg for Parser<'a, I, O>
[src]

And predicate

The resulting type after applying the - operator

The method for the unary - operator

impl<'a, I: Copy + 'static, O: 'static> Not for Parser<'a, I, O>
[src]

Not predicate

The resulting type after applying the ! operator

The method for the unary ! operator