MCPcopy Create free account
hub / github.com/davidblewett/rure-python / exec_backtrack

Method exec_backtrack

regex/src/exec.rs:1026–1053  ·  view source on GitHub ↗

Always runs the NFA using bounded backtracking.

(
        &self,
        matches: &mut [bool],
        slots: &mut [Slot],
        text: &[u8],
        start: usize,
        end: usize,
    )

Source from the content-addressed store, hash-verified

1024
1025 /// Always runs the NFA using bounded backtracking.
1026 fn exec_backtrack(
1027 &self,
1028 matches: &mut [bool],
1029 slots: &mut [Slot],
1030 text: &[u8],
1031 start: usize,
1032 end: usize,
1033 ) -> bool {
1034 if self.ro.nfa.uses_bytes() {
1035 backtrack::Bounded::exec(
1036 &self.ro.nfa,
1037 self.cache,
1038 matches,
1039 slots,
1040 ByteInput::new(text, self.ro.nfa.only_utf8),
1041 start,
1042 end)
1043 } else {
1044 backtrack::Bounded::exec(
1045 &self.ro.nfa,
1046 self.cache,
1047 matches,
1048 slots,
1049 CharInput::new(text),
1050 start,
1051 end)
1052 }
1053 }
1054
1055 /// Finds which regular expressions match the given text.
1056 ///

Callers 1

exec_nfaMethod · 0.80

Calls 1

uses_bytesMethod · 0.80

Tested by

no test coverage detected