Commit | Line | Data |
---|---|---|
378cc40b LW |
1 | /* |
2 | * Definitions etc. for regexp(3) routines. | |
3 | * | |
4 | * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], | |
5 | * not the System V one. | |
6 | */ | |
7 | ||
55204971 | 8 | /* $RCSfile: regexp.h,v $$Revision: 4.0.1.2 $$Date: 91/11/05 18:24:31 $ |
378cc40b LW |
9 | * |
10 | * $Log: regexp.h,v $ | |
55204971 LW |
11 | * Revision 4.0.1.2 91/11/05 18:24:31 lwall |
12 | * patch11: minimum match length calculation in regexp is now cumulative | |
13 | * patch11: initial .* in pattern had dependency on value of $* | |
14 | * | |
9ef589d8 LW |
15 | * Revision 4.0.1.1 91/06/07 11:51:18 lwall |
16 | * patch4: new copyright notice | |
17 | * patch4: // wouldn't use previous pattern if it started with a null character | |
18 | * patch4: $` was busted inside s/// | |
19 | * | |
fe14fcc3 LW |
20 | * Revision 4.0 91/03/20 01:39:23 lwall |
21 | * 4.0 baseline. | |
378cc40b LW |
22 | * |
23 | */ | |
24 | ||
378cc40b | 25 | typedef struct regexp { |
fe14fcc3 LW |
26 | char **startp; |
27 | char **endp; | |
378cc40b LW |
28 | STR *regstart; /* Internal use only. */ |
29 | char *regstclass; | |
30 | STR *regmust; /* Internal use only. */ | |
31 | int regback; /* Can regmust locate first try? */ | |
55204971 | 32 | int minlen; /* mininum possible length of $& */ |
9ef589d8 | 33 | int prelen; /* length of precomp */ |
378cc40b LW |
34 | char *precomp; /* pre-compilation regular expression */ |
35 | char *subbase; /* saved string so \digit works forever */ | |
9ef589d8 | 36 | char *subbeg; /* same, but not responsible for allocation */ |
00bf170e | 37 | char *subend; /* end of subbase */ |
378cc40b LW |
38 | char reganch; /* Internal use only. */ |
39 | char do_folding; /* do case-insensitive match? */ | |
40 | char lastparen; /* last paren matched */ | |
41 | char nparens; /* number of parentheses */ | |
42 | char program[1]; /* Unwarranted chumminess with compiler. */ | |
43 | } regexp; | |
44 | ||
9ef589d8 LW |
45 | #define ROPT_ANCH 1 |
46 | #define ROPT_SKIP 2 | |
55204971 | 47 | #define ROPT_IMPLICIT 4 |
9ef589d8 | 48 | |
a687059c LW |
49 | regexp *regcomp(); |
50 | int regexec(); |