This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make the use64bits and usethreads friendlier/braver;
[perl5.git] / regcomp.sym
CommitLineData
d09b2d29
IZ
1# Format:
2# NAME \t TYPE, arg-description [num-args] [longjump-len] \t DESCRIPTION
3
4# Empty rows and #-comment rows are ignored.
5
6# Exit points
7END END, no End of program.
8SUCCEED END, no Return from a subroutine, basically.
9
10# Anchors:
11BOL BOL, no Match "" at beginning of line.
12MBOL BOL, no Same, assuming multiline.
13SBOL BOL, no Same, assuming singleline.
b85d18e9 14EOS EOL, no Match "" at end of string.
d09b2d29
IZ
15EOL EOL, no Match "" at end of line.
16MEOL EOL, no Same, assuming multiline.
17SEOL EOL, no Same, assuming singleline.
18BOUND BOUND, no Match "" at any word boundary
a0ed51b3 19BOUNDUTF8 BOUND, no Match "" at any word boundary
d09b2d29 20BOUNDL BOUND, no Match "" at any word boundary
a0ed51b3 21BOUNDLUTF8 BOUND, no Match "" at any word boundary
d09b2d29 22NBOUND NBOUND, no Match "" at any word non-boundary
a0ed51b3 23NBOUNDUTF8 NBOUND, no Match "" at any word non-boundary
d09b2d29 24NBOUNDL NBOUND, no Match "" at any word non-boundary
a0ed51b3 25NBOUNDLUTF8 NBOUND, no Match "" at any word non-boundary
d09b2d29
IZ
26GPOS GPOS, no Matches where last m//g left off.
27
28# [Special] alternatives
22c35a8c
GS
29REG_ANY REG_ANY, no Match any one character (except newline).
30ANYUTF8 REG_ANY, no Match any one Unicode character (except newline).
31SANY REG_ANY, no Match any one character.
32SANYUTF8 REG_ANY, no Match any one Unicode character.
d09b2d29 33ANYOF ANYOF, sv Match character in (or not in) this class.
a0ed51b3 34ANYOFUTF8 ANYOF, sv 1 Match character in (or not in) this class.
d09b2d29 35ALNUM ALNUM, no Match any alphanumeric character
a0ed51b3 36ALNUMUTF8 ALNUM, no Match any alphanumeric character
d09b2d29 37ALNUML ALNUM, no Match any alphanumeric char in locale
a0ed51b3 38ALNUMLUTF8 ALNUM, no Match any alphanumeric char in locale
d09b2d29 39NALNUM NALNUM, no Match any non-alphanumeric character
a0ed51b3 40NALNUMUTF8 NALNUM, no Match any non-alphanumeric character
d09b2d29 41NALNUML NALNUM, no Match any non-alphanumeric char in locale
a0ed51b3 42NALNUMLUTF8 NALNUM, no Match any non-alphanumeric char in locale
d09b2d29 43SPACE SPACE, no Match any whitespace character
a0ed51b3 44SPACEUTF8 SPACE, no Match any whitespace character
d09b2d29 45SPACEL SPACE, no Match any whitespace char in locale
a0ed51b3 46SPACELUTF8 SPACE, no Match any whitespace char in locale
d09b2d29 47NSPACE NSPACE, no Match any non-whitespace character
a0ed51b3 48NSPACEUTF8 NSPACE, no Match any non-whitespace character
d09b2d29 49NSPACEL NSPACE, no Match any non-whitespace char in locale
a0ed51b3 50NSPACELUTF8 NSPACE, no Match any non-whitespace char in locale
d09b2d29 51DIGIT DIGIT, no Match any numeric character
a0ed51b3 52DIGITUTF8 DIGIT, no Match any numeric character
b8c5462f
JH
53DIGITL DIGIT, no Match any numeric character in locale
54DIGITLUTF8 DIGIT, no Match any numeric character in locale
d09b2d29 55NDIGIT NDIGIT, no Match any non-numeric character
a0ed51b3 56NDIGITUTF8 NDIGIT, no Match any non-numeric character
b8c5462f
JH
57NDIGITL NDIGIT, no Match any non-numeric character in locale
58NDIGITLUTF8 NDIGIT, no Match any non-numeric character in locale
59ALNUMC ALNUMC, no Match any alphanumeric character
60ALNUMCUTF8 ALNUMC, no Match any alphanumeric character
61ALNUMCL ALNUMC, no Match any alphanumeric character in locale
62ALNUMCLUTF8 ALNUMC, no Match any alphanumeric character in locale
63NALNUMC NALNUMC, no Match any non-alphanumeric character
64NALNUMCUTF8 NALNUMC, no Match any non-alphanumeric character
65NALNUMCL NALNUMC, no Match any non-alphanumeric character in locale
66NALNUMCLUTF8 NALNUMC, no Match any non-alphanumeric character in locale
67ALPHA ALPHA, no Match any alphabetic character
68ALPHAUTF8 ALPHA, no Match any alphabetic character
69ALPHAL ALPHA, no Match any alphabetic character in locale
70ALPHALUTF8 ALPHA, no Match any alphabetic character in locale
71NALPHA NALPHA, no Match any non-alphabetic character
72NALPHAUTF8 NALPHA, no Match any non-alphabetic character
73NALPHAL NALPHA, no Match any non-alphabetic character in locale
74NALPHALUTF8 NALPHA, no Match any non-alphabetic character in locale
75ASCII ASCII, no Match any ASCII character
76NASCII NASCII, no Match any non-ASCII character
77CNTRL CNTRL, no Match any control character
78CNTRLUTF8 CNTRL, no Match any control character
79CNTRLL CNTRL, no Match any control character in locale
80CNTRLLUTF8 CNTRL, no Match any control character in locale
81NCNTRL NCNTRL, no Match any non-control character
82NCNTRLUTF8 NCNTRL, no Match any non-control character
83NCNTRLL NCNTRL, no Match any non-control character in locale
84NCNTRLLUTF8 NCNTRL, no Match any non-control character in locale
85GRAPH GRAPH, no Match any graphical character
86GRAPHUTF8 GRAPH, no Match any graphical character
87GRAPHL GRAPH, no Match any graphical character in locale
88GRAPHLUTF8 GRAPH, no Match any graphical character in locale
89NGRAPH NGRAPH, no Match any non-graphical character
90NGRAPHUTF8 NGRAPH, no Match any non-graphical character
91NGRAPHL NGRAPH, no Match any non-graphical character in locale
92NGRAPHLUTF8 NGRAPH, no Match any non-graphical character in locale
93LOWER LOWER, no Match any lowercase character
94LOWERUTF8 LOWER, no Match any lowercase character
95LOWERL LOWER, no Match any lowercase character in locale
96LOWERLUTF8 LOWER, no Match any lowercase character in locale
97NLOWER NLOWER, no Match any non-lowercase character
98NLOWERUTF8 NLOWER, no Match any non-lowercase character
99NLOWERL NLOWER, no Match any non-lowercase character in locale
100NLOWERLUTF8 NLOWER, no Match any non-lowercase character in locale
101PRINT PRINT, no Match any printable character
102PRINTUTF8 PRINT, no Match any printable character
103PRINTL PRINT, no Match any printable character in locale
104PRINTLUTF8 PRINT, no Match any printable character in locale
105NPRINT NPRINT, no Match any non-printable character
106NPRINTUTF8 NPRINT, no Match any non-printable character
107NPRINTL NPRINT, no Match any non-printable character in locale
108NPRINTLUTF8 NPRINT, no Match any non-printable character in locale
109PUNCT PUNCT, no Match any punctuation character
110PUNCTUTF8 PUNCT, no Match any punctuation character
111PUNCTL PUNCT, no Match any punctuation character in locale
112PUNCTLUTF8 PUNCT, no Match any punctuation character in locale
113NPUNCT NPUNCT, no Match any non-punctuation character
114NPUNCTUTF8 NPUNCT, no Match any non-punctuation character
115NPUNCTL NPUNCT, no Match any non-punctuation character in locale
116NPUNCTLUTF8 NPUNCT, no Match any non-punctuation character in locale
117UPPER UPPER, no Match any uppercase character
118UPPERUTF8 UPPER, no Match any uppercase character
119UPPERL UPPER, no Match any uppercase character in locale
120UPPERLUTF8 UPPER, no Match any uppercase character in locale
121NUPPER NUPPER, no Match any non-uppercase character
122NUPPERUTF8 NUPPER, no Match any non-uppercase character
123NUPPERL NUPPER, no Match any non-uppercase character in locale
124NUPPERLUTF8 NUPPER, no Match any non-uppercase character in locale
125XDIGIT XDIGIT, no Match any hexdigit character
126NXDIGIT NXDIGIT, no Match any non-hexdigit character
a0ed51b3 127CLUMP CLUMP, no Match any combining character sequence
d09b2d29
IZ
128
129# BRANCH The set of branches constituting a single choice are hooked
130# together with their "next" pointers, since precedence prevents
131# anything being concatenated to any individual branch. The
132# "next" pointer of the last BRANCH in a choice points to the
133# thing following the whole choice. This is also where the
134# final "next" pointer of each individual branch points; each
135# branch starts with the operand node of a BRANCH node.
136#
137BRANCH BRANCH, node Match this alternative, or the next...
138
139# BACK Normal "next" pointers all implicitly point forward; BACK
140# exists to make loop structures possible.
141# not used
142BACK BACK, no Match "", "next" ptr points backward.
143
144# Literals
145EXACT EXACT, sv Match this string (preceded by length).
146EXACTF EXACT, sv Match this string, folded (prec. by length).
147EXACTFL EXACT, sv Match this string, folded in locale (w/len).
148
149# Do nothing
150NOTHING NOTHING,no Match empty string.
151# A variant of above which delimits a group, thus stops optimizations
152TAIL NOTHING,no Match empty string. Can jump here from outside.
153
154# STAR,PLUS '?', and complex '*' and '+', are implemented as circular
155# BRANCH structures using BACK. Simple cases (one character
156# per match) are implemented with STAR and PLUS for speed
157# and to minimize recursive plunges.
158#
159STAR STAR, node Match this (simple) thing 0 or more times.
160PLUS PLUS, node Match this (simple) thing 1 or more times.
161
162CURLY CURLY, sv 2 Match this simple thing {n,m} times.
163CURLYN CURLY, no 2 Match next-after-this simple thing
164# {n,m} times, set parenths.
165CURLYM CURLY, no 2 Match this medium-complex thing {n,m} times.
166CURLYX CURLY, sv 2 Match this complex thing {n,m} times.
167
168# This terminator creates a loop structure for CURLYX
169WHILEM WHILEM, no Do curly processing and see if rest matches.
170
171# OPEN,CLOSE,GROUPP ...are numbered at compile time.
172OPEN OPEN, num 1 Mark this point in input as start of #n.
173CLOSE CLOSE, num 1 Analogous to OPEN.
174
175REF REF, num 1 Match some already matched string
176REFF REF, num 1 Match already matched string, folded
177REFFL REF, num 1 Match already matched string, folded in loc.
178
179# grouping assertions
180IFMATCH BRANCHJ,off 1 2 Succeeds if the following matches.
181UNLESSM BRANCHJ,off 1 2 Fails if the following matches.
182SUSPEND BRANCHJ,off 1 1 "Independent" sub-RE.
183IFTHEN BRANCHJ,off 1 1 Switch, should be preceeded by switcher .
184GROUPP GROUPP, num 1 Whether the group matched.
185
186# Support for long RE
187LONGJMP LONGJMP,off 1 1 Jump far away.
188BRANCHJ BRANCHJ,off 1 1 BRANCH with long offset.
189
190# The heavy worker
191EVAL EVAL, evl 1 Execute some Perl code.
192
193# Modifiers
194MINMOD MINMOD, no Next operator is not greedy.
195LOGICAL LOGICAL,no Next opcode should set the flag only.
196
197# This is not used yet
198RENUM BRANCHJ,off 1 1 Group with independently numbered parens.
199
200# This is not really a node, but an optimized away piece of a "long" node.
201# To simplify debugging output, we mark it as if it were a node
202OPTIMIZED NOTHING,off Placeholder for dump.