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