summaryrefslogtreecommitdiff
path: root/regexp.h
blob: 1d0db51ad065dfedcf730c82daf628bcacd88915 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Definitions etc. for regexp(3) routines.
 *
 * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
 * not the System V one.
 */

/* $RCSfile: regexp.h,v $$Revision: 4.1 $$Date: 92/08/07 18:26:35 $
 *
 * $Log:	regexp.h,v $
 * Revision 4.1  92/08/07  18:26:35  lwall
 * 
 * Revision 4.0.1.2  91/11/05  18:24:31  lwall
 * patch11: minimum match length calculation in regexp is now cumulative
 * patch11: initial .* in pattern had dependency on value of $*
 * 
 * Revision 4.0.1.1  91/06/07  11:51:18  lwall
 * patch4: new copyright notice
 * patch4: // wouldn't use previous pattern if it started with a null character
 * patch4: $` was busted inside s///
 * 
 * Revision 4.0  91/03/20  01:39:23  lwall
 * 4.0 baseline.
 * 
 */

typedef struct regexp {
	char **startp;
	char **endp;
	SV *regstart;		/* Internal use only. */
	char *regstclass;
	SV *regmust;		/* Internal use only. */
	I32 regback;		/* Can regmust locate first try? */
	I32 minlen;		/* mininum possible length of $& */
	I32 prelen;		/* length of precomp */
	char *precomp;		/* pre-compilation regular expression */
	char *subbase;		/* saved string so \digit works forever */
	char *subbeg;		/* same, but not responsible for allocation */
	char *subend;		/* end of subbase */
	char reganch;		/* Internal use only. */
	char do_folding;	/* do case-insensitive match? */
	char lastparen;		/* last paren matched */
	char nparens;		/* number of parentheses */
	char program[1];	/* Unwarranted chumminess with compiler. */
} regexp;

#define ROPT_ANCH 1
#define ROPT_SKIP 2
#define ROPT_IMPLICIT 4