pub struct LRParser<'i, C: Context<'i, I, S, TK>, S: State, P, TK: Default, NTK, D: ParserDefinition<S, P, TK, NTK>, L: Lexer<'i, C, S, TK, Input = I>, B, I: Input + ?Sized> { /* private fields */ }
Expand description
An implementation of LR parsing
Implementations§
Trait Implementations§
source§impl<'i, C, S, P, I, TK, NTK, D, L, B> Parser<'i, I, C, S, TK> for LRParser<'i, C, S, P, TK, NTK, D, L, B, I>
impl<'i, C, S, P, I, TK, NTK, D, L, B> Parser<'i, I, C, S, TK> for LRParser<'i, C, S, P, TK, NTK, D, L, B, I>
type Output = <B as Builder>::Output
source§fn parse(&self, input: &'i I) -> Result<Self::Output>
fn parse(&self, input: &'i I) -> Result<Self::Output>
Parse the given input and produce the result. The output type is set by
the parser implementers and it is usually defined by the builder if the
building is done during the parse process.
source§fn parse_with_context(
&self,
context: &mut C,
input: &'i I
) -> Result<Self::Output>
fn parse_with_context( &self, context: &mut C, input: &'i I ) -> Result<Self::Output>
Parse with the given context which has information about the current
parsing state (e.g. position, location). Used in situation when we need
to continue parsing from a specific state, like in parsing the layout
from the current location.
source§fn parse_file<'a, F: AsRef<Path>>(&'a mut self, file: F) -> Result<Self::Output>where
'a: 'i,
fn parse_file<'a, F: AsRef<Path>>(&'a mut self, file: F) -> Result<Self::Output>where
'a: 'i,
A convenience method for loading the content from the given file and
calling
parse
. The parser will own the content being parsed and thus
has to outlive Self::Output
if it borrows from the content loaded from
the file.Auto Trait Implementations§
impl<'i, C, S, P, TK, NTK, D, L, B, I> !RefUnwindSafe for LRParser<'i, C, S, P, TK, NTK, D, L, B, I>
impl<'i, C, S, P, TK, NTK, D, L, B, I> !Send for LRParser<'i, C, S, P, TK, NTK, D, L, B, I>
impl<'i, C, S, P, TK, NTK, D, L, B, I> !Sync for LRParser<'i, C, S, P, TK, NTK, D, L, B, I>
impl<'i, C, S, P, TK, NTK, D, L, B, I: ?Sized> Unpin for LRParser<'i, C, S, P, TK, NTK, D, L, B, I>
impl<'i, C, S, P, TK, NTK, D, L, B, I: ?Sized> UnwindSafe for LRParser<'i, C, S, P, TK, NTK, D, L, B, I>where
B: UnwindSafe,
D: RefUnwindSafe,
I: UnwindSafe,
L: RefUnwindSafe,
NTK: UnwindSafe,
P: UnwindSafe,
S: UnwindSafe,
<I as ToOwned>::Owned: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more