GnuRegex.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  re_pattern_buffer
 
struct  re_registers
 
struct  regmatch_t
 

Macros

#define RE_BACKSLASH_ESCAPE_IN_LISTS   (1)
 
#define RE_BK_PLUS_QM   (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
 
#define RE_CHAR_CLASSES   (RE_BK_PLUS_QM << 1)
 
#define RE_CONTEXT_INDEP_ANCHORS   (RE_CHAR_CLASSES << 1)
 
#define RE_CONTEXT_INDEP_OPS   (RE_CONTEXT_INDEP_ANCHORS << 1)
 
#define RE_CONTEXT_INVALID_OPS   (RE_CONTEXT_INDEP_OPS << 1)
 
#define RE_DOT_NEWLINE   (RE_CONTEXT_INVALID_OPS << 1)
 
#define RE_DOT_NOT_NULL   (RE_DOT_NEWLINE << 1)
 
#define RE_HAT_LISTS_NOT_NEWLINE   (RE_DOT_NOT_NULL << 1)
 
#define RE_INTERVALS   (RE_HAT_LISTS_NOT_NEWLINE << 1)
 
#define RE_LIMITED_OPS   (RE_INTERVALS << 1)
 
#define RE_NEWLINE_ALT   (RE_LIMITED_OPS << 1)
 
#define RE_NO_BK_BRACES   (RE_NEWLINE_ALT << 1)
 
#define RE_NO_BK_PARENS   (RE_NO_BK_BRACES << 1)
 
#define RE_NO_BK_REFS   (RE_NO_BK_PARENS << 1)
 
#define RE_NO_BK_VBAR   (RE_NO_BK_REFS << 1)
 
#define RE_NO_EMPTY_RANGES   (RE_NO_BK_VBAR << 1)
 
#define RE_UNMATCHED_RIGHT_PAREN_ORD   (RE_NO_EMPTY_RANGES << 1)
 
#define RE_SYNTAX_EMACS   0
 
#define RE_SYNTAX_AWK
 
#define RE_SYNTAX_POSIX_AWK   (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS)
 
#define RE_SYNTAX_GREP
 
#define RE_SYNTAX_EGREP
 
#define RE_SYNTAX_POSIX_EGREP   (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
 
#define RE_SYNTAX_ED   RE_SYNTAX_POSIX_BASIC
 
#define RE_SYNTAX_SED   RE_SYNTAX_POSIX_BASIC
 
#define _RE_SYNTAX_POSIX_COMMON
 
#define RE_SYNTAX_POSIX_BASIC   (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
 
#define RE_SYNTAX_POSIX_MINIMAL_BASIC   (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
 
#define RE_SYNTAX_POSIX_EXTENDED
 
#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED
 
#define RE_DUP_MAX   ((1 << 15) - 1)
 
#define REG_EXTENDED   1
 
#define REG_ICASE   (REG_EXTENDED << 1)
 
#define REG_NEWLINE   (REG_ICASE << 1)
 
#define REG_NOSUB   (REG_NEWLINE << 1)
 
#define REG_NOTBOL   1
 
#define REG_NOTEOL   (1 << 1)
 
#define REGS_UNALLOCATED   0
 
#define REGS_REALLOCATE   1
 
#define REGS_FIXED   2
 
#define RE_EXACTN_VALUE   1
 
#define RE_NREGS   30
 

Typedefs

typedef unsigned reg_syntax_t
 
typedef struct re_pattern_buffer regex_t
 
typedef int regoff_t
 

Enumerations

enum  reg_errcode_t {
  REG_NOERROR = 0,
  REG_NOMATCH,
  REG_BADPAT,
  REG_ECOLLATE,
  REG_ECTYPE,
  REG_EESCAPE,
  REG_ESUBREG,
  REG_EBRACK,
  REG_EPAREN,
  REG_EBRACE,
  REG_BADBR,
  REG_ERANGE,
  REG_ESPACE,
  REG_BADRPT,
  REG_EEND,
  REG_ESIZE,
  REG_ERPAREN
}
 

Functions

int regcomp (regex_t *preg, const char *pattern, int cflags)
 
int regexec (const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags)
 
