Lines Matching +defs:match +defs:string

90 #define	match	smat
102 #define match lmat
107 struct match {
112 const char *beginp; /* start of string -- virtual NUL precedes */
113 const char *endp; /* end of string -- virtual NUL here */
114 const char *coldp; /* can be no match starting before here */
129 static int matcher(struct re_guts *g, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags);
130 static const char *dissect(struct match *m, const char *start, const char *stop, sopno startst, sopno stopst);
131 static const char *backref(struct match *m, const char *start, const char *stop, sopno startst, sopno stopst, sopno lev);
132 static const char *fast(struct match *m, const char *start, const char *stop, sopno startst, sopno stopst);
133 static const char *slow(struct match *m, const char *start, const char *stop, sopno startst, sopno stopst);
145 static void print(struct match *m, char *caption, states st, int ch, FILE *d);
148 static void at(struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst);
172 == static int matcher(struct re_guts *g, char *string, \
178 const char *string,
185 struct match mv;
186 struct match *m = &mv;
195 _DIAGASSERT(string != NULL);
203 start = string + (size_t)pmatch[0].rm_so;
204 stop = string + (size_t)pmatch[0].rm_eo;
206 start = string;
222 /* match struct setup */
227 m->offp = string;
287 /* uh-oh... we couldn't find a subexpression-level match */
311 /* despite initial appearances, there is no match here */
349 == static const char *dissect(struct match *m, const char *start, \
354 struct match *m,
363 const char *sp; /* start of string matched by it */
364 const char *stp; /* string matched by it cannot pass here */
365 const char *rest; /* start of rest of string */
366 const char *tail; /* string unmatched by rest of RE */
369 const char *ssp; /* start of string matched by subsubRE */
370 const char *sep; /* end of string matched by subsubRE */
418 /* cases where length of match is hard to find */
424 assert(rest != NULL); /* it did match */
425 /* could the rest match the rest? */
429 /* no -- try a shorter match for this one */
435 /* did innards match? */
453 assert(rest != NULL); /* it did match */
454 /* could the rest match the rest? */
458 /* no -- try a shorter match for this one */
466 for (;;) { /* find last match of innards */
474 /* last successful match */
494 assert(rest != NULL); /* it did match */
495 /* could the rest match the rest? */
499 /* no -- try a shorter match for this one */
558 == static const char *backref(struct match *m, const char *start, \
563 struct match *m,
572 const char *sp; /* start of string matched by it */
575 const char *ssp; /* start of string matched by subsubRE */
682 return(NULL); /* not enough left to match */
767 - fast - step through the string at top speed
768 == static const char *fast(struct match *m, const char *start, \
771 static const char * /* where tentative match ended, or NULL */
773 struct match *m,
787 const char *coldp; /* last p after which no match was underway */
862 - slow - step through the string more deliberately
863 == static const char *slow(struct match *m, const char *start, \
868 struct match *m,
882 const char *matchp; /* last p at which a match ended */
991 /* only characters can match */
1086 == static void print(struct match *m, char *caption, states st, \
1092 struct match *m,
1124 == static void at(struct match *m, char *title, char *start, char *stop, \
1130 struct match *m,
1187 #undef match