Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Typedefs | Enumerations | Functions | Variables
xregex2.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

Defines

#define RE_BACKSLASH_ESCAPE_IN_LISTS   ((unsigned long int) 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_NO_POSIX_BACKTRACKING   (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
#define RE_NO_GNU_OPS   (RE_NO_POSIX_BACKTRACKING << 1)
#define RE_DEBUG   (RE_NO_GNU_OPS << 1)
#define RE_INVALID_INTERVAL_ORD   (RE_DEBUG << 1)
#define RE_SYNTAX_EMACS   0
#define RE_SYNTAX_AWK
#define RE_SYNTAX_GNU_AWK
#define RE_SYNTAX_POSIX_AWK
#define RE_SYNTAX_GREP
#define RE_SYNTAX_EGREP
#define RE_SYNTAX_POSIX_EGREP
#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   (0x7fff)
#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 RE_TRANSLATE_TYPE   char *
#define REGS_UNALLOCATED   0
#define REGS_REALLOCATE   1
#define REGS_FIXED   2
#define RE_NREGS   30
#define __restrict
#define __restrict_arr

Typedefs

typedef long int s_reg_t
typedef unsigned long int active_reg_t
typedef unsigned long int reg_syntax_t
typedef struct re_pattern_buffer
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

reg_syntax_t re_set_syntax (reg_syntax_t syntax)
const char * re_compile_pattern (const char *pattern, size_t length, struct re_pattern_buffer *buffer)
int re_compile_fastmap (struct re_pattern_buffer *buffer)
int re_search (struct re_pattern_buffer *buffer, const char *string, int length, int start, int range, struct re_registers *regs)
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)
int re_match (struct re_pattern_buffer *buffer, const char *string, int length, int start, struct re_registers *regs)
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)
void re_set_registers (struct re_pattern_buffer *buffer, struct re_registers *regs, unsigned num_regs, regoff_t *starts, regoff_t *ends)
int regcomp (regex_t *__restrict __preg, const char *__restrict __pattern, int __cflags)
int regexec (const regex_t *__restrict __preg, const char *__restrict __string, size_t __nmatch, regmatch_t __pmatch[__restrict_arr], int __eflags)
size_t regerror (int __errcode, const regex_t *__preg, char *__errbuf, size_t __errbuf_size)
void regfree (regex_t *__preg)

Variables

reg_syntax_t re_syntax_options

Class Documentation

struct re_pattern_buffer

Definition at line 331 of file xregex2.h.

Class Members
unsigned long int allocated
unsigned char * buffer
unsigned can_be_null: 1
char * fastmap
unsigned fastmap_accurate: 1
unsigned newline_anchor: 1
unsigned no_sub: 1
unsigned not_bol: 1
unsigned not_eol: 1
size_t re_nsub
unsigned regs_allocated: 2
reg_syntax_t syntax
RE_TRANSLATE_TYPE translate
unsigned long int used
struct re_registers

Definition at line 407 of file xregex2.h.

Class Members
regoff_t * end
unsigned num_regs
regoff_t * start
struct regmatch_t

Definition at line 426 of file xregex2.h.

Class Members
regoff_t rm_eo
regoff_t rm_so

Define Documentation

#define __restrict

Definition at line 519 of file xregex2.h.

#define __restrict_arr

Definition at line 528 of file xregex2.h.

Definition at line 58 of file xregex2.h.

Definition at line 63 of file xregex2.h.

#define RE_CHAR_CLASSES   (RE_BK_PLUS_QM << 1)

Definition at line 69 of file xregex2.h.

Definition at line 83 of file xregex2.h.

Definition at line 91 of file xregex2.h.

Definition at line 95 of file xregex2.h.

#define RE_DEBUG   (RE_NO_GNU_OPS << 1)

Definition at line 163 of file xregex2.h.

Definition at line 99 of file xregex2.h.

#define RE_DOT_NOT_NULL   (RE_DOT_NEWLINE << 1)

Definition at line 103 of file xregex2.h.

#define RE_DUP_MAX   (0x7fff)

Definition at line 253 of file xregex2.h.

Definition at line 107 of file xregex2.h.

Definition at line 112 of file xregex2.h.

#define RE_INVALID_INTERVAL_ORD   (RE_DEBUG << 1)

Definition at line 168 of file xregex2.h.

#define RE_LIMITED_OPS   (RE_INTERVALS << 1)

Definition at line 116 of file xregex2.h.

#define RE_NEWLINE_ALT   (RE_LIMITED_OPS << 1)

Definition at line 120 of file xregex2.h.

#define RE_NO_BK_BRACES   (RE_NEWLINE_ALT << 1)

Definition at line 125 of file xregex2.h.

#define RE_NO_BK_PARENS   (RE_NO_BK_BRACES << 1)

Definition at line 129 of file xregex2.h.

