summaryrefslogtreecommitdiff
path: root/regcomp.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2010-10-31 12:07:43 -0600
committerFather Chrysostomos <sprout@cpan.org>2010-10-31 16:05:19 -0700
commitbf3f2d85838ef8cae6a146bc0d731316fbdb3554 (patch)
treeee4843edf0889021441b07dd100f4a90086e10f3 /regcomp.h
parenteb91e30040d44cf387bdcd0ad4dd10fec2d95799 (diff)
downloadperl-bf3f2d85838ef8cae6a146bc0d731316fbdb3554.tar.gz
regcomp.h: Clean up some comments
Diffstat (limited to 'regcomp.h')
-rw-r--r--regcomp.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/regcomp.h b/regcomp.h
index 062bd019f5..06e179dca6 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -204,15 +204,16 @@ struct regnode_charclass {
U8 flags;
U8 type;
U16 next_off;
- U32 arg1;
+ U32 arg1; /* used as ptr in S_regclass */
char bitmap[ANYOF_BITMAP_SIZE]; /* only compile-time */
};
-struct regnode_charclass_class { /* has [[:blah:]] classes */
- U8 flags; /* should have ANYOF_CLASS here */
+/* has runtime (locale) \d, \w, ..., [:posix:] classes */
+struct regnode_charclass_class {
+ U8 flags; /* ANYOF_CLASS bit must go here */
U8 type;
U16 next_off;
- U32 arg1;
+ U32 arg1; /* used as ptr in S_regclass */
char bitmap[ANYOF_BITMAP_SIZE]; /* both compile-time */
char classflags[ANYOF_CLASSBITMAP_SIZE]; /* and run-time */
};
@@ -271,7 +272,7 @@ struct regnode_charclass_class { /* has [[:blah:]] classes */
#undef STRING
#define OP(p) ((p)->type)
-#define FLAGS(p) ((p)->flags) /* Caution: Doesn't apply to all
+#define FLAGS(p) ((p)->flags) /* Caution: Doesn't apply to all \
regnode types */
#define OPERAND(p) (((struct regnode_string *)p)->string)
#define MASK(p) ((char*)OPERAND(p))
@@ -319,12 +320,11 @@ struct regnode_charclass_class { /* has [[:blah:]] classes */
#define ANYOF_FOLD 0x02
#define ANYOF_LOCALE 0x01
-/* Used for regstclass only */
-#define ANYOF_EOS 0x10 /* Can match an empty string too */
+/* EOS used for regstclass only */
+#define ANYOF_EOS 0x10 /* Can match an empty string too */
-/* There is a character or a range past 0xff */
-#define ANYOF_UNICODE 0x20
-#define ANYOF_UNICODE_ALL 0x40 /* Can match any char past 0xff */
+#define ANYOF_UNICODE 0x20 /* Matches >= one thing past 0xff */
+#define ANYOF_UNICODE_ALL 0x40 /* Matches 0x100 - infinity */
/* Are there any runtime flags on in this node? */
#define ANYOF_RUNTIME(s) (ANYOF_FLAGS(s) & 0x0f)