This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 4.0 patch 36: (combined patch)
[perl5.git] / regexp.h
... / ...
CommitLineData
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.0.1.2 $$Date: 91/11/05 18:24:31 $
9 *
10 * $Log: regexp.h,v $
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 *
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 *
20 * Revision 4.0 91/03/20 01:39:23 lwall
21 * 4.0 baseline.
22 *
23 */
24
25typedef struct regexp {
26 char **startp;
27 char **endp;
28 STR *regstart; /* Internal use only. */
29 char *regstclass;
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. */
43} regexp;
44
45#define ROPT_ANCH 1
46#define ROPT_SKIP 2
47#define ROPT_IMPLICIT 4
48
49regexp *regcomp();
50int regexec();