PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | ATEOS() (v->now >= v->stop) |
#define | HAVE(n) (v->stop - v->now >= (n)) |
#define | NEXT1(c) (!ATEOS() && *v->now == CHR(c)) |
#define | NEXT2(a, b) (HAVE(2) && *v->now == CHR(a) && *(v->now+1) == CHR(b)) |
#define | NEXT3(a, b, c) |
#define | SET(c) (v->nexttype = (c)) |
#define | SETV(c, n) (v->nexttype = (c), v->nextvalue = (n)) |
#define | RET(c) return (SET(c), 1) |
#define | RETV(c, n) return (SETV(c, n), 1) |
#define | FAILW(e) return (ERR(e), 0) /* ERR does SET(EOS) */ |
#define | LASTTYPE(t) (v->lasttype == (t)) |
#define | L_ERE 1 /* mainline ERE/ARE */ |
#define | L_BRE 2 /* mainline BRE */ |
#define | L_Q 3 /* REG_QUOTE */ |
#define | L_EBND 4 /* ERE/ARE bound */ |
#define | L_BBND 5 /* BRE bound */ |
#define | L_BRACK 6 /* brackets */ |
#define | L_CEL 7 /* collating element */ |
#define | L_ECL 8 /* equivalence class */ |
#define | L_CCL 9 /* character class */ |
#define | INTOCON(c) (v->lexcon = (c)) |
#define | INCON(con) (v->lexcon == (con)) |
#define | ENDOF(array) ((array) + sizeof(array)/sizeof(chr)) |
Functions | |
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) |
#define ATEOS | ( | ) | (v->now >= v->stop) |
Definition at line 36 of file regc_lex.c.
#define ENDOF | ( | array | ) | ((array) + sizeof(array)/sizeof(chr)) |
Definition at line 64 of file regc_lex.c.
Definition at line 47 of file regc_lex.c.
#define HAVE | ( | n | ) | (v->stop - v->now >= (n)) |
Definition at line 37 of file regc_lex.c.
#define INCON | ( | con | ) | (v->lexcon == (con)) |
Definition at line 61 of file regc_lex.c.
Definition at line 60 of file regc_lex.c.
#define L_BBND 5 /* BRE bound */ |
Definition at line 55 of file regc_lex.c.
#define L_BRACK 6 /* brackets */ |
Definition at line 56 of file regc_lex.c.
#define L_BRE 2 /* mainline BRE */ |
Definition at line 52 of file regc_lex.c.
#define L_CCL 9 /* character class */ |
Definition at line 59 of file regc_lex.c.
#define L_CEL 7 /* collating element */ |
Definition at line 57 of file regc_lex.c.
#define L_EBND 4 /* ERE/ARE bound */ |
Definition at line 54 of file regc_lex.c.
#define L_ECL 8 /* equivalence class */ |
Definition at line 58 of file regc_lex.c.
#define L_ERE 1 /* mainline ERE/ARE */ |
Definition at line 51 of file regc_lex.c.
#define L_Q 3 /* REG_QUOTE */ |
Definition at line 53 of file regc_lex.c.
#define LASTTYPE | ( | t | ) | (v->lasttype == (t)) |
Definition at line 48 of file regc_lex.c.
Definition at line 39 of file regc_lex.c.
Definition at line 40 of file regc_lex.c.
Definition at line 45 of file regc_lex.c.
Definition at line 46 of file regc_lex.c.
Definition at line 43 of file regc_lex.c.
Definition at line 44 of file regc_lex.c.
Definition at line 861 of file regc_lex.c.
References assert, ATEOS, BACKREF, vars::cflags, CHR, DIGITVAL, EMPTY, FAILW, HAVE, INTOCON, iscalnum, L_BBND, L_BRACK, LASTTYPE, NEXT1, NEXT2, NOTE, NOTREACHED, vars::now, PLAIN, REG_EESCAPE, REG_EXPANDED, REG_UBACKREF, REG_UBOUNDS, REG_UBSALNUM, REG_UNONPOSIX, REG_UUNSPEC, RET, RETV, and skip().
Referenced by next().
|
static |
Definition at line 1022 of file regc_lex.c.
References cvec::chrs, element(), vars::err, errsave, cvec::nchrs, and range().
Referenced by lexescape().
Definition at line 780 of file regc_lex.c.
References ATEOS, CHR, DIGITVAL, ERR, len, vars::now, and REG_EESCAPE.
Referenced by lexescape().
|
static |
Definition at line 601 of file regc_lex.c.
References assert, ATEOS, BACKREF, CC_DIGIT, CC_SPACE, CC_WORD, CCLASSC, CCLASSS, vars::cflags, CHR, CHR_IS_IN_RANGE, chrnamed(), ENDOF, FAILW, ISERR, lexdigits(), NOTE, NOTREACHED, vars::now, NWBDRY, PLAIN, REG_ADVF, REG_EESCAPE, REG_UBACKREF, REG_ULOCALE, REG_UNONPOSIX, REG_UUNPORT, RET, RETV, SBEGIN, SEND, and WBDRY.
Referenced by next().
|
static |
Definition at line 70 of file regc_lex.c.
References assert, vars::cflags, EMPTY, INTOCON, L_BRE, L_ERE, L_Q, next(), vars::nexttype, NOERR, prefixes(), REG_ADVANCED, REG_ADVF, REG_EXPANDED, REG_EXTENDED, REG_NEWLINE, and REG_QUOTE.
|
static |
|
static |
Definition at line 200 of file regc_lex.c.
References assert, ATEOS, brenext(), CCLASS, CCLASSC, CCLASSS, vars::cflags, CHR, COLLEL, DIGIT, DIGITVAL, ECLASS, EMPTY, END, EOS, FAILW, HAVE, INCON, INTOCON, iscalnum, iscdigit, ISERR, L_BBND, L_BRACK, L_BRE, L_CCL, L_CEL, L_EBND, L_ECL, L_ERE, L_Q, LACON, LASTTYPE, vars::lasttype, LATYPE_AHEAD_NEG, LATYPE_AHEAD_POS, LATYPE_BEHIND_NEG, LATYPE_BEHIND_POS, vars::lexcon, lexescape(), NEXT1, vars::nexttype, NOTE, NOTREACHED, vars::now, PLAIN, RANGE, REG_ADVF, REG_BADBR, REG_BADRPT, REG_BOSONLY, REG_EBRACE, REG_EBRACK, REG_EESCAPE, REG_EXPANDED, REG_EXTENDED, REG_UBBS, REG_UBOUNDS, REG_UBRACES, REG_UBSALNUM, REG_ULOCALE, REG_ULOOKAROUND, REG_UNONPOSIX, REG_UUNSPEC, RET, RETV, SBEGIN, and skip().
Referenced by lexstart().
|
static |
Definition at line 99 of file regc_lex.c.
References ATEOS, vars::cflags, CHR, ERR, HAVE, iscalpha, NEXT1, NEXT2, NEXT3, NOTE, vars::now, REG_ADVANCED, REG_ADVF, REG_BADOPT, REG_BADPAT, REG_BADRPT, REG_EXPANDED, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NLANCH, REG_NLSTOP, REG_QUOTE, and REG_UNONPOSIX.
Referenced by lexstart(), and NIImportAffixes().
|
static |
Definition at line 982 of file regc_lex.c.
References assert, ATEOS, vars::cflags, CHR, iscspace, NEXT1, NOTE, vars::now, REG_EXPANDED, REG_UNONPOSIX, and start.