[−][src]Struct lrpar::RTParserBuilder
A run-time parser builder.
Methods
impl<'a, StorageT: 'static + Debug + Hash + PrimInt + Unsigned> RTParserBuilder<'a, StorageT> where
usize: AsPrimitive<StorageT>,
u32: AsPrimitive<StorageT>, [src]
usize: AsPrimitive<StorageT>,
u32: AsPrimitive<StorageT>,
pub fn new(
grm: &'a YaccGrammar<StorageT>,
sgraph: &'a StateGraph<StorageT>,
stable: &'a StateTable<StorageT>
) -> Self[src]
grm: &'a YaccGrammar<StorageT>,
sgraph: &'a StateGraph<StorageT>,
stable: &'a StateTable<StorageT>
) -> Self
Create a new run-time parser from a YaccGrammar, a StateGraph, and a StateTable.
pub fn recoverer(self, rk: RecoveryKind) -> Self[src]
Set the recoverer for this parser to rk.
pub fn term_costs(self, f: &'a dyn Fn(TIdx<StorageT>) -> u8) -> Self[src]
pub fn parse_generictree(
&self,
lexer: &dyn Lexer<StorageT>
) -> (Option<Node<StorageT>>, Vec<LexParseError<StorageT>>)[src]
&self,
lexer: &dyn Lexer<StorageT>
) -> (Option<Node<StorageT>>, Vec<LexParseError<StorageT>>)
Parse input, and (if possible) return a generic parse tree. See the arguments for
parse_actions for more details about the return value.
pub fn parse_noaction(
&self,
lexer: &dyn Lexer<StorageT>
) -> Vec<LexParseError<StorageT>>[src]
&self,
lexer: &dyn Lexer<StorageT>
) -> Vec<LexParseError<StorageT>>
Parse input, returning any errors found. See the arguments for
parse_actions for more details about the return value.
pub fn parse_actions<'input, ActionT: 'a>(
&self,
lexer: &'input (dyn Lexer<StorageT> + 'input),
actions: &[&dyn Fn(RIdx<StorageT>, &'input (dyn Lexer<StorageT> + 'input), (usize, usize), Drain<AStackType<ActionT, StorageT>>) -> ActionT]
) -> (Option<ActionT>, Vec<LexParseError<StorageT>>)[src]
&self,
lexer: &'input (dyn Lexer<StorageT> + 'input),
actions: &[&dyn Fn(RIdx<StorageT>, &'input (dyn Lexer<StorageT> + 'input), (usize, usize), Drain<AStackType<ActionT, StorageT>>) -> ActionT]
) -> (Option<ActionT>, Vec<LexParseError<StorageT>>)
Parse input, execute actions, and return the associated value (if possible) and/or any
lexing/parsing errors encountered. Note that the two parts of the (value, errors) return
pair are entirely independent: one can encounter errors without a value being produced
(None, [...]), errors and a value (Some(...), [...]), as well as a value and no errors
(Some(...), []). Errors are sorted by the position they were found in the input and can
be a mix of lexing and parsing errors.
Auto Trait Implementations
impl<'a, StorageT> !RefUnwindSafe for RTParserBuilder<'a, StorageT>
impl<'a, StorageT> !Send for RTParserBuilder<'a, StorageT>
impl<'a, StorageT> !Sync for RTParserBuilder<'a, StorageT>
impl<'a, StorageT> Unpin for RTParserBuilder<'a, StorageT> where
StorageT: Unpin,
StorageT: Unpin,
impl<'a, StorageT> !UnwindSafe for RTParserBuilder<'a, StorageT>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,