#define RE_NO_BK_REFS   (RE_NO_BK_PARENS << 1)

Definition at line 133 of file xregex2.h.

#define RE_NO_BK_VBAR   (RE_NO_BK_REFS << 1)

Definition at line 137 of file xregex2.h.

#define RE_NO_EMPTY_RANGES   (RE_NO_BK_VBAR << 1)

Definition at line 143 of file xregex2.h.

Definition at line 155 of file xregex2.h.

Definition at line 151 of file xregex2.h.

#define RE_NREGS   30

Definition at line 419 of file xregex2.h.

#define RE_SYNTAX_AWK

Definition at line 213 of file xregex2.h.

#define RE_SYNTAX_EGREP
#define RE_SYNTAX_EMACS   0

Definition at line 180 of file xregex2.h.

#define RE_SYNTAX_GREP

Definition at line 222 of file xregex2.h.

Definition at line 228 of file xregex2.h.

Definition at line 215 of file xregex2.h.

#define RE_TRANSLATE_TYPE   char *

Definition at line 328 of file xregex2.h.

Definition at line 147 of file xregex2.h.

#define REG_EXTENDED   1

Definition at line 260 of file xregex2.h.

#define REG_ICASE   (REG_EXTENDED << 1)

Definition at line 264 of file xregex2.h.

#define REG_NEWLINE   (REG_ICASE << 1)

Definition at line 269 of file xregex2.h.

#define REG_NOSUB   (REG_NEWLINE << 1)

Definition at line 273 of file xregex2.h.

#define REG_NOTBOL   1

Definition at line 283 of file xregex2.h.

#define REG_NOTEOL   (1 << 1)

Definition at line 286 of file xregex2.h.

#define REGS_FIXED   2

Definition at line 375 of file xregex2.h.

#define REGS_REALLOCATE   1

Definition at line 374 of file xregex2.h.

#define REGS_UNALLOCATED   0

Definition at line 373 of file xregex2.h.


Typedef Documentation

Definition at line 47 of file xregex2.h.

Definition at line 399 of file xregex2.h.

Definition at line 54 of file xregex2.h.

typedef int regoff_t

Definition at line 402 of file xregex2.h.

typedef long int s_reg_t

Definition at line 46 of file xregex2.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 291 of file xregex2.h.

{
#ifdef _XOPEN_SOURCE
  REG_ENOSYS = -1,   /* This will never happen for this implementation.  */
#endif

  REG_NOERROR = 0,   /* Success.  */
  REG_NOMATCH,              /* Didn't find a match (for regexec).  */

  /* POSIX regcomp return error codes.  (In the order listed in the
     standard.)  */
  REG_BADPAT,        /* Invalid pattern.  */
  REG_ECOLLATE,             /* Not implemented.  */
  REG_ECTYPE,        /* Invalid character class name.  */
  REG_EESCAPE,              /* Trailing backslash.  */
  REG_ESUBREG,              /* Invalid back reference.  */
  REG_EBRACK,        /* Unmatched left bracket.  */
  REG_EPAREN,        /* Parenthesis imbalance.  */
  REG_EBRACE,        /* Unmatched \{.  */
  REG_BADBR,         /* Invalid contents of \{\}.  */
  REG_ERANGE,        /* Invalid range end.  */
  REG_ESPACE,        /* Ran out of memory.  */
  REG_BADRPT,        /* No preceding re for repetition op.  */

  /* Error codes we've added.  */
  REG_EEND,          /* Premature end.  */
  REG_ESIZE,         /* Compiled pattern bigger than 2^16 bytes.  */
  REG_ERPAREN        /* Unmatched ) or \); not returned from regcomp.  */
} reg_errcode_t;

Function Documentation

const char* re_compile_pattern ( const char *  pattern,
size_t  length,
struct re_pattern_buffer buffer 
)
int re_match ( struct re_pattern_buffer buffer,
const char *  string,
int  length,
int  start,
struct re_registers regs 
)
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 
)
int re_search ( struct re_pattern_buffer buffer,
const char *  string,
int  length,
int  start,
int  range,
struct re_registers regs 
)
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  num_regs,
regoff_t starts,
regoff_t ends 
)
int regcomp ( regex_t *__restrict  __preg,
const char *__restrict  __pattern,
int  __cflags 
)

Here is the caller graph for this function:

size_t regerror ( int  __errcode,
const regex_t *  __preg,
char *  __errbuf,
size_t  __errbuf_size 
)

Here is the caller graph for this function:

int regexec ( const regex_t *__restrict  __preg,
const char *__restrict  __string,
size_t  __nmatch,
regmatch_t  __pmatch[__restrict_arr],
int  __eflags 
)

Here is the caller graph for this function:

void regfree ( regex_t *  __preg)

Here is the caller graph for this function:


Variable Documentation