regcomp.c File Reference#include "regguts.h"
#include "regc_lex.c"
#include "regc_color.c"
#include "regc_nfa.c"
#include "regc_cvec.c"
#include "regc_locale.c"
Go to the source code of this file.
|
Data Structures |
struct | vars |
Defines |
#define | INCOMPATIBLE 1 |
#define | SATISFIED 2 |
#define | COMPATIBLE 3 |
#define | NEXT() (next(v)) |
#define | SEE(t) (v->nexttype == (t)) |
#define | EAT(t) (SEE(t) && next(v)) |
#define | VISERR(vv) ((vv)->err != 0) |
#define | ISERR() VISERR(v) |
#define | VERR(vv, e) ((vv)->nexttype = EOS, ((vv)->err) ? (vv)->err : ((vv)->err = (e))) |
#define | ERR(e) VERR(v, e) |
#define | NOERR() {if (ISERR()) return;} |
#define | NOERRN() {if (ISERR()) return NULL;} |
#define | NOERRZ() {if (ISERR()) return 0;} |
#define | INSIST(c, e) ((c) ? 0 : ERR(e)) |
#define | NOTE(b) (v->re->re_info |= (b)) |
#define | EMPTYARC(x, y) newarc(v->nfa, EMPTY, 0, x, y) |
#define | EMPTY 'n' |
#define | EOS 'e' |
#define | PLAIN 'p' |
#define | DIGIT 'd' |
#define | BACKREF 'b' |
#define | COLLEL 'I' |
#define | ECLASS 'E' |
#define | CCLASS 'C' |
#define | END 'X' |
#define | RANGE 'R' |
#define | LACON 'L' |
#define | AHEAD 'a' |
#define | BEHIND 'r' |
#define | WBDRY 'w' |
#define | NWBDRY 'W' |
#define | SBEGIN 'A' |
#define | SEND 'Z' |
#define | PREFER 'P' |
#define | COLORED(a) ((a)->type == PLAIN || (a)->type == AHEAD || (a)->type == BEHIND) |
#define | CNOERR() { if (ISERR()) return freev(v, v->err); } |
#define | ARCV(t, val) newarc(v->nfa, t, val, lp, rp) |
#define | SOME 2 |
#define | INF 3 |
#define | PAIR(x, y) ((x)*4 + (y)) |
#define | REDUCE(x) ( ((x) == INFINITY) ? INF : (((x) > 1) ? SOME : (x)) ) |
Functions |
int | compile (regex_t *, const chr *, size_t, int) |
Define Documentation
#define ARCV |
( |
t, |
|
|
val |
|
) |
newarc(v->nfa, t, val, lp, rp) |
#define CNOERR |
( |
|
) |
{ if (ISERR()) return freev(v, v->err); } |
#define COLORED |
( |
a |
|
) |
((a)->type == PLAIN || (a)->type == AHEAD || (a)->type == BEHIND) |
#define EAT |
( |
t |
|
) |
(SEE(t) && next(v)) |
#define EMPTYARC |
( |
x, |
|
|
y |
|
) |
newarc(v->nfa, EMPTY, 0, x, y) |
#define ERR |
( |
e |
|
) |
VERR(v, e) |
#define INSIST |
( |
c, |
|
|
e |
|
) |
((c) ? 0 : ERR(e)) |
#define ISERR |
( |
|
) |
VISERR(v) |
#define NEXT |
( |
|
) |
(next(v)) |
#define NOERR |
( |
|
) |
{if (ISERR()) return;} |
#define NOERRN |
( |
|
) |
{if (ISERR()) return NULL;} |
#define NOERRZ |
( |
|
) |
{if (ISERR()) return 0;} |
#define NOTE |
( |
b |
|
) |
(v->re->re_info |= (b)) |
#define PAIR |
( |
x, |
|
|
y |
|
) |
((x)*4 + (y)) |
#define REDUCE |
( |
x |
|
) |
( ((x) == INFINITY) ? INF : (((x) > 1) ? SOME : (x)) ) |
#define SEE |
( |
t |
|
) |
(v->nexttype == (t)) |
#define VERR |
( |
vv, |
|
|
e |
|
) |
((vv)->nexttype = EOS, ((vv)->err) ? (vv)->err : ((vv)->err = (e))) |
#define VISERR |
( |
vv |
|
) |
((vv)->err != 0) |
Function Documentation
int compile |
( |
regex_t * |
, |
|
|
const chr * |
, |
|
|
size_t |
, |
|
|
int |
| |
|
) |
| | |
Definition at line 266 of file regcomp.c.
References AllocVars, guts::cflags, guts::cmap, CNOERR, COLORLESS, DISCARD, EOS, FreeVars, GUTSMAGIC, guts::info, guts::lacons, guts::magic, MALLOC, guts::nlacons, NOTE, guts::nsub, guts::ntree, PLAIN, regex_t::re_csize, regex_t::re_fns, regex_t::re_guts, regex_t::re_info, regex_t::re_magic, regex_t::re_nsub, REG_ADVANCED, REG_ADVF, REG_DUMP, REG_ESPACE, REG_EXPANDED, REG_EXTENDED, REG_ICASE, REG_INVARG, REG_NEWLINE, REG_NLANCH, REG_NLSTOP, REG_PROGRESS, REG_QUOTE, REG_USHORTEST, REMAGIC, guts::search, SEE, SHORTER, guts::tree, VS, and ZAPCNFA.
Generated on Wed Mar 12 12:18:27 2008 by
1.5.1
|