Macros | |
| #define | _GNU_SOURCE |
| #define | assert(e) |
| #define | AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2) |
| #define | AT_STRINGS_END(d) ((d) == end2) |
| #define | AT_WORD_BOUNDARY(d) |
| #define | BUF_PUSH(c) |
| #define | BUF_PUSH_2(c1, c2) |
| #define | BUF_PUSH_3(c1, c2, c3) |
| #define | BYTEWIDTH 8 /* In bits. */ |
| #define | CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ |
| #define | CHAR_SET_SIZE 256 |
| #define | COMPILE_STACK_EMPTY (compile_stack.avail == 0) |
| #define | COMPILE_STACK_FULL (compile_stack.avail == compile_stack.size) |
| #define | COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) |
| #define | DEBUG_POP(item_addr) |
| #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 | DEBUG_PUSH(item) |
| #define | DEBUG_STATEMENT(e) |
| #define | DOUBLE_FAIL_STACK(fail_stack) |
| #define | EVER_MATCHED_SOMETHING(R) ((R).bits.ever_matched_something) |
| #define | EXTEND_BUFFER() |
| #define | EXTRACT_NUMBER(destination, source) |
| #define | EXTRACT_NUMBER_AND_INCR(destination, source) |
| #define | FAIL_STACK_EMPTY() (fail_stack.avail == 0) |
| #define | FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size) |
| #define | FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0) |
| #define | FAIL_STACK_TOP() (fail_stack.stack[fail_stack.avail]) |
| #define | false 0 |
| #define | FIRST_STRING_P(ptr) (size1 && string1 <= (ptr) && (ptr) <= string1 + size1) |
| #define | FREE_VARIABLES() alloca (0) |
| #define | GET_BUFFER_SPACE(n) |
| #define | GET_UNSIGNED_NUMBER(num) |
| #define | INIT_BUF_SIZE 32 |
| #define | INIT_COMPILE_STACK_SIZE 32 |
| #define | INIT_FAIL_STACK() |
| #define | INIT_FAILURE_ALLOC 5 |
| #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 | IS_ACTIVE(R) ((R).bits.is_active) |
| #define | IS_CHAR_CLASS(string) |
| #define | ISALNUM(c) (isascii (c) && isalnum (c)) |
| #define | ISALPHA(c) (isascii (c) && isalpha (c)) |
| #define | isascii(c) 1 |
| #define | ISBLANK(c) ((c) == ' ' || (c) == '\t') |
| #define | ISCNTRL(c) (isascii (c) && iscntrl (c)) |
| #define | ISDIGIT(c) (isascii (c) && isdigit (c)) |
| #define | ISGRAPH(c) (isascii (c) && isprint (c) && !isspace (c)) |
| #define | ISLOWER(c) (isascii (c) && islower (c)) |
| #define | ISPRINT(c) (isascii (c) && isprint (c)) |
| #define | ISPUNCT(c) (isascii (c) && ispunct (c)) |
| #define | ISSPACE(c) (isascii (c) && isspace (c)) |
| #define | ISUPPER(c) (isascii (c) && isupper (c)) |
| #define | ISXDIGIT(c) (isascii (c) && isxdigit (c)) |
| #define | MATCH_NULL_UNSET_VALUE 3 |
| #define | MATCHED_SOMETHING(R) ((R).bits.matched_something) |
| #define | MATCHING_IN_FIRST_STRING (dend == end_match_1) |
| #define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
| #define | MAX_BUF_SIZE (1L << 16) |
| #define | MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS) |
| #define | MAX_REGNUM 255 |
| #define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
| #define | NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH) |
| #define | NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1) |
| #define | NULL 0 |
| #define | NUM_FAILURE_ITEMS |
| #define | NUM_NONREG_ITEMS 4 |
| #define | NUM_REG_ITEMS 3 |
| #define | PATFETCH(c) |
| #define | PATFETCH_RAW(c) |
| #define | PATUNFETCH p-- |
| #define | POINTER_TO_OFFSET(ptr) (FIRST_STRING_P (ptr) ? (ptr) - string1 : (ptr) - string2 + size1) |
| #define | POP_FAILURE_ITEM() fail_stack.stack[--fail_stack.avail] |
| #define | POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info) |
| #define | PREFETCH() |
| #define | PUSH_FAILURE_ITEM(item) fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item |
| #define | PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) |
| #define | PUSH_PATTERN_OP(pattern_op, fail_stack) |
| #define | REG_MATCH_NULL_STRING_P(R) ((R).bits.match_null_string_p) |
| #define | REG_UNSET(e) ((e) == REG_UNSET_VALUE) |
| #define | REG_UNSET_VALUE ((char *) -1) |
| #define | REGEX_ALLOCATE alloca |
| #define | REGEX_REALLOCATE(source, osize, nsize) |
| #define | REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t))) |
| #define | REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail) |
| #define | RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t))) |
| #define | SET_LIST_BIT(c) |
| #define | SET_REGS_MATCHED() |
| #define | SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128) |
| #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 | STORE_NUMBER(destination, number) |
| #define | STORE_NUMBER_AND_INCR(destination, number) |
| #define | STREQ(s1, s2) ((strcmp (s1, s2) == 0)) |
| #define | Sword 1 |
| #define | SYNTAX(c) re_syntax_table[c] |
| #define | TALLOC(n, t) ((t *) malloc ((n) * sizeof (t))) |
| #define | TRANSLATE(d) (translate ? translate[(unsigned char) (d)] : (d)) |
| #define | true 1 |
| #define | WORDCHAR_P(d) |
Typedefs | |
| typedef char | boolean |
| typedef struct compile_stack_elt_t | compile_stack_elt_t |
| typedef const unsigned char * | fail_stack_elt_t |
| typedef int | pattern_offset_t |
| typedef union register_info_type | register_info_type |
| typedef unsigned | regnum_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 | |
| char * | alloca () |
| static boolean | at_endline_loc_p (const char *pattern, const char *p, int syntax) |
| static boolean | common_op_match_null_string_p (unsigned char **p, unsigned char *end, union register_info_type *reg_info) |
| static boolean | group_match_null_string_p (unsigned char **p, unsigned char *end, union register_info_type *reg_info) |
| static void | insert_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2, unsigned char *end) |
| char * | malloc () |
| const char * | re_comp (char *s) const |
| int | re_compile_fastmap (struct re_pattern_buffer *bufp) |
| const char * | re_compile_pattern (char *pattern, int length, struct re_pattern_buffer *bufp) const |
| int | re_exec (char *s) const |
| int | re_match (struct re_pattern_buffer *bufp, const char *string, int size, int pos, struct re_registers *regs) |
| int | re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int pos, struct re_registers *regs, int stop) |
| int | re_search (struct re_pattern_buffer *bufp, const char *string, int size, int startpos, int range, struct re_registers *regs) |
| int | re_search_2 (struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int startpos, int range, struct re_registers *regs, int stop) |
| void | re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs, unsigned num_regs, regoff_t *starts, regoff_t *ends) |
| reg_syntax_t | re_set_syntax (reg_syntax_t syntax) |
| char * | realloc () |
| int | regcomp (regex_t *preg, const char *pattern, int cflags) |
| size_t | regerror (int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) |
| int | regexec (regex_t *preg, const char *string, size_t nmatch, pmatch, int eflags) const |
| void | regfree (regex_t *preg) |
| static void | store_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2) |
Variables | |
| int | re_max_failures = 2000 |
| reg_syntax_t | re_syntax_options = RE_SYNTAX_EMACS |
| #define _GNU_SOURCE |
| #define assert | ( | e | ) |
| #define AT_STRINGS_BEG | ( | d | ) | ((d) == (size1 ? string1 : string2) || !size2) |
| #define AT_STRINGS_END | ( | d | ) | ((d) == end2) |
| #define AT_WORD_BOUNDARY | ( | d | ) |
| #define BUF_PUSH | ( | c | ) |
| #define BUF_PUSH_2 | ( | c1, | |
| c2 | |||
| ) |
| #define BUF_PUSH_3 | ( | c1, | |
| c2, | |||
| c3 | |||
| ) |
| #define BYTEWIDTH 8 /* In bits. */ |
| #define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ |
| #define CHAR_SET_SIZE 256 |
| #define COMPILE_STACK_EMPTY (compile_stack.avail == 0) |
| #define COMPILE_STACK_FULL (compile_stack.avail == compile_stack.size) |
| #define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) |
| #define DEBUG_POP | ( | item_addr | ) |
| #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 DEBUG_PUSH | ( | item | ) |
| #define DEBUG_STATEMENT | ( | e | ) |
| #define DOUBLE_FAIL_STACK | ( | fail_stack | ) |
| #define EVER_MATCHED_SOMETHING | ( | R | ) | ((R).bits.ever_matched_something) |
| #define EXTEND_BUFFER | ( | ) |
| #define EXTRACT_NUMBER | ( | destination, | |
| source | |||
| ) |
| #define EXTRACT_NUMBER_AND_INCR | ( | destination, | |
| source | |||
| ) |
| #define FAIL_STACK_EMPTY | ( | ) | (fail_stack.avail == 0) |
| #define FAIL_STACK_FULL | ( | ) | (fail_stack.avail == fail_stack.size) |
| #define FAIL_STACK_PTR_EMPTY | ( | ) | (fail_stack_ptr->avail == 0) |
| #define FAIL_STACK_TOP | ( | ) | (fail_stack.stack[fail_stack.avail]) |
| #define false 0 |
| #define FIRST_STRING_P | ( | ptr | ) | (size1 && string1 <= (ptr) && (ptr) <= string1 + size1) |
| #define FREE_VARIABLES | ( | ) | alloca (0) |
| #define GET_BUFFER_SPACE | ( | n | ) |
| #define GET_UNSIGNED_NUMBER | ( | num | ) |
| #define INIT_BUF_SIZE 32 |
| #define INIT_COMPILE_STACK_SIZE 32 |
| #define INIT_FAIL_STACK | ( | ) |
| #define INIT_FAILURE_ALLOC 5 |
| #define INSERT_JUMP2 | ( | op, | |
| loc, | |||
| to, | |||
| arg | |||
| ) | insert_op2 (op, loc, (to) - (loc) - 3, arg, b) |
| #define IS_ACTIVE | ( | R | ) | ((R).bits.is_active) |
| #define IS_CHAR_CLASS | ( | string | ) |
| #define ISALNUM | ( | c | ) | (isascii (c) && isalnum (c)) |
| #define ISALPHA | ( | c | ) | (isascii (c) && isalpha (c)) |
| #define isascii | ( | c | ) | 1 |
| #define ISBLANK | ( | c | ) | ((c) == ' ' || (c) == '\t') |
| #define ISCNTRL | ( | c | ) | (isascii (c) && iscntrl (c)) |
| #define ISDIGIT | ( | c | ) | (isascii (c) && isdigit (c)) |
| #define ISGRAPH | ( | c | ) | (isascii (c) && isprint (c) && !isspace (c)) |
| #define ISLOWER | ( | c | ) | (isascii (c) && islower (c)) |
| #define ISPRINT | ( | c | ) | (isascii (c) && isprint (c)) |
| #define ISPUNCT | ( | c | ) | (isascii (c) && ispunct (c)) |
| #define ISSPACE | ( | c | ) | (isascii (c) && isspace (c)) |
| #define ISUPPER | ( | c | ) | (isascii (c) && isupper (c)) |
| #define ISXDIGIT | ( | c | ) | (isascii (c) && isxdigit (c)) |
| #define MATCH_NULL_UNSET_VALUE 3 |
| #define MATCHED_SOMETHING | ( | R | ) | ((R).bits.matched_something) |
| #define MATCHING_IN_FIRST_STRING (dend == end_match_1) |
| #define MAX | ( | a, | |
| b | |||
| ) | ((a) > (b) ? (a) : (b)) |
| #define MAX_BUF_SIZE (1L << 16) |
| #define MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS) |
| #define MAX_REGNUM 255 |
| #define MIN | ( | a, | |
| b | |||
| ) | ((a) < (b) ? (a) : (b)) |
| #define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH) |
| #define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1) |
| #define NULL 0 |
| #define NUM_FAILURE_ITEMS |
| #define NUM_NONREG_ITEMS 4 |
| #define NUM_REG_ITEMS 3 |
| #define PATFETCH | ( | c | ) |
| #define PATFETCH_RAW | ( | c | ) |
| #define PATUNFETCH p-- |
| #define POINTER_TO_OFFSET | ( | ptr | ) | (FIRST_STRING_P (ptr) ? (ptr) - string1 : (ptr) - string2 + size1) |
| #define POP_FAILURE_ITEM | ( | ) | fail_stack.stack[--fail_stack.avail] |
| #define POP_FAILURE_POINT | ( | str, | |
| pat, | |||
| low_reg, | |||
| high_reg, | |||
| regstart, | |||
| regend, | |||
| reg_info | |||
| ) |
| #define PREFETCH | ( | ) |
| #define PUSH_FAILURE_ITEM | ( | item | ) | fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item |
| #define PUSH_FAILURE_POINT | ( | pattern_place, | |
| string_place, | |||
| failure_code | |||
| ) |
| #define PUSH_PATTERN_OP | ( | pattern_op, | |
| fail_stack | |||
| ) |
| #define REG_MATCH_NULL_STRING_P | ( | R | ) | ((R).bits.match_null_string_p) |
| #define REG_UNSET | ( | e | ) | ((e) == REG_UNSET_VALUE) |
| #define REG_UNSET_VALUE ((char *) -1) |
| #define REGEX_ALLOCATE alloca |
| #define REGEX_REALLOCATE | ( | source, | |
| osize, | |||
| nsize | |||
| ) |
| #define REGEX_TALLOC | ( | n, | |
| t | |||
| ) | ((t *) REGEX_ALLOCATE ((n) * sizeof (t))) |
| #define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail) |
| #define SET_LIST_BIT | ( | c | ) |
| #define SET_REGS_MATCHED | ( | ) |
| #define SIGN_EXTEND_CHAR | ( | c | ) | ((((unsigned char) (c)) ^ 128) - 128) |
| #define STORE_NUMBER | ( | destination, | |
| number | |||
| ) |
| #define STORE_NUMBER_AND_INCR | ( | destination, | |
| number | |||
| ) |
| #define STREQ | ( | s1, | |
| s2 | |||
| ) | ((strcmp (s1, s2) == 0)) |
| #define Sword 1 |
| #define SYNTAX | ( | c | ) | re_syntax_table[c] |
| #define TRANSLATE | ( | d | ) | (translate ? translate[(unsigned char) (d)] : (d)) |
| #define true 1 |
| #define WORDCHAR_P | ( | d | ) |
| typedef char boolean |
| typedef struct compile_stack_elt_t compile_stack_elt_t |
| typedef const unsigned char* fail_stack_elt_t |
| typedef int pattern_offset_t |
| typedef union register_info_type register_info_type |
| typedef unsigned regnum_t |
| enum re_opcode_t |
| char* alloca | ( | ) |
| static boolean common_op_match_null_string_p | ( | unsigned char ** | p, |
| unsigned char * | end, | ||
| union register_info_type * | reg_info | ||
| ) |
| static boolean group_match_null_string_p | ( | unsigned char ** | p, |
| unsigned char * | end, | ||
| union register_info_type * | reg_info | ||
| ) |
| static void insert_op2 | ( | re_opcode_t | op, |
| unsigned char * | loc, | ||
| int | arg1, | ||
| int | arg2, | ||
| unsigned char * | end | ||
| ) |
| char* malloc | ( | ) |
| const char* re_comp | ( | char * | s | ) | const |
| int re_compile_fastmap | ( | struct re_pattern_buffer * | bufp | ) |
| const char* re_compile_pattern | ( | char * | pattern, |
| int | length, | ||
| struct re_pattern_buffer * | bufp | ||
| ) | const |
| int re_exec | ( | char * | s | ) | const |
| int re_match | ( | struct re_pattern_buffer * | bufp, |
| const char * | string, | ||
| int | size, | ||
| int | pos, | ||
| struct re_registers * | regs | ||
| ) |
| int re_match_2 | ( | struct re_pattern_buffer * | bufp, |
| const char * | string1, | ||
| int | size1, | ||
| const char * | string2, | ||
| int | size2, | ||
| int | pos, | ||
| struct re_registers * | regs, | ||
| int | stop | ||
| ) |
| int re_search | ( | struct re_pattern_buffer * | bufp, |
| const char * | string, | ||
| int | size, | ||
| int | startpos, | ||
| int | range, | ||
| struct re_registers * | regs | ||
| ) |
| int re_search_2 | ( | struct re_pattern_buffer * | bufp, |
| const char * | string1, | ||
| int | size1, | ||
| const char * | string2, | ||
| int | size2, | ||
| int | startpos, | ||
| int | range, | ||
| struct re_registers * | regs, | ||
| int | stop | ||
| ) |
| void re_set_registers | ( | struct re_pattern_buffer * | bufp, |
| struct re_registers * | regs, | ||
| unsigned | num_regs, | ||
| regoff_t * | starts, | ||
| regoff_t * | ends | ||
| ) |
| reg_syntax_t re_set_syntax | ( | reg_syntax_t | syntax | ) |
| char* realloc | ( | ) |
| void regfree | ( | regex_t * | preg | ) |
| static void store_op2 | ( | re_opcode_t | op, |
| unsigned char * | loc, | ||
| int | arg1, | ||
| int | arg2 | ||
| ) |
| int re_max_failures = 2000 |
| reg_syntax_t re_syntax_options = RE_SYNTAX_EMACS |