PostgreSQL Source Code
git master
|
#include "regex/regguts.h"
#include "regc_lex.c"
#include "regc_color.c"
#include "regc_nfa.c"
#include "regc_cvec.c"
#include "regc_pg_locale.c"
#include "regc_locale.c"
Go to the source code of this file.
Data Structures | |
struct | vars |
Macros | |
#define | INCOMPATIBLE 1 /* destroys arc */ |
#define | SATISFIED 2 /* constraint satisfied */ |
#define | COMPATIBLE 3 /* compatible but not satisfied yet */ |
#define | REPLACEARC 4 /* replace arc's color with constraint color */ |
#define | NEXT() (next(v)) /* advance by one token */ |
#define | SEE(t) (v->nexttype == (t)) /* is next token this? */ |
#define | EAT(t) (SEE(t) && next(v)) /* if next is this, swallow it */ |
#define | VISERR(vv) ((vv)->err != 0) /* have we seen an error yet? */ |
#define | ISERR() VISERR(v) |
#define | VERR(vv, e) |
#define | ERR(e) VERR(v, e) /* record an error */ |
#define | NOERR() {if (ISERR()) return;} /* if error seen, return */ |
#define | NOERRN() {if (ISERR()) return NULL;} /* NOERR with retval */ |
#define | NOERRZ() {if (ISERR()) return 0;} /* NOERR with retval */ |
#define | INSIST(c, e) do { if (!(c)) ERR(e); } while (0) /* error if c false */ |
#define | NOTE(b) (v->re->re_info |= (b)) /* note visible condition */ |
#define | EMPTYARC(x, y) newarc(v->nfa, EMPTY, 0, x, y) |
#define | EMPTY 'n' /* no token present */ |
#define | EOS 'e' /* end of string */ |
#define | PLAIN 'p' /* ordinary character */ |
#define | DIGIT 'd' /* digit (in bound) */ |
#define | BACKREF 'b' /* back reference */ |
#define | COLLEL 'I' /* start of [. */ |
#define | ECLASS 'E' /* start of [= */ |
#define | CCLASS 'C' /* start of [: */ |
#define | END 'X' /* end of [. [= [: */ |
#define | CCLASSS 's' /* char class shorthand escape */ |
#define | CCLASSC 'c' /* complement char class shorthand escape */ |
#define | RANGE 'R' /* - within [] which might be range delim. */ |
#define | LACON 'L' /* lookaround constraint subRE */ |
#define | AHEAD 'a' /* color-lookahead arc */ |
#define | BEHIND 'r' /* color-lookbehind arc */ |
#define | WBDRY 'w' /* word boundary constraint */ |
#define | NWBDRY 'W' /* non-word-boundary constraint */ |
#define | SBEGIN 'A' /* beginning of string (even if not BOL) */ |
#define | SEND 'Z' /* end of string (even if not EOL) */ |
#define | COLORED(a) |
#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) == DUPINF) ? INF : (((x) > 1) ? SOME : (x)) ) |
Functions | |
static void | moresubs (struct vars *, int) |
static int | freev (struct vars *, int) |
static void | makesearch (struct vars *, struct nfa *) |
static struct subre * | parse (struct vars *, int, int, struct state *, struct state *) |
static struct subre * | parsebranch (struct vars *, int, int, struct state *, struct state *, int) |
static void | parseqatom (struct vars *, int, int, struct state *, struct state *, struct subre *) |
static void | nonword (struct vars *, int, struct state *, struct state *) |
static void | word (struct vars *, int, struct state *, struct state *) |
static void | charclass (struct vars *, enum char_classes, struct state *, struct state *) |
static void | charclasscomplement (struct vars *, enum char_classes, struct state *, struct state *) |
static int | scannum (struct vars *) |
static void | repeat (struct vars *, struct state *, struct state *, int, int) |
static void | bracket (struct vars *, struct state *, struct state *) |
static void | cbracket (struct vars *, struct state *, struct state *) |
static void | brackpart (struct vars *, struct state *, struct state *, bool *) |
static const chr * | scanplain (struct vars *) |
static void | onechr (struct vars *, chr, struct state *, struct state *) |
static void | optimizebracket (struct vars *, struct state *, struct state *) |
static void | wordchrs (struct vars *) |
static void | processlacon (struct vars *, struct state *, struct state *, int, struct state *, struct state *) |
static struct subre * | subre (struct vars *, int, int, struct state *, struct state *) |
static void | freesubre (struct vars *, struct subre *) |
static void | freesubreandsiblings (struct vars *, struct subre *) |
static void | freesrnode (struct vars *, struct subre *) |
static void | optst (struct vars *, struct subre *) |
static int | numst (struct subre *, int) |
static void | markst (struct subre *) |
static void | cleanst (struct vars *) |
static long | nfatree (struct vars *, struct subre *, FILE *) |
static long | nfanode (struct vars *, struct subre *, int, FILE *) |
static int | newlacon (struct vars *, struct state *, struct state *, int) |
static void | freelacons (struct subre *, int) |
static void | rfree (regex_t *) |
static int | rcancelrequested (void) |
static int | rstacktoodeep (void) |
static void | lexstart (struct vars *) |
static void | prefixes (struct vars *) |
static int | next (struct vars *) |
static int | lexescape (struct vars *) |
static chr | lexdigits (struct vars *, int, int, int) |
static int | brenext (struct vars *, chr) |
static void | skip (struct vars *) |
static chr | newline (void) |
static chr | chrnamed (struct vars *, const chr *, const chr *, chr) |
static void | initcm (struct vars *, struct colormap *) |
static void | freecm (struct colormap *) |
static color | maxcolor (struct colormap *) |
static color | newcolor (struct colormap *) |
static void | freecolor (struct colormap *, color) |
static color | pseudocolor (struct colormap *) |
static color | subcolor (struct colormap *, chr) |
static color | subcolorhi (struct colormap *, color *) |
static color | newsub (struct colormap *, color) |
static int | newhicolorrow (struct colormap *, int) |
static void | newhicolorcols (struct colormap *) |
static void | subcolorcvec (struct vars *, struct cvec *, struct state *, struct state *) |
static void | subcoloronechr (struct vars *, chr, struct state *, struct state *, color *) |
static void | subcoloronerange (struct vars *, chr, chr, struct state *, struct state *, color *) |
static void | subcoloronerow (struct vars *, int, struct state *, struct state *, color *) |
static void | okcolors (struct nfa *, struct colormap *) |
static void | colorchain (struct colormap *, struct arc *) |
static void | uncolorchain (struct colormap *, struct arc *) |
static void | rainbow (struct nfa *, struct colormap *, int, color, struct state *, struct state *) |
static void | colorcomplement (struct nfa *, struct colormap *, int, struct state *, struct state *, struct state *) |
static struct nfa * | newnfa (struct vars *, struct colormap *, struct nfa *) |
static void | freenfa (struct nfa *) |
static struct state * | newstate (struct nfa *) |
static struct state * | newfstate (struct nfa *, int flag) |
static void | dropstate (struct nfa *, struct state *) |
static void | freestate (struct nfa *, struct state *) |
static void | newarc (struct nfa *, int, color, struct state *, struct state *) |
static void | createarc (struct nfa *, int, color, struct state *, struct state *) |
static struct arc * | allocarc (struct nfa *) |
static void | freearc (struct nfa *, struct arc *) |
static void | changearcsource (struct arc *, struct state *) |
static void | changearctarget (struct arc *, struct state *) |
static int | hasnonemptyout (struct state *) |
static struct arc * | findarc (struct state *, int, color) |
static void | cparc (struct nfa *, struct arc *, struct state *, struct state *) |
static void | sortins (struct nfa *, struct state *) |
static int | sortins_cmp (const void *, const void *) |
static void | sortouts (struct nfa *, struct state *) |
static int | sortouts_cmp (const void *, const void *) |
static void | moveins (struct nfa *, struct state *, struct state *) |
static void | copyins (struct nfa *, struct state *, struct state *) |
static void | mergeins (struct nfa *, struct state *, struct arc **, int) |
static void | moveouts (struct nfa *, struct state *, struct state *) |
static void | copyouts (struct nfa *, struct state *, struct state *) |
static void | cloneouts (struct nfa *, struct state *, struct state *, struct state *, int) |
static void | delsub (struct nfa *, struct state *, struct state *) |
static void | deltraverse (struct nfa *, struct state *, struct state *) |
static void | dupnfa (struct nfa *, struct state *, struct state *, struct state *, struct state *) |
static void | duptraverse (struct nfa *, struct state *, struct state *) |
static void | removeconstraints (struct nfa *, struct state *, struct state *) |
static void | removetraverse (struct nfa *, struct state *) |
static void | cleartraverse (struct nfa *, struct state *) |
static struct state * | single_color_transition (struct state *, struct state *) |
static void | specialcolors (struct nfa *) |
static long | optimize (struct nfa *, FILE *) |
static void | pullback (struct nfa *, FILE *) |
static int | pull (struct nfa *, struct arc *, struct state **) |
static void | pushfwd (struct nfa *, FILE *) |
static int | push (struct nfa *, struct arc *, struct state **) |
static int | combine (struct nfa *nfa, struct arc *con, struct arc *a) |
static void | fixempties (struct nfa *, FILE *) |
static struct state * | emptyreachable (struct nfa *, struct state *, struct state *, struct arc **) |
static int | isconstraintarc (struct arc *) |
static int | hasconstraintout (struct state *) |
static void | fixconstraintloops (struct nfa *, FILE *) |
static int | findconstraintloop (struct nfa *, struct state *) |
static void | breakconstraintloop (struct nfa *, struct state *) |
static void | clonesuccessorstates (struct nfa *, struct state *, struct state *, struct state *, struct arc *, char *, char *, int) |
static void | cleanup (struct nfa *) |
static void | markreachable (struct nfa *, struct state *, struct state *, struct state *) |
static void | markcanreach (struct nfa *, struct state *, struct state *, struct state *) |
static long | analyze (struct nfa *) |
static void | checkmatchall (struct nfa *) |
static bool | checkmatchall_recurse (struct nfa *, struct state *, bool, int, bool *) |
static bool | check_out_colors_match (struct state *, color, color) |
static bool | check_in_colors_match (struct state *, color, color) |
static void | compact (struct nfa *, struct cnfa *) |
static void | carcsort (struct carc *, size_t) |
static int | carc_cmp (const void *, const void *) |
static void | freecnfa (struct cnfa *) |
static void | dumpnfa (struct nfa *, FILE *) |
static struct cvec * | newcvec (int, int) |
static struct cvec * | clearcvec (struct cvec *) |
static void | addchr (struct cvec *, chr) |
static void | addrange (struct cvec *, chr, chr) |
static struct cvec * | getcvec (struct vars *, int, int) |
static void | freecvec (struct cvec *) |
static int | pg_wc_isdigit (pg_wchar c) |
static int | pg_wc_isalpha (pg_wchar c) |
static int | pg_wc_isalnum (pg_wchar c) |
static int | pg_wc_isword (pg_wchar c) |
static int | pg_wc_isupper (pg_wchar c) |
static int | pg_wc_islower (pg_wchar c) |
static int | pg_wc_isgraph (pg_wchar c) |
static int | pg_wc_isprint (pg_wchar c) |
static int | pg_wc_ispunct (pg_wchar c) |
static int | pg_wc_isspace (pg_wchar c) |
static pg_wchar | pg_wc_toupper (pg_wchar c) |
static pg_wchar | pg_wc_tolower (pg_wchar c) |
static chr | element (struct vars *, const chr *, const chr *) |
static struct cvec * | range (struct vars *, chr, chr, int) |
static int | before (chr, chr) |
static struct cvec * | eclass (struct vars *, chr, int) |
static enum char_classes | lookupcclass (struct vars *, const chr *, const chr *) |
static struct cvec * | cclasscvec (struct vars *, enum char_classes, int) |
static int | cclass_column_index (struct colormap *, chr) |
static struct cvec * | allcases (struct vars *, chr) |
static int | cmp (const chr *, const chr *, size_t) |
static int | casecmp (const chr *, const chr *, size_t) |
int | pg_regcomp (regex_t *re, const chr *string, size_t len, int flags, Oid collation) |
Variables | |
static const struct fns | functions |
Definition at line 299 of file regcomp.c.
Referenced by cloneouts(), combine(), dumpnfa(), isconstraintarc(), nonword(), parseqatom(), processlacon(), pushfwd(), removetraverse(), and word().
Referenced by parseqatom().
#define BACKREF 'b' /* back reference */ |
Definition at line 290 of file regcomp.c.
Referenced by brenext(), lexescape(), and parseqatom().
Definition at line 300 of file regcomp.c.
Referenced by cloneouts(), combine(), dumpnfa(), isconstraintarc(), nonword(), parseqatom(), processlacon(), pullback(), removetraverse(), and word().
#define CCLASS 'C' /* start of [: */ |
Definition at line 293 of file regcomp.c.
Referenced by brackpart(), next(), and scanplain().
#define CCLASSC 'c' /* complement char class shorthand escape */ |
Definition at line 296 of file regcomp.c.
Referenced by brackpart(), lexescape(), next(), and parseqatom().
#define CCLASSS 's' /* char class shorthand escape */ |
Definition at line 295 of file regcomp.c.
Referenced by brackpart(), lexescape(), next(), and parseqatom().
Referenced by pg_regcomp().
#define COLLEL 'I' /* start of [. */ |
Definition at line 291 of file regcomp.c.
Referenced by brackpart(), next(), and scanplain().
#define COLORED | ( | a | ) |
Definition at line 308 of file regcomp.c.
Referenced by createarc(), and freearc().
#define COMPATIBLE 3 /* compatible but not satisfied yet */ |
#define DIGIT 'd' /* digit (in bound) */ |
Definition at line 289 of file regcomp.c.
Referenced by next(), parseqatom(), and scannum().
Definition at line 272 of file regcomp.c.
Referenced by parse(), and parseqatom().
#define ECLASS 'E' /* start of [= */ |
Definition at line 292 of file regcomp.c.
Referenced by brackpart(), next(), and scanplain().
#define EMPTY 'n' /* no token present */ |
Definition at line 286 of file regcomp.c.
Referenced by brenext(), dumpnfa(), dupnfa(), emptyreachable(), fixempties(), hashline_number(), hasnonemptyout(), lexstart(), next(), removetraverse(), and single_color_transition().
Definition at line 283 of file regcomp.c.
Referenced by parse(), parsebranch(), parseqatom(), and repeat().
#define END 'X' /* end of [. [= [: */ |
Definition at line 294 of file regcomp.c.
Referenced by scanplain().
Definition at line 287 of file regcomp.c.
Referenced by bracket(), next(), parse(), parsebranch(), parseqatom(), and pg_regcomp().
Definition at line 277 of file regcomp.c.
Referenced by brackpart(), freev(), moresubs(), newlacon(), parse(), parseqatom(), repeat(), scannum(), and subre().
#define INCOMPATIBLE 1 /* destroys arc */ |
#define INF 3 |
Referenced by repeat().
Definition at line 281 of file regcomp.c.
Referenced by brackpart(), and parseqatom().
#define ISERR | ( | ) | VISERR(v) |
Definition at line 274 of file regcomp.c.
Referenced by bracket(), lexescape(), longest(), miss(), newnfa(), next(), nfanode(), parseqatom(), and scanplain().
#define LACON 'L' /* lookaround constraint subRE */ |
Definition at line 298 of file regcomp.c.
Referenced by combine(), compact(), dumpnfa(), isconstraintarc(), next(), parseqatom(), processlacon(), and removetraverse().
#define NEXT | ( | ) | (next(v)) /* advance by one token */ |
Definition at line 270 of file regcomp.c.
Referenced by bracket(), brackpart(), parseqatom(), scannum(), and scanplain().
Definition at line 278 of file regcomp.c.
Referenced by bracket(), brackpart(), cbracket(), charclass(), charclasscomplement(), lexstart(), makesearch(), parseqatom(), repeat(), subcolorcvec(), subcoloronechr(), subcoloronerow(), and wordchrs().
Definition at line 279 of file regcomp.c.
Referenced by parse(), parsebranch(), and range().
#define NOTE | ( | b | ) | (v->re->re_info |= (b)) /* note visible condition */ |
Definition at line 282 of file regcomp.c.
Referenced by brackpart(), brenext(), charclass(), charclasscomplement(), element(), lexescape(), next(), parsebranch(), parseqatom(), pg_regcomp(), prefixes(), skip(), and wordchrs().
Definition at line 302 of file regcomp.c.
Referenced by lexescape(), and parseqatom().
#define PAIR | ( | x, | |
y | |||
) | ((x)*4 + (y)) |
Referenced by repeat().
#define PLAIN 'p' /* ordinary character */ |
Definition at line 288 of file regcomp.c.
Referenced by brackpart(), brenext(), cbracket(), charclasscomplement(), check_in_colors_match(), checkmatchall_recurse(), cloneouts(), colorcomplement(), combine(), compact(), dumpnfa(), lexescape(), makesearch(), newnfa(), next(), optimizebracket(), parseqatom(), pg_regcomp(), pullback(), pushfwd(), removetraverse(), scanplain(), single_color_transition(), subcolorcvec(), subcoloronechr(), and subcoloronerow().
Definition at line 297 of file regcomp.c.
Referenced by brackpart(), and next().
#define SATISFIED 2 /* constraint satisfied */ |
#define SBEGIN 'A' /* beginning of string (even if not BOL) */ |
Definition at line 303 of file regcomp.c.
Referenced by lexescape(), next(), and parseqatom().
#define SEE | ( | t | ) | (v->nexttype == (t)) /* is next token this? */ |
Definition at line 271 of file regcomp.c.
Referenced by bracket(), brackpart(), parse(), parsebranch(), parseqatom(), pg_regcomp(), scannum(), and scanplain().
#define SEND 'Z' /* end of string (even if not EOL) */ |
Definition at line 304 of file regcomp.c.
Referenced by lexescape(), and parseqatom().
#define SOME 2 |
Referenced by repeat().
#define VISERR | ( | vv | ) | ((vv)->err != 0) /* have we seen an error yet? */ |
#define WBDRY 'w' /* word boundary constraint */ |
Definition at line 301 of file regcomp.c.
Referenced by lexescape(), and parseqatom().
|
static |
Definition at line 1591 of file regcomp.c.
References assert, brackpart(), charclasscomplement(), vars::cm, EOS, i, ISERR, NEXT, vars::nfa, NOERR, NUM_CCLASSES, okcolors(), optimizebracket(), and SEE.
Referenced by cbracket(), and parseqatom().
|
static |
Definition at line 1681 of file regcomp.c.
References CCLASS, CCLASSC, CCLASSS, vars::cflags, charclass(), COLLEL, vars::cv, eclass(), ECLASS, element(), ERR, INSIST, lookupcclass(), NEXT, vars::nexttype, vars::nextvalue, NOERR, NOTE, vars::now, onechr(), PLAIN, range(), RANGE, REG_ASSERT, REG_ECOLLATE, REG_ECTYPE, REG_ERANGE, REG_ICASE, REG_UUNPORT, scanplain(), SEE, and subcolorcvec().
Referenced by bracket().
|
static |
|
static |
Referenced by pg_regcomp().
Definition at line 1647 of file regcomp.c.
References assert, bracket(), vars::cflags, vars::cm, colorcomplement(), dropstate(), freestate(), newarc(), newstate(), vars::nfa, state::nins, vars::nlcolor, NOERR, state::nouts, PLAIN, and REG_NLSTOP.
Referenced by parseqatom().
Referenced by charclass(), charclasscomplement(), and wordchrs().
|
static |
Definition at line 1412 of file regcomp.c.
References cclasscvec(), vars::cflags, vars::cv, NOERR, NOTE, REG_ICASE, REG_ULOCALE, and subcolorcvec().
Referenced by brackpart(), and parseqatom().
|
static |
Definition at line 1436 of file regcomp.c.
References cclasscvec(), vars::cflags, vars::cm, colorcomplement(), vars::cv, dropstate(), newstate(), vars::nfa, NOERR, NOTE, okcolors(), PLAIN, REG_ICASE, REG_ULOCALE, and subcolorcvec().
Referenced by bracket(), and parseqatom().
|
static |
|
static |
Definition at line 2193 of file regcomp.c.
References subre::chain, subre::flags, FREE, INUSE, next(), vars::treechain, and vars::treefree.
Referenced by freev(), and pg_regcomp().
|
static |
|
static |
Referenced by processlacon(), and word().
|
static |
Referenced by pg_regcomp().
|
static |
Referenced by cbracket(), charclasscomplement(), nonword(), and processlacon().
Referenced by nfanode(), and pg_regcomp().
Referenced by makesearch().
Referenced by makesearch().
Referenced by parseqatom(), and repeat().
Referenced by cbracket(), and charclasscomplement().
|
static |
Referenced by pg_regcomp().
|
static |
Referenced by nfanode(), parseqatom(), and repeat().
Referenced by brackpart().
Referenced by brackpart().
|
static |
|
static |
|
static |
Referenced by makesearch(), and optimizebracket().
|
static |
Referenced by freelacons(), freesrnode(), and rfree().
|
static |
Definition at line 2310 of file regcomp.c.
References assert, subre::cnfa, FREE, freecnfa(), i, and NULLCNFA.
Referenced by freev(), and rfree().
Definition at line 2105 of file regcomp.c.
References subre::child, subre::cnfa, subre::flags, FREE, freecnfa(), NULLCNFA, vars::treechain, and vars::treefree.
Referenced by freesubre(), parse(), and parseqatom().
Referenced by cbracket().
Definition at line 2070 of file regcomp.c.
References subre::child, freesrnode(), and freesubreandsiblings().
Referenced by freesubreandsiblings(), freev(), parseqatom(), and rfree().
Definition at line 2089 of file regcomp.c.
References freesubre(), next(), and subre::sibling.
Referenced by freesubre(), parse(), and parseqatom().
|
static |
Definition at line 548 of file regcomp.c.
References cleanst(), vars::cv, vars::cv2, vars::err, ERR, FREE, freecvec(), freelacons(), freenfa(), freesubre(), vars::lacons, vars::nfa, vars::nlacons, vars::re, rfree(), vars::sub10, vars::subs, vars::tree, and vars::treechain.
Referenced by pg_regcomp().
|
static |
|
static |
Referenced by pg_regcomp().
|
static |
|
static |
|
static |
Referenced by pg_regcomp().
|
static |
Referenced by brackpart().
Definition at line 577 of file regcomp.c.
References assert, nfa::bos, vars::cm, arc::co, COLORLESS, copyouts(), cparc(), freearc(), arc::from, arc::inchain, state::ins, newarc(), newstate(), NOERR, arc::outchain, state::outs, PLAIN, nfa::pre, rainbow(), s2, state::tmp, arc::to, and arc::type.
Referenced by nfanode(), and pg_regcomp().
|
static |
|
static |
Definition at line 2178 of file regcomp.c.
References assert, subre::child, subre::flags, INUSE, and subre::sibling.
Referenced by pg_regcomp().
|
static |
Definition at line 511 of file regcomp.c.
References assert, ERR, MALLOC, vars::nsubs, REALLOC, REG_ESPACE, vars::sub10, vars::subs, and VS.
Referenced by parseqatom().
Referenced by parsebranch(), parseqatom(), and repeat().
Referenced by parseqatom(), and repeat().
Referenced by cbracket(), makesearch(), nonword(), optimizebracket(), and processlacon().
|
static |
Referenced by pg_regcomp().
|
static |
|
static |
|
static |
Definition at line 2271 of file regcomp.c.
References subre::begin, subre::cnfa, subre::end, ERR, vars::lacons, subre::latype, MALLOC, vars::nlacons, REALLOC, REG_ESPACE, and ZAPCNFA.
Referenced by processlacon().
|
static |
Referenced by pg_regcomp().
Referenced by nfanode(), and pg_regcomp().
Referenced by cbracket(), charclasscomplement(), makesearch(), parse(), parsebranch(), parseqatom(), repeat(), and wordchrs().
|
static |
Referenced by cleanst(), and freesubreandsiblings().
Definition at line 2232 of file regcomp.c.
References assert, subre::begin, vars::cm, subre::cnfa, compact(), dupnfa(), subre::end, nfa::final, fprintf, freenfa(), nfa::init, ISERR, makesearch(), newnfa(), vars::nfa, NOERRZ, optimize(), and specialcolors().
Referenced by nfatree(), and pg_regcomp().
Definition at line 2212 of file regcomp.c.
References assert, subre::begin, subre::child, DISCARD, nfanode(), and subre::sibling.
Referenced by pg_regcomp().
Definition at line 1376 of file regcomp.c.
References AHEAD, assert, BEHIND, vars::cm, colorcomplement(), newarc(), vars::nfa, and vars::wordchrs.
Referenced by parseqatom().
|
static |
Definition at line 2145 of file regcomp.c.
References assert, subre::child, i, subre::id, subre::sibling, and vars::start.
Referenced by pg_regcomp().
Referenced by bracket(), charclasscomplement(), parseqatom(), pg_regcomp(), and wordchrs().
Definition at line 1829 of file regcomp.c.
References allcases(), vars::cflags, COLORLESS, REG_ICASE, subcolorcvec(), and subcoloronechr().
Referenced by brackpart(), and parseqatom().
|
static |
Referenced by nfanode(), and pg_regcomp().
Definition at line 1855 of file regcomp.c.
References assert, colormap::cd, CDEND, vars::cm, arc::co, COLMARK, colordesc::flags, freearc(), newarc(), vars::nfa, arc::outchain, state::outs, PLAIN, PSEUDO, RAINBOW, arc::to, arc::type, and UNUSEDCOLOR.
Referenced by bracket().
|
static |
Definition at line 666 of file regcomp.c.
References assert, subre::child, EAT, EMPTYARC, EOS, ERR, subre::flags, freesrnode(), freesubreandsiblings(), LONGER, MESSY, newstate(), vars::nfa, NOERRN, subre::op, parsebranch(), REG_EPAREN, SEE, subre::sibling, subre(), and UP.
Referenced by _outPlannerInfo(), add_foreign_final_paths(), add_foreign_grouping_paths(), add_foreign_ordered_paths(), add_paths_to_grouping_rel(), build_minmax_path(), can_partial_agg(), check_sql_fn_retval(), consider_groupingsets_paths(), convert_ANY_sublink_to_join(), convert_EXISTS_sublink_to_join(), create_degenerate_grouping_paths(), create_distinct_paths(), create_grouping_paths(), create_limit_plan(), create_partial_grouping_paths(), expand_single_inheritance_child(), flatten_simple_union_all(), get_number_of_groups(), grouping_planner(), inheritance_planner(), is_degenerate_grouping(), json_manifest_array_end(), json_manifest_array_start(), json_manifest_object_end(), json_manifest_object_field_start(), json_manifest_object_start(), json_manifest_scalar(), json_parse_manifest(), make_group_input_target(), make_partial_grouping_target(), make_sort_input_target(), make_window_input_target(), max_parallel_hazard(), parseqatom(), perform_pullup_replace_vars(), pg_regcomp(), plan_set_operations(), planner(), preprocess_groupclause(), preprocess_grouping_sets(), preprocess_limit(), preprocess_minmax_aggregates(), preprocess_rowmarks(), preprocess_targetlist(), pull_up_constant_function(), pull_up_simple_subquery(), pull_up_simple_values(), query_planner(), remove_useless_groupby_columns(), resolve_unique_index_expr(), set_subquery_pathlist(), standard_qp_callback(), and subquery_planner().
|
static |
Definition at line 734 of file regcomp.c.
References assert, EMPTYARC, EOS, moveins(), newstate(), vars::nfa, NOERRN, NOTE, parseqatom(), REG_UUNSPEC, SEE, and subre().
Referenced by parse(), and parseqatom().
|
static |
Definition at line 783 of file regcomp.c.
References AHEAD, ARCV, assert, subre::backno, BACKR, BACKREF, subre::begin, BEHIND, bracket(), CAP, subre::capno, cbracket(), CCLASSC, CCLASSS, vars::cflags, charclass(), charclasscomplement(), subre::child, vars::cm, COLORLESS, COMBINE, delsub(), DIGIT, DUPINF, dupnfa(), EAT, EMPTYARC, subre::end, EOS, ERR, subre::flags, freesrnode(), freesubre(), freesubreandsiblings(), subre::id, INSIST, ISERR, LACON, subre::latype, LONGER, subre::max, MESSY, subre::min, MIXED, moresubs(), moveins(), moveouts(), newstate(), NEXT, vars::nexttype, vars::nextvalue, vars::nfa, state::nins, vars::nlcolor, NOERR, nonword(), NOTE, state::nouts, vars::nsubexp, vars::nsubs, NWBDRY, okcolors(), onechr(), subre::op, parse(), parsebranch(), PLAIN, PREF, processlacon(), rainbow(), REG_ADVANCED, REG_ASSERT, REG_BADBR, REG_BADRPT, REG_EPAREN, REG_ESUBREG, REG_EXTENDED, REG_NLANCH, REG_NLSTOP, REG_UPBOTCH, removeconstraints(), repeat(), s2, SBEGIN, scannum(), SEE, SEND, SHORTER, subre::sibling, subre(), vars::subs, UP, WBDRY, word(), and vars::wordchrs.
Referenced by parsebranch().
Definition at line 329 of file regcomp.c.
References assert, casecmp(), vars::cflags, guts::cflags, cleanst(), vars::cm, guts::cmap, cmp(), CNOERR, COLORLESS, compact(), vars::cv, vars::cv2, debug, DISCARD, dumpnfa(), EOS, vars::err, nfa::final, subre::flags, fprintf, freev(), vars::g, GUTSMAGIC, i, guts::info, nfa::init, initcm(), vars::lacons, guts::lacons, subre::latype, LATYPE_IS_AHEAD, lexstart(), guts::magic, makesearch(), MALLOC, markst(), newcvec(), newline(), newnfa(), vars::nfa, nfanode(), nfatree(), vars::nlacons, guts::nlacons, vars::nlcolor, NOTE, vars::now, guts::nsub, vars::nsubexp, vars::nsubs, vars::ntree, guts::ntree, numst(), okcolors(), optimize(), optst(), parse(), pg_set_regex_collation(), PLAIN, vars::re, regex_t::re_collation, regex_t::re_csize, regex_t::re_fns, regex_t::re_guts, regex_t::re_info, regex_t::re_magic, regex_t::re_nsub, REG_ADVANCED, REG_ADVF, REG_DUMP, REG_ESPACE, REG_EXPANDED, REG_EXTENDED, REG_ICASE, REG_INVARG, REG_NEWLINE, REG_NLANCH, REG_NLSTOP, REG_PROGRESS, REG_QUOTE, REG_USHORTEST, REMAGIC, guts::search, SEE, SHORTER, vars::spaceused, specialcolors(), generate_unaccent_rules::stdout, vars::stop, vars::sub10, subcolor(), vars::subs, vars::tree, guts::tree, vars::treechain, vars::treefree, VS, vars::wordchrs, and ZAPCNFA.
Referenced by NIAddAffix(), parse_ident_line(), RE_compile(), RE_compile_and_cache(), and test_re_compile().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1947 of file regcomp.c.
References AHEAD, assert, BEHIND, cloneouts(), vars::cm, colorcomplement(), LACON, LATYPE_AHEAD_NEG, LATYPE_AHEAD_POS, LATYPE_BEHIND_NEG, LATYPE_BEHIND_POS, newarc(), newlacon(), vars::nfa, NOTREACHED, s1, and single_color_transition().
Referenced by parseqatom().
|
static |
|
static |
|
static |
Referenced by makesearch(), and parseqatom().
Referenced by brackpart().
|
static |
Definition at line 2363 of file regcomp.c.
References InterruptPending, ProcDiePending, and QueryCancelPending.
Referenced by parseqatom().
Definition at line 1504 of file regcomp.c.
References delsub(), dupnfa(), EMPTYARC, ERR, INF, moveins(), moveouts(), newstate(), vars::nfa, NOERR, PAIR, REDUCE, REG_ASSERT, s2, and SOME.
Referenced by parseqatom().
|
static |
Definition at line 2327 of file regcomp.c.
References guts::cmap, FREE, freecm(), freecnfa(), freelacons(), freesubre(), vars::g, guts::lacons, guts::magic, guts::nlacons, NULLCNFA, regex_t::re_fns, regex_t::re_guts, regex_t::re_magic, REMAGIC, guts::search, and guts::tree.
Referenced by freev().
|
static |
Definition at line 2379 of file regcomp.c.
References subre::backno, BACKR, subre::begin, buf, CAP, subre::capno, subre::child, guts::cmap, subre::cnfa, DUPINF, subre::end, subre::flags, fprintf, vars::g, GUTSMAGIC, i, subre::id, INUSE, guts::lacons, subre::latype, LATYPE_AHEAD_NEG, LATYPE_AHEAD_POS, LATYPE_BEHIND_NEG, LATYPE_BEHIND_POS, LONGER, guts::magic, subre::max, subre::min, MIXED, guts::nlacons, state::no, guts::ntree, NULLCNFA, subre::op, vars::re, regex_t::re_csize, regex_t::re_guts, regex_t::re_info, regex_t::re_magic, regex_t::re_nsub, REMAGIC, guts::search, SHORTER, subre::sibling, sprintf, stack_is_too_deep(), and guts::tree.
|
static |
Definition at line 1473 of file regcomp.c.
References DIGIT, DUPMAX, ERR, NEXT, vars::nextvalue, REG_BADBR, and SEE.
Referenced by parseqatom().
Referenced by processlacon().
|
static |
|
static |
|
static |
|
static |
Referenced by nfanode(), and pg_regcomp().
Referenced by pg_regcomp().
Referenced by brackpart(), charclass(), charclasscomplement(), onechr(), and wordchrs().
|
static |
Referenced by onechr().
|
static |
|
static |
|
static |
Definition at line 2013 of file regcomp.c.
References assert, subre::backno, subre::begin, subre::capno, subre::chain, subre::child, subre::cnfa, subre::end, ERR, subre::flags, subre::id, subre::latype, MALLOC, subre::max, subre::min, subre::op, vars::re, REG_ESPACE, REG_ETOOBIG, subre::sibling, STACK_TOO_DEEP, vars::treechain, vars::treefree, and ZAPCNFA.
Referenced by parse(), parsebranch(), and parseqatom().
Definition at line 1394 of file regcomp.c.
References AHEAD, assert, BEHIND, cloneouts(), vars::nfa, and vars::wordchrs.
Referenced by addNorm(), AddStem(), CheckCompoundAffixes(), cmpspell(), compareWORD(), dxsyn_lexize(), hlfinditem(), itsabbr(), parseqatom(), pg_ceil_log2_64(), pg_rotate_right32(), and unicode_to_utf8word().
|
static |
Definition at line 1911 of file regcomp.c.
References CC_WORD, cclasscvec(), vars::cflags, vars::cm, vars::cv, newstate(), vars::nfa, NOERR, NOTE, okcolors(), REG_ICASE, REG_ULOCALE, subcolorcvec(), and vars::wordchrs.
|
static |
Definition at line 314 of file regcomp.c.
Referenced by _copyFunctionScan(), _copyRangeFunction(), _copyRangeTblEntry(), _equalRangeFunction(), _equalRangeTblEntry(), _outFunctionScan(), _outRangeFunction(), _outRangeTblEntry(), _readFunctionScan(), _readRangeTblEntry(), create_functionscan_plan(), ExplainNode(), and make_functionscan().