PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | arcp |
struct | sset |
struct | dfa |
struct | smalldfa |
struct | vars |
Macros | |
#define | HASH(bv, nw) (((nw) == 1) ? *(bv) : hash(bv, nw)) |
#define | HIT(h, bv, ss, nw) |
#define | STARTER 01 /* the initial state set */ |
#define | POSTSTATE 02 /* includes the goal state */ |
#define | LOCKED 04 /* locked in cache */ |
#define | NOPROGRESS 010 /* zero-progress state set */ |
#define | WORK 1 /* number of work bitvectors needed */ |
#define | FEWSTATES 20 /* must be less than UBITS */ |
#define | FEWCOLORS 15 |
#define | DOMALLOC ((struct smalldfa *)NULL) /* force malloc */ |
#define | VISERR(vv) ((vv)->err != 0) /* have we seen an error yet? */ |
#define | ISERR() VISERR(v) |
#define | VERR(vv, e) ((vv)->err = ((vv)->err ? (vv)->err : (e))) |
#define | ERR(e) VERR(v, e) /* record an error */ |
#define | NOERR() {if (ISERR()) return v->err;} /* if error seen, return it */ |
#define | OFF(p) ((p) - v->start) |
#define | LOFF(p) ((long)OFF(p)) |
#define | LOCALMAT 20 |
#define | LOCALDFAS 40 |
Functions | |
static struct dfa * | getsubdfa (struct vars *v, struct subre *t) |
static struct dfa * | getladfa (struct vars *v, int n) |
static int | find (struct vars *v, struct cnfa *cnfa, struct colormap *cm) |
static int | cfind (struct vars *v, struct cnfa *cnfa, struct colormap *cm) |
static int | cfindloop (struct vars *v, struct cnfa *cnfa, struct colormap *cm, struct dfa *d, struct dfa *s, chr **coldp) |
static void | zapallsubs (regmatch_t *p, size_t n) |
static void | zaptreesubs (struct vars *v, struct subre *t) |
static void | subset (struct vars *v, struct subre *sub, chr *begin, chr *end) |
static int | cdissect (struct vars *v, struct subre *t, chr *begin, chr *end) |
static int | ccondissect (struct vars *v, struct subre *t, chr *begin, chr *end) |
static int | crevcondissect (struct vars *v, struct subre *t, chr *begin, chr *end) |
static int | cbrdissect (struct vars *v, struct subre *t, chr *begin, chr *end) |
static int | caltdissect (struct vars *v, struct subre *t, chr *begin, chr *end) |
static int | citerdissect (struct vars *v, struct subre *t, chr *begin, chr *end) |
static int | creviterdissect (struct vars *v, struct subre *t, chr *begin, chr *end) |
static chr * | longest (struct vars *v, struct dfa *d, chr *start, chr *stop, int *hitstopp) |
static chr * | shortest (struct vars *v, struct dfa *d, chr *start, chr *min, chr *max, chr **coldp, int *hitstopp) |
static int | matchuntil (struct vars *v, struct dfa *d, chr *probe, struct sset **lastcss, chr **lastcp) |
static chr * | dfa_backref (struct vars *v, struct dfa *d, chr *start, chr *min, chr *max, bool shortest) |
static chr * | lastcold (struct vars *v, struct dfa *d) |
static struct dfa * | newdfa (struct vars *v, struct cnfa *cnfa, struct colormap *cm, struct smalldfa *sml) |
static void | freedfa (struct dfa *d) |
static unsigned | hash (unsigned *uv, int n) |
static struct sset * | initialize (struct vars *v, struct dfa *d, chr *start) |
static struct sset * | miss (struct vars *v, struct dfa *d, struct sset *css, color co, chr *cp, chr *start) |
static int | lacon (struct vars *v, struct cnfa *pcnfa, chr *cp, color co) |
static struct sset * | getvacant (struct vars *v, struct dfa *d, chr *cp, chr *start) |
static struct sset * | pickss (struct vars *v, struct dfa *d, chr *cp, chr *start) |
int | pg_regexec (regex_t *re, const chr *string, size_t len, size_t search_start, rm_detail_t *details, size_t nmatch, regmatch_t pmatch[], int flags) |
#define HASH | ( | bv, | |
nw | |||
) | (((nw) == 1) ? *(bv) : hash(bv, nw)) |
#define HIT | ( | h, | |
bv, | |||
ss, | |||
nw | |||
) |
#define LOCALDFAS 40 |
#define LOCALMAT 20 |
Definition at line 1076 of file regexec.c.
References assert, cdissect(), subre::child, subre::cnfa, getsubdfa(), subre::id, LOFF, longest(), MDEBUG, NOERR, cnfa::nstates, subre::op, REG_NOMATCH, and subre::sibling.
Referenced by cdissect().
Definition at line 994 of file regexec.c.
References assert, subre::backno, DUPINF, vars::g, subre::id, LOFF, subre::max, MDEBUG, subre::min, subre::op, vars::pmatch, REG_NOMATCH, REG_OKAY, and vars::start.
Referenced by cdissect().
Definition at line 829 of file regexec.c.
References assert, cdissect(), subre::child, subre::cnfa, subre::flags, getsubdfa(), subre::id, LOFF, longest(), MDEBUG, NOERR, cnfa::nstates, subre::op, REG_ASSERT, REG_NOMATCH, REG_OKAY, SHORTER, subre::sibling, and zaptreesubs().
Referenced by cdissect().
Definition at line 756 of file regexec.c.
References assert, BACKR, subre::begin, caltdissect(), subre::capno, cbrdissect(), ccondissect(), subre::child, citerdissect(), crevcondissect(), creviterdissect(), subre::end, subre::flags, subre::id, INTERRUPT, LOFF, MDEBUG, subre::op, vars::re, REG_ASSERT, REG_ETOOBIG, REG_NOMATCH, REG_OKAY, SHORTER, STACK_TOO_DEEP, and subset().
Referenced by caltdissect(), ccondissect(), cfindloop(), citerdissect(), crevcondissect(), creviterdissect(), and find().
Definition at line 509 of file regexec.c.
References assert, cfindloop(), guts::cflags, dfa::cm, vars::details, vars::dfa1, vars::dfa2, vars::err, freedfa(), vars::g, newdfa(), NOERR, OFF, REG_EXPECT, pg_regmatch_t::rm_eo, rm_detail_t::rm_extend, pg_regmatch_t::rm_so, guts::search, and vars::stop.
Referenced by pg_regexec().
|
static |
Definition at line 549 of file regexec.c.
References assert, cdissect(), close, vars::err, ERR, subre::flags, vars::g, ISERR, LOFF, longest(), MDEBUG, vars::nmatch, OFF, vars::pmatch, REG_NOMATCH, REG_OKAY, vars::search_start, SHORTER, shortest(), vars::stop, and guts::tree.
Referenced by cfind().
Definition at line 1117 of file regexec.c.
References assert, cdissect(), subre::child, subre::cnfa, DUPINF, vars::err, subre::flags, FREE, getsubdfa(), i, subre::id, ISERR, LOFF, longest(), MALLOC, subre::max, MDEBUG, subre::min, cnfa::nstates, subre::op, REG_ESPACE, REG_NOMATCH, REG_OKAY, SHORTER, and zaptreesubs().
Referenced by cdissect().
Definition at line 910 of file regexec.c.
References assert, cdissect(), subre::child, subre::cnfa, subre::flags, getsubdfa(), subre::id, LOFF, longest(), MDEBUG, NOERR, cnfa::nstates, subre::op, REG_ASSERT, REG_NOMATCH, REG_OKAY, SHORTER, shortest(), subre::sibling, and zaptreesubs().
Referenced by cdissect().
Definition at line 1321 of file regexec.c.
References assert, cdissect(), subre::child, subre::cnfa, DUPINF, vars::err, subre::flags, FREE, getsubdfa(), i, subre::id, ISERR, LOFF, MALLOC, subre::max, MDEBUG, subre::min, cnfa::nstates, subre::op, REG_ESPACE, REG_NOMATCH, REG_OKAY, SHORTER, shortest(), and zaptreesubs().
Referenced by cdissect().
|
static |
Definition at line 419 of file regexec.c.
References assert, cdissect(), guts::cflags, close, dfa::cm, vars::details, vars::dfa1, vars::err, subre::flags, freedfa(), vars::g, ISERR, LOFF, longest(), MDEBUG, newdfa(), vars::nmatch, NOERR, OFF, vars::pmatch, REG_EXPECT, REG_NOMATCH, REG_OKAY, pg_regmatch_t::rm_eo, rm_detail_t::rm_extend, pg_regmatch_t::rm_so, guts::search, vars::search_start, SHORTER, shortest(), vars::start, vars::stop, and guts::tree.
Referenced by NIAddAffix(), NIImportAffixes(), NIImportOOAffixes(), parse_affentry(), parse_ooaffentry(), pg_regexec(), and testdelete().
|
static |
Referenced by cfind(), find(), and pg_regexec().
Definition at line 400 of file regexec.c.
References assert, guts::cmap, subre::cnfa, DOMALLOC, vars::g, guts::lacons, vars::ladfas, and newdfa().
Referenced by lacon().
Definition at line 372 of file regexec.c.
References dfa::backmax, dfa::backmin, dfa::backno, subre::backno, guts::cmap, subre::cnfa, DOMALLOC, vars::g, subre::id, subre::max, subre::min, newdfa(), subre::op, and vars::subdfas.
Referenced by caltdissect(), ccondissect(), citerdissect(), crevcondissect(), and creviterdissect().
|
static |
|
static |
Referenced by caltdissect(), ccondissect(), cfindloop(), citerdissect(), crevcondissect(), and find().
|
static |
|
static |
|
static |
Referenced by cfind(), find(), getladfa(), and getsubdfa().
int pg_regexec | ( | regex_t * | re, |
const chr * | string, | ||
size_t | len, | ||
size_t | search_start, | ||
rm_detail_t * | details, | ||
size_t | nmatch, | ||
regmatch_t | pmatch[], | ||
int | flags | ||
) |
Definition at line 185 of file regexec.c.
References assert, cfind(), guts::cflags, cleanup(), guts::cmap, subre::cnfa, vars::details, vars::eflags, vars::err, fflush(), find(), for(), FREE, freedfa(), vars::g, i, if(), guts::info, vars::ladfas, vars::lblastcp, vars::lblastcss, len, LOCALDFAS, LOCALMAT, MALLOC, guts::nlacons, vars::nmatch, guts::nsub, guts::ntree, pg_set_regex_collation(), vars::pmatch, vars::re, REG_ESPACE, REG_EXPECT, REG_FTRACE, REG_INVARG, REG_MIXED, REG_MTRACE, REG_NOMATCH, REG_NOSUB, REG_OKAY, REG_UBACKREF, REG_UIMPOSSIBLE, regmatch_t, REMAGIC, vars::search_start, vars::start, generate_unaccent_rules::stdout, vars::stop, vars::subdfas, guts::tree, VS, and zapallsubs().
Referenced by CheckAffix(), RE_wchar_execute(), regexec_auth_token(), replace_text_regexp(), and test_re_execute().
|
static |
Referenced by cfindloop(), crevcondissect(), creviterdissect(), and find().
Definition at line 702 of file regexec.c.
References assert, subre::begin, subre::capno, subre::end, subre::id, LOFF, MDEBUG, vars::nmatch, OFF, and vars::pmatch.
Referenced by cdissect().
|
static |
Definition at line 679 of file regexec.c.
References subre::capno, subre::child, vars::pmatch, and subre::sibling.
Referenced by ccondissect(), citerdissect(), crevcondissect(), and creviterdissect().