Lines Matching defs:capture
368 } capture[LUA_MAXCAPTURES];
389 ms->capture[l].len == CAP_UNFINISHED))
390 return luaL_error(ms->L, "invalid capture index %%%d", l + 1);
398 if (ms->capture[level].len == CAP_UNFINISHED) return level;
399 return luaL_error(ms->L, "invalid pattern capture");
539 ms->capture[level].init = s;
540 ms->capture[level].len = what;
543 ms->level--; /* undo capture */
552 ms->capture[l].len = s - ms->capture[l].init; /* close capture */
554 ms->capture[l].len = CAP_UNFINISHED; /* undo capture */
562 len = ms->capture[l].len;
564 memcmp(ms->capture[l].init, s, len) == 0)
576 case '(': { /* start capture */
577 if (*(p + 1) == ')') /* position capture? */
583 case ')': { /* end capture */
618 case '8': case '9': { /* capture results (%0-%9)? */
696 ** get information about the i-th capture. If there are no captures
698 ** is the range 's'..'e'. If the capture is a string, return
706 luaL_error(ms->L, "invalid capture index %%%d", i + 1);
711 ptrdiff_t capl = ms->capture[i].len;
712 *cap = ms->capture[i].init;
714 luaL_error(ms->L, "unfinished capture");
716 lua_pushinteger(ms->L, (ms->capture[i].init - ms->src_init) + 1);
723 ** Push the i-th capture on the stack.
918 push_onecapture(ms, 0, s, e); /* first capture is the index */