Go to the documentation of this file.
25 #include <sys/types.h>
48 #define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
53 #define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
59 #define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
73 #define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
81 #define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
85 #define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
89 #define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
93 #define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
97 #define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
102 #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
106 #define RE_LIMITED_OPS (RE_INTERVALS << 1)
110 #define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
115 #define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
119 #define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
123 #define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
127 #define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
133 #define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
137 #define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
141 #define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
145 #define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
153 #define RE_DEBUG (RE_NO_GNU_OPS << 1)
158 #define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
162 #define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
167 #define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
171 #define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
175 #define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
187 #define RE_SYNTAX_EMACS 0
189 #define RE_SYNTAX_AWK \
190 (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
191 | RE_NO_BK_PARENS | RE_NO_BK_REFS \
192 | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
193 | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
194 | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
196 #define RE_SYNTAX_GNU_AWK \
197 ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
198 & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \
199 | RE_CONTEXT_INVALID_OPS ))
201 #define RE_SYNTAX_POSIX_AWK \
202 (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
203 | RE_INTERVALS | RE_NO_GNU_OPS)
205 #define RE_SYNTAX_GREP \
206 (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
207 | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
210 #define RE_SYNTAX_EGREP \
211 (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
212 | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
213 | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
216 #define RE_SYNTAX_POSIX_EGREP \
217 (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
218 | RE_INVALID_INTERVAL_ORD)
221 #define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
223 #define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
226 #define _RE_SYNTAX_POSIX_COMMON \
227 (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
228 | RE_INTERVALS | RE_NO_EMPTY_RANGES)
230 #define RE_SYNTAX_POSIX_BASIC \
231 (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
236 #define RE_SYNTAX_POSIX_MINIMAL_BASIC \
237 (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
239 #define RE_SYNTAX_POSIX_EXTENDED \
240 (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
241 | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
242 | RE_NO_BK_PARENS | RE_NO_BK_VBAR \
243 | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD)
247 #define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
248 (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
249 | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
250 | RE_NO_BK_PARENS | RE_NO_BK_REFS \
251 | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
261 #define RE_DUP_MAX (0x7fff)
268 #define REG_EXTENDED 1
272 #define REG_ICASE (REG_EXTENDED << 1)
277 #define REG_NEWLINE (REG_ICASE << 1)
281 #define REG_NOSUB (REG_NEWLINE << 1)
294 #define REG_NOTEOL (1 << 1)
298 #define REG_STARTEND (1 << 2)
339 #ifndef RE_TRANSLATE_TYPE
340 # define RE_TRANSLATE_TYPE unsigned char *
383 #define REGS_UNALLOCATED 0
384 #define REGS_REALLOCATE 1
465 int __length,
int __start,
int __range,
472 const char *__string1,
int __length1,
473 const char *__string2,
int __length2,
int __start,
480 int __length,
int __start,
struct re_registers *__regs);
485 const char *__string1,
int __length1,
486 const char *__string2,
int __length2,
int __start,
504 unsigned int __num_regs,
507 #if defined _REGEX_RE_COMP || defined _LIBC
510 extern char *re_comp (
const char *);
511 extern int re_exec (
const char *);
518 # if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
519 # if defined restrict || 199901L <= __STDC_VERSION__
520 # define __restrict restrict
527 #ifndef __restrict_arr
528 # if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) \
530 # define __restrict_arr __restrict
532 # define __restrict_arr
542 const char *
__restrict __string,
size_t __nmatch,
547 char *
__restrict __errbuf,
size_t __errbuf_size);
int re_compile_fastmap(struct re_pattern_buffer *__buffer)
reg_syntax_t re_set_syntax(reg_syntax_t __syntax)
unsigned fastmap_accurate
size_t regerror(int __errcode, const regex_t *__restrict __preg, char *__restrict __errbuf, size_t __errbuf_size)
int re_match(struct re_pattern_buffer *__buffer, const char *__string, int __length, int __start, struct re_registers *__regs)
#define RE_TRANSLATE_TYPE
int re_search_2(struct re_pattern_buffer *__buffer, const char *__string1, int __length1, const char *__string2, int __length2, int __start, int __range, struct re_registers *__regs, int __stop)
void re_set_registers(struct re_pattern_buffer *__buffer, struct re_registers *__regs, unsigned int __num_regs, regoff_t *__starts, regoff_t *__ends)
int re_match_2(struct re_pattern_buffer *__buffer, const char *__string1, int __length1, const char *__string2, int __length2, int __start, struct re_registers *__regs, int __stop)
RE_TRANSLATE_TYPE translate
unsigned long int active_reg_t
unsigned long int allocated
int regexec(const regex_t *__restrict __preg, const char *__restrict __string, size_t __nmatch, regmatch_t __pmatch[__restrict_arr], int __eflags)
int re_search(struct re_pattern_buffer *__buffer, const char *__string, int __length, int __start, int __range, struct re_registers *__regs)
const char * re_compile_pattern(const char *__pattern, size_t __length, struct re_pattern_buffer *__buffer)
int regcomp(regex_t *__restrict __preg, const char *__restrict __pattern, int __cflags)
reg_syntax_t re_syntax_options
unsigned long int reg_syntax_t
void regfree(regex_t *__preg)
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:37