X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/2242947801b5a89c42ffba93b4c406f75e4cd049..d98d5fa08bf12cec80dc7627c70732eeb3c24baa:/regnodes.h diff --git a/regnodes.h b/regnodes.h index 6f6e0b2..4e0f44d 100644 --- a/regnodes.h +++ b/regnodes.h @@ -6,8 +6,8 @@ /* Regops and State definitions */ -#define REGNODE_MAX 84 -#define REGMATCH_STATE_MAX 124 +#define REGNODE_MAX 90 +#define REGMATCH_STATE_MAX 130 #define END 0 /* 0000 End of program. */ #define SUCCEED 1 /* 0x01 Return from a subroutine, basically. */ @@ -92,8 +92,14 @@ #define COMMIT 80 /* 0x50 Pattern fails outright if backtracking through this */ #define CUTGROUP 81 /* 0x51 On failure go to the next alternation in the group */ #define KEEPS 82 /* 0x52 $& begins here. */ -#define OPTIMIZED 83 /* 0x53 Placeholder for dump. */ -#define PSEUDO 84 /* 0x54 Pseudo opcode for internal use. */ +#define LNBREAK 83 /* 0x53 generic newline pattern */ +#define VERTWS 84 /* 0x54 vertical whitespace (Perl 6) */ +#define NVERTWS 85 /* 0x55 not vertical whitespace (Perl 6) */ +#define HORIZWS 86 /* 0x56 horizontal whitespace (Perl 6) */ +#define NHORIZWS 87 /* 0x57 not horizontal whitespace (Perl 6) */ +#define FOLDCHAR 88 /* 0x58 codepoint with tricky case folding properties. */ +#define OPTIMIZED 89 /* 0x59 Placeholder for dump. */ +#define PSEUDO 90 /* 0x5a Pseudo opcode for internal use. */ /* ------------ States ------------- */ #define TRIE_next (REGNODE_MAX + 1) /* state for TRIE */ #define TRIE_next_fail (REGNODE_MAX + 2) /* state for TRIE */ @@ -225,6 +231,12 @@ EXTCONST U8 PL_regkind[] = { VERB, /* COMMIT */ VERB, /* CUTGROUP */ KEEPS, /* KEEPS */ + LNBREAK, /* LNBREAK */ + VERTWS, /* VERTWS */ + NVERTWS, /* NVERTWS */ + HORIZWS, /* HORIZWS */ + NHORIZWS, /* NHORIZWS */ + FOLDCHAR, /* FOLDCHAR */ NOTHING, /* OPTIMIZED */ PSEUDO, /* PSEUDO */ /* ------------ States ------------- */ @@ -358,6 +370,12 @@ static const U8 regarglen[] = { EXTRA_SIZE(struct regnode_1), /* COMMIT */ EXTRA_SIZE(struct regnode_1), /* CUTGROUP */ 0, /* KEEPS */ + 0, /* LNBREAK */ + 0, /* VERTWS */ + 0, /* NVERTWS */ + 0, /* HORIZWS */ + 0, /* NHORIZWS */ + EXTRA_SIZE(struct regnode_1), /* FOLDCHAR */ 0, /* OPTIMIZED */ 0, /* PSEUDO */ }; @@ -448,6 +466,12 @@ static const char reg_off_by_arg[] = { 0, /* COMMIT */ 0, /* CUTGROUP */ 0, /* KEEPS */ + 0, /* LNBREAK */ + 0, /* VERTWS */ + 0, /* NVERTWS */ + 0, /* HORIZWS */ + 0, /* NHORIZWS */ + 0, /* FOLDCHAR */ 0, /* OPTIMIZED */ 0, /* PSEUDO */ }; @@ -459,7 +483,7 @@ static const char reg_off_by_arg[] = { #ifndef DOINIT EXTCONST char * PL_reg_name[]; #else -EXTCONST char * PL_reg_name[] = { +EXTCONST char * const PL_reg_name[] = { "END", /* 0000 */ "SUCCEED", /* 0x01 */ "BOL", /* 0x02 */ @@ -543,8 +567,14 @@ EXTCONST char * PL_reg_name[] = { "COMMIT", /* 0x50 */ "CUTGROUP", /* 0x51 */ "KEEPS", /* 0x52 */ - "OPTIMIZED", /* 0x53 */ - "PSEUDO", /* 0x54 */ + "LNBREAK", /* 0x53 */ + "VERTWS", /* 0x54 */ + "NVERTWS", /* 0x55 */ + "HORIZWS", /* 0x56 */ + "NHORIZWS", /* 0x57 */ + "FOLDCHAR", /* 0x58 */ + "OPTIMIZED", /* 0x59 */ + "PSEUDO", /* 0x5a */ /* ------------ States ------------- */ "TRIE_next", /* REGNODE_MAX +0x01 */ "TRIE_next_fail", /* REGNODE_MAX +0x02 */