| 1057 | // extracting three submatches. Expects match always. |
| 1058 | |
| 1059 | void Parse3NFA(benchmark::State& state, const char* regexp, |
| 1060 | const StringPiece& text) { |
| 1061 | for (auto _ : state) { |
| 1062 | Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL); |
| 1063 | CHECK(re); |
| 1064 | Prog* prog = re->CompileToProg(0); |
| 1065 | CHECK(prog); |
| 1066 | StringPiece sp[4]; // 4 because sp[0] is whole match. |
| 1067 | CHECK(prog->SearchNFA(text, StringPiece(), Prog::kAnchored, |
| 1068 | Prog::kFullMatch, sp, 4)); |
| 1069 | delete prog; |
| 1070 | re->Decref(); |
| 1071 | } |
| 1072 | } |
| 1073 | |
| 1074 | void Parse3OnePass(benchmark::State& state, const char* regexp, |
| 1075 | const StringPiece& text) { |
nothing calls this directly
no test coverage detected