Lines Matching refs:re
228 #define READ_CAPTURE_NAME8(p, cn8, cn16, cn32, re) \
229 p = read_capture_name8(p, cn8, re)
242 #define PCRE_COMPILE8(re, pat, options, error, erroffset, tables) \
243 re = pcre_compile((char *)pat, options, error, erroffset, tables)
245 #define PCRE_COPY_NAMED_SUBSTRING8(rc, re, bptr, offsets, count, \
247 rc = pcre_copy_named_substring(re, (char *)bptr, offsets, count, \
253 #define PCRE_DFA_EXEC8(count, re, extra, bptr, len, start_offset, options, \
255 count = pcre_dfa_exec(re, extra, (char *)bptr, len, start_offset, options, \
258 #define PCRE_EXEC8(count, re, extra, bptr, len, start_offset, options, \
260 count = pcre_exec(re, extra, (char *)bptr, len, start_offset, options, \
272 #define PCRE_GET_NAMED_SUBSTRING8(rc, re, bptr, offsets, count, \
274 rc = pcre_get_named_substring(re, (char *)bptr, offsets, count, \
278 n = pcre_get_stringnumber(re, (char *)ptr)
286 #define PCRE_PATTERN_TO_HOST_BYTE_ORDER8(rc, re, extra, tables) \
287 rc = pcre_pattern_to_host_byte_order(re, extra, tables)
289 #define PCRE_PRINTINT8(re, outfile, debug_lengths) \
290 pcre_printint(re, outfile, debug_lengths)
292 #define PCRE_STUDY8(extra, re, options, error) \
293 extra = pcre_study(re, options, error)
315 #define READ_CAPTURE_NAME16(p, cn8, cn16, cn32, re) \
316 p = read_capture_name16(p, cn16, re)
330 #define PCRE_COMPILE16(re, pat, options, error, erroffset, tables) \
331 re = (pcre *)pcre16_compile((PCRE_SPTR16)pat, options, error, erroffset, \
334 #define PCRE_COPY_NAMED_SUBSTRING16(rc, re, bptr, offsets, count, \
336 rc = pcre16_copy_named_substring((pcre16 *)re, (PCRE_SPTR16)bptr, offsets, \
343 #define PCRE_DFA_EXEC16(count, re, extra, bptr, len, start_offset, options, \
345 count = pcre16_dfa_exec((pcre16 *)re, (pcre16_extra *)extra, \
349 #define PCRE_EXEC16(count, re, extra, bptr, len, start_offset, options, \
351 count = pcre16_exec((pcre16 *)re, (pcre16_extra *)extra, (PCRE_SPTR16)bptr, \
363 #define PCRE_GET_NAMED_SUBSTRING16(rc, re, bptr, offsets, count, \
365 rc = pcre16_get_named_substring((pcre16 *)re, (PCRE_SPTR16)bptr, offsets, \
369 n = pcre16_get_stringnumber(re, (PCRE_SPTR16)ptr)
379 #define PCRE_PATTERN_TO_HOST_BYTE_ORDER16(rc, re, extra, tables) \
380 rc = pcre16_pattern_to_host_byte_order((pcre16 *)re, (pcre16_extra *)extra, \
383 #define PCRE_PRINTINT16(re, outfile, debug_lengths) \
384 pcre16_printint(re, outfile, debug_lengths)
386 #define PCRE_STUDY16(extra, re, options, error) \
387 extra = (pcre_extra *)pcre16_study((pcre16 *)re, options, error)
407 #define READ_CAPTURE_NAME32(p, cn8, cn16, cn32, re) \
408 p = read_capture_name32(p, cn32, re)
422 #define PCRE_COMPILE32(re, pat, options, error, erroffset, tables) \
423 re = (pcre *)pcre32_compile((PCRE_SPTR32)pat, options, error, erroffset, \
426 #define PCRE_COPY_NAMED_SUBSTRING32(rc, re, bptr, offsets, count, \
428 rc = pcre32_copy_named_substring((pcre32 *)re, (PCRE_SPTR32)bptr, offsets, \
435 #define PCRE_DFA_EXEC32(count, re, extra, bptr, len, start_offset, options, \
437 count = pcre32_dfa_exec((pcre32 *)re, (pcre32_extra *)extra, \
441 #define PCRE_EXEC32(count, re, extra, bptr, len, start_offset, options, \
443 count = pcre32_exec((pcre32 *)re, (pcre32_extra *)extra, (PCRE_SPTR32)bptr, \
455 #define PCRE_GET_NAMED_SUBSTRING32(rc, re, bptr, offsets, count, \
457 rc = pcre32_get_named_substring((pcre32 *)re, (PCRE_SPTR32)bptr, offsets, \
461 n = pcre32_get_stringnumber(re, (PCRE_SPTR32)ptr)
471 #define PCRE_PATTERN_TO_HOST_BYTE_ORDER32(rc, re, extra, tables) \
472 rc = pcre32_pattern_to_host_byte_order((pcre32 *)re, (pcre32_extra *)extra, \
475 #define PCRE_PRINTINT32(re, outfile, debug_lengths) \
476 pcre32_printint(re, outfile, debug_lengths)
478 #define PCRE_STUDY32(extra, re, options, error) \
479 extra = (pcre_extra *)pcre32_study((pcre32 *)re, options, error)
529 #define READ_CAPTURE_NAME(p, cn8, cn16, cn32, re) \
531 READ_CAPTURE_NAME32(p, cn8, cn16, cn32, re); \
533 READ_CAPTURE_NAME16(p, cn8, cn16, cn32, re); \
535 READ_CAPTURE_NAME8(p, cn8, cn16, cn32, re)
563 #define PCRE_COMPILE(re, pat, options, error, erroffset, tables) \
565 PCRE_COMPILE32(re, pat, options, error, erroffset, tables); \
567 PCRE_COMPILE16(re, pat, options, error, erroffset, tables); \
569 PCRE_COMPILE8(re, pat, options, error, erroffset, tables)
573 #define PCRE_COPY_NAMED_SUBSTRING(rc, re, bptr, offsets, count, \
576 PCRE_COPY_NAMED_SUBSTRING32(rc, re, bptr, offsets, count, \
579 PCRE_COPY_NAMED_SUBSTRING16(rc, re, bptr, offsets, count, \
582 PCRE_COPY_NAMED_SUBSTRING8(rc, re, bptr, offsets, count, \
593 #define PCRE_DFA_EXEC(count, re, extra, bptr, len, start_offset, options, \
596 PCRE_DFA_EXEC32(count, re, extra, bptr, len, start_offset, options, \
599 PCRE_DFA_EXEC16(count, re, extra, bptr, len, start_offset, options, \
602 PCRE_DFA_EXEC8(count, re, extra, bptr, len, start_offset, options, \
605 #define PCRE_EXEC(count, re, extra, bptr, len, start_offset, options, \
608 PCRE_EXEC32(count, re, extra, bptr, len, start_offset, options, \
611 PCRE_EXEC16(count, re, extra, bptr, len, start_offset, options, \
614 PCRE_EXEC8(count, re, extra, bptr, len, start_offset, options, \
641 #define PCRE_GET_NAMED_SUBSTRING(rc, re, bptr, offsets, count, \
644 PCRE_GET_NAMED_SUBSTRING32(rc, re, bptr, offsets, count, \
647 PCRE_GET_NAMED_SUBSTRING16(rc, re, bptr, offsets, count, \
650 PCRE_GET_NAMED_SUBSTRING8(rc, re, bptr, offsets, count, \
695 #define PCRE_PATTERN_TO_HOST_BYTE_ORDER(rc, re, extra, tables) \
697 PCRE_PATTERN_TO_HOST_BYTE_ORDER32(rc, re, extra, tables); \
699 PCRE_PATTERN_TO_HOST_BYTE_ORDER16(rc, re, extra, tables); \
701 PCRE_PATTERN_TO_HOST_BYTE_ORDER8(rc, re, extra, tables)
703 #define PCRE_PRINTINT(re, outfile, debug_lengths) \
705 PCRE_PRINTINT32(re, outfile, debug_lengths); \
707 PCRE_PRINTINT16(re, outfile, debug_lengths); \
709 PCRE_PRINTINT8(re, outfile, debug_lengths)
711 #define PCRE_STUDY(extra, re, options, error) \
713 PCRE_STUDY32(extra, re, options, error); \
715 PCRE_STUDY16(extra, re, options, error); \
717 PCRE_STUDY8(extra, re, options, error)
764 #define READ_CAPTURE_NAME(p, cn8, cn16, cn32, re) \
766 G(READ_CAPTURE_NAME,BITONE)(p, cn8, cn16, cn32, re); \
768 G(READ_CAPTURE_NAME,BITTWO)(p, cn8, cn16, cn32, re)
791 #define PCRE_COMPILE(re, pat, options, error, erroffset, tables) \
793 G(PCRE_COMPILE,BITONE)(re, pat, options, error, erroffset, tables); \
795 G(PCRE_COMPILE,BITTWO)(re, pat, options, error, erroffset, tables)
799 #define PCRE_COPY_NAMED_SUBSTRING(rc, re, bptr, offsets, count, \
802 G(PCRE_COPY_NAMED_SUBSTRING,BITONE)(rc, re, bptr, offsets, count, \
805 G(PCRE_COPY_NAMED_SUBSTRING,BITTWO)(rc, re, bptr, offsets, count, \
814 #define PCRE_DFA_EXEC(count, re, extra, bptr, len, start_offset, options, \
817 G(PCRE_DFA_EXEC,BITONE)(count, re, extra, bptr, len, start_offset, options, \
820 G(PCRE_DFA_EXEC,BITTWO)(count, re, extra, bptr, len, start_offset, options, \
823 #define PCRE_EXEC(count, re, extra, bptr, len, start_offset, options, \
826 G(PCRE_EXEC,BITONE)(count, re, extra, bptr, len, start_offset, options, \
829 G(PCRE_EXEC,BITTWO)(count, re, extra, bptr, len, start_offset, options, \
850 #define PCRE_GET_NAMED_SUBSTRING(rc, re, bptr, offsets, count, \
853 G(PCRE_GET_NAMED_SUBSTRING,BITONE)(rc, re, bptr, offsets, count, \
856 G(PCRE_GET_NAMED_SUBSTRING,BITTWO)(rc, re, bptr, offsets, count, \
892 #define PCRE_PATTERN_TO_HOST_BYTE_ORDER(rc, re, extra, tables) \
894 G(PCRE_PATTERN_TO_HOST_BYTE_ORDER,BITONE)(rc, re, extra, tables); \
896 G(PCRE_PATTERN_TO_HOST_BYTE_ORDER,BITTWO)(rc, re, extra, tables)
898 #define PCRE_PRINTINT(re, outfile, debug_lengths) \
900 G(PCRE_PRINTINT,BITONE)(re, outfile, debug_lengths); \
902 G(PCRE_PRINTINT,BITTWO)(re, outfile, debug_lengths)
904 #define PCRE_STUDY(extra, re, options, error) \
906 G(PCRE_STUDY,BITONE)(extra, re, options, error); \
908 G(PCRE_STUDY,BITTWO)(extra, re, options, error)
2156 read_capture_name8(pcre_uint8 *p, pcre_uint8 **pp, pcre *re)
2162 if (pcre_get_stringnumber(re, (char *)(*pp)) < 0)
2184 read_capture_name16(pcre_uint8 *p, pcre_uint16 **pp, pcre *re)
2190 if (pcre16_get_stringnumber((pcre16 *)re, (PCRE_SPTR16)(*pp)) < 0)
2211 read_capture_name32(pcre_uint8 *p, pcre_uint32 **pp, pcre *re)
2217 if (pcre32_get_stringnumber((pcre32 *)re, (PCRE_SPTR32)(*pp)) < 0)
2277 /* Re-print the subject in canonical form, the first time or if giving full
2359 compiled re, which is the first store request that pcre_compile() makes. The
2404 re compiled regex
2413 new_info(pcre *re, pcre_extra *study, int option, void *ptr)
2419 rc = pcre32_fullinfo((pcre32 *)re, (pcre32_extra *)study, option, ptr);
2425 rc = pcre16_fullinfo((pcre16 *)re, (pcre16_extra *)study, option, ptr);
2431 rc = pcre_fullinfo(re, study, option, ptr);
2443 8 * (REAL_PCRE_FLAGS(re) & PCRE_MODE_MASK));
2496 real_pcre8_or_16 *re = (real_pcre8_or_16 *)ere;
2499 pcre_uint16 *ptr = (pcre_uint16 *)re + re->name_table_offset;
2500 int length = re->name_count * re->name_entry_size;
2502 BOOL utf = (re->options & PCRE_UTF16) != 0;
2509 re->magic_number = REVERSED_MAGIC_NUMBER;
2510 re->size = swap_uint32(re->size);
2511 re->options = swap_uint32(re->options);
2512 re->flags = swap_uint32(re->flags);
2513 re->limit_match = swap_uint32(re->limit_match);
2514 re->limit_recursion = swap_uint32(re->limit_recursion);
2515 re->first_char = swap_uint16(re->first_char);
2516 re->req_char = swap_uint16(re->req_char);
2517 re->max_lookbehind = swap_uint16(re->max_lookbehind);
2518 re->top_bracket = swap_uint16(re->top_bracket);
2519 re->top_backref = swap_uint16(re->top_backref);
2520 re->name_table_offset = swap_uint16(re->name_table_offset);
2521 re->name_entry_size = swap_uint16(re->name_entry_size);
2522 re->name_count = swap_uint16(re->name_count);
2523 re->ref_count = swap_uint16(re->ref_count);
2683 real_pcre32 *re = (real_pcre32 *)ere;
2685 pcre_uint32 *ptr = (pcre_uint32 *)re + re->name_table_offset;
2686 int length = re->name_count * re->name_entry_size;
2690 re->magic_number = REVERSED_MAGIC_NUMBER;
2691 re->size = swap_uint32(re->size);
2692 re->options = swap_uint32(re->options);
2693 re->flags = swap_uint32(re->flags);
2694 re->limit_match = swap_uint32(re->limit_match);
2695 re->limit_recursion = swap_uint32(re->limit_recursion);
2696 re->first_char = swap_uint32(re->first_char);
2697 re->req_char = swap_uint32(re->req_char);
2698 re->max_lookbehind = swap_uint16(re->max_lookbehind);
2699 re->top_bracket = swap_uint16(re->top_bracket);
2700 re->top_backref = swap_uint16(re->top_backref);
2701 re->name_table_offset = swap_uint16(re->name_table_offset);
2702 re->name_entry_size = swap_uint16(re->name_entry_size);
2703 re->name_count = swap_uint16(re->name_count);
2704 re->ref_count = swap_uint16(re->ref_count);
2795 check_match_limit(pcre *re, pcre_extra *extra, pcre_uint8 *bptr, int len,
2810 PCRE_EXEC(count, re, extra, bptr, len, start_offset, options,
3455 pcre *re = NULL;
3492 if (extend_inputline(infile, buffer, " re> ") == NULL) break;
3557 re = (pcre *)new_malloc(true_size);
3558 if (re == NULL)
3565 if (fread(re, 1, true_size, f) != true_size) goto FAIL_READ;
3567 magic = REAL_PCRE_MAGIC(re);
3577 new_free(re);
3607 new_free(re);
3620 PCRE_PATTERN_TO_HOST_BYTE_ORDER(rc, re, extra, NULL);
3624 if (REAL_PCRE_MAGIC(re) == MAGIC_NUMBER)
3625 flags_in_host_byte_order = REAL_PCRE_FLAGS(re);
3627 flags_in_host_byte_order = swap_uint32(REAL_PCRE_FLAGS(re));
3634 new_free(re);
3642 if (new_info(re, NULL, PCRE_INFO_OPTIONS, &get_options) < 0)
3644 new_free(re);
3936 /* Compilation failed; go back for another re, skipping to blank line
4017 PCRE_COMPILE(re, p, options, &error, &erroroffset, tables);
4018 if (re != NULL) free(re);
4026 PCRE_COMPILE(re, p, options, &error, &erroroffset, tables);
4028 /* Compilation failed; go back for another re, skipping to blank line
4031 if (re == NULL)
4057 if (new_info(re, NULL, PCRE_INFO_OPTIONS, &get_options) < 0)
4064 true_size = REAL_PCRE_SIZE(re);
4072 new_info(re, NULL, PCRE_INFO_NAMECOUNT, &name_count);
4073 new_info(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &name_entry_size);
4076 if (REAL_PCRE_FLAGS(re) & PCRE_MODE8)
4080 if (REAL_PCRE_FLAGS(re) & PCRE_MODE16)
4084 if (REAL_PCRE_FLAGS(re) & PCRE_MODE32)
4087 new_info(re, NULL, PCRE_INFO_SIZE, &size);
4106 PCRE_STUDY(extra, re, study_options, &error);
4117 PCRE_STUDY(extra, re, study_options, &error);
4126 if (new_info(re, extra, PCRE_INFO_JITSIZE, &jitsize) == 0 &&
4153 PCRE_PRINTINT(re, outfile, debug_lengths);
4168 if (new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) +
4169 new_info(re, NULL, PCRE_INFO_BACKREFMAX, &backrefmax) +
4170 new_info(re, NULL, PCRE_INFO_FIRSTCHARACTER, &first_char) +
4171 new_info(re, NULL, PCRE_INFO_FIRSTCHARACTERFLAGS, &first_char_set) +
4172 new_info(re, NULL, PCRE_INFO_REQUIREDCHAR, &need_char) +
4173 new_info(re, NULL, PCRE_INFO_REQUIREDCHARFLAGS, &need_char_set) +
4174 new_info(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &nameentrysize) +
4175 new_info(re, NULL, PCRE_INFO_NAMECOUNT, &namecount) +
4176 new_info(re, NULL, PCRE_INFO_NAMETABLE, (void *)&nametable) +
4177 new_info(re, NULL, PCRE_INFO_OKPARTIAL, &okpartial) +
4178 new_info(re, NULL, PCRE_INFO_JCHANGED, &jchanged) +
4179 new_info(re, NULL, PCRE_INFO_HASCRORLF, &hascrorlf) +
4180 new_info(re, NULL, PCRE_INFO_MATCH_EMPTY, &match_empty) +
4181 new_info(re, NULL, PCRE_INFO_MAXLOOKBEHIND, &maxlookbehind)
4193 if (new_info(re, NULL, PCRE_INFO_MATCHLIMIT, &match_limit) == 0)
4196 if (new_info(re, NULL, PCRE_INFO_RECURSIONLIMIT, &recursion_limit) == 0)
4229 all_options = REAL_PCRE_OPTIONS(re);
4289 ((REAL_PCRE_FLAGS(re) & PCRE_FCH_CASELESS) == 0)?
4313 ((REAL_PCRE_FLAGS(re) & PCRE_RCH_CASELESS) == 0)?
4343 if (new_info(re, extra, PCRE_INFO_MINLENGTH, &minlength) == 0)
4346 if (new_info(re, extra, PCRE_INFO_FIRSTTABLE, &start_bits) == 0)
4387 if (new_info(re, extra, PCRE_INFO_JIT, &jit) == 0)
4417 if (do_flip) regexflip(re, extra);
4428 fwrite(re, 1, true_size, f) < true_size)
4452 new_free(re);
4552 /* Check that the data is well-formed UTF-8 if we're in UTF mode. To create
4734 READ_CAPTURE_NAME(p, &cn8ptr, &cn16ptr, &cn32ptr, re);
4797 READ_CAPTURE_NAME(p, &gn8ptr, &gn16ptr, &gn32ptr, re);
5009 /* If we're compiling with explicit valgrind support, Mark the data from after
5012 If we're not building with valgrind support, at least move the data to the end
5128 PCRE_DFA_EXEC(count, re, extra, bptr, len, start_offset,
5138 PCRE_EXEC(count, re, extra, bptr, len, start_offset,
5160 (void)check_match_limit(re, extra, bptr, len, start_offset,
5165 count = check_match_limit(re, extra, bptr, len, start_offset,
5182 PCRE_EXEC(count, re, extra, bptr, len, start_offset,
5197 PCRE_DFA_EXEC(count, re, extra, bptr, len, start_offset,
5210 PCRE_EXEC(count, re, extra, bptr, len, start_offset,
5253 if (new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) < 0)
5356 PCRE_COPY_NAMED_SUBSTRING(rc, re, bptr, use_offsets, count,
5421 PCRE_GET_NAMED_SUBSTRING(rc, re, bptr, use_offsets, count,
5509 unsigned int obits = REAL_PCRE_OPTIONS(re);
5676 if (re != NULL) new_free(re);