LLVM
8.0.1
|
#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"
Go to the source code of this file.
Macros | |
#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 BACK | ( | dst, | |
src, | |||
n | |||
) | ((dst) |= ((unsigned long)(src)&(here)) >> (n)) |
#define BACK | ( | dst, | |
src, | |||
n | |||
) | ((dst)[here-(n)] |= (src)[here]) |
#define EQ | ( | a, | |
b | |||
) | ((a) == (b)) |
Definition at line 112 of file regexec.c.
Referenced by CCMaskForCondCode(), changeFCMPPredToAArch64CC(), changeICMPPredToAArch64CC(), llvm::MCBinaryExpr::createEQ(), llvm::createHexagonHardwareLoops(), llvm::BinOpInit::Fold(), llvm::BinOpInit::getAsString(), getComparePreds(), getPTXCmpMode(), INITIALIZE_PASS(), and LowerVSETCC().
#define FWD | ( | dst, | |
src, | |||
n | |||
) | ((dst) |= ((unsigned long)(src)&(here)) << (n)) |
#define FWD | ( | dst, | |
src, | |||
n | |||
) | ((dst)[here+(n)] |= (src)[here]) |
#define GOODFLAGS | ( | f | ) | ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND)) |
Referenced by llvm_regexec().
#define INIT | ( | o, | |
n | |||
) | ((o) = (unsigned long)1 << (n)) |
Definition at line 120 of file regexec.c.
Referenced by llvm::cl::TokenizeWindowsCommandLine().
#define ISSET | ( | v, | |
n | |||
) | (((v) & ((unsigned long)1 << (n))) != 0) |
#define ISSETBACK | ( | v, | |
n | |||
) | (((v) & ((unsigned long)here >> (n))) != 0) |
#define SETUP | ( | v | ) | ((v) = &m->space[m->vn++ * m->g->nstates]) |
#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, | |
nv | |||
) |
int llvm_regexec | ( | const llvm_regex_t * | preg, |
const char * | string, | ||
size_t | nmatch, | ||
llvm_regmatch_t | pmatch[], | ||
int | eflags | ||
) |
Definition at line 141 of file regexec.c.
References assert(), GOODFLAGS, re_guts::iflags, re_guts::magic, MAGIC1, MAGIC2, re_guts::nstates, llvm_regex::re_g, llvm_regex::re_magic, REG_BADPAT, REG_LARGE, REGEX_BAD, and states1.
Referenced by llvm::Regex::match().