1d0db51ad065dfedcf730c82daf628bcacd88915
[p5sagit/p5-mst-13.2.git] / regexp.h
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
8 /* $RCSfile: regexp.h,v $$Revision: 4.1 $$Date: 92/08/07 18:26:35 $
9  *
10  * $Log:        regexp.h,v $
11  * Revision 4.1  92/08/07  18:26:35  lwall
12  * 
13  * Revision 4.0.1.2  91/11/05  18:24:31  lwall
14  * patch11: minimum match length calculation in regexp is now cumulative
15  * patch11: initial .* in pattern had dependency on value of $*
16  * 
17  * Revision 4.0.1.1  91/06/07  11:51:18  lwall
18  * patch4: new copyright notice
19  * patch4: // wouldn't use previous pattern if it started with a null character
20  * patch4: $` was busted inside s///
21  * 
22  * Revision 4.0  91/03/20  01:39:23  lwall
23  * 4.0 baseline.
24  * 
25  */
26
27 typedef struct regexp {
28         char **startp;
29         char **endp;
30         SV *regstart;           /* Internal use only. */
31         char *regstclass;
32         SV *regmust;            /* Internal use only. */
33         I32 regback;            /* Can regmust locate first try? */
34         I32 minlen;             /* mininum possible length of $& */
35         I32 prelen;             /* length of precomp */
36         char *precomp;          /* pre-compilation regular expression */
37         char *subbase;          /* saved string so \digit works forever */
38         char *subbeg;           /* same, but not responsible for allocation */
39         char *subend;           /* end of subbase */
40         char reganch;           /* Internal use only. */
41         char do_folding;        /* do case-insensitive match? */
42         char lastparen;         /* last paren matched */
43         char nparens;           /* number of parentheses */
44         char program[1];        /* Unwarranted chumminess with compiler. */
45 } regexp;
46
47 #define ROPT_ANCH 1
48 #define ROPT_SKIP 2
49 #define ROPT_IMPLICIT 4