pub struct Dfa { /* private fields */ }Implementations§
Source§impl Dfa
impl Dfa
pub const fn new(atn_start_state: usize, decision: usize) -> Self
pub const 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 fn states(&self) -> &[DfaState]
pub const fn start_state(&self) -> Option<usize>
pub const fn set_start_state(&mut self, state_number: usize)
Sourcepub const fn is_dirty(&self) -> bool
pub const fn is_dirty(&self) -> bool
Whether this DFA learned any new state/edge/start since it was created or last cleared. The shared-cache merge uses this to skip untouched DFAs.
Sourcepub const fn clear_dirty(&mut self)
pub const fn clear_dirty(&mut self)
Clears the dirty flag, marking the current contents as the clean baseline (called after publishing to / cloning from the shared cache).
pub const fn is_precedence_dfa(&self) -> bool
pub fn set_precedence_dfa(&mut self, precedence_dfa: bool)
pub fn precedence_start_state(&self, precedence: usize) -> Option<usize>
pub fn set_precedence_start_state( &mut self, precedence: usize, state_number: usize, )
Sourcepub fn add_state(&mut self, state: DfaState) -> usize
pub fn add_state(&mut self, state: DfaState) -> usize
Inserts a DFA state or returns the existing state number for an equivalent ATN configuration set.
pub fn state(&self, state_number: usize) -> Option<&DfaState>
pub fn state_mut(&mut self, state_number: usize) -> Option<&mut DfaState>
Trait Implementations§
impl Eq for Dfa
impl StructuralPartialEq for Dfa
Auto Trait Implementations§
impl !Send for Dfa
impl !Sync for Dfa
impl Freeze for Dfa
impl RefUnwindSafe for Dfa
impl Unpin for Dfa
impl UnsafeUnpin for Dfa
impl UnwindSafe for Dfa
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