Home | History | Annotate | Download | only in re2

Lines Matching refs:re2

1 // Copyright 2010 The RE2 Authors.  All Rights Reserved.
5 #include "re2/set.h"
8 #include "re2/stringpiece.h"
9 #include "re2/prog.h"
10 #include "re2/re2.h"
11 #include "re2/regexp.h"
13 using namespace re2;
15 RE2::Set::Set(const RE2::Options& options, RE2::Anchor anchor) {
22 RE2::Set::~Set() {
28 int RE2::Set::Add(const StringPiece& pattern, string* error) {
30 LOG(DFATAL) << "RE2::Set::Add after Compile";
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);
60 re2::Regexp* sub[2];
63 re = re2::Regexp::Concat(sub, 2, pf);
69 bool RE2::Set::Compile() {
71 LOG(DFATAL) << "RE2::Set::Compile multiple times";
78 re2::Regexp* re = re2::Regexp::Alternate(const_cast<re2::Regexp**>(&re_[0]),
81 re2::Regexp* sre = re->Simplify();
94 bool RE2::Set::Match(const StringPiece& text, vector<int>* v) const {
96 LOG(DFATAL) << "RE2::Set::Match without Compile";
104 LOG(DFATAL) << "RE2::Set::Match: DFA ran out of cache space";
109 LOG(DFATAL) << "RE2::Set::Match: match but unknown regexp set";