Lines Matching defs:match
213 static const char *match (MatchState *ms, const char *s, const char *p);
216 /* maximum recursion depth for 'match' */
351 /* keeps trying to match with the maximum repetitions */
353 const char *res = match(ms, (s+i), ep+1);
355 i--; /* else didn't match; reduce 1 repetition to try again */
364 const char *res = match(ms, s, ep+1);
382 if ((res=match(ms, s, p)) == NULL) /* match failed? */
393 if ((res = match(ms, s, p)) == NULL) /* match failed? */
410 static const char *match (MatchState *ms, const char *s, const char *p) {
438 p += 4; goto init; /* return match(ms, s, p + 4); */
452 p = ep; goto init; /* return match(ms, s, ep); */
454 s = NULL; /* match failed */
462 p += 2; goto init; /* return match(ms, s, p + 2) */
472 /* does not match at least once? */
475 p = ep + 1; goto init; /* return match(ms, s, ep + 1); */
484 if ((res = match(ms, s + 1, ep + 1)) != NULL)
487 p = ep + 1; goto init; /* else return match(ms, s, ep + 1); */
492 s++; /* 1 match already done */
501 s++; p = ep; goto init; /* return match(ms, s + 1, ep); */
540 lua_pushlstring(ms->L, s, e - s); /* add whole match */
613 if ((res=match(&ms, s1, p)) != NULL) {
656 if ((e = match(&ms, src, p)) != NULL) {
658 if (e == src) newstart++; /* empty match? go at least one position */
761 e = match(&ms, src, p);
766 if (e && e>src) /* non empty match? */
990 {"match", str_match},