| 1211 | } |
| 1212 | |
| 1213 | void Parse1OnePass(benchmark::State& state, const char* regexp, |
| 1214 | const StringPiece& text) { |
| 1215 | for (auto _ : state) { |
| 1216 | Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL); |
| 1217 | CHECK(re); |
| 1218 | Prog* prog = re->CompileToProg(0); |
| 1219 | CHECK(prog); |
| 1220 | CHECK(prog->IsOnePass()); |
| 1221 | StringPiece sp[2]; // 2 because sp[0] is whole match. |
| 1222 | CHECK(prog->SearchOnePass(text, text, Prog::kAnchored, Prog::kFullMatch, sp, 2)); |
| 1223 | delete prog; |
| 1224 | re->Decref(); |
| 1225 | } |
| 1226 | } |
| 1227 | |
| 1228 | void Parse1BitState(benchmark::State& state, const char* regexp, |
| 1229 | const StringPiece& text) { |
nothing calls this directly
no test coverage detected