size_t regerror (int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
 
void regfree (regex_t *preg)
 

Macro Definition Documentation

#define _RE_SYNTAX_POSIX_COMMON
Value:
#define RE_CHAR_CLASSES
Definition: GnuRegex.h:71
#define RE_INTERVALS
Definition: GnuRegex.h:114
#define RE_DOT_NEWLINE
Definition: GnuRegex.h:101
#define RE_NO_EMPTY_RANGES
Definition: GnuRegex.h:145
#define RE_DOT_NOT_NULL
Definition: GnuRegex.h:105

Definition at line 186 of file GnuRegex.h.

#define RE_BACKSLASH_ESCAPE_IN_LISTS   (1)

Definition at line 60 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_BK_PLUS_QM   (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)

Definition at line 65 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_CHAR_CLASSES   (RE_BK_PLUS_QM << 1)

Definition at line 71 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_CONTEXT_INDEP_ANCHORS   (RE_CHAR_CLASSES << 1)

Definition at line 85 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_CONTEXT_INDEP_OPS   (RE_CONTEXT_INDEP_ANCHORS << 1)

Definition at line 93 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_CONTEXT_INVALID_OPS   (RE_CONTEXT_INDEP_OPS << 1)

Definition at line 97 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_DOT_NEWLINE   (RE_CONTEXT_INVALID_OPS << 1)

Definition at line 101 of file GnuRegex.h.

Referenced by re_compile_fastmap(), re_match_2(), regcomp(), and regex_compile().

#define RE_DOT_NOT_NULL   (RE_DOT_NEWLINE << 1)

Definition at line 105 of file GnuRegex.h.

Referenced by re_match_2().

#define RE_DUP_MAX   ((1 << 15) - 1)

Definition at line 220 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_EXACTN_VALUE   1

Definition at line 357 of file GnuRegex.h.

#define RE_HAT_LISTS_NOT_NEWLINE   (RE_DOT_NOT_NULL << 1)

Definition at line 109 of file GnuRegex.h.

Referenced by regcomp(), and regex_compile().

#define RE_INTERVALS   (RE_HAT_LISTS_NOT_NEWLINE << 1)

Definition at line 114 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_LIMITED_OPS   (RE_INTERVALS << 1)

Definition at line 118 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_NEWLINE_ALT   (RE_LIMITED_OPS << 1)

Definition at line 122 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_NO_BK_BRACES   (RE_NEWLINE_ALT << 1)

Definition at line 127 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_NO_BK_PARENS   (RE_NO_BK_BRACES << 1)

Definition at line 131 of file GnuRegex.h.

Referenced by at_begline_loc_p(), at_endline_loc_p(), and regex_compile().

#define RE_NO_BK_REFS   (RE_NO_BK_PARENS << 1)

Definition at line 135 of file GnuRegex.h.

Referenced by regex_compile().

#define RE_NO_BK_VBAR   (RE_NO_BK_REFS << 1)

Definition at line 139 of file GnuRegex.h.

Referenced by at_begline_loc_p(), at_endline_loc_p(), and regex_compile().

#define RE_NO_EMPTY_RANGES   (RE_NO_BK_VBAR << 1)

Definition at line 145 of file GnuRegex.h.

Referenced by compile_range().

#define RE_NREGS   30

Definition at line 374 of file GnuRegex.h.

Referenced by re_match_2().

#define RE_SYNTAX_AWK
Value:
#define RE_BACKSLASH_ESCAPE_IN_LISTS
Definition: GnuRegex.h:60
#define RE_NO_BK_PARENS
Definition: GnuRegex.h:131
#define RE_NO_BK_REFS
Definition: GnuRegex.h:135
#define RE_NO_EMPTY_RANGES
Definition: GnuRegex.h:145
#define RE_NO_BK_VBAR
Definition: GnuRegex.h:139
#define RE_UNMATCHED_RIGHT_PAREN_ORD
Definition: GnuRegex.h:149
#define RE_DOT_NOT_NULL
Definition: GnuRegex.h:105

Definition at line 157 of file GnuRegex.h.

#define RE_SYNTAX_ED   RE_SYNTAX_POSIX_BASIC

Definition at line 181 of file GnuRegex.h.

#define RE_SYNTAX_EGREP
Value:
#define RE_NEWLINE_ALT
Definition: GnuRegex.h:122
#define RE_NO_BK_PARENS
Definition: GnuRegex.h:131
#define RE_CHAR_CLASSES
Definition: GnuRegex.h:71
#define RE_HAT_LISTS_NOT_NEWLINE
Definition: GnuRegex.h:109
#define RE_NO_BK_VBAR
Definition: GnuRegex.h:139
#define RE_CONTEXT_INDEP_ANCHORS
Definition: GnuRegex.h:85
#define RE_CONTEXT_INDEP_OPS
Definition: GnuRegex.h:93

Definition at line 171 of file GnuRegex.h.

#define RE_SYNTAX_EMACS   0

Definition at line 155 of file GnuRegex.h.

#define RE_SYNTAX_GREP
Value:
#define RE_NEWLINE_ALT
Definition: GnuRegex.h:122
#define RE_CHAR_CLASSES
Definition: GnuRegex.h:71
#define RE_HAT_LISTS_NOT_NEWLINE
Definition: GnuRegex.h:109
#define RE_INTERVALS
Definition: GnuRegex.h:114
#define RE_BK_PLUS_QM
Definition: GnuRegex.h:65

Definition at line 166 of file GnuRegex.h.

#define RE_SYNTAX_POSIX_AWK   (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS)

Definition at line 163 of file GnuRegex.h.

#define RE_SYNTAX_POSIX_BASIC   (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)

Definition at line 190 of file GnuRegex.h.

Referenced by regcomp().

#define RE_SYNTAX_POSIX_EGREP   (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)

Definition at line 177 of file GnuRegex.h.

#define RE_SYNTAX_POSIX_EXTENDED
Value:
#define RE_NO_BK_PARENS
Definition: GnuRegex.h:131
#define RE_NO_BK_VBAR
Definition: GnuRegex.h:139
#define RE_UNMATCHED_RIGHT_PAREN_ORD
Definition: GnuRegex.h:149
#define _RE_SYNTAX_POSIX_COMMON
Definition: GnuRegex.h:186
#define RE_CONTEXT_INDEP_ANCHORS
Definition: GnuRegex.h:85
#define RE_NO_BK_BRACES
Definition: GnuRegex.h:127
#define RE_CONTEXT_INDEP_OPS
Definition: GnuRegex.h:93

Definition at line 199 of file GnuRegex.h.

Referenced by regcomp().

#define RE_SYNTAX_POSIX_MINIMAL_BASIC   (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)

Definition at line 196 of file GnuRegex.h.

#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED
Value:
#define RE_NO_BK_PARENS
Definition: GnuRegex.h:131
#define RE_NO_BK_REFS
Definition: GnuRegex.h:135
#define RE_NO_BK_VBAR
Definition: GnuRegex.h:139
#define RE_UNMATCHED_RIGHT_PAREN_ORD
Definition: GnuRegex.h:149
#define _RE_SYNTAX_POSIX_COMMON
Definition: GnuRegex.h:186
#define RE_CONTEXT_INDEP_ANCHORS
Definition: GnuRegex.h:85
#define RE_NO_BK_BRACES
Definition: GnuRegex.h:127
#define RE_CONTEXT_INVALID_OPS
Definition: GnuRegex.h:97

Definition at line 207 of file GnuRegex.h.

#define RE_SYNTAX_SED   RE_SYNTAX_POSIX_BASIC

Definition at line 183 of file GnuRegex.h.

#define RE_UNMATCHED_RIGHT_PAREN_ORD   (RE_NO_EMPTY_RANGES << 1)

Definition at line 149 of file GnuRegex.h.

Referenced by regex_compile().

#define REG_NEWLINE   (REG_ICASE << 1)

Definition at line 235 of file GnuRegex.h.

Referenced by regcomp().

#define REG_NOTBOL   1

Definition at line 248 of file GnuRegex.h.

Referenced by regexec().

#define REG_NOTEOL   (1 << 1)

Definition at line 251 of file GnuRegex.h.

Referenced by regexec().

#define REGS_FIXED   2

Definition at line 329 of file GnuRegex.h.

Referenced by re_match_2(), and regexec().

#define REGS_REALLOCATE   1

Definition at line 328 of file GnuRegex.h.

Referenced by re_match_2().

#define REGS_UNALLOCATED   0

Definition at line 327 of file GnuRegex.h.

Referenced by re_match_2().

Typedef Documentation

typedef unsigned reg_syntax_t

Definition at line 56 of file GnuRegex.h.

typedef struct re_pattern_buffer regex_t

Definition at line 353 of file GnuRegex.h.

typedef int regoff_t

Definition at line 360 of file GnuRegex.h.

Enumeration Type Documentation

Enumerator
REG_NOERROR 
REG_NOMATCH 
REG_BADPAT 
REG_ECOLLATE 
REG_ECTYPE 
REG_EESCAPE 
REG_ESUBREG 
REG_EBRACK 
REG_EPAREN 
REG_EBRACE 
REG_BADBR 
REG_ERANGE 
REG_ESPACE 
REG_BADRPT 
REG_EEND 
REG_ESIZE 
REG_ERPAREN 

Definition at line 255 of file GnuRegex.h.

Function Documentation

size_t regerror ( int  errcode,
const regex_t preg,
char *  errbuf,
size_t  errbuf_size 
)
int regexec ( const regex_t preg,
const char *  string,
size_t  nmatch,
regmatch_t  pmatch[],
int  eflags 
)
void regfree ( regex_t preg)

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors