Lines Matching defs:ptr

981 chptr. On entry, ptr is pointing at the \. On exit, it is on the final
1004 const pcre_uchar *ptr = *ptrptr + 1;
1009 GETCHARINCTEST(c, ptr); /* Get character value, increment pointer */
1010 ptr--; /* Set pointer back to the last byte */
1055 if (MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0
1056 && MAX_255(ptr[2]) && (digitab[ptr[2]] & ctype_xdigit) != 0
1057 && MAX_255(ptr[3]) && (digitab[ptr[3]] & ctype_xdigit) != 0
1058 && MAX_255(ptr[4]) && (digitab[ptr[4]] & ctype_xdigit) != 0)
1063 register pcre_uint32 cc = *(++ptr);
1114 if (ptr[1] == CHAR_LESS_THAN_SIGN || ptr[1] == CHAR_APOSTROPHE)
1122 if (ptr[1] == CHAR_LEFT_CURLY_BRACKET)
1125 for (p = ptr+2; *p != CHAR_NULL && *p != CHAR_RIGHT_CURLY_BRACKET; p++)
1133 ptr++;
1137 if (ptr[1] == CHAR_MINUS)
1140 ptr++;
1147 while (IS_DIGIT(ptr[1]))
1154 s = s * 10 + (int)(*(++ptr) - CHAR_0);
1158 while (IS_DIGIT(ptr[1]))
1159 ptr++;
1164 if (braced && *(++ptr) != CHAR_RIGHT_CURLY_BRACKET)
1210 oldptr = ptr;
1214 while (IS_DIGIT(ptr[1]))
1221 s = s * 10 + (int)(*(++ptr) - CHAR_0);
1225 while (IS_DIGIT(ptr[1]))
1226 ptr++;
1235 ptr = oldptr; /* Put the pointer back and fall through */
1243 if ((c = *ptr) >= CHAR_8) break;
1255 while(i++ < 2 && ptr[1] >= CHAR_0 && ptr[1] <= CHAR_7)
1256 c = c * 8 + *(++ptr) - CHAR_0;
1266 if (ptr[1] != CHAR_LEFT_CURLY_BRACKET) *errorcodeptr = ERR81; else
1267 if (ptr[2] == CHAR_RIGHT_CURLY_BRACKET) *errorcodeptr = ERR86; else
1269 ptr += 2;
1272 while (*ptr >= CHAR_0 && *ptr <= CHAR_7)
1274 register pcre_uint32 cc = *ptr++;
1290 while (*ptr >= CHAR_0 && *ptr <= CHAR_7) ptr++;
1293 else if (*ptr == CHAR_RIGHT_CURLY_BRACKET)
1307 if (MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0
1308 && MAX_255(ptr[2]) && (digitab[ptr[2]] & ctype_xdigit) != 0)
1313 register pcre_uint32 cc = *(++ptr);
1334 if (ptr[1] == CHAR_LEFT_CURLY_BRACKET)
1336 ptr += 2;
1337 if (*ptr == CHAR_RIGHT_CURLY_BRACKET)
1344 while (MAX_255(*ptr) && (digitab[*ptr] & ctype_xdigit) != 0)
1346 register pcre_uint32 cc = *ptr++;
1372 while (MAX_255(*ptr) && (digitab[*ptr] & ctype_xdigit) != 0) ptr++;
1376 else if (*ptr == CHAR_RIGHT_CURLY_BRACKET)
1394 while (i++ < 2 && MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0)
1397 cc = *(++ptr); /* ++ in initializers */
1416 c = *(++ptr);
1457 if (escape == ESC_N && ptr[1] == CHAR_LEFT_CURLY_BRACKET &&
1458 !is_counted_repeat(ptr+2))
1468 *ptrptr = ptr;
1501 const pcre_uchar *ptr = *ptrptr;
1504 c = *(++ptr);
1514 if (ptr[1] == CHAR_CIRCUMFLEX_ACCENT)
1517 ptr++;
1521 c = *(++ptr);
1538 *ptrptr = ptr;
1560 *ptrptr = ptr;
1565 *ptrptr = ptr;
1588 current ptr on error, with errorcodeptr set non-zero
3862 ptr pointer to the initial [
3869 check_posix_syntax(const pcre_uchar *ptr, const pcre_uchar **endptr)
3872 terminator = *(++ptr); /* compiler warns about "non-constant" initializer. */
3873 for (++ptr; *ptr != CHAR_NULL; ptr++)
3875 if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
3876 ptr++;
3877 else if (*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
3880 if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
3882 *endptr = ptr;
3885 if (*ptr == CHAR_LEFT_SQUARE_BRACKET &&
3886 (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
3887 ptr[1] == CHAR_EQUALS_SIGN) &&
3888 check_posix_syntax(ptr, endptr))
3906 ptr points to the first letter
3913 check_posix_name(const pcre_uchar *ptr, int len)
3920 STRNCMP_UC_C8(ptr, pn, (unsigned int)len) == 0) return yield;
3963 pcre_uchar *ptr = group;
3965 while ((ptr = (pcre_uchar *)find_recurse(ptr, utf)) != NULL)
3976 if (cd->start_code + offset == ptr + 1)
3988 offset = (int)GET(ptr, 1);
3989 if (cd->start_code + offset >= group) PUT(ptr, 1, offset + adjust);
3992 ptr += 1 + LINK_SIZE;
4007 ptr current pattern pointer
4014 auto_callout(pcre_uchar *code, const pcre_uchar *ptr, compile_data *cd)
4018 PUT(code, 0, (int)(ptr - cd->start_pattern)); /* Pattern offset */
4035 ptr current pattern pointer
4042 complete_callout(pcre_uchar *previous_callout, const pcre_uchar *ptr, compile_data *cd)
4044 int length = (int)(ptr - cd->start_pattern - GET(previous_callout, 2));
4413 const pcre_uchar *ptr = *ptrptr;
4478 for (;; ptr++)
4505 c = *ptr;
4512 ptr = nestptr;
4514 c = *ptr;
4587 if (c == CHAR_BACKSLASH && ptr[1] == CHAR_E)
4590 ptr++;
4598 complete_callout(previous_callout, ptr, cd);
4604 code = auto_callout(code, ptr, cd);
4618 while (MAX_255(c) && (cd->ctypes[c] & ctype_space) != 0) c = *(++ptr);
4620 ptr++;
4621 while (*ptr != CHAR_NULL)
4623 if (IS_NEWLINE(ptr)) /* For non-fixed-length newline cases, */
4625 ptr += cd->nllen;
4628 ptr++;
4630 if (utf) FORWARDCHAR(ptr);
4633 c = *ptr; /* Either NULL or the char after a newline */
4641 (c == CHAR_LEFT_CURLY_BRACKET && is_counted_repeat(ptr+1));
4650 complete_callout(previous_callout, ptr, cd);
4660 code = auto_callout(code, ptr, cd);
4676 *ptrptr = ptr;
4754 if (STRNCMP_UC_C8(ptr+1, STRING_WEIRD_STARTWORD, 6) == 0)
4756 nestptr = ptr + 7;
4757 ptr = sub_start_of_word - 1;
4761 if (STRNCMP_UC_C8(ptr+1, STRING_WEIRD_ENDWORD, 6) == 0)
4763 nestptr = ptr + 7;
4764 ptr = sub_end_of_word - 1;
4775 if ((ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
4776 ptr[1] == CHAR_EQUALS_SIGN) &&
4777 check_posix_syntax(ptr, &tempptr))
4779 *errorcodeptr = (ptr[1] == CHAR_COLON)? ERR13 : ERR31;
4790 c = *(++ptr);
4793 if (ptr[1] == CHAR_E)
4794 ptr++;
4795 else if (STRNCMP_UC_C8(ptr + 1, STR_Q STR_BACKSLASH STR_E, 3) == 0)
4796 ptr += 3;
4865 GETCHARLEN(c, ptr, ptr); /* macro generates multiple statements */
4888 if (c == CHAR_BACKSLASH && ptr[1] == CHAR_E) /* If we are at \E */
4891 ptr++; /* Skip the 'E' */
4904 (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
4905 ptr[1] == CHAR_EQUALS_SIGN) && check_posix_syntax(ptr, &tempptr))
4912 if (ptr[1] != CHAR_COLON)
4918 ptr += 2;
4919 if (*ptr == CHAR_CIRCUMFLEX_ACCENT)
4923 ptr++;
4926 posix_class = check_posix_name(ptr, (int)(tempptr - ptr));
4957 ptr = posix_substitutes[pc] - 1;
4978 ptr = tempptr + 1;
5030 ptr = tempptr + 1;
5049 escape = check_escape(&ptr, &ec, errorcodeptr, cd->bracount, options,
5061 if (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
5063 ptr += 2; /* avoid empty string */
5087 nestptr = ptr;
5088 ptr = substitutes[escape - ESC_DU] - 1; /* Just before substitute */
5154 if (!get_ucp(&ptr, &negated, &ptype, &pdata, errorcodeptr))
5177 c = *ptr; /* Get the final character and fall through */
5195 while (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
5198 ptr += 2;
5200 oldptr = ptr;
5208 if (!inescq && ptr[1] == CHAR_MINUS)
5211 ptr += 2;
5212 while (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_E) ptr += 2;
5217 while (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_Q)
5219 ptr += 2;
5220 if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_E)
5221 { ptr += 2; continue; }
5229 if (*ptr == CHAR_NULL || (!inescq && *ptr == CHAR_RIGHT_SQUARE_BRACKET))
5231 ptr = oldptr;
5240 GETCHARLEN(d, ptr, ptr); /* macro generates multiple statements */
5244 d = *ptr; /* Not UTF-8 mode */
5257 descape = check_escape(&ptr, &d, errorcodeptr, cd->bracount, options, TRUE);
5276 (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
5277 ptr[1] == CHAR_EQUALS_SIGN) &&
5278 check_posix_syntax(ptr, &tempptr))
5329 if (!inescq && class_one_char == 1 && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
5331 ptr++;
5401 while (((c = *(++ptr)) != CHAR_NULL ||
5403 (ptr = nestptr, nestptr = NULL, c = *(++ptr)) != CHAR_NULL)) &&
5504 ptr = read_repeat_counts(ptr+1, &repeat_min, &repeat_max, errorcodeptr);
5555 const pcre_uchar *p = ptr + 1;
5574 ptr = p - 1; /* Character before the next significant one. */
5583 if (ptr[1] == CHAR_PLUS)
5587 ptr++;
5589 else if (ptr[1] == CHAR_QUESTION_MARK)
5592 ptr++;
6435 ptr++;
6436 if (ptr[0] == CHAR_ASTERISK && (ptr[1] == ':'
6437 || (MAX_255(ptr[1]) && ((cd->ctypes[ptr[1]] & ctype_letter) != 0))))
6442 const pcre_uchar *name = ptr + 1;
6445 ptr++;
6446 while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_letter) != 0) ptr++;
6447 namelen = (int)(ptr - name);
6453 if (*ptr == CHAR_COLON)
6455 arg = ++ptr;
6456 while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
6457 arglen = (int)(ptr - arg);
6465 if (*ptr != CHAR_RIGHT_PARENTHESIS)
6559 else if (*ptr == CHAR_QUESTION_MARK)
6566 switch (*(++ptr))
6569 ptr++;
6570 while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
6571 if (*ptr == CHAR_NULL)
6587 ptr++;
6594 tempptr = ptr;
6613 if (ptr[1] == CHAR_QUESTION_MARK && ptr[2] == CHAR_C)
6615 for (i = 3;; i++) if (!IS_DIGIT(ptr[i])) break;
6616 if (ptr[i] == CHAR_RIGHT_PARENTHESIS)
6642 ptr++;
6643 if (*ptr == CHAR_R && ptr[1] == CHAR_AMPERSAND)
6646 ptr += 2;
6654 else if (*ptr == CHAR_LESS_THAN_SIGN)
6657 ptr++;
6659 else if (*ptr == CHAR_APOSTROPHE)
6662 ptr++;
6667 if (*ptr == CHAR_MINUS || *ptr == CHAR_PLUS) refsign = *ptr++;
6668 else if (IS_DIGIT(*ptr)) refsign = 0;
6675 while (IS_DIGIT(*ptr))
6677 recno = recno * 10 + (int)(*ptr - CHAR_0);
6678 ptr++;
6689 if (IS_DIGIT(*ptr))
6694 if (!MAX_255(*ptr) || (cd->ctypes[*ptr] & ctype_word) == 0)
6699 name = ptr++;
6700 while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0)
6702 ptr++;
6704 namelen = (int)(ptr - name);
6711 if ((terminator > 0 && *ptr++ != (pcre_uchar)terminator) ||
6712 *ptr++ != CHAR_RIGHT_PARENTHESIS)
6714 ptr--; /* Error offset */
6840 ptr++;
6851 ptr++;
6852 if (*ptr == CHAR_RIGHT_PARENTHESIS && ptr[1] != CHAR_ASTERISK &&
6853 ptr[1] != CHAR_PLUS && ptr[1] != CHAR_QUESTION_MARK &&
6854 (ptr[1] != CHAR_LEFT_CURLY_BRACKET || !is_counted_repeat(ptr+2)))
6867 switch (ptr[1])
6872 ptr += 2;
6878 ptr += 2;
6882 if (MAX_255(ptr[1]) && (cd->ctypes[ptr[1]] & ctype_word) != 0)
6884 ptr++; /* Correct offset for error */
6894 ptr++;
6905 ptr++;
6906 while(IS_DIGIT(*ptr))
6907 n = n * 10 + *ptr++ - CHAR_0;
6908 if (*ptr != CHAR_RIGHT_PARENTHESIS)
6919 PUT(code, 0, (int)(ptr - cd->start_pattern + 1)); /* Pattern offset */
6929 if (*(++ptr) == CHAR_EQUALS_SIGN ||
6930 *ptr == CHAR_GREATER_THAN_SIGN) /* Reference or recursion */
6932 is_recurse = *ptr == CHAR_GREATER_THAN_SIGN;
6936 else if (*ptr != CHAR_LESS_THAN_SIGN) /* Test for Python-style defn */
6947 terminator = (*ptr == CHAR_LESS_THAN_SIGN)?
6949 name = ++ptr;
6950 if (IS_DIGIT(*ptr))
6955 while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
6956 namelen = (int)(ptr - name);
6969 if (*ptr != (pcre_uchar)terminator)
7050 ptr++; /* Move past > or ' in both passes. */
7067 name = ++ptr;
7068 if (IS_DIGIT(*ptr))
7073 while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
7074 namelen = (int)(ptr - name);
7092 if (*ptr != (pcre_uchar)terminator)
7220 ptr++; /* Same as (?0) */
7240 if ((refsign = *ptr) == CHAR_PLUS)
7242 ptr++;
7243 if (!IS_DIGIT(*ptr))
7251 if (!IS_DIGIT(ptr[1]))
7253 ptr++;
7257 while(IS_DIGIT(*ptr))
7258 recno = recno * 10 + *ptr++ - CHAR_0;
7260 if (*ptr != (pcre_uchar)terminator)
7373 while (*ptr != CHAR_RIGHT_PARENTHESIS && *ptr != CHAR_COLON)
7375 switch (*ptr++)
7392 ptr--; /* Correct the offset */
7422 if (*ptr == CHAR_RIGHT_PARENTHESIS)
7450 ptr++;
7497 &ptr, /* Input pointer (updated) */
7529 The pattern pointer (ptr) is on the bracket.
7577 if (*ptr != CHAR_RIGHT_PARENTHESIS)
7691 tempptr = ptr;
7692 escape = check_escape(&ptr, &ec, errorcodeptr, cd->bracount, options, FALSE);
7701 if (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
7702 ptr += 2; /* avoid empty string */
7735 terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
7748 cf = ptr[1];
7755 /* Signed or unsigned number (cf = ptr[1]) is known to be plus or minus
7758 p = ptr + 2;
7765 ptr++;
7774 if ((ptr[1] != CHAR_LESS_THAN_SIGN &&
7775 ptr[1] != CHAR_APOSTROPHE && ptr[1] != CHAR_LEFT_CURLY_BRACKET))
7781 terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
7782 CHAR_GREATER_THAN_SIGN : (*ptr == CHAR_APOSTROPHE)?
7828 if (!get_ucp(&ptr, &negated, &ptype, &pdata, errorcodeptr))
7861 nestptr = ptr + 1; /* Where to resume */
7862 ptr = substitutes[escape - ESC_DU] - 1; /* Just before substitute */
7906 ACROSSCHAR(TRUE, ptr[1], mcbuffer[mclength++] = *(++ptr));
8000 *ptrptr = ptr;
8010 /* On entry, ptr is pointing past the bracket character, but on return it
8046 const pcre_uchar *ptr = *ptrptr;
8135 if (!compile_branch(&options, &code, &ptr, errorcodeptr, &branchfirstchar,
8139 *ptrptr = ptr;
8229 *ptrptr = ptr;
8248 if (*ptr != CHAR_VERTICAL_LINE)
8301 *ptrptr = ptr;
8340 ptr++;
8743 erroroffset ptr offset in pattern where error was detected
8802 const pcre_uchar *ptr;
8822 ptr = (const pcre_uchar *)pattern;
8872 while (ptr[skipatstart] == CHAR_LEFT_PARENTHESIS &&
8873 ptr[skipatstart+1] == CHAR_ASTERISK)
8883 if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF8_RIGHTPAR, 5) == 0)
8887 if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF16_RIGHTPAR, 6) == 0)
8891 if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF32_RIGHTPAR, 6) == 0)
8895 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF_RIGHTPAR, 4) == 0)
8897 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UCP_RIGHTPAR, 4) == 0)
8899 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_NO_AUTO_POSSESS_RIGHTPAR, 16) == 0)
8901 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_NO_START_OPT_RIGHTPAR, 13) == 0)
8904 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_LIMIT_MATCH_EQ, 12) == 0)
8908 while (isdigit(ptr[p]))
8911 c = c*10 + ptr[p++] - CHAR_0;
8913 if (ptr[p++] != CHAR_RIGHT_PARENTHESIS) break;
8923 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_LIMIT_RECURSION_EQ, 16) == 0)
8927 while (isdigit(ptr[p]))
8930 c = c*10 + ptr[p++] - CHAR_0;
8932 if (ptr[p++] != CHAR_RIGHT_PARENTHESIS) break;
8942 if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_CR_RIGHTPAR, 3) == 0)
8944 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_LF_RIGHTPAR, 3) == 0)
8946 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_CRLF_RIGHTPAR, 5) == 0)
8948 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_ANY_RIGHTPAR, 4) == 0)
8950 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_ANYCRLF_RIGHTPAR, 8) == 0)
8953 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_BSR_ANYCRLF_RIGHTPAR, 12) == 0)
8955 else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_BSR_UNICODE_RIGHTPAR, 12) == 0)
9107 ptr += skipatstart;
9111 (void)compile_regex(cd->external_options, &code, &ptr, &errorcode, FALSE,
9214 ptr = (const pcre_uchar *)pattern + skipatstart;
9217 (void)compile_regex(re->options, &code, &ptr, &errorcode, FALSE, FALSE, 0, 0,
9232 if (errorcode == 0 && *ptr != CHAR_NULL) errorcode = ERR22;
9348 *erroroffset = (int)(ptr - (const pcre_uchar *)pattern);
9489 *erroroffset = ptr - (pcre_uchar *)pattern;