Home | History | Annotate | Download | only in src

Lines Matching refs:pattern

100 ways in the different pattern scans. The group-identifying pre-scan uses it to
135 end of the pattern, because this means that tests for coding sequences such as
137 keep checking for the end of the pattern. The new PCRE2 API allows zero code
141 pattern fits; if not, heap memory is used. */
146 that holds the compiled pattern length does not overflow. We make it a bit less
626 ERR86, /* Pattern too complicated */
630 /* This is a table of start-of-pattern options such as (*UTF) and settings such
805 callout points before each pattern item.
809 ptr current pattern pointer
819 PUT(code, 1, ptr - cb->start_pattern); /* Pattern offset */
831 /* A callout item contains the length of the next item in the pattern, which
837 ptr current pattern pointer
863 it fails, the error message can point to the correct place in the pattern.
872 code points to the start of the pattern (the bracket)
874 atend TRUE if called when the pattern is complete
907 use this information if there are no (?| groups in the pattern, because
925 more often when (?| groups are present in the pattern. */
987 it until the end of the pattern, so return FFL_LATER. */
1336 /* This function scans through a branch of a compiled pattern to see whether it
1338 entire pattern, and from compile_branch() when checking for an unlimited repeat
1341 the compiled pattern.
1353 atend TRUE if being called to check an entire pattern
1355 countptr pointer to count to catch over-complicated pattern
1359 -1 if the pattern is too complicated
1382 use this information if there are no (?| groups in the pattern, because
1396 present in the pattern and the caching is disabled. Setting the cap at 1100
1422 function is called at the end, to check a complete pattern. Before then,
1799 pattern's options.
1804 points to the end of the whole pattern. However, we can detect this case
2314 ptrptr the pattern position pointer
2467 /* This function scans through a compiled pattern until it finds an instance of
3199 ptrptr points to pointer to the start of the pattern
3247 /* Now scan the pattern */
3308 /* Process the next pattern item. */
3829 /* Scan the pattern, compiling it into the a vector. If the options are
3838 ptrptr points to the current pattern pointer
3890 dynamically as we process the pattern. */
3971 /* Get next character in the pattern */
4044 /* If c is not NULL we are not at the end of the pattern. If it is NULL, we
4045 may still be in the pattern with a NULL data item. In these cases, if we are
4156 /* Process the next pattern item. */
4353 the end of the pattern, to allow binary zero as data. */
4940 pattern (tested at the start of this loop). */
5461 as a subroutine from elsewhere in the pattern, so now we stick in
6897 end of compiling the pattern is scanned and these numbers are
6898 replaced by offsets within the pattern. It is done like this to avoid
7066 The pattern pointer (ptr) is on the bracket.
7114 /* At the end of a group, it's an error if we hit end of pattern or
7207 helpful if the pattern that follows the assertion doesn't set a different
7547 error states. Pass back the position in the pattern so that it can be displayed
7571 ptrptr -> the address of the current pattern pointer
7639 the code that abstracts option settings at the start of the pattern and makes
7795 /* Reached end of expression, either ')' or end of pattern. In the real
7900 * Check for anchored pattern *
7906 it's anchored. However, if this is a multiline pattern, then only OP_SOD will
7914 because that will try the rest of the pattern at all possible matching points,
7930 code points to start of the compiled pattern
8017 inside atomic brackets or in a pattern that contains *PRUNE or *SKIP does not
8021 code points to start of the compiled pattern or a group
8106 brackets that may be referenced, as long as the pattern does not contain
8143 unanchored pattern, it is worth scanning the regex to see if there is an
8151 code points to start of compiled pattern
8264 cases they are in the order in which they appear in the pattern. */
8293 * External function to compile a pattern *
8300 pattern the regular expression
8301 patlen the length of the pattern, or PCRE2_ZERO_TERMINATED
8312 pcre2_compile(PCRE2_SPTR pattern, PCRE2_SIZE patlen, uint32_t options,
8322 PCRE2_SPTR ptr; /* Current pointer in pattern */
8336 int newline = 0; /* Unset; can be set by the pattern */
8337 int bsr = 0; /* Unset; can be set by the pattern */
8354 /* -------------- Check arguments and set up the pattern ----------------- */
8362 /* There must be a pattern! */
8364 if (pattern == NULL)
8383 /* A zero-terminated pattern is indicated by the special length value
8384 PCRE2_ZERO_TERMINATED. Otherwise, we make a copy of the pattern and add a zero,
8386 the pattern's characters. In both cases, check that the pattern is overlong. */
8390 patlen = PRIV(strlen)(pattern);
8416 memcpy(copied_pattern, pattern, CU2BYTES(patlen));
8418 pattern = copied_pattern;
8434 cb.end_pattern = pattern + patlen;
8451 cb.start_pattern = pattern;
8462 /* --------------- Start looking at the pattern --------------- */
8464 /* Check for global one-time option settings at the start of the pattern, and
8467 ptr = pattern;
8535 /* End of pattern-start options; advance to start of real regex. */
8561 (errorcode = PRIV(valid_utf)(pattern, patlen, erroroffset)) != 0)
8613 /* Before we do anything else, do a pre-scan of the pattern in order to
8635 pattern. */
8638 ptr = pattern + skipatstart;
8640 /* Pretend to compile the pattern while actually just accumulating the amount
8643 workspace (cworkspace) for it to compile parts of the pattern into; the
8652 first argument) because that may change as the pattern is processed. */
8669 the compiled pattern and names table. Integer overflow should no longer be
8734 compile data block. The start/end pattern and initial options are already set
8767 ptr = pattern + skipatstart;
8798 /* Scan the pattern for recursion/subroutine calls and convert the group
8888 exceptional ones forgo this. We scan the pattern to check that they are fixed
8940 *erroroffset = (int)(ptr - pattern);
8949 we can determine that the pattern is anchored by virtue of ^ characters or \A
8958 /* If the pattern is still not anchored and we do not have a first code unit,
9008 pattern, do this only if it follows a variable length item in the pattern.
9033 /* Check for a pattern than can match an empty string, so that this information
9054 /* Finally, unless PCRE2_NO_START_OPTIMIZE is set, study the compiled pattern
9066 zero-terminated copy of the pattern, remember to free it before returning. Also