Warning, /frameworks/syntax-highlighting/data/syntax/perl.xml is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!DOCTYPE language>
0003 <!--
0004    This file is part of the KDE project
0005    Copyright (C) 2001, 2002, 2003, 2004 Anders Lund <anders@alweb.dk>
0006 
0007    This library is free software; you can redistribute it and/or
0008    modify it under the terms of the GNU Library General Public
0009    License version 2 as published by the Free Software Foundation.
0010 
0011    This library is distributed in the hope that it will be useful,
0012    but WITHOUT ANY WARRANTY; without even the implied warranty of
0013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014    Library General Public License for more details.
0015 
0016    You should have received a copy of the GNU Library General Public License
0017    along with this library; see the file COPYING.LIB.  If not, write to
0018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0019    Boston, MA 02110-1301, USA.
0020 
0021    *** NOTICE ***
0022    This file is maintained by Anders Lund <anders@alweb.dk>
0023    Please do not commit changes without checking with me.
0024 
0025    *** TODO ***
0026 
0027    Work on the comment support in the REPLACEMENT part of s/// - we may support
0028    the comment, if the line remainder does not contain the delimiter char.
0029 
0030    Try to support ?PATTERN? (at least in one line, like if "\?(?=.*\?)" matches).
0031 
0032    parse code behind '<<HEREDELIMITER' as code, or at least ignore it, to eol.
0033    Requires the ability to pass the delimiter through a context level.
0034 
0035    find a here delimiter like '*END*' (Shell.pm). Requires that when a regex is
0036    inserting a dynamic string, it escapes [*(){}$[]
0037 
0038    support for more regex extensions, such as (?>), (?{}), (?(cond)yes|no)
0039 
0040    Enhance tr/// and y/// support.
0041 -->
0042 <language name="Perl" version="19" kateversion="5.0" section="Scripts" extensions="*.pl;*.PL;*.pm" mimetype="application/x-perl;text/x-perl" priority="5" author="Anders Lund (anders@alweb.dk)" license="LGPLv2">
0043   <highlighting>
0044     <list name="keywords">
0045       <item>if</item>
0046       <item>unless</item>
0047       <item>else</item>
0048       <item>elsif</item>
0049       <item>while</item>
0050       <item>until</item>
0051       <item>for</item>
0052       <item>each</item>
0053       <item>foreach</item>
0054       <item>next</item>
0055       <item>last</item>
0056       <item>break</item>
0057       <item>continue</item>
0058       <item>return</item>
0059       <item>my</item>
0060       <item>our</item>
0061       <item>local</item>
0062       <item>state</item>
0063       <item>BEGIN</item>
0064       <item>END</item>
0065       <item>package</item>
0066       <item>sub</item>
0067       <item>do</item>
0068       <item>given</item>
0069       <item>when</item>
0070       <item>default</item>
0071       <item>__END__</item>
0072       <item>__DATA__</item>
0073       <item>__FILE__</item>
0074       <item>__LINE__</item>
0075       <item>__PACKAGE__</item>
0076     </list>
0077     <list name="operators">
0078       <item>=</item>
0079       <item>!=</item>
0080       <item>~=</item>
0081       <item>+=</item>
0082       <item>-=</item>
0083       <item>*=</item>
0084       <item>/=</item>
0085       <item>**=</item>
0086       <item>|=</item>
0087       <item>||=</item>
0088       <item>//=</item>
0089       <item>&amp;=</item>
0090       <item>&amp;&amp;=</item>
0091       <item>?=</item>
0092       <item>+</item>
0093       <item>-</item>
0094       <item>*</item>
0095       <!-- <item>/</item>//-->
0096       <item>%</item>
0097       <item>||</item>
0098       <item>//</item>
0099       <item>&amp;&amp;</item>
0100       <item>|</item>
0101       <item>&amp;</item>
0102       <item>&lt;</item>
0103       <item>&lt;&lt;</item>
0104       <item>&gt;</item>
0105       <item>&gt;&gt;</item>
0106       <item>^</item>
0107       <item>-&gt;</item>
0108       <item>=&gt;</item>
0109       <item>.</item>
0110       <item>,</item>
0111       <item>;</item>
0112       <item>::</item>
0113       <item>\</item>
0114       <item>and</item>
0115       <item>or</item>
0116       <item>not</item>
0117       <item>eq</item>
0118       <item>ne</item>
0119       <item>lt</item>
0120       <item>gt</item>
0121       <item>le</item>
0122       <item>ge</item>
0123       <item>cmp</item>
0124     </list>
0125     <list name="functions">
0126       <item>abs</item>
0127       <item>accept</item>
0128       <item>alarm</item>
0129       <item>atan2</item>
0130       <item>bind</item>
0131       <item>binmode</item>
0132       <item>bless</item>
0133       <item>caller</item>
0134       <item>chdir</item>
0135       <item>chmod</item>
0136       <item>chomp</item>
0137       <item>chop</item>
0138       <item>chown</item>
0139       <item>chr</item>
0140       <item>chroot</item>
0141       <item>close</item>
0142       <item>closedir</item>
0143       <item>connect</item>
0144       <item>cos</item>
0145       <item>crypt</item>
0146       <item>dbmclose</item>
0147       <item>dbmopen</item>
0148       <item>defined</item>
0149       <item>delete</item>
0150       <item>die</item>
0151       <item>dump</item>
0152       <item>endgrent</item>
0153       <item>endhostent</item>
0154       <item>endnetent</item>
0155       <item>endprotoent</item>
0156       <item>endpwent</item>
0157       <item>endservent</item>
0158       <item>eof</item>
0159       <item>eval</item>
0160       <item>exec</item>
0161       <item>exists</item>
0162       <item>exit</item>
0163       <item>exp</item>
0164       <item>fcntl</item>
0165       <item>fileno</item>
0166       <item>flock</item>
0167       <item>fork</item>
0168       <item>format</item>
0169       <item>formline</item>
0170       <item>getc</item>
0171       <item>getgrent</item>
0172       <item>getgrgid</item>
0173       <item>getgrnam</item>
0174       <item>gethostbyaddr</item>
0175       <item>gethostbyname</item>
0176       <item>gethostent</item>
0177       <item>getlogin</item>
0178       <item>getnetbyaddr</item>
0179       <item>getnetbyname</item>
0180       <item>getnetent</item>
0181       <item>getpeername</item>
0182       <item>getpgrp</item>
0183       <item>getppid</item>
0184       <item>getpriority</item>
0185       <item>getprotobyname</item>
0186       <item>getprotobynumber</item>
0187       <item>getprotoent</item>
0188       <item>getpwent</item>
0189       <item>getpwnam</item>
0190       <item>getpwuid</item>
0191       <item>getservbyname</item>
0192       <item>getservbyport</item>
0193       <item>getservent</item>
0194       <item>getsockname</item>
0195       <item>getsockopt</item>
0196       <item>glob</item>
0197       <item>gmtime</item>
0198       <item>goto</item>
0199       <item>grep</item>
0200       <item>hex</item>
0201       <item>import</item>
0202       <item>index</item>
0203       <item>int</item>
0204       <item>ioctl</item>
0205       <item>join</item>
0206       <item>keys</item>
0207       <item>kill</item>
0208       <item>last</item>
0209       <item>lc</item>
0210       <item>lcfirst</item>
0211       <item>length</item>
0212       <item>link</item>
0213       <item>listen</item>
0214       <item>localtime</item>
0215       <item>lock</item>
0216       <item>log</item>
0217       <item>lstat</item>
0218       <item>map</item>
0219       <item>mkdir</item>
0220       <item>msgctl</item>
0221       <item>msgget</item>
0222       <item>msgrcv</item>
0223       <item>msgsnd</item>
0224       <item>no</item>
0225       <item>oct</item>
0226       <item>open</item>
0227       <item>opendir</item>
0228       <item>ord</item>
0229       <item>pack</item>
0230       <item>package</item>
0231       <item>pipe</item>
0232       <item>pop</item>
0233       <item>pos</item>
0234       <item>print</item>
0235       <item>printf</item>
0236       <item>prototype</item>
0237       <item>push</item>
0238       <item>quotemeta</item>
0239       <item>rand</item>
0240       <item>read</item>
0241       <item>readdir</item>
0242       <item>readline</item>
0243       <item>readlink</item>
0244       <item>recv</item>
0245       <item>redo</item>
0246       <item>ref</item>
0247       <item>rename</item>
0248       <item>require</item>
0249       <item>reset</item>
0250       <item>return</item>
0251       <item>reverse</item>
0252       <item>rewinddir</item>
0253       <item>rindex</item>
0254       <item>rmdir</item>
0255       <item>say</item>
0256       <item>scalar</item>
0257       <item>seek</item>
0258       <item>seekdir</item>
0259       <item>select</item>
0260       <item>semctl</item>
0261       <item>semget</item>
0262       <item>semop</item>
0263       <item>send</item>
0264       <item>setgrent</item>
0265       <item>sethostent</item>
0266       <item>setnetent</item>
0267       <item>setpgrp</item>
0268       <item>setpriority</item>
0269       <item>setprotoent</item>
0270       <item>setpwent</item>
0271       <item>setservent</item>
0272       <item>setsockopt</item>
0273       <item>shift</item>
0274       <item>shmctl</item>
0275       <item>shmget</item>
0276       <item>shmread</item>
0277       <item>shmwrite</item>
0278       <item>shutdown</item>
0279       <item>sin</item>
0280       <item>sleep</item>
0281       <item>socket</item>
0282       <item>socketpair</item>
0283       <item>sort</item>
0284       <item>splice</item>
0285       <item>split</item>
0286       <item>sprintf</item>
0287       <item>sqrt</item>
0288       <item>srand</item>
0289       <item>stat</item>
0290       <item>study</item>
0291       <item>sub</item>
0292       <item>substr</item>
0293       <item>symlink</item>
0294       <item>syscall</item>
0295       <item>sysread</item>
0296       <item>sysseek</item>
0297       <item>system</item>
0298       <item>syswrite</item>
0299       <item>tell</item>
0300       <item>telldir</item>
0301       <item>tie</item>
0302       <item>time</item>
0303       <item>times</item>
0304       <item>truncate</item>
0305       <item>uc</item>
0306       <item>ucfirst</item>
0307       <item>umask</item>
0308       <item>undef</item>
0309       <item>unlink</item>
0310       <item>unpack</item>
0311       <item>unshift</item>
0312       <item>untie</item>
0313       <item>use</item>
0314       <item>utime</item>
0315       <item>values</item>
0316       <item>vec</item>
0317       <item>wait</item>
0318       <item>waitpid</item>
0319       <item>wantarray</item>
0320       <item>warn</item>
0321       <item>write</item>
0322     </list>
0323     <list name="pragmas">
0324       <item>strict</item>
0325       <item>english</item>
0326       <item>warnings</item>
0327       <item>vars</item>
0328       <item>subs</item>
0329       <item>utf8</item>
0330       <item>sigtrap</item>
0331       <item>locale</item>
0332       <item>open</item>
0333       <item>less</item>
0334       <item>integer</item>
0335       <item>filetest</item>
0336       <item>constant</item>
0337       <item>bytes</item>
0338       <item>diagnostics</item>
0339     </list>
0340     <contexts>
0341       <context name="normal" attribute="Normal Text" lineEndContext="#stay">
0342         <RegExpr attribute="Keyword" context="#stay" String="^#!\/.*" column="0" />
0343         <StringDetect attribute="Keyword" context="data_handle" String="__DATA__" firstNonSpace="true" />
0344         <StringDetect attribute="Keyword" context="#stay" String="__END__" firstNonSpace="true"/>
0345         <RegExpr attribute="Keyword" context="sub_name_def" String="\bsub\s+" />
0346         <keyword attribute="Keyword" context="#stay" String="keywords" />
0347         <keyword attribute="Operator" context="#stay" String="operators" />
0348         <keyword attribute="Function" context="#stay" String="functions" />
0349         <keyword attribute="Pragma" context="#stay" String="pragmas" />
0350         <RegExpr attribute="Pod" context="pod" String="^\=\w+(\s|$)" column="0" beginRegion="POD"/>
0351         <DetectSpaces />
0352         <DetectChar attribute="Comment" context="comment" char="#" />
0353 
0354         <!-- Numeric values. Note that we have to allow underscores between two digits (thus the creepy regular expressions). -->
0355         <RegExpr attribute="Hex" String="\b\-?0[xX]([0-9a-fA-F]|_[0-9a-fA-F])+" context="slash_safe_escape"/>
0356         <RegExpr attribute="Bin" String="\b\-?0[bB]([01]|_[01])+" context="slash_safe_escape"/>
0357         <RegExpr attribute="Octal" String="\b\-?0[1-7]([0-7]|_[0-7])*" context="slash_safe_escape"/>
0358         <RegExpr attribute="Float" String="\b\-?[0-9]([0-9]|_[0-9])*\.[0-9]([0-9]|_[0-9])*([eE]\-?[1-9]([0-9]|_[0-9])*(\.[0-9]*)?)?" context="slash_safe_escape"/>
0359         <RegExpr attribute="Decimal" String="\b\-?[1-9]([0-9]|_[0-9])*\b" context="slash_safe_escape"/>
0360         <Int attribute="Decimal" context="slash_safe_escape" />
0361 
0362         <!-- Allow strings as scalar references (ex: \'string') (see bug #348765). -->
0363         <!-- <RegExpr attribute="Normal Text" context="#stay" String="\\([&quot;'])[^\1]" /> -->
0364         <Detect2Chars attribute="Normal Text" context="#stay" char="&amp;" char1="'" /><!-- ??? -->
0365         <DetectChar attribute="Operator" context="ip_string" char="&quot;" beginRegion="String" />
0366         <DetectChar attribute="Operator" context="string" char="'"  beginRegion="String"/>
0367         <DetectChar attribute="Operator" context="Backticked" char="`" />
0368 
0369         <RegExpr attribute="Normal Text" context="find_variable" String="(?:[$@]\S|%([\w\{\+\-!]|\^H)|\*[^\d\*{\$@%=(])" lookAhead="true" />
0370 
0371         <RegExpr attribute="Keyword" context="#stay" String="&lt;[A-Z0-9_]+&gt;" />
0372 
0373         <RegExpr attribute="Operator" context="find_here_document" String="\s*&lt;&lt;(?=\w+|\s*[&quot;'])" beginRegion="HereDocument" />
0374 
0375         <RegExpr attribute="Normal Text" context="#stay" String="\s*\}\s*/{1,2}" endRegion="Block"/>
0376         <RegExpr attribute="Normal Text" context="#stay" String="\s*[)\]]\s*/{1,2}" />
0377 
0378         <RegExpr attribute="Function" context="sub_name_def" String="\w+::" />
0379         <RegExpr attribute="Normal Text" context="#stay" String="\w+[=]" />
0380 
0381         <RegExpr attribute="Operator" context="find_quoted" String="\bq(?=[qwx]?\s*[^\w\s])" />
0382         <RegExpr attribute="Operator" context="find_subst" String="\bs(?=\s*[^\w\s\]})])" />
0383         <RegExpr attribute="Operator" context="tr" String="\b(?:tr|y)\s*(?=[^\w\s\]})])" />
0384 
0385         <RegExpr attribute="Operator" context="find_pattern" String="\b(?:m|qr)(?=\s*[^\w\s\]})])" />
0386 
0387         <RegExpr attribute="Normal Text" context="#stay" String="[\w_]+\s*//?\=?|[&lt;&gt;&quot;':]//?\=?" />
0388         <!-- Avoid conflicts between operators / and // -->
0389         <StringDetect attribute="Normal Text" context="#stay" String="//=" />
0390         <Detect2Chars attribute="Normal Text" context="#stay" char="/" char1="/" />
0391         <DetectChar attribute="Operator" context="pattern_slash" char="/" beginRegion="Pattern" />
0392         <RegExpr attribute="Operator" context="#stay" String="-[rwxoRWXOeszfdlpSbctugkTBMAC]\b" />
0393 
0394         <DetectChar attribute="Normal Text" context="#stay" char="{" beginRegion="Block" />
0395         <DetectChar attribute="Normal Text" context="#stay" char="}" endRegion="Block" />
0396       </context>
0397 
0398       <!-- ====== quoted construct central ===== -->
0399       <context name="find_quoted" attribute="Normal Text" lineEndContext="#stay" >
0400         <!-- NOTE - qx'not interpolated regex' does not cover newline between "qr" and "'" -->
0401         <RegExpr attribute="Operator" context="string_6" String="x\s*(')" beginRegion="String" />
0402         <AnyChar attribute="Operator" context="find_qqx" String="qx" />
0403         <DetectChar attribute="Operator" context="find_qw" char="w" />
0404         <DetectChar attribute="Operator" context="string_2" char="(" beginRegion="String" />
0405         <DetectChar attribute="Operator" context="string_3" char="{" beginRegion="String" />
0406         <DetectChar attribute="Operator" context="string_4" char="[" beginRegion="String" />
0407         <DetectChar attribute="Operator" context="string_5" char="&lt;" beginRegion="String" />
0408         <RegExpr attribute="Operator" context="string_6" String="([^a-zA-Z0-9_\s[\]{}()])" beginRegion="String" />
0409         <RegExpr attribute="Comment" context="#stay" String="\s+#.*" /><!-- q[qwx] # == comment, look for the delim on the next line -->
0410       </context>
0411       <context name="find_qqx" attribute="Normal Text" lineEndContext="#stay" >
0412         <DetectChar attribute="Operator" context="ip_string_2" char="(" beginRegion="String" />
0413         <DetectChar attribute="Operator" context="ip_string_3" char="{" beginRegion="String" />
0414         <DetectChar attribute="Operator" context="ip_string_4" char="[" beginRegion="String" />
0415         <DetectChar attribute="Operator" context="ip_string_5" char="&lt;" beginRegion="String" />
0416         <RegExpr attribute="Operator" context="ip_string_6" String="([^a-zA-Z0-9_\s[\]{}()])" beginRegion="String" />
0417         <RegExpr attribute="Comment" context="#stay" String="\s+#.*" /><!-- q[qwx] # == comment, look for the delim on the next line -->
0418       </context>
0419       <context name="find_qw" attribute="Normal Text" lineEndContext="#stay" >
0420         <DetectChar attribute="Operator" context="quote_word_paren" char="(" beginRegion="Wordlist" />
0421         <DetectChar attribute="Operator" context="quote_word_brace" char="{" beginRegion="Wordlist" />
0422         <DetectChar attribute="Operator" context="quote_word_bracket" char="[" beginRegion="Wordlist" />
0423         <DetectChar attribute="Operator" context="quote_word_angular" char="&lt;" beginRegion="Wordlist" />
0424         <RegExpr attribute="Operator" context="quote_word" String="([^a-zA-Z0-9_\s[\]{}()\&lt;&gt;])" beginRegion="Wordlist" />
0425         <RegExpr attribute="Comment" context="#stay" String="\s+#.*" /><!-- q[qwx] # == comment, look for the delim on the next line -->
0426       </context>
0427 
0428       <!-- ====== Contexts for strings ===== -->
0429       <context name="ipstring_internal" attribute="String (interpolated)" lineEndContext="#stay">
0430         <DetectIdentifier />
0431         <RegExpr attribute="String Special Character" context="#stay" String="\\c[^\s\\]|\\g(\{(\w+|\-\d+)\}|\d+)|\\k(\{\w+\}|&lt;\w+&gt;|'\w+')|\\N\{[^\{\}]*\}|\\o\{[0-7]+\}|\\[pP](\{\w+\}|P)|\\x([0-9a-fA-F]{2}|\{[0-9a-fA-F]+\})|\\[0-7]{3}|\\[1aAbBdDeEfFGhHKlLnNQrRsStuUvVwWXzZ]" />
0432         <RegExpr attribute="String (interpolated)" context="#stay" String="\\." />
0433         <RegExpr attribute="Normal Text" context="find_variable_unsafe" String="(?:[\$@]\S|%([\w\{\-\+!]|\^H))" lookAhead="true" />
0434       </context>
0435       <context name="ip_string" attribute="String (interpolated)" lineEndContext="#stay">
0436         <DetectChar attribute="Operator" context="#pop" char="&quot;" endRegion="String"/>
0437         <IncludeRules context="ipstring_internal" />
0438       </context>
0439       <context name="ip_string_2" attribute="String (interpolated)" lineEndContext="#stay">
0440         <RangeDetect attribute="String (interpolated)" context="#stay" char="(" char1=")" />
0441         <DetectChar attribute="Operator" context="#pop#pop#pop" char=")" endRegion="String" />
0442         <IncludeRules context="ipstring_internal" />
0443       </context>
0444       <context name="ip_string_3" attribute="String (interpolated)" lineEndContext="#stay">
0445         <RangeDetect attribute="String (interpolated)" context="#stay" char="{" char1="}" />
0446         <DetectChar attribute="Operator" context="#pop#pop#pop" char="}" endRegion="String" />
0447         <IncludeRules context="ipstring_internal" />
0448       </context>
0449       <context name="ip_string_4" attribute="String (interpolated)" lineEndContext="#stay">
0450         <RangeDetect attribute="String (interpolated)" context="#stay" char="[" char1="]" />
0451         <DetectChar attribute="Operator" context="#pop#pop#pop" char="]" endRegion="String" />
0452         <IncludeRules context="ipstring_internal" />
0453       </context>
0454       <context name="ip_string_5" attribute="String (interpolated)" lineEndContext="#stay">
0455         <RangeDetect attribute="String (interpolated)" context="#stay" char="&lt;" char1="&gt;" />
0456         <DetectChar attribute="Operator" context="#pop#pop#pop" char="&gt;" endRegion="String" />
0457         <IncludeRules context="ipstring_internal" />
0458       </context>
0459       <context name="ip_string_6" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
0460         <StringDetect attribute="String (interpolated)" context="#stay" String="\%1" dynamic="true" />
0461         <DetectChar attribute="Operator" context="#pop#pop#pop" char="1" dynamic="true"  endRegion="String"/>
0462         <IncludeRules context="ipstring_internal" />
0463       </context>
0464 
0465       <context name="string" attribute="String" lineEndContext="#stay">
0466         <DetectIdentifier />
0467         <Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="'" />
0468         <Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
0469         <DetectChar attribute="Operator" context="#pop" char="'" endRegion="String" />
0470       </context>
0471       <context name="string_2" attribute="String" lineEndContext="#stay">
0472         <DetectIdentifier />
0473         <Detect2Chars attribute="String Special Character" context="#stay" char="\" char1=")" />
0474         <Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
0475         <RangeDetect attribute="String" context="#stay" char="(" char1=")" />
0476         <DetectChar attribute="Operator" context="#pop#pop" char=")" endRegion="String" />
0477       </context>
0478       <context name="string_3" attribute="String" lineEndContext="#stay">
0479         <DetectIdentifier />
0480         <Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="}" />
0481         <Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
0482         <RangeDetect attribute="String" context="#stay" char="{" char1="}" />
0483         <DetectChar attribute="Operator" context="#pop#pop" char="}" endRegion="String" />
0484       </context>
0485       <context name="string_4" attribute="String" lineEndContext="#stay">
0486         <DetectIdentifier />
0487         <Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="]" />
0488         <Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
0489         <RangeDetect attribute="String" context="#stay" char="[" char1="]" />
0490         <DetectChar attribute="Operator" context="#pop#pop" char="]" endRegion="String" />
0491       </context>
0492       <context name="string_5" attribute="String" lineEndContext="#stay">
0493         <DetectIdentifier />
0494         <Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="&lt;" />
0495         <Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
0496         <Detect2Chars attribute="String" context="#stay" char="\" char1="&gt;" />
0497         <RangeDetect attribute="String" context="#stay" char="&lt;" char1="&gt;" />
0498         <DetectChar attribute="Operator" context="#pop#pop" char="&gt;" endRegion="String" />
0499       </context>
0500       <context name="string_6" attribute="String" lineEndContext="#stay" dynamic="true">
0501         <DetectIdentifier />
0502         <Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
0503         <StringDetect attribute="String Special Character" context="#stay" String="\%1" dynamic="true"/>
0504         <DetectChar attribute="Operator" context="#pop#pop" char="1" dynamic="true" endRegion="String" />
0505       </context>
0506 
0507       <!-- ====== contexts for  s/// ====== -->
0508       <context name="find_subst" attribute="Normal Text" lineEndContext="#stay" >
0509         <RegExpr attribute="Comment" context="#stay" String="\s+#.*" /><!-- s # == comment, look for the delim on the next line -->
0510         <DetectChar attribute="Operator" context="subst_curlybrace_pattern" char="{" beginRegion="Pattern" />
0511         <DetectChar attribute="Operator" context="subst_paren_pattern" char="(" beginRegion="Pattern" />
0512         <DetectChar attribute="Operator" context="subst_bracket_pattern" char="[" beginRegion="Pattern" />
0513         <DetectChar attribute="Operator" context="subst_sq_pattern" char="'" beginRegion="Pattern" />
0514         <RegExpr attribute="Operator" context="subst_slash_pattern" String="([^\w\s[\]{}()])" beginRegion="Pattern" />
0515       </context>
0516 
0517       <!-- Fully parse s {} {}.
0518            This means that
0519            - comments are legal between PATTERN and REPLACEMENT
0520            - REPLACEMENT can contain resursive {} blocks -->
0521       <context name="subst_curlybrace_pattern" attribute="Pattern" lineEndContext="#stay">
0522         <RegExpr attribute="Comment" context="#stay" String="\s+#.*$" />
0523         <IncludeRules context="regex_pattern_internal_ip" />
0524         <DetectChar attribute="Operator" context="subst_curlybrace_middle" char="}" endRegion="Pattern" />
0525         <!-- Recursive brackets. Avoid closing brackets incorrectly (bug #364866). -->
0526         <DetectChar attribute="Pattern" context="subst_curlybrace_pattern_recursive" char="{" />
0527       </context>
0528       <context name="subst_curlybrace_middle" attribute="Normal Text" lineEndContext="#stay" >
0529         <DetectChar attribute="Comment" context="comment" char="#" />
0530         <DetectChar attribute="Operator" context="subst_curlybrace_replace" char="{" beginRegion="Replacement" />
0531       </context>
0532       <context name="subst_curlybrace_replace" attribute="String (interpolated)" lineEndContext="#stay">
0533         <IncludeRules context="ipstring_internal" />
0534         <DetectChar attribute="Normal Text" context="subst_curlybrace_replace_recursive" char="{" beginRegion="Block" />
0535         <RegExpr attribute="Operator" context="#pop#pop#pop#pop" String="\}[cegimosx]*" endRegion="Replacement" />
0536       </context>
0537       <context name="subst_curlybrace_replace_recursive" attribute="String (interpolated)" lineEndContext="#stay" >
0538         <DetectChar attribute="String (interpolated)" context="subst_curlybrace_replace_recursive" char="{" beginRegion="Block" />
0539         <DetectChar attribute="Normal Text" context="#pop" char="}" endRegion="Block" />
0540         <IncludeRules context="ipstring_internal" />
0541       </context>
0542       <context name="subst_curlybrace_pattern_recursive" attribute="Pattern" lineEndContext="#stay">
0543         <DetectChar attribute="Pattern" context="#pop" char="}" />
0544         <IncludeRules context="subst_curlybrace_pattern" />
0545       </context>
0546 
0547       <context name="subst_maybe_comment" attribute="Pattern" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
0548         <DetectChar attribute="Comment" context="#pop!comment" char="#" />
0549       </context>
0550 
0551       <context name="subst_paren_pattern" attribute="Pattern" lineEndContext="#stay">
0552         <DetectSpaces attribute="Pattern" context="subst_maybe_comment" />
0553         <DetectChar attribute="Operator" context="subst_paren_replace" char=")" endRegion="Pattern" />
0554         <!-- Round brackets of RegExp pattern inside -->
0555         <DetectChar attribute="Pattern Internal Operator" context="subst_paren_pattern_internal_recursive" char="(" />
0556         <IncludeRules context="regex_pattern_internal_ip" />
0557       </context>
0558       <context name="subst_paren_replace" attribute="String (interpolated)" lineEndContext="#stay">
0559         <IncludeRules context="ipstring_internal" />
0560         <DetectChar attribute="Operator" context="#stay" char="(" beginRegion="Replacement" />
0561         <RegExpr attribute="Operator" context="#pop#pop#pop" String="\)[cegimosx]*" endRegion="Replacement" />
0562       </context>
0563       <context name="subst_paren_pattern_internal_recursive" attribute="Pattern" lineEndContext="#stay">
0564         <DetectChar attribute="Pattern Internal Operator" context="#pop" char=")" />
0565         <IncludeRules context="subst_paren_pattern" />
0566       </context>
0567 
0568       <context name="subst_bracket_pattern" attribute="Pattern" lineEndContext="#stay">
0569         <DetectSpaces attribute="Pattern" context="subst_maybe_comment" />
0570         <IncludeRules context="regex_pattern_internal_ip" />
0571         <DetectChar attribute="Operator" context="subst_bracket_replace" char="]" endRegion="Pattern" />
0572       </context>
0573       <context name="subst_bracket_replace" attribute="String (interpolated)" lineEndContext="#stay">
0574         <IncludeRules context="ipstring_internal" />
0575         <DetectChar attribute="Operator" context="#stay" char="[" beginRegion="Replacement" />
0576         <RegExpr attribute="Operator" context="#pop#pop#pop" String="\][cegimosx]*" endRegion="Replacement" />
0577       </context>
0578 
0579       <context name="subst_slash_pattern" attribute="Pattern" lineEndContext="#stay" dynamic="true">
0580         <RegExpr attribute="Pattern Internal Operator" context="#stay" String="\$(?=%1)" dynamic="true" />
0581         <RegExpr attribute="Operator" context="subst_slash_replace" String="(%1)" dynamic="true" endRegion="Pattern" beginRegion="Replacement" />
0582         <IncludeRules context="regex_pattern_internal_ip" />
0583       </context>
0584       <context name="subst_slash_replace" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
0585         <RegExpr attribute="Operator" context="#pop#pop#pop" String="%1[cegimosx]*" dynamic="true" endRegion="Replacement" />
0586         <IncludeRules context="ipstring_internal" />
0587 
0588       </context>
0589 
0590       <context name="subst_sq_pattern" attribute="Pattern" lineEndContext="#stay">
0591         <DetectSpaces attribute="Pattern" context="subst_maybe_comment" />
0592         <IncludeRules context="regex_pattern_internal" />
0593         <DetectChar attribute="Operator" context="subst_sq_replace" char="'" endRegion="Pattern" beginRegion="Pattern" />
0594       </context>
0595       <context name="subst_sq_replace" attribute="String" lineEndContext="#stay">
0596         <RegExpr attribute="Operator" context="#pop#pop#pop" String="'[cegimosx]*" endRegion="Replacement" />
0597       </context>
0598 
0599       <context name="tr" attribute="Pattern" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
0600         <RegExpr attribute="Pattern" context="#pop" String="\([^)]*\)\s*\(?:[^)]*\)|\{[^}]*\}\s*\{[^}]*\}|\[[^]]*\]\s*\[[^\]]*\]|([^a-zA-Z0-9_\s[\]{}()]).*?\1.*?\1"/>
0601       </context>
0602 
0603       <!-- ====== PATTERNs ====== -->
0604       <context name="find_pattern" attribute="Pattern" lineEndContext="#stay">
0605         <RegExpr attribute="Comment" context="#stay" String="\s+#.*" /><!-- s # == comment, look for the delim on the next line -->
0606         <DetectChar attribute="Operator" context="pattern_brace" char="{" beginRegion="Pattern" />
0607         <DetectChar attribute="Operator" context="pattern_paren" char="(" beginRegion="Pattern" />
0608         <DetectChar attribute="Operator" context="pattern_bracket" char="[" beginRegion="Pattern" />
0609         <DetectChar attribute="Operator" context="pattern_sq" char="'" beginRegion="Pattern" />
0610         <RegExpr attribute="Operator" context="pattern" String="([^\w\s])" beginRegion="Pattern" />
0611       </context>
0612       <context name="pattern_slash" attribute="Pattern" lineEndContext="#stay">
0613         <RegExpr attribute="Pattern Internal Operator" context="#stay" String="\$(?=/)" />
0614         <IncludeRules context="regex_pattern_internal_ip" />
0615         <RegExpr attribute="Operator" context="#pop" String="/[cgimosx]*" endRegion="Pattern" />
0616       </context>
0617       <context name="pattern" attribute="Pattern" lineEndContext="#stay" dynamic="true">
0618         <RegExpr attribute="Pattern Internal Operator" context="#stay" String="\$(?=%1)" dynamic="true" />
0619         <RegExpr attribute="Operator" context="#pop#pop" String="%1[cgimosx]*" dynamic="true" endRegion="Pattern" />
0620         <IncludeRules context="regex_pattern_internal_ip" />
0621       </context>
0622       <context name="pattern_brace" attribute="Pattern" lineEndContext="#stay">
0623         <RegExpr attribute="Operator" context="#pop#pop" String="\}[cgimosx]*" endRegion="Pattern" />
0624         <IncludeRules context="regex_pattern_internal_ip" />
0625         <!-- Recursive brackets. Avoid closing brackets incorrectly. -->
0626         <DetectChar attribute="Pattern" context="pattern_brace_recursive" char="{" />
0627       </context>
0628       <context name="pattern_brace_recursive" attribute="Pattern" lineEndContext="#stay">
0629         <DetectChar attribute="Pattern" context="#pop" char="}" />
0630         <IncludeRules context="pattern_brace" />
0631       </context>
0632       <context name="pattern_bracket" attribute="Pattern" lineEndContext="#stay">
0633         <RegExpr attribute="Operator" context="#pop#pop" String="\][cgimosx]*" endRegion="Pattern" />
0634         <IncludeRules context="regex_pattern_internal_ip" />
0635       </context>
0636       <context name="pattern_paren" attribute="Pattern" lineEndContext="#stay">
0637         <RegExpr attribute="Operator" context="#pop#pop" String="\)[cgimosx]*" endRegion="Pattern" />
0638         <!-- Round brackets of RegExp pattern inside -->
0639         <DetectChar attribute="Pattern Internal Operator" context="pattern_paren_internal_recursive" char="(" />
0640         <IncludeRules context="regex_pattern_internal_ip" />
0641       </context>
0642       <context name="pattern_paren_internal_recursive" attribute="Pattern" lineEndContext="#stay">
0643         <DetectChar attribute="Pattern Internal Operator" context="#pop" char=")" />
0644         <IncludeRules context="pattern_paren" />
0645       </context>
0646       <context name="pattern_sq" attribute="Pattern" lineEndContext="#stay">
0647         <RegExpr attribute="Operator" context="#pop#pop" String="'[cgimosx]*" endRegion="Pattern" />
0648         <IncludeRules context="regex_pattern_internal" />
0649       </context>
0650 
0651       <!-- rules internal stuff wrt regex patterns -->
0652       <context name="regex_pattern_internal_rules_1" attribute="Pattern" lineEndContext="#stay">
0653         <DetectChar attribute="Comment" context="comment" char="#" firstNonSpace="true" />
0654         <RegExpr attribute="Special Variable" context="#stay" String="\\c[^\s\\]|\\g(\{(\w+|\-\d+)\}|\d+)|\\k(\{\w+\}|&lt;\w+&gt;|'\w+')|\\N\{[^\{\}]*\}|\\o\{[0-7]+\}|\\[pP](\{\w+\}|P)|\\x([0-9a-fA-F]{2}|\{[0-9a-fA-F]+\})" />
0655         <RegExpr attribute="Pattern Character Class" context="#stay" String="\\[anDdSsWw]" />
0656         <RegExpr attribute="Pattern Internal Operator" context="#stay" String="\\[ABbEGLlNUuQdQZz]" /> <!-- Also?: efFhHKrRtvVX -->
0657         <RegExpr attribute="Special Variable" context="#stay" String="\\[\d]+" />
0658         <RegExpr attribute="Pattern" context="#stay" String="\\." />
0659       </context>
0660       <context name="regex_pattern_internal_rules_2" attribute="Pattern" lineEndContext="#stay">
0661         <Detect2Chars attribute="Pattern Internal Operator" context="pat_ext" char="(" char1="?" />
0662         <DetectChar attribute="Pattern Internal Operator" context="pat_char_class" char="[" />
0663         <AnyChar attribute="Pattern Internal Operator" context="#stay" String="()?^*+|" />
0664         <RegExpr attribute="Pattern Internal Operator" context="#stay" String="\{[\d, ]+\}" />
0665         <DetectChar attribute="Pattern Internal Operator" context="#stay" char="$" />
0666         <RegExpr attribute="Comment" context="#stay" String="\s{3,}#.*$" />
0667       </context>
0668       <context name="regex_pattern_internal" attribute="Pattern" lineEndContext="#stay">
0669         <IncludeRules context="regex_pattern_internal_rules_1" />
0670         <IncludeRules context="regex_pattern_internal_rules_2" />
0671       </context>
0672       <context name="regex_pattern_internal_ip" attribute="Pattern" lineEndContext="#stay" >
0673         <IncludeRules context="regex_pattern_internal_rules_1" />
0674         <!-- NOTE the below means that the special variables $' $], $} and $> are not supported
0675              within interpolated PATTERNs (apart from $(, $) and ${ and $| not supported by perl).
0676              This is because perl considers
0677              s{foo$} {bar} OK as well as s{foo$}} {bar}, and detecting that is a huge work overload
0678              for something that is unlikely to happen. -->
0679         <RegExpr attribute="Data Type" context="find_variable_unsafe" String="[$@][^]\s{}()|&gt;']" lookAhead="true" />
0680         <IncludeRules context="regex_pattern_internal_rules_2" />
0681       </context>
0682       <context name="pat_ext" attribute="Pattern Internal Operator" lineEndContext="#stay">
0683         <AnyChar attribute="Pattern Internal Operator" context="#pop" String=":=!&gt;&lt;" />
0684         <RegExpr attribute="Comment" context="#pop" String="\#[^)]*" />
0685         <DetectChar attribute="Pattern Internal Operator" context="#pop" char=")" />
0686       </context>
0687       <context name="pat_char_class" attribute="Pattern Character Class" lineEndContext="#stay">
0688         <DetectChar attribute="Pattern Internal Operator" context="#stay" char="^" />
0689         <Detect2Chars attribute="Pattern Character Class" context="#stay" char="\" char1="\" />
0690         <Detect2Chars attribute="Pattern Character Class" context="#stay" char="\" char1="]" />
0691         <RegExpr attribute="Pattern Character Class" context="#stay" String="\[:\^?[a-z]+:\]" />
0692         <DetectChar attribute="Pattern Internal Operator" context="#pop" char="]" />
0693       </context>
0694 
0695       <!-- ====== Variables ====== -->
0696       <context name="find_variable" attribute="Data Type" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
0697         <RegExpr attribute="Data Type" context="var_detect" String="\$[#_][\w_]" />
0698         <RegExpr attribute="Special Variable" context="var_detect" String="\$[0-9]+|[@\$](?:[\+\-_]\B|ARGV\b|INC\b)|[%\$](?:INC\b|ENV\b|SIG\b)|\$\^[A-Z_\]\[\^\?\\]|%([\-\+!]|\^H)" />
0699         <RegExpr attribute="Data Type" context="var_detect" String="\$\$[\$\w_]|\$+::" />
0700         <RegExpr attribute="Special Variable" context="var_detect" String="\$[^a-zA-Z0-9\s{][A-Z]?" />
0701         <RegExpr attribute="Data Type" context="var_detect" String="[\$@%]\{\^?[\w_]+\}|[$@%]|\*[a-zA-Z_]+" />
0702         <!-- Do not highlight brackets after *, Ex: (... @*) (see bug #391577) -->
0703         <RegExpr attribute="Special Variable" context="#stay" String="\*[^a-zA-Z0-9\s\{\(\)\[\]\}][A-Z]?" />
0704         <!-- this should be a rare case! -->
0705         <AnyChar attribute="Operator" context="#pop" String="$@%*" />
0706       </context>
0707       <!-- This does not check fo a trailing slash, for usage in strings. -->
0708       <context name="find_variable_unsafe" attribute="Data Type" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
0709         <RegExpr attribute="Data Type" context="var_detect_unsafe" String="\$[#_][\w_]" />
0710         <RegExpr attribute="Special Variable" context="var_detect_unsafe" String="\$[0-9]+|[@\$](?:[\+\-_]\B|ARGV\b|INC\b)|[%\$](?:INC\b|ENV\b|SIG\b)" />
0711         <RegExpr attribute="Special Variable" context="var_detect" String="\$\^[A-Z_\]\[\^\?\\]|%([\-\+!]|\^H)" />
0712         <RegExpr attribute="Data Type" context="var_detect_unsafe" String="\$\$[\$\w_]|\$+::" />
0713         <RegExpr attribute="Special Variable" context="#stay" String="\$[^a-zA-Z0-9\s{][A-Z]?" />
0714         <RegExpr attribute="Data Type" context="var_detect_unsafe" String="[\$@%]\{\^?[\w_]+\}|[$@%]|\*\w+" />
0715         <AnyChar attribute="Operator" context="#pop" String="$@%*" />
0716       </context>
0717       <context name="var_detect"  attribute="Data Type" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
0718         <IncludeRules context="var_detect_rules" />
0719         <IncludeRules context="slash_safe_escape" />
0720       </context>
0721       <context name="var_detect_unsafe"  attribute="Data Type" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
0722         <IncludeRules context="var_detect_rules" />
0723       </context>
0724       <context name="var_detect_rules" attribute="Data Type" lineEndContext="#pop#pop" >
0725         <RegExpr attribute="Data Type" context="#stay" String="[\w_]+" />
0726         <Detect2Chars attribute="Normal Text" context="#stay" char=":" char1=":" />
0727         <DetectChar attribute="Operator" context="#stay" char="'" />
0728         <Detect2Chars attribute="Normal Text" context="#stay" char="-" char1="&gt;" />
0729         <!-- safe with operator / -->
0730         <Detect2Chars attribute="Normal Text" context="#stay" char="+" char1="+" />
0731         <Detect2Chars attribute="Normal Text" context="#stay" char="-" char1="-" />
0732       </context>
0733 
0734 
0735       <!-- ====== Word lists ====== -->
0736       <context name="quote_word" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
0737         <DetectSpaces />
0738         <DetectIdentifier />
0739         <StringDetect attribute="Normal Text" context="#stay" String="\%1" dynamic="true" />
0740         <DetectChar attribute="Operator" context="#pop#pop#pop" char="1" dynamic="true" endRegion="Wordlist" />
0741       </context>
0742       <context name="quote_word_paren" attribute="Normal Text" lineEndContext="#stay">
0743         <DetectSpaces />
0744         <DetectIdentifier />
0745         <Detect2Chars attribute="Normal Text" context="#stay" char="\" char1=")" />
0746         <DetectChar attribute="Operator" context="#pop#pop#pop" char=")" endRegion="Wordlist" />
0747       </context>
0748       <context name="quote_word_brace" attribute="Normal Text" lineEndContext="#stay">
0749         <DetectSpaces />
0750         <DetectIdentifier />
0751         <Detect2Chars attribute="Normal Text" context="#stay" char="\" char1="}" />
0752         <DetectChar attribute="Operator" context="#pop#pop#pop" char="}" endRegion="Wordlist" />
0753       </context>
0754       <context name="quote_word_bracket" attribute="Normal Text" lineEndContext="#stay">
0755         <DetectSpaces />
0756         <DetectIdentifier />
0757         <Detect2Chars attribute="Normal Text" context="#stay" char="\" char1="]" />
0758         <DetectChar attribute="Operator" context="#pop#pop#pop" char="]" endRegion="Wordlist" />
0759       </context>
0760       <context name="quote_word_angular" attribute="Normal Text" lineEndContext="#stay">
0761         <DetectSpaces />
0762         <DetectIdentifier />
0763         <Detect2Chars attribute="Normal Text" context="#stay" char="\" char1="&gt;" />
0764         <DetectChar attribute="Operator" context="#pop#pop#pop" char="&gt;" endRegion="Wordlist" />
0765       </context>
0766 
0767       <!-- ====== Here Documents ====== -->
0768       <context name="find_here_document" attribute="Normal Text" lineEndContext="#pop" >
0769         <RegExpr attribute="Keyword" context="here_document" String="(?|(\w+)\s*;?|\s*&quot;([^&quot;]+)&quot;\s*;?|\s*`([^`]+)`\s*;?)" />
0770         <RegExpr attribute="Keyword" context="here_document_dumb" String="\s*'([^']+)'\s*;?" />
0771       </context>
0772       <context name="here_document" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
0773         <RegExpr attribute="Keyword" context="#pop#pop" String="^%1\b" column="0" dynamic="true" endRegion="HereDocument"/>
0774         <RegExpr attribute="Keyword" context="here_document" String="\=\s*&lt;&lt;\s*[&quot;']?([A-Z0-9_\-]+)[&quot;']?" beginRegion="HEREDoc" />
0775         <IncludeRules context="ipstring_internal" />
0776         <DetectSpaces />
0777       </context>
0778       <context name="here_document_dumb" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
0779         <StringDetect attribute="Keyword" context="#pop#pop" String="%1" column="0" dynamic="true" endRegion="HereDocument"/>
0780         <DetectSpaces />
0781         <DetectIdentifier />
0782       </context>
0783 
0784       <!-- ====== Misc ====== -->
0785       <context name="data_handle" attribute="Data" lineEndContext="#stay">
0786         <RegExpr attribute="Pod" context="pod" String="^\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s+.*" column="0" beginRegion="POD"/>
0787         <StringDetect attribute="Keyword" context="normal" String="__END__" firstNonSpace="true" />
0788       </context>
0789 
0790       <context name="Backticked" attribute="String (interpolated)" lineEndContext="#stay">
0791         <IncludeRules context="ipstring_internal"/>
0792         <DetectChar attribute="Operator" context="#pop" char="`"/>
0793       </context>
0794 
0795       <context name="slash_safe_escape" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
0796         <RegExpr attribute="Normal Text" context="#pop" String="\s*\}\s*/{1,2}" endRegion="Block"/>
0797         <RegExpr attribute="Normal Text" context="#pop" String="\s*[)\]]?\s*/{1,2}" />
0798         <keyword attribute="Keyword" context="#pop" String="keywords" /><!-- wonder why??? -->
0799       </context>
0800 
0801       <context name="sub_name_def" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
0802         <RegExpr attribute="Function" context="#stay" String="\w+" />
0803         <RegExpr attribute="Normal Text" context="find_variable" String="\$\S" lookAhead="true" />
0804         <RegExpr attribute="Normal Text" context="sub_arg_definition" String="\s*\(" />
0805         <Detect2Chars attribute="Normal Text" context="#stay" char=":" char1=":" />
0806       </context>
0807 
0808       <context name="sub_arg_definition" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop#pop">
0809         <AnyChar attribute="Data Type" context="#stay" String="*$@%" />
0810         <AnyChar attribute="Normal Text" context="#stay" String="&amp;\[];" />
0811         <DetectChar attribute="Normal Text" context="slash_safe_escape" char=")" />
0812       </context>
0813 
0814       <context name="pod" attribute="Pod" lineEndContext="#stay">
0815         <DetectSpaces />
0816         <DetectIdentifier />
0817         <RegExpr attribute="Pod" context="#stay" String="^\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s*.*" column="0" beginRegion="POD" endRegion="POD"/>
0818         <StringDetect attribute="Pod" context="Pod" String="=cut" column="0" endRegion="POD"/>
0819       </context>
0820 
0821       <context name="comment" attribute="Comment" lineEndContext="#pop">
0822         <DetectSpaces />
0823         <IncludeRules context="##Comments" />
0824         <DetectIdentifier />
0825       </context>
0826 
0827       <context name="Pod" attribute="Pod" lineEndContext="#pop#pop"/>
0828 
0829     </contexts>
0830     <itemDatas>
0831       <itemData name="Normal Text"               defStyleNum="dsNormal" />
0832       <itemData name="Keyword"                   defStyleNum="dsKeyword" spellChecking="false"/>
0833       <itemData name="Pragma"                    defStyleNum="dsKeyword" spellChecking="false"/>
0834       <itemData name="Function"                  defStyleNum="dsFunction" spellChecking="false"/>
0835       <itemData name="Operator"                  defStyleNum="dsOthers" bold="1" spellChecking="false"/> <!-- #008000 -->
0836       <itemData name="Data Type"                 defStyleNum="dsDataType" spellChecking="false"/>
0837       <itemData name="Special Variable"          defStyleNum="dsWarning" bold="0" italic="0" /> <!-- #C00000 -->
0838       <itemData name="Decimal"                   defStyleNum="dsDecVal" spellChecking="false"/>
0839       <itemData name="Octal"                     defStyleNum="dsBaseN" spellChecking="false"/>
0840       <itemData name="Hex"                       defStyleNum="dsBaseN" spellChecking="false"/>
0841       <itemData name="Bin"                       defStyleNum="dsBaseN" spellChecking="false"/>
0842       <itemData name="Float"                     defStyleNum="dsFloat" spellChecking="false"/>
0843       <itemData name="String"                    defStyleNum="dsSpecialString" /> <!-- #FF6C6C -->
0844       <itemData name="String (interpolated)"     defStyleNum="dsString" />
0845       <itemData name="String Special Character"  defStyleNum="dsChar" />
0846       <itemData name="Pattern"                   defStyleNum="dsOthers"  spellChecking="false"/>
0847       <itemData name="Pattern Internal Operator" defStyleNum="dsChar"  spellChecking="false"/>
0848       <itemData name="Pattern Character Class"   defStyleNum="dsBaseN"  spellChecking="false"/>
0849       <itemData name="Data"                      defStyleNum="dsNormal" />
0850       <itemData name="Comment"                   defStyleNum="dsComment" />
0851       <itemData name="Pod"                       defStyleNum="dsComment" />
0852     </itemDatas>
0853   </highlighting>
0854   <general>
0855     <comments>
0856       <comment name="singleLine" start="#" />
0857     </comments>
0858     <keywords casesensitive="1" />
0859   </general>
0860 </language>
0861 <!-- kate: space-indent on; indent-width 2; replace-tabs on; -->