Lines Matching refs:re
132 Regexp* re = stack; in Destroy() local
133 stack = re->down_; in Destroy()
134 if (re->ref_ != 0) in Destroy()
135 LOG(DFATAL) << "Bad reference count " << re->ref_; in Destroy()
136 if (re->nsub_ > 0) { in Destroy()
137 Regexp** subs = re->sub(); in Destroy()
138 for (int i = 0; i < re->nsub_; i++) { in Destroy()
151 if (re->nsub_ > 1) in Destroy()
153 re->nsub_ = 0; in Destroy()
155 delete re; in Destroy()
177 Regexp* re = new Regexp(kRegexpHaveMatch, flags); in HaveMatch() local
178 re->match_id_ = match_id; in HaveMatch()
179 return re; in HaveMatch()
185 Regexp* re = new Regexp(kRegexpPlus, flags); in Plus() local
186 re->AllocSub(1); in Plus()
187 re->sub()[0] = sub; in Plus()
188 return re; in Plus()
194 Regexp* re = new Regexp(kRegexpStar, flags); in Star() local
195 re->AllocSub(1); in Star()
196 re->sub()[0] = sub; in Star()
197 return re; in Star()
203 Regexp* re = new Regexp(kRegexpQuest, flags); in Quest() local
204 re->AllocSub(1); in Quest()
205 re->sub()[0] = sub; in Quest()
206 return re; in Quest()
222 Regexp* re = sub[0]; in ConcatOrAlternate() local
224 return re; in ConcatOrAlternate()
232 Regexp* re = new Regexp(op, flags); in ConcatOrAlternate() local
233 re->AllocSub(nbigsub); in ConcatOrAlternate()
234 Regexp** subs = re->sub(); in ConcatOrAlternate()
241 return re; in ConcatOrAlternate()
244 Regexp* re = new Regexp(op, flags); in ConcatOrAlternate() local
245 re->AllocSub(nsub); in ConcatOrAlternate()
246 Regexp** subs = re->sub(); in ConcatOrAlternate()
251 return re; in ConcatOrAlternate()
267 Regexp* re = new Regexp(kRegexpCapture, flags); in Capture() local
268 re->AllocSub(1); in Capture()
269 re->sub()[0] = sub; in Capture()
270 re->cap_ = cap; in Capture()
271 return re; in Capture()
275 Regexp* re = new Regexp(kRegexpRepeat, flags); in Repeat() local
276 re->AllocSub(1); in Repeat()
277 re->sub()[0] = sub; in Repeat()
278 re->min_ = min; in Repeat()
279 re->max_ = max; in Repeat()
280 return re; in Repeat()
284 Regexp* re = new Regexp(kRegexpLiteral, flags); in NewLiteral() local
285 re->rune_ = rune; in NewLiteral()
286 return re; in NewLiteral()
294 Regexp* re = new Regexp(kRegexpLiteralString, flags); in LiteralString() local
296 re->AddRuneToString(runes[i]); in LiteralString()
297 return re; in LiteralString()
301 Regexp* re = new Regexp(kRegexpCharClass, flags); in NewCharClass() local
302 re->cc_ = cc; in NewCharClass()
303 return re; in NewCharClass()
507 virtual Ignored PreVisit(Regexp* re, Ignored ignored, bool* stop) { in PreVisit() argument
508 if (re->op() == kRegexpCapture) in PreVisit()
512 virtual Ignored ShortVisit(Regexp* re, Ignored ignored) { in ShortVisit() argument
541 Ignored PreVisit(Regexp* re, Ignored ignored, bool* stop) { in PreVisit() argument
542 if (re->op() == kRegexpCapture && re->name() != NULL) { in PreVisit()
550 if (map_->find(*re->name()) == map_->end()) in PreVisit()
551 (*map_)[*re->name()] = re->cap(); in PreVisit()
556 virtual Ignored ShortVisit(Regexp* re, Ignored ignored) { in ShortVisit() argument
585 Ignored PreVisit(Regexp* re, Ignored ignored, bool* stop) { in PreVisit() argument
586 if (re->op() == kRegexpCapture && re->name() != NULL) { in PreVisit()
591 (*map_)[re->cap()] = *re->name(); in PreVisit()
596 virtual Ignored ShortVisit(Regexp* re, Ignored ignored) { in ShortVisit() argument
636 Regexp* re = sub[i]; in RequiredPrefix() local
637 switch (re->op_) { in RequiredPrefix()
643 if (re->parse_flags() & Latin1) { in RequiredPrefix()
644 prefix->resize(re->nrunes_); in RequiredPrefix()
645 for (int j = 0; j < re->nrunes_; j++) in RequiredPrefix()
646 (*prefix)[j] = re->runes_[j]; in RequiredPrefix()
650 prefix->resize(re->nrunes_ * UTFmax); in RequiredPrefix()
652 for (int j = 0; j < re->nrunes_; j++) { in RequiredPrefix()
653 Rune r = re->runes_[j]; in RequiredPrefix()
664 if ((re->parse_flags() & Latin1) || re->rune_ < Runeself) { in RequiredPrefix()
665 prefix->append(1, re->rune_); in RequiredPrefix()
668 prefix->append(buf, runetochar(buf, &re->rune_)); in RequiredPrefix()
679 re = Concat(sub + i, nsub_ - i, parse_flags()); in RequiredPrefix()
681 re = new Regexp(kRegexpEmptyMatch, parse_flags()); in RequiredPrefix()
683 *suffix = re; in RequiredPrefix()