Back to index

glibc  2.9
Classes | Defines | Typedefs | Enumerations | Functions | Variables
regex_internal.h File Reference
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <alloca.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  re_node_set
struct  re_token_t
struct  re_string_t
struct  bin_tree_t
struct  bin_tree_storage_t
struct  re_dfastate_t
struct  re_state_table_entry
struct  state_array_t
struct  re_sub_match_last_t
struct  re_sub_match_top_t
struct  re_backref_cache_entry
struct  re_match_context_t
struct  re_sift_context_t
struct  re_fail_stack_ent_t
struct  re_fail_stack_t
struct  re_dfa_t
struct  bracket_elem_t
union  re_token_t.opr
union  bracket_elem_t.opr

Defines

#define __libc_lock_define(CLASS, NAME)
#define __libc_lock_init(NAME)   do { } while (0)
#define __libc_lock_lock(NAME)   do { } while (0)
#define __libc_lock_unlock(NAME)   do { } while (0)
#define isblank(ch)   ((ch) == ' ' || (ch) == '\t')
#define gettext(msgid)   (msgid)
#define gettext_noop(String)   String
#define SIZE_MAX   ((size_t) -1)
#define BE(expr, val)   (expr)
#define inline
#define SBC_MAX   256
#define COLL_ELEM_LEN_MAX   8
#define NEWLINE_CHAR   '\n'
#define WIDE_NEWLINE_CHAR   L'\n'
#define __wctype   wctype
#define __iswctype   iswctype
#define __btowc   btowc
#define __mempcpy   mempcpy
#define __wcrtomb   wcrtomb
#define __regfree   regfree
#define attribute_hidden
#define __attribute(arg)
#define BITSET_WORD_MAX   ULONG_MAX
#define BITSET_WORD_BITS   (sizeof (bitset_word_t) * CHAR_BIT)
#define BITSET_WORDS   (SBC_MAX / BITSET_WORD_BITS)
#define bitset_set(set, i)   (set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS)
#define bitset_clear(set, i)   (set[i / BITSET_WORD_BITS] &= ~((bitset_word_t) 1 << i % BITSET_WORD_BITS))
#define bitset_contain(set, i)   (set[i / BITSET_WORD_BITS] & ((bitset_word_t) 1 << i % BITSET_WORD_BITS))
#define bitset_empty(set)   memset (set, '\0', sizeof (bitset_t))
#define bitset_set_all(set)   memset (set, '\xff', sizeof (bitset_t))
#define bitset_copy(dest, src)   memcpy (dest, src, sizeof (bitset_t))
#define PREV_WORD_CONSTRAINT   0x0001
#define PREV_NOTWORD_CONSTRAINT   0x0002
#define NEXT_WORD_CONSTRAINT   0x0004
#define NEXT_NOTWORD_CONSTRAINT   0x0008
#define PREV_NEWLINE_CONSTRAINT   0x0010
#define NEXT_NEWLINE_CONSTRAINT   0x0020
#define PREV_BEGBUF_CONSTRAINT   0x0040
#define NEXT_ENDBUF_CONSTRAINT   0x0080
#define WORD_DELIM_CONSTRAINT   0x0100
#define NOT_WORD_DELIM_CONSTRAINT   0x0200
#define EPSILON_BIT   8
#define IS_EPSILON_NODE(type)   ((type) & EPSILON_BIT)
#define internal_function
#define re_string_peek_byte(pstr, offset)   ((pstr)->mbs[(pstr)->cur_idx + offset])
#define re_string_fetch_byte(pstr)   ((pstr)->mbs[(pstr)->cur_idx++])
#define re_string_first_byte(pstr, idx)   ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF)
#define re_string_is_single_byte_char(pstr, idx)
#define re_string_eoi(pstr)   ((pstr)->stop <= (pstr)->cur_idx)
#define re_string_cur_idx(pstr)   ((pstr)->cur_idx)
#define re_string_get_buffer(pstr)   ((pstr)->mbs)
#define re_string_length(pstr)   ((pstr)->len)
#define re_string_byte_at(pstr, idx)   ((pstr)->mbs[idx])
#define re_string_skip_bytes(pstr, idx)   ((pstr)->cur_idx += (idx))
#define re_string_set_index(pstr, idx)   ((pstr)->cur_idx = (idx))
#define __libc_use_alloca(n)   0
#define re_malloc(t, n)   ((t *) malloc ((n) * sizeof (t)))
#define re_realloc(p, t, n)   ((t *) realloc (p, (n) * sizeof (t)))
#define re_free(p)   free (p)
#define BIN_TREE_STORAGE_SIZE   ((1024 - sizeof (void *)) / sizeof (bin_tree_t))
#define CONTEXT_WORD   1
#define CONTEXT_NEWLINE   (CONTEXT_WORD << 1)
#define CONTEXT_BEGBUF   (CONTEXT_NEWLINE << 1)
#define CONTEXT_ENDBUF   (CONTEXT_BEGBUF << 1)
#define IS_WORD_CONTEXT(c)   ((c) & CONTEXT_WORD)
#define IS_NEWLINE_CONTEXT(c)   ((c) & CONTEXT_NEWLINE)
#define IS_BEGBUF_CONTEXT(c)   ((c) & CONTEXT_BEGBUF)
#define IS_ENDBUF_CONTEXT(c)   ((c) & CONTEXT_ENDBUF)
#define IS_ORDINARY_CONTEXT(c)   ((c) == 0)
#define IS_WORD_CHAR(ch)   (isalnum (ch) || (ch) == '_')
#define IS_NEWLINE(ch)   ((ch) == NEWLINE_CHAR)
#define IS_WIDE_WORD_CHAR(ch)   (iswalnum (ch) || (ch) == L'_')
#define IS_WIDE_NEWLINE(ch)   ((ch) == WIDE_NEWLINE_CHAR)
#define NOT_SATISFY_PREV_CONSTRAINT(constraint, context)
#define NOT_SATISFY_NEXT_CONSTRAINT(constraint, context)
#define re_node_set_init_empty(set)   memset (set, '\0', sizeof (re_node_set))
#define re_node_set_remove(set, id)   (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1))
#define re_node_set_empty(p)   ((p)->nelem = 0)
#define re_node_set_free(set)   re_free ((set)->elems)

