HomeSort by relevance Sort by last modified time
    Searched refs:Regexp (Results 1 - 25 of 48) sorted by null

1 2

  /external/regex-re2/re2/testing/
parse_test.cc 10 #include "re2/regexp.h"
14 static const Regexp::ParseFlags TestZeroFlags = Regexp::ParseFlags(1<<30);
17 const char* regexp; member in struct:re2::Test
19 Regexp::ParseFlags flags;
22 static Regexp::ParseFlags kTestFlags = Regexp::MatchNL |
23 Regexp::PerlX |
24 Regexp::PerlClasses |
25 Regexp::UnicodeGroups
    [all...]
null_walker.cc 6 #include "re2/regexp.h"
13 class NullWalker : public Regexp::Walker<bool> {
16 bool PostVisit(Regexp* re, bool parent_arg, bool pre_arg,
19 bool ShortVisit(Regexp* re, bool a) {
33 bool NullWalker::PostVisit(Regexp* re, bool parent_arg, bool pre_arg,
39 void Regexp::NullWalk() {
regexp_test.cc 10 #include "re2/regexp.h"
15 TEST(Regexp, BigRef) {
16 Regexp* re;
17 re = Regexp::Parse("x", Regexp::NoParseFlags, NULL);
28 TEST(Regexp, BigConcat) {
29 Regexp* x;
30 x = Regexp::Parse("x", Regexp::NoParseFlags, NULL);
31 vector<Regexp*> v(90000, x); // ToString bails out at 10000
    [all...]
mimics_pcre_test.cc 7 #include "re2/regexp.h"
12 const char* regexp; member in struct:re2::PCRETest
63 Regexp::ParseFlags flags = Regexp::LikePerl;
65 flags = flags | Regexp::Latin1;
66 Regexp* re = Regexp::Parse(t.regexp, flags, NULL);
67 CHECK(re) << " " << t.regexp;
69 << " " << t.regexp << " "
    [all...]
required_prefix_test.cc 6 #include "re2/regexp.h"
11 const char* regexp; member in struct:re2::PrefixTest
19 // If the regexp is missing a ^, there's no required prefix.
24 // If the regexp immediately goes into
43 Regexp::ParseFlags flags = Regexp::LikePerl;
45 flags = flags | Regexp::Latin1;
46 Regexp* re = Regexp::Parse(t.regexp, flags, NULL)
    [all...]
simplify_test.cc 10 #include "re2/regexp.h"
15 const char* regexp; member in struct:re2::Test
144 VLOG(1) << "Testing " << tests[i].regexp;
145 Regexp* re = Regexp::Parse(tests[i].regexp,
146 Regexp::MatchNL | (Regexp::LikePerl &
147 ~Regexp::OneLine),
149 CHECK(re != NULL) << " " << tests[i].regexp << " " << status.Text()
    [all...]
compile_test.cc 10 #include "re2/regexp.h"
18 // the regexp compiles to the expected code.
24 const char* regexp; member in struct:re2::Test
108 Regexp* re = Regexp::Parse(t.regexp, Regexp::PerlX|Regexp::Latin1, NULL);
110 LOG(ERROR) << "Cannot parse: " << t.regexp;
116 LOG(ERROR) << "Cannot compile: " << t.regexp;
    [all...]
tester.h 13 #include "re2/regexp.h"
19 class Regexp;
21 // All the supported regexp engines.
47 // A TestInstance caches per-regexp state for a given
54 TestInstance(const StringPiece& regexp, Prog::MatchKind kind,
55 Regexp::ParseFlags flags);
57 Regexp::ParseFlags flags() { return flags_; }
75 const StringPiece& regexp_str_; // regexp being tested
77 Regexp::ParseFlags flags_; // flags for parsing regexp_str_
80 Regexp* regexp_; // parsed regex
    [all...]
dfa_test.cc 9 #include "re2/regexp.h"
36 // Create regexp with 2^FLAGS_size states in DFA.
45 Regexp* re = Regexp::Parse(s.c_str(), Regexp::LikePerl, NULL);
60 Regexp* re = Regexp::Parse(s.c_str(), Regexp::LikePerl, NULL);
89 // Create regexp with 2^30 states in DFA.
96 Regexp* re = Regexp::Parse(s.c_str(), Regexp::LikePerl, NULL)
310 const char *regexp; member in struct:re2::ReverseTest
    [all...]
regexp_benchmark.cc 10 #include "re2/regexp.h"
24 Regexp* re = Regexp::Parse("(\\d+)-(\\d+)-(\\d+)", Regexp::LikePerl, NULL);
42 const char* regexp = "(\\d+)-(\\d+)-(\\d+)"; local
46 Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL);
50 fprintf(stderr, "Regexp: %7lld bytes (peak=%lld)\n", mc.HeapGrowth(), mc.PeakHeapGrowth())
243 string regexp = "^" + s + ".*$"; local
    [all...]
dump.cc 5 // Dump the regexp into a string showing structure.
8 // This function traverses the regexp recursively,
9 // meaning that on inputs like Regexp::Simplify of
23 #include "re2/regexp.h"
55 // Create string representation of regexp with explicit structure.
57 static void DumpRegexpAppending(Regexp* re, string* s) {
68 if (re->parse_flags() & Regexp::NonGreedy)
73 if (re->op() == kRegexpLiteral && (re->parse_flags() & Regexp::FoldCase)) {
78 if (re->op() == kRegexpLiteralString && (re->parse_flags() & Regexp::FoldCase)) {
93 if (!(re->parse_flags() & Regexp::WasDollar))
    [all...]
search_test.cc 9 #include "re2/regexp.h"
16 const char* regexp; member in struct:re2::RegexpTest
305 TEST(Regexp, SearchTests) {
309 if (!TestRegexpOnText(t.regexp, t.text))
316 atom.push_back(StringPiece(t.regexp).as_string());
tester.cc 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)
    [all...]
  /external/regex-re2/re2/
simplify.cc 10 #include "re2/regexp.h"
15 // Parses the regexp src and then simplifies it and sets *dst to the
18 bool Regexp::SimplifyRegexp(const StringPiece& src, ParseFlags flags,
21 Regexp* re = Parse(src, flags, status);
24 Regexp* sre = re->Simplify();
41 // is this Regexp* simple?
42 bool Regexp::ComputeSimple() {
43 Regexp** subs;
102 // The child_args are simplified Regexp*s.
103 class SimplifyWalker : public Regexp::Walker<Regexp*>
    [all...]
regexp.h 17 // Any operation that traverses the Regexp structures should be written
18 // using Regexp::Walker (see walker-inl.h), not recursively, because deeply nested
27 // Regexp::Parse parses regular expressions encoded in UTF-8.
39 // Regexp::Parse. In particular, many of the basic Perl additions
42 // If parsed with the flag Regexp::Latin1, both the regular expression
48 // Once Regexp has parsed a regular expression, it provides methods
53 // To call a sublibrary, Regexp does not simply prepare a
55 // sublibrary. Instead, Regexp prepares, from its own parsed form, the
61 // to be that used by Regexp's parser, not the syntax expected
62 // by the sublibrary. Regexp might accept a restricted o
    [all...]
set.cc 11 #include "re2/regexp.h"
34 Regexp::ParseFlags pf = static_cast<Regexp::ParseFlags>(
38 re2::Regexp* re = Regexp::Parse(pattern, pf, &status);
49 re2::Regexp* m = re2::Regexp::HaveMatch(n, pf);
52 re2::Regexp** sub = new re2::Regexp*[nsub + 1];
57 re = re2::Regexp::Concat(sub, nsub + 1, pf)
    [all...]
mimics_pcre.cc 6 // for a particular Regexp. (If so, the testing framework can
10 // * the regexp contains a repetition of an empty string,
23 // Regexp::MimicsPCRE checks for any of these conditions.
26 #include "re2/regexp.h"
32 static bool CanBeEmptyString(Regexp *re);
34 // Walker class to compute whether library handles a regexp
37 class PCREWalker : public Regexp::Walker<bool> {
40 bool PostVisit(Regexp* re, bool parent_arg, bool pre_arg, bool* child_args,
43 bool ShortVisit(Regexp* re, bool a) {
53 bool PCREWalker::PostVisit(Regexp* re, bool parent_arg, bool pre_arg
    [all...]
regexp.cc 9 #include "re2/regexp.h"
16 Regexp::Regexp(RegexpOp op, ParseFlags parse_flags)
32 Regexp::~Regexp() {
34 LOG(DFATAL) << "Regexp not destroyed.";
52 // If it's possible to destroy this regexp without recurring,
54 bool Regexp::QuickDestroy() {
62 static map<Regexp*, int> *ref_map;
65 int Regexp::Ref()
    [all...]
walker-inl.h 16 #include "re2/regexp.h"
22 template<typename T> class Regexp::Walker {
31 // At the top-most Regexp, parent_arg is arg passed to walk.
36 virtual T PreVisit(Regexp* re, T parent_arg, bool* stop);
47 virtual T PostVisit(Regexp* re, T parent_arg, T pre_arg,
62 virtual T ShortVisit(Regexp* re, T parent_arg) = 0;
67 T Walk(Regexp* re, T top_arg);
77 T WalkExponential(Regexp* re, T top_arg, int max_visits);
93 T WalkInternal(Regexp* re, T top_arg, bool use_copy);
98 template<typename T> T Regexp::Walker<T>::PreVisit(Regexp* re
    [all...]
parse.cc 9 // of the ParseState class. The Regexp::Parse function is
17 // See regexp.h for rationale.
20 #include "re2/regexp.h"
29 // Regexp pointers called the stack. Left parenthesis and vertical
40 // form LeftParen regexp VerticalBar regexp VerticalBar ... regexp VerticalBar.
44 class Regexp::ParseState {
60 bool PushRegexp(Regexp* re);
65 // Pushes a regexp with the given op (and no args) onto the stack
    [all...]
tostring.cc 9 #include "re2/regexp.h"
31 class ToStringWalker : public Regexp::Walker<int> {
35 virtual int PreVisit(Regexp* re, int parent_arg, bool* stop);
36 virtual int PostVisit(Regexp* re, int parent_arg, int pre_arg,
38 virtual int ShortVisit(Regexp* re, int parent_arg) {
48 string Regexp::ToString() {
61 int ToStringWalker::PreVisit(Regexp* re, int parent_arg, bool* stop) {
139 int ToStringWalker::PostVisit(Regexp* re, int parent_arg, int pre_arg,
157 AppendLiteral(t_, re->rune(), re->parse_flags() & Regexp::FoldCase);
162 AppendLiteral(t_, re->runes()[i], re->parse_flags() & Regexp::FoldCase)
    [all...]
prefilter.h 18 class Regexp;
71 static Prefilter* FromRegexp(Regexp* a);
77 static Info* BuildInfo(Regexp* re);
compile.cc 8 // This file's external interface is just Regexp::CompileToProg.
13 #include "re2/regexp.h"
22 // See http://swtch.com/~rsc/regexp/regexp1.html for inspiration.
122 class Compiler : public Regexp::Walker<Frag> {
127 // Compiles Regexp to a new Prog.
131 static Prog *Compile(Regexp* re, bool reversed, int64 max_mem);
136 Regexp* re);
138 // Interface for Regexp::Walker, which helps traverse the Regexp.
142 // The Compiler traverses the Regexp parse tree, visitin
    [all...]
set.h 23 // Add adds regexp pattern to the set, interpreted using the RE2 options.
25 // Add returns the regexp index that will be used to identify
26 // it in the result of Match, or -1 if the regexp cannot be parsed.
45 vector<re2::Regexp*> re_;
  /development/tools/findunused/
find_unused_resources.rb 15 @@stringIdPattern = Regexp.new("name=\"([@_a-zA-Z0-9 ]*)\"")
16 @@layoutIdPattern = Regexp.new("android:id=\".*id/([_a-zA-Z0-9]*)\"")
19 Regexp.new("@string/([_a-zA-Z0-9]*)"),
20 Regexp.new("@array/([_a-zA-Z0-9]*)"),
24 Regexp.new("R.id.([_a-zA-Z0-9]+)"),
25 Regexp.new("R.string.([_a-zA-Z0-9]+)"),
26 Regexp.new("R.array.([_a-zA-Z0-9]+)"),
27 Regexp.new("R.color.([_a-zA-Z0-9]+)"),
28 Regexp.new("R.configVarying.([_a-zA-Z0-9]+)"),
29 Regexp.new("R.dimen.([_a-zA-Z0-9]+)")
    [all...]

Completed in 405 milliseconds

1 2