
Go to the source code of this file.
Classes | |
struct | compile_stack_elt_t |
struct | compile_stack_type |
struct | fail_stack_type |
union | register_info_type |
Macros | |
#define | _GNU_SOURCE 1 |
#define | REGEX_MALLOC 1 |
#define | Sword 1 |
#define | CHAR_SET_SIZE 256 |
#define | isascii(c) 1 |
#define | ISBLANK(c) ((c) == ' ' || (c) == '\t') |
#define | ISGRAPH(c) (isascii ((unsigned char)c) && isprint ((unsigned char)c) && !isspace ((unsigned char)c)) |
#define | ISPRINT(c) (isascii ((unsigned char)c) && isprint ((unsigned char)c)) |
#define | ISDIGIT(c) (isascii ((unsigned char)c) && isdigit ((unsigned char)c)) |
#define | ISALNUM(c) (isascii ((unsigned char)c) && isalnum ((unsigned char)c)) |
#define | ISALPHA(c) (isascii ((unsigned char)c) && isalpha ((unsigned char)c)) |
#define | ISCNTRL(c) (isascii ((unsigned char)c) && iscntrl ((unsigned char)c)) |
#define | ISLOWER(c) (isascii ((unsigned char)c) && islower ((unsigned char)c)) |
#define | ISPUNCT(c) (isascii ((unsigned char)c) && ispunct ((unsigned char)c)) |
#define | ISSPACE(c) (isascii ((unsigned char)c) && isspace ((unsigned char)c)) |
#define | ISUPPER(c) (isascii ((unsigned char)c) && isupper ((unsigned char)c)) |
#define | ISXDIGIT(c) (isascii ((unsigned char)c) && isxdigit ((unsigned char)c)) |
#define | SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128) |
#define | REGEX_ALLOCATE malloc |
#define | REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize) |
#define | FIRST_STRING_P(ptr) (size1 && string1 <= (ptr) && (ptr) <= string1 + size1) |
#define | TALLOC(n, t) ((t *) malloc ((n) * sizeof (t))) |
#define | RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t))) |
#define | REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t))) |
#define | BYTEWIDTH 8 /* In bits. */ |
#define | STREQ(s1, s2) ((strcmp (s1, s2) == 0)) |
#define | false 0 |
#define | true 1 |
#define | STORE_NUMBER(destination, number) |
#define | STORE_NUMBER_AND_INCR(destination, number) |
#define | EXTRACT_NUMBER(destination, source) |
#define | EXTRACT_NUMBER_AND_INCR(destination, source) |
#define | assert(e) |
#define | DEBUG_STATEMENT(e) |
#define | DEBUG_PRINT1(x) |
#define | DEBUG_PRINT2(x1, x2) |
#define | DEBUG_PRINT3(x1, x2, x3) |
#define | DEBUG_PRINT4(x1, x2, x3, x4) |
#define | DEBUG_PRINT_COMPILED_PATTERN(p, s, e) |
#define | DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) |
#define | PATFETCH(c) |
#define | PATFETCH_RAW(c) |
#define | PATUNFETCH p-- |
#define | TRANSLATE(d) (translate ? translate[(unsigned char) (d)] : (d)) |
#define | INIT_BUF_SIZE 32 |
#define | GET_BUFFER_SPACE(n) |
#define | BUF_PUSH(c) |
#define | BUF_PUSH_2(c1, c2) |
#define | BUF_PUSH_3(c1, c2, c3) |
#define | STORE_JUMP(op, loc, to) store_op1 (op, loc, (to) - (loc) - 3) |
#define | STORE_JUMP2(op, loc, to, arg) store_op2 (op, loc, (to) - (loc) - 3, arg) |
#define | INSERT_JUMP(op, loc, to) insert_op1 (op, loc, (to) - (loc) - 3, b) |
#define | INSERT_JUMP2(op, loc, to, arg) insert_op2 (op, loc, (to) - (loc) - 3, arg, b) |
#define | MAX_BUF_SIZE (1L << 16) |
#define | EXTEND_BUFFER() |
#define | MAX_REGNUM 255 |
#define | INIT_COMPILE_STACK_SIZE 32 |
#define | COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) |
#define | SET_LIST_BIT(c) |
#define | GET_UNSIGNED_NUMBER(num) |
#define | CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ |
#define | IS_CHAR_CLASS(string) |
#define | INIT_FAILURE_ALLOC 5 |
#define | FAIL_STACK_EMPTY() (fail_stack.avail == 0) |
#define | FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0) |
#define | FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size) |
#define | FAIL_STACK_TOP() (fail_stack.stack[fail_stack.avail]) |
#define | INIT_FAIL_STACK() |
#define | DOUBLE_FAIL_STACK(fail_stack) |
#define | PUSH_PATTERN_OP(pattern_op, fail_stack) |
#define | PUSH_FAILURE_ITEM(item) fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item |
#define | POP_FAILURE_ITEM() fail_stack.stack[--fail_stack.avail] |
#define | DEBUG_PUSH(item) |
#define | DEBUG_POP(item_addr) |
#define | PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) |
#define | NUM_REG_ITEMS 3 |
#define | NUM_NONREG_ITEMS 4 |
#define | MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS) |
#define | NUM_FAILURE_ITEMS |
#define | REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail) |
#define | POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info) |
#define | MATCH_NULL_UNSET_VALUE 3 |
#define | REG_MATCH_NULL_STRING_P(R) ((R).bits.match_null_string_p) |
#define | IS_ACTIVE(R) ((R).bits.is_active) |
#define | MATCHED_SOMETHING(R) ((R).bits.matched_something) |
#define | EVER_MATCHED_SOMETHING(R) ((R).bits.ever_matched_something) |
#define | SET_REGS_MATCHED() |
#define | POINTER_TO_OFFSET(ptr) (FIRST_STRING_P (ptr) ? (ptr) - string1 : (ptr) - string2 + size1) |
#define | REG_UNSET_VALUE ((char *) -1) |
#define | REG_UNSET(e) ((e) == REG_UNSET_VALUE) |
#define | MATCHING_IN_FIRST_STRING (dend == end_match_1) |
#define | PREFETCH() |
#define | AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2) |
#define | WORDCHAR_P(d) |
#define | AT_WORD_BOUNDARY(d) |
#define | FREE_VAR(var) if (var) free (var); var = NULL |
#define | FREE_VARIABLES() |
#define | NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH) |
#define | NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1) |
Typedefs | |
typedef char | boolean |
typedef unsigned | regnum_t |
typedef int | pattern_offset_t |
typedef const unsigned char * | fail_stack_elt_t |
Enumerations | |
enum | re_opcode_t { no_op = 0, exactn = 1, anychar, charset, charset_not, start_memory, stop_memory, duplicate, begline, endline, begbuf, endbuf, jump, jump_past_alt, on_failure_jump, on_failure_keep_string_jump, pop_failure_jump, maybe_pop_jump, dummy_failure_jump, push_dummy_failure, succeed_n, jump_n, set_number_at, wordchar, notwordchar, wordbeg, wordend, wordbound, notwordbound } |
Functions | |
static void | init_syntax_once (void) |
static int | re_compile_fastmap (struct re_pattern_buffer *buffer) |
static int | re_search (struct re_pattern_buffer *buffer, const char *string, int length, int start, int range, struct re_registers *regs) |
static int | re_search_2 (struct re_pattern_buffer *buffer, const char *string1, int length1, const char *string2, int length2, int start, int range, struct re_registers *regs, int stop) |
static int | re_match_2 (struct re_pattern_buffer *buffer, const char *string1, int length1, const char *string2, int length2, int start, struct re_registers *regs, int stop) |
static void | store_op1 (re_opcode_t op, unsigned char *loc, int arg) |
static void | store_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2) |
static void | insert_op1 (re_opcode_t op, unsigned char *loc, int arg, unsigned char *end) |
static void | insert_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2, unsigned char *end) |
static boolean | at_begline_loc_p (const char *pattern, const char *p, reg_syntax_t syntax) |
static boolean | at_endline_loc_p (const char *p, const char *pend, int syntax) |
static boolean | group_in_compile_stack (compile_stack_type compile_stack, regnum_t regnum) |
static reg_errcode_t | compile_range (const char **p_ptr, const char *pend, char *translate, reg_syntax_t syntax, unsigned char *b) |
static reg_errcode_t | regex_compile (const char *pattern, int size, reg_syntax_t syntax, struct re_pattern_buffer *bufp) |
static boolean | alt_match_null_string_p (unsigned char *p, unsigned char *end, register_info_type *reg_info) |
static boolean | common_op_match_null_string_p (unsigned char **p, unsigned char *end, register_info_type *reg_info) |
static int | bcmp_translate (unsigned char const *s1, unsigned char const *s2, register int len, char *translate) |
static boolean | group_match_null_string_p (unsigned char **p, unsigned char *end, register_info_type *reg_info) |
static int | at_strings_end (const char *d, const char *end2) |
static int | wordchar_p (const char *d, const char *end1, const char *string2) |
int | regcomp (regex_t *preg, const char *pattern, int cflags) |
int | regexec (regex_t *preg, const char *string, size_t nmatch, pmatch, int eflags) const |
size_t | regerror (int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) |
void | regfree (regex_t *preg) |
Variables | |
static char | re_syntax_table [CHAR_SET_SIZE] |
static const char * | re_error_msg [] |
int | re_max_failures = 2000 |
Macro Definition Documentation
◆ _GNU_SOURCE
#define _GNU_SOURCE 1 |
Definition at line 36 of file GnuRegex.c.
◆ assert
#define assert | ( | e | ) |
Definition at line 711 of file GnuRegex.c.
◆ AT_STRINGS_BEG
#define AT_STRINGS_BEG | ( | d | ) | ((d) == (size1 ? string1 : string2) || !size2) |
Definition at line 2739 of file GnuRegex.c.
◆ AT_WORD_BOUNDARY
#define AT_WORD_BOUNDARY | ( | d | ) |
Definition at line 2763 of file GnuRegex.c.
◆ BUF_PUSH
#define BUF_PUSH | ( | c | ) |
Definition at line 784 of file GnuRegex.c.
◆ BUF_PUSH_2
#define BUF_PUSH_2 | ( | c1, | |
c2 | |||
) |
Definition at line 791 of file GnuRegex.c.
◆ BUF_PUSH_3
#define BUF_PUSH_3 | ( | c1, | |
c2, | |||
c3 | |||
) |
Definition at line 799 of file GnuRegex.c.
◆ BYTEWIDTH
#define BYTEWIDTH 8 /* In bits. */ |
Definition at line 226 of file GnuRegex.c.
◆ CHAR_CLASS_MAX_LENGTH
#define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ |
Definition at line 923 of file GnuRegex.c.
◆ CHAR_SET_SIZE
#define CHAR_SET_SIZE 256 |
Definition at line 70 of file GnuRegex.c.
◆ COMPILE_STACK_TOP
#define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) |
Definition at line 899 of file GnuRegex.c.
◆ DEBUG_POP
#define DEBUG_POP | ( | item_addr | ) |
Definition at line 2104 of file GnuRegex.c.
◆ DEBUG_PRINT1
#define DEBUG_PRINT1 | ( | x | ) |
Definition at line 714 of file GnuRegex.c.
◆ DEBUG_PRINT2
#define DEBUG_PRINT2 | ( | x1, | |
x2 | |||
) |
Definition at line 715 of file GnuRegex.c.
◆ DEBUG_PRINT3
#define DEBUG_PRINT3 | ( | x1, | |
x2, | |||
x3 | |||
) |
Definition at line 716 of file GnuRegex.c.
◆ DEBUG_PRINT4
#define DEBUG_PRINT4 | ( | x1, | |
x2, | |||
x3, | |||
x4 | |||
) |
Definition at line 717 of file GnuRegex.c.
◆ DEBUG_PRINT_COMPILED_PATTERN
#define DEBUG_PRINT_COMPILED_PATTERN | ( | p, | |
s, | |||
e | |||
) |
Definition at line 718 of file GnuRegex.c.
◆ DEBUG_PRINT_DOUBLE_STRING
#define DEBUG_PRINT_DOUBLE_STRING | ( | w, | |
s1, | |||
sz1, | |||
s2, | |||
sz2 | |||
) |
Definition at line 719 of file GnuRegex.c.
◆ DEBUG_PUSH
#define DEBUG_PUSH | ( | item | ) |
Definition at line 2103 of file GnuRegex.c.
◆ DEBUG_STATEMENT
#define DEBUG_STATEMENT | ( | e | ) |
Definition at line 713 of file GnuRegex.c.
◆ DOUBLE_FAIL_STACK
#define DOUBLE_FAIL_STACK | ( | fail_stack | ) |
Definition at line 2065 of file GnuRegex.c.
◆ EVER_MATCHED_SOMETHING
#define EVER_MATCHED_SOMETHING | ( | R | ) | ((R).bits.ever_matched_something) |
Definition at line 2693 of file GnuRegex.c.
◆ EXTEND_BUFFER
#define EXTEND_BUFFER | ( | ) |
Definition at line 833 of file GnuRegex.c.
◆ EXTRACT_NUMBER
#define EXTRACT_NUMBER | ( | destination, | |
source | |||
) |
Definition at line 385 of file GnuRegex.c.
◆ EXTRACT_NUMBER_AND_INCR
#define EXTRACT_NUMBER_AND_INCR | ( | destination, | |
source | |||
) |
Definition at line 412 of file GnuRegex.c.
◆ FAIL_STACK_EMPTY
#define FAIL_STACK_EMPTY | ( | ) | (fail_stack.avail == 0) |
Definition at line 2039 of file GnuRegex.c.
◆ FAIL_STACK_FULL
#define FAIL_STACK_FULL | ( | ) | (fail_stack.avail == fail_stack.size) |
Definition at line 2041 of file GnuRegex.c.
◆ FAIL_STACK_PTR_EMPTY
#define FAIL_STACK_PTR_EMPTY | ( | ) | (fail_stack_ptr->avail == 0) |
Definition at line 2040 of file GnuRegex.c.
◆ FAIL_STACK_TOP
#define FAIL_STACK_TOP | ( | ) | (fail_stack.stack[fail_stack.avail]) |
Definition at line 2042 of file GnuRegex.c.
◆ false
#define false 0 |
Definition at line 233 of file GnuRegex.c.
◆ FIRST_STRING_P
#define FIRST_STRING_P | ( | ptr | ) | (size1 && string1 <= (ptr) && (ptr) <= string1 + size1) |
Definition at line 218 of file GnuRegex.c.
◆ FREE_VAR
#define FREE_VAR | ( | var | ) | if (var) free (var); var = NULL |
Definition at line 2769 of file GnuRegex.c.
◆ FREE_VARIABLES
#define FREE_VARIABLES | ( | ) |
Definition at line 2770 of file GnuRegex.c.
◆ GET_BUFFER_SPACE
#define GET_BUFFER_SPACE | ( | n | ) |
Definition at line 779 of file GnuRegex.c.
◆ GET_UNSIGNED_NUMBER
#define GET_UNSIGNED_NUMBER | ( | num | ) |
Definition at line 907 of file GnuRegex.c.
◆ INIT_BUF_SIZE
#define INIT_BUF_SIZE 32 |
Definition at line 776 of file GnuRegex.c.
◆ INIT_COMPILE_STACK_SIZE
#define INIT_COMPILE_STACK_SIZE 32 |
Definition at line 896 of file GnuRegex.c.
◆ INIT_FAIL_STACK
#define INIT_FAIL_STACK | ( | ) |
Definition at line 2046 of file GnuRegex.c.
◆ INIT_FAILURE_ALLOC
#define INIT_FAILURE_ALLOC 5 |
Definition at line 2022 of file GnuRegex.c.
◆ INSERT_JUMP
#define INSERT_JUMP | ( | op, | |
loc, | |||
to | |||
) | insert_op1 (op, loc, (to) - (loc) - 3, b) |
Definition at line 817 of file GnuRegex.c.
◆ INSERT_JUMP2
#define INSERT_JUMP2 | ( | op, | |
loc, | |||
to, | |||
arg | |||
) | insert_op2 (op, loc, (to) - (loc) - 3, arg, b) |
Definition at line 821 of file GnuRegex.c.
◆ IS_ACTIVE
#define IS_ACTIVE | ( | R | ) | ((R).bits.is_active) |
Definition at line 2691 of file GnuRegex.c.
◆ IS_CHAR_CLASS
#define IS_CHAR_CLASS | ( | string | ) |
Definition at line 925 of file GnuRegex.c.
◆ ISALNUM
#define ISALNUM | ( | c | ) | (isascii ((unsigned char)c) && isalnum ((unsigned char)c)) |
Definition at line 149 of file GnuRegex.c.
◆ ISALPHA
#define ISALPHA | ( | c | ) | (isascii ((unsigned char)c) && isalpha ((unsigned char)c)) |
Definition at line 150 of file GnuRegex.c.
◆ isascii
#define isascii | ( | c | ) | 1 |
Definition at line 133 of file GnuRegex.c.
◆ ISBLANK
#define ISBLANK | ( | c | ) | ((c) == ' ' || (c) == '\t') |
Definition at line 139 of file GnuRegex.c.
◆ ISCNTRL
#define ISCNTRL | ( | c | ) | (isascii ((unsigned char)c) && iscntrl ((unsigned char)c)) |
Definition at line 151 of file GnuRegex.c.
◆ ISDIGIT
#define ISDIGIT | ( | c | ) | (isascii ((unsigned char)c) && isdigit ((unsigned char)c)) |
Definition at line 148 of file GnuRegex.c.
◆ ISGRAPH
#define ISGRAPH | ( | c | ) | (isascii ((unsigned char)c) && isprint ((unsigned char)c) && !isspace ((unsigned char)c)) |
Definition at line 144 of file GnuRegex.c.
◆ ISLOWER
#define ISLOWER | ( | c | ) | (isascii ((unsigned char)c) && islower ((unsigned char)c)) |
Definition at line 152 of file GnuRegex.c.
◆ ISPRINT
#define ISPRINT | ( | c | ) | (isascii ((unsigned char)c) && isprint ((unsigned char)c)) |
Definition at line 147 of file GnuRegex.c.
◆ ISPUNCT
#define ISPUNCT | ( | c | ) | (isascii ((unsigned char)c) && ispunct ((unsigned char)c)) |
Definition at line 153 of file GnuRegex.c.
◆ ISSPACE
#define ISSPACE | ( | c | ) | (isascii ((unsigned char)c) && isspace ((unsigned char)c)) |
Definition at line 154 of file GnuRegex.c.
◆ ISUPPER
#define ISUPPER | ( | c | ) | (isascii ((unsigned char)c) && isupper ((unsigned char)c)) |
Definition at line 155 of file GnuRegex.c.
◆ ISXDIGIT
#define ISXDIGIT | ( | c | ) | (isascii ((unsigned char)c) && isxdigit ((unsigned char)c)) |
Definition at line 156 of file GnuRegex.c.
◆ MATCH_NULL_UNSET_VALUE
#define MATCH_NULL_UNSET_VALUE 3 |
Definition at line 2678 of file GnuRegex.c.
◆ MATCHED_SOMETHING
#define MATCHED_SOMETHING | ( | R | ) | ((R).bits.matched_something) |
Definition at line 2692 of file GnuRegex.c.
◆ MATCHING_IN_FIRST_STRING
#define MATCHING_IN_FIRST_STRING (dend == end_match_1) |
Definition at line 2722 of file GnuRegex.c.
◆ MAX_BUF_SIZE
#define MAX_BUF_SIZE (1L << 16) |
Definition at line 827 of file GnuRegex.c.
◆ MAX_FAILURE_ITEMS
#define MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS) |
Definition at line 2201 of file GnuRegex.c.
◆ MAX_REGNUM
#define MAX_REGNUM 255 |
Definition at line 861 of file GnuRegex.c.
◆ NO_HIGHEST_ACTIVE_REG
#define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH) |
Definition at line 2795 of file GnuRegex.c.
◆ NO_LOWEST_ACTIVE_REG
#define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1) |
Definition at line 2796 of file GnuRegex.c.
◆ NUM_FAILURE_ITEMS
#define NUM_FAILURE_ITEMS |
Definition at line 2204 of file GnuRegex.c.
◆ NUM_NONREG_ITEMS
#define NUM_NONREG_ITEMS 4 |
Definition at line 2197 of file GnuRegex.c.
◆ NUM_REG_ITEMS
#define NUM_REG_ITEMS 3 |
Definition at line 2191 of file GnuRegex.c.
◆ PATFETCH
#define PATFETCH | ( | c | ) |
Definition at line 751 of file GnuRegex.c.
◆ PATFETCH_RAW
#define PATFETCH_RAW | ( | c | ) |
Definition at line 759 of file GnuRegex.c.
◆ PATUNFETCH
#define PATUNFETCH p-- |
Definition at line 765 of file GnuRegex.c.
◆ POINTER_TO_OFFSET
#define POINTER_TO_OFFSET | ( | ptr | ) | (FIRST_STRING_P (ptr) ? (ptr) - string1 : (ptr) - string2 + size1) |
Definition at line 2713 of file GnuRegex.c.
◆ POP_FAILURE_ITEM
#define POP_FAILURE_ITEM | ( | ) | fail_stack.stack[--fail_stack.avail] |
Definition at line 2096 of file GnuRegex.c.
◆ POP_FAILURE_POINT
#define POP_FAILURE_POINT | ( | str, | |
pat, | |||
low_reg, | |||
high_reg, | |||
regstart, | |||
regend, | |||
reg_info | |||
) |
Definition at line 2223 of file GnuRegex.c.
◆ PREFETCH
#define PREFETCH | ( | ) |
Definition at line 2726 of file GnuRegex.c.
◆ PUSH_FAILURE_ITEM
#define PUSH_FAILURE_ITEM | ( | item | ) | fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item |
Definition at line 2092 of file GnuRegex.c.
◆ PUSH_FAILURE_POINT
#define PUSH_FAILURE_POINT | ( | pattern_place, | |
string_place, | |||
failure_code | |||
) |
Definition at line 2116 of file GnuRegex.c.
◆ PUSH_PATTERN_OP
#define PUSH_PATTERN_OP | ( | pattern_op, | |
fail_stack | |||
) |
Definition at line 2082 of file GnuRegex.c.
◆ REG_MATCH_NULL_STRING_P
#define REG_MATCH_NULL_STRING_P | ( | R | ) | ((R).bits.match_null_string_p) |
Definition at line 2690 of file GnuRegex.c.
◆ REG_UNSET
#define REG_UNSET | ( | e | ) | ((e) == REG_UNSET_VALUE) |
Definition at line 2718 of file GnuRegex.c.
◆ REG_UNSET_VALUE
#define REG_UNSET_VALUE ((char *) -1) |
Definition at line 2717 of file GnuRegex.c.
◆ REGEX_ALLOCATE
#define REGEX_ALLOCATE malloc |
Definition at line 182 of file GnuRegex.c.
◆ REGEX_MALLOC
#define REGEX_MALLOC 1 |
Definition at line 44 of file GnuRegex.c.
◆ REGEX_REALLOCATE
#define REGEX_REALLOCATE | ( | source, | |
osize, | |||
nsize | |||
) | realloc (source, nsize) |
Definition at line 183 of file GnuRegex.c.
◆ REGEX_TALLOC
#define REGEX_TALLOC | ( | n, | |
t | |||
) | ((t *) REGEX_ALLOCATE ((n) * sizeof (t))) |
Definition at line 224 of file GnuRegex.c.
◆ REMAINING_AVAIL_SLOTS
#define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail) |
Definition at line 2209 of file GnuRegex.c.
◆ RETALLOC
#define RETALLOC | ( | addr, | |
n, | |||
t | |||
) | ((addr) = (t *) realloc (addr, (n) * sizeof (t))) |
Definition at line 223 of file GnuRegex.c.
◆ SET_LIST_BIT
#define SET_LIST_BIT | ( | c | ) |
Definition at line 902 of file GnuRegex.c.
◆ SET_REGS_MATCHED
#define SET_REGS_MATCHED | ( | ) |
Definition at line 2698 of file GnuRegex.c.
◆ SIGN_EXTEND_CHAR
#define SIGN_EXTEND_CHAR | ( | c | ) | ((((unsigned char) (c)) ^ 128) - 128) |
Definition at line 167 of file GnuRegex.c.
◆ STORE_JUMP
#define STORE_JUMP | ( | op, | |
loc, | |||
to | |||
) | store_op1 (op, loc, (to) - (loc) - 3) |
Definition at line 809 of file GnuRegex.c.
◆ STORE_JUMP2
#define STORE_JUMP2 | ( | op, | |
loc, | |||
to, | |||
arg | |||
) | store_op2 (op, loc, (to) - (loc) - 3, arg) |
Definition at line 813 of file GnuRegex.c.
◆ STORE_NUMBER
#define STORE_NUMBER | ( | destination, | |
number | |||
) |
Definition at line 366 of file GnuRegex.c.
◆ STORE_NUMBER_AND_INCR
#define STORE_NUMBER_AND_INCR | ( | destination, | |
number | |||
) |
Definition at line 376 of file GnuRegex.c.
◆ STREQ
Definition at line 228 of file GnuRegex.c.
◆ Sword
#define Sword 1 |
Definition at line 60 of file GnuRegex.c.
◆ TALLOC
#define TALLOC | ( | n, | |
t | |||
) | ((t *) malloc ((n) * sizeof (t))) |
Definition at line 222 of file GnuRegex.c.
◆ TRANSLATE
#define TRANSLATE | ( | d | ) | (translate ? translate[(unsigned char) (d)] : (d)) |
Definition at line 771 of file GnuRegex.c.
◆ true
#define true 1 |
Definition at line 234 of file GnuRegex.c.
◆ WORDCHAR_P
#define WORDCHAR_P | ( | d | ) |
Definition at line 2749 of file GnuRegex.c.
Typedef Documentation
◆ boolean
typedef char boolean |
Definition at line 231 of file GnuRegex.c.
◆ fail_stack_elt_t
typedef const unsigned char* fail_stack_elt_t |
Definition at line 2031 of file GnuRegex.c.
◆ pattern_offset_t
typedef int pattern_offset_t |
Definition at line 871 of file GnuRegex.c.
◆ regnum_t
typedef unsigned regnum_t |
Definition at line 865 of file GnuRegex.c.
Enumeration Type Documentation
◆ re_opcode_t
enum re_opcode_t |
Definition at line 245 of file GnuRegex.c.
Function Documentation
◆ alt_match_null_string_p()
|
static |
Definition at line 3958 of file GnuRegex.c.
References common_op_match_null_string_p(), re_registers::end, EXTRACT_NUMBER_AND_INCR, and on_failure_jump.
Referenced by group_match_null_string_p().
◆ at_begline_loc_p()
|
static |
Definition at line 1915 of file GnuRegex.c.
References RE_NO_BK_PARENS, and RE_NO_BK_VBAR.
Referenced by regex_compile().
◆ at_endline_loc_p()
Definition at line 1931 of file GnuRegex.c.
References NULL, RE_NO_BK_PARENS, and RE_NO_BK_VBAR.
Referenced by regex_compile().
◆ at_strings_end()
|
static |
Definition at line 2740 of file GnuRegex.c.
Referenced by re_match_2().
◆ bcmp_translate()
◆ common_op_match_null_string_p()
|
static |
Definition at line 3990 of file GnuRegex.c.
References assert, begbuf, begline, duplicate, re_registers::end, endbuf, endline, EXTRACT_NUMBER_AND_INCR, group_match_null_string_p(), jump, MATCH_NULL_UNSET_VALUE, MAX_REGNUM, no_op, notwordbound, REG_MATCH_NULL_STRING_P, set_number_at, start_memory, succeed_n, wordbeg, wordbound, and wordend.
Referenced by alt_match_null_string_p(), and group_match_null_string_p().
◆ compile_range()
|
static |
Definition at line 1975 of file GnuRegex.c.
References RE_NO_EMPTY_RANGES, REG_ERANGE, REG_NOERROR, SET_LIST_BIT, and TRANSLATE.
Referenced by regex_compile().
◆ group_in_compile_stack()
|
static |
Definition at line 1950 of file GnuRegex.c.
References compile_stack_type::avail, compile_stack_elt_t::regnum, and compile_stack_type::stack.
Referenced by regex_compile().
◆ group_match_null_string_p()
|
static |
Definition at line 3860 of file GnuRegex.c.
References alt_match_null_string_p(), assert, common_op_match_null_string_p(), re_registers::end, EXTRACT_NUMBER, EXTRACT_NUMBER_AND_INCR, jump_past_alt, on_failure_jump, and stop_memory.
Referenced by common_op_match_null_string_p(), and re_match_2().
◆ init_syntax_once()
|
static |
Definition at line 75 of file GnuRegex.c.
References re_syntax_table, and Sword.
Referenced by regex_compile().
◆ insert_op1()
|
static |
Definition at line 1885 of file GnuRegex.c.
References store_op1().
◆ insert_op2()
|
static |
◆ re_compile_fastmap()
|
static |
Definition at line 2295 of file GnuRegex.c.
References anychar, assert, fail_stack_type::avail, begbuf, begline, re_pattern_buffer::buffer, BYTEWIDTH, re_pattern_buffer::can_be_null, charset, charset_not, dummy_failure_jump, duplicate, endbuf, endline, exactn, EXTRACT_NUMBER_AND_INCR, FAIL_STACK_EMPTY, re_pattern_buffer::fastmap, re_pattern_buffer::fastmap_accurate, INIT_FAIL_STACK, jump, jump_n, jump_past_alt, maybe_pop_jump, no_op, notwordbound, notwordchar, NULL, on_failure_jump, on_failure_keep_string_jump, pop_failure_jump, push_dummy_failure, PUSH_PATTERN_OP, RE_DOT_NEWLINE, re_syntax_table, set_number_at, size, fail_stack_type::stack, start_memory, stop_memory, succeed_n, Sword, re_pattern_buffer::syntax, re_pattern_buffer::used, wordbeg, wordbound, wordchar, and wordend.
Referenced by re_search_2().
◆ re_match_2()
|
static |
Definition at line 2814 of file GnuRegex.c.
References anychar, assert, AT_STRINGS_BEG, at_strings_end(), AT_WORD_BOUNDARY, bcmp_translate(), begbuf, begline, re_pattern_buffer::buffer, BYTEWIDTH, charset, charset_not, DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4, DEBUG_PRINT_COMPILED_PATTERN, DEBUG_PRINT_DOUBLE_STRING, dummy_failure_jump, duplicate, re_registers::end, endbuf, endline, EVER_MATCHED_SOMETHING, exactn, EXTRACT_NUMBER, EXTRACT_NUMBER_AND_INCR, FAIL_STACK_EMPTY, FIRST_STRING_P, FREE_VARIABLES, group_match_null_string_p(), INIT_FAIL_STACK, IS_ACTIVE, jump, jump_n, jump_past_alt, MATCH_NULL_UNSET_VALUE, MATCHED_SOMETHING, MATCHING_IN_FIRST_STRING, max(), maybe_pop_jump, min(), re_pattern_buffer::newline_anchor, NO_HIGHEST_ACTIVE_REG, NO_LOWEST_ACTIVE_REG, no_op, re_pattern_buffer::no_sub, re_pattern_buffer::not_bol, re_pattern_buffer::not_eol, notwordbound, notwordchar, NULL, re_registers::num_regs, on_failure_jump, on_failure_keep_string_jump, POINTER_TO_OFFSET, pop_failure_jump, POP_FAILURE_POINT, PREFETCH, push_dummy_failure, PUSH_FAILURE_POINT, RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_NREGS, re_pattern_buffer::re_nsub, REG_MATCH_NULL_STRING_P, REG_UNSET, REG_UNSET_VALUE, REGEX_TALLOC, re_pattern_buffer::regs_allocated, REGS_FIXED, REGS_REALLOCATE, REGS_UNALLOCATED, RETALLOC, set_number_at, SET_REGS_MATCHED, re_registers::start, start_memory, stop_memory, STORE_NUMBER, STORE_NUMBER_AND_INCR, succeed_n, re_pattern_buffer::syntax, TALLOC, TRANSLATE, re_pattern_buffer::translate, re_pattern_buffer::used, wordbeg, wordbound, wordchar, wordchar_p(), WORDCHAR_P, and wordend.
Referenced by re_search_2().
◆ re_search()
|
static |
Definition at line 2524 of file GnuRegex.c.
References NULL, re_search_2(), and size.
Referenced by regexec().
◆ re_search_2()
|
static |
Definition at line 2556 of file GnuRegex.c.
References begbuf, re_pattern_buffer::buffer, re_pattern_buffer::can_be_null, re_pattern_buffer::fastmap, re_pattern_buffer::fastmap_accurate, re_compile_fastmap(), re_match_2(), TRANSLATE, re_pattern_buffer::translate, and re_pattern_buffer::used.
Referenced by re_search().
◆ regcomp()
Definition at line 4117 of file GnuRegex.c.
References CHAR_SET_SIZE, ISUPPER, NULL, RE_DOT_NEWLINE, RE_HAT_LISTS_NOT_NEWLINE, RE_SYNTAX_POSIX_BASIC, RE_SYNTAX_POSIX_EXTENDED, REG_EPAREN, REG_ERPAREN, REG_ESPACE, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOSUB, and regex_compile().
Referenced by RegexPattern::RegexPattern(), REList::REList(), ftpListParseParts(), mimeInit(), and readConfigFile().
◆ regerror()
Definition at line 4245 of file GnuRegex.c.
References re_error_msg.
Referenced by RegexPattern::RegexPattern(), REList::REList(), REList::match(), and readConfigFile().
◆ regex_compile()
|
static |
Definition at line 952 of file GnuRegex.c.
References re_pattern_buffer::allocated, anychar, assert, at_begline_loc_p(), at_endline_loc_p(), compile_stack_type::avail, begbuf, begline, BUF_PUSH, BUF_PUSH_2, BUF_PUSH_3, re_pattern_buffer::buffer, BYTEWIDTH, CHAR_CLASS_MAX_LENGTH, charset, charset_not, compile_range(), COMPILE_STACK_TOP, debug, DEBUG_PRINT1, dummy_failure_jump, duplicate, endbuf, endline, exactn, re_pattern_buffer::fastmap_accurate, GET_BUFFER_SPACE, GET_UNSIGNED_NUMBER, group_in_compile_stack(), INIT_BUF_SIZE, INIT_COMPILE_STACK_SIZE, init_syntax_once(), INSERT_JUMP, INSERT_JUMP2, insert_op2(), IS_CHAR_CLASS, ISALNUM, ISALPHA, ISBLANK, ISCNTRL, ISDIGIT, ISGRAPH, ISLOWER, ISPRINT, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT, jump, jump_n, jump_past_alt, MAX_REGNUM, maybe_pop_jump, re_pattern_buffer::not_bol, re_pattern_buffer::not_eol, notwordbound, notwordchar, NULL, on_failure_jump, on_failure_keep_string_jump, PATFETCH, PATFETCH_RAW, PATUNFETCH, push_dummy_failure, RE_BACKSLASH_ESCAPE_IN_LISTS, RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS, RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS, RE_DOT_NEWLINE, RE_DUP_MAX, RE_HAT_LISTS_NOT_NEWLINE, RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT, RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS, RE_NO_BK_VBAR, re_pattern_buffer::re_nsub, RE_UNMATCHED_RIGHT_PAREN_ORD, REG_BADBR, REG_BADRPT, REG_EBRACE, REG_EBRACK, REG_ECTYPE, REG_EESCAPE, REG_EPAREN, REG_ERANGE, REG_ERPAREN, REG_ESPACE, REG_ESUBREG, REG_NOERROR, RETALLOC, SET_LIST_BIT, set_number_at, compile_stack_type::size, size, compile_stack_type::stack, start_memory, stop_memory, STORE_JUMP, STORE_JUMP2, STREQ, succeed_n, re_pattern_buffer::syntax, TALLOC, TRANSLATE, re_pattern_buffer::translate, re_pattern_buffer::used, wordbeg, wordbound, wordchar, and wordend.
Referenced by regcomp().
◆ regexec()
Definition at line 4188 of file GnuRegex.c.
References re_registers::end, int, NULL, re_registers::num_regs, re_search(), REG_NOERROR, REG_NOMATCH, REG_NOTBOL, REG_NOTEOL, REGS_FIXED, regmatch_t::rm_eo, regmatch_t::rm_so, re_registers::start, and TALLOC.
Referenced by ftpListParseParts(), REList::match(), RegexPattern::match(), mimeGetEntry(), and readConfigFile().
◆ regfree()
void regfree | ( | regex_t * | preg | ) |
Definition at line 4280 of file GnuRegex.c.
References NULL.
Referenced by MimeEntry::~MimeEntry(), RegexPattern::~RegexPattern(), REList::~REList(), and readConfigFile().
◆ store_op1()
|
static |
◆ store_op2()
|
static |
◆ wordchar_p()
|
static |
Definition at line 2754 of file GnuRegex.c.
References re_syntax_table, and Sword.
Referenced by re_match_2().
Variable Documentation
◆ re_error_msg
|
static |
Definition at line 726 of file GnuRegex.c.
Referenced by regerror().
◆ re_max_failures
int re_max_failures = 2000 |
Definition at line 2029 of file GnuRegex.c.
◆ re_syntax_table
|
static |
Definition at line 72 of file GnuRegex.c.
Referenced by init_syntax_once(), re_compile_fastmap(), and wordchar_p().