diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-08-12 11:50:54 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-11-19 17:13:00 -0700 |
commit | 9e84774b2a68a51af5e246f365059d61ebe86fb0 (patch) | |
tree | 2c2b75922b0cbfd4ba87e2bd96841ac9793fe176 | |
parent | f39a4dc253ff51cabd56ad1bfcb65547ce7be501 (diff) | |
download | perl-9e84774b2a68a51af5e246f365059d61ebe86fb0.tar.gz |
regcomp.sym: Change regkind for NPOSIX regnodes
It turns out that it is more convenient for the complement of a node to
have a regkind that is also the complement of a node. This creates
slight inconveniences that are included in this patch, but will help
further patches.
-rw-r--r-- | regcomp.c | 4 | ||||
-rw-r--r-- | regcomp.sym | 8 | ||||
-rw-r--r-- | regnodes.h | 8 |
3 files changed, 10 insertions, 10 deletions
@@ -12585,7 +12585,7 @@ parseit: ret = reg_node(pRExC_state, op); - if (PL_regkind[op] == POSIXD) { + if (PL_regkind[op] == POSIXD || PL_regkind[op] == NPOSIXD) { if (! SIZE_ONLY) { FLAGS(ret) = arg; } @@ -14097,7 +14097,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o) Perl_sv_catpvf(aTHX_ sv, "%s]", PL_colors[1]); } - else if (k == POSIXD) { + else if (k == POSIXD || k == NPOSIXD) { U8 index = FLAGS(o) * 2; if (index > (sizeof(anyofs) / sizeof(anyofs[0]))) { Perl_sv_catpvf(aTHX_ sv, "[illegal type=%d])", index); diff --git a/regcomp.sym b/regcomp.sym index 3b4db9c9d7..eb8ba46238 100644 --- a/regcomp.sym +++ b/regcomp.sym @@ -89,10 +89,10 @@ POSIXD POSIXD, none 0 S ; currently unused except as a placeholder POSIXL POSIXD, none 0 S ; currently unused except as a placeholder POSIXU POSIXD, none 0 S ; currently unused except as a placeholder POSIXA POSIXD, none 0 S ; Some [[:class:]] under /a; the FLAGS field gives which one -NPOSIXD POSIXD, none 0 S ; currently unused except as a placeholder -NPOSIXL POSIXD, none 0 S ; currently unused except as a placeholder -NPOSIXU POSIXD, none 0 S ; currently unused except as a placeholder -NPOSIXA POSIXD, none 0 S ; complement of POSIXA, [[:^class:]] +NPOSIXD NPOSIXD, none 0 S ; currently unused except as a placeholder +NPOSIXL NPOSIXD, none 0 S ; currently unused except as a placeholder +NPOSIXU NPOSIXD, none 0 S ; currently unused except as a placeholder +NPOSIXA NPOSIXD, none 0 S ; complement of POSIXA, [[:^class:]] # End of order is important (within groups) CLUMP CLUMP, no 0 V ; Match any extended grapheme cluster sequence diff --git a/regnodes.h b/regnodes.h index b8278ccde3..2024d156bb 100644 --- a/regnodes.h +++ b/regnodes.h @@ -229,10 +229,10 @@ EXTCONST U8 PL_regkind[] = { POSIXD, /* POSIXL */ POSIXD, /* POSIXU */ POSIXD, /* POSIXA */ - POSIXD, /* NPOSIXD */ - POSIXD, /* NPOSIXL */ - POSIXD, /* NPOSIXU */ - POSIXD, /* NPOSIXA */ + NPOSIXD, /* NPOSIXD */ + NPOSIXD, /* NPOSIXL */ + NPOSIXD, /* NPOSIXU */ + NPOSIXD, /* NPOSIXA */ CLUMP, /* CLUMP */ BRANCH, /* BRANCH */ BACK, /* BACK */ |