| 1196 | // extracting three submatches. Expects match always. |
| 1197 | |
| 1198 | void Parse1NFA(benchmark::State& state, const char* regexp, |
| 1199 | const StringPiece& text) { |
| 1200 | for (auto _ : state) { |
| 1201 | Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL); |
| 1202 | CHECK(re); |
| 1203 | Prog* prog = re->CompileToProg(0); |
| 1204 | CHECK(prog); |
| 1205 | StringPiece sp[2]; // 2 because sp[0] is whole match. |
| 1206 | CHECK(prog->SearchNFA(text, StringPiece(), Prog::kAnchored, |
| 1207 | Prog::kFullMatch, sp, 2)); |
| 1208 | delete prog; |
| 1209 | re->Decref(); |
| 1210 | } |
| 1211 | } |
| 1212 | |
| 1213 | void Parse1OnePass(benchmark::State& state, const char* regexp, |
| 1214 | const StringPiece& text) { |
nothing calls this directly
no test coverage detected