Lines Matching refs:Regexp
16 Regexp::Regexp(RegexpOp op, ParseFlags parse_flags) in Regexp() function in re2::Regexp
32 Regexp::~Regexp() { in ~Regexp()
54 bool Regexp::QuickDestroy() { in QuickDestroy()
62 static map<Regexp*, int> ref_map;
65 int Regexp::Ref() { in Ref()
74 Regexp* Regexp::Incref() { in Incref()
93 void Regexp::Decref() { in Decref()
112 void Regexp::Destroy() { in Destroy()
119 Regexp* stack = this; in Destroy()
121 Regexp* re = stack; in Destroy()
126 Regexp** subs = re->sub(); in Destroy()
128 Regexp* sub = subs[i]; in Destroy()
148 void Regexp::AddRuneToString(Rune r) { in AddRuneToString()
165 Regexp* Regexp::HaveMatch(int match_id, ParseFlags flags) { in HaveMatch()
166 Regexp* re = new Regexp(kRegexpHaveMatch, flags); in HaveMatch()
171 Regexp* Regexp::Plus(Regexp* sub, ParseFlags flags) { in Plus()
174 Regexp* re = new Regexp(kRegexpPlus, flags); in Plus()
180 Regexp* Regexp::Star(Regexp* sub, ParseFlags flags) { in Star()
183 Regexp* re = new Regexp(kRegexpStar, flags); in Star()
189 Regexp* Regexp::Quest(Regexp* sub, ParseFlags flags) { in Quest()
192 Regexp* re = new Regexp(kRegexpQuest, flags); in Quest()
198 Regexp* Regexp::ConcatOrAlternate(RegexpOp op, Regexp** sub, int nsub, in ConcatOrAlternate()
203 Regexp** subcopy = NULL; in ConcatOrAlternate()
206 subcopy = new Regexp*[nsub]; in ConcatOrAlternate()
211 Regexp* re = sub[0]; in ConcatOrAlternate()
221 Regexp* re = new Regexp(op, flags); in ConcatOrAlternate()
223 Regexp** subs = re->sub(); in ConcatOrAlternate()
233 Regexp* re = new Regexp(op, flags); in ConcatOrAlternate()
235 Regexp** subs = re->sub(); in ConcatOrAlternate()
243 Regexp* Regexp::Concat(Regexp** sub, int nsub, ParseFlags flags) { in Concat()
247 Regexp* Regexp::Alternate(Regexp** sub, int nsub, ParseFlags flags) { in Alternate()
251 Regexp* Regexp::AlternateNoFactor(Regexp** sub, int nsub, ParseFlags flags) { in AlternateNoFactor()
255 Regexp* Regexp::Capture(Regexp* sub, ParseFlags flags, int cap) { in Capture()
256 Regexp* re = new Regexp(kRegexpCapture, flags); in Capture()
263 Regexp* Regexp::Repeat(Regexp* sub, ParseFlags flags, int min, int max) { in Repeat()
264 Regexp* re = new Regexp(kRegexpRepeat, flags); in Repeat()
272 Regexp* Regexp::NewLiteral(Rune rune, ParseFlags flags) { in NewLiteral()
273 Regexp* re = new Regexp(kRegexpLiteral, flags); in NewLiteral()
278 Regexp* Regexp::LiteralString(Rune* runes, int nrunes, ParseFlags flags) { in LiteralString()
280 return new Regexp(kRegexpEmptyMatch, flags); in LiteralString()
283 Regexp* re = new Regexp(kRegexpLiteralString, flags); in LiteralString()
289 Regexp* Regexp::NewCharClass(CharClass* cc, ParseFlags flags) { in NewCharClass()
290 Regexp* re = new Regexp(kRegexpCharClass, flags); in NewCharClass()
296 void Regexp::Swap(Regexp* that) { in Swap()
305 static bool TopEqual(Regexp* a, Regexp* b) { in TopEqual()
324 return ((a->parse_flags() ^ b->parse_flags()) & Regexp::WasDollar) == 0; in TopEqual()
328 ((a->parse_flags() ^ b->parse_flags()) & Regexp::FoldCase) == 0; in TopEqual()
332 ((a->parse_flags() ^ b->parse_flags()) & Regexp::FoldCase) == 0 && in TopEqual()
343 return ((a->parse_flags() ^ b->parse_flags()) & Regexp::NonGreedy) == 0; in TopEqual()
346 return ((a->parse_flags() ^ b->parse_flags()) & Regexp::NonGreedy) == 0 && in TopEqual()
370 bool Regexp::Equal(Regexp* a, Regexp* b) { in Equal()
397 vector<Regexp*> stk; in Equal()
401 Regexp* a2; in Equal()
402 Regexp* b2; in Equal()
491 class NumCapturesWalker : public Regexp::Walker<Ignored> {
496 virtual Ignored PreVisit(Regexp* re, Ignored ignored, bool* stop) { in PreVisit()
501 virtual Ignored ShortVisit(Regexp* re, Ignored ignored) { in ShortVisit()
512 int Regexp::NumCaptures() { in NumCaptures()
519 class NamedCapturesWalker : public Regexp::Walker<Ignored> {
530 Ignored PreVisit(Regexp* re, Ignored ignored, bool* stop) { in PreVisit()
545 virtual Ignored ShortVisit(Regexp* re, Ignored ignored) { in ShortVisit()
556 map<string, int>* Regexp::NamedCaptures() { in NamedCaptures()
563 class CaptureNamesWalker : public Regexp::Walker<Ignored> {
574 Ignored PreVisit(Regexp* re, Ignored ignored, bool* stop) { in PreVisit()
585 virtual Ignored ShortVisit(Regexp* re, Ignored ignored) { in ShortVisit()
596 map<int, string>* Regexp::CaptureNames() { in CaptureNames()
606 bool Regexp::RequiredPrefix(string *prefix, bool *foldcase, Regexp** suffix) { in RequiredPrefix()
619 Regexp** sub = this->sub(); in RequiredPrefix()
625 Regexp* re = sub[i]; in RequiredPrefix()
670 re = new Regexp(kRegexpEmptyMatch, parse_flags()); in RequiredPrefix()