Lines Matching refs:regexp
12 #include "re2/regexp.h"
14 DEFINE_bool(dump_prog, false, "dump regexp program");
16 DEFINE_bool(dump_rprog, false, "dump reversed regexp program");
19 "maximum number of regexp test failures (-1 = unlimited)");
21 DEFINE_string(regexp_engines, "", "pattern to select regexp engines to test");
135 Regexp::ParseFlags parse_flags;
139 static const Regexp::ParseFlags single_line =
140 Regexp::LikePerl;
141 static const Regexp::ParseFlags multi_line =
142 static_cast<Regexp::ParseFlags>(Regexp::LikePerl & ~Regexp::OneLine);
146 { single_line|Regexp::Latin1, "single-line, latin1" },
148 { multi_line|Regexp::NonGreedy, "multiline, nongreedy" },
149 { multi_line|Regexp::Latin1, "multiline, latin1" },
152 static string FormatMode(Regexp::ParseFlags flags) {
162 Regexp::ParseFlags flags)
176 // Compile regexp to prog.
179 regexp_ = Regexp::Parse(regexp_str, flags, &status);
195 << " regexp "
203 // Compile regexp to reversed prog. Only needed for DFA engines.
218 // Regexp::Latin1 will be accomodated below.
219 if (!(flags & Regexp::OneLine))
221 if (flags & Regexp::NonGreedy)
223 if (flags & Regexp::DotNL)
226 // Compile regexp to RE2.
229 if (flags & Regexp::Latin1)
241 // Compile regexp to RE.
254 if (flags & Regexp::Latin1)
486 VLOG(1) << "Try: regexp " << CEscape(regexp_str_)
546 LOG(QFATAL) << "Too many regexp failures.";
557 << " regexp "
582 Tester::Tester(const StringPiece& regexp) {
586 TestInstance* t = new TestInstance(regexp, kinds[i],
634 bool TestRegexpOnText(const StringPiece& regexp,
636 Tester t(regexp);