LLVM API Documentation

Defines | Functions
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_impl.h"
#include "regutils.h"
#include "regex2.h"
#include "regengine.inc"
Include dependency graph for regexec.c:

Go to the source code of this file.

Defines

#define states1   long /* for later use in llvm_regexec() decision */
#define states   states1
#define CLEAR(v)   ((v) = 0)
#define SET0(v, n)   ((v) &= ~((unsigned long)1 << (n)))
#define SET1(v, n)   ((v) |= (unsigned long)1 << (n))
#define ISSET(v, n)   (((v) & ((unsigned long)1 << (n))) != 0)
#define ASSIGN(d, s)   ((d) = (s))
#define EQ(a, b)   ((a) == (b))
#define STATEVARS   long dummy /* dummy version */
#define STATESETUP(m, n)   /* nothing */
#define STATETEARDOWN(m)   /* nothing */
#define SETUP(v)   ((v) = 0)
#define onestate   long
#define INIT(o, n)   ((o) = (unsigned long)1 << (n))
#define INC(o)   ((o) = (unsigned long)(o) << 1)
#define ISSTATEIN(v, o)   (((v) & (o)) != 0)
#define FWD(dst, src, n)   ((dst) |= ((unsigned long)(src)&(here)) << (n))
#define BACK(dst, src, n)   ((dst) |= ((unsigned long)(src)&(here)) >> (n))
#define ISSETBACK(v, n)   (((v) & ((unsigned long)here >> (n))) != 0)
#define SNAMES   /* engine.inc looks after details */
#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)   memmove(d, s, m->g->nstates)
#define EQ(a, b)   (memcmp(a, b, m->g->nstates) == 0)
#define STATEVARS   long 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   long
#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   /* flag */
#define GOODFLAGS(f)   ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND))

Functions

int llvm_regexec (const llvm_regex_t *preg, const char *string, size_t nmatch, llvm_regmatch_t pmatch[], int eflags)

Define Documentation

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

Definition at line 111 of file regexec.c.

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

Definition at line 111 of file regexec.c.

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

Definition at line 126 of file regexec.c.

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

Definition at line 126 of file regexec.c.

#define CLEAR (   v)    ((v) = 0)

Definition at line 107 of file regexec.c.

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

Definition at line 107 of file regexec.c.

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

Definition at line 112 of file regexec.c.

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

Definition at line 125 of file regexec.c.

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

Definition at line 125 of file regexec.c.

#define GOODFLAGS (   f)    ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND))
#define INC (   o)    ((o) = (unsigned long)(o) << 1)

Definition at line 121 of file regexec.c.

#define INC (   o)    ((o)++)

Definition at line 121 of file regexec.c.

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

Definition at line 120 of file regexec.c.

Referenced by llvm::cl::TokenizeWindowsCommandLine().

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

Definition at line 120 of file regexec.c.

#define ISSET (   v,
 
)    (((v) & ((unsigned long)1 << (n))) != 0)

Definition at line 110 of file regexec.c.

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

Definition at line 110 of file regexec.c.

#define ISSETBACK (   v,
 
)    (((v) & ((unsigned long)here >> (n))) != 0)

Definition at line 127 of file regexec.c.

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

Definition at line 127 of file regexec.c.

#define ISSTATEIN (   v,
 
)    (((v) & (o)) != 0)

Definition at line 122 of file regexec.c.

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

Definition at line 122 of file regexec.c.

#define LNAMES   /* flag */

Definition at line 129 of file regexec.c.

#define onestate   long

Definition at line 119 of file regexec.c.

#define onestate   long

Definition at line 119 of file regexec.c.

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

Definition at line 108 of file regexec.c.

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

Definition at line 108 of file regexec.c.

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

Definition at line 109 of file regexec.c.

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

Definition at line 109 of file regexec.c.

#define SETUP (   v)    ((v) = 0)

Definition at line 118 of file regexec.c.

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

Definition at line 118 of file regexec.c.

#define SNAMES   /* engine.inc looks after details */

Definition at line 80 of file regexec.c.

#define states   states1

Definition at line 106 of file regexec.c.

#define states   char *

Definition at line 106 of file regexec.c.

#define states1   long /* for later use in llvm_regexec() decision */

Definition at line 58 of file regexec.c.

Referenced by llvm_regexec().

#define STATESETUP (   m,
 
)    /* nothing */

Definition at line 114 of file regexec.c.

#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 114 of file regexec.c.

#define STATETEARDOWN (   m)    /* nothing */

Definition at line 117 of file regexec.c.

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

Definition at line 117 of file regexec.c.

#define STATEVARS   long dummy /* dummy version */

Definition at line 113 of file regexec.c.

#define STATEVARS   long vn; char *space

Definition at line 113 of file regexec.c.


Function Documentation

int llvm_regexec ( const llvm_regex_t preg,
const char *  string,
size_t  nmatch,
llvm_regmatch_t  pmatch[],
int  eflags 
)