Lines Matching refs:capture
62 const char** capture;
69 const char* cap_j; // if j>=0, set capture[j] = cap_j before processing ip
88 // to the workqueue q with associated capture info.
90 const char* p, const char** capture);
100 // Returns text version of capture information, for debugging.
101 string FormatCapture(const char** capture);
152 delete[] t->capture;
168 t->capture = new const char*[ncapture_];
187 const char* p, const char** capture) {
204 capture[a.j] = a.cap_j;
211 fprintf(stderr, " [%d%s]\n", id, FormatCapture(capture).c_str());
236 CopyCapture(t->capture, capture);
253 // Push a dummy whose only job is to restore capture[j]
255 stk[nstk++] = AddState(0, capture[j], j);
257 // Record capture.
258 capture[j] = p;
268 CopyCapture(t->capture, capture);
271 fprintf(stderr, " + %d%s [%p]\n", id, FormatCapture(t->capture).c_str(), t);
302 if (matched_ && match_[0] < t->capture[0]) {
319 AddToThreadq(nextq, ip->out(), flag, p+1, t->capture);
327 CopyCapture((const char**)match_, t->capture);
343 const char* old = t->capture[1]; // previous end pointer
344 t->capture[1] = p;
349 if (!matched_ || t->capture[0] < match_[0] ||
350 (t->capture[0] == match_[0] && t->capture[1] > match_[1]))
351 CopyCapture((const char**)match_, t->capture);
355 CopyCapture((const char**)match_, t->capture);
360 t->capture[0] = old;
368 t->capture[0] = old;
378 string NFA::FormatCapture(const char** capture) {
382 if (capture[i] == NULL)
384 else if (capture[i+1] == NULL)
385 StringAppendF(&s, "(%d,?)", (int)(capture[i] - btext_));
388 (int)(capture[i] - btext_),
389 (int)(capture[i+1] - btext_));
508 FormatCapture((const char**)t->capture).c_str());