perl 4.0 patch 14: patch #11, continued
[p5sagit/p5-mst-13.2.git] / regcomp.h
index c4c6520..8d0d1fa 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -1,8 +1,11 @@
-/* $Header: regcomp.h,v 3.0 89/10/18 15:22:39 lwall Locked $
+/* $RCSfile: regcomp.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:49:40 $
  *
  * $Log:       regcomp.h,v $
- * Revision 3.0  89/10/18  15:22:39  lwall
- * 3.0 baseline
+ * Revision 4.0.1.1  91/06/07  11:49:40  lwall
+ * patch4: no change
+ * 
+ * Revision 4.0  91/03/20  01:39:09  lwall
+ * 4.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). */
 #define NSPACE 17      /* no   Match any non-whitespace character */
 #define DIGIT  18      /* no   Match any numeric character */
 #define NDIGIT 19      /* no   Match any non-numeric character */
-#define REF    20      /* no   Match some already matched string */
-#define        OPEN    30      /* no   Mark this point in input as start of #n. */
-                       /*      OPEN+1 is number 1, etc. */
-#define        CLOSE   40      /* no   Analogous to OPEN. */
-/* CLOSE must be last one! see regmust finder */
+#define REF    20      /* num  Match some already matched string */
+#define        OPEN    21      /* num  Mark this point in input as start of #n. */
+#define        CLOSE   22      /* num  Analogous to OPEN. */
 
 /*
  * Opcode notes:
  * OPEN,CLOSE  ...are numbered at compile time.
  */
 
+#ifndef DOINIT
+extern char regarglen[];
+#else
+char regarglen[] = {0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2};
+#endif
+
 /* The following have no fixed length. */
 #ifndef DOINIT
 extern char varies[];
 #else
-char varies[] = {BRANCH,BACK,STAR,PLUS,
-       REF+1,REF+2,REF+3,REF+4,REF+5,REF+6,REF+7,REF+8,REF+9,0};
+char varies[] = {BRANCH,BACK,STAR,PLUS,CURLY,REF,0};
 #endif
 
 /* The following always have a length of 1. */
 #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;
@@ -136,17 +142,23 @@ EXT char regdummy;
 
 #ifndef gould
 #ifndef cray
+#ifndef eta10
 #define REGALIGN
 #endif
 #endif
+#endif
 
 #define        OP(p)   (*(p))
 
 #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