summaryrefslogtreecommitdiff
path: root/regcomp.h
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2007-04-23 01:34:55 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-04-23 09:04:31 +0000
commite1d1eefb8c88e0dcaf2bb9e6c04d7f6192be966f (patch)
tree6930eda70a9e751e8789ca568d015204ca292552 /regcomp.h
parent8638e433f90c5046b38f1d145c125bad5dbfdb7e (diff)
downloadperl-e1d1eefb8c88e0dcaf2bb9e6c04d7f6192be966f.tar.gz
Change meaning of \v, \V, and add \h, \H to match Perl6, add \R to match PCRE and unicode tr18
Message-ID: <9b18b3110704221434g43457742p28cab00289f83639@mail.gmail.com> p4raw-id: //depot/perl@31026
Diffstat (limited to 'regcomp.h')
-rw-r--r--regcomp.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/regcomp.h b/regcomp.h
index 1a0916adb0..70fdeb5f10 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -7,6 +7,7 @@
* License or the Artistic License, as specified in the README file.
*
*/
+#include "regcharclass.h"
typedef OP OP_4tree; /* Will be redefined later. */
@@ -177,7 +178,7 @@ struct regnode_2 {
#define ANYOF_BITMAP_SIZE 32 /* 256 b/(8 b/B) */
-#define ANYOF_CLASSBITMAP_SIZE 4 /* up to 32 (8*4) named classes */
+#define ANYOF_CLASSBITMAP_SIZE 4 /* up to 40 (8*5) named classes */
/* also used by trie */
struct regnode_charclass {
@@ -345,6 +346,14 @@ struct regnode_charclass_class { /* has [[:blah:]] classes */
#define ANYOF_MAX 32
+/* pseudo classes, not stored in the class bitmap, but used as flags
+ during compilation of char classes */
+
+#define ANYOF_VERTWS (ANYOF_MAX+1)
+#define ANYOF_NVERTWS (ANYOF_MAX+2)
+#define ANYOF_HORIZWS (ANYOF_MAX+3)
+#define ANYOF_NHORIZWS (ANYOF_MAX+4)
+
/* Backward source code compatibility. */
#define ANYOF_ALNUML ANYOF_ALNUM
@@ -444,6 +453,8 @@ EXTCONST U8 PL_simple[] = {
SPACE, SPACEL,
NSPACE, NSPACEL,
DIGIT, NDIGIT,
+ VERTWS, NVERTWS,
+ HORIZWS, NHORIZWS,
0
};
#endif
@@ -799,3 +810,4 @@ re.pm, especially to the documentation.
#endif /* DEBUG RELATED DEFINES */
+