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 AHEAD   'a'

Definition at line 244 of file regcomp.c.

#define ARCV ( t,
val   )     newarc(v->nfa, t, val, lp, rp)

#define BACKREF   'b'

Definition at line 237 of file regcomp.c.

#define BEHIND   'r'

Definition at line 245 of file regcomp.c.

#define CCLASS   'C'

Definition at line 240 of file regcomp.c.

 
#define CNOERR (  )     { if (ISERR()) return freev(v, v->err); }

Referenced by compile().

#define COLLEL   'I'

Definition at line 238 of file regcomp.c.

#define COLORED (  )     ((a)->type == PLAIN || (a)->type == AHEAD || (a)->type == BEHIND)

Definition at line 253 of file regcomp.c.

#define COMPATIBLE   3

Definition at line 144 of file regcomp.c.

#define DIGIT   'd'

Definition at line 236 of file regcomp.c.

#define EAT (  )     (SEE(t) && next(v))

Definition at line 219 of file regcomp.c.

#define ECLASS   'E'

Definition at line 239 of file regcomp.c.

#define EMPTY   'n'

Definition at line 233 of file regcomp.c.

#define EMPTYARC ( x,
 )     newarc(v->nfa, EMPTY, 0, x, y)

Definition at line 230 of file regcomp.c.

#define END   'X'

Definition at line 241 of file regcomp.c.

#define EOS   'e'

Definition at line 234 of file regcomp.c.

Referenced by compile().

#define ERR (  )     VERR(v, e)

Definition at line 224 of file regcomp.c.

#define INCOMPATIBLE   1

Definition at line 142 of file regcomp.c.

#define INF   3

#define INSIST ( c,
 )     ((c) ? 0 : ERR(e))

Definition at line 228 of file regcomp.c.

 
#define ISERR (  )     VISERR(v)

Definition at line 221 of file regcomp.c.

#define LACON   'L'

Definition at line 243 of file regcomp.c.

 
#define NEXT (  )     (next(v))

Definition at line 217 of file regcomp.c.

 
#define NOERR (  )     {if (ISERR()) return;}

Definition at line 225 of file regcomp.c.

 
#define NOERRN (  )     {if (ISERR()) return NULL;}

Definition at line 226 of file regcomp.c.

 
#define NOERRZ (  )     {if (ISERR()) return 0;}

Definition at line 227 of file regcomp.c.

#define NOTE (  )     (v->re->re_info |= (b))

Definition at line 229 of file regcomp.c.

Referenced by compile().

#define NWBDRY   'W'

Definition at line 247 of file regcomp.c.

#define PAIR ( x,
 )     ((x)*4 + (y))

#define PLAIN   'p'

Definition at line 235 of file regcomp.c.

Referenced by compile().

#define PREFER   'P'

Definition at line 250 of file regcomp.c.

#define RANGE   'R'

Definition at line 242 of file regcomp.c.

#define REDUCE (  )     ( ((x) == INFINITY) ? INF : (((x) > 1) ? SOME : (x)) )

#define SATISFIED   2

Definition at line 143 of file regcomp.c.

#define SBEGIN   'A'

Definition at line 248 of file regcomp.c.

#define SEE (  )     (v->nexttype == (t))

Definition at line 218 of file regcomp.c.

Referenced by compile().

#define SEND   'Z'

Definition at line 249 of file regcomp.c.

#define SOME   2

#define VERR ( vv,
 )     ((vv)->nexttype = EOS, ((vv)->err) ? (vv)->err : ((vv)->err = (e)))

Definition at line 222 of file regcomp.c.

#define VISERR ( vv   )     ((vv)->err != 0)

Definition at line 220 of file regcomp.c.

#define WBDRY   'w'

Definition at line 246 of file regcomp.c.


Function Documentation



Generated on Wed Mar 12 12:18:27 2008 by  doxygen 1.5.1