| 1102 | } |
| 1103 | |
| 1104 | void Parse3Backtrack(benchmark::State& state, const char* regexp, |
| 1105 | const StringPiece& text) { |
| 1106 | for (auto _ : state) { |
| 1107 | Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL); |
| 1108 | CHECK(re); |
| 1109 | Prog* prog = re->CompileToProg(0); |
| 1110 | CHECK(prog); |
| 1111 | StringPiece sp[4]; // 4 because sp[0] is whole match. |
| 1112 | CHECK(prog->UnsafeSearchBacktrack(text, text, Prog::kAnchored, Prog::kFullMatch, sp, 4)); |
| 1113 | delete prog; |
| 1114 | re->Decref(); |
| 1115 | } |
| 1116 | } |
| 1117 | |
| 1118 | void Parse3PCRE(benchmark::State& state, const char* regexp, |
| 1119 | const StringPiece& text) { |
nothing calls this directly
no test coverage detected