| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language> |
| 3 |
<!-- FIXME: Find a way to prevent ranges (e.g. [1..] or [0..99]) from matching as floats. -pp --> |
| 4 |
<language name="Pike" version="4" kateversion="5.0" section="Scripts" extensions="*.pike" mimetype="application/x-pike;text/x-pike" casesensitive="1" author="Paul Pogonyshev" license=""> |
| 5 |
<highlighting> |
| 6 |
<list name="keywords"> |
| 7 |
<item>break</item> |
| 8 |
<item>case</item> |
| 9 |
<item>class</item> |
| 10 |
<item>continue</item> |
| 11 |
<item>default</item> |
| 12 |
<item>do</item> |
| 13 |
<item>else</item> |
| 14 |
<item>for</item> |
| 15 |
<item>foreach</item> |
| 16 |
<item>if</item> |
| 17 |
<item>return</item> |
| 18 |
<item>switch</item> |
| 19 |
<item>while</item> |
| 20 |
</list> |
| 21 |
<list name="types"> |
| 22 |
<item>array</item> |
| 23 |
<item>float</item> |
| 24 |
<item>function</item> |
| 25 |
<item>int</item> |
| 26 |
<item>mapping</item> |
| 27 |
<item>mixed</item> |
| 28 |
<item>multiset></item> |
| 29 |
<item>object</item> |
| 30 |
<item>program</item> |
| 31 |
<item>static</item> |
| 32 |
<item>string</item> |
| 33 |
<item>void</item> |
| 34 |
</list> |
| 35 |
<list name="builtins"> |
| 36 |
<item>catch</item> |
| 37 |
<item>gauge</item> |
| 38 |
<item>sscanf</item> |
| 39 |
<item>typeof</item> |
| 40 |
</list> |
| 41 |
<contexts> |
| 42 |
<context attribute="Normal Text" lineEndContext="#stay" name="Normal"> |
| 43 |
<keyword attribute="Keyword" context="#stay" String="keywords"/> |
| 44 |
<keyword attribute="Data Type" context="#stay" String="types"/> |
| 45 |
<keyword attribute="Builtin Function" context="#stay" String="builtins"/> |
| 46 |
<RegExpr attribute="Builtin Function" context="#stay" String="`([\+\-\*/%~&\|^]|[!=<>]=|<<?|>>?|(\[\]|->)=?)"/> |
| 47 |
<Float attribute="Float" context="#stay"/> |
| 48 |
<RegExpr attribute="Binary" context="#stay" String="0[bB][01]+"/> |
| 49 |
<HlCOct attribute="Octal" context="#stay"/> |
| 50 |
<HlCHex attribute="Hex" context="#stay"/> |
| 51 |
<Int attribute="Decimal" context="#stay"/> |
| 52 |
<HlCChar attribute="Char" context="#stay"/> |
| 53 |
<DetectChar attribute="Normal Text" context="#stay" char="{" beginRegion="Brace"/> |
| 54 |
<DetectChar attribute="Normal Text" context="#stay" char="}" endRegion="Brace"/> |
| 55 |
<DetectChar attribute="String" context="String" char="""/> |
| 56 |
<Detect2Chars attribute="Comment" context="Line Comment" char="/" char1="/"/> |
| 57 |
<Detect2Chars attribute="Comment" context="Line Comment" char="#" char1="!"/> |
| 58 |
<Detect2Chars attribute="Comment" context="Block Comment" char="/" char1="*" beginRegion="Comment"/> |
| 59 |
<RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0" beginRegion="Outscoped" firstNonSpace="true"/> |
| 60 |
<DetectChar attribute="Preprocessor" context="Preprocessor" char="#" firstNonSpace="true"/> |
| 61 |
</context> |
| 62 |
<context attribute="String" lineEndContext="#pop" name="String"> |
| 63 |
<RegExpr attribute="String Char" context="#stay" String="\\d[0-9]+"/> |
| 64 |
<HlCStringChar attribute="String Char" context="#stay"/> |
| 65 |
<DetectChar attribute="String" context="#pop" char="""/> |
| 66 |
<LineContinue attribute="String" context="#stay"/> |
| 67 |
</context> |
| 68 |
<context attribute="Comment" lineEndContext="#pop" name="Line Comment"> |
| 69 |
<DetectSpaces /> |
| 70 |
<IncludeRules context="##Comments"/> |
| 71 |
</context> |
| 72 |
<context attribute="Comment" lineEndContext="#stay" name="Block Comment"> |
| 73 |
<DetectSpaces /> |
| 74 |
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/> |
| 75 |
<IncludeRules context="##Comments"/> |
| 76 |
</context> |
| 77 |
<context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor"> |
| 78 |
<RangeDetect attribute="Preprocessor Lib" context="#stay" char=""" char1="""/> |
| 79 |
<RangeDetect attribute="Preprocessor Lib" context="#stay" char="<" char1=">"/> |
| 80 |
<Detect2Chars attribute="Comment" context="Line Comment" char="/" char1="/"/> |
| 81 |
<Detect2Chars attribute="Comment" context="Block Comment" char="/" char1="*" beginRegion="Comment"/> |
| 82 |
<LineContinue attribute="Preprocessor" context="#stay"/> |
| 83 |
</context> |
| 84 |
<context attribute="Comment" lineEndContext="#stay" name="Outscoped"> |
| 85 |
<Detect2Chars attribute="Comment" context="Block Comment" char="/" char1="*" beginRegion="Comment"/> |
| 86 |
<RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true"/> |
| 87 |
<RegExpr attribute="Preprocessor" context="#pop" String="#\s*(endif|elif|else)" endRegion="Outscoped" firstNonSpace="true"/> |
| 88 |
<IncludeRules context="##Comments" /> |
| 89 |
</context> |
| 90 |
<context attribute="Comment" lineEndContext="#stay" name="Outscoped intern"> |
| 91 |
<Detect2Chars attribute="Comment" context="Block Comment" char="/" char1="*" beginRegion="Comment"/> |
| 92 |
<RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true"/> |
| 93 |
<RegExpr attribute="Comment" context="#pop" String="#\s*endif" endRegion="Outscoped" firstNonSpace="true"/> |
| 94 |
</context> |
| 95 |
</contexts> |
| 96 |
<itemDatas> |
| 97 |
<itemData name="Normal Text" defStyleNum="dsNormal"/> |
| 98 |
<itemData name="Keyword" defStyleNum="dsKeyword"/> |
| 99 |
<itemData name="Builtin Function" defStyleNum="dsFunction"/> |
| 100 |
<itemData name="Data Type" defStyleNum="dsDataType"/> |
| 101 |
<itemData name="Decimal" defStyleNum="dsDecVal"/> |
| 102 |
<itemData name="Hex" defStyleNum="dsBaseN"/> |
| 103 |
<itemData name="Octal" defStyleNum="dsBaseN"/> |
| 104 |
<itemData name="Binary" defStyleNum="dsBaseN"/> |
| 105 |
<itemData name="Float" defStyleNum="dsFloat"/> |
| 106 |
<itemData name="Char" defStyleNum="dsChar"/> |
| 107 |
<itemData name="String" defStyleNum="dsString"/> |
| 108 |
<itemData name="String Char" defStyleNum="dsChar"/> |
| 109 |
<itemData name="Comment" defStyleNum="dsComment"/> |
| 110 |
<itemData name="Preprocessor" defStyleNum="dsOthers"/> |
| 111 |
<itemData name="Preprocessor Lib" defStyleNum="dsString"/> |
| 112 |
</itemDatas> |
| 113 |
</highlighting> |
| 114 |
<general> |
| 115 |
<comments> |
| 116 |
<comment name="singleLine" start="//"/> |
| 117 |
<comment name="multiLine" start="/*" end="*/" region="Comment"/> |
| 118 |
</comments> |
| 119 |
<keywords casesensitive="1"/> |
| 120 |
</general> |
| 121 |
</language> |