Typedefs

typedef unsigned long int bitset_word_t
typedef bitset_word_t bitset_t [BITSET_WORDS]
typedef bitset_word_tre_bitset_ptr_t
typedef const bitset_word_tre_const_bitset_ptr_t
typedef struct re_string_t
typedef struct re_dfa_t
typedef struct bin_tree_t
typedef struct bin_tree_storage_t
typedef struct re_dfastate_t

Enumerations

enum  re_context_type {
  INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT,
  LINE_FIRST = PREV_NEWLINE_CONSTRAINT, LINE_LAST = NEXT_NEWLINE_CONSTRAINT, BUF_FIRST = PREV_BEGBUF_CONSTRAINT, BUF_LAST = NEXT_ENDBUF_CONSTRAINT,
  WORD_DELIM = WORD_DELIM_CONSTRAINT, NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT
}
enum  re_token_type_t {
  NON_TYPE = 0, CHARACTER = 1, END_OF_RE = 2, SIMPLE_BRACKET = 3,
  OP_BACK_REF = 4, OP_PERIOD = 5, OP_OPEN_SUBEXP = EPSILON_BIT | 0, OP_CLOSE_SUBEXP = EPSILON_BIT | 1,
  OP_ALT = EPSILON_BIT | 2, OP_DUP_ASTERISK = EPSILON_BIT | 3, ANCHOR = EPSILON_BIT | 4, CONCAT = 16,
  SUBEXP = 17, OP_DUP_PLUS = 18, OP_DUP_QUESTION, OP_OPEN_BRACKET,
  OP_CLOSE_BRACKET, OP_CHARSET_RANGE, OP_OPEN_DUP_NUM, OP_CLOSE_DUP_NUM,
  OP_NON_MATCH_LIST, OP_OPEN_COLL_ELEM, OP_CLOSE_COLL_ELEM, OP_OPEN_EQUIV_CLASS,
  OP_CLOSE_EQUIV_CLASS, OP_OPEN_CHAR_CLASS, OP_CLOSE_CHAR_CLASS, OP_WORD,
  OP_NOTWORD, OP_SPACE, OP_NOTSPACE, BACK_SLASH
}
enum  bracket_elem_type {
  SB_CHAR, MB_CHAR, EQUIV_CLASS, COLL_SYM,
  CHAR_CLASS
}

