summaryrefslogtreecommitdiff
path: root/regcomp.h
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-08-08 17:07:07 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-08-08 17:07:07 +0000
commit00bf170e31343ccc4fac7a63f6a3acf5e76c3616 (patch)
tree64f2ca6ce7de08a6bae7fb4d11de65e8d49396be /regcomp.h
parent33b78306b8a6f9a33cf09697c8c3167d2111ea12 (diff)
downloadperl-00bf170e31343ccc4fac7a63f6a3acf5e76c3616.tar.gz
perl 3.0 patch #25 patch #19, continued
See patch #19.
Diffstat (limited to 'regcomp.h')
-rw-r--r--regcomp.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/regcomp.h b/regcomp.h
index c4c6520262..a2e2fbba65 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -1,6 +1,9 @@
-/* $Header: regcomp.h,v 3.0 89/10/18 15:22:39 lwall Locked $
+/* $Header: regcomp.h,v 3.0.1.1 90/08/09 05:06:49 lwall Locked $
*
* $Log: regcomp.h,v $
+ * Revision 3.0.1.1 90/08/09 05:06:49 lwall
+ * patch19: sped up {m,n} on simple items
+ *
* Revision 3.0 89/10/18 15:22:39 lwall
* 3.0 baseline
*
@@ -57,8 +60,8 @@
#define BOL 1 /* no Match "" at beginning of line. */
#define EOL 2 /* no Match "" at end of line. */
#define ANY 3 /* no Match any one character. */
-#define ANYOF 4 /* str Match any character in this string. */
-#define ANYBUT 5 /* str Match any character not in this string. */
+#define ANYOF 4 /* str Match character in (or not in) this class. */
+#define CURLY 5 /* str Match this simple thing {n,m} times. */
#define BRANCH 6 /* node Match this alternative, or the next... */
#define BACK 7 /* no Match "", "next" ptr points backward. */
#define EXACTLY 8 /* str Match this string (preceded by length). */
@@ -105,7 +108,7 @@
#ifndef DOINIT
extern char varies[];
#else
-char varies[] = {BRANCH,BACK,STAR,PLUS,
+char varies[] = {BRANCH,BACK,STAR,PLUS,CURLY,
REF+1,REF+2,REF+3,REF+4,REF+5,REF+6,REF+7,REF+8,REF+9,0};
#endif
@@ -113,7 +116,7 @@ char varies[] = {BRANCH,BACK,STAR,PLUS,
#ifndef DOINIT
extern char simple[];
#else
-char simple[] = {ANY,ANYOF,ANYBUT,ALNUM,NALNUM,SPACE,NSPACE,DIGIT,NDIGIT,0};
+char simple[] = {ANY,ANYOF,ALNUM,NALNUM,SPACE,NSPACE,DIGIT,NDIGIT,0};
#endif
EXT char regdummy;
@@ -145,8 +148,12 @@ EXT char regdummy;
#ifndef lint
#ifdef REGALIGN
#define NEXT(p) (*(short*)(p+1))
+#define ARG1(p) (*(unsigned short*)(p+3))
+#define ARG2(p) (*(unsigned short*)(p+5))
#else
#define NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&0377))
+#define ARG1(p) (((*((p)+3)&0377)<<8) + (*((p)+4)&0377))
+#define ARG2(p) (((*((p)+5)&0377)<<8) + (*((p)+6)&0377))
#endif
#else /* lint */
#define NEXT(p) 0