2 # NAME \t TYPE, arg-description [num-args] [longjump-len] \t DESCRIPTION
4 # Empty rows and #-comment rows are ignored.
6 # Note that the order in this file is important.
8 # Add new regops to the end, and do not re-order the existing ops.
13 END END, no End of program.
14 SUCCEED END, no Return from a subroutine, basically.
18 BOL BOL, no Match "" at beginning of line.
19 MBOL BOL, no Same, assuming multiline.
20 SBOL BOL, no Same, assuming singleline.
21 EOS EOL, no Match "" at end of string.
22 EOL EOL, no Match "" at end of line.
23 MEOL EOL, no Same, assuming multiline.
24 SEOL EOL, no Same, assuming singleline.
25 BOUND BOUND, no Match "" at any word boundary
26 BOUNDL BOUND, no Match "" at any word boundary
27 NBOUND NBOUND, no Match "" at any word non-boundary
28 NBOUNDL NBOUND, no Match "" at any word non-boundary
29 GPOS GPOS, no Matches where last m//g left off.
31 #* [Special] alternatives: (14..30)
33 REG_ANY REG_ANY, no Match any one character (except newline).
34 SANY REG_ANY, no Match any one character.
35 CANY REG_ANY, no Match any one byte.
36 ANYOF ANYOF, sv Match character in (or not in) this class.
37 ALNUM ALNUM, no Match any alphanumeric character
38 ALNUML ALNUM, no Match any alphanumeric char in locale
39 NALNUM NALNUM, no Match any non-alphanumeric character
40 NALNUML NALNUM, no Match any non-alphanumeric char in locale
41 SPACE SPACE, no Match any whitespace character
42 SPACEL SPACE, no Match any whitespace char in locale
43 NSPACE NSPACE, no Match any non-whitespace character
44 NSPACEL NSPACE, no Match any non-whitespace char in locale
45 DIGIT DIGIT, no Match any numeric character
46 DIGITL DIGIT, no Match any numeric character in locale
47 NDIGIT NDIGIT, no Match any non-numeric character
48 NDIGITL NDIGIT, no Match any non-numeric character in locale
49 CLUMP CLUMP, no Match any combining character sequence
53 # BRANCH The set of branches constituting a single choice are hooked
54 # together with their "next" pointers, since precedence prevents
55 # anything being concatenated to any individual branch. The
56 # "next" pointer of the last BRANCH in a choice points to the
57 # thing following the whole choice. This is also where the
58 # final "next" pointer of each individual branch points; each
59 # branch starts with the operand node of a BRANCH node.
61 BRANCH BRANCH, node Match this alternative, or the next...
65 # BACK Normal "next" pointers all implicitly point forward; BACK
66 # exists to make loop structures possible.
68 BACK BACK, no Match "", "next" ptr points backward.
72 EXACT EXACT, sv Match this string (preceded by length).
73 EXACTF EXACT, sv Match this string, folded (prec. by length).
74 EXACTFL EXACT, sv Match this string, folded in locale (w/len).
76 #*Do nothing types (36..37)
78 NOTHING NOTHING,no Match empty string.
79 # A variant of above which delimits a group, thus stops optimizations
80 TAIL NOTHING,no Match empty string. Can jump here from outside.
84 # STAR,PLUS '?', and complex '*' and '+', are implemented as circular
85 # BRANCH structures using BACK. Simple cases (one character
86 # per match) are implemented with STAR and PLUS for speed
87 # and to minimize recursive plunges.
89 STAR STAR, node Match this (simple) thing 0 or more times.
90 PLUS PLUS, node Match this (simple) thing 1 or more times.
92 CURLY CURLY, sv 2 Match this simple thing {n,m} times.
93 CURLYN CURLY, no 2 Match next-after-this simple thing
94 # {n,m} times, set parenths.
95 CURLYM CURLY, no 2 Match this medium-complex thing {n,m} times.
96 CURLYX CURLY, sv 2 Match this complex thing {n,m} times.
98 # This terminator creates a loop structure for CURLYX
99 WHILEM WHILEM, no Do curly processing and see if rest matches.
101 #*Buffer related (45..49)
103 # OPEN,CLOSE,GROUPP ...are numbered at compile time.
104 OPEN OPEN, num 1 Mark this point in input as start of #n.
105 CLOSE CLOSE, num 1 Analogous to OPEN.
107 REF REF, num 1 Match some already matched string
108 REFF REF, num 1 Match already matched string, folded
109 REFFL REF, num 1 Match already matched string, folded in loc.
111 #*Grouping assertions (50..54)
113 IFMATCH BRANCHJ,off 1 2 Succeeds if the following matches.
114 UNLESSM BRANCHJ,off 1 2 Fails if the following matches.
115 SUSPEND BRANCHJ,off 1 1 "Independent" sub-RE.
116 IFTHEN BRANCHJ,off 1 1 Switch, should be preceeded by switcher .
117 GROUPP GROUPP, num 1 Whether the group matched.
119 #*Support for long RE (55..56)
121 LONGJMP LONGJMP,off 1 1 Jump far away.
122 BRANCHJ BRANCHJ,off 1 1 BRANCH with long offset.
124 #*The heavy worker (57..58)
126 EVAL EVAL, evl 1 Execute some Perl code.
130 MINMOD MINMOD, no Next operator is not greedy.
131 LOGICAL LOGICAL,no Next opcode should set the flag only.
133 # This is not used yet (61)
134 RENUM BRANCHJ,off 1 1 Group with independently numbered parens.
136 #*Trie Related (62..64)
138 # Behave the same as A|LIST|OF|WORDS would. The '..C' variants have
139 # inline charclass data (ascii only), the 'C' store it in the structure.
140 # NOTE: the relative order of the TRIE-like regops is signifigant
142 TRIE TRIE, trie 1 Match many EXACT(FL?)? at once. flags==type
143 TRIEC TRIE, trie charclass Same as TRIE, but with embedded charclass data
145 # For start classes, contains an added fail table.
146 AHOCORASICK TRIE, trie 1 Aho Corasick stclass. flags==type
147 AHOCORASICKC TRIE, trie charclass Same as AHOCORASICK, but with embedded charclass data
149 # NEW STUFF ABOVE THIS LINE -- Please update counts below.
151 #*Special Nodes (65, 66)
153 # This is not really a node, but an optimized away piece of a "long" node.
154 # To simplify debugging output, we mark it as if it were a node
155 OPTIMIZED NOTHING,off Placeholder for dump.
157 # Special opcode with the property that no opcode in a compiled program
158 # will ever be of this type. Thus it can be used as a flag value that
159 # no other opcode has been seen. END is used similarly, in that an END
160 # node cant be optimized. So END implies "unoptimizable" and PSEUDO mean
161 # "not seen anything to optimize yet".
162 PSEUDO PSEUDO,off Pseudo opcode for internal use.