pub struct GlrParser<'i, S: State, L: Lexer<'i, GssHead<'i, I, S, TK>, S, TK, Input = I>, P, TK: Default, NTK, D: ParserDefinition<S, P, TK, NTK> + 'static, I: Input + ?Sized, B> { /* private fields */ }
Expand description
An implementation of Right-Nulled GLR parsing (RNGLR)
Implementations§
Trait Implementations§
source§impl<'i, I, S, TK, NTK, L, P, D, B> Parser<'i, I, GssHead<'i, I, S, TK>, S, TK> for GlrParser<'i, S, L, P, TK, NTK, D, I, B>
impl<'i, I, S, TK, NTK, L, P, D, B> Parser<'i, I, GssHead<'i, I, S, TK>, S, TK> for GlrParser<'i, S, L, P, TK, NTK, D, I, B>
type Output = Forest<'i, I, P, TK>
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 GssHead<'i, I, S, TK>,
input: &'i I
) -> Result<Self::Output>
fn parse_with_context( &self, context: &mut GssHead<'i, I, S, TK>, 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, S, L, P, TK, NTK, D, I, B> !RefUnwindSafe for GlrParser<'i, S, L, P, TK, NTK, D, I, B>
impl<'i, S, L, P, TK, NTK, D, I, B> !Send for GlrParser<'i, S, L, P, TK, NTK, D, I, B>
impl<'i, S, L, P, TK, NTK, D, I, B> !Sync for GlrParser<'i, S, L, P, TK, NTK, D, I, B>
impl<'i, S, L, P, TK, NTK, D, I: ?Sized, B> Unpin for GlrParser<'i, S, L, P, TK, NTK, D, I, B>
impl<'i, S, L, P, TK, NTK, D, I: ?Sized, B> UnwindSafe for GlrParser<'i, S, L, P, TK, NTK, D, I, B>where
B: UnwindSafe,
D: RefUnwindSafe,
I: UnwindSafe + RefUnwindSafe,
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