Struct re_set::state::StateMachine
source · pub struct StateMachine { /* private fields */ }Expand description
A state machine that can be used to match a regex.
Implementations§
source§impl StateMachine
impl StateMachine
sourcepub fn parse_inst(
&mut self,
position: usize,
program: &Program
) -> Vec<(usize, Vec<StepCase>)> ⓘ
pub fn parse_inst( &mut self, position: usize, program: &Program ) -> Vec<(usize, Vec<StepCase>)> ⓘ
Parse a regex program into a state machine.
Panics
Panics if the program contains a [Inst::EmptyLook] instruction.
pub fn end_patterns(self) -> HashMap<usize, usize>
pub fn extend_steps( &mut self, steps: Vec<(usize, Vec<StepCase>)> ) -> Vec<(usize, Vec<StepCase>)> ⓘ
Trait Implementations§
source§impl Default for StateMachine
impl Default for StateMachine
source§fn default() -> StateMachine
fn default() -> StateMachine
Returns the “default value” for a type. Read more