G:/ScriptBasic/source/extensions/re/regexec.c File Reference

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <ctype.h>
#include "regex.h"
#include "utils.h"
#include "regex2.h"
#include "engine.ci"

Go to the source code of this file.

Defines

#define states   long
#define states1   states
#define CLEAR(v)   ((v) = 0)
#define SET0(v, n)   ((v) &= ~(1 << (n)))
#define SET1(v, n)   ((v) |= 1 << (n))
#define ISSET(v, n)   ((v) & (1 << (n)))
#define ASSIGN(d, s)   ((d) = (s))
#define EQ(a, b)   ((a) == (b))
#define STATEVARS   int dummy
#define STATESETUP(m, n)
#define STATETEARDOWN(m)
#define SETUP(v)   ((v) = 0)
#define onestate   int
#define INIT(o, n)   ((o) = (unsigned)1 << (n))
#define INC(o)   ((o) <<= 1)
#define ISSTATEIN(v, o)   ((v) & (o))
#define FWD(dst, src, n)   ((dst) |= ((unsigned)(src)&(here)) << (n))
#define BACK(dst, src, n)   ((dst) |= ((unsigned)(src)&(here)) >> (n))
#define ISSETBACK(v, n)   ((v) & ((unsigned)here >> (n)))
#define SNAMES
#define states   char *
#define CLEAR(v)   memset(v, 0, m->g->nstates)
#define SET0(v, n)   ((v)[n] = 0)
#define SET1(v, n)   ((v)[n] = 1)
#define ISSET(v, n)   ((v)[n])
#define ASSIGN(d, s)   memcpy(d, s, m->g->nstates)
#define EQ(a, b)   (memcmp(a, b, m->g->nstates) == 0)
#define STATEVARS   int vn; char *space
#define STATESETUP(m, nv)
#define STATETEARDOWN(m)   { free((m)->space); }
#define SETUP(v)   ((v) = &m->space[m->vn++ * m->g->nstates])
#define onestate   int
#define INIT(o, n)   ((o) = (n))
#define INC(o)   ((o)++)
#define ISSTATEIN(v, o)   ((v)[o])
#define FWD(dst, src, n)   ((dst)[here+(n)] |= (src)[here])
#define BACK(dst, src, n)   ((dst)[here-(n)] |= (src)[here])
#define ISSETBACK(v, n)   ((v)[here - (n)])
#define LNAMES
#define GOODFLAGS(f)   ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND))

Functions

int __stdcall regexec (regex_t *preg, const char *string, size_t nmatch, pmatch, int eflags) const

Variables

static int nope = 0


Define Documentation

#define ASSIGN d,
s   )     memcpy(d, s, m->g->nstates)
 

Definition at line 118 of file regexec.c.

#define ASSIGN d,
s   )     ((d) = (s))
 

Definition at line 118 of file regexec.c.

#define BACK dst,
src,
 )     ((dst)[here-(n)] |= (src)[here])
 

Definition at line 133 of file regexec.c.

#define BACK dst,
src,
 )     ((dst) |= ((unsigned)(src)&(here)) >> (n))
 

Definition at line 133 of file regexec.c.

#define CLEAR  )     memset(v, 0, m->g->nstates)
 

Definition at line 114 of file regexec.c.

#define CLEAR  )     ((v) = 0)
 

Definition at line 114 of file regexec.c.

#define EQ a,
 )     (memcmp(a, b, m->g->nstates) == 0)
 

Definition at line 119 of file regexec.c.

#define EQ a,
 )     ((a) == (b))
 

Definition at line 119 of file regexec.c.

#define FWD dst,
src,
 )     ((dst)[here+(n)] |= (src)[here])
 

Definition at line 132 of file regexec.c.

#define FWD dst,
src,
 )     ((dst) |= ((unsigned)(src)&(here)) << (n))
 

Definition at line 132 of file regexec.c.

#define GOODFLAGS  )     ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND))
 

#define INC  )     ((o)++)
 

Definition at line 128 of file regexec.c.

#define INC  )     ((o) <<= 1)
 

Definition at line 128 of file regexec.c.

#define INIT o,
 )     ((o) = (n))
 

Definition at line 127 of file regexec.c.

#define INIT o,
 )     ((o) = (unsigned)1 << (n))
 

Definition at line 127 of file regexec.c.

#define ISSET v,
 )     ((v)[n])
 

Definition at line 117 of file regexec.c.

#define ISSET v,
 )     ((v) & (1 << (n)))
 

Definition at line 117 of file regexec.c.

#define ISSETBACK v,
 )     ((v)[here - (n)])
 

Definition at line 134 of file regexec.c.

#define ISSETBACK v,
 )     ((v) & ((unsigned)here >> (n)))
 

Definition at line 134 of file regexec.c.

#define ISSTATEIN v,
 )     ((v)[o])
 

Definition at line 129 of file regexec.c.

#define ISSTATEIN v,
 )     ((v) & (o))
 

Definition at line 129 of file regexec.c.

#define LNAMES
 

Definition at line 136 of file regexec.c.

#define onestate   int
 

Definition at line 126 of file regexec.c.

#define onestate   int
 

Definition at line 126 of file regexec.c.

#define SET0 v,
 )     ((v)[n] = 0)
 

Definition at line 115 of file regexec.c.

#define SET0 v,
 )     ((v) &= ~(1 << (n)))
 

Definition at line 115 of file regexec.c.

#define SET1 v,
 )     ((v)[n] = 1)
 

Definition at line 116 of file regexec.c.

#define SET1 v,
 )     ((v) |= 1 << (n))
 

Definition at line 116 of file regexec.c.

#define SETUP  )     ((v) = &m->space[m->vn++ * m->g->nstates])
 

Definition at line 125 of file regexec.c.

#define SETUP  )     ((v) = 0)
 

Definition at line 125 of file regexec.c.

#define SNAMES
 

Definition at line 87 of file regexec.c.

#define states   char *
 

Definition at line 113 of file regexec.c.

#define states   long
 

Definition at line 113 of file regexec.c.

#define states1   states
 

Definition at line 66 of file regexec.c.

Referenced by regexec().

#define STATESETUP m,
nv   ) 
 

Value:

{ (m)->space = malloc((nv)*(m)->g->nstates); \
                                if ((m)->space == NULL) return(REG_ESPACE); \
                                (m)->vn = 0; }

Definition at line 121 of file regexec.c.

#define STATESETUP m,
 ) 
 

Definition at line 121 of file regexec.c.

#define STATETEARDOWN  )     { free((m)->space); }
 

Definition at line 124 of file regexec.c.

#define STATETEARDOWN  ) 
 

Definition at line 124 of file regexec.c.

#define STATEVARS   int vn; char *space
 

Definition at line 120 of file regexec.c.

#define STATEVARS   int dummy
 

Definition at line 120 of file regexec.c.


Function Documentation

int __stdcall regexec regex_t preg,
const char *  string,
size_t  nmatch,
pmatch  ,
int  eflags
const
 

Definition at line 156 of file regexec.c.

References assert, BAD, GOODFLAGS, re_guts::iflags, re_guts::magic, MAGIC1, MAGIC2, re_guts::nstates, pmatch, REG_BADPAT, REG_LARGE, and states1.

Referenced by main().


Variable Documentation

int nope = 0 [static]
 

Definition at line 62 of file regexec.c.


Generated on Sun Mar 12 23:56:37 2006 for ScriptBasic by  doxygen 1.4.6-NO