This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Smarter OS390 hints.
[perl5.git] / regcomp.sym
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
7 END             END,    no      End of program.
8 SUCCEED         END,    no      Return from a subroutine, basically.
9
10 # Anchors:
11 BOL             BOL,    no      Match "" at beginning of line.
12 MBOL            BOL,    no      Same, assuming multiline.
13 SBOL            BOL,    no      Same, assuming singleline.
14 EOS             EOL,    no      Match "" at end of string.
15 EOL             EOL,    no      Match "" at end of line.
16 MEOL            EOL,    no      Same, assuming multiline.
17 SEOL            EOL,    no      Same, assuming singleline.
18 BOUND           BOUND,  no      Match "" at any word boundary
19 BOUNDUTF8       BOUND,  no      Match "" at any word boundary
20 BOUNDL          BOUND,  no      Match "" at any word boundary
21 BOUNDLUTF8      BOUND,  no      Match "" at any word boundary
22 NBOUND          NBOUND, no      Match "" at any word non-boundary
23 NBOUNDUTF8      NBOUND, no      Match "" at any word non-boundary
24 NBOUNDL         NBOUND, no      Match "" at any word non-boundary
25 NBOUNDLUTF8     NBOUND, no      Match "" at any word non-boundary
26 GPOS            GPOS,   no      Matches where last m//g left off.
27
28 # [Special] alternatives
29 REG_ANY         REG_ANY,    no  Match any one character (except newline).
30 ANYUTF8         REG_ANY,    no  Match any one Unicode character (except newline).
31 SANY            REG_ANY,    no  Match any one character.
32 SANYUTF8        REG_ANY,    no  Match any one Unicode character.
33 ANYOF           ANYOF,  sv      Match character in (or not in) this class.
34 ANYOFUTF8       ANYOF,  sv 1    Match character in (or not in) this class.
35 ALNUM           ALNUM,  no      Match any alphanumeric character
36 ALNUMUTF8       ALNUM,  no      Match any alphanumeric character
37 ALNUML          ALNUM,  no      Match any alphanumeric char in locale
38 ALNUMLUTF8      ALNUM,  no      Match any alphanumeric char in locale
39 NALNUM          NALNUM, no      Match any non-alphanumeric character
40 NALNUMUTF8      NALNUM, no      Match any non-alphanumeric character
41 NALNUML         NALNUM, no      Match any non-alphanumeric char in locale
42 NALNUMLUTF8     NALNUM, no      Match any non-alphanumeric char in locale
43 SPACE           SPACE,  no      Match any whitespace character
44 SPACEUTF8       SPACE,  no      Match any whitespace character
45 SPACEL          SPACE,  no      Match any whitespace char in locale
46 SPACELUTF8      SPACE,  no      Match any whitespace char in locale
47 NSPACE          NSPACE, no      Match any non-whitespace character
48 NSPACEUTF8      NSPACE, no      Match any non-whitespace character
49 NSPACEL         NSPACE, no      Match any non-whitespace char in locale
50 NSPACELUTF8     NSPACE, no      Match any non-whitespace char in locale
51 DIGIT           DIGIT,  no      Match any numeric character
52 DIGITUTF8       DIGIT,  no      Match any numeric character
53 DIGITL          DIGIT,  no      Match any numeric character in locale
54 DIGITLUTF8      DIGIT,  no      Match any numeric character in locale
55 NDIGIT          NDIGIT, no      Match any non-numeric character
56 NDIGITUTF8      NDIGIT, no      Match any non-numeric character
57 NDIGITL         NDIGIT, no      Match any non-numeric character in locale
58 NDIGITLUTF8     NDIGIT, no      Match any non-numeric character in locale
59 ALNUMC          ALNUMC,  no     Match any alphanumeric character
60 ALNUMCUTF8      ALNUMC,  no     Match any alphanumeric character
61 ALNUMCL         ALNUMC,  no     Match any alphanumeric character in locale
62 ALNUMCLUTF8     ALNUMC,  no     Match any alphanumeric character in locale
63 NALNUMC         NALNUMC, no     Match any non-alphanumeric character
64 NALNUMCUTF8     NALNUMC, no     Match any non-alphanumeric character
65 NALNUMCL        NALNUMC, no     Match any non-alphanumeric character in locale
66 NALNUMCLUTF8    NALNUMC, no     Match any non-alphanumeric character in locale
67 ALPHA           ALPHA,  no      Match any alphabetic character
68 ALPHAUTF8       ALPHA,  no      Match any alphabetic character
69 ALPHAL          ALPHA,  no      Match any alphabetic character in locale
70 ALPHALUTF8      ALPHA,  no      Match any alphabetic character in locale
71 NALPHA          NALPHA, no      Match any non-alphabetic character
72 NALPHAUTF8      NALPHA, no      Match any non-alphabetic character
73 NALPHAL         NALPHA, no      Match any non-alphabetic character in locale
74 NALPHALUTF8     NALPHA, no      Match any non-alphabetic character in locale
75 ASCII           ASCII,  no      Match any ASCII character
76 NASCII          NASCII, no      Match any non-ASCII character
77 CNTRL           CNTRL,  no      Match any control character
78 CNTRLUTF8       CNTRL,  no      Match any control character
79 CNTRLL          CNTRL,  no      Match any control character in locale
80 CNTRLLUTF8      CNTRL,  no      Match any control character in locale
81 NCNTRL          NCNTRL, no      Match any non-control character
82 NCNTRLUTF8      NCNTRL, no      Match any non-control character
83 NCNTRLL         NCNTRL, no      Match any non-control character in locale
84 NCNTRLLUTF8     NCNTRL, no      Match any non-control character in locale
85 GRAPH           GRAPH,  no      Match any graphical character
86 GRAPHUTF8       GRAPH,  no      Match any graphical character
87 GRAPHL          GRAPH,  no      Match any graphical character in locale
88 GRAPHLUTF8      GRAPH,  no      Match any graphical character in locale
89 NGRAPH          NGRAPH, no      Match any non-graphical character
90 NGRAPHUTF8      NGRAPH, no      Match any non-graphical character
91 NGRAPHL         NGRAPH, no      Match any non-graphical character in locale
92 NGRAPHLUTF8     NGRAPH, no      Match any non-graphical character in locale
93 LOWER           LOWER,  no      Match any lowercase character
94 LOWERUTF8       LOWER,  no      Match any lowercase character
95 LOWERL          LOWER,  no      Match any lowercase character in locale
96 LOWERLUTF8      LOWER,  no      Match any lowercase character in locale
97 NLOWER          NLOWER, no      Match any non-lowercase character
98 NLOWERUTF8      NLOWER, no      Match any non-lowercase character
99 NLOWERL         NLOWER, no      Match any non-lowercase character in locale
100 NLOWERLUTF8     NLOWER, no      Match any non-lowercase character in locale
101 PRINT           PRINT,  no      Match any printable character
102 PRINTUTF8       PRINT,  no      Match any printable character
103 PRINTL          PRINT,  no      Match any printable character in locale
104 PRINTLUTF8      PRINT,  no      Match any printable character in locale
105 NPRINT          NPRINT, no      Match any non-printable character
106 NPRINTUTF8      NPRINT, no      Match any non-printable character
107 NPRINTL         NPRINT, no      Match any non-printable character in locale
108 NPRINTLUTF8     NPRINT, no      Match any non-printable character in locale
109 PUNCT           PUNCT,  no      Match any punctuation character
110 PUNCTUTF8       PUNCT,  no      Match any punctuation character
111 PUNCTL          PUNCT,  no      Match any punctuation character in locale
112 PUNCTLUTF8      PUNCT,  no      Match any punctuation character in locale
113 NPUNCT          NPUNCT, no      Match any non-punctuation character
114 NPUNCTUTF8      NPUNCT, no      Match any non-punctuation character
115 NPUNCTL         NPUNCT, no      Match any non-punctuation character in locale
116 NPUNCTLUTF8     NPUNCT, no      Match any non-punctuation character in locale
117 UPPER           UPPER,  no      Match any uppercase character
118 UPPERUTF8       UPPER,  no      Match any uppercase character
119 UPPERL          UPPER,  no      Match any uppercase character in locale
120 UPPERLUTF8      UPPER,  no      Match any uppercase character in locale
121 NUPPER          NUPPER, no      Match any non-uppercase character
122 NUPPERUTF8      NUPPER, no      Match any non-uppercase character
123 NUPPERL         NUPPER, no      Match any non-uppercase character in locale
124 NUPPERLUTF8     NUPPER, no      Match any non-uppercase character in locale
125 XDIGIT          XDIGIT,  no     Match any hexdigit character
126 NXDIGIT         NXDIGIT, no     Match any non-hexdigit character
127 CLUMP           CLUMP,  no      Match any combining character sequence
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 #
137 BRANCH          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
142 BACK            BACK,   no      Match "", "next" ptr points backward.
143
144 # Literals
145 EXACT           EXACT,  sv      Match this string (preceded by length).
146 EXACTF          EXACT,  sv      Match this string, folded (prec. by length).
147 EXACTFL         EXACT,  sv      Match this string, folded in locale (w/len).
148
149 # Do nothing
150 NOTHING         NOTHING,no      Match empty string.
151 # A variant of above which delimits a group, thus stops optimizations
152 TAIL            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 #
159 STAR            STAR,   node    Match this (simple) thing 0 or more times.
160 PLUS            PLUS,   node    Match this (simple) thing 1 or more times.
161
162 CURLY           CURLY,  sv 2    Match this simple thing {n,m} times.
163 CURLYN          CURLY,  no 2    Match next-after-this simple thing 
164 #                               {n,m} times, set parenths.
165 CURLYM          CURLY,  no 2    Match this medium-complex thing {n,m} times.
166 CURLYX          CURLY,  sv 2    Match this complex thing {n,m} times.
167
168 # This terminator creates a loop structure for CURLYX
169 WHILEM          WHILEM, no      Do curly processing and see if rest matches.
170
171 # OPEN,CLOSE,GROUPP     ...are numbered at compile time.
172 OPEN            OPEN,   num 1   Mark this point in input as start of #n.
173 CLOSE           CLOSE,  num 1   Analogous to OPEN.
174
175 REF             REF,    num 1   Match some already matched string
176 REFF            REF,    num 1   Match already matched string, folded
177 REFFL           REF,    num 1   Match already matched string, folded in loc.
178
179 # grouping assertions
180 IFMATCH         BRANCHJ,off 1 2 Succeeds if the following matches.
181 UNLESSM         BRANCHJ,off 1 2 Fails if the following matches.
182 SUSPEND         BRANCHJ,off 1 1 "Independent" sub-RE.
183 IFTHEN          BRANCHJ,off 1 1 Switch, should be preceeded by switcher .
184 GROUPP          GROUPP, num 1   Whether the group matched.
185
186 # Support for long RE
187 LONGJMP         LONGJMP,off 1 1 Jump far away.
188 BRANCHJ         BRANCHJ,off 1 1 BRANCH with long offset.
189
190 # The heavy worker
191 EVAL            EVAL,   evl 1   Execute some Perl code.
192
193 # Modifiers
194 MINMOD          MINMOD, no      Next operator is not greedy.
195 LOGICAL         LOGICAL,no      Next opcode should set the flag only.
196
197 # This is not used yet
198 RENUM           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
202 OPTIMIZED       NOTHING,off     Placeholder for dump.