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 | CANTMATCH 'x' /* arc that cannot match anything */ |
#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 *v, int wanted) |
static int | freev (struct vars *v, int err) |
static void | makesearch (struct vars *v, struct nfa *nfa) |
static struct subre * | parse (struct vars *v, int stopper, int type, struct state *init, struct state *final) |
static struct subre * | parsebranch (struct vars *v, int stopper, int type, struct state *left, struct state *right, int partial) |
static struct subre * | parseqatom (struct vars *v, int stopper, int type, struct state *lp, struct state *rp, struct subre *top) |
static void | nonword (struct vars *v, int dir, struct state *lp, struct state *rp) |
static void | word (struct vars *v, int dir, struct state *lp, struct state *rp) |
static void | charclass (struct vars *v, enum char_classes cls, struct state *lp, struct state *rp) |
static void | charclasscomplement (struct vars *v, enum char_classes cls, struct state *lp, struct state *rp) |
static int | scannum (struct vars *v) |
static void | repeat (struct vars *v, struct state *lp, struct state *rp, int m, int n) |
static void | bracket (struct vars *v, struct state *lp, struct state *rp) |
static void | cbracket (struct vars *v, struct state *lp, struct state *rp) |
static void | brackpart (struct vars *v, struct state *lp, struct state *rp, bool *have_cclassc) |
static const chr * | scanplain (struct vars *v) |
static void | onechr (struct vars *v, chr c, struct state *lp, struct state *rp) |
static void | optimizebracket (struct vars *v, struct state *lp, struct state *rp) |
static void | wordchrs (struct vars *v) |
static void | processlacon (struct vars *v, struct state *begin, struct state *end, int latype, struct state *lp, struct state *rp) |
static struct subre * | subre (struct vars *v, int op, int flags, struct state *begin, struct state *end) |
static void | freesubre (struct vars *v, struct subre *sr) |
static void | freesubreandsiblings (struct vars *v, struct subre *sr) |
static void | freesrnode (struct vars *v, struct subre *sr) |
static void | removecaptures (struct vars *v, struct subre *t) |
static int | numst (struct subre *t, int start) |
static void | markst (struct subre *t) |
static void | cleanst (struct vars *v) |
static long | nfatree (struct vars *v, struct subre *t, FILE *f) |
static long | nfanode (struct vars *v, struct subre *t, int converttosearch, FILE *f) |
static int | newlacon (struct vars *v, struct state *begin, struct state *end, int latype) |
static void | freelacons (struct subre *subs, int n) |
static void | rfree (regex_t *re) |
static int | rstacktoodeep (void) |
static void | lexstart (struct vars *v) |
static void | prefixes (struct vars *v) |
static int | next (struct vars *v) |
static int | lexescape (struct vars *v) |
static chr | lexdigits (struct vars *v, int base, int minlen, int maxlen) |
static int | brenext (struct vars *v, chr c) |
static void | skip (struct vars *v) |
static chr | newline (void) |
static chr | chrnamed (struct vars *v, const chr *startp, const chr *endp, chr lastresort) |
static void | initcm (struct vars *v, struct colormap *cm) |
static void | freecm (struct colormap *cm) |
static color | maxcolor (struct colormap *cm) |
static color | newcolor (struct colormap *cm) |
static void | freecolor (struct colormap *cm, color co) |
static color | pseudocolor (struct colormap *cm) |
static color | subcolor (struct colormap *cm, chr c) |
static color | subcolorhi (struct colormap *cm, color *pco) |
static color | newsub (struct colormap *cm, color co) |
static int | newhicolorrow (struct colormap *cm, int oldrow) |
static void | newhicolorcols (struct colormap *cm) |
static void | subcolorcvec (struct vars *v, struct cvec *cv, struct state *lp, struct state *rp) |
static void | subcoloronechr (struct vars *v, chr ch, struct state *lp, struct state *rp, color *lastsubcolor) |
static void | subcoloronerange (struct vars *v, chr from, chr to, struct state *lp, struct state *rp, color *lastsubcolor) |
static void | subcoloronerow (struct vars *v, int rownum, struct state *lp, struct state *rp, color *lastsubcolor) |
static void | okcolors (struct nfa *nfa, struct colormap *cm) |
static void | colorchain (struct colormap *cm, struct arc *a) |
static void | uncolorchain (struct colormap *cm, struct arc *a) |
static void | rainbow (struct nfa *nfa, struct colormap *cm, int type, color but, struct state *from, struct state *to) |
static void | colorcomplement (struct nfa *nfa, struct colormap *cm, int type, struct state *of, struct state *from, struct state *to) |
static struct nfa * | newnfa (struct vars *v, struct colormap *cm, struct nfa *parent) |
static void | freenfa (struct nfa *nfa) |
static struct state * | newstate (struct nfa *nfa) |
static struct state * | newfstate (struct nfa *nfa, int flag) |
static void | dropstate (struct nfa *nfa, struct state *s) |
static void | freestate (struct nfa *nfa, struct state *s) |
static void | newarc (struct nfa *nfa, int t, color co, struct state *from, struct state *to) |
static void | createarc (struct nfa *nfa, int t, color co, struct state *from, struct state *to) |
static struct arc * | allocarc (struct nfa *nfa) |
static void | freearc (struct nfa *nfa, struct arc *victim) |
static void | changearcsource (struct arc *a, struct state *newfrom) |
static void | changearctarget (struct arc *a, struct state *newto) |
static int | hasnonemptyout (struct state *s) |
static struct arc * | findarc (struct state *s, int type, color co) |
static void | cparc (struct nfa *nfa, struct arc *oa, struct state *from, struct state *to) |
static void | sortins (struct nfa *nfa, struct state *s) |
static int | sortins_cmp (const void *a, const void *b) |
static void | sortouts (struct nfa *nfa, struct state *s) |
static int | sortouts_cmp (const void *a, const void *b) |
static void | moveins (struct nfa *nfa, struct state *oldState, struct state *newState) |
static void | copyins (struct nfa *nfa, struct state *oldState, struct state *newState) |
static void | mergeins (struct nfa *nfa, struct state *s, struct arc **arcarray, int arccount) |
static void | moveouts (struct nfa *nfa, struct state *oldState, struct state *newState) |
static void | copyouts (struct nfa *nfa, struct state *oldState, struct state *newState) |
static void | cloneouts (struct nfa *nfa, struct state *old, struct state *from, struct state *to, int type) |
static void | delsub (struct nfa *nfa, struct state *lp, struct state *rp) |
static void | deltraverse (struct nfa *nfa, struct state *leftend, struct state *s) |
static void | dupnfa (struct nfa *nfa, struct state *start, struct state *stop, struct state *from, struct state *to) |
static void | duptraverse (struct nfa *nfa, struct state *s, struct state *stmp) |
static void | removeconstraints (struct nfa *nfa, struct state *start, struct state *stop) |
static void | removetraverse (struct nfa *nfa, struct state *s) |
static void | cleartraverse (struct nfa *nfa, struct state *s) |
static struct state * | single_color_transition (struct state *s1, struct state *s2) |
static void | specialcolors (struct nfa *nfa) |
static long | optimize (struct nfa *nfa, FILE *f) |
static void | pullback (struct nfa *nfa, FILE *f) |
static int | pull (struct nfa *nfa, struct arc *con, struct state **intermediates) |
static void | pushfwd (struct nfa *nfa, FILE *f) |
static int | push (struct nfa *nfa, struct arc *con, struct state **intermediates) |
static int | combine (struct nfa *nfa, struct arc *con, struct arc *a) |
static void | fixempties (struct nfa *nfa, FILE *f) |
static struct state * | emptyreachable (struct nfa *nfa, struct state *s, struct state *lastfound, struct arc **inarcsorig) |
static int | isconstraintarc (struct arc *a) |
static int | hasconstraintout (struct state *s) |
static void | fixconstraintloops (struct nfa *nfa, FILE *f) |
static int | findconstraintloop (struct nfa *nfa, struct state *s) |
static void | breakconstraintloop (struct nfa *nfa, struct state *sinitial) |
static void | clonesuccessorstates (struct nfa *nfa, struct state *ssource, struct state *sclone, struct state *spredecessor, struct arc *refarc, char *curdonemap, char *outerdonemap, int nstates) |
static void | removecantmatch (struct nfa *nfa) |
static void | cleanup (struct nfa *nfa) |
static void | markreachable (struct nfa *nfa, struct state *s, struct state *okay, struct state *mark) |
static void | markcanreach (struct nfa *nfa, struct state *s, struct state *okay, struct state *mark) |
static long | analyze (struct nfa *nfa) |
static void | checkmatchall (struct nfa *nfa) |
static bool | checkmatchall_recurse (struct nfa *nfa, struct state *s, bool **haspaths) |
static bool | check_out_colors_match (struct state *s, color co1, color co2) |
static bool | check_in_colors_match (struct state *s, color co1, color co2) |
static void | compact (struct nfa *nfa, struct cnfa *cnfa) |
static void | carcsort (struct carc *first, size_t n) |
static int | carc_cmp (const void *a, const void *b) |
static void | freecnfa (struct cnfa *cnfa) |
static void | dumpnfa (struct nfa *nfa, FILE *f) |
static struct cvec * | newcvec (int nchrs, int nranges) |
static struct cvec * | clearcvec (struct cvec *cv) |
static void | addchr (struct cvec *cv, chr c) |
static void | addrange (struct cvec *cv, chr from, chr to) |
static struct cvec * | getcvec (struct vars *v, int nchrs, int nranges) |
static void | freecvec (struct cvec *cv) |
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 *v, const chr *startp, const chr *endp) |
static struct cvec * | range (struct vars *v, chr a, chr b, int cases) |
static int | before (chr x, chr y) |
static struct cvec * | eclass (struct vars *v, chr c, int cases) |
static enum char_classes | lookupcclass (struct vars *v, const chr *startp, const chr *endp) |
static struct cvec * | cclasscvec (struct vars *v, enum char_classes cclasscode, int cases) |
static int | cclass_column_index (struct colormap *cm, chr c) |
static struct cvec * | allcases (struct vars *v, chr c) |
static int | cmp (const chr *x, const chr *y, size_t len) |
static int | casecmp (const chr *x, const chr *y, size_t len) |
int | pg_regcomp (regex_t *re, const chr *string, size_t len, int flags, Oid collation) |
Variables | |
static const struct fns | functions |
#define CCLASSC 'c' /* complement char class shorthand escape */ |
#define COMPATIBLE 3 /* compatible but not satisfied yet */ |
#define INF 3 |
#define SOME 2 |
#define VERR | ( | vv, | |
e | |||
) |
|
static |
Definition at line 1673 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 1763 of file regcomp.c.
References CCLASS, CCLASSC, CCLASSS, vars::cflags, charclass(), COLLEL, 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 1729 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().
|
static |
Referenced by charclass(), charclasscomplement(), and wordchrs().
|
static |
Definition at line 1494 of file regcomp.c.
References cclasscvec(), vars::cflags, NOERR, NOTE, REG_ICASE, REG_ULOCALE, and subcolorcvec().
Referenced by brackpart(), and parseqatom().
|
static |
Definition at line 1518 of file regcomp.c.
References cclasscvec(), vars::cflags, vars::cm, colorcomplement(), dropstate(), newstate(), vars::nfa, NOERR, NOTE, okcolors(), PLAIN, REG_ICASE, REG_ULOCALE, and subcolorcvec().
Referenced by bracket(), and parseqatom().
|
static |
|
static |
|
static |
Definition at line 2312 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().
|
static |
Referenced by makesearch().
|
static |
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 2430 of file regcomp.c.
References assert, subre::cnfa, FREE, freecnfa(), i, and NULLCNFA.
Definition at line 2187 of file regcomp.c.
References subre::begin, subre::child, subre::cnfa, subre::end, subre::flags, FREE, freecnfa(), NULLCNFA, subre::sibling, vars::treechain, and vars::treefree.
Referenced by freesubre(), parse(), and parseqatom().
Referenced by cbracket().
Definition at line 2152 of file regcomp.c.
References subre::child, freesrnode(), and freesubreandsiblings().
Referenced by freesubreandsiblings(), freev(), parseqatom(), and rfree().
Definition at line 2171 of file regcomp.c.
References freesubre(), next(), and subre::sibling.
Referenced by freesubre(), parse(), parseqatom(), and removecaptures().
|
static |
Definition at line 592 of file regcomp.c.
References cleanst(), vars::cv, vars::cv2, vars::err, 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 621 of file regcomp.c.
References a, assert, b, nfa::bos, vars::cm, COLORLESS, copyouts(), cparc(), DUPINF, nfa::flags, freearc(), state::ins, MATCHALL, nfa::maxmatchall, newarc(), newstate(), NOERR, state::outs, PLAIN, nfa::pre, rainbow(), s2, and state::tmp.
Referenced by nfanode(), and pg_regcomp().
|
static |
|
static |
|
static |
Definition at line 2297 of file regcomp.c.
References assert, subre::child, subre::flags, INUSE, and subre::sibling.
Referenced by pg_regcomp().
|
static |
|
static |
Definition at line 555 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().
|
static |
Referenced by cbracket(), makesearch(), nonword(), optimizebracket(), and processlacon().
|
static |
Referenced by pg_regcomp().
|
static |
|
static |
|
static |
Definition at line 2391 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 2351 of file regcomp.c.
References assert, subre::begin, vars::cm, subre::cnfa, compact(), dupnfa(), subre::end, nfa::final, nfa::flags, fprintf, freenfa(), nfa::init, ISERR, makesearch(), newnfa(), vars::nfa, NOERRZ, optimize(), specialcolors(), and nfa::v.
Referenced by nfatree(), and pg_regcomp().
Definition at line 2331 of file regcomp.c.
References assert, subre::begin, subre::child, DISCARD, nfanode(), and subre::sibling.
Referenced by pg_regcomp().
Definition at line 1458 of file regcomp.c.
References AHEAD, assert, BEHIND, vars::cm, colorcomplement(), newarc(), vars::nfa, and vars::wordchrs.
Referenced by parseqatom().
|
static |
Definition at line 2264 of file regcomp.c.
References assert, subre::child, i, subre::id, subre::sibling, and start.
Referenced by pg_regcomp().
Referenced by bracket(), charclasscomplement(), parseqatom(), pg_regcomp(), and wordchrs().
Definition at line 1911 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 1937 of file regcomp.c.
References a, assert, colormap::cd, CDEND, vars::cm, COLMARK, colordesc::flags, freearc(), newarc(), vars::nfa, state::outs, PLAIN, PSEUDO, RAINBOW, and UNUSEDCOLOR.
Referenced by bracket().
|
static |
Definition at line 717 of file regcomp.c.
References assert, subre::child, EAT, EMPTYARC, EOS, ERR, subre::flags, freesrnode(), freesubreandsiblings(), init, LONGER, MESSY, newstate(), vars::nfa, NOERRN, subre::op, parsebranch(), REG_EPAREN, SEE, subre::sibling, subre(), type, and UP.
Referenced by 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_final_distinct_paths(), create_grouping_paths(), create_limit_plan(), create_partial_distinct_paths(), create_partial_grouping_paths(), delay_execution_planner(), distribute_row_identity_vars(), expand_single_inheritance_child(), flatten_simple_union_all(), get_number_of_groups(), get_useful_group_keys_orderings(), grouping_planner(), is_degenerate_grouping(), json_manifest_array_end(), json_manifest_array_start(), json_manifest_finalize_file(), json_manifest_finalize_system_identifier(), json_manifest_finalize_version(), json_manifest_finalize_wal_range(), json_manifest_object_end(), json_manifest_object_field_start(), json_manifest_object_start(), json_manifest_scalar(), json_parse_manifest(), json_parse_manifest_incremental_chunk(), json_parse_manifest_incremental_init(), limit_needed(), main(), make_group_input_target(), make_sort_input_target(), max_parallel_hazard(), parseqatom(), perform_pullup_replace_vars(), pg_regcomp(), pgss_planner(), 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(), replace_empty_jointree(), resolve_unique_index_expr(), set_subquery_pathlist(), standard_planner(), standard_qp_callback(), subquery_planner(), transform_MERGE_to_join(), and verify_manifest_checksum().
|
static |
Definition at line 785 of file regcomp.c.
References assert, EMPTYARC, EOS, moveins(), newstate(), vars::nfa, NOERRN, NOTE, parseqatom(), REG_UUNSPEC, SEE, subre(), and type.
Referenced by parse(), and parseqatom().
|
static |
Definition at line 838 of file regcomp.c.
References AHEAD, ARCV, assert, subre::backno, BACKR, BACKREF, subre::begin, BEHIND, bracket(), BRUSE, 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(), if(), 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, NOERRN, 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, type, UP, WBDRY, word(), and wordchrs().
Referenced by parsebranch().
Definition at line 372 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, fflush(), nfa::final, subre::flags, fprintf, freev(), functions, GUTSMAGIC, i, guts::info, nfa::init, initcm(), j, vars::lacons, guts::lacons, subre::latype, LATYPE_IS_AHEAD, len, 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(), parse(), pg_set_regex_collation(), PLAIN, vars::re, REG_ADVANCED, REG_ADVF, REG_DUMP, REG_ESPACE, REG_EXPANDED, REG_EXTENDED, REG_ICASE, REG_INVARG, REG_NEWLINE, REG_NLANCH, REG_NLSTOP, REG_NOSUB, REG_PROGRESS, REG_QUOTE, REG_USHORTEST, REMAGIC, removecaptures(), 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(), RE_compile(), RE_compile_and_cache(), regcomp_auth_token(), and test_re_compile().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 2029 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 2218 of file regcomp.c.
References assert, BACKR, BRUSE, CAP, subre::capno, subre::child, subre::flags, freesubreandsiblings(), MIXED, subre::op, and subre::sibling.
Referenced by pg_regcomp().
|
static |
Referenced by parseqatom().
Definition at line 1586 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 2447 of file regcomp.c.
References guts::cmap, FREE, freecm(), freecnfa(), freelacons(), freesubre(), if(), guts::lacons, guts::magic, guts::nlacons, NULLCNFA, REMAGIC, guts::search, and guts::tree.
Referenced by freev().
|
static |
|
static |
Definition at line 1555 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().
|
static |
Referenced by brackpart(), charclass(), charclasscomplement(), onechr(), and wordchrs().
|
static |
Referenced by onechr().
|
static |
|
static |
|
static |
Definition at line 2095 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 1476 of file regcomp.c.
References AHEAD, assert, BEHIND, cloneouts(), vars::nfa, and vars::wordchrs.
Referenced by _metaphone(), addNorm(), AddStem(), addToResult(), byword(), CheckAffix(), CheckCompoundAffixes(), ciprefix(), cmpspell(), compareWORD(), daitch_mokotoff_coding(), dxsyn_lexize(), FindAffixes(), FindWord(), hlfinditem(), itsabbr(), Lookahead(), NIAddSpell(), NINormalizeWord(), NormalizeSubWord(), parseqatom(), pg_leftmost_one_pos32(), pg_leftmost_one_pos64(), pg_popcount32(), pg_popcount32_slow(), pg_popcount64(), pg_popcount64_slow(), pg_rightmost_one_pos32(), pg_rightmost_one_pos64(), pg_rotate_left32(), pg_rotate_right32(), plpgsql_parse_word(), SplitToVariants(), TidStoreSetBlockOffsets(), and unicode_to_utf8word().
|
static |
Definition at line 1993 of file regcomp.c.
References CC_WORD, cclasscvec(), vars::cflags, vars::cm, newstate(), vars::nfa, NOERR, NOTE, okcolors(), REG_ICASE, REG_ULOCALE, subcolorcvec(), and vars::wordchrs.
Referenced by parseqatom().
|
static |
Definition at line 277 of file regcomp.c.
Referenced by _outRangeTblEntry(), _readRangeTblEntry(), btadjustmembers(), create_functionscan_plan(), ExplainNode(), ginadjustmembers(), gistadjustmembers(), hashadjustmembers(), make_functionscan(), pg_regcomp(), and spgadjustmembers().