Lines Matching refs:pattern

70 /* This must be nonzero for the wordchar and notwordchar pattern
270 the range 0 to one less than the pattern buffer's re_nsub
280 pattern buffer, and one byte with the number of inner groups,
378 /* Common operations on the compiled pattern. */
513 /* Print a compiled pattern string in human-readable form, starting at
531 /* Loop over pattern commands. */
795 also be assigned to arbitrarily: each pattern buffer stores its own
850 /* Fetch the next character in the uncompiled pattern---translating it
860 /* Fetch the next character in the uncompiled pattern, with no
867 /* Go backwards one character in the pattern. */
878 /* Macros for outputting the compiled pattern into `buffer'. */
934 into the pattern are two bytes long. So if 2^16 bytes turns out to
1018 /* Get the next unsigned number in the uncompiled pattern. */
1054 `buffer' is the compiled pattern;
1056 `used' is set to the length of the compiled pattern;
1065 regex_compile (pattern, size, syntax, bufp)
1066 const char *pattern;
1085 /* Points to the current (ending) position in the pattern. */
1086 const char *p = pattern;
1087 const char *pend = pattern + size;
1089 /* How to translate the characters in the pattern. */
1106 /* Place in the uncompiled pattern (i.e., the {) to
1121 DEBUG_PRINT1 ("\nCompiling pattern: ");
1127 printchar (pattern[debug_count]);
1140 /* Initialize the pattern buffer. */
1145 /* Set `used' to zero, so that if we return an error, the pattern
1146 printer (for debugging) will think there's no pattern. We reset it
1177 /* Loop through the uncompiled pattern until we're at the end. */
1186 if ( /* If at start of pattern, it's an operator. */
1187 p == pattern + 1
1191 || at_begline_loc_p (pattern, p, syntax))
1201 if ( /* If at end of pattern, it's an operator. */
1221 /* If there is no previous pattern... */
1279 /* Star, etc. applied to an empty pattern is equivalent
1280 to an empty pattern. */
1297 assert (p - 1 > pattern);
1302 /* We know we are not at the first character of the pattern,
1418 && !(p - 2 >= pattern && p[-2] == '[')
1419 && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
1448 /* If pattern is `[[:'. */
1596 whole pattern moves because of realloc, they will still
1607 represent in the compiled pattern. */
1743 || (p - 2 == pattern && p == pend))
1822 we're all done, the pattern will look like:
1872 inserting into the middle of the pattern --
1901 if (p > pattern && p[-1] == '\\')
2037 /* Through the pattern now. */
2053 DEBUG_PRINT1 ("\nCompiled pattern: ");
2135 at_begline_loc_p (pattern, p, syntax)
2136 const char *pattern, *p;
2140 boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
2193 uncompiled pattern *P_PTR (which ends at PEND). We assume the
2196 ending characters (inclusive) in the compiled pattern B.
2218 /* Even though the pattern is a signed `char *', we need to fetch
2219 with unsigned char *'s; if the high bit of the pattern character
2228 /* Have to increment the pointer into the pattern string, so the
2417 DEBUG_PRINT2 (" Pushing pattern 0x%x: ", pattern_place); \
2458 PAT -- the saved pattern position.
2496 DEBUG_PRINT2 (" Popping pattern 0x%x: ", pat); \
2524 /* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
2526 characters can start a string that matches the pattern. This fastmap
2533 the pattern buffer.
2550 unsigned char *pattern = bufp->buffer;
2552 const unsigned char *p = pattern;
2553 register unsigned char *pend = pattern + size;
2555 /* Assume that each path through the pattern can be null until
2583 /* We should never be about to go beyond the end of the pattern. */
2740 end of the pattern. We don't want to push such a point,
2742 increment `p' past the end of the pattern. We don't need
2744 fastmap entries beyond `pend'. Such a pattern can match
2794 characters for one path of the pattern -- and that the empty
2804 pattern is empty). */
2863 /* Using the compiled pattern in BUFP->buffer, first tries to match the
2912 search for a pattern that must be anchored. */
2930 cannot be the start of a match. If the pattern can match the
3131 we use only one byte in the pattern for the register number), we can
3157 /* re_match_2 matches the compiled pattern in BUFP against the
3193 /* Where we are in the pattern, and the end of the pattern. */
3205 to resume scanning the pattern; the second one is where to resume
3226 attempt) by a subexpression part of the pattern, that is, the
3227 regnum-th regstart pointer points to where in the pattern we began
3230 keeps track of what the whole pattern matches.) */
3243 matched any of the pattern so far this time through the reg_num-th
3279 no groups in the pattern, as it takes a fair amount of time. If
3281 pattern), even though we never use it, since it simplifies the
3358 /* `p' scans through the pattern as `d' scans through the data.
3375 DEBUG_PRINT1 ("The compiled pattern is: ");
3381 /* This loops over pattern commands. It exits by returning from the
3389 { /* End of pattern means we might have succeeded. */
3390 DEBUG_PRINT1 ("end of pattern ... ");
3428 For example, the pattern `x.*y.*z' against the
3502 were in the pattern, set the extra elements to -1. If
3525 /* Otherwise match next pattern command. */
3539 /* Match the next n pattern characters exactly. The following
3540 byte in the pattern defines n, and the n bytes after that
3745 /* If the next operation is a jump backwards in the pattern
3749 on_failure_jump's jump in the pattern, and d. */
3994 pattern follows its end. If we can establish that there
4012 /* If we're at the end of the pattern, we can change. */
4020 (" End of pattern: change to `pop_failure_jump'.\n");
4073 on_failure_jump; we got through the pattern to here from the
4113 pop_failure_jump, also, and with a pattern of, say, `a+', we
4119 the code at `fail' tests is the value for the pattern. */
4293 continue; /* Successfully executed one pattern command; keep going. */
4309 /* If we failed to the end of the pattern, don't examine *p. */
4359 Return true if the pattern up to the corresponding stop_memory can
4390 pattern. */
4398 with a jump, e.g., here is the pattern for `a|b|c':
4621 Returns 0 if the pattern was valid, otherwise an error string.
4629 re_compile_pattern (pattern, length, bufp)
4630 const char *pattern;
4648 ret = regex_compile (pattern, length, re_syntax_options, bufp);
4659 /* BSD has one and only one pattern buffer. */
4688 don't need to initialize the pattern buffer fields which affect it. */
4720 `buffer' to the compiled pattern;
4721 `used' to the length of the compiled pattern;
4729 PATTERN is the address of the pattern string.
4750 regcomp (preg, pattern, cflags)
4752 const char *pattern;
4760 /* regex_compile will allocate the space for the compiled pattern. */
4798 /* POSIX says a null character in the pattern terminates it, so we
4799 can use strlen here in compiling the pattern. */
4800 ret = regex_compile (pattern, strlen (pattern), syntax, preg);
4810 /* regexec searches for a given pattern, specified by PREG, in the