Go to the source code of this file.
|
| #define | END 0 /* no End of program. */ |
| |
| #define | BOL 1 /* no Match "" at beginning of line. */ |
| |
| #define | EOL 2 /* no Match "" at end of line. */ |
| |
| #define | ANY 3 /* no Match any one character. */ |
| |
| #define | ANYOF 4 /* str Match any character in this string. */ |
| |
| #define | ANYBUT 5 /* str Match any character not in this string. */ |
| |
| #define | BRANCH 6 /* node Match this alternative, or the next... */ |
| |
| #define | BACK 7 /* no Match "", "next" ptr points backward. */ |
| |
| #define | EXACTLY 8 /* str Match this string. */ |
| |
| #define | NOTHING 9 /* no Match empty string. */ |
| |
| #define | STAR 10 /* node Match this (simple) thing 0 or more times. */ |
| |
| #define | PLUS 11 /* node Match this (simple) thing 1 or more times. */ |
| |
| #define | OPEN 20 /* no Mark this point in input as start of #n. */ |
| |
| #define | CLOSE 30 /* no Analogous to OPEN. */ |
| |
| #define | OP(p) (*(p)) |
| |
| #define | NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&0377)) |
| |
| #define | OPERAND(p) ((p) + 3) |
| |
| #define | RE_CHARBITS 0xff |
| |
| #define | UCHARAT(p) ((int)*(p)&RE_CHARBITS) |
| |
| #define | FAIL(m) { regerror(m); return(nil); } |
| |
| #define | ISMULT(c) ((c) == '*' || (c) == '+' || (c) == '?') |
| |
| #define | META "^$.[()|?+*\\" |
| |
| #define | HASWIDTH 01 /* Known never to match null string. */ |
| |
| #define | SIMPLE 02 /* Simple enough to be STAR/PLUS operand. */ |
| |
| #define | SPSTART 04 /* Starts with * or +. */ |
| |
| #define | WORST 0 /* Worst case. */ |
| |
◆ ANY
| #define ANY 3 /* no Match any one character. */ |
◆ ANYBUT
| #define ANYBUT 5 /* str Match any character not in this string. */ |
◆ ANYOF
| #define ANYOF 4 /* str Match any character in this string. */ |
◆ BACK
| #define BACK 7 /* no Match "", "next" ptr points backward. */ |
◆ BOL
| #define BOL 1 /* no Match "" at beginning of line. */ |
◆ BRANCH
| #define BRANCH 6 /* node Match this alternative, or the next... */ |
◆ CLOSE
| #define CLOSE 30 /* no Analogous to OPEN. */ |
◆ END
| #define END 0 /* no End of program. */ |
◆ EOL
| #define EOL 2 /* no Match "" at end of line. */ |
◆ EXACTLY
| #define EXACTLY 8 /* str Match this string. */ |
◆ FAIL
◆ HASWIDTH
| #define HASWIDTH 01 /* Known never to match null string. */ |
◆ ISMULT
| #define ISMULT |
( |
|
c | ) |
((c) == '*' || (c) == '+' || (c) == '?') |
◆ META
| #define META "^$.[()|?+*\\" |
◆ NEXT
| #define NEXT |
( |
|
p | ) |
(((*((p)+1)&0377)<<8) + (*((p)+2)&0377)) |
◆ NOTHING
| #define NOTHING 9 /* no Match empty string. */ |
◆ OP
◆ OPEN
◆ OPERAND
| #define OPERAND |
( |
|
p | ) |
((p) + 3) |
◆ PLUS
| #define PLUS 11 /* node Match this (simple) thing 1 or more times. */ |
◆ RE_CHARBITS
◆ SIMPLE
| #define SIMPLE 02 /* Simple enough to be STAR/PLUS operand. */ |
◆ SPSTART
| #define SPSTART 04 /* Starts with * or +. */ |
◆ STAR
| #define STAR 10 /* node Match this (simple) thing 0 or more times. */ |
◆ UCHARAT
◆ WORST
| #define WORST 0 /* Worst case. */ |
◆ FindNewline()
| char* FindNewline |
( |
char * |
s | ) |
|
|
inline |
◆ NextLine()
| char* NextLine |
( |
char * |
s | ) |
|
|
inline |
◆ reg()
| static char * reg |
( |
int |
paren, |
|
|
int * |
flagp |
|
) |
| |
|
static |
◆ regatom()
| static char * regatom |
( |
int * |
flagp | ) |
|
|
static |
◆ regbranch()
| static char * regbranch |
( |
int * |
flagp | ) |
|
|
static |
◆ regc()
| static void regc |
( |
char |
b | ) |
|
|
static |
◆ regcomp()
| static regexp * regcomp |
( |
const char * |
exp | ) |
|
|
static |
◆ regerror()
| static void regerror |
( |
const char * |
s | ) |
|
|
static |
◆ regexec()
| static int regexec |
( |
regexp * |
prog, |
|
|
char * |
string |
|
) |
| |
|
static |
◆ reginsert()
| static void reginsert |
( |
char |
op, |
|
|
char * |
opnd |
|
) |
| |
|
static |
◆ regmatch()
| static int regmatch |
( |
char * |
prog | ) |
|
|
static |
◆ regnext()
| static char * regnext |
( |
char * |
p | ) |
|
|
static |
◆ regnode()
| static char * regnode |
( |
char |
op | ) |
|
|
static |
◆ regoptail()
| static void regoptail |
( |
char * |
p, |
|
|
char * |
val |
|
) |
| |
|
static |
◆ regpiece()
| static char * regpiece |
( |
int * |
flagp | ) |
|
|
static |
◆ regrepeat()
| static int regrepeat |
( |
char * |
p | ) |
|
|
static |
◆ regtail()
| static void regtail |
( |
char * |
p, |
|
|
char * |
val |
|
) |
| |
|
static |
◆ regtry()
| static int regtry |
( |
regexp * |
prog, |
|
|
char * |
string |
|
) |
| |
|
static |
◆ regbol
◆ regcode
◆ regdummy
◆ regendp
◆ reginput
◆ regnpar
◆ regparse
◆ regsize
◆ regstartp