fix some db docs
[factor/jcg.git] / basis / xmode / modes / perl.xml
blob2bb9f669ac684173dbfd7cd5d07597e20c48cb24
1 <?xml version="1.0"?>\r
2 \r
3 <!DOCTYPE MODE SYSTEM "xmode.dtd">\r
4 \r
5 <MODE>\r
6         <PROPS>\r
7                 <PROPERTY NAME="lineComment" VALUE="#" />\r
8                 <PROPERTY NAME="indentOpenBrackets" VALUE="{" />\r
9                 <PROPERTY NAME="indentCloseBrackets" VALUE="}" />\r
10                 <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />\r
11                 <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />\r
12                 <PROPERTY NAME="indentNextLine" VALUE="[^#]*\.\s*$" />\r
13         </PROPS>\r
15         <!-- no ESCAPE char because we need the backslash for references -->\r
16         <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="FALSE">\r
17                 <!-- Comments -->\r
18                 <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>\r
20                 <!-- TYPE is LABEL so that =head1 and =cut are highlighted as so -->\r
21                 <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">\r
22                         <BEGIN>=head1</BEGIN>\r
23                         <END>=cut</END>\r
24                 </SPAN>\r
25                 <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">\r
26                         <BEGIN>=head2</BEGIN>\r
27                         <END>=cut</END>\r
28                 </SPAN>\r
29         <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">\r
30                         <BEGIN>=head3</BEGIN>\r
31                         <END>=cut</END>\r
32                 </SPAN>\r
33                 <SPAN  AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">\r
34                         <BEGIN>=head4</BEGIN>\r
35                         <END>=cut</END>\r
36                 </SPAN>\r
37                 <SPAN TYPE="LABEL"  AT_LINE_START="TRUE" DELEGATE="POD">\r
38                         <BEGIN>=item</BEGIN>\r
39                         <END>=cut</END>\r
40                 </SPAN>\r
41                 <SPAN  AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">\r
42                         <BEGIN>=over</BEGIN>\r
43                         <END>=cut</END>\r
44                 </SPAN>\r
45                 <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">\r
46                         <BEGIN>=back</BEGIN>\r
47                         <END>=cut</END>\r
48                 </SPAN>\r
49                 <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">\r
50                         <BEGIN>=pod</BEGIN>\r
51                         <END>=cut</END>\r
52                 </SPAN>\r
53                 <SPAN TYPE="LABEL" DELEGATE="POD"  AT_LINE_START="TRUE">\r
54                         <BEGIN>=for</BEGIN>\r
55                         <END>=cut</END>\r
56                 </SPAN>\r
57                 <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">\r
58                         <BEGIN>=begin</BEGIN>\r
59                         <END>=cut</END>\r
60                 </SPAN>\r
61                 <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">\r
62                         <BEGIN>=end</BEGIN>\r
63                         <END>=cut</END>\r
64                 </SPAN>\r
66                 <!-- Some other things that confuse the mode file. -->\r
67                 <SEQ TYPE="OPERATOR">*"</SEQ>\r
68                 <SEQ TYPE="OPERATOR">*'</SEQ>\r
69                 <SEQ TYPE="OPERATOR">&amp;"</SEQ>\r
70                 <SEQ TYPE="OPERATOR">&amp;'</SEQ>\r
72                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">\r
73                         <BEGIN>${</BEGIN>\r
74                         <END>}</END>\r
75                 </SPAN>\r
77                 <!-- Scalar variables -->\r
78                 <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$#?((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>\r
80                 <!-- Array variables -->\r
81                 <SEQ_REGEXP HASH_CHAR="@" TYPE="KEYWORD2">@((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>\r
83                 <!-- Associative Array (= Hash) variables -->\r
84                 <SEQ_REGEXP HASH_CHAR="%" TYPE="KEYWORD2">%((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>\r
86                 <!-- Dereferences -->\r
87                 <SEQ_REGEXP HASH_CHAR="$$" TYPE="KEYWORD4">\$\$+((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>\r
88                 <SEQ_REGEXP HASH_CHAR="@$" TYPE="KEYWORD4">@\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>\r
89                 <SEQ_REGEXP HASH_CHAR="%$" TYPE="KEYWORD4">%\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>\r
90                 <SEQ_REGEXP HASH_CHAR="*" TYPE="KEYWORD4">\*((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>\r
92                 <!-- Perl predefined variables -->\r
93                 <SEQ_REGEXP HASH_CHAR="$^" TYPE="KEYWORD2">\$\^\p{Alpha}</SEQ_REGEXP>\r
94                 <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$\p{Punct}</SEQ_REGEXP>\r
96                 <!-- references to vars and code, starting with a backslash -->\r
97                 <SEQ_REGEXP HASH_CHAR="\" TYPE="KEYWORD4">\\[@%\$&amp;]((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>\r
99                 <!-- complex code dereference -->\r
100                 <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">\r
101                         <BEGIN>&amp;{</BEGIN>\r
102                         <END>}</END>\r
103                 </SPAN>\r
105                 <!-- Function calls from variables -->\r
106                 <SEQ_REGEXP HASH_CHAR="&amp;$" TYPE="FUNCTION">&amp;\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>\r
108                 <!-- Special handling for subs, since they can have a ' in the name;\r
109                          try to do highlight as well as possible - this version will\r
110                          highlight both 'sub' and the opening '{' as KEYWORD1, so the\r
111                          opening bracket will be different than other brackets. -->\r
112                 <SPAN_REGEXP HASH_CHAR="sub" TYPE="OPERATOR" NO_LINE_BREAK="FALSE" DELEGATE="SUB_NAME">\r
113                         <BEGIN>sub\s</BEGIN>\r
114                         <END>{</END>\r
115                 </SPAN_REGEXP>\r
117                 <!-- Highlight calls to subs that contain ' in the name. -->\r
118                 <SEQ_REGEXP HASH_CHAR="&amp;" TYPE="FUNCTION"\r
119                 >&amp;\p{Alpha}[\p{Alnum}_]*'\p{Alpha}[\p{Alnum}_]*</SEQ_REGEXP>\r
121                 <!-- Literals -->\r
122                 <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">\r
123                         <BEGIN>"</BEGIN>\r
124                         <END>"</END>\r
125                 </SPAN>\r
127                 <!-- apostroph literals -->\r
128                 <SPAN TYPE="LITERAL1" DELEGATE="APOSTR">\r
129                         <BEGIN>'</BEGIN>\r
130                         <END>'</END>\r
131                 </SPAN>\r
133                 <!-- options: -text -->\r
134                 <SEQ_REGEXP HASH_CHAR="-" TYPE="LITERAL1">-[\p{Lower}]\w+</SEQ_REGEXP>\r
136                 <!-- file stat expressions -->\r
137                 <SEQ_REGEXP HASH_CHAR="-" TYPE="KEYWORD3">-[\p{Lower}]</SEQ_REGEXP>\r
139                 <!-- non-quoted literals in hashes -->\r
140                 <SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="{" NO_LINE_BREAK="TRUE" DELEGATE="LITERAL">\r
141                         <BEGIN>\{(?=\s*[\p{Alpha}_\-][\p{Alnum}_]*\s*\})</BEGIN>\r
142                         <END>}</END>\r
143                 </SPAN_REGEXP>\r
145                 <!-- Code blocks. This is a hack to correctly highlight some\r
146                          complex expressions that can have arbitrary perl code\r
147                          inside brackets (like array deferences below). Declaring\r
148                          this *before* the other rules is needed to maintain\r
149                          correct bracket matching.\r
150                 -->\r
151                 <SPAN TYPE="OPERATOR" NO_LINE_BREAK="FALSE" DELEGATE="MAIN">\r
152                         <BEGIN>{</BEGIN>\r
153                         <END>}</END>\r
154                 </SPAN>\r
156                 <!-- Array dereference -->\r
157                 <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">\r
158                         <BEGIN>@{</BEGIN>\r
159                         <END>}</END>\r
160                 </SPAN>\r
162                 <!-- Hash dereference -->\r
163                 <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">\r
164                         <BEGIN>%{</BEGIN>\r
165                         <END>}</END>\r
166                 </SPAN>\r
168                 <!-- labels, catches also package prefixes at line start :( -->\r
169                 <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>\r
171                 <!-- __DATA__ and similar -->\r
172                 <SEQ_REGEXP HASH_CHAR="__" TYPE="KEYWORD4">__\w+__</SEQ_REGEXP>\r
174                 <!-- Exec -->\r
175                 <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">\r
176                         <BEGIN>`</BEGIN>\r
177                         <END>`</END>\r
178                 </SPAN>\r
180                 <!-- file globs / IO operators -->\r
181                 <SEQ_REGEXP HASH_CHAR="&lt;" TYPE="KEYWORD4">&lt;[\p{Punct}\p{Alnum}_]*&gt;</SEQ_REGEXP>\r
183                 <!-- Heredoc -->\r
184                 <SPAN_REGEXP HASH_CHAR="&lt;&lt;" TYPE="LITERAL2" DELEGATE="LITERAL">\r
185                 <BEGIN><![CDATA[<<\p{Space}*(['"])([\p{Space}\p{Alnum}_]*)\1;?\s*]]></BEGIN>\r
186                 <END>$2</END>\r
187                 </SPAN_REGEXP>\r
188                 <SPAN_REGEXP HASH_CHAR="&lt;&lt;" TYPE="LITERAL2" DELEGATE="LITERAL">\r
189                 <BEGIN><![CDATA[<<([\p{Alpha}_][\p{Alnum}_]*);?\s*]]></BEGIN>\r
190                 <END>$1</END>\r
191                 </SPAN_REGEXP>\r
193                 <!-- jEdit 4.1 adds regular expression syntax rules so we can\r
194                      highlight this sort of crap. -->\r
196                 <!-- /Regexp/, avoid confusion with a sequence of two divisions! -->\r
197                 <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="/"\r
198                         AT_WORD_START="TRUE">/.*?[^\\]/[cgimosx]*(?!\s*[\d\$\@\(\-])</SEQ_REGEXP>\r
200         <!-- q//, qq//, qr//, qx// -->\r
201                 <SPAN_REGEXP HASH_CHAR="q"\r
202                                          TYPE="MARKUP"\r
203                                          MATCH_TYPE="OPERATOR"\r
204                                          DELEGATE="QUOTED"\r
205                                          AT_WORD_START="TRUE"\r
206                                          NO_LINE_BREAK="FALSE">\r
207                         <BEGIN>q(?:|[qrxw])([#\[{(/|])</BEGIN>\r
208                         <END>~1</END>\r
209                 </SPAN_REGEXP>\r
211                 <!-- tr/// transliteration -->\r
212                 <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="tr"\r
213             AT_WORD_START="TRUE">tr\s*\{.*?[^\\]\}\s*\{(?:.*?[^\\])*\}[cds]*</SEQ_REGEXP>\r
215                 <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="tr"\r
216             AT_WORD_START="TRUE">tr([^\p{Alnum}\p{Space}\}])(?:.*?)\1(?:.*?)\1[cds]*</SEQ_REGEXP>\r
218                 <!-- y/// translation -->\r
219                 <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="y"\r
220             AT_WORD_START="TRUE">y\s*\{.*?[^\\]\}\s*\{(?:.*?[^\\])*\}[cds]*</SEQ_REGEXP>\r
222                 <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="y"\r
223             AT_WORD_START="TRUE">y([^\p{Alnum}\p{Space}\}])(?:.*?)\1(?:.*?)\1[cds]*</SEQ_REGEXP>\r
225                 <!-- m// regular expression matching -->\r
226                 <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="m"\r
227                         AT_WORD_START="TRUE">m\s*\{.*?[^\\]\}[cgimosx]*</SEQ_REGEXP>\r
229                 <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="m"\r
230                         AT_WORD_START="TRUE">m([^\p{Alnum}\p{Space}\}])(?:.*?[^\\])\1[cgimosx]*</SEQ_REGEXP>\r
232                 <!-- s/// regular expression substitution -->\r
233                 <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="s"\r
234             AT_WORD_START="TRUE">s\s*\{.*?\}\s*\{.*?\}[egimosx]*</SEQ_REGEXP>\r
236                 <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="s"\r
237             AT_WORD_START="TRUE">s([^\p{Alnum}\p{Space}\}])(?:.*?)\1(?:.*?)\1[egimosx]*</SEQ_REGEXP>\r
239                 <!-- complex operators -->\r
240                 <SEQ TYPE="OPERATOR">||</SEQ>\r
241                 <SEQ TYPE="OPERATOR">&amp;&amp;</SEQ>\r
242                 <SEQ TYPE="OPERATOR">!=</SEQ>\r
243                 <SEQ TYPE="OPERATOR">&lt;=&gt;</SEQ>\r
244                 <SEQ TYPE="OPERATOR">-&gt;</SEQ>\r
245                 <SEQ TYPE="OPERATOR">=&gt;</SEQ>\r
246                 <SEQ TYPE="OPERATOR">==</SEQ>\r
247                 <SEQ TYPE="OPERATOR">=~</SEQ>\r
248                 <SEQ TYPE="OPERATOR">!~</SEQ>\r
250                 <SEQ TYPE="OPERATOR">+=</SEQ>\r
251                 <SEQ TYPE="OPERATOR">-=</SEQ>\r
252                 <SEQ TYPE="OPERATOR">/=</SEQ>\r
253                 <SEQ TYPE="OPERATOR">*=</SEQ>\r
254                 <SEQ TYPE="OPERATOR">.=</SEQ>\r
255                 <SEQ TYPE="OPERATOR">%=</SEQ>\r
257                 <SEQ TYPE="OPERATOR">&amp;=</SEQ>\r
258                 <SEQ TYPE="OPERATOR">|=</SEQ>\r
259                 <SEQ TYPE="OPERATOR">**=</SEQ>\r
260                 <SEQ TYPE="OPERATOR">&lt;&lt;=</SEQ>\r
261                 <SEQ TYPE="OPERATOR">&gt;&gt;=</SEQ>\r
262                 <SEQ TYPE="OPERATOR">&amp;&amp;=</SEQ>\r
263                 <SEQ TYPE="OPERATOR">||=</SEQ>\r
264                 <SEQ TYPE="OPERATOR">^=</SEQ>\r
265                 <SEQ TYPE="OPERATOR">x=</SEQ>\r
266                 <SEQ TYPE="OPERATOR">&gt;=</SEQ>\r
267                 <SEQ TYPE="OPERATOR">&lt;=</SEQ>\r
268                 <SEQ TYPE="OPERATOR">&gt;</SEQ>\r
269                 <SEQ TYPE="OPERATOR">&lt;</SEQ>\r
271                 <!-- simple operators -->\r
272                 <SEQ TYPE="OPERATOR">|</SEQ>\r
273                 <SEQ TYPE="OPERATOR">&amp;</SEQ>\r
274                 <SEQ TYPE="OPERATOR">!</SEQ>\r
275                 <SEQ TYPE="OPERATOR">=</SEQ>\r
276                 <SEQ TYPE="OPERATOR">!</SEQ>\r
277                 <SEQ TYPE="OPERATOR">+</SEQ>\r
278                 <SEQ TYPE="OPERATOR">-</SEQ>\r
279                 <SEQ TYPE="OPERATOR">/</SEQ>\r
280                 <SEQ TYPE="OPERATOR">**</SEQ>\r
281                 <SEQ TYPE="OPERATOR">*</SEQ>\r
282                 <SEQ TYPE="OPERATOR">^</SEQ>\r
283                 <SEQ TYPE="OPERATOR">~</SEQ>\r
284                 <SEQ TYPE="OPERATOR">{</SEQ>\r
285                 <SEQ TYPE="OPERATOR">}</SEQ>\r
286                 <SEQ TYPE="OPERATOR">?</SEQ>\r
287                 <SEQ TYPE="OPERATOR">:</SEQ>\r
289                 <!-- Keywords -->\r
290                 <KEYWORDS>\r
291                         <KEYWORD1>new</KEYWORD1>\r
292                         <KEYWORD1>if</KEYWORD1>\r
293                         <KEYWORD1>until</KEYWORD1>\r
294                         <KEYWORD1>while</KEYWORD1>\r
295                         <KEYWORD1>elsif</KEYWORD1>\r
296                         <KEYWORD1>else</KEYWORD1>\r
297                         <KEYWORD1>unless</KEYWORD1>\r
298                         <KEYWORD1>for</KEYWORD1>\r
299                         <KEYWORD1>foreach</KEYWORD1>\r
300                         <KEYWORD1>BEGIN</KEYWORD1>\r
301                         <KEYWORD1>END</KEYWORD1>\r
303                         <OPERATOR>cmp</OPERATOR>\r
304                         <OPERATOR>eq</OPERATOR>\r
305                         <OPERATOR>ne</OPERATOR>\r
306                         <OPERATOR>le</OPERATOR>\r
307                         <OPERATOR>ge</OPERATOR>\r
308                         <OPERATOR>not</OPERATOR>\r
309                         <OPERATOR>and</OPERATOR>\r
310                         <OPERATOR>or</OPERATOR>\r
311                         <OPERATOR>xor</OPERATOR>\r
313                         <!-- At least attempt to highlight 'x', although this misses some -->\r
314                         <OPERATOR>x</OPERATOR>\r
316                         <!--\r
317                                 The following function list was derived from the perlfunc man\r
318                                 page, Perl version 5.00503\r
320                                 Certain keywords have been commented out where they appear more\r
321                                 than once, and the y///, qx//, etc. functions have been removed,\r
322                                 since they would are colorized not as keywords, but with separate\r
323                                 rules.\r
324                         -->\r
326                         <!-- Functions for SCALARs or strings -->\r
327                         <KEYWORD3>chomp</KEYWORD3>\r
328                         <KEYWORD3>chop</KEYWORD3>\r
329                         <KEYWORD3>chr</KEYWORD3>\r
330                         <KEYWORD3>crypt</KEYWORD3>\r
331                         <KEYWORD3>hex</KEYWORD3>\r
332                         <KEYWORD3>index</KEYWORD3>\r
333                         <KEYWORD3>lc</KEYWORD3>\r
334                         <KEYWORD3>lcfirst</KEYWORD3>\r
335                         <KEYWORD3>length</KEYWORD3>\r
336                         <KEYWORD3>oct</KEYWORD3>\r
337                         <KEYWORD3>ord</KEYWORD3>\r
338                         <KEYWORD3>pack</KEYWORD3>\r
339                         <KEYWORD3>reverse</KEYWORD3>\r
340                         <KEYWORD3>rindex</KEYWORD3>\r
341                         <KEYWORD3>sprintf</KEYWORD3>\r
342                         <KEYWORD3>substr</KEYWORD3>\r
343                         <KEYWORD3>uc</KEYWORD3>\r
344                         <KEYWORD3>ucfirst</KEYWORD3>\r
346                         <!-- Regular expressions and pattern matching -->\r
347                         <KEYWORD3>pos</KEYWORD3>\r
348                         <KEYWORD3>quotemeta</KEYWORD3>\r
349                         <KEYWORD3>split</KEYWORD3>\r
350                         <KEYWORD3>study</KEYWORD3>\r
352                         <!-- Numeric functions -->\r
353                         <KEYWORD3>abs</KEYWORD3>\r
354                         <KEYWORD3>atan2</KEYWORD3>\r
355                         <KEYWORD3>cos</KEYWORD3>\r
356                         <KEYWORD3>exp</KEYWORD3>\r
357                         <!--<KEYWORD3>hex</KEYWORD3>-->\r
358                         <KEYWORD3>int</KEYWORD3>\r
359                         <KEYWORD3>log</KEYWORD3>\r
360                         <!--<KEYWORD3>oct</KEYWORD3>-->\r
361                         <KEYWORD3>rand</KEYWORD3>\r
362                         <KEYWORD3>sin</KEYWORD3>\r
363                         <KEYWORD3>sqrt</KEYWORD3>\r
364                         <KEYWORD3>srand</KEYWORD3>\r
366                         <!-- Functions for real @ARRAYs -->\r
367                         <KEYWORD3>pop</KEYWORD3>\r
368                         <KEYWORD3>push</KEYWORD3>\r
369                         <KEYWORD3>shift</KEYWORD3>\r
370                         <KEYWORD3>splice</KEYWORD3>\r
371                         <KEYWORD3>unshift</KEYWORD3>\r
373                         <!-- Functions for list data -->\r
374                         <KEYWORD3>grep</KEYWORD3>\r
375                         <KEYWORD3>join</KEYWORD3>\r
376                         <KEYWORD3>map</KEYWORD3>\r
377                         <!--<KEYWORD3>reverse</KEYWORD3>-->\r
378                         <KEYWORD3>sort</KEYWORD3>\r
379                         <KEYWORD3>unpack</KEYWORD3>\r
381                         <!-- Functions for real %HASHes -->\r
382                         <KEYWORD3>delete</KEYWORD3>\r
383                         <KEYWORD3>each</KEYWORD3>\r
384                         <KEYWORD3>exists</KEYWORD3>\r
385                         <KEYWORD3>keys</KEYWORD3>\r
386                         <KEYWORD3>values</KEYWORD3>\r
388                         <!-- Input and output functions -->\r
389                         <KEYWORD3>binmode</KEYWORD3>\r
390                         <KEYWORD3>close</KEYWORD3>\r
391                         <KEYWORD3>closedir</KEYWORD3>\r
392                         <KEYWORD3>dbmclose</KEYWORD3>\r
393                         <KEYWORD3>dbmopen</KEYWORD3>\r
394                         <!--<KEYWORD3>die</KEYWORD3>-->\r
395                         <KEYWORD3>eof</KEYWORD3>\r
396                         <KEYWORD3>fileno</KEYWORD3>\r
397                         <KEYWORD3>flock</KEYWORD3>\r
398                         <KEYWORD3>format</KEYWORD3>\r
399                         <KEYWORD3>getc</KEYWORD3>\r
400                         <KEYWORD3>print</KEYWORD3>\r
401                         <KEYWORD3>printf</KEYWORD3>\r
402                         <KEYWORD3>read</KEYWORD3>\r
403                         <KEYWORD3>readdir</KEYWORD3>\r
404                         <KEYWORD3>rewinddir</KEYWORD3>\r
405                         <KEYWORD3>seek</KEYWORD3>\r
406                         <KEYWORD3>seekdir</KEYWORD3>\r
407                         <KEYWORD3>select</KEYWORD3>\r
408                         <KEYWORD3>syscall</KEYWORD3>\r
409                         <KEYWORD3>sysread</KEYWORD3>\r
410                         <KEYWORD3>sysseek</KEYWORD3>\r
411                         <KEYWORD3>syswrite</KEYWORD3>\r
412                         <KEYWORD3>tell</KEYWORD3>\r
413                         <KEYWORD3>telldir</KEYWORD3>\r
414                         <KEYWORD3>truncate</KEYWORD3>\r
415                         <KEYWORD3>warn</KEYWORD3>\r
416                         <KEYWORD3>write</KEYWORD3>\r
418                         <!-- Functions for fixed length data or records -->\r
419                         <!--<KEYWORD3>pack</KEYWORD3>-->\r
420                         <!--<KEYWORD3>read</KEYWORD3>-->\r
421                         <!--<KEYWORD3>syscall</KEYWORD3>-->\r
422                         <!--<KEYWORD3>sysread</KEYWORD3>-->\r
423                         <!--<KEYWORD3>syswrite</KEYWORD3>-->\r
424                         <!--<KEYWORD3>unpack</KEYWORD3>-->\r
425                         <KEYWORD3>vec</KEYWORD3>\r
427                         <!-- Functions for filehandles, files, or directories -->\r
428                         <KEYWORD3>chdir</KEYWORD3>\r
429                         <KEYWORD3>chmod</KEYWORD3>\r
430                         <KEYWORD3>chown</KEYWORD3>\r
431                         <KEYWORD3>chroot</KEYWORD3>\r
432                         <KEYWORD3>fcntl</KEYWORD3>\r
433                         <KEYWORD3>glob</KEYWORD3>\r
434                         <KEYWORD3>ioctl</KEYWORD3>\r
435                         <KEYWORD3>link</KEYWORD3>\r
436                         <KEYWORD3>lstat</KEYWORD3>\r
437                         <KEYWORD3>mkdir</KEYWORD3>\r
438                         <KEYWORD3>open</KEYWORD3>\r
439                         <KEYWORD3>opendir</KEYWORD3>\r
440                         <KEYWORD3>readlink</KEYWORD3>\r
441                         <KEYWORD3>rename</KEYWORD3>\r
442                         <KEYWORD3>rmdir</KEYWORD3>\r
443                         <KEYWORD3>stat</KEYWORD3>\r
444                         <KEYWORD3>symlink</KEYWORD3>\r
445                         <KEYWORD3>umask</KEYWORD3>\r
446                         <KEYWORD3>unlink</KEYWORD3>\r
447                         <KEYWORD3>utime</KEYWORD3>\r
449                         <!-- Keywords related to the control flow of your perl program -->\r
450                         <KEYWORD1>caller</KEYWORD1>\r
451                         <KEYWORD1>continue</KEYWORD1>\r
452                         <KEYWORD1>die</KEYWORD1>\r
453                         <KEYWORD1>do</KEYWORD1>\r
454                         <KEYWORD1>dump</KEYWORD1>\r
455                         <KEYWORD1>eval</KEYWORD1>\r
456                         <KEYWORD1>exit</KEYWORD1>\r
457                         <KEYWORD1>goto</KEYWORD1>\r
458                         <KEYWORD1>last</KEYWORD1>\r
459                         <KEYWORD1>next</KEYWORD1>\r
460                         <KEYWORD1>redo</KEYWORD1>\r
461                         <KEYWORD1>return</KEYWORD1>\r
462                         <KEYWORD1>wantarray</KEYWORD1>\r
464                         <!-- Keywords related to scoping -->\r
465                         <!--<KEYWORD1>caller</KEYWORD1>-->\r
466                         <!--<KEYWORD1>import</KEYWORD1>-->\r
467                         <KEYWORD1>local</KEYWORD1>\r
468                         <KEYWORD1>my</KEYWORD1>\r
469                         <KEYWORD1>our</KEYWORD1>\r
470                         <KEYWORD1>package</KEYWORD1>\r
471                         <KEYWORD1>use</KEYWORD1>\r
473                         <!-- Miscellaneous functions -->\r
474                         <KEYWORD3>defined</KEYWORD3>\r
475                         <!--<KEYWORD3>dump</KEYWORD3>-->\r
476                         <!--<KEYWORD3>eval</KEYWORD3>-->\r
477                         <KEYWORD3>formline</KEYWORD3>\r
478                         <!--<KEYWORD3>local</KEYWORD3>-->\r
479                         <!--<KEYWORD3>my</KEYWORD3>-->\r
480                         <KEYWORD3>reset</KEYWORD3>\r
481                         <KEYWORD3>scalar</KEYWORD3>\r
482                         <KEYWORD3>undef</KEYWORD3>\r
483                         <!--<KEYWORD3>wantarray</KEYWORD3>-->\r
485                         <!-- Functions for processes and process groups -->\r
486                         <KEYWORD3>alarm</KEYWORD3>\r
487                         <KEYWORD3>exec</KEYWORD3>\r
488                         <KEYWORD3>fork</KEYWORD3>\r
489                         <KEYWORD3>getpgrp</KEYWORD3>\r
490                         <KEYWORD3>getppid</KEYWORD3>\r
491                         <KEYWORD3>getpriority</KEYWORD3>\r
492                         <KEYWORD3>kill</KEYWORD3>\r
493                         <KEYWORD3>pipe</KEYWORD3>\r
494                         <KEYWORD3>setpgrp</KEYWORD3>\r
495                         <KEYWORD3>setpriority</KEYWORD3>\r
496                         <KEYWORD3>sleep</KEYWORD3>\r
497                         <KEYWORD3>system</KEYWORD3>\r
498                         <KEYWORD3>times</KEYWORD3>\r
499                         <KEYWORD3>wait</KEYWORD3>\r
500                         <KEYWORD3>waitpid</KEYWORD3>\r
502                         <!-- Keywords related to perl modules -->\r
503                         <!--<KEYWORD1>do</KEYWORD1>-->\r
504                         <KEYWORD1>import</KEYWORD1>\r
505                         <KEYWORD1>no</KEYWORD1>\r
506                         <!--<KEYWORD1>package</KEYWORD1>-->\r
507                         <KEYWORD1>require</KEYWORD1>\r
508                         <!--<KEYWORD1>use</KEYWORD1>-->\r
510                         <!-- Keywords related to classes and object-orientedness -->\r
511                         <KEYWORD3>bless</KEYWORD3>\r
512                         <!--<KEYWORD3>dbmclose</KEYWORD3>-->\r
513                         <!--<KEYWORD3>dbmopen</KEYWORD3>-->\r
514                         <!--<KEYWORD3>package</KEYWORD3>-->\r
515                         <KEYWORD3>ref</KEYWORD3>\r
516                         <KEYWORD3>tie</KEYWORD3>\r
517                         <KEYWORD3>tied</KEYWORD3>\r
518                         <KEYWORD3>untie</KEYWORD3>\r
519                         <!--<KEYWORD3>use</KEYWORD3>-->\r
521                         <!-- Low-level socket functions -->\r
522                         <KEYWORD3>accept</KEYWORD3>\r
523                         <KEYWORD3>bind</KEYWORD3>\r
524                         <KEYWORD3>connect</KEYWORD3>\r
525                         <KEYWORD3>getpeername</KEYWORD3>\r
526                         <KEYWORD3>getsockname</KEYWORD3>\r
527                         <KEYWORD3>getsockopt</KEYWORD3>\r
528                         <KEYWORD3>listen</KEYWORD3>\r
529                         <KEYWORD3>recv</KEYWORD3>\r
530                         <KEYWORD3>send</KEYWORD3>\r
531                         <KEYWORD3>setsockopt</KEYWORD3>\r
532                         <KEYWORD3>shutdown</KEYWORD3>\r
533                         <KEYWORD3>socket</KEYWORD3>\r
534                         <KEYWORD3>socketpair</KEYWORD3>\r
536                         <!-- System V interprocess communication functions -->\r
537                         <KEYWORD3>msgctl</KEYWORD3>\r
538                         <KEYWORD3>msgget</KEYWORD3>\r
539                         <KEYWORD3>msgrcv</KEYWORD3>\r
540                         <KEYWORD3>msgsnd</KEYWORD3>\r
541                         <KEYWORD3>semctl</KEYWORD3>\r
542                         <KEYWORD3>semget</KEYWORD3>\r
544                         <KEYWORD3>semop</KEYWORD3>\r
545                         <KEYWORD3>shmctl</KEYWORD3>\r
546                         <KEYWORD3>shmget</KEYWORD3>\r
547                         <KEYWORD3>shmread</KEYWORD3>\r
548                         <KEYWORD3>shmwrite</KEYWORD3>\r
550                         <!-- Fetching user and group info -->\r
551                         <KEYWORD3>endgrent</KEYWORD3>\r
552                         <KEYWORD3>endhostent</KEYWORD3>\r
553                         <KEYWORD3>endnetent</KEYWORD3>\r
554                         <KEYWORD3>endpwent</KEYWORD3>\r
555                         <KEYWORD3>getgrent</KEYWORD3>\r
556                         <KEYWORD3>getgrgid</KEYWORD3>\r
557                         <KEYWORD3>getgrnam</KEYWORD3>\r
558                         <KEYWORD3>getlogin</KEYWORD3>\r
559                         <KEYWORD3>getpwent</KEYWORD3>\r
560                         <KEYWORD3>getpwnam</KEYWORD3>\r
561                         <KEYWORD3>getpwuid</KEYWORD3>\r
562                         <KEYWORD3>setgrent</KEYWORD3>\r
563                         <KEYWORD3>setpwent</KEYWORD3>\r
565                         <!-- Fetching network info -->\r
566                         <KEYWORD3>endprotoent</KEYWORD3>\r
567                         <KEYWORD3>endservent</KEYWORD3>\r
568                         <KEYWORD3>gethostbyaddr</KEYWORD3>\r
569                         <KEYWORD3>gethostbyname</KEYWORD3>\r
570                         <KEYWORD3>gethostent</KEYWORD3>\r
571                         <KEYWORD3>getnetbyaddr</KEYWORD3>\r
572                         <KEYWORD3>getnetbyname</KEYWORD3>\r
573                         <KEYWORD3>getnetent</KEYWORD3>\r
574                         <KEYWORD3>getprotobyname</KEYWORD3>\r
575                         <KEYWORD3>getprotobynumber</KEYWORD3>\r
576                         <KEYWORD3>getprotoent</KEYWORD3>\r
577                         <KEYWORD3>getservbyname</KEYWORD3>\r
578                         <KEYWORD3>getservbyport</KEYWORD3>\r
579                         <KEYWORD3>getservent</KEYWORD3>\r
580                         <KEYWORD3>sethostent</KEYWORD3>\r
581                         <KEYWORD3>setnetent</KEYWORD3>\r
582                         <KEYWORD3>setprotoent</KEYWORD3>\r
583                         <KEYWORD3>setservent</KEYWORD3>\r
585                         <!-- Time-related functions -->\r
586                         <KEYWORD3>gmtime</KEYWORD3>\r
587                         <KEYWORD3>localtime</KEYWORD3>\r
588                         <KEYWORD3>time</KEYWORD3>\r
589                         <!--<KEYWORD3>times</KEYWORD3>-->\r
590                 </KEYWORDS>\r
591         </RULES>\r
593         <RULES SET="POD" DEFAULT="COMMENT2">\r
594                 <MARK_FOLLOWING TYPE="LABEL" AT_LINE_START="TRUE">=</MARK_FOLLOWING>\r
595         </RULES>\r
597         <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">\r
598                 <!-- Variables inside a Literal -->\r
599                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">\r
600                         <BEGIN>${</BEGIN>\r
601                         <END>}</END>\r
602                 </SPAN>\r
604                 <!-- object method inside a Literal -->\r
605                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">\r
606                         <BEGIN>->{</BEGIN>\r
607                         <END>}</END>\r
608                 </SPAN>\r
610                 <MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>\r
611                 <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>\r
613                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">\r
614                         <BEGIN>@{</BEGIN>\r
615                         <END>}</END>\r
616                 </SPAN>\r
618                 <MARK_FOLLOWING TYPE="KEYWORD2">@</MARK_FOLLOWING>\r
620                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">\r
621                         <BEGIN>%{</BEGIN>\r
622                         <END>}</END>\r
623                 </SPAN>\r
625                 <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>\r
627                 <SEQ TYPE="LITERAL1">|</SEQ>\r
628                 <SEQ TYPE="LITERAL1">&amp;</SEQ>\r
629                 <SEQ TYPE="LITERAL1">!</SEQ>\r
630                 <SEQ TYPE="LITERAL1">&gt;</SEQ>\r
631                 <SEQ TYPE="LITERAL1">&lt;</SEQ>\r
632                 <SEQ TYPE="LITERAL1">)</SEQ>\r
633                 <SEQ TYPE="LITERAL1">(</SEQ>\r
634                 <SEQ TYPE="LITERAL1">=</SEQ>\r
635                 <SEQ TYPE="LITERAL1">!</SEQ>\r
636                 <SEQ TYPE="LITERAL1">+</SEQ>\r
637                 <SEQ TYPE="LITERAL1">-</SEQ>\r
638                 <SEQ TYPE="LITERAL1">/</SEQ>\r
639                 <SEQ TYPE="LITERAL1">*</SEQ>\r
640                 <SEQ TYPE="LITERAL1">^</SEQ>\r
641                 <SEQ TYPE="LITERAL1">~</SEQ>\r
642                 <SEQ TYPE="LITERAL1">}</SEQ>\r
643                 <SEQ TYPE="LITERAL1">{</SEQ>\r
644                 <SEQ TYPE="LITERAL1">.</SEQ>\r
645                 <SEQ TYPE="LITERAL1">,</SEQ>\r
646                 <SEQ TYPE="LITERAL1">;</SEQ>\r
647                 <SEQ TYPE="LITERAL1">]</SEQ>\r
648                 <SEQ TYPE="LITERAL1">[</SEQ>\r
649                 <SEQ TYPE="LITERAL1">?</SEQ>\r
650                 <SEQ TYPE="LITERAL1">:</SEQ>\r
651         </RULES>\r
653         <!-- Literals framed by apostrophs -->\r
654         <RULES SET="APOSTR" DEFAULT="LITERAL1" ESCAPE="\">\r
656                 <!-- just a hack for sprintf -->\r
657                 <SEQ_REGEXP HASH_CHAR="%" TYPE="LITERAL4">%\d*\.?\d*[dfis]</SEQ_REGEXP>\r
659         </RULES>\r
661         <RULES SET="EXEC" DEFAULT="KEYWORD3" ESCAPE="\">\r
662                 <!-- Comments -->\r
663                 <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>\r
665                 <!-- Variables -->\r
666                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">\r
667                         <BEGIN>${</BEGIN>\r
668                         <END>}</END>\r
669                 </SPAN>\r
671                 <MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>\r
672                 <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>\r
674                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">\r
675                         <BEGIN>@{</BEGIN>\r
676                         <END>}</END>\r
677                 </SPAN>\r
679                 <MARK_FOLLOWING TYPE="KEYWORD2">@</MARK_FOLLOWING>\r
681                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">\r
682                         <BEGIN>%{</BEGIN>\r
683                         <END>}</END>\r
684                 </SPAN>\r
686                 <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>\r
687         </RULES>\r
689         <RULES SET="VARIABLE" DEFAULT="KEYWORD2" ESCAPE="\">\r
690                 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">\r
691                         <BEGIN>{</BEGIN>\r
692                         <END>}</END>\r
693                 </SPAN>\r
695                 <SEQ TYPE="OPERATOR">-&gt;</SEQ>\r
696         </RULES>\r
698         <RULES SET="REGEXP" DEFAULT="MARKUP" ESCAPE="\">\r
699                 <!-- ??? -->\r
700                 <SEQ TYPE="MARKUP">)(</SEQ>\r
701         </RULES>\r
703         <RULES SET="SUB_NAME" DEFAULT="FUNCTION">\r
704                 <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>\r
705                 <SPAN TYPE="OPERATOR" DELEGATE="SUB_PROTO">\r
706                         <BEGIN>(</BEGIN>\r
707                         <END>)</END>\r
708                 </SPAN>\r
709         </RULES>\r
711         <RULES SET="SUB_PROTO" DEFAULT="LITERAL1">\r
712                 <SEQ TYPE="LITERAL2">$</SEQ>\r
713                 <SEQ TYPE="LITERAL2">@</SEQ>\r
714                 <SEQ TYPE="LITERAL2">%</SEQ>\r
715                 <SEQ TYPE="LITERAL2">&amp;</SEQ>\r
716                 <SEQ TYPE="LITERAL2">*</SEQ>\r
717                 <SEQ TYPE="LITERAL3">\</SEQ>\r
718         </RULES>\r
720         <!-- Used for quote-like operators; just makes sure the brackets are balanced. -->\r
721         <RULES SET="QUOTED" DEFAULT="LITERAL1">\r
722                 <SPAN_REGEXP NO_LINE_BREAK="FALSE"\r
723                                          TYPE="LITERAL1"\r
724                                          MATCH_TYPE="OPERATOR"\r
725                                          DELEGATE="QUOTED"\r
726                                          HASH_CHARS="|[{(/">\r
727                         <BEGIN>([\[{\(])</BEGIN>\r
728                         <END>~1</END>\r
729                 </SPAN_REGEXP>\r
730         </RULES>\r
732 </MODE>\r