cosmetix
[k8jam.git] / src / hsregexp.h
blob5f7410a6439dd18e25cecd5638f7b92fda1fbc4f
1 /*
2 * Definitions etc. for regexp(3) routines.
4 * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof],
5 * not the System V one.
7 * 11/04/02 (seiwald) - const-ing for string literals
8 */
9 #ifndef JAMH_REGEXP_H
10 #define JAMH_REGEXP_H
13 #define NSUBEXP (10)
14 typedef struct HSRegExp {
15 const char *startp[NSUBEXP];
16 const char *endp[NSUBEXP];
17 int parcnt; /* # of captures */
18 char regstart; /* Internal use only */
19 char reganch; /* Internal use only */
20 char *regmust; /* Internal use only */
21 int regmlen; /* Internal use only */
22 char program[1]; /* unwarranted chumminess with compiler */
23 } HSRegExp;
26 extern HSRegExp *hsRxCompile (const char *exp);
27 extern int hsRxExec (HSRegExp *prog, const char *string);
28 extern int hsRxFree (HSRegExp *re);
29 extern void hsRxError (const char *s);
32 #ifdef RXDEBUG
33 extern int hsRxNarrate;
34 extern void hsRxDump (HSRegExp *r);
35 #endif
38 #endif