| 1072 | } |
| 1073 | |
| 1074 | void Parse3OnePass(benchmark::State& state, const char* regexp, |
| 1075 | const StringPiece& text) { |
| 1076 | for (auto _ : state) { |
| 1077 | Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL); |
| 1078 | CHECK(re); |
| 1079 | Prog* prog = re->CompileToProg(0); |
| 1080 | CHECK(prog); |
| 1081 | CHECK(prog->IsOnePass()); |
| 1082 | StringPiece sp[4]; // 4 because sp[0] is whole match. |
| 1083 | CHECK(prog->SearchOnePass(text, text, Prog::kAnchored, Prog::kFullMatch, sp, 4)); |
| 1084 | delete prog; |
| 1085 | re->Decref(); |
| 1086 | } |
| 1087 | } |
| 1088 | |
| 1089 | void Parse3BitState(benchmark::State& state, const char* regexp, |
| 1090 | const StringPiece& text) { |
nothing calls this directly
no test coverage detected