Struct regex::pikevm::Fsm[][src]

pub struct Fsm<'r, I> {
    prog: &'r Program,
    stack: &'r mut Vec<FollowEpsilon>,
    input: I,
}

An NFA simulation matching engine.

Fields

The sequence of opcodes (among other things) that is actually executed.

The program may be byte oriented or Unicode codepoint oriented.

An explicit stack used for following epsilon transitions. (This is borrowed from the cache.)

The input to search.

Methods

impl<'r, I: Input> Fsm<'r, I>
[src]

Execute the NFA matching engine.

If there's a match, exec returns true and populates the given captures accordingly.

Step through the input, one token (byte or codepoint) at a time.

nlist is the set of states that will be processed on the next token in the input.

caps is the set of captures passed by the caller of the NFA. They are written to only when a match state is visited.

thread_caps is the set of captures set for the current NFA state, ip.

at and at_next are the current and next positions in the input. at or at_next may be EOF.

Follows epsilon transitions and adds them for processing to nlist, starting at and including ip.

A helper function for add that avoids excessive pushing to the stack.

Trait Implementations

impl<'r, I: Debug> Debug for Fsm<'r, I>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'r, I> Send for Fsm<'r, I> where
    I: Send

impl<'r, I> Sync for Fsm<'r, I> where
    I: Sync