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