X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regcomp.h;h=e30e67f30f4be15b707e3edbfc6db73bfb0fe047;hb=422af00a325a1ad9ccc3d4fb7a0c04b9ab88ade6;hp=2fcf7a917aaa8c754183b1d1bd5c65f19d931d9c;hpb=34baa6c30415f54e9b8c2e622de1e229cf36d781;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regcomp.h b/regcomp.h index 2fcf7a9..e30e67f 100644 --- a/regcomp.h +++ b/regcomp.h @@ -185,11 +185,16 @@ struct regnode_charclass_class { #define ANYOF_FOLD 0x02 #define ANYOF_LOCALE 0x01 +/* Used for regstclass only */ +#define ANYOF_EOS 0x10 /* Can match an empty string too */ + /* Character classes for node->classflags of ANYOF */ +/* Should be synchronized with a table in regprop() */ +/* 2n should pair with 2n+1 */ #define ANYOF_ALNUM 0 /* \w, utf8::IsWord, isALNUM() */ #define ANYOF_NALNUM 1 -#define ANYOF_SPACE 2 +#define ANYOF_SPACE 2 /* \s */ #define ANYOF_NSPACE 3 #define ANYOF_DIGIT 4 #define ANYOF_NDIGIT 5 @@ -213,8 +218,12 @@ struct regnode_charclass_class { #define ANYOF_NUPPER 23 #define ANYOF_XDIGIT 24 #define ANYOF_NXDIGIT 25 +#define ANYOF_PSXSPC 26 /* POSIX space: \s plus the vertical tab */ +#define ANYOF_NPSXSPC 27 +#define ANYOF_BLANK 28 +#define ANYOF_NBLANK 29 /* GNU extension: space and tab */ -#define ANYOF_MAX 31 +#define ANYOF_MAX 32 /* Backward source code compatibility. */ @@ -264,20 +273,6 @@ struct regnode_charclass_class { #define UCHARAT(p) PL_regdummy #endif /* lint */ -#define FAIL(m) \ - STMT_START { \ - if (!SIZE_ONLY) \ - SAVEDESTRUCTOR_X(clear_re,(void*)PL_regcomp_rx); \ - Perl_croak(aTHX_ "/%.127s/: %s", PL_regprecomp,m); \ - } STMT_END - -#define FAIL2(pat,m) \ - STMT_START { \ - if (!SIZE_ONLY) \ - SAVEDESTRUCTOR_X(clear_re,(void*)PL_regcomp_rx); \ - S_re_croak2(aTHX_ "/%.127s/: ",pat,PL_regprecomp,m); \ - } STMT_END - #define EXTRA_SIZE(guy) ((sizeof(guy)-1)/sizeof(struct regnode)) #define REG_SEEN_ZERO_LEN 1