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)
2274 /* Re-print the subject in canonical form, the first time or if giving full
2356 compiled re, which is the first store request that pcre_compile() makes. The
2401 re compiled regex
2410 new_info(pcre *re, pcre_extra *study, int option, void *ptr)
2416 rc = pcre32_fullinfo((pcre32 *)re, (pcre32_extra *)study, option, ptr);
2422 rc = pcre16_fullinfo((pcre16 *)re, (pcre16_extra *)study, option, ptr);
2428 rc = pcre_fullinfo(re, study, option, ptr);
2440 8 * (REAL_PCRE_FLAGS(re) & PCRE_MODE_MASK));
2493 real_pcre8_or_16 *re = (real_pcre8_or_16 *)ere;
2496 pcre_uint16 *ptr = (pcre_uint16 *)re + re->name_table_offset;
2497 int length = re->name_count * re->name_entry_size;
2499 BOOL utf = (re->options & PCRE_UTF16) != 0;
2506 re->magic_number = REVERSED_MAGIC_NUMBER;
2507 re->size = swap_uint32(re->size);
2508 re->options = swap_uint32(re->options);
2509 re->flags = swap_uint32(re->flags);
2510 re->limit_match = swap_uint32(re->limit_match);
2511 re->limit_recursion = swap_uint32(re->limit_recursion);
2512 re->first_char = swap_uint16(re->first_char);
2513 re->req_char = swap_uint16(re->req_char);
2514 re->max_lookbehind = swap_uint16(re->max_lookbehind);
2515 re->top_bracket = swap_uint16(re->top_bracket);
2516 re->top_backref = swap_uint16(re->top_backref);
2517 re->name_table_offset = swap_uint16(re->name_table_offset);
2518 re->name_entry_size = swap_uint16(re->name_entry_size);
2519 re->name_count = swap_uint16(re->name_count);
2520 re->ref_count = swap_uint16(re->ref_count);
2680 real_pcre32 *re = (real_pcre32 *)ere;
2682 pcre_uint32 *ptr = (pcre_uint32 *)re + re->name_table_offset;
2683 int length = re->name_count * re->name_entry_size;
2687 re->magic_number = REVERSED_MAGIC_NUMBER;
2688 re->size = swap_uint32(re->size);
2689 re->options = swap_uint32(re->options);
2690 re->flags = swap_uint32(re->flags);
2691 re->limit_match = swap_uint32(re->limit_match);
2692 re->limit_recursion = swap_uint32(re->limit_recursion);
2693 re->first_char = swap_uint32(re->first_char);
2694 re->req_char = swap_uint32(re->req_char);
2695 re->max_lookbehind = swap_uint16(re->max_lookbehind);
2696 re->top_bracket = swap_uint16(re->top_bracket);
2697 re->top_backref = swap_uint16(re->top_backref);
2698 re->name_table_offset = swap_uint16(re->name_table_offset);
2699 re->name_entry_size = swap_uint16(re->name_entry_size);
2700 re->name_count = swap_uint16(re->name_count);
2701 re->ref_count = swap_uint16(re->ref_count);
2792 check_match_limit(pcre *re, pcre_extra *extra, pcre_uint8 *bptr, int len,
2807 PCRE_EXEC(count, re, extra, bptr, len, start_offset, options,
3452 pcre *re = NULL;
3489 if (extend_inputline(infile, buffer, " re> ") == NULL) break;
3554 re = (pcre *)new_malloc(true_size);
3555 if (re == NULL)
3562 if (fread(re, 1, true_size, f) != true_size) goto FAIL_READ;
3564 magic = REAL_PCRE_MAGIC(re);
3574 new_free(re);
3604 new_free(re);
3617 PCRE_PATTERN_TO_HOST_BYTE_ORDER(rc, re, extra, NULL);
3621 if (REAL_PCRE_MAGIC(re) == MAGIC_NUMBER)
3622 flags_in_host_byte_order = REAL_PCRE_FLAGS(re);
3624 flags_in_host_byte_order = swap_uint32(REAL_PCRE_FLAGS(re));
3631 new_free(re);
3639 if (new_info(re, NULL, PCRE_INFO_OPTIONS, &get_options) < 0)
3641 new_free(re);
3933 /* Compilation failed; go back for another re, skipping to blank line
4014 PCRE_COMPILE(re, p, options, &error, &erroroffset, tables);
4015 if (re != NULL) free(re);
4023 PCRE_COMPILE(re, p, options, &error, &erroroffset, tables);
4025 /* Compilation failed; go back for another re, skipping to blank line
4028 if (re == NULL)
4054 if (new_info(re, NULL, PCRE_INFO_OPTIONS, &get_options) < 0)
4061 true_size = REAL_PCRE_SIZE(re);
4069 new_info(re, NULL, PCRE_INFO_NAMECOUNT, &name_count);
4070 new_info(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &name_entry_size);
4073 if (REAL_PCRE_FLAGS(re) & PCRE_MODE8)
4077 if (REAL_PCRE_FLAGS(re) & PCRE_MODE16)
4081 if (REAL_PCRE_FLAGS(re) & PCRE_MODE32)
4084 new_info(re, NULL, PCRE_INFO_SIZE, &size);
4103 PCRE_STUDY(extra, re, study_options, &error);
4114 PCRE_STUDY(extra, re, study_options, &error);
4123 if (new_info(re, extra, PCRE_INFO_JITSIZE, &jitsize) == 0 &&
4150 PCRE_PRINTINT(re, outfile, debug_lengths);
4165 if (new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) +
4166 new_info(re, NULL, PCRE_INFO_BACKREFMAX, &backrefmax) +
4167 new_info(re, NULL, PCRE_INFO_FIRSTCHARACTER, &first_char) +
4168 new_info(re, NULL, PCRE_INFO_FIRSTCHARACTERFLAGS, &first_char_set) +
4169 new_info(re, NULL, PCRE_INFO_REQUIREDCHAR, &need_char) +
4170 new_info(re, NULL, PCRE_INFO_REQUIREDCHARFLAGS, &need_char_set) +
4171 new_info(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &nameentrysize) +
4172 new_info(re, NULL, PCRE_INFO_NAMECOUNT, &namecount) +
4173 new_info(re, NULL, PCRE_INFO_NAMETABLE, (void *)&nametable) +
4174 new_info(re, NULL, PCRE_INFO_OKPARTIAL, &okpartial) +
4175 new_info(re, NULL, PCRE_INFO_JCHANGED, &jchanged) +
4176 new_info(re, NULL, PCRE_INFO_HASCRORLF, &hascrorlf) +
4177 new_info(re, NULL, PCRE_INFO_MATCH_EMPTY, &match_empty) +
4178 new_info(re, NULL, PCRE_INFO_MAXLOOKBEHIND, &maxlookbehind)
4190 if (new_info(re, NULL, PCRE_INFO_MATCHLIMIT, &match_limit) == 0)
4193 if (new_info(re, NULL, PCRE_INFO_RECURSIONLIMIT, &recursion_limit) == 0)
4226 all_options = REAL_PCRE_OPTIONS(re);
4286 ((REAL_PCRE_FLAGS(re) & PCRE_FCH_CASELESS) == 0)?
4310 ((REAL_PCRE_FLAGS(re) & PCRE_RCH_CASELESS) == 0)?
4340 if (new_info(re, extra, PCRE_INFO_MINLENGTH, &minlength) == 0)
4343 if (new_info(re, extra, PCRE_INFO_FIRSTTABLE, &start_bits) == 0)
4384 if (new_info(re, extra, PCRE_INFO_JIT, &jit) == 0)
4414 if (do_flip) regexflip(re, extra);
4425 fwrite(re, 1, true_size, f) < true_size)
4449 new_free(re);
4549 /* Check that the data is well-formed UTF-8 if we're in UTF mode. To create
4731 READ_CAPTURE_NAME(p, &cn8ptr, &cn16ptr, &cn32ptr, re);
4794 READ_CAPTURE_NAME(p, &gn8ptr, &gn16ptr, &gn32ptr, re);
5006 /* If we're compiling with explicit valgrind support, Mark the data from after
5009 If we're not building with valgrind support, at least move the data to the end
5125 PCRE_DFA_EXEC(count, re, extra, bptr, len, start_offset,
5135 PCRE_EXEC(count, re, extra, bptr, len, start_offset,
5157 (void)check_match_limit(re, extra, bptr, len, start_offset,
5162 count = check_match_limit(re, extra, bptr, len, start_offset,
5179 PCRE_EXEC(count, re, extra, bptr, len, start_offset,
5194 PCRE_DFA_EXEC(count, re, extra, bptr, len, start_offset,
5207 PCRE_EXEC(count, re, extra, bptr, len, start_offset,
5250 if (new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) < 0)
5353 PCRE_COPY_NAMED_SUBSTRING(rc, re, bptr, use_offsets, count,
5418 PCRE_GET_NAMED_SUBSTRING(rc, re, bptr, use_offsets, count,
5506 unsigned int obits = REAL_PCRE_OPTIONS(re);
5643 if (re != NULL) new_free(re);