Functions

static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) internal_function
static void build_upper_buffer (re_string_t *pstr) internal_function
static void re_string_translate_buffer (re_string_t *pstr) internal_function
static unsigned int re_string_context_at (const re_string_t *input, int idx, int eflags) internal_function __attribute((pure))
static void bitset_not (bitset_t set)
static void bitset_merge (bitset_t dest, const bitset_t src)
static void bitset_mask (bitset_t dest, const bitset_t src)

Variables

const char __re_error_msgid[] attribute_hidden

Class Documentation

struct re_node_set

Definition at line 182 of file regex_internal.h.

Class Members
int alloc
int * elems
int nelem
struct re_token_t

Definition at line 288 of file regex_internal.h.

Class Members
unsigned int constraint: 10
unsigned int duplicated: 1
union re_token_t opr
unsigned int opt_subexp: 1
re_token_type_t type
unsigned int word_char: 1
struct re_string_t

Definition at line 319 of file regex_internal.h.

Class Members
int bufs_len
int cur_idx
unsigned char icase
unsigned char is_utf8
int len
unsigned char map_notascii
int mb_cur_max
unsigned char * mbs
unsigned char mbs_allocated
unsigned char newline_anchor
unsigned char offsets_needed
int raw_len
const unsigned char * raw_mbs
int raw_mbs_idx
int raw_stop
int stop
unsigned int tip_context
RE_TRANSLATE_TYPE trans
int valid_len
int valid_raw_len
re_const_bitset_ptr_t word_char
unsigned char word_ops_used
struct bin_tree_t

Definition at line 438 of file regex_internal.h.

Collaboration diagram for bin_tree_t:
Class Members
struct bin_tree_t * first
struct bin_tree_t * left
struct bin_tree_t * next
int node_idx
struct bin_tree_t * parent
struct bin_tree_t * right
re_token_t token
struct bin_tree_storage_t

Definition at line 457 of file regex_internal.h.

Collaboration diagram for bin_tree_storage_t:
Class Members
bin_tree_t data
struct bin_tree_storage_t * next
struct re_dfastate_t

Definition at line 492 of file regex_internal.h.

Collaboration diagram for re_dfastate_t:
Class Members
unsigned int accept_mb: 1
unsigned int context: 4
re_node_set * entrance_nodes
unsigned int halt: 1
unsigned int has_backref: 1
unsigned int has_constraint: 1
unsigned int hash
re_node_set inveclosure
re_node_set nodes
re_node_set non_eps_nodes
struct re_dfastate_t ** trtable
struct re_dfastate_t ** word_trtable
struct re_state_table_entry

Definition at line 512 of file regex_internal.h.

Collaboration diagram for re_state_table_entry:
Class Members
int alloc
re_dfastate_t ** array
int num
struct state_array_t

Definition at line 521 of file regex_internal.h.

Collaboration diagram for state_array_t:
Class Members
int alloc
re_dfastate_t ** array
int next_idx
struct re_sub_match_last_t

Definition at line 530 of file regex_internal.h.

Collaboration diagram for re_sub_match_last_t:
Class Members
int node
state_array_t path
int str_idx
struct re_sub_match_top_t

Definition at line 541 of file regex_internal.h.

Collaboration diagram for re_sub_match_top_t:
Class Members
int alasts
re_sub_match_last_t ** lasts
int nlasts
int node
state_array_t * path
int str_idx
struct re_backref_cache_entry

Definition at line 551 of file regex_internal.h.

Class Members
unsigned short int eps_reachable_subexps_map
char more
int node
int str_idx
int subexp_from
int subexp_to
char unused
struct re_match_context_t

Definition at line 562 of file regex_internal.h.

Collaboration diagram for re_match_context_t:
Class Members
int abkref_ents
int asub_tops
struct re_backref_cache_entry * bkref_ents
const re_dfa_t * dfa
int eflags
re_string_t input
int last_node
int match_last
int max_mb_elem_len
int nbkref_ents
int nsub_tops
re_dfastate_t ** state_log
int state_log_top
re_sub_match_top_t ** sub_tops
struct re_sift_context_t

Definition at line 589 of file regex_internal.h.

