#include "regparse.h"
#include "ruby/st.h"
Go to the source code of this file.
Data Structures | |
struct | st_str_end_key |
struct | NameEntry |
struct | INamesArg |
struct | _FreeNode |
struct | OnigToken |
struct | type_cclass_key |
struct | IApplyCaseFoldArg |
Defines | |
#define | WARN_BUFSIZE 256 |
#define | CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS |
#define | BACKREF_REL_TO_ABS(rel_no, env) ((env)->num_mem + 1 + (rel_no)) |
#define | ONOFF(v, f, negative) (negative) ? ((v) &= ~(f)) : ((v) |= (f)) |
#define | MBCODE_START_POS(enc) (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80) |
#define | SET_ALL_MULTI_BYTE_RANGE(enc, pbuf) add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ~((OnigCodePoint )0)) |
#define | ADD_ALL_MULTI_BYTE_RANGE(enc, mbuf) |
#define | BITSET_SET_BIT_CHKDUP(bs, pos) |
#define | BITSET_IS_EMPTY(bs, empty) |
#define | PEND_VALUE 0 |
#define | PFETCH_READY UChar* pfetch_prev |
#define | PEND (p < end ? 0 : 1) |
#define | PUNFETCH p = pfetch_prev |
#define | PINC |
#define | PFETCH(c) |
#define | PPEEK (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE) |
#define | PPEEK_IS(c) (PPEEK == (OnigCodePoint )c) |
#define | INIT_NAME_BACKREFS_ALLOC_NUM 8 |
#define | NAMEBUF_SIZE 24 |
#define | NAMEBUF_SIZE_1 25 |
#define | INIT_SCANENV_MEMNODES_ALLOC_SIZE 16 |
#define | BBUF_WRITE_CODE_POINT(bbuf, pos, code) BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT) |
#define | INIT_MULTI_BYTE_RANGE_SIZE (SIZE_CODE_POINT * 5) |
#define | SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2) |
#define | is_invalid_quantifier_target(node) 0 |
#define | POSIX_BRACKET_CHECK_LIMIT_LENGTH 20 |
#define | POSIX_BRACKET_NAME_MIN_LEN 4 |
#define | NEWLINE_CODE 0x0a |
#define | THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS 8 |
Typedefs | |
typedef st_table | NameTable |
typedef st_data_t | HashDataType |
typedef struct _FreeNode | FreeNode |
Enumerations | |
enum | ReduceType { RQ_ASIS = 0, RQ_DEL = 1, RQ_A, RQ_AQ, RQ_QQ, RQ_P_QQ, RQ_PQ_Q } |
enum | TokenSyms { TK_EOT = 0, TK_RAW_BYTE = 1, TK_CHAR, TK_STRING, TK_CODE_POINT, TK_ANYCHAR, TK_CHAR_TYPE, TK_BACKREF, TK_CALL, TK_ANCHOR, TK_OP_REPEAT, TK_INTERVAL, TK_ANYCHAR_ANYTIME, TK_ALT, TK_SUBEXP_OPEN, TK_SUBEXP_CLOSE, TK_CC_OPEN, TK_QUOTE_OPEN, TK_CHAR_PROPERTY, TK_CC_CLOSE, TK_CC_RANGE, TK_POSIX_BRACKET_OPEN, TK_CC_AND, TK_CC_CC_OPEN } |
enum | CCSTATE { CCS_VALUE, CCS_RANGE, CCS_COMPLETE, CCS_START } |
enum | CCVALTYPE { CCV_SB, CCV_CODE_POINT, CCV_CLASS } |
Functions | |
void | onig_null_warn (const char *s ARG_UNUSED) |
void | onig_set_warn_func (OnigWarnFunc f) |
void | onig_set_verb_warn_func (OnigWarnFunc f) |
static void | CC_DUP_WARN (ScanEnv *env) |
static void | bbuf_free (BBuf *bbuf) |
static int | bbuf_clone (BBuf **rto, BBuf *from) |
static void | bitset_set_range (ScanEnv *env, BitSetRef bs, int from, int to) |
static void | bitset_invert (BitSetRef bs) |
static void | bitset_invert_to (BitSetRef from, BitSetRef to) |
static void | bitset_and (BitSetRef dest, BitSetRef bs) |
static void | bitset_or (BitSetRef dest, BitSetRef bs) |
static void | bitset_copy (BitSetRef dest, BitSetRef bs) |
int | onig_strncmp (const UChar *s1, const UChar *s2, int n) |
void | onig_strcpy (UChar *dest, const UChar *src, const UChar *end) |
static UChar * | strdup_with_null (OnigEncoding enc, UChar *s, UChar *end) |
static UChar * | strcat_capa (UChar *dest, UChar *dest_end, const UChar *src, const UChar *src_end, int capa) |
static UChar * | strcat_capa_from_static (UChar *dest, UChar *dest_end, const UChar *src, const UChar *src_end, int capa) |
static int | str_end_cmp (st_data_t xp, st_data_t yp) |
static st_index_t | str_end_hash (st_data_t xp) |
hash_table_type * | onig_st_init_strend_table_with_size (st_index_t size) |
int | onig_st_lookup_strend (hash_table_type *table, const UChar *str_key, const UChar *end_key, hash_data_type *value) |
int | onig_st_insert_strend (hash_table_type *table, const UChar *str_key, const UChar *end_key, hash_data_type value) |
static int | i_free_name_entry (UChar *key, NameEntry *e, void *arg ARG_UNUSED) |
static int | names_clear (regex_t *reg) |
int | onig_names_free (regex_t *reg) |
static NameEntry * | name_find (regex_t *reg, const UChar *name, const UChar *name_end) |
static int | i_names (UChar *key ARG_UNUSED, NameEntry *e, INamesArg *arg) |
int | onig_foreach_name (regex_t *reg, int(*func)(const UChar *, const UChar *, int, int *, regex_t *, void *), void *arg) |
static int | i_renumber_name (UChar *key ARG_UNUSED, NameEntry *e, GroupNumRemap *map) |
int | onig_renumber_name_table (regex_t *reg, GroupNumRemap *map) |
int | onig_number_of_names (regex_t *reg) |
static int | name_add (regex_t *reg, UChar *name, UChar *name_end, int backref, ScanEnv *env) |
int | onig_name_to_group_numbers (regex_t *reg, const UChar *name, const UChar *name_end, int **nums) |
int | onig_name_to_backref_number (regex_t *reg, const UChar *name, const UChar *name_end, OnigRegion *region) |
int | onig_noname_group_capture_is_active (regex_t *reg) |
static void | scan_env_clear (ScanEnv *env) |
static int | scan_env_add_mem_entry (ScanEnv *env) |
static int | scan_env_set_mem_node (ScanEnv *env, int num, Node *node) |
void | onig_node_free (Node *node) |
int | onig_free_node_list (void) |
static Node * | node_new (void) |
static void | initialize_cclass (CClassNode *cc) |
static Node * | node_new_cclass (void) |
static Node * | node_new_cclass_by_codepoint_range (int not, OnigCodePoint sb_out, const OnigCodePoint ranges[]) |
static Node * | node_new_ctype (int type, int not) |
static Node * | node_new_anychar (void) |
static Node * | node_new_list (Node *left, Node *right) |
Node * | onig_node_new_list (Node *left, Node *right) |
Node * | onig_node_list_add (Node *list, Node *x) |
Node * | onig_node_new_alt (Node *left, Node *right) |
Node * | onig_node_new_anchor (int type) |
static Node * | node_new_backref (int back_num, int *backrefs, int by_name, int exist_level, int nest_level, ScanEnv *env) |
static Node * | node_new_call (UChar *name, UChar *name_end, int gnum) |
static Node * | node_new_quantifier (int lower, int upper, int by_number) |
static Node * | node_new_enclose (int type) |
Node * | onig_node_new_enclose (int type) |
static Node * | node_new_enclose_memory (OnigOptionType option, int is_named) |
static Node * | node_new_option (OnigOptionType option) |
int | onig_node_str_cat (Node *node, const UChar *s, const UChar *end) |
int | onig_node_str_set (Node *node, const UChar *s, const UChar *end) |
static int | node_str_cat_char (Node *node, UChar c) |
void | onig_node_conv_to_str_node (Node *node, int flag) |
void | onig_node_str_clear (Node *node) |
static Node * | node_new_str (const UChar *s, const UChar *end) |
Node * | onig_node_new_str (const UChar *s, const UChar *end) |
static Node * | node_new_str_raw (UChar *s, UChar *end) |
static Node * | node_new_empty (void) |
static Node * | node_new_str_raw_char (UChar c) |
static Node * | str_node_split_last_char (StrNode *sn, OnigEncoding enc) |
static int | str_node_can_be_split (StrNode *sn, OnigEncoding enc) |
int | onig_scan_unsigned_number (UChar **src, const UChar *end, OnigEncoding enc) |
static int | scan_unsigned_hexadecimal_number (UChar **src, UChar *end, int maxlen, OnigEncoding enc) |
static int | scan_unsigned_octal_number (UChar **src, UChar *end, int maxlen, OnigEncoding enc) |
static int | new_code_range (BBuf **pbuf) |
static int | add_code_range_to_buf0 (BBuf **pbuf, ScanEnv *env, OnigCodePoint from, OnigCodePoint to, int checkdup) |
static int | add_code_range_to_buf (BBuf **pbuf, ScanEnv *env, OnigCodePoint from, OnigCodePoint to) |
static int | add_code_range0 (BBuf **pbuf, ScanEnv *env, OnigCodePoint from, OnigCodePoint to, int checkdup) |
static int | add_code_range (BBuf **pbuf, ScanEnv *env, OnigCodePoint from, OnigCodePoint to) |
static int | not_code_range_buf (OnigEncoding enc, BBuf *bbuf, BBuf **pbuf, ScanEnv *env) |
static int | or_code_range_buf (OnigEncoding enc, BBuf *bbuf1, int not1, BBuf *bbuf2, int not2, BBuf **pbuf, ScanEnv *env) |
static int | and_code_range1 (BBuf **pbuf, ScanEnv *env, OnigCodePoint from1, OnigCodePoint to1, OnigCodePoint *data, int n) |
static int | and_code_range_buf (BBuf *bbuf1, int not1, BBuf *bbuf2, int not2, BBuf **pbuf, ScanEnv *env) |
static int | and_cclass (CClassNode *dest, CClassNode *cc, ScanEnv *env) |
static int | or_cclass (CClassNode *dest, CClassNode *cc, ScanEnv *env) |
static void | UNKNOWN_ESC_WARN (ScanEnv *env, int c) |
static int | conv_backslash_value (int c, ScanEnv *env) |
static int | popular_quantifier_num (QtfrNode *q) |
void | onig_reduce_nested_quantifier (Node *pnode, Node *cnode) |
static int | fetch_range_quantifier (UChar **src, UChar *end, OnigToken *tok, ScanEnv *env) |
static int | fetch_escaped_value (UChar **src, UChar *end, ScanEnv *env) |
static int | fetch_token (OnigToken *tok, UChar **src, UChar *end, ScanEnv *env) |
static OnigCodePoint | get_name_end_code_point (OnigCodePoint start) |
static int | fetch_name_with_level (OnigCodePoint start_code, UChar **src, UChar *end, UChar **rname_end, ScanEnv *env, int *rback_num, int *rlevel) |
static int | fetch_name (OnigCodePoint start_code, UChar **src, UChar *end, UChar **rname_end, ScanEnv *env, int *rback_num, int ref) |
void | onig_vsnprintf_with_pattern (UChar buf[], int bufsize, OnigEncoding enc, UChar *pat, UChar *pat_end, const UChar *fmt, va_list args) |
static void | onig_syntax_warn (ScanEnv *env, const char *fmt,...) |
static void | CC_ESC_WARN (ScanEnv *env, UChar *c) |
static void | CLOSE_BRACKET_WITHOUT_ESC_WARN (ScanEnv *env, UChar *c) |
static UChar * | find_str_position (OnigCodePoint s[], int n, UChar *from, UChar *to, UChar **next, OnigEncoding enc) |
static int | str_exist_check_with_esc (OnigCodePoint s[], int n, UChar *from, UChar *to, OnigCodePoint bad, OnigEncoding enc, const OnigSyntaxType *syn) |
static int | fetch_token_in_cc (OnigToken *tok, UChar **src, UChar *end, ScanEnv *env) |
static int | add_ctype_to_cc_by_range (CClassNode *cc, int ctype ARG_UNUSED, int not, ScanEnv *env, OnigCodePoint sb_out, const OnigCodePoint mbr[]) |
static int | add_ctype_to_cc (CClassNode *cc, int ctype, int not, ScanEnv *env) |
static int | parse_posix_bracket (CClassNode *cc, UChar **src, UChar *end, ScanEnv *env) |
static int | fetch_char_property_to_ctype (UChar **src, UChar *end, ScanEnv *env) |
static int | parse_char_property (Node **np, OnigToken *tok, UChar **src, UChar *end, ScanEnv *env) |
static int | next_state_class (CClassNode *cc, OnigCodePoint *vs, enum CCVALTYPE *type, enum CCSTATE *state, ScanEnv *env) |
static int | next_state_val (CClassNode *cc, OnigCodePoint *vs, OnigCodePoint v, int *vs_israw, int v_israw, enum CCVALTYPE intype, enum CCVALTYPE *type, enum CCSTATE *state, ScanEnv *env) |
static int | code_exist_check (OnigCodePoint c, UChar *from, UChar *end, int ignore_escaped, ScanEnv *env) |
static int | parse_char_class (Node **np, OnigToken *tok, UChar **src, UChar *end, ScanEnv *env) |
static int | parse_subexp (Node **top, OnigToken *tok, int term, UChar **src, UChar *end, ScanEnv *env) |
static int | parse_enclose (Node **np, OnigToken *tok, int term, UChar **src, UChar *end, ScanEnv *env) |
static int | set_quantifier (Node *qnode, Node *target, int group, ScanEnv *env) |
static int | type_cclass_cmp (type_cclass_key *x, type_cclass_key *y) |
static st_index_t | type_cclass_hash (type_cclass_key *key) |
static int | i_free_shared_class (type_cclass_key *key, Node *node, void *arg ARG_UNUSED) |
int | onig_free_shared_cclass_table (void) |
static int | i_apply_case_fold (OnigCodePoint from, OnigCodePoint to[], int to_len, void *arg) |
static int | parse_exp (Node **np, OnigToken *tok, int term, UChar **src, UChar *end, ScanEnv *env) |
static int | parse_branch (Node **top, OnigToken *tok, int term, UChar **src, UChar *end, ScanEnv *env) |
static int | parse_regexp (Node **top, UChar **src, UChar *end, ScanEnv *env) |
int | onig_parse_make_tree (Node **root, const UChar *pattern, const UChar *end, regex_t *reg, ScanEnv *env) |
void | onig_scan_env_set_error_string (ScanEnv *env, int ecode ARG_UNUSED, UChar *arg, UChar *arg_end) |
Variables | |
const OnigSyntaxType | OnigSyntaxRuby |
const OnigSyntaxType * | OnigDefaultSyntax = ONIG_SYNTAX_RUBY |
static OnigWarnFunc | onig_warn = onig_null_warn |
static OnigWarnFunc | onig_verb_warn = onig_null_warn |
static FreeNode * | FreeNodeList = (FreeNode* )NULL |
static enum ReduceType const | ReduceTypeTable [6][6] |
static const char *const | PopularQStr [] |
static const char *const | ReduceQStr [] |
static struct st_hash_type | type_type_cclass_hash |
static st_table * | OnigTypeCClassTable |
#define ADD_ALL_MULTI_BYTE_RANGE | ( | enc, | ||
mbuf | ||||
) |
do {\ if (! ONIGENC_IS_SINGLEBYTE(enc)) {\ r = SET_ALL_MULTI_BYTE_RANGE(enc, &(mbuf));\ if (r) return r;\ }\ } while (0)
Definition at line 138 of file regparse.c.
Referenced by add_ctype_to_cc().
#define BACKREF_REL_TO_ABS | ( | rel_no, | ||
env | ||||
) | ((env)->num_mem + 1 + (rel_no)) |
Definition at line 127 of file regparse.c.
Referenced by fetch_token(), and parse_exp().
#define BBUF_WRITE_CODE_POINT | ( | bbuf, | ||
pos, | ||||
code | ||||
) | BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT) |
Definition at line 1681 of file regparse.c.
Referenced by add_code_range_to_buf0(), and new_code_range().
#define BITSET_IS_EMPTY | ( | bs, | ||
empty | ||||
) |
do {\ int i;\ empty = 1;\ for (i = 0; i < (int )BITSET_SIZE; i++) {\ if ((bs)[i] != 0) {\ empty = 0; break;\ }\ }\ } while (0)
Definition at line 151 of file regparse.c.
Referenced by parse_char_class().
#define BITSET_SET_BIT_CHKDUP | ( | bs, | ||
pos | ||||
) |
do { \ if (BITSET_AT(bs, pos)) CC_DUP_WARN(env); \ BS_ROOM(bs, pos) |= BS_BIT(pos); \ } while (0)
Definition at line 146 of file regparse.c.
Referenced by add_ctype_to_cc(), add_ctype_to_cc_by_range(), bitset_set_range(), next_state_class(), next_state_val(), and parse_char_class().
#define CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS |
Definition at line 35 of file regparse.c.
Referenced by i_apply_case_fold().
#define INIT_MULTI_BYTE_RANGE_SIZE (SIZE_CODE_POINT * 5) |
Referenced by new_code_range().
#define INIT_NAME_BACKREFS_ALLOC_NUM 8 |
Definition at line 402 of file regparse.c.
#define INIT_SCANENV_MEMNODES_ALLOC_SIZE 16 |
Definition at line 930 of file regparse.c.
#define is_invalid_quantifier_target | ( | node | ) | 0 |
Definition at line 2182 of file regparse.c.
Referenced by parse_exp().
#define MBCODE_START_POS | ( | enc | ) | (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80) |
Definition at line 132 of file regparse.c.
Referenced by not_code_range_buf().
#define NAMEBUF_SIZE 24 |
Definition at line 418 of file regparse.c.
#define NAMEBUF_SIZE_1 25 |
Definition at line 419 of file regparse.c.
#define NEWLINE_CODE 0x0a |
Referenced by parse_char_class().
#define ONOFF | ( | v, | ||
f, | ||||
negative | ||||
) | (negative) ? ((v) &= ~(f)) : ((v) |= (f)) |
Definition at line 130 of file regparse.c.
Referenced by parse_enclose().
#define PEND (p < end ? 0 : 1) |
Definition at line 262 of file regparse.c.
Referenced by code_exist_check(), fetch_char_property_to_ctype(), fetch_escaped_value(), fetch_name(), fetch_name_with_level(), fetch_range_quantifier(), fetch_token(), fetch_token_in_cc(), onig_scan_unsigned_number(), parse_enclose(), parse_posix_bracket(), scan_unsigned_hexadecimal_number(), and scan_unsigned_octal_number().
#define PEND_VALUE 0 |
Definition at line 259 of file regparse.c.
#define PFETCH | ( | c | ) |
do { \ c = ((enc->max_enc_len == 1) ? *p : ONIGENC_MBC_TO_CODE(enc, p, end)); \ pfetch_prev = p; \ p += enclen(enc, p, end); \ } while (0)
Definition at line 268 of file regparse.c.
Referenced by code_exist_check(), fetch_char_property_to_ctype(), fetch_escaped_value(), fetch_name(), fetch_name_with_level(), fetch_range_quantifier(), fetch_token(), fetch_token_in_cc(), onig_scan_unsigned_number(), parse_enclose(), parse_posix_bracket(), scan_unsigned_hexadecimal_number(), and scan_unsigned_octal_number().
#define PFETCH_READY UChar* pfetch_prev |
Definition at line 261 of file regparse.c.
#define PINC |
do { \ pfetch_prev = p; \ p += enclen(enc, p, end); \ } while (0)
Definition at line 264 of file regparse.c.
#define POSIX_BRACKET_CHECK_LIMIT_LENGTH 20 |
Referenced by parse_posix_bracket().
#define POSIX_BRACKET_NAME_MIN_LEN 4 |
Referenced by parse_posix_bracket().
#define PPEEK (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE) |
Definition at line 274 of file regparse.c.
Referenced by fetch_token(), and parse_posix_bracket().
#define PPEEK_IS | ( | c | ) | (PPEEK == (OnigCodePoint )c) |
Definition at line 275 of file regparse.c.
Referenced by fetch_token(), fetch_token_in_cc(), parse_enclose(), and parse_posix_bracket().
#define PUNFETCH p = pfetch_prev |
Definition at line 263 of file regparse.c.
#define SET_ALL_MULTI_BYTE_RANGE | ( | enc, | ||
pbuf | ||||
) | add_code_range_to_buf(pbuf, env, MBCODE_START_POS(enc), ~((OnigCodePoint )0)) |
Definition at line 135 of file regparse.c.
Referenced by not_code_range_buf(), and or_code_range_buf().
#define SWAP_BBUF_NOT | ( | bbuf1, | ||
not1, | ||||
bbuf2, | ||||
not2 | ||||
) |
do {\ BBuf *tbuf; \ int tnot; \ tnot = not1; not1 = not2; not2 = tnot; \ tbuf = bbuf1; bbuf1 = bbuf2; bbuf2 = tbuf; \ } while (0)
Definition at line 1843 of file regparse.c.
Referenced by and_code_range_buf(), and or_code_range_buf().
#define THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS 8 |
Definition at line 4949 of file regparse.c.
Referenced by parse_exp().
#define WARN_BUFSIZE 256 |
Definition at line 33 of file regparse.c.
Referenced by onig_syntax_warn(), and set_quantifier().
typedef st_data_t HashDataType |
Definition at line 416 of file regparse.c.
Definition at line 415 of file regparse.c.
enum CCSTATE |
Definition at line 4138 of file regparse.c.
enum CCVALTYPE |
Definition at line 4145 of file regparse.c.
enum ReduceType |
Definition at line 2211 of file regparse.c.
enum TokenSyms |
Definition at line 2281 of file regparse.c.
static int add_code_range | ( | BBuf ** | pbuf, | |
ScanEnv * | env, | |||
OnigCodePoint | from, | |||
OnigCodePoint | to | |||
) | [static] |
Definition at line 1803 of file regparse.c.
References add_code_range0().
Referenced by next_state_class(), next_state_val(), and parse_char_class().
static int add_code_range0 | ( | BBuf ** | pbuf, | |
ScanEnv * | env, | |||
OnigCodePoint | from, | |||
OnigCodePoint | to, | |||
int | checkdup | |||
) | [static] |
Definition at line 1790 of file regparse.c.
References add_code_range_to_buf0(), IS_SYNTAX_BV, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC, and ScanEnv::syntax.
Referenced by add_code_range(), and i_apply_case_fold().
static int add_code_range_to_buf | ( | BBuf ** | pbuf, | |
ScanEnv * | env, | |||
OnigCodePoint | from, | |||
OnigCodePoint | to | |||
) | [static] |
Definition at line 1784 of file regparse.c.
References add_code_range_to_buf0().
Referenced by add_ctype_to_cc_by_range(), and_code_range1(), and_code_range_buf(), not_code_range_buf(), and or_code_range_buf().
static int add_code_range_to_buf0 | ( | BBuf ** | pbuf, | |
ScanEnv * | env, | |||
OnigCodePoint | from, | |||
OnigCodePoint | to, | |||
int | checkdup | |||
) | [static] |
Definition at line 1707 of file regparse.c.
References BBUF_ENSURE_SIZE, BBUF_MOVE_LEFT_REDUCE, BBUF_MOVE_RIGHT, BBUF_WRITE_CODE_POINT, CC_DUP_WARN(), GET_CODE_POINT, IS_NULL, new_code_range(), ONIG_MAX_MULTI_BYTE_RANGES_NUM, _BBuf::p, size, and SIZE_CODE_POINT.
Referenced by add_code_range0(), and add_code_range_to_buf().
static int add_ctype_to_cc | ( | CClassNode * | cc, | |
int | ctype, | |||
int | not, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 3904 of file regparse.c.
References ADD_ALL_MULTI_BYTE_RANGE, add_ctype_to_cc_by_range(), BITSET_SET_BIT_CHKDUP, CClassNode::bs, ScanEnv::enc, IS_CODE_SB_WORD, CClassNode::mbuf, ONIG_NO_SUPPORT_CONFIG, ONIGENC_CODE_TO_MBCLEN, ONIGENC_CTYPE_ALNUM, ONIGENC_CTYPE_ALPHA, ONIGENC_CTYPE_ASCII, ONIGENC_CTYPE_BLANK, ONIGENC_CTYPE_CNTRL, ONIGENC_CTYPE_D, ONIGENC_CTYPE_DIGIT, ONIGENC_CTYPE_GRAPH, ONIGENC_CTYPE_LOWER, ONIGENC_CTYPE_PRINT, ONIGENC_CTYPE_PUNCT, ONIGENC_CTYPE_S, ONIGENC_CTYPE_SPACE, ONIGENC_CTYPE_UPPER, ONIGENC_CTYPE_W, ONIGENC_CTYPE_WORD, ONIGENC_CTYPE_XDIGIT, ONIGENC_GET_CTYPE_CODE_RANGE, ONIGENC_IS_ASCII_CODE_CTYPE, ONIGENC_IS_CODE_CTYPE, and ONIGENC_IS_CODE_WORD.
Referenced by parse_char_class(), parse_char_property(), parse_exp(), and parse_posix_bracket().
static int add_ctype_to_cc_by_range | ( | CClassNode * | cc, | |
int ctype | ARG_UNUSED, | |||
int | not, | |||
ScanEnv * | env, | |||
OnigCodePoint | sb_out, | |||
const OnigCodePoint | mbr[] | |||
) | [static] |
Definition at line 3831 of file regparse.c.
References add_code_range_to_buf(), BITSET_SET_BIT_CHKDUP, CClassNode::bs, CClassNode::mbuf, ONIGENC_CODE_RANGE_FROM, ONIGENC_CODE_RANGE_NUM, and ONIGENC_CODE_RANGE_TO.
Referenced by add_ctype_to_cc().
static int and_cclass | ( | CClassNode * | dest, | |
CClassNode * | cc, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 2005 of file regparse.c.
References and_code_range_buf(), bbuf_free(), bitset_and(), bitset_copy(), bitset_invert(), bitset_invert_to(), CClassNode::bs, ScanEnv::enc, IS_NCCLASS_NOT, CClassNode::mbuf, not_code_range_buf(), ONIGENC_IS_SINGLEBYTE, and or_code_range_buf().
Referenced by parse_char_class().
static int and_code_range1 | ( | BBuf ** | pbuf, | |
ScanEnv * | env, | |||
OnigCodePoint | from1, | |||
OnigCodePoint | to1, | |||
OnigCodePoint * | data, | |||
int | n | |||
) | [static] |
Definition at line 1908 of file regparse.c.
References add_code_range_to_buf().
Referenced by and_code_range_buf().
static int and_code_range_buf | ( | BBuf * | bbuf1, | |
int | not1, | |||
BBuf * | bbuf2, | |||
int | not2, | |||
BBuf ** | pbuf, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 1948 of file regparse.c.
References add_code_range_to_buf(), and_code_range1(), bbuf_clone(), GET_CODE_POINT, IS_NOT_NULL, IS_NULL, MAX, MIN, NULL, _BBuf::p, and SWAP_BBUF_NOT.
Referenced by and_cclass(), and or_cclass().
Definition at line 113 of file regparse.c.
References _BBuf::alloc, BBUF_INIT, CHECK_NULL_RETURN_MEMERR, _BBuf::p, _BBuf::used, xmalloc, and xmemcpy.
Referenced by and_code_range_buf(), and or_code_range_buf().
static void bbuf_free | ( | BBuf * | bbuf | ) | [static] |
Definition at line 104 of file regparse.c.
References IS_NOT_NULL, _BBuf::p, and xfree().
Referenced by and_cclass(), onig_node_free(), or_cclass(), and parse_char_class().
Definition at line 208 of file regparse.c.
References BITSET_SIZE.
Referenced by and_cclass(), and or_cclass().
static void bitset_invert | ( | BitSetRef | bs | ) | [static] |
Definition at line 180 of file regparse.c.
References BITSET_SIZE.
Referenced by and_cclass(), and or_cclass().
Definition at line 187 of file regparse.c.
References BITSET_SIZE.
Referenced by and_cclass(), and or_cclass().
Definition at line 162 of file regparse.c.
References BITSET_SET_BIT_CHKDUP.
Referenced by next_state_val().
static void CC_DUP_WARN | ( | ScanEnv * | env | ) | [static] |
Definition at line 2887 of file regparse.c.
References IS_SYNTAX_BV, onig_null_warn(), ONIG_SYN_WARN_CC_DUP, onig_syntax_warn(), onig_warn, RTEST, and ruby_verbose.
Referenced by add_code_range_to_buf0().
static void CC_ESC_WARN | ( | ScanEnv * | env, | |
UChar * | c | |||
) | [static] |
Definition at line 2866 of file regparse.c.
References IS_SYNTAX_BV, onig_null_warn(), ONIG_SYN_BACKSLASH_ESCAPE_IN_CC, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED, onig_syntax_warn(), onig_warn, and ScanEnv::syntax.
Referenced by fetch_token_in_cc(), and parse_char_class().
static void CLOSE_BRACKET_WITHOUT_ESC_WARN | ( | ScanEnv * | env, | |
UChar * | c | |||
) | [static] |
Definition at line 2877 of file regparse.c.
References IS_SYNTAX_BV, onig_null_warn(), ONIG_SYN_WARN_CC_OP_NOT_ESCAPED, onig_syntax_warn(), and onig_warn.
Referenced by fetch_token().
static int code_exist_check | ( | OnigCodePoint | c, | |
UChar * | from, | |||
UChar * | end, | |||
int | ignore_escaped, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 4250 of file regparse.c.
References ScanEnv::enc, MC_ESC, PEND, PFETCH, ScanEnv::syntax, and UChar.
Referenced by parse_char_class().
static int conv_backslash_value | ( | int | c, | |
ScanEnv * | env | |||
) | [static] |
Definition at line 2124 of file regparse.c.
References IS_SYNTAX_OP, IS_SYNTAX_OP2, ONIG_SYN_OP2_ESC_V_VTAB, ONIG_SYN_OP_ESC_CONTROL_CHARS, ScanEnv::syntax, and UNKNOWN_ESC_WARN().
Referenced by fetch_escaped_value().
static int fetch_char_property_to_ctype | ( | UChar ** | src, | |
UChar * | end, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 4086 of file regparse.c.
References ScanEnv::enc, onig_scan_env_set_error_string(), ONIGENC_PROPERTY_NAME_TO_CTYPE, PEND, PFETCH, and UChar.
Referenced by parse_char_class(), and parse_char_property().
static int fetch_escaped_value | ( | UChar ** | src, | |
UChar * | end, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 2441 of file regparse.c.
References conv_backslash_value(), ScanEnv::enc, IS_SYNTAX_OP, IS_SYNTAX_OP2, MC_ESC, ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL, ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META, ONIG_SYN_OP_ESC_C_CONTROL, PEND, PFETCH, ScanEnv::syntax, and UChar.
Referenced by fetch_token(), and fetch_token_in_cc().
static int fetch_name | ( | OnigCodePoint | start_code, | |
UChar ** | src, | |||
UChar * | end, | |||
UChar ** | rname_end, | |||
ScanEnv * | env, | |||
int * | rback_num, | |||
int | ref | |||
) | [static] |
Definition at line 2650 of file regparse.c.
References ScanEnv::enc, err, get_name_end_code_point(), onig_scan_env_set_error_string(), onig_scan_unsigned_number(), ONIGENC_IS_CODE_DIGIT, ONIGENC_IS_CODE_WORD, PEND, PFETCH, and UChar.
Referenced by fetch_token(), and parse_enclose().
static int fetch_name_with_level | ( | OnigCodePoint | start_code, | |
UChar ** | src, | |||
UChar * | end, | |||
UChar ** | rname_end, | |||
ScanEnv * | env, | |||
int * | rback_num, | |||
int * | rlevel | |||
) | [static] |
Definition at line 2536 of file regparse.c.
References ScanEnv::enc, err, get_name_end_code_point(), onig_scan_env_set_error_string(), onig_scan_unsigned_number(), ONIGENC_IS_CODE_DIGIT, ONIGENC_IS_CODE_WORD, PEND, PFETCH, and UChar.
Referenced by fetch_token().
static int fetch_range_quantifier | ( | UChar ** | src, | |
UChar * | end, | |||
OnigToken * | tok, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 2350 of file regparse.c.
References ScanEnv::enc, IS_REPEAT_INFINITE, IS_SYNTAX_BV, IS_SYNTAX_OP, MC_ESC, ONIG_MAX_REPEAT_NUM, onig_scan_unsigned_number(), ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV, ONIG_SYN_ALLOW_INVALID_INTERVAL, ONIG_SYN_OP_ESC_BRACE_INTERVAL, PEND, PFETCH, OnigToken::repeat, ScanEnv::syntax, OnigToken::type, OnigToken::u, and UChar.
Referenced by fetch_token().
Definition at line 3194 of file regparse.c.
References OnigToken::anchor, ANCHOR_BEGIN_BUF, ANCHOR_SEMI_END_BUF, OnigToken::backp, OnigToken::backref, BACKREF_REL_TO_ABS, OnigToken::base, OnigToken::c, OnigToken::call, CLOSE_BRACKET_WITHOUT_ESC_WARN(), OnigToken::code, ScanEnv::enc, enclen, OnigToken::escaped, fetch_escaped_value(), fetch_name(), fetch_name_with_level(), fetch_range_quantifier(), IS_EXTEND, IS_MC_ESC_CODE, IS_NULL, IS_SINGLELINE, IS_SYNTAX_BV, IS_SYNTAX_OP, IS_SYNTAX_OP2, MC_ANYCHAR, MC_ANYCHAR_ANYTIME, MC_ANYTIME, MC_ESC, MC_ONE_OR_MORE_TIME, MC_ZERO_OR_ONE_TIME, ScanEnv::num_mem, ONIG_INEFFECTIVE_META_CHAR, ONIG_MAX_BACKREF_NUM, onig_name_to_group_numbers(), onig_scan_env_set_error_string(), onig_scan_unsigned_number(), ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY, ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE, ONIG_SYN_OP2_ESC_G_SUBEXP_CALL, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR, ONIG_SYN_OP2_ESC_H_XDIGIT, ONIG_SYN_OP2_ESC_K_NAMED_BACKREF, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT, ONIG_SYN_OP2_ESC_U_HEX4, ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL, ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT, ONIG_SYN_OP2_QMARK_GROUP_EFFECT, ONIG_SYN_OP_ASTERISK_ZERO_INF, ONIG_SYN_OP_BRACE_INTERVAL, ONIG_SYN_OP_BRACKET_CC, ONIG_SYN_OP_DECIMAL_BACKREF, ONIG_SYN_OP_DOT_ANYCHAR, ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR, ONIG_SYN_OP_ESC_B_WORD_BOUND, ONIG_SYN_OP_ESC_BRACE_INTERVAL, ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR, ONIG_SYN_OP_ESC_D_DIGIT, ONIG_SYN_OP_ESC_LPAREN_SUBEXP, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END, ONIG_SYN_OP_ESC_OCTAL3, ONIG_SYN_OP_ESC_PLUS_ONE_INF, ONIG_SYN_OP_ESC_QMARK_ZERO_ONE, ONIG_SYN_OP_ESC_S_WHITE_SPACE, ONIG_SYN_OP_ESC_VBAR_ALT, ONIG_SYN_OP_ESC_W_WORD, ONIG_SYN_OP_ESC_X_BRACE_HEX8, ONIG_SYN_OP_ESC_X_HEX2, ONIG_SYN_OP_LINE_ANCHOR, ONIG_SYN_OP_LPAREN_SUBEXP, ONIG_SYN_OP_PLUS_ONE_INF, ONIG_SYN_OP_QMARK_NON_GREEDY, ONIG_SYN_OP_QMARK_ZERO_ONE, ONIG_SYN_OP_VARIABLE_META_CHARACTERS, ONIG_SYN_OP_VBAR_ALT, ONIG_SYN_STRICT_CHECK_BACKREF, onig_syntax_warn(), ONIGENC_IS_CODE_NEWLINE, ONIGENC_IS_CODE_XDIGIT, ONIGERR_UNDEFINED_NAME_REFERENCE, ScanEnv::option, ScanEnv::pattern, PEND, PFETCH, PPEEK, PPEEK_IS, OnigToken::prop, ScanEnv::reg, OnigToken::repeat, scan_unsigned_hexadecimal_number(), scan_unsigned_octal_number(), SCANENV_MEM_NODES, OnigToken::subtype, ScanEnv::syntax, TK_INTERVAL, OnigToken::type, OnigToken::u, and UChar.
Referenced by parse_enclose(), parse_exp(), parse_regexp(), and parse_subexp().
Definition at line 2973 of file regparse.c.
References OnigToken::backp, OnigToken::base, OnigToken::c, CC_ESC_WARN(), OnigToken::code, ScanEnv::enc, enclen, OnigToken::escaped, fetch_escaped_value(), IS_SYNTAX_BV, IS_SYNTAX_OP, IS_SYNTAX_OP2, MC_ESC, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC, ONIG_SYN_OP2_CCLASS_SET_OP, ONIG_SYN_OP2_ESC_H_XDIGIT, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT, ONIG_SYN_OP2_ESC_U_HEX4, ONIG_SYN_OP_ESC_OCTAL3, ONIG_SYN_OP_ESC_X_BRACE_HEX8, ONIG_SYN_OP_ESC_X_HEX2, ONIG_SYN_OP_POSIX_BRACKET, onig_syntax_warn(), ONIGENC_IS_CODE_XDIGIT, PEND, PFETCH, PPEEK_IS, OnigToken::prop, scan_unsigned_hexadecimal_number(), scan_unsigned_octal_number(), str_exist_check_with_esc(), ScanEnv::syntax, OnigToken::type, OnigToken::u, and UChar.
Referenced by parse_char_class().
static UChar* find_str_position | ( | OnigCodePoint | s[], | |
int | n, | |||
UChar * | from, | |||
UChar * | to, | |||
UChar ** | next, | |||
OnigEncoding | enc | |||
) | [static] |
Definition at line 2906 of file regparse.c.
References enclen, IS_NOT_NULL, ONIGENC_MBC_TO_CODE, and UChar.
Referenced by parse_exp().
static OnigCodePoint get_name_end_code_point | ( | OnigCodePoint | start | ) | [static] |
Definition at line 2516 of file regparse.c.
Referenced by fetch_name(), and fetch_name_with_level().
static int i_apply_case_fold | ( | OnigCodePoint | from, | |
OnigCodePoint | to[], | |||
int | to_len, | |||
void * | arg | |||
) | [static] |
Definition at line 5059 of file regparse.c.
References add_code_range0(), BITSET_CLEAR_BIT, BITSET_SET_BIT, CClassNode::bs, CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS, IApplyCaseFoldArg::cc, CHECK_NULL_RETURN_MEMERR, ScanEnv::enc, IApplyCaseFoldArg::env, IS_NCCLASS_NOT, CClassNode::mbuf, NCDR, NSTRING_SET_AMBIG, NULL_NODE, onig_is_code_in_cc(), onig_node_free(), onig_node_new_alt(), onig_node_new_str(), onig_node_str_cat(), ONIGENC_CODE_TO_MBC, ONIGENC_MBC_MINLEN, IApplyCaseFoldArg::ptail, SINGLE_BYTE_SIZE, and UChar.
Referenced by parse_exp().
static int i_free_name_entry | ( | UChar * | key, | |
NameEntry * | e, | |||
void *arg | ARG_UNUSED | |||
) | [static] |
Definition at line 458 of file regparse.c.
References NameEntry::back_refs, IS_NOT_NULL, NameEntry::name, and xfree().
Referenced by names_clear().
static int i_free_shared_class | ( | type_cclass_key * | key, | |
Node * | node, | |||
void *arg | ARG_UNUSED | |||
) | [static] |
Definition at line 4997 of file regparse.c.
References IS_NOT_NULL, CClassNode::mbuf, NCCLASS, and xfree().
Referenced by onig_free_shared_cclass_table().
Definition at line 515 of file regparse.c.
References INamesArg::arg, NameEntry::back_num, NameEntry::back_ref1, NameEntry::back_refs, INamesArg::func, NameEntry::name, NameEntry::name_len, INamesArg::reg, and INamesArg::ret.
Referenced by onig_foreach_name().
static int i_renumber_name | ( | UChar *key | ARG_UNUSED, | |
NameEntry * | e, | |||
GroupNumRemap * | map | |||
) | [static] |
Definition at line 548 of file regparse.c.
References NameEntry::back_num, NameEntry::back_ref1, NameEntry::back_refs, and GroupNumRemap::new_val.
Referenced by onig_renumber_name_table().
static void initialize_cclass | ( | CClassNode * | cc | ) | [static] |
Definition at line 1137 of file regparse.c.
References BITSET_CLEAR, CClassNode::bs, CClassNode::flags, and CClassNode::mbuf.
Referenced by node_new_cclass(), and parse_char_class().
static int name_add | ( | regex_t * | reg, | |
UChar * | name, | |||
UChar * | name_end, | |||
int | backref, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 726 of file regparse.c.
References NameEntry::back_alloc, NameEntry::back_num, NameEntry::back_ref1, NameEntry::back_refs, CHECK_NULL_RETURN_MEMERR, re_pattern_buffer::enc, if(), IS_NULL, IS_SYNTAX_BV, NameEntry::name, name_find(), re_pattern_buffer::name_table, NULL, onig_scan_env_set_error_string(), onig_st_init_strend_table_with_size(), onig_st_insert_strend(), ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME, ONIGERR_MULTIPLEX_DEFINED_NAME, strdup_with_null(), ScanEnv::syntax, xfree(), xmalloc, and xrealloc.
Referenced by parse_enclose().
Definition at line 494 of file regparse.c.
References IS_NOT_NULL, re_pattern_buffer::name_table, and onig_st_lookup_strend().
Referenced by name_add(), and onig_name_to_group_numbers().
static int names_clear | ( | regex_t * | reg | ) | [static] |
Definition at line 468 of file regparse.c.
References i_free_name_entry(), if(), IS_NOT_NULL, re_pattern_buffer::name_table, and onig_st_foreach.
Referenced by onig_names_free(), and onig_parse_make_tree().
static int new_code_range | ( | BBuf ** | pbuf | ) | [static] |
Definition at line 1689 of file regparse.c.
References BBUF_INIT, BBUF_WRITE_CODE_POINT, CHECK_NULL_RETURN_MEMERR, INIT_MULTI_BYTE_RANGE_SIZE, and xmalloc.
Referenced by add_code_range_to_buf0().
static int next_state_class | ( | CClassNode * | cc, | |
OnigCodePoint * | vs, | |||
enum CCVALTYPE * | type, | |||
enum CCSTATE * | state, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 4152 of file regparse.c.
References add_code_range(), BITSET_SET_BIT_CHKDUP, CClassNode::bs, CCS_RANGE, CCS_VALUE, CCV_CLASS, CCV_CODE_POINT, CCV_SB, and CClassNode::mbuf.
Referenced by parse_char_class().
static int next_state_val | ( | CClassNode * | cc, | |
OnigCodePoint * | vs, | |||
OnigCodePoint | v, | |||
int * | vs_israw, | |||
int | v_israw, | |||
enum CCVALTYPE | intype, | |||
enum CCVALTYPE * | type, | |||
enum CCSTATE * | state, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 4175 of file regparse.c.
References add_code_range(), BITSET_SET_BIT_CHKDUP, bitset_set_range(), CClassNode::bs, CCS_COMPLETE, CCS_RANGE, CCS_START, CCS_VALUE, CCV_CODE_POINT, CCV_SB, IS_SYNTAX_BV, CClassNode::mbuf, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC, and ScanEnv::syntax.
Referenced by parse_char_class().
static Node* node_new | ( | void | ) | [static] |
Definition at line 1115 of file regparse.c.
References IS_NOT_NULL, _FreeNode::next, and xmalloc.
Referenced by node_new_anychar(), node_new_backref(), node_new_call(), node_new_cclass(), node_new_ctype(), node_new_enclose(), node_new_list(), node_new_quantifier(), node_new_str(), onig_node_new_alt(), and onig_node_new_anchor().
static Node* node_new_anychar | ( | void | ) | [static] |
Definition at line 1219 of file regparse.c.
References CHECK_NULL_RETURN, node_new(), NT_CANY, and SET_NTYPE.
Referenced by parse_exp().
static Node* node_new_backref | ( | int | back_num, | |
int * | backrefs, | |||
int | by_name, | |||
int | exist_level, | |||
int | nest_level, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 1290 of file regparse.c.
References CHECK_NULL_RETURN, IS_NULL, NBREF, NODE_BACKREFS_SIZE, node_new(), NT_BREF, NULL, onig_node_free(), SCANENV_MEM_NODES, SET_NTYPE, and xmalloc.
Referenced by parse_exp().
static Node* node_new_call | ( | UChar * | name, | |
UChar * | name_end, | |||
int | gnum | |||
) | [static] |
Definition at line 1342 of file regparse.c.
References CHECK_NULL_RETURN, NCALL, node_new(), NT_CALL, and SET_NTYPE.
Referenced by parse_exp().
static Node* node_new_cclass | ( | void | ) | [static] |
Definition at line 1146 of file regparse.c.
References CHECK_NULL_RETURN, initialize_cclass(), NCCLASS, node_new(), NT_CCLASS, and SET_NTYPE.
Referenced by node_new_cclass_by_codepoint_range(), parse_char_class(), parse_char_property(), and parse_exp().
static Node* node_new_cclass_by_codepoint_range | ( | int | not, | |
OnigCodePoint | sb_out, | |||
const OnigCodePoint | ranges[] | |||
) | [static] |
Definition at line 1157 of file regparse.c.
References _BBuf::alloc, BITSET_CLEAR, BITSET_SET_BIT, CClassNode::bs, CHECK_NULL_RETURN, IS_NOT_NULL, IS_NULL, CClassNode::mbuf, NCCLASS, NCCLASS_SET_NOT, node_new_cclass(), ONIGENC_CODE_RANGE_FROM, ONIGENC_CODE_RANGE_NUM, ONIGENC_CODE_RANGE_TO, _BBuf::p, UChar, _BBuf::used, and xmalloc.
Referenced by parse_exp().
static Node* node_new_ctype | ( | int | type, | |
int | not | |||
) | [static] |
Definition at line 1207 of file regparse.c.
References CHECK_NULL_RETURN, NCTYPE, node_new(), NT_CTYPE, and SET_NTYPE.
Referenced by parse_exp().
static Node* node_new_empty | ( | void | ) | [static] |
Definition at line 1538 of file regparse.c.
References node_new_str(), and NULL.
Referenced by parse_exp().
static Node* node_new_enclose | ( | int | type | ) | [static] |
Definition at line 1384 of file regparse.c.
References CHECK_NULL_RETURN, NENCLOSE, node_new(), NT_ENCLOSE, and SET_NTYPE.
Referenced by node_new_enclose_memory(), node_new_option(), onig_node_new_enclose(), parse_enclose(), and parse_exp().
static Node* node_new_enclose_memory | ( | OnigOptionType | option, | |
int | is_named | |||
) | [static] |
Definition at line 1407 of file regparse.c.
References CHECK_NULL_RETURN, ENCLOSE_MEMORY, NENCLOSE, node_new_enclose(), NST_NAMED_GROUP, and SET_ENCLOSE_STATUS.
Referenced by parse_enclose().
Definition at line 1229 of file regparse.c.
References CHECK_NULL_RETURN, NCAR, NCDR, node_new(), NT_LIST, and SET_NTYPE.
Referenced by onig_node_new_list(), parse_branch(), and parse_exp().
static Node* node_new_option | ( | OnigOptionType | option | ) | [static] |
Definition at line 1421 of file regparse.c.
References CHECK_NULL_RETURN, ENCLOSE_OPTION, NENCLOSE, and node_new_enclose().
Referenced by parse_enclose().
static Node* node_new_quantifier | ( | int | lower, | |
int | upper, | |||
int | by_number | |||
) | [static] |
Definition at line 1358 of file regparse.c.
References CHECK_NULL_RETURN, node_new(), NQTFR, NT_QTFR, and SET_NTYPE.
Referenced by parse_exp().
static Node* node_new_str | ( | const UChar * | s, | |
const UChar * | end | |||
) | [static] |
Definition at line 1506 of file regparse.c.
References CHECK_NULL_RETURN, node_new(), NSTR, NT_STR, onig_node_free(), onig_node_str_cat(), and SET_NTYPE.
Referenced by node_new_empty(), node_new_str_raw(), onig_node_new_str(), parse_exp(), and str_node_split_last_char().
static Node* node_new_str_raw | ( | UChar * | s, | |
UChar * | end | |||
) | [static] |
Definition at line 1530 of file regparse.c.
References node_new_str(), and NSTRING_SET_RAW.
Referenced by node_new_str_raw_char(), and parse_exp().
static Node* node_new_str_raw_char | ( | UChar | c | ) | [static] |
Definition at line 1544 of file regparse.c.
References node_new_str_raw(), and UChar.
Referenced by parse_exp().
static int node_str_cat_char | ( | Node * | node, | |
UChar | c | |||
) | [static] |
Definition at line 1473 of file regparse.c.
References onig_node_str_cat(), and UChar.
Referenced by parse_exp().
static int not_code_range_buf | ( | OnigEncoding | enc, | |
BBuf * | bbuf, | |||
BBuf ** | pbuf, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 1809 of file regparse.c.
References add_code_range_to_buf(), GET_CODE_POINT, IS_NULL, MBCODE_START_POS, NULL, _BBuf::p, and SET_ALL_MULTI_BYTE_RANGE.
Referenced by and_cclass(), or_cclass(), and or_code_range_buf().
int onig_foreach_name | ( | regex_t * | reg, | |
int(*)(const UChar *, const UChar *, int, int *, regex_t *, void *) | func, | |||
void * | arg | |||
) |
Definition at line 530 of file regparse.c.
References INamesArg::arg, re_pattern_buffer::enc, INamesArg::enc, func, INamesArg::func, i_names(), if(), IS_NOT_NULL, re_pattern_buffer::name_table, onig_st_foreach, INamesArg::reg, and INamesArg::ret.
Referenced by match_inspect(), rb_reg_named_captures(), rb_reg_names(), and reg_named_capture_assign_gen().
int onig_free_node_list | ( | void | ) |
Definition at line 1099 of file regparse.c.
References IS_NOT_NULL, _FreeNode::next, and xfree().
Referenced by onig_end().
int onig_free_shared_cclass_table | ( | void | ) |
Definition at line 5010 of file regparse.c.
References i_free_shared_class(), IS_NOT_NULL, onig_st_foreach, and onig_st_free_table.
Referenced by onig_end().
int onig_name_to_backref_number | ( | regex_t * | reg, | |
const UChar * | name, | |||
const UChar * | name_end, | |||
OnigRegion * | region | |||
) |
Definition at line 859 of file regparse.c.
References re_registers::beg, IS_NOT_NULL, onig_name_to_group_numbers(), and ONIG_REGION_NOTPOS.
Referenced by match_backref_number(), and name_to_backref_number().
int onig_name_to_group_numbers | ( | regex_t * | reg, | |
const UChar * | name, | |||
const UChar * | name_end, | |||
int ** | nums | |||
) |
Definition at line 837 of file regparse.c.
References NameEntry::back_num, NameEntry::back_ref1, NameEntry::back_refs, IS_NULL, and name_find().
Referenced by fetch_token(), onig_name_to_backref_number(), and setup_subexp_call().
int onig_names_free | ( | regex_t * | reg | ) |
Definition at line 479 of file regparse.c.
References if(), IS_NOT_NULL, re_pattern_buffer::name_table, names_clear(), NULL, and onig_st_free_table.
Referenced by onig_free_body().
void onig_node_conv_to_str_node | ( | Node * | node, | |
int | flag | |||
) |
Definition at line 1482 of file regparse.c.
References NSTR, NT_STR, and SET_NTYPE.
Referenced by setup_tree().
void onig_node_free | ( | Node * | node | ) |
Definition at line 1016 of file regparse.c.
References bbuf_free(), buf, IS_NCCLASS_SHARE, IS_NOT_NULL, IS_NULL, CClassNode::mbuf, NANCHOR, NBREF, NCAR, NCCLASS, NCDR, NENCLOSE, _FreeNode::next, NQTFR, NSTR, NT_ALT, NT_ANCHOR, NT_BREF, NT_CCLASS, NT_ENCLOSE, NT_LIST, NT_QTFR, NT_STR, NTYPE, and xfree().
Referenced by expand_case_fold_make_rem_string(), expand_case_fold_string(), expand_case_fold_string_alt(), i_apply_case_fold(), node_new_backref(), node_new_str(), noname_disable_map(), onig_compile(), onig_reduce_nested_quantifier(), parse_branch(), parse_char_class(), parse_enclose(), parse_exp(), parse_subexp(), and setup_tree().
Definition at line 1247 of file regparse.c.
References IS_NOT_NULL, IS_NULL, NCDR, NULL, and onig_node_new_list().
Referenced by expand_case_fold_string(), and expand_case_fold_string_alt().
Definition at line 1265 of file regparse.c.
References CHECK_NULL_RETURN, NCAR, NCDR, node_new(), NT_ALT, and SET_NTYPE.
Referenced by expand_case_fold_string_alt(), i_apply_case_fold(), parse_exp(), and parse_subexp().
Node* onig_node_new_anchor | ( | int | type | ) |
Definition at line 1277 of file regparse.c.
References CHECK_NULL_RETURN, NANCHOR, node_new(), NT_ANCHOR, and SET_NTYPE.
Referenced by divide_look_behind_alternatives(), parse_enclose(), and parse_exp().
Node* onig_node_new_enclose | ( | int | type | ) |
Definition at line 1401 of file regparse.c.
References node_new_enclose().
Referenced by next_setup().
Definition at line 1241 of file regparse.c.
References node_new_list().
Referenced by expand_case_fold_string_alt(), and onig_node_list_add().
Node* onig_node_new_str | ( | const UChar * | s, | |
const UChar * | end | |||
) |
Definition at line 1524 of file regparse.c.
References node_new_str().
Referenced by expand_case_fold_make_rem_string(), expand_case_fold_string(), expand_case_fold_string_alt(), and i_apply_case_fold().
int onig_node_str_cat | ( | Node * | node, | |
const UChar * | s, | |||
const UChar * | end | |||
) |
Definition at line 1430 of file regparse.c.
References buf, CHECK_NULL_RETURN_MEMERR, NODE_STR_BUF_SIZE, NSTR, onig_strcpy(), strcat_capa(), strcat_capa_from_static(), and UChar.
Referenced by expand_case_fold_string(), expand_case_fold_string_alt(), i_apply_case_fold(), node_new_str(), node_str_cat_char(), onig_node_str_set(), parse_exp(), and setup_tree().
void onig_node_str_clear | ( | Node * | node | ) |
Definition at line 1492 of file regparse.c.
References buf, IS_NOT_NULL, NSTR, and xfree().
Referenced by onig_node_str_set().
int onig_node_str_set | ( | Node * | node, | |
const UChar * | s, | |||
const UChar * | end | |||
) |
Definition at line 1466 of file regparse.c.
References onig_node_str_cat(), and onig_node_str_clear().
Referenced by update_string_node_case_fold().
int onig_noname_group_capture_is_active | ( | regex_t * | reg | ) |
Definition at line 913 of file regparse.c.
References IS_SYNTAX_BV, ONIG_IS_OPTION_ON, onig_number_of_names(), ONIG_OPTION_CAPTURE_GROUP, ONIG_OPTION_DONT_CAPTURE_GROUP, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP, re_pattern_buffer::options, and re_pattern_buffer::syntax.
Referenced by rb_reg_regsub().
void onig_null_warn | ( | const char *s | ARG_UNUSED | ) |
Definition at line 77 of file regparse.c.
Referenced by CC_DUP_WARN(), CC_ESC_WARN(), CLOSE_BRACKET_WITHOUT_ESC_WARN(), set_quantifier(), and UNKNOWN_ESC_WARN().
int onig_number_of_names | ( | regex_t * | reg | ) |
Definition at line 577 of file regparse.c.
References if(), IS_NOT_NULL, re_pattern_buffer::name_table, and st_table::num_entries.
Referenced by onig_noname_group_capture_is_active().
int onig_parse_make_tree | ( | Node ** | root, | |
const UChar * | pattern, | |||
const UChar * | end, | |||
regex_t * | reg, | |||
ScanEnv * | env | |||
) |
Definition at line 5649 of file regparse.c.
References re_pattern_buffer::case_fold_flag, ScanEnv::case_fold_flag, re_pattern_buffer::enc, ScanEnv::enc, names_clear(), ScanEnv::num_mem, re_pattern_buffer::num_mem, ScanEnv::option, re_pattern_buffer::options, parse_regexp(), ScanEnv::pattern, ScanEnv::pattern_end, ScanEnv::reg, scan_env_clear(), re_pattern_buffer::syntax, ScanEnv::syntax, and UChar.
Referenced by onig_compile().
Definition at line 2231 of file regparse.c.
References QtfrNode::greedy, QtfrNode::lower, NQTFR, onig_node_free(), popular_quantifier_num(), RQ_A, RQ_AQ, RQ_ASIS, RQ_DEL, RQ_P_QQ, RQ_PQ_Q, RQ_QQ, QtfrNode::target, and QtfrNode::upper.
Referenced by noname_disable_map(), and set_quantifier().
int onig_renumber_name_table | ( | regex_t * | reg, | |
GroupNumRemap * | map | |||
) |
Definition at line 565 of file regparse.c.
References i_renumber_name(), if(), IS_NOT_NULL, re_pattern_buffer::name_table, and onig_st_foreach.
Referenced by disable_noname_group_capture().
void onig_scan_env_set_error_string | ( | ScanEnv * | env, | |
int ecode | ARG_UNUSED, | |||
UChar * | arg, | |||
UChar * | arg_end | |||
) |
Definition at line 5676 of file regparse.c.
References ScanEnv::error, and ScanEnv::error_end.
Referenced by fetch_char_property_to_ctype(), fetch_name(), fetch_name_with_level(), fetch_token(), name_add(), and setup_subexp_call().
int onig_scan_unsigned_number | ( | UChar ** | src, | |
const UChar * | end, | |||
OnigEncoding | enc | |||
) |
Definition at line 1598 of file regparse.c.
References DIGITVAL, INT_MAX_LIMIT, ONIGENC_IS_CODE_DIGIT, PEND, PFETCH, and UChar.
Referenced by fetch_name(), fetch_name_with_level(), fetch_range_quantifier(), and fetch_token().
void onig_set_verb_warn_func | ( | OnigWarnFunc | f | ) |
void onig_set_warn_func | ( | OnigWarnFunc | f | ) |
hash_table_type* onig_st_init_strend_table_with_size | ( | st_index_t | size | ) |
Definition at line 357 of file regparse.c.
References onig_st_init_table_with_size.
Referenced by name_add(), and onigenc_property_list_add_property().
int onig_st_insert_strend | ( | hash_table_type * | table, | |
const UChar * | str_key, | |||
const UChar * | end_key, | |||
hash_data_type | value | |||
) |
Definition at line 381 of file regparse.c.
References st_str_end_key::end, onig_st_insert, result, st_str_end_key::s, UChar, xfree(), and xmalloc.
Referenced by name_add(), and onigenc_property_list_add_property().
int onig_st_lookup_strend | ( | hash_table_type * | table, | |
const UChar * | str_key, | |||
const UChar * | end_key, | |||
hash_data_type * | value | |||
) |
Definition at line 369 of file regparse.c.
References st_str_end_key::end, onig_st_lookup, st_str_end_key::s, and UChar.
Referenced by name_find(), and property_name_to_ctype().
void onig_strcpy | ( | UChar * | dest, | |
const UChar * | src, | |||
const UChar * | end | |||
) |
Definition at line 227 of file regparse.c.
Referenced by onig_node_str_cat(), strcat_capa(), and strcat_capa_from_static().
int onig_strncmp | ( | const UChar * | s1, | |
const UChar * | s2, | |||
int | n | |||
) |
Definition at line 215 of file regparse.c.
static void onig_syntax_warn | ( | ScanEnv * | env, | |
const char * | fmt, | |||
... | ||||
) | [static] |
Definition at line 2850 of file regparse.c.
References ScanEnv::enc, NULL, onig_vsnprintf_with_pattern(), ScanEnv::pattern, ScanEnv::pattern_end, rb_compile_warn(), rb_warn(), ScanEnv::sourcefile, ScanEnv::sourceline, UChar, and WARN_BUFSIZE.
Referenced by CC_DUP_WARN(), CC_ESC_WARN(), CLOSE_BRACKET_WITHOUT_ESC_WARN(), fetch_token(), fetch_token_in_cc(), and UNKNOWN_ESC_WARN().
void onig_vsnprintf_with_pattern | ( | UChar | buf[], | |
int | bufsize, | |||
OnigEncoding | enc, | |||
UChar * | pat, | |||
UChar * | pat_end, | |||
const UChar * | fmt, | |||
va_list | args | |||
) |
Definition at line 316 of file regerror.c.
References enclen, len, ONIG_ENCODING_ASCII, ONIGENC_IS_CODE_PRINT, ONIGENC_IS_CODE_SPACE, ONIGENC_IS_MBC_HEAD, ONIGENC_MBC_MINLEN, onigenc_str_bytelen_null(), sprint_byte_with_x(), UChar, and xvsnprintf.
Referenced by onig_snprintf_with_pattern(), and onig_syntax_warn().
static int or_cclass | ( | CClassNode * | dest, | |
CClassNode * | cc, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 2063 of file regparse.c.
References and_code_range_buf(), bbuf_free(), bitset_copy(), bitset_invert(), bitset_invert_to(), bitset_or(), CClassNode::bs, ScanEnv::enc, IS_NCCLASS_NOT, CClassNode::mbuf, not_code_range_buf(), ONIGENC_IS_SINGLEBYTE, and or_code_range_buf().
Referenced by parse_char_class().
static int or_code_range_buf | ( | OnigEncoding | enc, | |
BBuf * | bbuf1, | |||
int | not1, | |||
BBuf * | bbuf2, | |||
int | not2, | |||
BBuf ** | pbuf, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 1851 of file regparse.c.
References add_code_range_to_buf(), bbuf_clone(), GET_CODE_POINT, IS_NULL, not_code_range_buf(), NULL, _BBuf::p, SET_ALL_MULTI_BYTE_RANGE, and SWAP_BBUF_NOT.
Referenced by and_cclass(), and or_cclass().
static int parse_branch | ( | Node ** | top, | |
OnigToken * | tok, | |||
int | term, | |||
UChar ** | src, | |||
UChar * | end, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 5545 of file regparse.c.
References IS_NOT_NULL, NCDR, node_new_list(), NT_LIST, NTYPE, NULL, onig_node_free(), parse_exp(), TK_ALT, and TK_EOT.
Referenced by parse_subexp().
static int parse_char_class | ( | Node ** | np, | |
OnigToken * | tok, | |||
UChar ** | src, | |||
UChar * | end, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 4274 of file regparse.c.
References add_code_range(), add_ctype_to_cc(), and_cclass(), OnigToken::backp, OnigToken::base, bbuf_free(), BITSET_IS_EMPTY, BITSET_SET_BIT_CHKDUP, CClassNode::bs, OnigToken::c, CC_ESC_WARN(), CCS_RANGE, CCS_START, CCS_VALUE, CCV_SB, CHECK_NULL_RETURN_MEMERR, OnigToken::code, code_exist_check(), ScanEnv::enc, enclen, err, OnigToken::escaped, fetch_char_property_to_ctype(), fetch_token_in_cc(), if(), initialize_cclass(), IS_NCCLASS_NOT, IS_NOT_NULL, IS_NULL, IS_SYNTAX_BV, CClassNode::mbuf, NCCLASS, NCCLASS_CLEAR_NOT, NCCLASS_SET_NOT, NEWLINE_CODE, next_state_class(), next_state_val(), node_new_cclass(), NULL, onig_node_free(), ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC, ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC, ONIGENC_CODE_TO_MBCLEN, ONIGENC_IS_CODE_NEWLINE, ONIGENC_IS_SINGLEBYTE, ONIGENC_MBC_MAXLEN, ONIGENC_MBC_MINLEN, ONIGENC_MBC_TO_CODE, or_cclass(), parse_posix_bracket(), ScanEnv::pattern_end, OnigToken::prop, SINGLE_BYTE_SIZE, ScanEnv::syntax, TK_CC_AND, TK_CC_CC_OPEN, TK_CC_CLOSE, TK_CC_RANGE, TK_CHAR, TK_CHAR_PROPERTY, TK_CHAR_TYPE, TK_CODE_POINT, TK_EOT, TK_POSIX_BRACKET_OPEN, TK_RAW_BYTE, OnigToken::type, OnigToken::u, and UChar.
Referenced by parse_exp().
static int parse_char_property | ( | Node ** | np, | |
OnigToken * | tok, | |||
UChar ** | src, | |||
UChar * | end, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 4118 of file regparse.c.
References add_ctype_to_cc(), CHECK_NULL_RETURN_MEMERR, fetch_char_property_to_ctype(), NCCLASS, NCCLASS_SET_NOT, node_new_cclass(), OnigToken::prop, and OnigToken::u.
Referenced by parse_exp().
static int parse_enclose | ( | Node ** | np, | |
OnigToken * | tok, | |||
int | term, | |||
UChar ** | src, | |||
UChar * | end, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 4602 of file regparse.c.
References ANCHOR_LOOK_BEHIND, ANCHOR_LOOK_BEHIND_NOT, ANCHOR_PREC_READ, ANCHOR_PREC_READ_NOT, BIT_STATUS_BITS_NUM, BIT_STATUS_ON_AT_SIMPLE, ScanEnv::capture_history, CHECK_NULL_RETURN_MEMERR, ScanEnv::enc, ENCLOSE_MEMORY, ENCLOSE_STOP_BACKTRACK, fetch_name(), fetch_token(), if(), IS_SYNTAX_OP2, name_add(), NANCHOR, neg, NENCLOSE, node_new_enclose(), node_new_enclose_memory(), node_new_option(), NT_ANCHOR, NTYPE, ScanEnv::num_named, ONIG_IS_OPTION_ON, onig_node_free(), onig_node_new_anchor(), ONIG_OPTION_DONT_CAPTURE_GROUP, ONIG_OPTION_EXTEND, ONIG_OPTION_IGNORECASE, ONIG_OPTION_MULTILINE, ONIG_OPTION_SINGLELINE, ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY, ONIG_SYN_OP2_OPTION_PERL, ONIG_SYN_OP2_OPTION_RUBY, ONIG_SYN_OP2_QMARK_GROUP_EFFECT, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP, ONOFF, ScanEnv::option, parse_subexp(), PEND, PFETCH, PPEEK_IS, ScanEnv::reg, scan_env_add_mem_entry(), scan_env_set_mem_node(), ScanEnv::syntax, and UChar.
Referenced by parse_exp().
static int parse_exp | ( | Node ** | np, | |
OnigToken * | tok, | |||
int | term, | |||
UChar ** | src, | |||
UChar * | end, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 5139 of file regparse.c.
References add_ctype_to_cc(), IApplyCaseFoldArg::alt_root, OnigToken::anchor, OnigToken::backp, OnigToken::backref, BACKREF_REL_TO_ABS, OnigToken::c, OnigToken::call, ScanEnv::case_fold_flag, IApplyCaseFoldArg::cc, CHECK_NULL_RETURN_MEMERR, OnigToken::code, type_cclass_key::enc, ScanEnv::enc, enclen, ENCLOSE_STOP_BACKTRACK, IApplyCaseFoldArg::env, OnigToken::escaped, fetch_token(), find_str_position(), i_apply_case_fold(), IS_IGNORECASE, is_invalid_quantifier_target, IS_NOT_NULL, IS_NULL, IS_SYNTAX_BV, MC_ESC, NCAR, NCCLASS, NCCLASS_SET_NOT, NCCLASS_SET_SHARE, NCDR, NENCLOSE, node_new_anychar(), node_new_backref(), node_new_call(), node_new_cclass(), node_new_cclass_by_codepoint_range(), node_new_ctype(), node_new_empty(), node_new_enclose(), node_new_list(), node_new_quantifier(), node_new_str(), node_new_str_raw(), node_new_str_raw_char(), node_str_cat_char(), type_cclass_key::not, NQTFR, NSTR, NSTRING_CLEAR_RAW, NULL, onig_node_free(), onig_node_new_alt(), onig_node_new_anchor(), onig_node_str_cat(), onig_st_add_direct, onig_st_init_table_with_size, onig_st_lookup, ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP, ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS, ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS, ONIGENC_APPLY_ALL_CASE_FOLD, ONIGENC_CODE_RANGE_NUM, ONIGENC_CODE_TO_MBC, ONIGENC_CTYPE_D, ONIGENC_CTYPE_DIGIT, ONIGENC_CTYPE_S, ONIGENC_CTYPE_SPACE, ONIGENC_CTYPE_W, ONIGENC_CTYPE_WORD, ONIGENC_CTYPE_XDIGIT, ONIGENC_GET_CTYPE_CODE_RANGE, ONIGENC_MBC_MINLEN, ScanEnv::option, parse_char_class(), parse_char_property(), parse_enclose(), parse_subexp(), OnigToken::prop, IApplyCaseFoldArg::ptail, OnigToken::repeat, REPEAT_INFINITE, set_quantifier(), ScanEnv::syntax, THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS, TK_ALT, TK_ANCHOR, TK_ANYCHAR, TK_ANYCHAR_ANYTIME, TK_BACKREF, TK_CALL, TK_CC_OPEN, TK_CHAR_PROPERTY, TK_CHAR_TYPE, TK_CODE_POINT, TK_EOT, TK_INTERVAL, TK_OP_REPEAT, TK_QUOTE_OPEN, TK_RAW_BYTE, TK_STRING, TK_SUBEXP_CLOSE, TK_SUBEXP_OPEN, type_cclass_key::type, OnigToken::type, OnigToken::u, UChar, USE_BACKREF_WITH_LEVEL, xmalloc, and xmemcpy.
Referenced by parse_branch().
static int parse_posix_bracket | ( | CClassNode * | cc, | |
UChar ** | src, | |||
UChar * | end, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 4011 of file regparse.c.
References add_ctype_to_cc(), PosixBracketEntryType::ctype, ScanEnv::enc, IS_NOT_NULL, PosixBracketEntryType::len, PosixBracketEntryType::name, NULL, ONIGENC_CTYPE_ALNUM, ONIGENC_CTYPE_ALPHA, ONIGENC_CTYPE_ASCII, ONIGENC_CTYPE_BLANK, ONIGENC_CTYPE_CNTRL, ONIGENC_CTYPE_DIGIT, ONIGENC_CTYPE_GRAPH, ONIGENC_CTYPE_LOWER, ONIGENC_CTYPE_PRINT, ONIGENC_CTYPE_PUNCT, ONIGENC_CTYPE_SPACE, ONIGENC_CTYPE_UPPER, ONIGENC_CTYPE_WORD, ONIGENC_CTYPE_XDIGIT, onigenc_step(), onigenc_strlen(), onigenc_with_ascii_strncmp(), PEND, PFETCH, POSIX_BRACKET_CHECK_LIMIT_LENGTH, POSIX_BRACKET_NAME_MIN_LEN, PPEEK, PPEEK_IS, and UChar.
Referenced by parse_char_class().
Definition at line 5636 of file regparse.c.
References fetch_token(), parse_subexp(), and TK_EOT.
Referenced by onig_parse_make_tree().
static int parse_subexp | ( | Node ** | top, | |
OnigToken * | tok, | |||
int | term, | |||
UChar ** | src, | |||
UChar * | end, | |||
ScanEnv * | env | |||
) | [static] |
Definition at line 5588 of file regparse.c.
References err, fetch_token(), NCDR, NULL, onig_node_free(), onig_node_new_alt(), parse_branch(), TK_ALT, TK_SUBEXP_CLOSE, and OnigToken::type.
Referenced by parse_enclose(), parse_exp(), and parse_regexp().
static int popular_quantifier_num | ( | QtfrNode * | q | ) | [static] |
Definition at line 2187 of file regparse.c.
References QtfrNode::greedy, IS_REPEAT_INFINITE, QtfrNode::lower, and QtfrNode::upper.
Referenced by onig_reduce_nested_quantifier(), and set_quantifier().
static int scan_env_add_mem_entry | ( | ScanEnv * | env | ) | [static] |
Definition at line 964 of file regparse.c.
References CHECK_NULL_RETURN_MEMERR, IS_NULL, ScanEnv::mem_alloc, ScanEnv::mem_nodes_dynamic, ScanEnv::mem_nodes_static, ScanEnv::num_mem, SCANENV_MEMNODES_SIZE, xmalloc, xmemcpy, and xrealloc.
Referenced by parse_enclose().
static void scan_env_clear | ( | ScanEnv * | env | ) | [static] |
Definition at line 933 of file regparse.c.
References ScanEnv::backrefed_mem, BIT_STATUS_CLEAR, ScanEnv::bt_mem_end, ScanEnv::bt_mem_start, ScanEnv::capture_history, ScanEnv::error, ScanEnv::error_end, ScanEnv::mem_alloc, ScanEnv::mem_nodes_dynamic, ScanEnv::mem_nodes_static, NULL, NULL_NODE, ScanEnv::num_call, ScanEnv::num_mem, ScanEnv::num_named, UChar, and ScanEnv::warnings_flag.
Referenced by onig_parse_make_tree().
Definition at line 997 of file regparse.c.
References ScanEnv::num_mem, and SCANENV_MEM_NODES.
Referenced by parse_enclose().
static int scan_unsigned_hexadecimal_number | ( | UChar ** | src, | |
UChar * | end, | |||
int | maxlen, | |||
OnigEncoding | enc | |||
) | [static] |
Definition at line 1625 of file regparse.c.
References INT_MAX_LIMIT, ONIGENC_IS_CODE_XDIGIT, PEND, PFETCH, UChar, and XDIGITVAL.
Referenced by fetch_token(), and fetch_token_in_cc().
static int scan_unsigned_octal_number | ( | UChar ** | src, | |
UChar * | end, | |||
int | maxlen, | |||
OnigEncoding | enc | |||
) | [static] |
Definition at line 1653 of file regparse.c.
References INT_MAX_LIMIT, ODIGITVAL, ONIGENC_IS_CODE_DIGIT, PEND, PFETCH, and UChar.
Referenced by fetch_token(), and fetch_token_in_cc().
Definition at line 4857 of file regparse.c.
References ScanEnv::enc, QtfrNode::greedy, IS_NOT_NULL, IS_QUANTIFIER_BY_NUMBER, IS_REPEAT_INFINITE, IS_SYNTAX_BV, QtfrNode::lower, NQTFR, NSTR, NT_QTFR, NT_STR, NTYPE, onig_null_warn(), onig_reduce_nested_quantifier(), onig_snprintf_with_pattern(), ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT, onig_verb_warn, ScanEnv::pattern, ScanEnv::pattern_end, popular_quantifier_num(), RQ_ASIS, RQ_DEL, str_node_can_be_split(), str_node_split_last_char(), ScanEnv::syntax, QtfrNode::target, UChar, QtfrNode::upper, and WARN_BUFSIZE.
Referenced by parse_exp().
Definition at line 318 of file regparse.c.
References st_str_end_key::end, st_str_end_key::s, and UChar.
static st_index_t str_end_hash | ( | st_data_t | xp | ) | [static] |
Definition at line 342 of file regparse.c.
References st_str_end_key::s, and UChar.
static int str_exist_check_with_esc | ( | OnigCodePoint | s[], | |
int | n, | |||
UChar * | from, | |||
UChar * | to, | |||
OnigCodePoint | bad, | |||
OnigEncoding | enc, | |||
const OnigSyntaxType * | syn | |||
) | [static] |
Definition at line 2935 of file regparse.c.
References enclen, MC_ESC, ONIGENC_MBC_TO_CODE, and UChar.
Referenced by fetch_token_in_cc().
static int str_node_can_be_split | ( | StrNode * | sn, | |
OnigEncoding | enc | |||
) | [static] |
Definition at line 1571 of file regparse.c.
References enclen, StrNode::end, and StrNode::s.
Referenced by set_quantifier().
static Node* str_node_split_last_char | ( | StrNode * | sn, | |
OnigEncoding | enc | |||
) | [static] |
Definition at line 1553 of file regparse.c.
References StrNode::end, StrNode::flag, node_new_str(), NSTR_RAW, NSTRING_SET_RAW, onigenc_get_prev_char_head(), StrNode::s, and UChar.
Referenced by set_quantifier().
static UChar* strcat_capa | ( | UChar * | dest, | |
UChar * | dest_end, | |||
const UChar * | src, | |||
const UChar * | src_end, | |||
int | capa | |||
) | [static] |
Definition at line 278 of file regparse.c.
References CHECK_NULL_RETURN, onig_strcpy(), UChar, xmalloc, and xrealloc.
Referenced by onig_node_str_cat().
static UChar* strcat_capa_from_static | ( | UChar * | dest, | |
UChar * | dest_end, | |||
const UChar * | src, | |||
const UChar * | src_end, | |||
int | capa | |||
) | [static] |
Definition at line 295 of file regparse.c.
References CHECK_NULL_RETURN, onig_strcpy(), UChar, and xmalloc.
Referenced by onig_node_str_cat().
static UChar* strdup_with_null | ( | OnigEncoding | enc, | |
UChar * | s, | |||
UChar * | end | |||
) | [static] |
Definition at line 238 of file regparse.c.
References CHECK_NULL_RETURN, ONIGENC_MBC_MINLEN, UChar, xmalloc, and xmemcpy.
Referenced by name_add().
static int type_cclass_cmp | ( | type_cclass_key * | x, | |
type_cclass_key * | y | |||
) | [static] |
Definition at line 4959 of file regparse.c.
References type_cclass_key::enc, type_cclass_key::not, and type_cclass_key::type.
static st_index_t type_cclass_hash | ( | type_cclass_key * | key | ) | [static] |
Definition at line 4967 of file regparse.c.
References type_cclass_key::enc, type_cclass_key::not, type_cclass_key::type, and UChar.
static void UNKNOWN_ESC_WARN | ( | ScanEnv * | env, | |
int | c | |||
) | [static] |
Definition at line 2899 of file regparse.c.
References onig_null_warn(), onig_syntax_warn(), onig_warn, RTEST, and ruby_verbose.
Referenced by conv_backslash_value().
FreeNode* FreeNodeList = (FreeNode* )NULL [static] |
Definition at line 1012 of file regparse.c.
OnigWarnFunc onig_verb_warn = onig_null_warn [static] |
Definition at line 88 of file regparse.c.
Referenced by onig_set_verb_warn_func(), and set_quantifier().
OnigWarnFunc onig_warn = onig_null_warn [static] |
Definition at line 82 of file regparse.c.
Referenced by CC_DUP_WARN(), CC_ESC_WARN(), CLOSE_BRACKET_WITHOUT_ESC_WARN(), onig_set_warn_func(), and UNKNOWN_ESC_WARN().
const OnigSyntaxType* OnigDefaultSyntax = ONIG_SYNTAX_RUBY |
Definition at line 75 of file regparse.c.
const OnigSyntaxType OnigSyntaxRuby |
Definition at line 38 of file regparse.c.
st_table* OnigTypeCClassTable [static] |
Definition at line 4993 of file regparse.c.
const char* const PopularQStr[] [static] |
{ "?", "*", "+", "??", "*?", "+?" }
Definition at line 4848 of file regparse.c.
const char* const ReduceQStr[] [static] |
{ "", "", "*", "*?", "??", "+ and ??", "+? and ?" }
Definition at line 4852 of file regparse.c.
enum ReduceType const ReduceTypeTable[6][6] [static] |
{ {RQ_DEL, RQ_A, RQ_A, RQ_QQ, RQ_AQ, RQ_ASIS}, {RQ_DEL, RQ_DEL, RQ_DEL, RQ_P_QQ, RQ_P_QQ, RQ_DEL}, {RQ_A, RQ_A, RQ_DEL, RQ_ASIS, RQ_P_QQ, RQ_DEL}, {RQ_DEL, RQ_AQ, RQ_AQ, RQ_DEL, RQ_AQ, RQ_AQ}, {RQ_DEL, RQ_DEL, RQ_DEL, RQ_DEL, RQ_DEL, RQ_DEL}, {RQ_ASIS, RQ_PQ_Q, RQ_DEL, RQ_AQ, RQ_AQ, RQ_DEL} }
Definition at line 2221 of file regparse.c.
struct st_hash_type type_type_cclass_hash [static] |
{ type_cclass_cmp, type_cclass_hash, }
Definition at line 4988 of file regparse.c.