Home | History | Annotate | Download | only in dist

Lines Matching defs:match

74 of call to match(). We do it this way to save on using another stack variable,
80 /* Non-error returns from the match() function. Error returns are externally
86 /* Special internal returns from the match() function. Make them sufficiently
144 * Match a back-reference *
148 negative, so the match always fails. However, in JavaScript compatibility mode,
156 md points to match data block
160 -1 no match
161 -2 partial match; always given if at end subject
201 /* Match characters up to the end of the reference. NOTE: the number of
215 if (eptr >= md->end_subject) return -2; /* Partial match */
239 if (eptr >= md->end_subject) return -2; /* Partial match */
256 if (eptr >= md->end_subject) return -2; /* Partial match */
268 RECURSION IN THE match() FUNCTION
270 The match() function is highly recursive, though not every recursive call
325 printf("match() called in line %d\n", __LINE__); \
326 rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1); \
331 printf("match() returned %d from line %d\n", ra, __LINE__); \
336 rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1)
345 argument of match(), which never changes. */
459 * Match from current position *
497 mstart pointer to the current match start position (can be modified
500 md pointer to "static" info for the match
506 MATCH_NOMATCH if failed to match )
513 match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
660 /* There is a special fudge for calling match() in a way that causes it to
669 return match((PCRE_PUCHAR)&rdepth, NULL, NULL, 0, NULL, NULL, 1);
680 still need to be preserved over recursive calls of match(). These macros define
709 NO_RECURSE is *not* defined, these just turn into a recursive call to match()
721 /* First check that we haven't called match() too many times, or that we
727 /* At the start of a group with an unlimited repeat that may match an empty
734 to break infinite loops that match no characters. When match() is called in
737 the stack, so a new one may be required for each match(). */
767 variable). If it does match, we reset that variable to the current subject
812 nomatch_mark. When a pattern match ends with a SKIP_ARG for which there was
813 not a matching mark, we have to re-run the match, ignoring the SKIP_ARG
816 SKIP_ARG gets to top level, the match is re-run with md->ignore_skip_arg
840 match pointer to do this. */
871 the start-of-match value in case it was changed by \K. */
923 preceding bracket, in the appropriate order. The second "call" of match()
947 the group. A failure to match might occur after the group has succeeded,
948 if something later on doesn't match. For this reason, we need to restore
1040 the result of a recursive call to match() whatever happened so it was
1076 /* In all other cases, we have to make another call to match(). */
1154 at least one match. For MATCH_NOMATCH, carry on with the alternatives, as
1393 /* The condition is an assertion. Call match() to evaluate it - setting
1432 recursive call to match() is always required, unless the second alternative
1501 /* Otherwise, we have a match. */
1519 this incarnation of the match() function will have set MATCH_CONDASSERT in
1522 match() to remember this case. */
1540 /* A match means that the assertion is true; break out of the loop
1576 failed. If not, we broke out after a match. */
1592 /* Negative assertion: all branches must fail to match for the assertion to
1614 case MATCH_MATCH: /* A successful match means */
1635 assertion to fail to match, without considering any more alternatives.
1636 Failing to match means the assertion is true. This is a consistent
1658 /* All branches in the assertion failed to match. */
1667 move back, this match function fails. When working with UTF-8 we move
1699 details of the match so far. This is mainly for debugging, though the
1846 DPRINTF(("Recursion didn't match\n"));
1921 water mark for use by positive assertions. We also need to record the match
1938 the current subject position and start match pointer and give a MATCH
2030 an atomic group or an unlimited repeat of a group that can match an empty
2044 if (*prev >= OP_SBRA) /* Could match an empty string */
2091 /* Start of match assertion */
2098 /* Reset the start of match point */
2295 /* Match any single character type except newline; have to take care with
2312 /* Match any single character whatsoever. */
2327 /* Match a single byte, even in UTF-8 mode. This opcode really does match
2644 /* Match an extended Unicode sequence. We will get here only if the support
2674 /* Match a back reference, possibly repeatedly. Look past the end of the
2683 this ensures that every attempt at a match fails. We can't just fail
2764 if (length == -2) eptr = md->end_subject; /* Partial match */
2790 if (slength == -2) eptr = md->end_subject; /* Partial match */
2814 if (slength == -2) eptr = md->end_subject; /* Partial match */
2857 /* Match a bit-mapped character class, possibly repeatedly. This op code is
3093 /* Match an extended character class. In the 8-bit library, this opcode is
3218 /* Match a single character, casefully */
3248 /* Match a single character, caselessly. If we are at the end of the
3312 /* Match a single character repeatedly. */
3380 match; if there isn't one, advance up to the maximum, one character at a
3385 then done (no backing up). Otherwise, match at this position; anything
3386 other than no match is immediately returned. For nomatch, back up one
3650 /* Match a negated single one-byte character. The character we are
3698 /* Match a negated single one-byte character repeatedly. This is almost a
3701 positive/negative option for each character match. Maybe that wouldn't add
4070 /* Match a single character type repeatedly; several different opcodes
4337 /* Match extended Unicode sequences. We will get here only if the
4875 subsequent match. Again, separate the UTF-8 case for speed, and also
5095 /* Match extended Unicode sequences. We will get here only if the
5614 /* Match extended Unicode grapheme clusters. We will get here only if the
6194 match(), the RRETURN() macro jumps here. The number that is saved in
6221 DPRINTF(("jump error in pcre match: label %d non-existent\n", frame->Xwhere));
6231 RECURSION IN THE match() FUNCTION
6329 -1 => failed to match
6384 per recursive call of match(). Without the funny casting for sizeof, a Windows
6393 return match(NULL, NULL, NULL, 0, NULL, NULL, 0);
6679 /* Set up the first character to match, if available. The first_char value is
6734 /* If firstline is TRUE, the start of the match is constrained to the first
6735 line of a multiline string. That is, the match must be before or at the first
6737 scanning at a newline. If the match fails at the newline, later code breaks
6758 /* There are some optimizations that avoid running the match if a known
6762 (*NO_START_OPT) or passed in match-time options. */
6781 /* Or to just after a linebreak for a multiline match */
6803 and we are now at a LF, advance the match position by one more character.
6840 a lower bound; no actual string of that length may actually match the
6852 subject for the match to succeed. If the first character is set, req_char
6853 must be later in the subject; otherwise the test starts at the match point.
6855 nested unlimited repeats that aren't going to match. Writing separate code
6857 autoincrement and backing off on a match.
6891 forcing a match failure. */
6909 printf(">>>> Match against: ");
6914 /* OK, we can now run the match. If "hitend" is set afterwards, remember the
6915 first starting point for which a partial match was found. */
6923 rc = match(start_match, md->start_code, start_match, 2, md, NULL, 0);
6934 entirely. The only way we can do that is to re-do the match at the same
6945 greater than the match we have just done, treat it as NOMATCH. */
6976 /* Any other return is either a match, or some kind of error. */
6982 /* Control reaches here for the various types of "no match at this point"
6987 /* If PCRE_FIRSTLINE is set, the match must happen before or at the first
6989 if we have just failed to match, starting at a newline, do not continue. */
7004 or ANY or ANYCRLF, advance the match position by one more character. In
7019 match attempt */
7027 (1) The pattern is anchored or the match was failed by (*COMMIT);
7031 (3) PCRE_FIRSTLINE is set and we have failed to match at a newline, because
7032 this option requests that a match occur at or before the first newline in
7035 When we have a match and the offset vector is big enough to deal with any
7106 /* Control gets here if there has been an error, or if the overall match
7115 /* For anything other than nomatch or partial match, just return the code. */