Struct lrpar::RTParserBuilder [−][src]
Expand description
A run-time parser builder.
Implementations
impl<'a, StorageT: 'static + Debug + Hash + PrimInt + Unsigned> RTParserBuilder<'a, StorageT> where
usize: AsPrimitive<StorageT>,
u32: AsPrimitive<StorageT>,
[src]
impl<'a, StorageT: 'static + Debug + Hash + PrimInt + Unsigned> RTParserBuilder<'a, StorageT> where
usize: AsPrimitive<StorageT>,
u32: AsPrimitive<StorageT>,
[src]pub fn new(
grm: &'a YaccGrammar<StorageT>,
stable: &'a StateTable<StorageT>
) -> Self
[src]
pub fn new(
grm: &'a YaccGrammar<StorageT>,
stable: &'a StateTable<StorageT>
) -> Self
[src]Create a new run-time parser from a YaccGrammar
, a StateGraph
, and a StateTable
.
pub fn recoverer(self, rk: RecoveryKind) -> Self
[src]
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 NonStreamingLexer<'_, StorageT>
) -> (Option<Node<StorageT>>, Vec<LexParseError<StorageT>>)
[src]
pub fn parse_generictree(
&self,
lexer: &dyn NonStreamingLexer<'_, StorageT>
) -> (Option<Node<StorageT>>, Vec<LexParseError<StorageT>>)
[src]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 NonStreamingLexer<'_, StorageT>
) -> Vec<LexParseError<StorageT>>
[src]
pub fn parse_noaction(
&self,
lexer: &dyn NonStreamingLexer<'_, StorageT>
) -> Vec<LexParseError<StorageT>>
[src]Parse input, returning any errors found. See the arguments for
parse_actions
for more details about the return value.
pub fn parse_actions<'b: 'a, 'input: 'b, ActionT: 'a>(
&self,
lexer: &'b dyn NonStreamingLexer<'input, StorageT>,
actions: &'a [&'a dyn Fn(RIdx<StorageT>, &'b dyn NonStreamingLexer<'input, StorageT>, Span, Drain<'_, AStackType<ActionT, StorageT>>) -> ActionT]
) -> (Option<ActionT>, Vec<LexParseError<StorageT>>)
[src]
pub fn parse_actions<'b: 'a, 'input: 'b, ActionT: 'a>(
&self,
lexer: &'b dyn NonStreamingLexer<'input, StorageT>,
actions: &'a [&'a dyn Fn(RIdx<StorageT>, &'b dyn NonStreamingLexer<'input, StorageT>, Span, Drain<'_, AStackType<ActionT, StorageT>>) -> ActionT]
) -> (Option<ActionT>, Vec<LexParseError<StorageT>>)
[src]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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more