pub struct WorkingNFA { /* private fields */ }Expand description
Each NFA has one start state (0) and one accept state (states.len() - 1)
Implementations§
Source§impl WorkingNFA
impl WorkingNFA
Sourcepub fn build(tree: &SimplifiedTreeNode) -> WorkingNFA
pub fn build(tree: &SimplifiedTreeNode) -> WorkingNFA
Recursively builds an inefficient but valid NFA based loosely on Thompson’s Algorithm.
Should be optimized using WorkingNFA::optimize_pass
pub fn new(tree: &SimplifiedTreeNode) -> WorkingNFA
Sourcepub fn num_capture_groups(&self) -> usize
pub fn num_capture_groups(&self) -> usize
Finds the number of capture groups in this NFA
Sourcepub fn capture_group_is_optional(&self, group_num: usize) -> bool
pub fn capture_group_is_optional(&self, group_num: usize) -> bool
Returns whether each there is any matching path where the capture group is unused
Trait Implementations§
Source§impl Clone for WorkingNFA
impl Clone for WorkingNFA
Source§fn clone(&self) -> WorkingNFA
fn clone(&self) -> WorkingNFA
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkingNFA
impl Debug for WorkingNFA
Auto Trait Implementations§
impl Freeze for WorkingNFA
impl RefUnwindSafe for WorkingNFA
impl Send for WorkingNFA
impl Sync for WorkingNFA
impl Unpin for WorkingNFA
impl UnwindSafe for WorkingNFA
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