Collaboration diagram for re_sift_context_t:
Class Members
int last_node
int last_str_idx
re_dfastate_t ** limited_states
re_node_set limits
re_dfastate_t ** sifted_states
struct re_fail_stack_ent_t

Definition at line 598 of file regex_internal.h.

Collaboration diagram for re_fail_stack_ent_t:
Class Members
re_node_set eps_via_nodes
int idx
int node
regmatch_t * regs
struct re_fail_stack_t

Definition at line 606 of file regex_internal.h.

Collaboration diagram for re_fail_stack_t:
Class Members
int alloc
int num
struct re_fail_stack_ent_t * stack
struct re_dfa_t

Definition at line 613 of file regex_internal.h.

Collaboration diagram for re_dfa_t:
Class Members
bitset_word_t completed_bkref_map
re_node_set * eclosures
re_node_set * edests
unsigned int has_mb_node: 1
unsigned int has_plural_match: 1
int init_node
re_dfastate_t * init_state
re_dfastate_t * init_state_begbuf
re_dfastate_t * init_state_nl
re_dfastate_t * init_state_word
re_node_set * inveclosures
unsigned int is_utf8: 1
unsigned int map_notascii: 1
int mb_cur_max
int nbackref
int * nexts
re_token_t * nodes
size_t nodes_alloc
size_t nodes_len
int * org_indices
re_bitset_ptr_t sb_char
unsigned int state_hash_mask
struct re_state_table_entry * state_table
bin_tree_t * str_tree
bin_tree_storage_t * str_tree_storage
int str_tree_storage_idx
int * subexp_map
reg_syntax_t syntax
bitset_word_t used_bkref_map
bitset_t word_char
unsigned int word_ops_used: 1
struct bracket_elem_t

Definition at line 676 of file regex_internal.h.

Class Members
union bracket_elem_t opr
bracket_elem_type type
union re_token_t.opr

Definition at line 290 of file regex_internal.h.

Class Members
unsigned char c
re_context_type ctx_type
int idx
re_bitset_ptr_t sbcset
union bracket_elem_t.opr

Definition at line 679 of file regex_internal.h.

Class Members
unsigned char ch
unsigned char * name
wchar_t wch

Define Documentation

#define __attribute (   arg)

Definition at line 128 of file regex_internal.h.

#define __btowc   btowc

Definition at line 118 of file regex_internal.h.

#define __iswctype   iswctype

Definition at line 117 of file regex_internal.h.

#define __libc_lock_define (   CLASS,
  NAME 
)

Definition at line 51 of file regex_internal.h.

#define __libc_lock_init (   NAME)    do { } while (0)

Definition at line 52 of file regex_internal.h.

#define __libc_lock_lock (   NAME)    do { } while (0)

Definition at line 53 of file regex_internal.h.

#define __libc_lock_unlock (   NAME)    do { } while (0)

Definition at line 54 of file regex_internal.h.

#define __libc_use_alloca (   n)    0

Definition at line 430 of file regex_internal.h.

#define __mempcpy   mempcpy

Definition at line 119 of file regex_internal.h.

#define __regfree   regfree

Definition at line 121 of file regex_internal.h.

#define __wcrtomb   wcrtomb

Definition at line 120 of file regex_internal.h.

#define __wctype   wctype

Definition at line 116 of file regex_internal.h.

Definition at line 122 of file regex_internal.h.

#define BE (   expr,
  val 
)    (expr)

Definition at line 101 of file regex_internal.h.

#define BIN_TREE_STORAGE_SIZE   ((1024 - sizeof (void *)) / sizeof (bin_tree_t))

Definition at line 454 of file regex_internal.h.

#define bitset_clear (   set,
  i 
)    (set[i / BITSET_WORD_BITS] &= ~((bitset_word_t) 1 << i % BITSET_WORD_BITS))

Definition at line 149 of file regex_internal.h.

#define bitset_contain (   set,
  i 
)    (set[i / BITSET_WORD_BITS] & ((bitset_word_t) 1 << i % BITSET_WORD_BITS))

Definition at line 151 of file regex_internal.h.

#define bitset_copy (   dest,
  src 
)    memcpy (dest, src, sizeof (bitset_t))

Definition at line 155 of file regex_internal.h.

#define bitset_empty (   set)    memset (set, '\0', sizeof (bitset_t))

