2 * Definitions etc. for regexp(3) routines.
4 * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof],
5 * not the System V one.
8 /* $RCSfile: regexp.h,v $$Revision: 4.0.1.2 $$Date: 91/11/05 18:24:31 $
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 $*
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///
20 * Revision 4.0 91/03/20 01:39:23 lwall
25 typedef struct regexp {
28 STR *regstart; /* Internal use only. */
30 STR *regmust; /* Internal use only. */
31 int regback; /* Can regmust locate first try? */
32 int minlen; /* mininum possible length of $& */
33 int prelen; /* length of precomp */
34 char *precomp; /* pre-compilation regular expression */
35 char *subbase; /* saved string so \digit works forever */
36 char *subbeg; /* same, but not responsible for allocation */
37 char *subend; /* end of subbase */
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. */
47 #define ROPT_IMPLICIT 4