Go to the source code of this file.
Data Structures | |
struct | re_node_set |
struct | re_charset_t |
struct | re_token_t |
struct | re_string_t |
struct | bin_tree_t |
struct | bin_tree_storage_t |
struct | re_dfastate_t |
struct | re_state_table_entry |
struct | state_array_t |
struct | re_sub_match_last_t |
struct | re_sub_match_top_t |
struct | re_backref_cache_entry |
struct | re_match_context_t |
struct | re_sift_context_t |
struct | re_fail_stack_ent_t |
struct | re_fail_stack_t |
struct | re_dfa_t |
struct | bracket_elem_t |
Typedefs | |
typedef unsigned long int | bitset_word_t |
typedef bitset_word_t | bitset_t [BITSET_WORDS] |
typedef bitset_word_t * | re_bitset_ptr_t |
typedef const bitset_word_t * | re_const_bitset_ptr_t |
typedef struct re_string_t | re_string_t |
typedef struct re_dfa_t | re_dfa_t |
typedef struct bin_tree_t | bin_tree_t |
typedef struct bin_tree_storage_t | bin_tree_storage_t |
typedef struct re_dfastate_t | re_dfastate_t |
Enumerations | |
enum | bool { false, true } |
enum | re_context_type { INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, LINE_FIRST = PREV_NEWLINE_CONSTRAINT, LINE_LAST = NEXT_NEWLINE_CONSTRAINT, BUF_FIRST = PREV_BEGBUF_CONSTRAINT, BUF_LAST = NEXT_ENDBUF_CONSTRAINT, WORD_DELIM = WORD_DELIM_CONSTRAINT, NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT } |
enum | re_token_type_t { NON_TYPE = 0, CHARACTER = 1, END_OF_RE = 2, SIMPLE_BRACKET = 3, OP_BACK_REF = 4, OP_PERIOD = 5, COMPLEX_BRACKET = 6, OP_UTF8_PERIOD = 7, OP_OPEN_SUBEXP = EPSILON_BIT | 0, OP_CLOSE_SUBEXP = EPSILON_BIT | 1, OP_ALT = EPSILON_BIT | 2, OP_DUP_ASTERISK = EPSILON_BIT | 3, ANCHOR = EPSILON_BIT | 4, CONCAT = 16, SUBEXP = 17, OP_DUP_PLUS = 18, OP_DUP_QUESTION, OP_OPEN_BRACKET, OP_CLOSE_BRACKET, OP_CHARSET_RANGE, OP_OPEN_DUP_NUM, OP_CLOSE_DUP_NUM, OP_NON_MATCH_LIST, OP_OPEN_COLL_ELEM, OP_CLOSE_COLL_ELEM, OP_OPEN_EQUIV_CLASS, OP_CLOSE_EQUIV_CLASS, OP_OPEN_CHAR_CLASS, OP_CLOSE_CHAR_CLASS, OP_WORD, OP_NOTWORD, OP_SPACE, OP_NOTSPACE, BACK_SLASH } |
enum | bracket_elem_type { SB_CHAR, MB_CHAR, EQUIV_CLASS, COLL_SYM, CHAR_CLASS } |
Functions | |
void | gkfooo () |
static reg_errcode_t | re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) internal_function |
static void | build_wcs_buffer (re_string_t *pstr) internal_function |
static int | build_wcs_upper_buffer (re_string_t *pstr) internal_function |
static void | build_upper_buffer (re_string_t *pstr) internal_function |
static void | re_string_translate_buffer (re_string_t *pstr) internal_function |
static unsigned int | re_string_context_at (const re_string_t *input, int idx, int eflags) internal_function __attribute((pure)) |
static void | bitset_not (bitset_t set) |
static void | bitset_merge (bitset_t dest, const bitset_t src) |
static void | bitset_mask (bitset_t dest, const bitset_t src) |
static int internal_function | __attribute ((pure)) |
static void | re_string_construct_common (const char *str, int len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa) internal_function |
static re_dfastate_t * | create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash) internal_function |
static re_dfastate_t * | create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, unsigned int hash) internal_function |
static reg_errcode_t internal_function | re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len, RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa) |
static reg_errcode_t internal_function | re_string_construct (re_string_t *pstr, const char *str, int len, RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa) |
static int internal_function | re_string_skip_chars (re_string_t *pstr, int new_raw_idx, wint_t *last_wc) |
static reg_errcode_t internal_function | re_string_reconstruct (re_string_t *pstr, int idx, int eflags) |
static void internal_function | re_string_destruct (re_string_t *pstr) |
static reg_errcode_t internal_function | re_node_set_alloc (re_node_set *set, int size) |
static reg_errcode_t internal_function | re_node_set_init_1 (re_node_set *set, int elem) |
static reg_errcode_t internal_function | re_node_set_init_2 (re_node_set *set, int elem1, int elem2) |
static reg_errcode_t internal_function | re_node_set_init_copy (re_node_set *dest, const re_node_set *src) |
static reg_errcode_t internal_function | re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) |
static reg_errcode_t internal_function | re_node_set_init_union (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) |
static reg_errcode_t internal_function | re_node_set_merge (re_node_set *dest, const re_node_set *src) |
static int internal_function | re_node_set_insert (re_node_set *set, int elem) |
static int internal_function | re_node_set_insert_last (re_node_set *set, int elem) |
static void internal_function | re_node_set_remove_at (re_node_set *set, int idx) |
static int internal_function | re_dfa_add_node (re_dfa_t *dfa, re_token_t token) |
static unsigned int internal_function | calc_state_hash (const re_node_set *nodes, unsigned int context) |
static re_dfastate_t *internal_function | re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes) |
static re_dfastate_t *internal_function | re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context) |
static reg_errcode_t | register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, unsigned int hash) |
static void | free_state (re_dfastate_t *state) |
static reg_errcode_t | re_compile_internal (regex_t *preg, const char *pattern, size_t length, reg_syntax_t syntax) |
static void | re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap) |
static reg_errcode_t | init_dfa (re_dfa_t *dfa, size_t pat_len) |
static void | free_charset (re_charset_t *cset) |
static void | free_workarea_compile (regex_t *preg) |
static reg_errcode_t | create_initial_state (re_dfa_t *dfa) |
static void | optimize_utf8 (re_dfa_t *dfa) |
static reg_errcode_t | analyze (regex_t *preg) |
static reg_errcode_t | preorder (bin_tree_t *root, reg_errcode_t(fn(void *, bin_tree_t *)), void *extra) |
static reg_errcode_t | postorder (bin_tree_t *root, reg_errcode_t(fn(void *, bin_tree_t *)), void *extra) |
static reg_errcode_t | optimize_subexps (void *extra, bin_tree_t *node) |
static reg_errcode_t | lower_subexps (void *extra, bin_tree_t *node) |
static bin_tree_t * | lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) |
static reg_errcode_t | calc_first (void *extra, bin_tree_t *node) |
static reg_errcode_t | calc_next (void *extra, bin_tree_t *node) |
static reg_errcode_t | link_nfa_nodes (void *extra, bin_tree_t *node) |
static int | duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint) |
static int | search_duplicated_node (const re_dfa_t *dfa, int org_node, unsigned int constraint) |
static reg_errcode_t | calc_eclosure (re_dfa_t *dfa) |
static reg_errcode_t | calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root) |
static reg_errcode_t | calc_inveclosure (re_dfa_t *dfa) |
static int | fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) |
static int | peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) internal_function |
static bin_tree_t * | parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err) |
static bin_tree_t * | parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) |
static bin_tree_t * | parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) |
static bin_tree_t * | parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) |
static bin_tree_t * | parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err) |
static bin_tree_t * | parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) |
static bin_tree_t * | parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) |
static reg_errcode_t | parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, int accept_hyphen) |
static reg_errcode_t | parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token) |
static reg_errcode_t | build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, int *equiv_class_alloc, const unsigned char *name) |
static reg_errcode_t | build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, int *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax) |
static reg_errcode_t | build_equiv_class (bitset_t sbcset, const unsigned char *name) |
static reg_errcode_t | build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const unsigned char *class_name, reg_syntax_t syntax) |
static bin_tree_t * | build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const unsigned char *class_name, const unsigned char *extra, int non_match, reg_errcode_t *err) |
static bin_tree_t * | create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type) |
static bin_tree_t * | create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token) |
static bin_tree_t * | duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa) |
static void | free_token (re_token_t *node) |
static reg_errcode_t | free_tree (void *extra, bin_tree_t *node) |
static reg_errcode_t | mark_opt_subexp (void *extra, bin_tree_t *node) |
const char * | re_compile_pattern (char *pattern, size_t length, struct re_pattern_buffer *bufp) const |
weak_alias (__re_compile_pattern, re_compile_pattern) | |
weak_alias (__re_set_syntax, re_set_syntax) | |
weak_alias (__re_compile_fastmap, re_compile_fastmap) | |
int | regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags) |
weak_alias (__regcomp, regcomp) | |
weak_alias (__regerror, regerror) | |
static void | free_dfa_content (re_dfa_t *dfa) |
void | regfree (regex_t *preg) |
weak_alias (__regfree, regfree) | |
libc_freeres_fn (free_mem) | |
static void internal_function | init_word_char (re_dfa_t *dfa) |
static reg_errcode_t internal_function | duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node, int root_node, unsigned int init_constraint) |
static void internal_function | fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) |
static int internal_function | peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) |
static reg_errcode_t internal_function | build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc, bracket_elem_t *start_elem, bracket_elem_t *end_elem) build_range_exp(bitset_t sbcset |
static void | match_ctx_clean (re_match_context_t *mctx) internal_function |
static void | match_ctx_free (re_match_context_t *cache) internal_function |
static reg_errcode_t | match_ctx_add_entry (re_match_context_t *cache, int node, int str_idx, int from, int to) internal_function |
static int | search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx) internal_function |
static reg_errcode_t | match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx) internal_function |
static re_sub_match_last_t * | match_ctx_add_sublast (re_sub_match_top_t *subtop, int node, int str_idx) internal_function |
static void | sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, int last_node, int last_str_idx) internal_function |
static reg_errcode_t | re_search_internal (const regex_t *preg, const char *string, int length, int start, int range, int stop, size_t nmatch, regmatch_t pmatch[], int eflags) internal_function |
static int | re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, int length1, const char *string2, int length2, int start, int range, struct re_registers *regs, int stop, int ret_len) internal_function |
static int | re_search_stub (struct re_pattern_buffer *bufp, const char *string, int length, int start, int range, int stop, struct re_registers *regs, int ret_len) internal_function |
static unsigned | re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, int nregs, int regs_allocated) internal_function |
static reg_errcode_t | prune_impossible_nodes (re_match_context_t *mctx) internal_function |
static int | check_matching (re_match_context_t *mctx, int fl_longest_match, int *p_match_first) internal_function |
static int | check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, int idx) internal_function |
static void | update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, int cur_node, int cur_idx, int nmatch) internal_function |
static reg_errcode_t | push_fail_stack (struct re_fail_stack_t *fs, int str_idx, int dest_node, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes) internal_function |
static reg_errcode_t | set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, int fl_backtrack) internal_function |
static reg_errcode_t | free_fail_stack_return (struct re_fail_stack_t *fs) internal_function |
static int | sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, int node_idx, int str_idx, int max_str_idx) internal_function |
static reg_errcode_t | sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) internal_function |
static reg_errcode_t | build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *cur_dest) internal_function |
static reg_errcode_t | update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *dest_nodes) internal_function |
static reg_errcode_t | add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) internal_function |
static int | check_dst_limits (const re_match_context_t *mctx, re_node_set *limits, int dst_node, int dst_idx, int src_node, int src_idx) internal_function |
static int | check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, int subexp_idx, int from_node, int bkref_idx) internal_function |
static int | check_dst_limits_calc_pos (const re_match_context_t *mctx, int limit, int subexp_idx, int node, int str_idx, int bkref_idx) internal_function |
static reg_errcode_t | check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, int str_idx) internal_function |
static reg_errcode_t | sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, const re_node_set *candidates) internal_function |
static reg_errcode_t | merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, int num) internal_function |
static re_dfastate_t * | find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) internal_function |
static re_dfastate_t * | transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) internal_function |
static re_dfastate_t * | merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) internal_function |
static reg_errcode_t | check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, int str_idx) internal_function |
static re_dfastate_t * | transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *pstate) internal_function |
static reg_errcode_t | transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) internal_function |
static reg_errcode_t | transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) internal_function |
static reg_errcode_t | get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx) internal_function |
static reg_errcode_t | get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, int bkref_node, int bkref_str) internal_function |
static int | find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, int subexp_idx, int type) internal_function |
static reg_errcode_t | check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node, int top_str, int last_node, int last_str, int type) internal_function |
static reg_errcode_t | check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) internal_function |
static reg_errcode_t | check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, int ex_subexp, int type) internal_function |
static reg_errcode_t | check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, int target, int ex_subexp, int type) internal_function |
static reg_errcode_t | expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, int cur_str, int subexp_num, int type) internal_function |
static int | build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) internal_function |
static int | check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, const re_string_t *input, int idx) internal_function |
static unsigned int | find_collation_sequence_value (const unsigned char *mbs, size_t name_len) internal_function |
static int | group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, bitset_t *states_ch) internal_function |
static int | check_node_accept (const re_match_context_t *mctx, const re_token_t *node, int idx) internal_function |
static reg_errcode_t | extend_buffers (re_match_context_t *mctx) internal_function |
int | regexec (regex_t *__restrict preg, const char *__restrict string, size_t nmatch, pmatch, int eflags) const |
versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4) | |
__typeof__ (__regexec) | |
compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0) | |
int | re_match (struct re_pattern_buffer *bufp, const char *string, int length, int start, struct re_registers *regs) |
weak_alias (__re_match, re_match) | |
weak_alias (__re_search, re_search) | |
weak_alias (__re_match_2, re_match_2) | |
weak_alias (__re_search_2, re_search_2) | |
void | re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs, unsigned num_regs, regoff_t *starts, regoff_t *ends) |
weak_alias (__re_set_registers, re_set_registers) | |
static reg_errcode_t | re_search_internal (regex_t *preg, const char *string, int length, int start, int range, int stop, size_t nmatch, pmatch, int eflags) const |
static re_dfastate_t * | __attribute ((always_inline)) |
static int internal_function | check_halt_node_context (const re_dfa_t *dfa, int node, unsigned int context) |
static int internal_function | proceed_next_node (const re_match_context_t *mctx, int nregs, regmatch_t *regs, int *pidx, int node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) |
static int internal_function | pop_fail_stack (struct re_fail_stack_t *fs, int *pidx, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes) |
static reg_errcode_t internal_function | clean_state_log_if_needed (re_match_context_t *mctx, int next_state_log_idx) |
static reg_errcode_t internal_function | sub_epsilon_src_nodes (const re_dfa_t *dfa, int node, re_node_set *dest_nodes, const re_node_set *candidates) |
static reg_errcode_t internal_function | match_ctx_init (re_match_context_t *mctx, int eflags, int n) |
Variables | |
const char __re_error_msgid[] | attribute_hidden |
static reg_errcode_t internal_function bracket_elem_t * | start_elem |
typedef unsigned long int bitset_word_t |
typedef bitset_word_t bitset_t[BITSET_WORDS] |
typedef bitset_word_t* re_bitset_ptr_t |
typedef const bitset_word_t* re_const_bitset_ptr_t |
typedef struct re_string_t re_string_t |
typedef struct bin_tree_t bin_tree_t |
typedef struct bin_tree_storage_t bin_tree_storage_t |
typedef struct re_dfastate_t re_dfastate_t |
enum re_context_type |
enum re_token_type_t |
enum bracket_elem_type |
static reg_errcode_t internal_function re_string_realloc_buffers | ( | re_string_t * | pstr, | |
int | new_buf_len | |||
) | [static] |
Definition at line 981 of file gkregex.c.
References re_string_t::bufs_len, re_string_t::mb_cur_max, re_string_t::mbs, re_string_t::mbs_allocated, re_string_t::offsets, REG_ESPACE, REG_NOERROR, and re_string_t::wcs.
Referenced by extend_buffers(), re_string_allocate(), and re_string_construct().
static void internal_function build_wcs_buffer | ( | re_string_t * | pstr | ) | [static] |
Definition at line 1046 of file gkregex.c.
References assert, buf, re_string_t::bufs_len, re_string_t::cur_state, re_string_t::len, re_string_t::mb_cur_max, re_string_t::mbs, re_string_t::raw_mbs, re_string_t::raw_mbs_idx, re_string_t::trans, re_string_t::valid_len, re_string_t::valid_raw_len, and re_string_t::wcs.
Referenced by extend_buffers(), re_string_construct(), and re_string_reconstruct().
static reg_errcode_t internal_function build_wcs_upper_buffer | ( | re_string_t * | pstr | ) | [static] |
Definition at line 1114 of file gkregex.c.
References assert, buf, re_string_t::bufs_len, re_string_t::cur_state, re_string_t::len, re_string_t::map_notascii, re_string_t::mb_cur_max, re_string_t::mbs, re_string_t::offsets, re_string_t::offsets_needed, re_string_t::raw_mbs, re_string_t::raw_mbs_idx, re_string_t::raw_stop, REG_ESPACE, REG_NOERROR, size_t, re_string_t::stop, re_string_t::trans, re_string_t::valid_len, re_string_t::valid_raw_len, and re_string_t::wcs.
Referenced by extend_buffers(), re_string_construct(), and re_string_reconstruct().
static void internal_function build_upper_buffer | ( | re_string_t * | pstr | ) | [static] |
Definition at line 1369 of file gkregex.c.
References re_string_t::bufs_len, re_string_t::len, re_string_t::mbs, re_string_t::raw_mbs, re_string_t::raw_mbs_idx, re_string_t::trans, re_string_t::valid_len, and re_string_t::valid_raw_len.
Referenced by extend_buffers(), re_string_construct(), and re_string_reconstruct().
static void internal_function re_string_translate_buffer | ( | re_string_t * | pstr | ) | [static] |
Definition at line 1392 of file gkregex.c.
References re_string_t::bufs_len, re_string_t::len, re_string_t::mbs, re_string_t::raw_mbs, re_string_t::raw_mbs_idx, re_string_t::trans, re_string_t::valid_len, and re_string_t::valid_raw_len.
Referenced by extend_buffers(), re_string_construct(), and re_string_reconstruct().
static unsigned int internal_function re_string_context_at | ( | const re_string_t * | input, | |
int | idx, | |||
int | eflags | |||
) | [static] |
Definition at line 1760 of file gkregex.c.
References assert, c, re_string_t::len, re_string_t::mb_cur_max, re_string_t::newline_anchor, re_string_t::tip_context, re_string_t::wcs, re_string_t::word_char, and re_string_t::word_ops_used.
Referenced by __attribute(), check_arrival(), check_halt_state_context(), check_node_accept(), merge_state_with_log(), re_string_reconstruct(), transit_state(), transit_state_bkref(), transit_state_mb(), and transit_state_sb().
Definition at line 775 of file gkregex.c.
Referenced by build_trtable(), and group_nodes_into_DFAstates().
static int internal_function __attribute | ( | (pure) | ) | [inline, static] |
static void internal_function re_string_construct_common | ( | const char * | str, | |
int | len, | |||
re_string_t * | pstr, | |||
RE_TRANSLATE_TYPE | trans, | |||
int | icase, | |||
const re_dfa_t * | dfa | |||
) | [static] |
Definition at line 1014 of file gkregex.c.
References re_string_t::icase, re_dfa_t::is_utf8, re_string_t::is_utf8, re_string_t::len, re_dfa_t::map_notascii, re_string_t::map_notascii, re_dfa_t::mb_cur_max, re_string_t::mb_cur_max, re_string_t::mbs_allocated, re_string_t::raw_len, re_string_t::raw_mbs, re_string_t::raw_stop, re_string_t::stop, and re_string_t::trans.
Referenced by re_string_allocate(), and re_string_construct().
static re_dfastate_t *internal_function create_ci_newstate | ( | const re_dfa_t * | dfa, | |
const re_node_set * | nodes, | |||
unsigned int | hash | |||
) | [static] |
Definition at line 2446 of file gkregex.c.
References re_token_t::accept_mb, re_dfastate_t::accept_mb, ANCHOR, calloc(), CHARACTER, re_token_t::constraint, re_node_set::elems, END_OF_RE, re_dfastate_t::entrance_nodes, free_state(), re_dfastate_t::halt, re_dfastate_t::has_backref, re_dfastate_t::has_constraint, re_node_set::nelem, re_dfa_t::nodes, re_dfastate_t::nodes, OP_BACK_REF, re_node_set_init_copy(), REG_NOERROR, register_state(), re_token_t::type, and type.
Referenced by re_acquire_state().
static re_dfastate_t *internal_function create_cd_newstate | ( | const re_dfa_t * | dfa, | |
const re_node_set * | nodes, | |||
unsigned int | context, | |||
unsigned int | hash | |||
) | [static] |
Definition at line 2496 of file gkregex.c.
References re_token_t::accept_mb, re_dfastate_t::accept_mb, ANCHOR, calloc(), CHARACTER, re_token_t::constraint, re_dfastate_t::context, re_token_t::ctx_type, re_node_set::elems, END_OF_RE, re_dfastate_t::entrance_nodes, free_state(), re_dfastate_t::halt, re_dfastate_t::has_backref, re_dfastate_t::has_constraint, re_node_set::nelem, re_dfa_t::nodes, re_dfastate_t::nodes, OP_BACK_REF, re_token_t::opr, re_node_set_init_copy(), re_node_set_remove_at(), REG_NOERROR, register_state(), re_token_t::type, and type.
Referenced by re_acquire_state_context().
static reg_errcode_t internal_function re_string_allocate | ( | re_string_t * | pstr, | |
const char * | str, | |||
int | len, | |||
int | init_len, | |||
RE_TRANSLATE_TYPE | trans, | |||
int | icase, | |||
const re_dfa_t * | dfa | |||
) | [static] |
Definition at line 890 of file gkregex.c.
References re_dfa_t::mb_cur_max, re_string_t::mbs, re_string_t::mbs_allocated, re_string_construct_common(), re_string_realloc_buffers(), REG_NOERROR, re_string_t::valid_len, re_string_t::valid_raw_len, re_dfa_t::word_char, re_string_t::word_char, re_dfa_t::word_ops_used, and re_string_t::word_ops_used.
Referenced by re_search_internal().
static reg_errcode_t internal_function re_string_construct | ( | re_string_t * | pstr, | |
const char * | str, | |||
int | len, | |||
RE_TRANSLATE_TYPE | trans, | |||
int | icase, | |||
const re_dfa_t * | dfa | |||
) | [static] |
Definition at line 918 of file gkregex.c.
References re_string_t::bufs_len, build_upper_buffer(), build_wcs_buffer(), build_wcs_upper_buffer(), re_dfa_t::mb_cur_max, re_string_t::mbs, re_string_t::mbs_allocated, re_string_construct_common(), re_string_realloc_buffers(), re_string_translate_buffer(), REG_NOERROR, re_string_t::valid_len, and re_string_t::valid_raw_len.
Referenced by re_compile_internal().
static int internal_function re_string_skip_chars | ( | re_string_t * | pstr, | |
int | new_raw_idx, | |||
wint_t * | last_wc | |||
) | [static] |
Definition at line 1330 of file gkregex.c.
References re_string_t::cur_state, re_string_t::len, re_string_t::raw_mbs, re_string_t::raw_mbs_idx, and re_string_t::valid_raw_len.
Referenced by re_string_reconstruct().
static reg_errcode_t internal_function re_string_reconstruct | ( | re_string_t * | pstr, | |
int | idx, | |||
int | eflags | |||
) | [static] |
Definition at line 1413 of file gkregex.c.
References assert, buf, build_upper_buffer(), build_wcs_buffer(), build_wcs_upper_buffer(), c, re_string_t::cur_idx, re_string_t::cur_state, high, re_string_t::icase, re_string_t::is_utf8, re_string_t::len, re_string_t::mb_cur_max, re_string_t::mbs, re_string_t::mbs_allocated, re_string_t::newline_anchor, offset, re_string_t::offsets, re_string_t::offsets_needed, re_string_t::raw_len, re_string_t::raw_mbs, re_string_t::raw_mbs_idx, re_string_t::raw_stop, re_string_context_at(), re_string_skip_chars(), re_string_translate_buffer(), REG_NOERROR, re_string_t::stop, re_string_t::tip_context, re_string_t::trans, re_string_t::valid_len, re_string_t::valid_raw_len, re_string_t::wcs, re_string_t::word_char, and re_string_t::word_ops_used.
Referenced by re_search_internal().
static void internal_function re_string_destruct | ( | re_string_t * | pstr | ) | [static] |
Definition at line 1746 of file gkregex.c.
References re_string_t::mbs, re_string_t::mbs_allocated, re_string_t::offsets, and re_string_t::wcs.
Referenced by re_compile_internal(), and re_search_internal().
static reg_errcode_t internal_function re_node_set_alloc | ( | re_node_set * | set, | |
int | size | |||
) | [static] |
Definition at line 1805 of file gkregex.c.
References REG_ESPACE, and REG_NOERROR.
Referenced by add_epsilon_src_nodes(), build_trtable(), calc_eclosure_iter(), check_arrival_expand_ecl(), register_state(), and transit_state_sb().
static reg_errcode_t internal_function re_node_set_init_1 | ( | re_node_set * | set, | |
int | elem | |||
) | [static] |
Definition at line 1817 of file gkregex.c.
References REG_ESPACE, and REG_NOERROR.
Referenced by check_arrival(), expand_bkref_cache(), group_nodes_into_DFAstates(), link_nfa_nodes(), re_node_set_insert(), and sift_states_backward().
static reg_errcode_t internal_function re_node_set_init_2 | ( | re_node_set * | set, | |
int | elem1, | |||
int | elem2 | |||
) | [static] |
Definition at line 1833 of file gkregex.c.
References REG_ESPACE, and REG_NOERROR.
Referenced by link_nfa_nodes().
static reg_errcode_t internal_function re_node_set_init_copy | ( | re_node_set * | dest, | |
const re_node_set * | src | |||
) | [static] |
Definition at line 1863 of file gkregex.c.
References re_node_set::alloc, re_node_set::elems, re_node_set::nelem, REG_ESPACE, and REG_NOERROR.
Referenced by check_arrival(), create_cd_newstate(), create_ci_newstate(), create_initial_state(), expand_bkref_cache(), group_nodes_into_DFAstates(), push_fail_stack(), re_node_set_init_union(), and sift_states_bkref().
static reg_errcode_t internal_function re_node_set_add_intersect | ( | re_node_set * | dest, | |
const re_node_set * | src1, | |||
const re_node_set * | src2 | |||
) | [static] |
Definition at line 1888 of file gkregex.c.
References re_node_set::alloc, re_node_set::elems, re_node_set::nelem, REG_ESPACE, and REG_NOERROR.
Referenced by add_epsilon_src_nodes(), and sub_epsilon_src_nodes().
static reg_errcode_t internal_function re_node_set_init_union | ( | re_node_set * | dest, | |
const re_node_set * | src1, | |||
const re_node_set * | src2 | |||
) | [static] |
Definition at line 1979 of file gkregex.c.
References re_node_set::alloc, re_node_set::elems, re_node_set::nelem, re_node_set_init_copy(), REG_ESPACE, and REG_NOERROR.
Referenced by merge_state_array(), merge_state_with_log(), transit_state_bkref(), and transit_state_mb().
static reg_errcode_t internal_function re_node_set_merge | ( | re_node_set * | dest, | |
const re_node_set * | src | |||
) | [static] |
Definition at line 2032 of file gkregex.c.
References re_node_set::alloc, re_node_set::elems, re_node_set::nelem, REG_ESPACE, and REG_NOERROR.
Referenced by add_epsilon_src_nodes(), build_trtable(), calc_eclosure_iter(), check_arrival(), check_arrival_add_next_nodes(), check_arrival_expand_ecl(), create_initial_state(), expand_bkref_cache(), and transit_state_sb().
static int internal_function re_node_set_insert | ( | re_node_set * | set, | |
int | elem | |||
) | [static] |
Definition at line 2115 of file gkregex.c.
References re_node_set_init_1(), and REG_NOERROR.
Referenced by build_sifted_states(), calc_eclosure_iter(), check_arrival_add_next_nodes(), check_arrival_expand_ecl_sub(), duplicate_node_closure(), expand_bkref_cache(), group_nodes_into_DFAstates(), proceed_next_node(), and sift_states_bkref().
static int internal_function re_node_set_insert_last | ( | re_node_set * | set, | |
int | elem | |||
) | [static] |
Definition at line 2172 of file gkregex.c.
Referenced by calc_inveclosure(), and register_state().
static void internal_function re_node_set_remove_at | ( | re_node_set * | set, | |
int | idx | |||
) | [static] |
Definition at line 2232 of file gkregex.c.
Referenced by create_cd_newstate(), and sub_epsilon_src_nodes().
static int internal_function re_dfa_add_node | ( | re_dfa_t * | dfa, | |
re_token_t | token | |||
) | [static] |
Definition at line 2247 of file gkregex.c.
References re_token_t::accept_mb, COMPLEX_BRACKET, re_token_t::constraint, re_dfa_t::eclosures, re_dfa_t::edests, re_dfa_t::mb_cur_max, re_dfa_t::nexts, re_dfa_t::nodes, re_dfa_t::nodes_alloc, re_dfa_t::nodes_len, OP_PERIOD, re_dfa_t::org_indices, re_token_t::type, and type.
Referenced by calc_first(), and duplicate_node().
static unsigned int internal_function calc_state_hash | ( | const re_node_set * | nodes, | |
unsigned int | context | |||
) | [inline, static] |
Definition at line 2292 of file gkregex.c.
References re_node_set::elems, and re_node_set::nelem.
Referenced by re_acquire_state(), and re_acquire_state_context().
static re_dfastate_t* internal_function re_acquire_state | ( | reg_errcode_t * | err, | |
const re_dfa_t * | dfa, | |||
const re_node_set * | nodes | |||
) | [static] |
Definition at line 2312 of file gkregex.c.
References re_state_table_entry::array, calc_state_hash(), create_ci_newstate(), re_dfastate_t::hash, re_node_set::nelem, re_dfastate_t::nodes, re_state_table_entry::num, REG_ESPACE, REG_NOERROR, re_dfa_t::state_hash_mask, and re_dfa_t::state_table.
Referenced by add_epsilon_src_nodes(), check_arrival_add_next_nodes(), expand_bkref_cache(), merge_state_array(), and update_cur_sifted_state().
static re_dfastate_t* internal_function re_acquire_state_context | ( | reg_errcode_t * | err, | |
const re_dfa_t * | dfa, | |||
const re_node_set * | nodes, | |||
unsigned int | context | |||
) | [static] |
Definition at line 2356 of file gkregex.c.
References re_state_table_entry::array, calc_state_hash(), re_dfastate_t::context, create_cd_newstate(), re_dfastate_t::entrance_nodes, re_dfastate_t::hash, re_node_set::nelem, re_state_table_entry::num, REG_ESPACE, REG_NOERROR, re_dfa_t::state_hash_mask, and re_dfa_t::state_table.
Referenced by __attribute(), build_trtable(), check_arrival(), create_initial_state(), merge_state_with_log(), transit_state_bkref(), transit_state_mb(), and transit_state_sb().
static reg_errcode_t register_state | ( | const re_dfa_t * | dfa, | |
re_dfastate_t * | newstate, | |||
unsigned int | hash | |||
) | [static] |
Definition at line 2392 of file gkregex.c.
References re_state_table_entry::alloc, re_state_table_entry::array, re_node_set::elems, re_dfastate_t::hash, re_node_set::nelem, re_dfa_t::nodes, re_dfastate_t::nodes, re_dfastate_t::non_eps_nodes, re_state_table_entry::num, re_node_set_alloc(), re_node_set_insert_last(), REG_ESPACE, REG_NOERROR, re_dfa_t::state_hash_mask, re_dfa_t::state_table, and re_token_t::type.
Referenced by create_cd_newstate(), and create_ci_newstate().
static void free_state | ( | re_dfastate_t * | state | ) | [static] |
Definition at line 2426 of file gkregex.c.
References re_dfastate_t::entrance_nodes, re_dfastate_t::inveclosure, re_dfastate_t::nodes, re_dfastate_t::non_eps_nodes, re_dfastate_t::trtable, and re_dfastate_t::word_trtable.
Referenced by create_cd_newstate(), create_ci_newstate(), and free_dfa_content().
static reg_errcode_t re_compile_internal | ( | regex_t * | preg, | |
const char * | pattern, | |||
size_t | length, | |||
reg_syntax_t | syntax | |||
) | [static] |
Definition at line 3286 of file gkregex.c.
References re_pattern_buffer::allocated, analyze(), re_pattern_buffer::buffer, re_pattern_buffer::can_be_null, create_initial_state(), re_pattern_buffer::fastmap_accurate, free_dfa_content(), free_workarea_compile(), init_dfa(), re_dfa_t::is_utf8, re_pattern_buffer::not_bol, re_pattern_buffer::not_eol, optimize_utf8(), parse(), re_pattern_buffer::re_nsub, re_dfa_t::re_str, re_string_construct(), re_string_destruct(), REG_ESPACE, REG_NOERROR, re_pattern_buffer::regs_allocated, re_dfa_t::str_tree, re_pattern_buffer::syntax, re_pattern_buffer::translate, and re_pattern_buffer::used.
Referenced by re_compile_pattern(), and regcomp().
static void re_compile_fastmap_iter | ( | regex_t * | bufp, | |
const re_dfastate_t * | init_state, | |||
char * | fastmap | |||
) | [static] |
Definition at line 2877 of file gkregex.c.
References buf, re_pattern_buffer::buffer, re_token_t::c, re_pattern_buffer::can_be_null, CHARACTER, COMPLEX_BRACKET, re_node_set::elems, END_OF_RE, int32_t, re_dfa_t::mb_cur_max, re_token_t::mb_partial, re_charset_t::mbchars, re_token_t::mbcset, re_charset_t::nchar_classes, re_charset_t::ncoll_syms, re_node_set::nelem, re_charset_t::nequiv_classes, re_charset_t::nmbchars, re_dfa_t::nodes, re_dfastate_t::nodes, re_charset_t::non_match, re_charset_t::nranges, OP_PERIOD, OP_UTF8_PERIOD, re_token_t::opr, re_token_t::sbcset, SIMPLE_BRACKET, re_pattern_buffer::syntax, re_token_t::type, type, and PUP::w.
Referenced by weak_alias().
static reg_errcode_t init_dfa | ( | re_dfa_t * | dfa, | |
size_t | pat_len | |||
) | [static] |
Definition at line 3385 of file gkregex.c.
References calloc(), re_dfa_t::is_utf8, re_dfa_t::map_notascii, re_dfa_t::mb_cur_max, re_dfa_t::nodes, re_dfa_t::nodes_alloc, REG_ESPACE, REG_NOERROR, re_dfa_t::sb_char, re_dfa_t::state_hash_mask, re_dfa_t::state_table, and re_dfa_t::str_tree_storage_idx.
Referenced by re_compile_internal().
static void free_charset | ( | re_charset_t * | cset | ) | [static] |
static void free_workarea_compile | ( | regex_t * | preg | ) | [static] |
Definition at line 3496 of file gkregex.c.
References re_pattern_buffer::buffer, bin_tree_storage_t::next, re_dfa_t::org_indices, re_dfa_t::str_tree, re_dfa_t::str_tree_storage, and re_dfa_t::str_tree_storage_idx.
Referenced by re_compile_internal().
static reg_errcode_t create_initial_state | ( | re_dfa_t * | dfa | ) | [static] |
Definition at line 3515 of file gkregex.c.
References re_dfa_t::eclosures, re_dfa_t::edests, re_node_set::elems, bin_tree_t::first, re_dfastate_t::has_constraint, re_token_t::idx, re_dfa_t::init_node, re_dfa_t::init_state, re_dfa_t::init_state_begbuf, re_dfa_t::init_state_nl, re_dfa_t::init_state_word, re_dfa_t::nbackref, re_node_set::nelem, bin_tree_t::node_idx, re_dfa_t::nodes, OP_BACK_REF, OP_CLOSE_SUBEXP, re_token_t::opr, re_acquire_state_context(), re_node_set_init_copy(), re_node_set_merge(), REG_NOERROR, re_dfa_t::str_tree, re_token_t::type, and type.
Referenced by re_compile_internal().
static void optimize_utf8 | ( | re_dfa_t * | dfa | ) | [static] |
Definition at line 3597 of file gkregex.c.
References abort(), ANCHOR, assert, BUF_FIRST, BUF_LAST, re_token_t::c, CHARACTER, COMPLEX_BRACKET, END_OF_RE, re_dfa_t::has_mb_node, re_token_t::idx, re_dfa_t::is_utf8, LINE_FIRST, LINE_LAST, re_dfa_t::mb_cur_max, re_token_t::mb_partial, re_dfa_t::nbackref, re_dfa_t::nodes, re_dfa_t::nodes_len, OP_ALT, OP_BACK_REF, OP_CLOSE_SUBEXP, OP_DUP_ASTERISK, OP_OPEN_SUBEXP, OP_PERIOD, OP_UTF8_PERIOD, re_token_t::opr, re_token_t::sbcset, SIMPLE_BRACKET, and re_token_t::type.
Referenced by re_compile_internal().
static reg_errcode_t analyze | ( | regex_t * | preg | ) | [static] |
Definition at line 3665 of file gkregex.c.
References re_pattern_buffer::buffer, calc_eclosure(), calc_first(), calc_inveclosure(), calc_next(), re_dfa_t::eclosures, re_dfa_t::edests, free(), re_dfa_t::has_plural_match, re_dfa_t::inveclosures, link_nfa_nodes(), lower_subexps(), re_dfa_t::nbackref, re_dfa_t::nexts, re_pattern_buffer::no_sub, re_dfa_t::nodes_alloc, re_dfa_t::nodes_len, optimize_subexps(), re_dfa_t::org_indices, postorder(), preorder(), re_pattern_buffer::re_nsub, REG_ESPACE, REG_NOERROR, re_dfa_t::str_tree, and re_dfa_t::subexp_map.
Referenced by re_compile_internal().
static reg_errcode_t preorder | ( | bin_tree_t * | root, | |
reg_errcode_t(fn(void *, bin_tree_t *)) | , | |||
void * | extra | |||
) | [static] |
Definition at line 3760 of file gkregex.c.
References bin_tree_t::left, bin_tree_t::parent, REG_NOERROR, and bin_tree_t::right.
Referenced by analyze().
static reg_errcode_t postorder | ( | bin_tree_t * | root, | |
reg_errcode_t(fn(void *, bin_tree_t *)) | , | |||
void * | extra | |||
) | [static] |
Definition at line 3728 of file gkregex.c.
References bin_tree_t::left, bin_tree_t::parent, REG_NOERROR, and bin_tree_t::right.
Referenced by analyze(), and parse_dup_op().
static reg_errcode_t optimize_subexps | ( | void * | extra, | |
bin_tree_t * | node | |||
) | [static] |
Definition at line 3793 of file gkregex.c.
References re_token_t::idx, bin_tree_t::left, OP_BACK_REF, re_token_t::opr, bin_tree_t::parent, REG_NOERROR, SUBEXP, re_dfa_t::subexp_map, bin_tree_t::token, re_token_t::type, and re_dfa_t::used_bkref_map.
Referenced by analyze().
static reg_errcode_t lower_subexps | ( | void * | extra, | |
bin_tree_t * | node | |||
) | [static] |
Definition at line 3824 of file gkregex.c.
References bin_tree_t::left, lower_subexp(), bin_tree_t::parent, REG_NOERROR, bin_tree_t::right, SUBEXP, bin_tree_t::token, and re_token_t::type.
Referenced by analyze().
static bin_tree_t * lower_subexp | ( | reg_errcode_t * | err, | |
regex_t * | preg, | |||
bin_tree_t * | node | |||
) | [static] |
Definition at line 3846 of file gkregex.c.
References re_pattern_buffer::buffer, CONCAT, create_tree(), re_token_t::idx, bin_tree_t::left, re_pattern_buffer::no_sub, op, OP_CLOSE_SUBEXP, OP_OPEN_SUBEXP, re_token_t::opr, re_token_t::opt_subexp, REG_ESPACE, bin_tree_t::token, and re_dfa_t::used_bkref_map.
Referenced by lower_subexps().
static reg_errcode_t calc_first | ( | void * | extra, | |
bin_tree_t * | node | |||
) | [static] |
Definition at line 3883 of file gkregex.c.
References CONCAT, bin_tree_t::first, bin_tree_t::left, bin_tree_t::node_idx, re_dfa_add_node(), REG_ESPACE, REG_NOERROR, bin_tree_t::token, and re_token_t::type.
Referenced by analyze().
static reg_errcode_t calc_next | ( | void * | extra, | |
bin_tree_t * | node | |||
) | [static] |
Definition at line 3903 of file gkregex.c.
References CONCAT, bin_tree_t::first, bin_tree_t::left, bin_tree_t::next, OP_DUP_ASTERISK, REG_NOERROR, bin_tree_t::right, bin_tree_t::token, and re_token_t::type.
Referenced by analyze().
static reg_errcode_t link_nfa_nodes | ( | void * | extra, | |
bin_tree_t * | node | |||
) | [static] |
Definition at line 3926 of file gkregex.c.
References ANCHOR, assert, CONCAT, re_dfa_t::edests, END_OF_RE, bin_tree_t::first, re_dfa_t::has_plural_match, bin_tree_t::left, left(), bin_tree_t::next, re_dfa_t::nexts, bin_tree_t::node_idx, OP_ALT, OP_BACK_REF, OP_CLOSE_SUBEXP, OP_DUP_ASTERISK, OP_OPEN_SUBEXP, re_node_set_init_1(), re_node_set_init_2(), REG_NOERROR, bin_tree_t::right, bin_tree_t::token, and re_token_t::type.
Referenced by analyze().
Definition at line 4116 of file gkregex.c.
References ANCHOR, re_token_t::constraint, re_token_t::ctx_type, re_token_t::duplicated, re_dfa_t::nodes, re_token_t::opr, re_dfa_t::org_indices, re_dfa_add_node(), and re_token_t::type.
Referenced by duplicate_node_closure().
static int search_duplicated_node | ( | const re_dfa_t * | dfa, | |
int | org_node, | |||
unsigned int | constraint | |||
) | [static] |
Definition at line 4098 of file gkregex.c.
References re_token_t::constraint, re_token_t::duplicated, re_dfa_t::nodes, re_dfa_t::nodes_len, and re_dfa_t::org_indices.
Referenced by duplicate_node_closure().
static reg_errcode_t calc_eclosure | ( | re_dfa_t * | dfa | ) | [static] |
Definition at line 4156 of file gkregex.c.
References assert, calc_eclosure_iter(), re_dfa_t::eclosures, incomplete, re_node_set::nelem, re_dfa_t::nodes_len, and REG_NOERROR.
Referenced by analyze().
static reg_errcode_t calc_eclosure_iter | ( | re_node_set * | new_set, | |
re_dfa_t * | dfa, | |||
int | node, | |||
int | root | |||
) | [static] |
Definition at line 4200 of file gkregex.c.
References ANCHOR, re_token_t::ctx_type, duplicate_node_closure(), re_token_t::duplicated, re_dfa_t::eclosures, re_dfa_t::edests, re_node_set::elems, incomplete, re_node_set::nelem, re_dfa_t::nodes, re_token_t::opr, re_node_set_alloc(), re_node_set_insert(), re_node_set_merge(), REG_NOERROR, and re_token_t::type.
Referenced by calc_eclosure().
static reg_errcode_t calc_inveclosure | ( | re_dfa_t * | dfa | ) | [static] |
Definition at line 4133 of file gkregex.c.
References re_dfa_t::eclosures, re_node_set::elems, re_dfa_t::inveclosures, re_node_set::nelem, re_dfa_t::nodes_len, re_node_set_insert_last(), REG_ESPACE, REG_NOERROR, and src.
Referenced by analyze().
static int fetch_number | ( | re_string_t * | input, | |
re_token_t * | token, | |||
reg_syntax_t | syntax | |||
) | [static] |
static int internal_function peek_token | ( | re_token_t * | token, | |
re_string_t * | input, | |||
reg_syntax_t | syntax | |||
) | [static] |
Definition at line 4289 of file gkregex.c.
References ANCHOR, BACK_SLASH, BUF_FIRST, BUF_LAST, re_token_t::c, c, CHARACTER, re_token_t::ctx_type, END_OF_RE, re_token_t::idx, LINE_FIRST, LINE_LAST, re_string_t::mb_cur_max, re_token_t::mb_partial, NOT_WORD_DELIM, OP_ALT, OP_BACK_REF, OP_CLOSE_DUP_NUM, OP_CLOSE_SUBEXP, OP_DUP_ASTERISK, OP_DUP_PLUS, OP_DUP_QUESTION, OP_NOTSPACE, OP_NOTWORD, OP_OPEN_BRACKET, OP_OPEN_DUP_NUM, OP_OPEN_SUBEXP, OP_PERIOD, OP_SPACE, OP_WORD, re_token_t::opr, re_token_t::type, re_token_t::word_char, WORD_DELIM, WORD_FIRST, and WORD_LAST.
Referenced by fetch_token().
static bin_tree_t * parse | ( | re_string_t * | regexp, | |
regex_t * | preg, | |||
reg_syntax_t | syntax, | |||
reg_errcode_t * | err | |||
) | [static] |
Definition at line 4624 of file gkregex.c.
References re_pattern_buffer::buffer, CONCAT, create_tree(), END_OF_RE, fetch_token(), parse_reg_exp(), REG_ESPACE, REG_NOERROR, and re_dfa_t::syntax.
Referenced by re_compile_internal().
static bin_tree_t * parse_reg_exp | ( | re_string_t * | regexp, | |
regex_t * | preg, | |||
re_token_t * | token, | |||
reg_syntax_t | syntax, | |||
int | nest, | |||
reg_errcode_t * | err | |||
) | [static] |
Definition at line 4658 of file gkregex.c.
References re_pattern_buffer::buffer, create_tree(), END_OF_RE, fetch_token(), OP_ALT, OP_CLOSE_SUBEXP, parse_branch(), REG_ESPACE, REG_NOERROR, and re_token_t::type.
Referenced by parse(), and parse_sub_exp().
static bin_tree_t * parse_branch | ( | re_string_t * | regexp, | |
regex_t * | preg, | |||
re_token_t * | token, | |||
reg_syntax_t | syntax, | |||
int | nest, | |||
reg_errcode_t * | err | |||
) | [static] |
Definition at line 4699 of file gkregex.c.
References re_pattern_buffer::buffer, CONCAT, create_tree(), END_OF_RE, OP_ALT, OP_CLOSE_SUBEXP, parse_expression(), REG_ESPACE, REG_NOERROR, and re_token_t::type.
Referenced by parse_reg_exp().
static bin_tree_t * parse_expression | ( | re_string_t * | regexp, | |
regex_t * | preg, | |||
re_token_t * | token, | |||
reg_syntax_t | syntax, | |||
int | nest, | |||
reg_errcode_t * | err | |||
) | [static] |
Definition at line 4739 of file gkregex.c.
References ANCHOR, assert, BACK_SLASH, re_pattern_buffer::buffer, build_charclass_op(), CHARACTER, re_dfa_t::completed_bkref_map, CONCAT, create_token_tree(), create_tree(), re_token_t::ctx_type, END_OF_RE, fetch_token(), re_dfa_t::has_mb_node, re_token_t::idx, init_word_char(), INSIDE_NOTWORD, INSIDE_WORD, re_dfa_t::mb_cur_max, re_dfa_t::nbackref, NOT_WORD_DELIM, OP_ALT, OP_BACK_REF, OP_CLOSE_DUP_NUM, OP_CLOSE_SUBEXP, OP_DUP_ASTERISK, OP_DUP_PLUS, OP_DUP_QUESTION, OP_NOTSPACE, OP_NOTWORD, OP_OPEN_BRACKET, OP_OPEN_DUP_NUM, OP_OPEN_SUBEXP, OP_PERIOD, OP_SPACE, OP_WORD, re_token_t::opr, parse_bracket_exp(), parse_dup_op(), parse_sub_exp(), REG_BADRPT, REG_EESCAPE, REG_ERPAREN, REG_ESPACE, REG_ESUBREG, REG_NOERROR, re_string_t::trans, re_token_t::type, re_dfa_t::used_bkref_map, WORD_DELIM, WORD_FIRST, WORD_LAST, and re_dfa_t::word_ops_used.
Referenced by parse_branch().
static bin_tree_t * parse_sub_exp | ( | re_string_t * | regexp, | |
regex_t * | preg, | |||
re_token_t * | token, | |||
reg_syntax_t | syntax, | |||
int | nest, | |||
reg_errcode_t * | err | |||
) | [static] |
Definition at line 4955 of file gkregex.c.
References re_pattern_buffer::buffer, re_dfa_t::completed_bkref_map, create_tree(), fetch_token(), OP_CLOSE_SUBEXP, parse_reg_exp(), re_pattern_buffer::re_nsub, REG_EPAREN, REG_ESPACE, REG_NOERROR, SUBEXP, and re_token_t::type.
Referenced by parse_expression().
static bin_tree_t * parse_dup_op | ( | bin_tree_t * | dup_elem, | |
re_string_t * | regexp, | |||
re_dfa_t * | dfa, | |||
re_token_t * | token, | |||
reg_syntax_t | syntax, | |||
reg_errcode_t * | err | |||
) | [static] |
Definition at line 4993 of file gkregex.c.
References re_token_t::c, CHARACTER, CONCAT, create_tree(), duplicate_tree(), END_OF_RE, fetch_number(), fetch_token(), free_tree(), re_token_t::idx, mark_opt_subexp(), OP_ALT, OP_CLOSE_DUP_NUM, OP_DUP_ASTERISK, OP_DUP_PLUS, OP_DUP_QUESTION, OP_OPEN_DUP_NUM, re_token_t::opr, postorder(), REG_BADBR, REG_EBRACE, REG_ESPACE, SUBEXP, bin_tree_t::token, and re_token_t::type.
Referenced by parse_expression().
static bin_tree_t* parse_bracket_exp | ( | re_string_t * | regexp, | |
re_dfa_t * | dfa, | |||
re_token_t * | token, | |||
reg_syntax_t | syntax, | |||
reg_errcode_t * | err | |||
) | [static] |
static reg_errcode_t parse_bracket_element | ( | bracket_elem_t * | elem, | |
re_string_t * | regexp, | |||
re_token_t * | token, | |||
int | token_len, | |||
re_dfa_t * | dfa, | |||
reg_syntax_t | syntax, | |||
int | accept_hyphen | |||
) | [static] |
static reg_errcode_t parse_bracket_symbol | ( | bracket_elem_t * | elem, | |
re_string_t * | regexp, | |||
re_token_t * | token | |||
) | [static] |
static reg_errcode_t build_equiv_class | ( | bitset_t | sbcset, | |
re_charset_t * | mbcset, | |||
int * | equiv_class_alloc, | |||
const unsigned char * | name | |||
) | [static] |
static reg_errcode_t build_charclass | ( | RE_TRANSLATE_TYPE | trans, | |
bitset_t | sbcset, | |||
re_charset_t * | mbcset, | |||
int * | char_class_alloc, | |||
const unsigned char * | class_name, | |||
reg_syntax_t | syntax | |||
) | [static] |
static reg_errcode_t build_equiv_class | ( | bitset_t | sbcset, | |
const unsigned char * | name | |||
) | [static] |
static reg_errcode_t build_charclass | ( | RE_TRANSLATE_TYPE | trans, | |
bitset_t | sbcset, | |||
const unsigned char * | class_name, | |||
reg_syntax_t | syntax | |||
) | [static] |
static bin_tree_t* build_charclass_op | ( | re_dfa_t * | dfa, | |
RE_TRANSLATE_TYPE | trans, | |||
const unsigned char * | class_name, | |||
const unsigned char * | extra, | |||
int | non_match, | |||
reg_errcode_t * | err | |||
) | [static] |
static bin_tree_t* create_tree | ( | re_dfa_t * | dfa, | |
bin_tree_t * | left, | |||
bin_tree_t * | right, | |||
re_token_type_t | type | |||
) | [static] |
Referenced by lower_subexp(), parse(), parse_branch(), parse_dup_op(), parse_expression(), parse_reg_exp(), and parse_sub_exp().
static bin_tree_t* create_token_tree | ( | re_dfa_t * | dfa, | |
bin_tree_t * | left, | |||
bin_tree_t * | right, | |||
const re_token_t * | token | |||
) | [static] |
static bin_tree_t* duplicate_tree | ( | const bin_tree_t * | src, | |
re_dfa_t * | dfa | |||
) | [static] |
static void free_token | ( | re_token_t * | node | ) | [static] |
static reg_errcode_t free_tree | ( | void * | extra, | |
bin_tree_t * | node | |||
) | [static] |
static reg_errcode_t mark_opt_subexp | ( | void * | extra, | |
bin_tree_t * | node | |||
) | [static] |
const char* re_compile_pattern | ( | char * | pattern, | |
size_t | length, | |||
struct re_pattern_buffer * | bufp | |||
) | const |
Definition at line 2789 of file gkregex.c.
References re_pattern_buffer::newline_anchor, re_pattern_buffer::no_sub, re_compile_internal(), and re_syntax_options.
weak_alias | ( | __re_compile_pattern | , | |
re_compile_pattern | ||||
) |
weak_alias | ( | __re_set_syntax | , | |
re_set_syntax | ||||
) |
Definition at line 2839 of file gkregex.c.
References re_dfa_t::init_state, re_dfa_t::init_state_begbuf, re_dfa_t::init_state_nl, re_dfa_t::init_state_word, and re_compile_fastmap_iter().
Definition at line 3022 of file gkregex.c.
References re_compile_fastmap(), re_compile_internal(), REG_EPAREN, REG_ERPAREN, REG_ESPACE, and REG_NOERROR.
Referenced by gk_strstr_replace(), and match().
weak_alias | ( | __regcomp | , | |
regcomp | ||||
) |
static void free_dfa_content | ( | re_dfa_t * | dfa | ) | [static] |
Definition at line 3143 of file gkregex.c.
References re_state_table_entry::array, re_dfa_t::eclosures, re_dfa_t::edests, free_state(), free_token(), re_dfa_t::inveclosures, re_dfa_t::nexts, re_dfa_t::nodes, re_dfa_t::nodes_len, re_state_table_entry::num, re_dfa_t::re_str, re_dfa_t::sb_char, re_dfa_t::state_hash_mask, re_dfa_t::state_table, and re_dfa_t::subexp_map.
Referenced by re_compile_internal(), and regfree().
void regfree | ( | regex_t * | preg | ) |
Definition at line 3193 of file gkregex.c.
References free_dfa_content().
Referenced by gk_strstr_replace(), and match().
static void internal_function init_word_char | ( | re_dfa_t * | dfa | ) | [static] |
Definition at line 3483 of file gkregex.c.
References re_dfa_t::word_char, and re_dfa_t::word_ops_used.
Referenced by parse_expression().
static reg_errcode_t internal_function duplicate_node_closure | ( | re_dfa_t * | dfa, | |
int | top_org_node, | |||
int | top_clone_node, | |||
int | root_node, | |||
unsigned int | init_constraint | |||
) | [static] |
Definition at line 3987 of file gkregex.c.
References ANCHOR, re_token_t::ctx_type, duplicate_node(), re_dfa_t::edests, re_node_set::elems, re_node_set::nelem, re_dfa_t::nexts, re_dfa_t::nodes, OP_BACK_REF, re_token_t::opr, re_node_set_insert(), REG_ESPACE, REG_NOERROR, search_duplicated_node(), and re_token_t::type.
Referenced by calc_eclosure_iter().
static void internal_function fetch_token | ( | re_token_t * | result, | |
re_string_t * | input, | |||
reg_syntax_t | syntax | |||
) | [static] |
Definition at line 4279 of file gkregex.c.
References peek_token().
Referenced by parse(), parse_dup_op(), parse_expression(), parse_reg_exp(), and parse_sub_exp().
static int internal_function peek_token_bracket | ( | re_token_t * | token, | |
re_string_t * | input, | |||
reg_syntax_t | syntax | |||
) | [static] |
Definition at line 4528 of file gkregex.c.
References re_token_t::c, c, CHARACTER, END_OF_RE, re_string_t::mb_cur_max, OP_CHARSET_RANGE, OP_CLOSE_BRACKET, OP_NON_MATCH_LIST, OP_OPEN_CHAR_CLASS, OP_OPEN_COLL_ELEM, OP_OPEN_EQUIV_CLASS, re_token_t::opr, and re_token_t::type.
static reg_errcode_t internal_function build_range_exp | ( | bitset_t | sbcset, | |
re_charset_t * | mbcset, | |||
int * | range_alloc, | |||
bracket_elem_t * | start_elem, | |||
bracket_elem_t * | end_elem | |||
) | [static] |
static void internal_function match_ctx_clean | ( | re_match_context_t * | mctx | ) | [static] |
Definition at line 10511 of file gkregex.c.
References state_array_t::array, free(), re_sub_match_top_t::lasts, re_match_context_t::nbkref_ents, re_sub_match_top_t::nlasts, re_match_context_t::nsub_tops, re_sub_match_top_t::path, re_sub_match_last_t::path, and re_match_context_t::sub_tops.
Referenced by match_ctx_free(), and re_search_internal().
static void internal_function match_ctx_free | ( | re_match_context_t * | cache | ) | [static] |
Definition at line 10541 of file gkregex.c.
References re_match_context_t::bkref_ents, match_ctx_clean(), and re_match_context_t::sub_tops.
Referenced by re_search_internal().
static reg_errcode_t internal_function match_ctx_add_entry | ( | re_match_context_t * | cache, | |
int | node, | |||
int | str_idx, | |||
int | from, | |||
int | to | |||
) | [static] |
Definition at line 10556 of file gkregex.c.
References re_match_context_t::abkref_ents, re_match_context_t::bkref_ents, re_backref_cache_entry::eps_reachable_subexps_map, re_match_context_t::max_mb_elem_len, re_backref_cache_entry::more, re_match_context_t::nbkref_ents, re_backref_cache_entry::node, REG_ESPACE, REG_NOERROR, re_backref_cache_entry::str_idx, re_backref_cache_entry::subexp_from, and re_backref_cache_entry::subexp_to.
Referenced by get_subexp_sub().
static int internal_function search_cur_bkref_entry | ( | const re_match_context_t * | mctx, | |
int | str_idx | |||
) | [static] |
Definition at line 10605 of file gkregex.c.
References re_match_context_t::bkref_ents, re_match_context_t::nbkref_ents, and re_backref_cache_entry::str_idx.
Referenced by check_dst_limits(), expand_bkref_cache(), get_subexp(), and sift_states_bkref().
static reg_errcode_t internal_function match_ctx_add_subtop | ( | re_match_context_t * | mctx, | |
int | node, | |||
int | str_idx | |||
) | [static] |
Definition at line 10628 of file gkregex.c.
References assert, re_match_context_t::asub_tops, calloc(), re_sub_match_top_t::node, re_match_context_t::nsub_tops, REG_ESPACE, REG_NOERROR, re_sub_match_top_t::str_idx, and re_match_context_t::sub_tops.
Referenced by check_subexp_matching_top().
static re_sub_match_last_t *internal_function match_ctx_add_sublast | ( | re_sub_match_top_t * | subtop, | |
int | node, | |||
int | str_idx | |||
) | [static] |
Definition at line 10658 of file gkregex.c.
References re_sub_match_top_t::alasts, calloc(), re_sub_match_top_t::lasts, re_sub_match_top_t::nlasts, re_sub_match_last_t::node, and re_sub_match_last_t::str_idx.
Referenced by get_subexp().
static void internal_function sift_ctx_init | ( | re_sift_context_t * | sctx, | |
re_dfastate_t ** | sifted_sts, | |||
re_dfastate_t ** | limited_sts, | |||
int | last_node, | |||
int | last_str_idx | |||
) | [static] |
Definition at line 10685 of file gkregex.c.
References re_sift_context_t::last_node, re_sift_context_t::last_str_idx, re_sift_context_t::limited_states, re_sift_context_t::limits, and re_sift_context_t::sifted_states.
Referenced by prune_impossible_nodes().
static reg_errcode_t re_search_internal | ( | const regex_t * | preg, | |
const char * | string, | |||
int | length, | |||
int | start, | |||
int | range, | |||
int | stop, | |||
size_t | nmatch, | |||
regmatch_t | pmatch[], | |||
int | eflags | |||
) | [static] |
static int re_search_2_stub | ( | struct re_pattern_buffer * | bufp, | |
const char * | string1, | |||
int | length1, | |||
const char * | string2, | |||
int | length2, | |||
int | start, | |||
int | range, | |||
struct re_registers * | regs, | |||
int | stop, | |||
int | ret_len | |||
) | [static] |
static int re_search_stub | ( | struct re_pattern_buffer * | bufp, | |
const char * | string, | |||
int | length, | |||
int | start, | |||
int | range, | |||
int | stop, | |||
struct re_registers * | regs, | |||
int | ret_len | |||
) | [static] |
Definition at line 6775 of file gkregex.c.
References assert, re_registers::num_regs, re_compile_fastmap(), re_copy_regs(), re_search_internal(), REG_NOERROR, regmatch_t::rm_eo, and regmatch_t::rm_so.
Referenced by re_match(), and weak_alias().
static unsigned re_copy_regs | ( | struct re_registers * | regs, | |
regmatch_t * | pmatch, | |||
int | nregs, | |||
int | regs_allocated | |||
) | [static] |
Definition at line 6864 of file gkregex.c.
References assert, regmatch_t::rm_eo, and regmatch_t::rm_so.
Referenced by re_search_stub().
static reg_errcode_t prune_impossible_nodes | ( | re_match_context_t * | mctx | ) | [static] |
Definition at line 7303 of file gkregex.c.
References assert, check_halt_state_context(), re_sift_context_t::limits, merge_state_array(), re_dfa_t::nbackref, REG_ESPACE, REG_NOERROR, REG_NOMATCH, sift_ctx_init(), and sift_states_backward().
Referenced by re_search_internal().
static int internal_function check_matching | ( | re_match_context_t * | mctx, | |
int | fl_longest_match, | |||
int * | p_match_first | |||
) | [static] |
Definition at line 7432 of file gkregex.c.
References assert, re_string_t::bufs_len, check_halt_state_context(), check_subexp_matching_top(), re_match_context_t::dfa, extend_buffers(), find_recover_state(), re_dfastate_t::halt, re_dfastate_t::has_backref, re_dfastate_t::has_constraint, re_match_context_t::input, re_string_t::len, match(), merge_state_with_log(), re_dfa_t::nbackref, re_dfastate_t::nodes, REG_ESPACE, REG_NOERROR, re_match_context_t::state_log, transit_state(), transit_state_bkref(), and re_string_t::valid_len.
Referenced by re_search_internal().
static int internal_function check_halt_state_context | ( | const re_match_context_t * | mctx, | |
const re_dfastate_t * | state, | |||
int | idx | |||
) | [static] |
Definition at line 7583 of file gkregex.c.
References assert, check_halt_node_context(), re_match_context_t::dfa, re_match_context_t::eflags, re_node_set::elems, re_dfastate_t::halt, re_match_context_t::input, re_node_set::nelem, re_dfastate_t::nodes, and re_string_context_at().
Referenced by check_matching(), prune_impossible_nodes(), and re_search_internal().
static void internal_function update_regs | ( | const re_dfa_t * | dfa, | |
regmatch_t * | pmatch, | |||
regmatch_t * | prev_idx_match, | |||
int | cur_node, | |||
int | cur_idx, | |||
int | nmatch | |||
) | [static] |
Definition at line 7876 of file gkregex.c.
References re_token_t::idx, re_dfa_t::nodes, OP_CLOSE_SUBEXP, OP_OPEN_SUBEXP, re_token_t::opr, re_token_t::opt_subexp, regmatch_t::rm_eo, regmatch_t::rm_so, re_token_t::type, and type.
static reg_errcode_t internal_function push_fail_stack | ( | struct re_fail_stack_t * | fs, | |
int | str_idx, | |||
int | dest_node, | |||
int | nregs, | |||
regmatch_t * | regs, | |||
re_node_set * | eps_via_nodes | |||
) | [static] |
Definition at line 7705 of file gkregex.c.
References re_fail_stack_t::alloc, re_fail_stack_ent_t::eps_via_nodes, re_fail_stack_ent_t::idx, re_fail_stack_ent_t::node, re_fail_stack_t::num, re_node_set_init_copy(), realloc(), REG_ESPACE, re_fail_stack_ent_t::regs, and re_fail_stack_t::stack.
Referenced by proceed_next_node().
static reg_errcode_t internal_function set_regs | ( | const regex_t * | preg, | |
const re_match_context_t * | mctx, | |||
size_t | nmatch, | |||
regmatch_t * | pmatch, | |||
int | fl_backtrack | |||
) | [static] |
Definition at line 7752 of file gkregex.c.
References re_pattern_buffer::buffer, and re_fail_stack_ent_t::eps_via_nodes.
Referenced by re_search_internal().
static reg_errcode_t internal_function free_fail_stack_return | ( | struct re_fail_stack_t * | fs | ) | [static] |
Definition at line 7859 of file gkregex.c.
References re_fail_stack_ent_t::eps_via_nodes, re_fail_stack_t::num, REG_NOERROR, re_fail_stack_ent_t::regs, and re_fail_stack_t::stack.
static int internal_function sift_states_iter_mb | ( | const re_match_context_t * | mctx, | |
re_sift_context_t * | sctx, | |||
int | node_idx, | |||
int | str_idx, | |||
int | max_str_idx | |||
) | [static] |
Definition at line 8577 of file gkregex.c.
References check_node_accept_bytes(), re_match_context_t::dfa, re_match_context_t::input, re_dfa_t::nexts, and re_sift_context_t::sifted_states.
Referenced by build_sifted_states().
static reg_errcode_t internal_function sift_states_backward | ( | const re_match_context_t * | mctx, | |
re_sift_context_t * | sctx | |||
) | [static] |
Definition at line 7948 of file gkregex.c.
References assert, build_sifted_states(), re_sift_context_t::last_node, re_sift_context_t::last_str_idx, re_match_context_t::max_mb_elem_len, re_node_set_init_1(), REG_NOERROR, re_sift_context_t::sifted_states, re_match_context_t::state_log, and update_cur_sifted_state().
Referenced by prune_impossible_nodes(), and sift_states_bkref().
static reg_errcode_t internal_function build_sifted_states | ( | const re_match_context_t * | mctx, | |
re_sift_context_t * | sctx, | |||
int | str_idx, | |||
re_node_set * | cur_dest | |||
) | [static] |
Definition at line 8006 of file gkregex.c.
References re_token_t::accept_mb, assert, check_dst_limits(), check_node_accept(), re_match_context_t::dfa, re_node_set::elems, re_sift_context_t::last_str_idx, re_sift_context_t::limits, re_node_set::nelem, re_dfa_t::nexts, re_dfa_t::nodes, re_dfastate_t::non_eps_nodes, re_node_set_insert(), REG_ESPACE, REG_NOERROR, sift_states_iter_mb(), re_sift_context_t::sifted_states, re_match_context_t::state_log, re_token_t::type, and type.
Referenced by sift_states_backward().
static reg_errcode_t internal_function update_cur_sifted_state | ( | const re_match_context_t * | mctx, | |
re_sift_context_t * | sctx, | |||
int | str_idx, | |||
re_node_set * | dest_nodes | |||
) | [static] |
Definition at line 8120 of file gkregex.c.
References add_epsilon_src_nodes(), re_match_context_t::bkref_ents, check_subexp_limits(), re_match_context_t::dfa, re_dfastate_t::has_backref, re_sift_context_t::limits, re_node_set::nelem, re_dfastate_t::nodes, re_acquire_state(), REG_NOERROR, sift_states_bkref(), re_sift_context_t::sifted_states, and re_match_context_t::state_log.
Referenced by sift_states_backward().
static reg_errcode_t internal_function add_epsilon_src_nodes | ( | const re_dfa_t * | dfa, | |
re_node_set * | dest_nodes, | |||
const re_node_set * | candidates | |||
) | [static] |
Definition at line 8168 of file gkregex.c.
References re_node_set::alloc, re_node_set::elems, re_dfastate_t::inveclosure, re_dfa_t::inveclosures, re_node_set::nelem, re_acquire_state(), re_node_set_add_intersect(), re_node_set_alloc(), re_node_set_merge(), REG_ESPACE, and REG_NOERROR.
Referenced by update_cur_sifted_state().
static int internal_function check_dst_limits | ( | const re_match_context_t * | mctx, | |
re_node_set * | limits, | |||
int | dst_node, | |||
int | dst_idx, | |||
int | src_node, | |||
int | src_idx | |||
) | [static] |
Definition at line 8242 of file gkregex.c.
References re_match_context_t::bkref_ents, check_dst_limits_calc_pos(), re_match_context_t::dfa, re_node_set::elems, re_token_t::idx, re_node_set::nelem, re_backref_cache_entry::node, re_dfa_t::nodes, re_token_t::opr, and search_cur_bkref_entry().
Referenced by build_sifted_states(), and sift_states_bkref().
static int internal_function check_dst_limits_calc_pos_1 | ( | const re_match_context_t * | mctx, | |
int | boundaries, | |||
int | subexp_idx, | |||
int | from_node, | |||
int | bkref_idx | |||
) | [static] |
Definition at line 8278 of file gkregex.c.
References re_match_context_t::bkref_ents, re_match_context_t::dfa, dst, re_dfa_t::eclosures, re_dfa_t::edests, re_node_set::elems, re_backref_cache_entry::eps_reachable_subexps_map, re_token_t::idx, re_backref_cache_entry::more, re_node_set::nelem, re_backref_cache_entry::node, re_dfa_t::nodes, OP_BACK_REF, OP_CLOSE_SUBEXP, OP_OPEN_SUBEXP, re_token_t::opr, and re_token_t::type.
Referenced by check_dst_limits_calc_pos().
static int internal_function check_dst_limits_calc_pos | ( | const re_match_context_t * | mctx, | |
int | limit, | |||
int | subexp_idx, | |||
int | node, | |||
int | str_idx, | |||
int | bkref_idx | |||
) | [static] |
Definition at line 8359 of file gkregex.c.
References re_match_context_t::bkref_ents, check_dst_limits_calc_pos_1(), re_backref_cache_entry::subexp_from, and re_backref_cache_entry::subexp_to.
Referenced by check_dst_limits().
static reg_errcode_t internal_function check_subexp_limits | ( | const re_dfa_t * | dfa, | |
re_node_set * | dest_nodes, | |||
const re_node_set * | candidates, | |||
re_node_set * | limits, | |||
struct re_backref_cache_entry * | bkref_ents, | |||
int | str_idx | |||
) | [static] |
Definition at line 8389 of file gkregex.c.
References re_dfa_t::eclosures, re_node_set::elems, re_token_t::idx, re_dfa_t::inveclosures, re_node_set::nelem, re_backref_cache_entry::node, re_dfa_t::nodes, OP_CLOSE_SUBEXP, OP_OPEN_SUBEXP, re_token_t::opr, REG_NOERROR, re_backref_cache_entry::str_idx, sub_epsilon_src_nodes(), re_backref_cache_entry::subexp_from, re_backref_cache_entry::subexp_to, re_token_t::type, and type.
Referenced by update_cur_sifted_state().
static reg_errcode_t internal_function sift_states_bkref | ( | const re_match_context_t * | mctx, | |
re_sift_context_t * | sctx, | |||
int | str_idx, | |||
const re_node_set * | candidates | |||
) | [static] |
Definition at line 8477 of file gkregex.c.
References re_match_context_t::bkref_ents, check_dst_limits(), re_match_context_t::dfa, re_dfa_t::edests, re_node_set::elems, re_sift_context_t::last_node, re_sift_context_t::last_str_idx, re_sift_context_t::limited_states, re_sift_context_t::limits, merge_state_array(), re_backref_cache_entry::more, re_node_set::nelem, re_dfa_t::nexts, re_backref_cache_entry::node, re_dfa_t::nodes, OP_BACK_REF, re_node_set_init_copy(), re_node_set_insert(), REG_ESPACE, REG_NOERROR, search_cur_bkref_entry(), sift_states_backward(), re_sift_context_t::sifted_states, re_backref_cache_entry::subexp_from, re_backref_cache_entry::subexp_to, re_token_t::type, and type.
Referenced by update_cur_sifted_state().
static reg_errcode_t internal_function merge_state_array | ( | const re_dfa_t * | dfa, | |
re_dfastate_t ** | dst, | |||
re_dfastate_t ** | src, | |||
int | num | |||
) | [static] |
Definition at line 8093 of file gkregex.c.
References re_acquire_state(), re_node_set_init_union(), and REG_NOERROR.
Referenced by prune_impossible_nodes(), and sift_states_bkref().
re_dfastate_t *internal_function find_recover_state | ( | reg_errcode_t * | err, | |
re_match_context_t * | mctx | |||
) | [static] |
Definition at line 8744 of file gkregex.c.
References re_match_context_t::input, max(), merge_state_with_log(), REG_NOERROR, re_match_context_t::state_log, and re_match_context_t::state_log_top.
Referenced by check_matching().
static re_dfastate_t *internal_function transit_state | ( | reg_errcode_t * | err, | |
re_match_context_t * | mctx, | |||
re_dfastate_t * | state | |||
) | [static] |
Definition at line 8607 of file gkregex.c.
References re_dfastate_t::accept_mb, build_trtable(), re_match_context_t::dfa, re_match_context_t::eflags, re_match_context_t::input, re_string_context_at(), REG_ESPACE, REG_NOERROR, transit_state_mb(), transit_state_sb(), re_dfastate_t::trtable, and re_dfastate_t::word_trtable.
Referenced by check_matching().
re_dfastate_t *internal_function merge_state_with_log | ( | reg_errcode_t * | err, | |
re_match_context_t * | mctx, | |||
re_dfastate_t * | next_state | |||
) | [static] |
Definition at line 8665 of file gkregex.c.
References check_subexp_matching_top(), re_match_context_t::dfa, re_match_context_t::eflags, re_dfastate_t::entrance_nodes, re_dfastate_t::has_backref, re_match_context_t::input, re_dfa_t::nbackref, re_dfastate_t::nodes, re_acquire_state_context(), re_node_set_init_union(), re_string_context_at(), REG_NOERROR, re_match_context_t::state_log, re_match_context_t::state_log_top, and transit_state_bkref().
Referenced by check_matching(), and find_recover_state().
static reg_errcode_t internal_function check_subexp_matching_top | ( | re_match_context_t * | mctx, | |
re_node_set * | cur_nodes, | |||
int | str_idx | |||
) | [static] |
Definition at line 8775 of file gkregex.c.
References re_match_context_t::dfa, re_node_set::elems, re_token_t::idx, match_ctx_add_subtop(), re_node_set::nelem, re_dfa_t::nodes, OP_OPEN_SUBEXP, re_token_t::opr, REG_NOERROR, re_token_t::type, and re_dfa_t::used_bkref_map.
Referenced by check_matching(), merge_state_with_log(), and transit_state_bkref().
static re_dfastate_t * transit_state_sb | ( | reg_errcode_t * | err, | |
re_match_context_t * | mctx, | |||
re_dfastate_t * | pstate | |||
) | [static] |
Definition at line 8808 of file gkregex.c.
References check_node_accept(), re_match_context_t::dfa, re_dfa_t::eclosures, re_match_context_t::eflags, re_node_set::elems, re_match_context_t::input, re_node_set::nelem, re_dfa_t::nexts, re_dfa_t::nodes, re_dfastate_t::nodes, re_acquire_state_context(), re_node_set_alloc(), re_node_set_merge(), re_string_context_at(), and REG_NOERROR.
Referenced by transit_state().
static reg_errcode_t internal_function transit_state_mb | ( | re_match_context_t * | mctx, | |
re_dfastate_t * | pstate | |||
) | [static] |
Definition at line 8848 of file gkregex.c.
References re_token_t::accept_mb, assert, check_node_accept_bytes(), clean_state_log_if_needed(), re_token_t::constraint, re_match_context_t::dfa, re_dfa_t::eclosures, re_match_context_t::eflags, re_node_set::elems, re_dfastate_t::entrance_nodes, re_match_context_t::input, re_match_context_t::max_mb_elem_len, re_node_set::nelem, re_dfa_t::nexts, re_dfa_t::nodes, re_dfastate_t::nodes, re_acquire_state_context(), re_node_set_init_union(), re_string_context_at(), REG_NOERROR, and re_match_context_t::state_log.
Referenced by transit_state().
static reg_errcode_t internal_function transit_state_bkref | ( | re_match_context_t * | mctx, | |
const re_node_set * | nodes | |||
) | [static] |
Definition at line 8918 of file gkregex.c.
References assert, re_match_context_t::bkref_ents, check_subexp_matching_top(), re_token_t::constraint, re_match_context_t::dfa, re_dfa_t::eclosures, re_dfa_t::edests, re_match_context_t::eflags, re_node_set::elems, re_dfastate_t::entrance_nodes, get_subexp(), re_match_context_t::input, re_match_context_t::nbkref_ents, re_node_set::nelem, re_dfa_t::nexts, re_backref_cache_entry::node, re_dfastate_t::nodes, re_dfa_t::nodes, OP_BACK_REF, re_acquire_state_context(), re_node_set_init_union(), re_string_context_at(), REG_NOERROR, re_match_context_t::state_log, re_backref_cache_entry::str_idx, re_backref_cache_entry::subexp_from, re_backref_cache_entry::subexp_to, and re_token_t::type.
Referenced by check_matching(), and merge_state_with_log().
static reg_errcode_t internal_function get_subexp | ( | re_match_context_t * | mctx, | |
int | bkref_node, | |||
int | bkref_str_idx | |||
) | [static] |
Definition at line 9032 of file gkregex.c.
References re_match_context_t::bkref_ents, buf, calloc(), check_arrival(), clean_state_log_if_needed(), re_match_context_t::dfa, extend_buffers(), find_subexp_node(), get_subexp_sub(), re_token_t::idx, re_match_context_t::input, re_sub_match_top_t::lasts, re_string_t::len, match_ctx_add_sublast(), re_backref_cache_entry::more, re_sub_match_top_t::nlasts, re_sub_match_top_t::node, re_backref_cache_entry::node, re_dfastate_t::nodes, re_dfa_t::nodes, re_match_context_t::nsub_tops, OP_CLOSE_SUBEXP, re_token_t::opr, re_sub_match_top_t::path, REG_ESPACE, REG_NOERROR, REG_NOMATCH, search_cur_bkref_entry(), re_match_context_t::state_log, re_sub_match_last_t::str_idx, re_sub_match_top_t::str_idx, re_match_context_t::sub_tops, and re_string_t::valid_len.
Referenced by transit_state_bkref().
static reg_errcode_t internal_function get_subexp_sub | ( | re_match_context_t * | mctx, | |
const re_sub_match_top_t * | sub_top, | |||
re_sub_match_last_t * | sub_last, | |||
int | bkref_node, | |||
int | bkref_str | |||
) | [static] |
Definition at line 9181 of file gkregex.c.
References check_arrival(), clean_state_log_if_needed(), match_ctx_add_entry(), re_sub_match_last_t::node, OP_OPEN_SUBEXP, re_sub_match_last_t::path, REG_NOERROR, re_sub_match_top_t::str_idx, and re_sub_match_last_t::str_idx.
Referenced by get_subexp().
static int internal_function find_subexp_node | ( | const re_dfa_t * | dfa, | |
const re_node_set * | nodes, | |||
int | subexp_idx, | |||
int | type | |||
) | [static] |
Definition at line 9210 of file gkregex.c.
References re_node_set::elems, re_token_t::idx, re_node_set::nelem, re_dfa_t::nodes, re_token_t::opr, and re_token_t::type.
Referenced by check_arrival_expand_ecl(), and get_subexp().
static reg_errcode_t internal_function check_arrival | ( | re_match_context_t * | mctx, | |
state_array_t * | path, | |||
int | top_node, | |||
int | top_str, | |||
int | last_node, | |||
int | last_str, | |||
int | type | |||
) | [static] |
Definition at line 9232 of file gkregex.c.
References state_array_t::alloc, state_array_t::array, check_arrival_add_next_nodes(), check_arrival_expand_ecl(), re_string_t::cur_idx, re_match_context_t::dfa, re_match_context_t::eflags, expand_bkref_cache(), re_dfastate_t::has_backref, re_token_t::idx, re_match_context_t::input, re_match_context_t::max_mb_elem_len, re_node_set::nelem, state_array_t::next_idx, re_dfastate_t::nodes, re_dfa_t::nodes, re_dfastate_t::non_eps_nodes, re_token_t::opr, re_acquire_state_context(), re_node_set_init_1(), re_node_set_init_copy(), re_node_set_merge(), re_string_context_at(), REG_ESPACE, REG_NOERROR, REG_NOMATCH, re_match_context_t::state_log, and re_backref_cache_entry::str_idx.
Referenced by get_subexp(), and get_subexp_sub().
static reg_errcode_t internal_function check_arrival_add_next_nodes | ( | re_match_context_t * | mctx, | |
int | str_idx, | |||
re_node_set * | cur_nodes, | |||
re_node_set * | next_nodes | |||
) | [static] |
Definition at line 9393 of file gkregex.c.
References re_token_t::accept_mb, assert, check_node_accept(), check_node_accept_bytes(), re_match_context_t::dfa, re_node_set::elems, re_match_context_t::input, re_node_set::nelem, re_dfa_t::nexts, re_dfastate_t::nodes, re_dfa_t::nodes, re_acquire_state(), re_node_set_insert(), re_node_set_merge(), REG_ESPACE, REG_NOERROR, re_match_context_t::state_log, re_token_t::type, and type.
Referenced by check_arrival().
static reg_errcode_t internal_function check_arrival_expand_ecl | ( | const re_dfa_t * | dfa, | |
re_node_set * | cur_nodes, | |||
int | ex_subexp, | |||
int | type | |||
) | [static] |
Definition at line 9472 of file gkregex.c.
References assert, check_arrival_expand_ecl_sub(), re_dfa_t::eclosures, re_node_set::elems, find_subexp_node(), re_node_set::nelem, re_node_set_alloc(), re_node_set_merge(), and REG_NOERROR.
Referenced by check_arrival(), and expand_bkref_cache().
static reg_errcode_t internal_function check_arrival_expand_ecl_sub | ( | const re_dfa_t * | dfa, | |
re_node_set * | dst_nodes, | |||
int | target, | |||
int | ex_subexp, | |||
int | type | |||
) | [static] |
Definition at line 9525 of file gkregex.c.
References re_dfa_t::edests, re_node_set::elems, re_token_t::idx, re_node_set::nelem, re_dfa_t::nodes, OP_CLOSE_SUBEXP, re_token_t::opr, re_node_set_insert(), REG_ESPACE, REG_NOERROR, and re_token_t::type.
Referenced by check_arrival_expand_ecl().
static reg_errcode_t internal_function expand_bkref_cache | ( | re_match_context_t * | mctx, | |
re_node_set * | cur_nodes, | |||
int | cur_str, | |||
int | subexp_num, | |||
int | type | |||
) | [static] |
Definition at line 9569 of file gkregex.c.
References re_match_context_t::bkref_ents, check_arrival_expand_ecl(), re_match_context_t::dfa, re_dfa_t::edests, re_node_set::elems, re_backref_cache_entry::more, re_dfa_t::nexts, re_backref_cache_entry::node, re_dfastate_t::nodes, re_acquire_state(), re_node_set_init_1(), re_node_set_init_copy(), re_node_set_insert(), re_node_set_merge(), REG_ESPACE, REG_NOERROR, search_cur_bkref_entry(), re_match_context_t::state_log, re_backref_cache_entry::subexp_from, and re_backref_cache_entry::subexp_to.
Referenced by check_arrival().
static int internal_function build_trtable | ( | const re_dfa_t * | dfa, | |
re_dfastate_t * | state | |||
) | [static] |
Definition at line 9658 of file gkregex.c.
References bitset_merge(), calloc(), re_dfa_t::eclosures, re_node_set::elems, free(), group_nodes_into_DFAstates(), malloc(), re_dfa_t::mb_cur_max, re_node_set::nelem, re_dfa_t::nexts, re_acquire_state_context(), re_node_set_alloc(), re_node_set_merge(), REG_NOERROR, re_dfastate_t::trtable, re_dfa_t::word_char, and re_dfastate_t::word_trtable.
Referenced by transit_state().
static int internal_function check_node_accept_bytes | ( | const re_dfa_t * | dfa, | |
int | node_idx, | |||
const re_string_t * | input, | |||
int | idx | |||
) | [static] |
Definition at line 10075 of file gkregex.c.
References re_charset_t::char_classes, re_charset_t::coll_syms, COMPLEX_BRACKET, PUP::d, re_charset_t::equiv_classes, find_collation_sequence_value(), int32_t, re_string_t::len, re_charset_t::mbchars, re_token_t::mbcset, re_charset_t::nchar_classes, re_charset_t::ncoll_syms, re_charset_t::nequiv_classes, re_charset_t::nmbchars, re_dfa_t::nodes, re_charset_t::non_match, re_charset_t::nranges, OP_PERIOD, OP_UTF8_PERIOD, re_token_t::opr, re_charset_t::range_ends, re_charset_t::range_starts, re_dfa_t::syntax, and re_token_t::type.
Referenced by check_arrival_add_next_nodes(), proceed_next_node(), sift_states_iter_mb(), and transit_state_mb().
static unsigned int internal_function find_collation_sequence_value | ( | const unsigned char * | mbs, | |
size_t | name_len | |||
) | [static] |
Definition at line 10311 of file gkregex.c.
References int32_t.
Referenced by check_node_accept_bytes().
static int internal_function group_nodes_into_DFAstates | ( | const re_dfa_t * | dfa, | |
const re_dfastate_t * | state, | |||
re_node_set * | states_node, | |||
bitset_t * | states_ch | |||
) | [static] |
Definition at line 9885 of file gkregex.c.
References bitset_merge(), re_token_t::c, CHARACTER, re_token_t::constraint, re_node_set::elems, re_dfa_t::mb_cur_max, re_node_set::nelem, re_dfa_t::nodes, re_dfastate_t::nodes, OP_PERIOD, OP_UTF8_PERIOD, re_token_t::opr, re_node_set_init_1(), re_node_set_init_copy(), re_node_set_insert(), REG_NOERROR, re_dfa_t::sb_char, re_token_t::sbcset, SIMPLE_BRACKET, re_dfa_t::syntax, re_token_t::type, type, re_dfa_t::word_char, and re_token_t::word_char.
Referenced by build_trtable().
static int internal_function check_node_accept | ( | const re_match_context_t * | mctx, | |
const re_token_t * | node, | |||
int | idx | |||
) | [static] |
Definition at line 10374 of file gkregex.c.
References re_token_t::c, CHARACTER, re_token_t::constraint, re_match_context_t::dfa, re_match_context_t::eflags, re_match_context_t::input, OP_PERIOD, OP_UTF8_PERIOD, re_token_t::opr, re_string_context_at(), re_token_t::sbcset, SIMPLE_BRACKET, re_dfa_t::syntax, and re_token_t::type.
Referenced by build_sifted_states(), check_arrival_add_next_nodes(), proceed_next_node(), and transit_state_sb().
static reg_errcode_t internal_function extend_buffers | ( | re_match_context_t * | mctx | ) | [static] |
Definition at line 10424 of file gkregex.c.
References re_string_t::bufs_len, build_upper_buffer(), build_wcs_buffer(), build_wcs_upper_buffer(), re_string_t::icase, re_match_context_t::input, re_string_t::mb_cur_max, re_string_realloc_buffers(), re_string_translate_buffer(), REG_ESPACE, REG_NOERROR, re_match_context_t::state_log, and re_string_t::trans.
Referenced by check_matching(), clean_state_log_if_needed(), and get_subexp().
int regexec | ( | regex_t *__restrict | preg, | |
const char *__restrict | string, | |||
size_t | nmatch, | |||
pmatch | , | |||
int | eflags | |||
) | const |
Definition at line 6585 of file gkregex.c.
References length, re_search_internal(), REG_BADPAT, REG_NOERROR, regmatch_t::rm_eo, and regmatch_t::rm_so.
Referenced by __typeof__(), gk_strstr_replace(), match(), and weak_alias().
versioned_symbol | ( | libc | , | |
__regexec | , | |||
regexec | , | |||
GLIBC_2_3_4 | ||||
) |
__typeof__ | ( | __regexec | ) |
compat_symbol | ( | libc | , | |
__compat_regexec | , | |||
regexec | , | |||
GLIBC_2_0 | ||||
) |
int re_match | ( | struct re_pattern_buffer * | bufp, | |
const char * | string, | |||
int | length, | |||
int | start, | |||
struct re_registers * | regs | |||
) |
Definition at line 6671 of file gkregex.c.
References re_search_stub().
weak_alias | ( | __re_match | , | |
re_match | ||||
) |
Definition at line 6680 of file gkregex.c.
References re_search_stub().
weak_alias | ( | __re_search | , | |
re_search | ||||
) |
Definition at line 6693 of file gkregex.c.
References re_search_2_stub().
weak_alias | ( | __re_match_2 | , | |
re_match_2 | ||||
) |
Definition at line 6707 of file gkregex.c.
References re_search_2_stub().
weak_alias | ( | __re_search_2 | , | |
re_search_2 | ||||
) |
Definition at line 6721 of file gkregex.c.
References re_search_stub().
void re_set_registers | ( | struct re_pattern_buffer * | bufp, | |
struct re_registers * | regs, | |||
unsigned | num_regs, | |||
regoff_t * | starts, | |||
regoff_t * | ends | |||
) |
Definition at line 6933 of file gkregex.c.
References re_registers::end, re_registers::num_regs, and re_registers::start.
weak_alias | ( | __re_set_registers | , | |
re_set_registers | ||||
) |
static reg_errcode_t re_search_internal | ( | regex_t * | preg, | |
const char * | string, | |||
int | length, | |||
int | start, | |||
int | range, | |||
int | stop, | |||
size_t | nmatch, | |||
pmatch | , | |||
int | eflags | |||
) | const [static] |
Definition at line 6984 of file gkregex.c.
References assert, re_string_t::bufs_len, check_halt_state_context(), check_matching(), re_match_context_t::dfa, re_dfa_t::has_mb_node, re_dfa_t::has_plural_match, re_dfa_t::init_state, re_dfa_t::init_state_begbuf, re_dfa_t::init_state_nl, re_dfa_t::init_state_word, re_match_context_t::input, re_match_context_t::last_node, match_ctx_clean(), match_ctx_free(), match_ctx_init(), re_match_context_t::match_last, re_match_context_t::max_mb_elem_len, re_dfa_t::mb_cur_max, re_dfa_t::nbackref, re_match_context_t::nbkref_ents, re_node_set::nelem, re_string_t::newline_anchor, re_dfastate_t::nodes, re_dfa_t::nodes_len, offset, re_string_t::offsets, re_string_t::offsets_needed, prune_impossible_nodes(), re_string_t::raw_mbs_idx, re_string_t::raw_stop, re_string_allocate(), re_string_destruct(), re_string_reconstruct(), REG_ESPACE, REG_NOERROR, REG_NOMATCH, regmatch_t::rm_eo, regmatch_t::rm_so, set_regs(), re_match_context_t::state_log, re_match_context_t::state_log_top, re_string_t::stop, re_dfa_t::subexp_map, PUP::t, re_string_t::tip_context, re_string_t::valid_len, and re_string_t::valid_raw_len.
static re_dfastate_t* __attribute | ( | (always_inline) | ) | [inline, static] |
Definition at line 7389 of file gkregex.c.
References re_dfastate_t::entrance_nodes, re_dfastate_t::has_constraint, re_dfa_t::init_state, re_dfa_t::init_state_begbuf, re_dfa_t::init_state_nl, re_dfa_t::init_state_word, re_acquire_state_context(), and re_string_context_at().
static int internal_function check_halt_node_context | ( | const re_dfa_t * | dfa, | |
int | node, | |||
unsigned int | context | |||
) | [static] |
Definition at line 7564 of file gkregex.c.
References re_token_t::constraint, END_OF_RE, re_dfa_t::nodes, re_token_t::type, and type.
Referenced by check_halt_state_context().
static int internal_function proceed_next_node | ( | const re_match_context_t * | mctx, | |
int | nregs, | |||
regmatch_t * | regs, | |||
int * | pidx, | |||
int | node, | |||
re_node_set * | eps_via_nodes, | |||
struct re_fail_stack_t * | fs | |||
) | [static] |
Definition at line 7605 of file gkregex.c.
References re_token_t::accept_mb, buf, check_node_accept(), check_node_accept_bytes(), re_match_context_t::dfa, re_dfa_t::edests, re_node_set::elems, re_token_t::idx, re_match_context_t::input, re_match_context_t::match_last, re_node_set::nelem, re_dfa_t::nexts, re_dfastate_t::nodes, re_dfa_t::nodes, OP_BACK_REF, re_token_t::opr, push_fail_stack(), re_node_set_insert(), regmatch_t::rm_eo, regmatch_t::rm_so, re_match_context_t::state_log, type, and re_token_t::type.
static int internal_function pop_fail_stack | ( | struct re_fail_stack_t * | fs, | |
int * | pidx, | |||
int | nregs, | |||
regmatch_t * | regs, | |||
re_node_set * | eps_via_nodes | |||
) | [static] |
Definition at line 7732 of file gkregex.c.
References assert, re_fail_stack_ent_t::eps_via_nodes, re_fail_stack_ent_t::idx, re_fail_stack_ent_t::node, re_fail_stack_t::num, re_fail_stack_ent_t::regs, and re_fail_stack_t::stack.
static reg_errcode_t internal_function clean_state_log_if_needed | ( | re_match_context_t * | mctx, | |
int | next_state_log_idx | |||
) | [static] |
Definition at line 8068 of file gkregex.c.
References re_string_t::bufs_len, extend_buffers(), re_match_context_t::input, re_string_t::len, REG_NOERROR, re_match_context_t::state_log, re_match_context_t::state_log_top, and re_string_t::valid_len.
Referenced by get_subexp(), get_subexp_sub(), and transit_state_mb().
static reg_errcode_t internal_function sub_epsilon_src_nodes | ( | const re_dfa_t * | dfa, | |
int | node, | |||
re_node_set * | dest_nodes, | |||
const re_node_set * | candidates | |||
) | [static] |
Definition at line 8193 of file gkregex.c.
References re_dfa_t::edests, re_node_set::elems, re_dfa_t::inveclosures, re_node_set::nelem, re_dfa_t::nodes, re_node_set_add_intersect(), re_node_set_remove_at(), REG_NOERROR, and re_token_t::type.
Referenced by check_subexp_limits().
static reg_errcode_t internal_function match_ctx_init | ( | re_match_context_t * | mctx, | |
int | eflags, | |||
int | n | |||
) | [static] |
Definition at line 10483 of file gkregex.c.
References re_match_context_t::abkref_ents, re_match_context_t::asub_tops, re_match_context_t::bkref_ents, re_match_context_t::eflags, re_match_context_t::match_last, re_match_context_t::max_mb_elem_len, REG_ESPACE, REG_NOERROR, and re_match_context_t::sub_tops.
Referenced by re_search_internal().
const size_t __re_error_msgid_idx [] attribute_hidden |
reg_errcode_t internal_function bracket_elem_t* start_elem |