Definition at line 153 of file regex_internal.h.

#define bitset_set (   set,
  i 
)    (set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS)

Definition at line 147 of file regex_internal.h.

#define bitset_set_all (   set)    memset (set, '\xff', sizeof (bitset_t))

Definition at line 154 of file regex_internal.h.

#define BITSET_WORD_BITS   (sizeof (bitset_word_t) * CHAR_BIT)

Definition at line 140 of file regex_internal.h.

#define BITSET_WORD_MAX   ULONG_MAX

Definition at line 138 of file regex_internal.h.

Definition at line 142 of file regex_internal.h.

#define COLL_ELEM_LEN_MAX   8

Definition at line 108 of file regex_internal.h.

#define CONTEXT_BEGBUF   (CONTEXT_NEWLINE << 1)

Definition at line 466 of file regex_internal.h.

#define CONTEXT_ENDBUF   (CONTEXT_BEGBUF << 1)

Definition at line 467 of file regex_internal.h.

#define CONTEXT_NEWLINE   (CONTEXT_WORD << 1)

Definition at line 465 of file regex_internal.h.

#define CONTEXT_WORD   1

Definition at line 464 of file regex_internal.h.

#define EPSILON_BIT   8

Definition at line 206 of file regex_internal.h.

#define gettext (   msgid)    (msgid)

Definition at line 80 of file regex_internal.h.

#define gettext_noop (   String)    String

Definition at line 86 of file regex_internal.h.

#define inline

Definition at line 102 of file regex_internal.h.

Definition at line 384 of file regex_internal.h.

#define IS_BEGBUF_CONTEXT (   c)    ((c) & CONTEXT_BEGBUF)

Definition at line 471 of file regex_internal.h.

#define IS_ENDBUF_CONTEXT (   c)    ((c) & CONTEXT_ENDBUF)

Definition at line 472 of file regex_internal.h.

#define IS_EPSILON_NODE (   type)    ((type) & EPSILON_BIT)

Definition at line 317 of file regex_internal.h.

#define IS_NEWLINE (   ch)    ((ch) == NEWLINE_CHAR)

Definition at line 476 of file regex_internal.h.

#define IS_NEWLINE_CONTEXT (   c)    ((c) & CONTEXT_NEWLINE)

Definition at line 470 of file regex_internal.h.

#define IS_ORDINARY_CONTEXT (   c)    ((c) == 0)

Definition at line 473 of file regex_internal.h.

#define IS_WIDE_NEWLINE (   ch)    ((ch) == WIDE_NEWLINE_CHAR)

Definition at line 478 of file regex_internal.h.

#define IS_WIDE_WORD_CHAR (   ch)    (iswalnum (ch) || (ch) == L'_')

Definition at line 477 of file regex_internal.h.

#define IS_WORD_CHAR (   ch)    (isalnum (ch) || (ch) == '_')

Definition at line 475 of file regex_internal.h.

#define IS_WORD_CONTEXT (   c)    ((c) & CONTEXT_WORD)

Definition at line 469 of file regex_internal.h.

#define isblank (   ch)    ((ch) == ' ' || (ch) == '\t')

Definition at line 59 of file regex_internal.h.

#define NEWLINE_CHAR   '\n'

Definition at line 111 of file regex_internal.h.

#define NEXT_ENDBUF_CONSTRAINT   0x0080

Definition at line 164 of file regex_internal.h.

#define NEXT_NEWLINE_CONSTRAINT   0x0020

Definition at line 162 of file regex_internal.h.

#define NEXT_NOTWORD_CONSTRAINT   0x0008

Definition at line 160 of file regex_internal.h.

#define NEXT_WORD_CONSTRAINT   0x0004

Definition at line 159 of file regex_internal.h.

#define NOT_SATISFY_NEXT_CONSTRAINT (   constraint,
  context 
)
Value:
((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \
  || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \
  || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \
  || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context)))

Definition at line 486 of file regex_internal.h.

#define NOT_SATISFY_PREV_CONSTRAINT (   constraint,
  context 
)
Value:
((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \
  || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \
  || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\
  || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context)))

Definition at line 480 of file regex_internal.h.

#define NOT_WORD_DELIM_CONSTRAINT   0x0200

Definition at line 166 of file regex_internal.h.

