Trait mpl::parse::Parse [−][src]
pub trait Parse<'input, T, V, S, P, R, O = ()>: Input where
T: Terminal<'input, Self, V, S, P, O>,
V: Variable,
S: Span<Self, P>,
P: Position,
R: Rules<T, V>,
O: Output<'input, Self, V, S>, { fn minimal_parse(
&'input self,
rules: &R,
start_variable: &V,
all_of_the_span: &S
) -> Result<AST<V, S, O>, AST<V, S, O>> { ... } fn to_epsilon_ast(
&'input self,
pos: P
) -> Result<AST<V, S, O>, AST<V, S, O>> { ... } fn to_failed_ast(&'input self, pos: P) -> Result<AST<V, S, O>, AST<V, S, O>> { ... } fn to_any_ast(
&'input self,
pos: P,
max_pos: &P,
n: usize
) -> Result<AST<V, S, O>, AST<V, S, O>> { ... } fn to_all_ast(
&'input self,
pos: P,
max_pos: P
) -> Result<AST<V, S, O>, AST<V, S, O>> { ... } fn eval_terminal_symbol(
&'input self,
terminal_symbol: &TerminalSymbol<T>,
pos: P,
max_pos: &P
) -> Result<AST<V, S, O>, AST<V, S, O>> { ... } fn eval(
&'input self,
pos: &P,
rules: &R,
variable: &V,
max_pos: &P
) -> Result<AST<V, S, O>, AST<V, S, O>> { ... } }
Expand description
Types that can be parsed.
T is terminal symbols. O is output type. V is (enum of) Variables. S is Span. P is position.
Provided methods
fn to_epsilon_ast(&'input self, pos: P) -> Result<AST<V, S, O>, AST<V, S, O>>
fn to_failed_ast(&'input self, pos: P) -> Result<AST<V, S, O>, AST<V, S, O>>
fn to_all_ast(
&'input self,
pos: P,
max_pos: P
) -> Result<AST<V, S, O>, AST<V, S, O>>
fn eval_terminal_symbol(
&'input self,
terminal_symbol: &TerminalSymbol<T>,
pos: P,
max_pos: &P
) -> Result<AST<V, S, O>, AST<V, S, O>>
Implementations on Foreign Types
impl<'input, T, V, P, L, R, O> Parse<'input, SliceTerminal<'input, T>, V, StartAndLenSpan<P, L>, P, R, O> for [T] where
T: PartialEq,
V: Variable,
P: Start<Self, L>,
L: Len<Self, P>,
R: Rules<SliceTerminal<'input, T>, V>,
O: Output<'input, Self, V, StartAndLenSpan<P, L>>,
T represents the element type.
impl<'input, V, P, L, R, O> Parse<'input, StrTerminal<'input>, V, StartAndLenSpan<P, L>, P, R, O> for str where
V: Variable,
P: Start<Self, L>,
L: Len<Self, P>,
R: Rules<StrTerminal<'input>, V>,
O: Output<'input, Self, V, StartAndLenSpan<P, L>>,
impl<'input, V, P, L, R, O> Parse<'input, U8SliceTerminal<'input>, V, StartAndLenSpan<P, L>, P, R, O> for [u8] where
V: Variable,
P: Start<Self, L>,
L: Len<Self, P>,
R: Rules<U8SliceTerminal<'input>, V>,
O: Output<'input, Self, V, StartAndLenSpan<P, L>>,