Lines Matching defs:next

116     /// given state `s` and byte `b`, the next state can be found at index
158 /// indexing to find the next state this allows us to avoid a multiplication
290 fn next(&mut self) -> Option<usize> {
352 /// state = state.next[i]
565 // si = current_state.next[current_byte]
572 // 1. This is an *online* DFA, so the current state's next list
574 // them. (They are then cached into the current state's next list
586 // 6. We can't actually do state.next[byte]. Instead, we have to do
587 // state.next[byte_classes[byte]], which permits us to keep the
588 // 'next' list very small.
613 // and `next_si` always represents the next state after the loop
848 /// next_si transitions to the next state, where the transition input
882 /// Computes the next state given the current state and the current input
948 // then it is the *next* DFA state that is marked as a match.
990 // matching a regex set, then make the next state contain the
1001 // next DFA state, so try to find it in the cache, and if it doesn't
1007 let mut next =
1010 Some(next) => next,
1012 if (self.start & !STATE_START) == next {
1015 debug_assert!(!self.state(next).flags().is_match());
1016 next = self.start_ptr(next);
1018 if next <= STATE_MAX && self.state(next).flags().is_match() {
1019 next |= STATE_MATCH;
1021 debug_assert!(next != STATE_UNKNOWN);
1022 // And now store our state in the current state's next list.
1025 self.cache.trans.set_next(si, cls, next);
1027 Some(next)
1268 // therefore know that the next state pointer won't exceed
1311 // know that the next state pointer won't exceed STATE_MAX.
1331 /// Returns the next state given the current state si and current byte
1335 /// This tries to fetch the next state from the cache, but if that fails,
1336 /// it computes the next state, caches it and returns a pointer to it.
1353 match self.cache.trans.next(si, self.byte_class(b)) {
1475 // This will fail if the next state pointer exceeds STATE_PTR. In
1506 /// Quickly finds the next occurrence of any literal prefixes in the regex.
1519 /// invariant: num_byte_classes() == len(State.next)
1670 /// Sets the transition from (si, cls) to next.
1671 fn set_next(&mut self, si: StatePtr, cls: usize, next: StatePtr) {
1672 self.table[si as usize + cls] = next;
1676 fn next(&self, si: StatePtr, cls: usize) -> StatePtr {
1685 /// Like `next`, but uses unchecked access and is therefore not safe.