#define PREV_BEGBUF_CONSTRAINT   0x0040

Definition at line 163 of file regex_internal.h.

#define PREV_NEWLINE_CONSTRAINT   0x0010

Definition at line 161 of file regex_internal.h.

#define PREV_NOTWORD_CONSTRAINT   0x0002

Definition at line 158 of file regex_internal.h.

#define PREV_WORD_CONSTRAINT   0x0001

Definition at line 157 of file regex_internal.h.

#define re_free (   p)    free (p)

Definition at line 436 of file regex_internal.h.

#define re_malloc (   t,
  n 
)    ((t *) malloc ((n) * sizeof (t)))

Definition at line 434 of file regex_internal.h.

#define re_node_set_empty (   p)    ((p)->nelem = 0)

Definition at line 663 of file regex_internal.h.

#define re_node_set_free (   set)    re_free ((set)->elems)

Definition at line 664 of file regex_internal.h.

#define re_node_set_init_empty (   set)    memset (set, '\0', sizeof (re_node_set))

Definition at line 660 of file regex_internal.h.

#define re_node_set_remove (   set,
  id 
)    (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1))

Definition at line 661 of file regex_internal.h.

#define re_realloc (   p,
  t,
  n 
)    ((t *) realloc (p, (n) * sizeof (t)))

Definition at line 435 of file regex_internal.h.

#define re_string_byte_at (   pstr,
  idx 
)    ((pstr)->mbs[idx])

Definition at line 415 of file regex_internal.h.

#define re_string_cur_idx (   pstr)    ((pstr)->cur_idx)

Definition at line 412 of file regex_internal.h.

#define re_string_eoi (   pstr)    ((pstr)->stop <= (pstr)->cur_idx)

Definition at line 411 of file regex_internal.h.

#define re_string_fetch_byte (   pstr)    ((pstr)->mbs[(pstr)->cur_idx++])

Definition at line 404 of file regex_internal.h.

#define re_string_first_byte (   pstr,
  idx 
)    ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF)

Definition at line 406 of file regex_internal.h.

#define re_string_get_buffer (   pstr)    ((pstr)->mbs)

Definition at line 413 of file regex_internal.h.

#define re_string_is_single_byte_char (   pstr,
  idx 
)
Value:
((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \
                            || (pstr)->wcs[(idx) + 1] != WEOF))

Definition at line 408 of file regex_internal.h.

#define re_string_length (   pstr)    ((pstr)->len)

Definition at line 414 of file regex_internal.h.

#define re_string_peek_byte (   pstr,
  offset 
)    ((pstr)->mbs[(pstr)->cur_idx + offset])

Definition at line 402 of file regex_internal.h.

#define re_string_set_index (   pstr,
  idx 
)    ((pstr)->cur_idx = (idx))

Definition at line 417 of file regex_internal.h.

#define re_string_skip_bytes (   pstr,
  idx 
)    ((pstr)->cur_idx += (idx))

Definition at line 416 of file regex_internal.h.

#define SBC_MAX   256

Definition at line 106 of file regex_internal.h.

#define SIZE_MAX   ((size_t) -1)

Definition at line 91 of file regex_internal.h.

#define WIDE_NEWLINE_CHAR   L'\n'

Definition at line 112 of file regex_internal.h.

#define WORD_DELIM_CONSTRAINT   0x0100

Definition at line 165 of file regex_internal.h.


Typedef Documentation

typedef struct bin_tree_storage_t

Definition at line 462 of file regex_internal.h.

typedef struct bin_tree_t

Definition at line 452 of file regex_internal.h.

Definition at line 143 of file regex_internal.h.

typedef unsigned long int bitset_word_t

Definition at line 136 of file regex_internal.h.

Definition at line 144 of file regex_internal.h.

Definition at line 145 of file regex_internal.h.

typedef struct re_dfa_t

Definition at line 378 of file regex_internal.h.

typedef struct re_dfastate_t

Definition at line 510 of file regex_internal.h.

typedef struct re_string_t

Definition at line 374 of file regex_internal.h.


Enumeration Type Documentation

Enumerator:
SB_CHAR 
MB_CHAR 
EQUIV_CLASS 
COLL_SYM 
CHAR_CLASS 

Definition at line 667 of file regex_internal.h.

