pub struct Parser<'a, StorageT: 'a + Eq + Hash, ActionT: 'a> { /* fields omitted */ }
Start parsing text at laidx
(using the lexeme in lexeme_prefix
, if it is not None
,
as the first lexeme) up to (but excluding) end_laidx
(if it's specified). Parsing
continues as long as possible (assuming that any errors encountered can be recovered from)
unless end_laidx
is None
, at which point this function returns as soon as it
encounters an error.
Note that if lexeme_prefix
is specified, laidx
will still be incremented, and thus
end_laidx
must be set to laidx + 1
in order that the parser doesn't skip the real
lexeme at position laidx
.
Return Some(value)
if the parse reached an accept state (i.e. all the input was consumed,
possibly after making repairs) or None
(i.e. some of the input was not consumed, even
after possibly making repairs) otherwise.
Parse from laidx
up to (but excluding) end_laidx
mutating pstack
as parsing occurs.
Returns the index of the token it parsed up to (by definition <= end_laidx: can be less if
the input is < end_laidx, or if an error is encountered). Does not do any form of error
recovery.
impl<'a, StorageT, ActionT> !Send for Parser<'a, StorageT, ActionT> | |
impl<'a, StorageT, ActionT> !Sync for Parser<'a, StorageT, ActionT> | |
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
impl<T, U> TryInto for T where U: TryFrom<T>, | |
type Err = <U as TryFrom<T>>::Err