Diffstat (limited to 'share/tinykate/syntax/perl.xml') (more/less context) (ignore whitespace changes)
-rw-r--r-- | share/tinykate/syntax/perl.xml | 603 |
1 files changed, 603 insertions, 0 deletions
diff --git a/share/tinykate/syntax/perl.xml b/share/tinykate/syntax/perl.xml new file mode 100644 index 0000000..0bb594d --- a/dev/null +++ b/share/tinykate/syntax/perl.xml | |||
@@ -0,0 +1,603 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE language SYSTEM "language.dtd"> | ||
3 | |||
4 | <language name="Perl" version="1.02" kateversion="2.0" section="Scripts" extensions="*.pl;*.pm" mimetype="application/x-perl;text/x-perl"> | ||
5 | <highlighting> | ||
6 | <list name="keywords"> | ||
7 | <item> if </item> | ||
8 | <item> unless </item> | ||
9 | <item> else </item> | ||
10 | <item> elsif </item> | ||
11 | <item> while </item> | ||
12 | <item> until </item> | ||
13 | <item> for </item> | ||
14 | <item> each </item> | ||
15 | <item> foreach </item> | ||
16 | <item> next </item> | ||
17 | <item> last </item> | ||
18 | <item> break </item> | ||
19 | <item> continue </item> | ||
20 | <item> return </item> | ||
21 | <item> use </item> | ||
22 | <item> no </item> | ||
23 | <item> require </item> | ||
24 | <item> my </item> | ||
25 | <item> our </item> | ||
26 | <item> local </item> | ||
27 | <item> BEGIN </item> | ||
28 | <item> END </item> | ||
29 | <item>require</item> | ||
30 | <item> package </item> | ||
31 | <item> sub </item> | ||
32 | <item> do </item> | ||
33 | <item> __END__ </item> | ||
34 | <item> __DATA__ </item> | ||
35 | <item> __FILE__ </item> | ||
36 | <item> __LINE__ </item> | ||
37 | <item> __PACKAGE__ </item> | ||
38 | </list> | ||
39 | <list name="operators"> | ||
40 | <item> = </item> | ||
41 | <item> != </item> | ||
42 | <item> ~= </item> | ||
43 | <item> += </item> | ||
44 | <item> -= </item> | ||
45 | <item> *= </item> | ||
46 | <item> /= </item> | ||
47 | <item> **= </item> | ||
48 | <item> |= </item> | ||
49 | <item> ||= </item> | ||
50 | <item> &= </item> | ||
51 | <item> &&= </item> | ||
52 | <item> ?= </item> | ||
53 | <item> + </item> | ||
54 | <item> - </item> | ||
55 | <item> * </item> | ||
56 | <item> / </item> | ||
57 | <item> % </item> | ||
58 | <item> || </item> | ||
59 | <item> && </item> | ||
60 | <item> | </item> | ||
61 | <item> & </item> | ||
62 | <item> < </item> | ||
63 | <item> << </item> | ||
64 | <item> > </item> | ||
65 | <item> >> </item> | ||
66 | <item> ^ </item> | ||
67 | <item> -> </item> | ||
68 | <item> => </item> | ||
69 | <item> . </item> | ||
70 | <item> , </item> | ||
71 | <item> ; </item> | ||
72 | <item> :: </item> | ||
73 | <item> \ </item> | ||
74 | <item> and </item> | ||
75 | <item> or </item> | ||
76 | <item> not </item> | ||
77 | <item> eq </item> | ||
78 | <item> ne </item> | ||
79 | </list> | ||
80 | <list name="functions"> | ||
81 | <item>abs</item> | ||
82 | <item>accept</item> | ||
83 | <item>alarm</item> | ||
84 | <item>atan2</item> | ||
85 | <item>bind</item> | ||
86 | <item>binmode</item> | ||
87 | <item>bless</item> | ||
88 | <item>caller</item> | ||
89 | <item>chdir</item> | ||
90 | <item>chmod</item> | ||
91 | <item>chomp</item> | ||
92 | <item>chop</item> | ||
93 | <item>chown</item> | ||
94 | <item>chr</item> | ||
95 | <item>chroot</item> | ||
96 | <item>close</item> | ||
97 | <item>closedir</item> | ||
98 | <item>connect</item> | ||
99 | <item>cos</item> | ||
100 | <item>crypt</item> | ||
101 | <item>dbmclose</item> | ||
102 | <item>dbmopen</item> | ||
103 | <item>defined</item> | ||
104 | <item>delete</item> | ||
105 | <item>die</item> | ||
106 | <item>dump</item> | ||
107 | <item>endgrent</item> | ||
108 | <item>endhostent</item> | ||
109 | <item>endnetent</item> | ||
110 | <item>endprotoent</item> | ||
111 | <item>endpwent</item> | ||
112 | <item>endservent</item> | ||
113 | <item>eof</item> | ||
114 | <item>eval</item> | ||
115 | <item>exec</item> | ||
116 | <item>exists</item> | ||
117 | <item>exit</item> | ||
118 | <item>exp</item> | ||
119 | <item>fcntl</item> | ||
120 | <item>fileno</item> | ||
121 | <item>flock</item> | ||
122 | <item>fork</item> | ||
123 | <item>format</item> | ||
124 | <item>formline</item> | ||
125 | <item>getc</item> | ||
126 | <item>getgrent</item> | ||
127 | <item>getgrgid</item> | ||
128 | <item>getgrnam</item> | ||
129 | <item>gethostbyaddr</item> | ||
130 | <item>gethostbyname</item> | ||
131 | <item>gethostent</item> | ||
132 | <item>getlogin</item> | ||
133 | <item>getnetbyaddr</item> | ||
134 | <item>getnetbyname</item> | ||
135 | <item>getnetent</item> | ||
136 | <item>getpeername</item> | ||
137 | <item>getpgrp</item> | ||
138 | <item>getppid</item> | ||
139 | <item>getpriority</item> | ||
140 | <item>getprotobyname</item> | ||
141 | <item>getprotobynumber</item> | ||
142 | <item>getprotoent</item> | ||
143 | <item>getpwent</item> | ||
144 | <item>getpwnam</item> | ||
145 | <item>getpwuid</item> | ||
146 | <item>getservbyname</item> | ||
147 | <item>getservbyport</item> | ||
148 | <item>getservent</item> | ||
149 | <item>getsockname</item> | ||
150 | <item>getsockopt</item> | ||
151 | <item>glob</item> | ||
152 | <item>gmtime</item> | ||
153 | <item>goto</item> | ||
154 | <item>grep</item> | ||
155 | <item>hex</item> | ||
156 | <item>import</item> | ||
157 | <item>index</item> | ||
158 | <item>int</item> | ||
159 | <item>ioctl</item> | ||
160 | <item>join</item> | ||
161 | <item>keys</item> | ||
162 | <item>kill</item> | ||
163 | <item>last</item> | ||
164 | <item>lc</item> | ||
165 | <item>lcfirst</item> | ||
166 | <item>length</item> | ||
167 | <item>link</item> | ||
168 | <item>listen</item> | ||
169 | <item>localtime</item> | ||
170 | <item>lock</item> | ||
171 | <item>log</item> | ||
172 | <item>lstat</item> | ||
173 | <item>map</item> | ||
174 | <item>mkdir</item> | ||
175 | <item>msgctl</item> | ||
176 | <item>msgget</item> | ||
177 | <item>msgrcv</item> | ||
178 | <item>msgsnd</item> | ||
179 | <item>oct</item> | ||
180 | <item>open</item> | ||
181 | <item>opendir</item> | ||
182 | <item>ord</item> | ||
183 | <item>pack</item> | ||
184 | <item>package</item> | ||
185 | <item>pipe</item> | ||
186 | <item>pop</item> | ||
187 | <item>pos</item> | ||
188 | <item>print</item> | ||
189 | <item>printf</item> | ||
190 | <item>prototype</item> | ||
191 | <item>push</item> | ||
192 | <item>quotemeta</item> | ||
193 | <item>rand</item> | ||
194 | <item>read</item> | ||
195 | <item>readdir</item> | ||
196 | <item>readline</item> | ||
197 | <item>readlink</item> | ||
198 | <item>recv</item> | ||
199 | <item>redo</item> | ||
200 | <item>ref</item> | ||
201 | <item>rename</item> | ||
202 | <item>reset</item> | ||
203 | <item>return</item> | ||
204 | <item>reverse</item> | ||
205 | <item>rewinddir</item> | ||
206 | <item>rindex</item> | ||
207 | <item>rmdir</item> | ||
208 | <item>scalar</item> | ||
209 | <item>seek</item> | ||
210 | <item>seekdir</item> | ||
211 | <item>select</item> | ||
212 | <item>semctl</item> | ||
213 | <item>semget</item> | ||
214 | <item>semop</item> | ||
215 | <item>send</item> | ||
216 | <item>setgrent</item> | ||
217 | <item>sethostent</item> | ||
218 | <item>setnetent</item> | ||
219 | <item>setpgrp</item> | ||
220 | <item>setpriority</item> | ||
221 | <item>setprotoent</item> | ||
222 | <item>setpwent</item> | ||
223 | <item>setservent</item> | ||
224 | <item>setsockopt</item> | ||
225 | <item>shift</item> | ||
226 | <item>shmctl</item> | ||
227 | <item>shmget</item> | ||
228 | <item>shmread</item> | ||
229 | <item>shmwrite</item> | ||
230 | <item>shutdown</item> | ||
231 | <item>sin</item> | ||
232 | <item>sleep</item> | ||
233 | <item>socket</item> | ||
234 | <item>socketpair</item> | ||
235 | <item>sort</item> | ||
236 | <item>splice</item> | ||
237 | <item>split</item> | ||
238 | <item>sprintf</item> | ||
239 | <item>sqrt</item> | ||
240 | <item>srand</item> | ||
241 | <item>stat</item> | ||
242 | <item>study</item> | ||
243 | <item>sub</item> | ||
244 | <item>substr</item> | ||
245 | <item>symlink</item> | ||
246 | <item>syscall</item> | ||
247 | <item>sysread</item> | ||
248 | <item>sysseek</item> | ||
249 | <item>system</item> | ||
250 | <item>syswrite</item> | ||
251 | <item>tell</item> | ||
252 | <item>telldir</item> | ||
253 | <item>tie</item> | ||
254 | <item>time</item> | ||
255 | <item>times</item> | ||
256 | <item>truncate</item> | ||
257 | <item>uc</item> | ||
258 | <item>ucfirst</item> | ||
259 | <item>umask</item> | ||
260 | <item>undef</item> | ||
261 | <item>unlink</item> | ||
262 | <item>unpack</item> | ||
263 | <item>unshift</item> | ||
264 | <item>untie</item> | ||
265 | <item>utime</item> | ||
266 | <item>values</item> | ||
267 | <item>vec</item> | ||
268 | <item>wait</item> | ||
269 | <item>waitpid</item> | ||
270 | <item>wantarray</item> | ||
271 | <item>warn</item> | ||
272 | <item>write</item> | ||
273 | </list> | ||
274 | <list name="pragmas"> | ||
275 | <item>strict</item> | ||
276 | <item>english</item> | ||
277 | <item>warnings</item> | ||
278 | <item>vars</item> | ||
279 | <item>subs</item> | ||
280 | <item>utf8</item> | ||
281 | <item>sigtrap</item> | ||
282 | <item>locale</item> | ||
283 | <item>open</item> | ||
284 | <item>less</item> | ||
285 | <item>integer</item> | ||
286 | <item>filetest</item> | ||
287 | <item>constant</item> | ||
288 | <item>bytes</item> | ||
289 | <item>diagnostics</item> | ||
290 | </list> | ||
291 | <contexts> | ||
292 | <context attribute="Normal Text" name="default" lineEndContext="#stay" name="normal"> | ||
293 | <RegExpr attribute="Keyword" context="#stay" String="^#!\/.*" /> | ||
294 | <RegExpr attribute="Keyword" context="data_handle" String="^__DATA__" /> | ||
295 | <RegExpr attribute="Keyword" context="end_handle" String="^__END__" /> | ||
296 | <keyword attribute="Keyword" context="#stay" String="keywords" /> | ||
297 | <keyword attribute="Operator" context="#stay" String="operators" /> | ||
298 | <keyword attribute="Function" context="#stay" String="functions" /> | ||
299 | <keyword attribute="Pragma" context="#stay" String="pragmas" /> | ||
300 | <RegExpr attribute="Comment" context="comment" String="#" /> | ||
301 | <RegExpr attribute="Pod" context="pod" String="^\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s*.*" /> | ||
302 | <RegExpr attribute="Keyword" context="sub_name_def" String="\s*sub\s+" /> | ||
303 | |||
304 | <HlCOct attribute="Octal" context="slash_safe_escape" /> | ||
305 | <HlCHex attribute="Hex" context="slash_safe_escape" /> | ||
306 | <Float attribute="Float" context="slash_safe_escape" /> | ||
307 | <Int attribute="Decimal" context="slash_safe_escape" /> | ||
308 | |||
309 | <RegExpr attribute="Normal Text" context="#stay" String="\\["']" /> | ||
310 | <Detect2Chars attribute="Normal Text" context="#stay" char="&" char1="'" /> | ||
311 | <DetectChar attribute="String (interpolated)" context="ip_string" char="""/> | ||
312 | <DetectChar attribute="String" context="string" char="'"/> | ||
313 | <AnyChar attribute="Operator" context="#stay" String="&\" /> | ||
314 | |||
315 | <RegExpr attribute="Special Variable" context="var_detect" String="\$[0-9]+" /> | ||
316 | <RegExpr attribute="Special Variable" context="var_detect" String="[@\$](?:[\+\-_]\B|ARGV\b|INC\b)" /> | ||
317 | <RegExpr attribute="Special Variable" context="var_detect" String="[%\$](?:INC\b|ENV\b|SIG\b)" /> | ||
318 | <RegExpr attribute="Data Type" context="var_detect" String="\$\$[\$\w_]" /> | ||
319 | <RegExpr attribute="Data Type" context="var_detect" String="\$[#_][\w_]" /> | ||
320 | <RegExpr attribute="Special Variable" context="slash_safe_escape" String="\$[^a-zA-Z0-9\s{][A-Z]?" /> | ||
321 | <RegExpr attribute="Data Type" context="var_detect" String="[\$@%]\{[\w_]+\}" /> | ||
322 | <RegExpr attribute="Data Type" context="var_detect" String="[\$@%]" /> | ||
323 | <RegExpr attribute="Data Type" context="var_detect" String="\*[a-zA-Z_]+" /> | ||
324 | |||
325 | <RegExpr attribute="Keyword" context="#stay" String="<[A-Z0-9_]+>" /> | ||
326 | <RegExpr attribute="Keyword" context="#stay" String="\s*<<\s*["']?[A-Z0-9_\-]+["']?" /> | ||
327 | <RegExpr attribute="Normal Text" context="#stay" String="\s*[)}]\s*/" /> | ||
328 | <RegExpr attribute="Normal Text" context="sub_name_def" String="\w+::" /> | ||
329 | <RegExpr attribute="Normal Text" context="#stay" String="\w+[=]" /> | ||
330 | |||
331 | <StringDetect attribute="String (interpolated)" context="ip_string_2" String="qq(" insensitive="FALSE" /> | ||
332 | <StringDetect attribute="String (interpolated)" context="ip_string_3" String="qq{" insensitive="FALSE" /> | ||
333 | <StringDetect attribute="String (interpolated)" context="ip_string_4" String="qq[" insensitive="FALSE" /> | ||
334 | <StringDetect attribute="String (interpolated)" context="ip_string_5" String="qq<" insensitive="FALSE" /> | ||
335 | <RegExpr attribute="String (interpolated)" context="#stay" String="qq([^a-zA-Z0-9_\s[\]{}()]).*\1" minimal="true" /> | ||
336 | |||
337 | <Detect2Chars attribute="String" context="string_2" char="q" char1="(" /> | ||
338 | <Detect2Chars attribute="String" context="string_3" char="q" char1="{" /> | ||
339 | <Detect2Chars attribute="String" context="string_4" char="q" char1="[" /> | ||
340 | <Detect2Chars attribute="String" context="string_5" char="q" char1="<" /> | ||
341 | <RegExpr attribute="String" context="#stay" String="q([^a-zA-Z0-9_\s[\]{}()]).+\1" /> | ||
342 | |||
343 | <StringDetect attribute="Normal Text" context="quote_word" String="qw/" /> | ||
344 | |||
345 | <RegExpr attribute="Pattern" context="#stay" String="(?:s|tr|y)\([^)]*\)\s*\([^)]*\)" /> | ||
346 | <RegExpr attribute="Pattern" context="#stay" String="(?:s|tr|y)\{[^}]*\}\s*\{[^}]*\}" /> | ||
347 | <RegExpr attribute="Pattern" context="#stay" String="(?:s|tr|y)\[[^}]*\]\s*\[[^\]]*\]" /> | ||
348 | <RegExpr attribute="Pattern" context="#stay" String="(?:s|tr|y)([^a-zA-Z0-9_\s[\]{}()]).*\1.*\1" minimal="true"/> | ||
349 | |||
350 | <Detect2Chars attribute="Pattern" context="op_s_pattern" char="s" char1="{" /> | ||
351 | |||
352 | <RegExpr attribute="Normal Text" context="#stay" String="[\w_]{3,}[[{:\-.;,]" /> | ||
353 | <RegExpr attribute="Normal Text" context="#stay" String="[\w_]([mqsy]|q[rx])\(" /> | ||
354 | |||
355 | <RegExpr attribute="Pattern" context="pattern_slash" String="(?:m|q[rx])\/" /> | ||
356 | <RegExpr attribute="Pattern" context="#stay" String="(?:m|q[rx])\([^)]*\)" /> | ||
357 | <RegExpr attribute="Pattern" context="#stay" String="(?:m|q[rx])\{[^}]*\}" /> | ||
358 | <RegExpr attribute="Pattern" context="#stay" String="(?:m|q[rx])\[[^\]]*\]" /> | ||
359 | <RegExpr attribute="Pattern" context="#stay" String="(?:m|q[rx])([^a-zA-Z0-9_-\s[\]{}()/]).+\1" minimal="true"/> | ||
360 | <RegExpr attribute="Normal Text" context="#stay" String="[\w_]+\s*/" /> | ||
361 | <RegExpr attribute="Normal Text" context="#stay" String="[<>"':]/" /> | ||
362 | <DetectChar attribute="Pattern" context="pattern_slash" char="/" /> | ||
363 | <RegExpr attribute="Operator" context="#stay" String="-[rwxoRWXOeszfdlpSbctugkTBMAC]" /> | ||
364 | </context> | ||
365 | <context attribute="Pod" lineEndContext="#stay" name="pod"> | ||
366 | <LineContinue attribute="Pod" context="#stay" /> | ||
367 | <RegExpr attribute="Pod" context="#stay" String="[^\=]*" /> | ||
368 | <RegExpr attribute="Pod" context="#pop" String="^\=cut.*$" /> | ||
369 | </context> | ||
370 | <context attribute="String (interpolated)" lineContext="#stay" name="ipstring_internal"> | ||
371 | <RegExpr attribute="String (interpolated)" context="#stay" String="\\[\$@%]" /> | ||
372 | <RegExpr attribute="Special Variable" context="#stay" String="\$[0-9]+" /> | ||
373 | <RegExpr attribute="Data Type" context="var_detect" String="\$+#?[a-zA-Z_]+[a-zA-Z0-9_]*" /> | ||
374 | <RegExpr attribute="Data Type" context="var_detect" String="[@%][\$a-zA-Z_]+[a-zA-Z0-9_]*" /> | ||
375 | <RegExpr attribute="String Special Character" context="#stay" String="\\[UuLlEtnaefr]" /> | ||
376 | </context> | ||
377 | <context attribute="Pattern" lineEndContext="#stay" name="regex_pattern_internal"> | ||
378 | <RegExpr attribute="Comment" context="#stay" String="^\s*#.*$" /> | ||
379 | <RegExpr attribute="Pattern Character Class" context="#stay" String="\\[anDdSsWw]" /> | ||
380 | <RegExpr attribute="Pattern Internal Operator" context="#stay" String="\\[ABbEGLlNUuQdQZz]" /> | ||
381 | <RegExpr attribute="Special Variable" context="#stay" String="\\[\d]+" /> | ||
382 | <RegExpr attribute="Pattern" context="#stay" String="\\." /> | ||
383 | |||
384 | <RegExpr attribute="Data Type" context="#stay" String="[\$@]#?[a-zA-Z_]+[a-zA-Z0-9_]*" /> | ||
385 | <Detect2Chars attribute="Pattern Internal Operator" context="pat_ext" char="(" char1="?" /> | ||
386 | <DetectChar attribute="Pattern Internal Operator" context="pat_char_class" char="[" /> | ||
387 | <RegExpr attribute="Pattern Internal Operator" context="#stay" String="[()?^*+|]" /> | ||
388 | <RegExpr attribute="Pattern Internal Operator" context="#stay" String="\{[\d, ]+\}" /> | ||
389 | <DetectChar attribute="Pattern Internal Operator" context="#stay" char="$" /> | ||
390 | <RegExpr attribute="Comment" context="#stay" String="\s{3,}#.*$" /> | ||
391 | </context> | ||
392 | <context attribute="String (interpolated)" lineEndContext="#stay" name="ip_string"> | ||
393 | <LineContinue attribute="String (interpolated)" context="#stay"/> | ||
394 | <Detect2Chars attribute="String" context="#stay" char="\" char1="\" /> | ||
395 | <Detect2Chars attribute="String (interpolated)" context="#stay" char="\" char1=""" /> | ||
396 | <DetectChar attribute="String (interpolated)" context="#pop" char="""/> | ||
397 | <IncludeRules context="2" /> | ||
398 | </context> | ||
399 | <context attribute="String" lineEndContext="#stay" name="string"> | ||
400 | <LineContinue attribute="String" context="#stay"/> | ||
401 | <Detect2Chars attribute="String" context="#stay" char="\" char1="\" /> | ||
402 | <Detect2Chars attribute="String" context="#stay" char="\" char1="'" /> | ||
403 | <DetectChar attribute="String" context="#pop" char="'" /> | ||
404 | </context> | ||
405 | <context attribute="String (interpolated)" lineEndContext="#stay" name="ip_string_2"> | ||
406 | <LineContinue attribute="String (interpolated)" context="#stay" /> | ||
407 | <Detect2Chars attribute="String (interpolated)" context="#stay" char="\" char1="(" /> | ||
408 | <Detect2Chars attribute="String (interpolated)" context="#stay" char="\" char1=")" /> | ||
409 | <RangeDetect attribute="String (interpolated)" context="#stay" char="(" char1=")" /> | ||
410 | <DetectChar attribute="String (interpolated)" context="#pop" char=")" /> | ||
411 | <IncludeRules context="2" /> | ||
412 | </context> | ||
413 | <context attribute="String (interpolated)" lineEndContext="#stay" name="ip_string_3"> | ||
414 | <LineContinue attribute="String (interpolated)" context="#stay" /> | ||
415 | <Detect2Chars attribute="String (interpolated)" context="#stay" char="\" char1="{" /> | ||
416 | <Detect2Chars attribute="String (interpolated)" context="#stay" char="\" char1="}" /> | ||
417 | <RangeDetect attribute="String (interpolated)" context="#stay" char="{" char1="}" /> | ||
418 | <DetectChar attribute="String (interpolated)" context="#pop" char="}" /> | ||
419 | <IncludeRules context="2" /> | ||
420 | </context> | ||
421 | <context attribute="String (interpolated)" lineEndContext="#stay" name="ip_string_4"> | ||
422 | <LineContinue attribute="String (interpolated)" context="#stay" /> | ||
423 | <Detect2Chars attribute="String (interpolated)" context="#stay" char="\" char1="[" /> | ||
424 | <Detect2Chars attribute="String (interpolated)" context="#stay" char="\" char1="]" /> | ||
425 | <RangeDetect attribute="String (interpolated)" context="#stay" char="[" char1="]" /> | ||
426 | <DetectChar attribute="String (interpolated)" context="#pop" char="]" /> | ||
427 | <IncludeRules context="2" /> | ||
428 | </context> | ||
429 | <context attribute="String (interpolated)" lineEndContext="#stay" name="ip_string_5"> | ||
430 | <LineContinue attribute="String (interpolated)" context="#stay" /> | ||
431 | <Detect2Chars attribute="String (interpolated)" context="#stay" char="\" char1="<" /> | ||
432 | <Detect2Chars attribute="String (interpolated)" context="#stay" char="\" char1=">" /> | ||
433 | <RangeDetect attribute="String (interpolated)" context="#stay" char="<" char1=">" /> | ||
434 | <DetectChar attribute="String (interpolated)" context="#pop" char=">" /> | ||
435 | <IncludeRules context="2" /> | ||
436 | </context> | ||
437 | <context attribute="String" lineEndContext="#stay" name="string_2"> | ||
438 | <LineContinue attribute="String" context="#stay" /> | ||
439 | <Detect2Chars attribute="String" context="#stay" char="\" char1="(" /> | ||
440 | <Detect2Chars attribute="String" context="#stay" char="\" char1=")" /> | ||
441 | <RangeDetect attribute="String" context="#stay" char="(" char1=")" /> | ||
442 | <DetectChar attribute="String" context="#pop" char=")" /> | ||
443 | </context> | ||
444 | <context attribute="String" lineEndContext="#stay" name="string_3"> | ||
445 | <Detect2Chars attribute="String" context="#stay" char="\" char1="{" /> | ||
446 | <Detect2Chars attribute="String" context="#stay" char="\" char1="}" /> | ||
447 | <RangeDetect attribute="String" context="#stay" char="{" char1="}" /> | ||
448 | <LineContinue attribute="String" context="#stay" /> | ||
449 | <DetectChar attribute="String" context="#pop" char="}" /> | ||
450 | </context> | ||
451 | <context attribute="String" lineEndContext="#stay" name="string_4"> | ||
452 | <LineContinue attribute="String" context="#stay" /> | ||
453 | <Detect2Chars attribute="String" context="#stay" char="\" char1="[" /> | ||
454 | <Detect2Chars attribute="String" context="#stay" char="\" char1="]" /> | ||
455 | <RangeDetect attribute="String" context="#stay" char="[" char1="]" /> | ||
456 | <DetectChar attribute="String" context="#pop" char="]" /> | ||
457 | </context> | ||
458 | <context attribute="String" lineEndContext="#stay" name="string_5"> | ||
459 | <LineContinue attribute="String" context="#stay" /> | ||
460 | <Detect2Chars attribute="String" context="#stay" char="\" char1="<" /> | ||
461 | <Detect2Chars attribute="String" context="#stay" char="\" char1=">" /> | ||
462 | <RangeDetect attribute="String" context="#stay" char="<" char1=">" /> | ||
463 | <DetectChar attribute="String" context="#pop" char=">" /> | ||
464 | </context> | ||
465 | <context attribute="Pattern" lineEndContext="#stay" name="op_s_pattern"> | ||
466 | <LineContinue attribute="Pattern" context="#stay" /> | ||
467 | <RegExpr attribute="Comment" context="#stay" String="\s+#.*$" /> | ||
468 | <Detect2Chars attribute="Pattern" context="#stay" char="\" char1="{" /> | ||
469 | <Detect2Chars attribute="Pattern" context="#stay" char="\" char1="}" /> | ||
470 | <IncludeRules context="3" /> | ||
471 | <DetectChar attribute="Pattern" context="op_s_replace" char="}" /> | ||
472 | </context> | ||
473 | <context attribute="Normal Text" lineEndContext="#stay" name="op_s_replace"> | ||
474 | <LineContinue attribute="Normal Text" context="#stay" /> | ||
475 | <RegExpr attribute="Normal Text" context="#stay" String="["'\/]" /> | ||
476 | <RegExpr attribute="Comment" context="#stay" String="\s*#.*$" /> | ||
477 | <RegExpr attribute="Special Variable" context="#stay" String="\$[0-9]+" /> | ||
478 | <RegExpr attribute="Data Type" context="#stay" String="\$+#?[a-zA-Z_]+[a-zA-Z0-9_]*" /> | ||
479 | <RegExpr attribute="Data Type" context="#stay" String="[@%][\$a-zA-Z_]+[a-zA-Z0-9_]*" /> | ||
480 | <keyword attribute="Keyword" context="0" String="keywords" /> | ||
481 | <keyword attribute="Operator" context="0" String="operators" /> | ||
482 | <keyword attribute="Function" context="0" String="functions" /> | ||
483 | <Detect2Chars attribute="Pattern" context="#stay" char="\" char1="{" /> | ||
484 | <Detect2Chars attribute="Pattern" context="#stay" char="\" char1="}" /> | ||
485 | <DetectChar attribute="Pattern" context="#stay" char="{" /> | ||
486 | <DetectChar attribute="Pattern" context="#pop#pop" char="}" /> | ||
487 | </context> | ||
488 | <context attribute="Normal Text" lineEndContext="#stay" name="quote_word"> | ||
489 | <LineContinue attribute="Normal Text" context="#stay" /> | ||
490 | <Detect2Chars attribute="Normal Text" context="#stay" char="\" char1="/" /> | ||
491 | <DetectChar attribute="Normal Text" context="#pop" char="/" /> | ||
492 | <RegExpr attribute="Data Type" context="#stay" String="\$+#?[a-zA-Z_]+[a-zA-Z0-9_]*" /> | ||
493 | <RegExpr attribute="Data Type" context="#stay" String="[@%][\$a-zA-Z_]+[a-zA-Z0-9_]*" /> | ||
494 | </context> | ||
495 | <context attribute="Pattern" lineEndContext="#stay" name="pattern_slash"> | ||
496 | <RegExpr attribute="Comment" context="#stay" String="^\s*#.*$" /> | ||
497 | <LineContinue attribute="Pattern" context="#stay" /> | ||
498 | <IncludeRules context="3" /> | ||
499 | <DetectChar attribute="Pattern" context="#pop" char="/" /> | ||
500 | </context> | ||
501 | <context attribute="Data" lineEndContext="#stay" name="data_handle"> | ||
502 | <LineContinue attribute="Data" context="#stay"/> | ||
503 | <RegExpr attribute="Pod" context="pod" String="^\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s*.*" /> | ||
504 | <RegExpr attribute="Keyword" context="end_handle" String="^__END__" /> | ||
505 | </context> | ||
506 | <context attribute="Nothing" lineEndContext="#stay" name="end_handle"> | ||
507 | <LineContinue attribute="Nothing" context="#stay" /> | ||
508 | <RegExpr attribute="Pod" context="pod" String="^\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s*.*" /> | ||
509 | <RegExpr attribute="Keyword" context="data_handle" String="^__DATA__" /> | ||
510 | </context> | ||
511 | <context attribute="Normal Text" lineEndContext="#stay" name="var_detect" fallthrough="true" fallthroughContext="#pop"> | ||
512 | <RegExpr attribute="Data Type" context="#stay" String="[\w_]+" /> | ||
513 | <AnyChar attribute="Normal Text" context="#pop" String="[;,*=!&" /> | ||
514 | <RegExpr attribute="Normal Text" context="#stay" String="\s*[})]?\s*/" /> | ||
515 | <DetectChar attribute="Operator" context="#stay" char="'" /> | ||
516 | <RegExpr attribute="Normal Text" context="in_hash_elem" String="\s*\{" /> | ||
517 | <RegExpr attribute="Operator" context="#stay" String="(\+\+|--)" /> | ||
518 | <Detect2Chars attribute="Normal Text" context="#stay" char=":" char1=":" /> | ||
519 | <RegExpr attribute="Normal Text" context="#stay" String="\s*\}?\s*->\s*" /> | ||
520 | <RegExpr attribute="Normal Text" context="in_hash_elem" String="\s*\}\s*\{\s*" /> | ||
521 | <RegExpr attribute="Data Type" context="#stay" String="[\$@%]" /> | ||
522 | </context> | ||
523 | <context attribute="Normal Text" lineEndContext="#pop" name="slash_safe_escape" fallthrough="true" fallthroughContext="#pop"> | ||
524 | <RegExpr attribute="Normal Text" context="#pop" String="\s*[)}\]]?\s*/" /> | ||
525 | <keyword attribute="Keyword" context="#pop" String="keywords" /> | ||
526 | </context> | ||
527 | <context attribute="Normal Text" lineEndContext="#pop" name="sub_name_def"> | ||
528 | <RegExpr attribute="Normal Text" context="#stay" String="[\w_]+" /> | ||
529 | <DetectChar attribute="Data Type" context="var_detect" char="$" /> | ||
530 | <RegExpr attribute="Normal Text" context="sub_arg_definition" String="\s*\(" /> | ||
531 | <AnyChar attribute="Normal Text" context="#pop" String=";{" /> | ||
532 | </context> | ||
533 | <context attribute="Normal Text" lineEndContext="#stay" name="package_qualified_blank"> | ||
534 | <RegExpr attribute="Normal Text" context="#pop" String="[\w_]+" /> | ||
535 | </context> | ||
536 | <context attribute="Normal Text" lineEndContext="#pop" name="in_hash_elem"> | ||
537 | <DetectChar attribute="String (interpolated)" context="ip_string" char=""" /> | ||
538 | <DetectChar attribute="String" context="string" char="'" /> | ||
539 | <RegExpr attribute="String" context="#stay" String="\s*[\w_]+\s*(?![\w_\(])" /> | ||
540 | <RegExpr attribute="Special Variable" context="#stay" String="\$[0-9]+" /> | ||
541 | <RegExpr attribute="Special Variable" context="#stay" String="[@\$](?:[\+\-_]\B|ARGV\b|INC\b)" /> | ||
542 | <RegExpr attribute="Special Variable" context="#stay" String="[%\$](?:INC\b|ENV\b|SIG\b)" /> | ||
543 | <RegExpr attribute="Data Type" context="var_detect" String="\$\$[\$\w_]" /> | ||
544 | <RegExpr attribute="Data Type" context="var_detect" String="\$[#_][\w_]" /> | ||
545 | <RegExpr attribute="Special Variable" context="#stay" String="\$[^a-zA-Z0-9\s{][A-Z]" /> | ||
546 | <RegExpr attribute="Data Type" context="var_detect" String="[\$@%]" /> | ||
547 | <RegExpr attribute="Normal Text" context="#pop" String="\s*[\w_]+\s*\(" /> | ||
548 | <DetectChar attribute="Normal Text" context="#pop" char="}" /> | ||
549 | </context> | ||
550 | <context attribute="Normal Text" lineEndContext="#stay" name="sub_arg_definition" fallthrough="true" fallthroughContext="#pop#pop"> | ||
551 | <RegExpr attribute="Data Type" context="#stay" String="[\$@%]" /> | ||
552 | <DetectChar attribute="Normal Text" context="slash_safe_escape" char=")" /> | ||
553 | </context> | ||
554 | <context attribute="Pattern Internal Operator" lineEndContext="#stay" name="pat_ext"> | ||
555 | <RegExpr attribute="Comment" context="#pop" String="\#[^)]*" /> | ||
556 | <RegExpr attribute="Pattern Internal Operator" context="#pop" String="[:=!><]+" /> | ||
557 | <DetectChar attribute="Pattern Internal Operator" context="#pop" char=")" /> | ||
558 | </context> | ||
559 | <context attribute="Pattern Character Class" lineEndContext="#stay" name="pat_char_class"> | ||
560 | <LineContinue attribute="Pattern Character Class" context="#stay" /> | ||
561 | <DetectChar attribute="Pattern Internal Operator" context="#stay" char="^" /> | ||
562 | <Detect2Chars attribute="Pattern Character Class" context="#stay" char="\" char1="\" /> | ||
563 | <Detect2Chars attribute="Pattern Character Class" context="#stay" char="\" char1="]" /> | ||
564 | <RangeDetect attribute="Pattern Character Class" context="#stay" char="[" char1="]" /> | ||
565 | <DetectChar attribute="Pattern Internal Operator" context="#pop" char="]" /> | ||
566 | </context> | ||
567 | <context attribute="Comment" name="comment" lineEndContext="#pop"> | ||
568 | <RegExpr attribute="Note" context="#stay" String="(?:FIXME|TODO|NOTE):?" /> | ||
569 | </context> | ||
570 | </contexts> | ||
571 | <itemDatas> | ||
572 | <itemData name="Normal Text" defStyleNum="dsNormal" /> | ||
573 | <itemData name="Keyword" defStyleNum="dsKeyword" /> | ||
574 | <itemData name="Pragma" defStyleNum="dsKeyword" /> | ||
575 | <itemData name="Function" defStyleNum="dsNormal" color="#000080" selColor="#ffffff" bold="0" italic="0"/> | ||
576 | <itemData name="Operator" defStyleNum="dsKeyword" /> | ||
577 | <itemData name="Data Type" defStyleNum="dsDataType" /> | ||
578 | <itemData name="Special Variable" defStyleNum="dsDataType" color="#C00000" selColor="#C00000" bold="0" italic="0" /> | ||
579 | <itemData name="Decimal" defStyleNum="dsDecVal" /> | ||
580 | <itemData name="Octal" defStyleNum="dsBaseN" /> | ||
581 | <itemData name="Hex" defStyleNum="dsBaseN" /> | ||
582 | <itemData name="Float" defStyleNum="dsFloat" /> | ||
583 | <itemData name="String" defStyleNum="dsString" color="#FF6C6C" selColor="#FF6C6C" bold="0" italic="0" /> | ||
584 | <itemData name="String (interpolated)" defStyleNum="dsString" /> | ||
585 | <itemData name="String Special Character" defStyleNum="dsChar" /> | ||
586 | <itemData name="Pattern" defStyleNum="dsOthers" /> | ||
587 | <itemData name="Pattern Internal Operator" defStyleNum="dsChar" /> | ||
588 | <itemData name="Pattern Character Class" defStyleNum="dsBaseN" /> | ||
589 | <itemData name="Data" defStyleNum="dsNormal" /> | ||
590 | <itemData name="Comment" defStyleNum="dsComment" /> | ||
591 | <itemData name="Pod" defStyleNum="dsComment" /> | ||
592 | <itemData name="Nothing" defStyleNum="dsComment" /> | ||
593 | <itemData name="Note" defStyleNum="dsDecVal" color="#0000FF" selColor="#ffffff" bold="1" italic="0"/> | ||
594 | </itemDatas> | ||
595 | </highlighting> | ||
596 | <general> | ||
597 | <comments> | ||
598 | <comment name="singleLine" start="#" /> | ||
599 | </comments> | ||
600 | <keywords casesensitive="1" /> | ||
601 | </general> | ||
602 | </language> | ||
603 | |||