Enumerator:
NON_TYPE 
CHARACTER 
END_OF_RE 
SIMPLE_BRACKET 
OP_BACK_REF 
OP_PERIOD 
OP_OPEN_SUBEXP 
OP_CLOSE_SUBEXP 
OP_ALT 
OP_DUP_ASTERISK 
ANCHOR 
CONCAT 
SUBEXP 
OP_DUP_PLUS 
OP_DUP_QUESTION 
OP_OPEN_BRACKET 
OP_CLOSE_BRACKET 
OP_CHARSET_RANGE 
OP_OPEN_DUP_NUM 
OP_CLOSE_DUP_NUM 
OP_NON_MATCH_LIST 
OP_OPEN_COLL_ELEM 
OP_CLOSE_COLL_ELEM 
OP_OPEN_EQUIV_CLASS 
OP_CLOSE_EQUIV_CLASS 
OP_OPEN_CHAR_CLASS 
OP_CLOSE_CHAR_CLASS 
OP_WORD 
OP_NOTWORD 
OP_SPACE 
OP_NOTSPACE 
BACK_SLASH 

Definition at line 189 of file regex_internal.h.

{
  NON_TYPE = 0,

  /* Node type, These are used by token, node, tree.  */
  CHARACTER = 1,
  END_OF_RE = 2,
  SIMPLE_BRACKET = 3,
  OP_BACK_REF = 4,
  OP_PERIOD = 5,
#ifdef RE_ENABLE_I18N
  COMPLEX_BRACKET = 6,
  OP_UTF8_PERIOD = 7,
#endif /* RE_ENABLE_I18N */

  /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used
     when the debugger shows values of this enum type.  */
#define EPSILON_BIT 8
  OP_OPEN_SUBEXP = EPSILON_BIT | 0,
  OP_CLOSE_SUBEXP = EPSILON_BIT | 1,
  OP_ALT = EPSILON_BIT | 2,
  OP_DUP_ASTERISK = EPSILON_BIT | 3,
  ANCHOR = EPSILON_BIT | 4,

  /* Tree type, these are used only by tree. */
  CONCAT = 16,
  SUBEXP = 17,

  /* Token type, these are used only by token.  */
  OP_DUP_PLUS = 18,
  OP_DUP_QUESTION,
  OP_OPEN_BRACKET,
  OP_CLOSE_BRACKET,
  OP_CHARSET_RANGE,
  OP_OPEN_DUP_NUM,
  OP_CLOSE_DUP_NUM,
  OP_NON_MATCH_LIST,
  OP_OPEN_COLL_ELEM,
  OP_CLOSE_COLL_ELEM,
  OP_OPEN_EQUIV_CLASS,
  OP_CLOSE_EQUIV_CLASS,
  OP_OPEN_CHAR_CLASS,
  OP_CLOSE_CHAR_CLASS,
  OP_WORD,
  OP_NOTWORD,
  OP_SPACE,
  OP_NOTSPACE,
  BACK_SLASH

} re_token_type_t;

Function Documentation

static void bitset_mask ( bitset_t  dest,
const bitset_t  src 
) [inline, static]

Definition at line 706 of file regex_internal.h.

{
  int bitset_i;
  for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i)
    dest[bitset_i] &= src[bitset_i];
}

Here is the caller graph for this function:

static void bitset_merge ( bitset_t  dest,
const bitset_t  src 
) [inline, static]

Definition at line 698 of file regex_internal.h.

{
  int bitset_i;
  for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i)
    dest[bitset_i] |= src[bitset_i];
}

Here is the caller graph for this function:

static void bitset_not ( bitset_t  set) [inline, static]

Definition at line 690 of file regex_internal.h.

{
  int bitset_i;
  for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i)
    set[bitset_i] = ~set[bitset_i];
}

Here is the caller graph for this function:

static void build_upper_buffer ( re_string_t pstr) [static]
static unsigned int re_string_context_at ( const re_string_t input,
int  idx,
int  eflags 
) [static]
static reg_errcode_t re_string_realloc_buffers ( re_string_t pstr,
int  new_buf_len 
) [static]
static void re_string_translate_buffer ( re_string_t pstr) [static]

Variable Documentation

const size_t __re_error_msgid_idx [] attribute_hidden

Definition at line 132 of file regex_internal.h.