pub struct ParserDfa { /* private fields */ }Expand description
Opaque learned parser DFA with split hot transition and cold ATN-config data.
Implementations§
Source§impl ParserDfa
impl ParserDfa
pub fn new(atn_start_state: usize, decision: usize) -> Self
pub fn with_max_token_type( atn_start_state: usize, decision: usize, max_token_type: i32, ) -> Self
pub const fn decision(&self) -> usize
pub const fn atn_start_state(&self) -> usize
pub const fn max_token_type(&self) -> i32
pub const fn state_count(&self) -> usize
pub const fn is_empty(&self) -> bool
pub fn states(&self) -> impl ExactSizeIterator<Item = ParserDfaStateView<'_>>
pub fn state(&self, id: DfaStateId) -> Option<ParserDfaStateView<'_>>
pub fn transitions(&self) -> impl Iterator<Item = DfaTransition> + '_
pub fn start_state(&self) -> Option<DfaStateId>
pub const fn is_precedence_dfa(&self) -> bool
pub fn precedence_start_state(&self, precedence: usize) -> Option<DfaStateId>
pub fn stats(&self) -> ParserDfaStats
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParserDfa
impl RefUnwindSafe for ParserDfa
impl Send for ParserDfa
impl Sync for ParserDfa
impl Unpin for ParserDfa
impl UnsafeUnpin for ParserDfa
impl UnwindSafe for ParserDfa
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