Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rz_regex_t |
struct | rz_regmatch_t |
Macros | |
#define | RZ_REGEX_BASIC 0000 |
#define | RZ_REGEX_EXTENDED 0001 |
#define | RZ_REGEX_ICASE 0002 |
#define | RZ_REGEX_NOSUB 0004 |
#define | RZ_REGEX_NEWLINE 0010 |
#define | RZ_REGEX_NOSPEC 0020 |
#define | RZ_REGEX_PEND 0040 |
#define | RZ_REGEX_DUMP 0200 |
#define | RZ_REGEX_ENOSYS (-1) /* Reserved */ |
#define | RZ_REGEX_NOMATCH 1 |
#define | RZ_REGEX_BADPAT 2 |
#define | RZ_REGEX_ECOLLATE 3 |
#define | RZ_REGEX_ECTYPE 4 |
#define | RZ_REGEX_EESCAPE 5 |
#define | RZ_REGEX_ESUBREG 6 |
#define | RZ_REGEX_EBRACK 7 |
#define | RZ_REGEX_EPAREN 8 |
#define | RZ_REGEX_EBRACE 9 |
#define | RZ_REGEX_BADBR 10 |
#define | RZ_REGEX_ERANGE 11 |
#define | RZ_REGEX_ESPACE 12 |
#define | RZ_REGEX_BADRPT 13 |
#define | RZ_REGEX_EMPTY 14 |
#define | RZ_REGEX_ASSERT 15 |
#define | RZ_REGEX_INVARG 16 |
#define | RZ_REGEX_ILLSEQ 17 |
#define | RZ_REGEX_ATOI 255 /* convert name to number (!) */ |
#define | RZ_REGEX_ITOA 0400 /* convert number to name (!) */ |
#define | RZ_REGEX_NOTBOL 00001 |
#define | RZ_REGEX_NOTEOL 00002 |
#define | RZ_REGEX_STARTEND 00004 |
#define | RZ_REGEX_TRACE 00400 /* tracing of execution */ |
#define | RZ_REGEX_LARGE 01000 /* force large representation */ |
#define | RZ_REGEX_BACKR 02000 /* force use of backref code */ |
Typedefs | |
typedef struct rz_regex_t | RzRegex |
typedef struct rz_regmatch_t | RzRegexMatch |
Functions | |
RZ_API RzRegex * | rz_regex_new (const char *pattern, const char *cflags) |
RZ_API int | rz_regex_match (const char *pattern, const char *flags, const char *text) |
RZ_API RzList * | rz_regex_get_match_list (const char *pattern, const char *flags, const char *text) |
RZ_API int | rz_regex_flags (const char *flags) |
RZ_API int | rz_regex_comp (RzRegex *, const char *, int) |
RZ_API size_t | rz_regex_error (int, const RzRegex *, char *, size_t) |
RZ_API bool | rz_regex_check (const RzRegex *rr, const char *str) |
RZ_API int | rz_regex_exec (const RzRegex *preg, const char *string, size_t nmatch, RzRegexMatch __pmatch[], int eflags) |
RZ_API void | rz_regex_free (RzRegex *) |
RZ_API void | rz_regex_fini (RzRegex *) |
#define RZ_REGEX_ASSERT 15 |
Definition at line 47 of file rz_regex.h.
Definition at line 50 of file rz_regex.h.
Definition at line 59 of file rz_regex.h.
#define RZ_REGEX_BADBR 10 |
Definition at line 42 of file rz_regex.h.
#define RZ_REGEX_BADPAT 2 |
Definition at line 34 of file rz_regex.h.
#define RZ_REGEX_BADRPT 13 |
Definition at line 45 of file rz_regex.h.
#define RZ_REGEX_BASIC 0000 |
Definition at line 22 of file rz_regex.h.
#define RZ_REGEX_DUMP 0200 |
Definition at line 29 of file rz_regex.h.
#define RZ_REGEX_EBRACE 9 |
Definition at line 41 of file rz_regex.h.
#define RZ_REGEX_EBRACK 7 |
Definition at line 39 of file rz_regex.h.
#define RZ_REGEX_ECOLLATE 3 |
Definition at line 35 of file rz_regex.h.
#define RZ_REGEX_ECTYPE 4 |
Definition at line 36 of file rz_regex.h.
#define RZ_REGEX_EESCAPE 5 |
Definition at line 37 of file rz_regex.h.
#define RZ_REGEX_EMPTY 14 |
Definition at line 46 of file rz_regex.h.
#define RZ_REGEX_ENOSYS (-1) /* Reserved */ |
Definition at line 32 of file rz_regex.h.
#define RZ_REGEX_EPAREN 8 |
Definition at line 40 of file rz_regex.h.
#define RZ_REGEX_ERANGE 11 |
Definition at line 43 of file rz_regex.h.
#define RZ_REGEX_ESPACE 12 |
Definition at line 44 of file rz_regex.h.
#define RZ_REGEX_ESUBREG 6 |
Definition at line 38 of file rz_regex.h.
#define RZ_REGEX_EXTENDED 0001 |
Definition at line 23 of file rz_regex.h.
#define RZ_REGEX_ICASE 0002 |
Definition at line 24 of file rz_regex.h.
#define RZ_REGEX_ILLSEQ 17 |
Definition at line 49 of file rz_regex.h.
#define RZ_REGEX_INVARG 16 |
Definition at line 48 of file rz_regex.h.
Definition at line 51 of file rz_regex.h.
#define RZ_REGEX_LARGE 01000 /* force large representation */ |
Definition at line 58 of file rz_regex.h.
#define RZ_REGEX_NEWLINE 0010 |
Definition at line 26 of file rz_regex.h.
#define RZ_REGEX_NOMATCH 1 |
Definition at line 33 of file rz_regex.h.
#define RZ_REGEX_NOSPEC 0020 |
Definition at line 27 of file rz_regex.h.
#define RZ_REGEX_NOSUB 0004 |
Definition at line 25 of file rz_regex.h.
#define RZ_REGEX_NOTBOL 00001 |
Definition at line 54 of file rz_regex.h.
#define RZ_REGEX_NOTEOL 00002 |
Definition at line 55 of file rz_regex.h.
#define RZ_REGEX_PEND 0040 |
Definition at line 28 of file rz_regex.h.
#define RZ_REGEX_STARTEND 00004 |
Definition at line 56 of file rz_regex.h.
#define RZ_REGEX_TRACE 00400 /* tracing of execution */ |
Definition at line 57 of file rz_regex.h.
typedef struct rz_regex_t RzRegex |
typedef struct rz_regmatch_t RzRegexMatch |
Definition at line 138 of file regexec.c.
References NULL, rz_regex_t::re_flags, rz_regex_exec(), and cmd_descs_generate::str.
Referenced by test_or().
Definition at line 258 of file regcomp.c.
References BAD, calloc(), categorize(), EMIT, findmust(), free(), g, GOODFLAGS, i, len, MAGIC1, MAGIC2, maxlen, memset(), NC, NPAREN, NULL, OEND, OUT, p, p_bre(), p_ere(), p_str(), pluscount(), rz_regex_t::re_endp, rz_regex_t::re_flags, rz_regex_t::re_g, rz_regex_t::re_magic, rz_regex_t::re_nsub, RZ_REGEX_ASSERT, RZ_REGEX_ESPACE, RZ_REGEX_EXTENDED, rz_regex_fini(), RZ_REGEX_INVARG, RZ_REGEX_NOSPEC, RZ_REGEX_PEND, SETERROR, stripsnug(), and THERE.
Referenced by _main(), check_fmt(), magiccheck(), rz_regex_get_match_list(), rz_regex_match(), rz_regex_new(), and rz_search_regexp_update().
RZ_API size_t rz_regex_error | ( | int | errcode, |
const RzRegex * | preg, | ||
char * | errbuf, | ||
size_t | errbuf_size | ||
) |
Definition at line 78 of file regerror.c.
References len, r, regatoi(), rerrs, RZ_REGEX_ATOI, RZ_REGEX_ITOA, s, snprintf, and STRLCPY.
Referenced by check_fmt(), and magiccheck().
RZ_API int rz_regex_exec | ( | const RzRegex * | preg, |
const char * | string, | ||
size_t | nmatch, | ||
RzRegexMatch | __pmatch[], | ||
int | eflags | ||
) |
Definition at line 149 of file regexec.c.
References BAD, CHAR_BIT, g, GOODFLAGS, MAGIC1, MAGIC2, rz_regex_t::re_g, rz_regex_t::re_magic, RZ_REGEX_ASSERT, RZ_REGEX_BADPAT, RZ_REGEX_LARGE, and states1.
Referenced by _main(), check_fmt(), find_e_opts(), magiccheck(), main(), pager_all_matches(), rz_asm_tokenize_asm_regex(), rz_core_asm_strsearch(), rz_regex_check(), rz_regex_get_match_list(), rz_regex_match(), rz_search_regexp_update(), str_split_list_common_regex(), and test_or().
Definition at line 226 of file regcomp.c.
References free(), g, MAGIC1, MAGIC2, rz_regex_t::re_g, and rz_regex_t::re_magic.
Referenced by check_fmt(), magiccheck(), rz_regex_comp(), rz_regex_free(), rz_regex_get_match_list(), rz_regex_match(), and rz_search_regexp_update().
Definition at line 197 of file regcomp.c.
References f, flags, RZ_REGEX_DUMP, RZ_REGEX_EXTENDED, RZ_REGEX_ICASE, RZ_REGEX_NEWLINE, RZ_REGEX_NOSPEC, RZ_REGEX_NOSUB, and RZ_REGEX_PEND.
Referenced by rz_regex_get_match_list(), rz_regex_match(), and rz_regex_new().
Definition at line 249 of file regcomp.c.
References free(), and rz_regex_fini().
Referenced by _main(), find_e_opts(), main(), rz_asm_token_pattern_free(), rz_cons_less_str(), rz_core_asm_strsearch(), rz_str_split_duplist_n_regex(), rz_str_split_list_regex(), and test_or().
RZ_API RzList* rz_regex_get_match_list | ( | const char * | pattern, |
const char * | flags, | ||
const char * | text | ||
) |
Definition at line 155 of file regcomp.c.
References eprintf, flags, free(), list(), match, NULL, rz_list_append(), rz_list_newf(), RZ_NEWS0, rz_regex_comp(), rz_regex_exec(), rz_regex_fini(), rz_regex_flags(), RZ_REGEX_STARTEND, rz_str_ncpy(), and create_tags_rz::text.
Referenced by print_diff(), and rz_test_cmp_cmd_output().
Definition at line 142 of file regcomp.c.
References eprintf, flags, rz_regex_comp(), rz_regex_exec(), rz_regex_fini(), rz_regex_flags(), and create_tags_rz::text.
Referenced by classdump_objc(), construct_rop_gadget(), is_lea(), step_until_inst(), and test_or().
Definition at line 183 of file regcomp.c.
References flags, memcpy(), NULL, r, RZ_NEW, rz_regex_comp(), rz_regex_flags(), and rz_return_val_if_fail.
Referenced by find_e_opts(), main(), rz_cons_less_str(), rz_core_asm_strsearch(), rz_str_split_duplist_n_regex(), rz_str_split_list_regex(), and test_or().