Debian Codegraph @

data/syntax/pure.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language>
3 <!--
4
5 Pure syntax highlighting for kate. Usage:
6
7 - Copy this file either to ~/.kde/share/apps/katepart/syntax or to the global
8 /opt/kde3/share/apps/katepart/syntax directory (or wherever the Kate syntax
9 files are located on your system).
10
11 - You may also want to add a mime type for *.pure files so that your file
12 manager can recognize them.
13
14 - Fire up kate on your Pure script and enjoy the syntax highlighting.
15 Folding of comments and block structure is also supported.
16
17 Author: Albert Graef, with some fixes contributed by Eddie Rucker
18
19 This library is free software; you can redistribute it and/or
20 modify it under the terms of the GNU Library General Public
21 License as published by the Free Software Foundation; either
22 version 2 of the License, or (at your option) any later version.
23
24 This library is distributed in the hope that it will be useful,
25 but WITHOUT ANY WARRANTY; without even the implied warranty of
26 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 Library General Public License for more details.
28
29 You should have received a copy of the GNU Library General Public
30 License along with this library; if not, write to the
31 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
32 Boston, MA 02111-1307, USA.
33
34 -->
35 <language name="Pure" version="5" kateversion="5.0" section="Sources" extensions="*.pure">
36 <highlighting>
37 <list name="blockstarters">
38 <item>case</item>
39 <item>when</item>
40 <item>with</item>
41 </list>
42 <list name="blockenders">
43 <item>end</item>
44 </list>
45 <list name="keywords">
46 <item>const</item>
47 <item>def</item>
48 <item>else</item>
49 <item>extern</item>
50 <item>if</item>
51 <item>infix</item>
52 <item>infixl</item>
53 <item>infixr</item>
54 <item>interface</item>
55 <item>let</item>
56 <item>namespace</item>
57 <item>nonfix</item>
58 <item>of</item>
59 <item>otherwise</item>
60 <item>outfix</item>
61 <item>postfix</item>
62 <item>prefix</item>
63 <item>private</item>
64 <item>public</item>
65 <item>then</item>
66 <item>type</item>
67 <item>using</item>
68 </list>
69 <list name="special">
70 <item>catch</item>
71 <item>throw</item>
72 <item>__break__</item>
73 <item>__trace__</item>
74 </list>
75 <list name="types">
76 <item>bigint</item>
77 <item>bool</item>
78 <item>char</item>
79 <item>float</item>
80 <item>double</item>
81 <item>expr</item>
82 <item>short</item>
83 <item>int</item>
84 <item>long</item>
85 <item>string</item>
86 <item>pointer</item>
87 <item>void</item>
88 <item>int8</item>
89 <item>int16</item>
90 <item>int32</item>
91 <item>int64</item>
92 <item>matrix</item>
93 <item>dmatrix</item>
94 <item>cmatrix</item>
95 <item>imatrix</item>
96 <item>smatrix</item>
97 <item>nmatrix</item>
98 </list>
99 <contexts>
100 <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
101 <DetectSpaces />
102 <keyword attribute="Keyword" context="#stay" String="blockstarters" beginRegion="Block" />
103 <keyword attribute="Keyword" context="#stay" String="blockenders" endRegion="Block" />
104 <keyword attribute="Keyword" context="#stay" String="keywords"/>
105 <keyword attribute="Function" context="#stay" String="special"/>
106 <keyword attribute="Type" context="#stay" String="types"/>
107 <DetectIdentifier attribute="Normal Text" context="#stay"/>
108 <RegExpr attribute="Number" context="#stay" String="0x[A-Za-z0-9]+"/>
109 <Float attribute="Number" context="#stay"/>
110 <Int attribute="Number" context="#stay"/>
111 <HlCChar attribute="String Char" context="#stay"/>
112 <DetectChar attribute="String" context="String" char="&quot;"/>
113 <Detect2Chars attribute="Comment" context="Comment1" char="/" char1="*" beginRegion="Comment" />
114 <Detect2Chars attribute="Comment" context="Comment2" char="/" char1="/"/>
115 </context>
116 <context attribute="String" lineEndContext="#pop" name="String">
117 <LineContinue attribute="String" context="#stay"/>
118 <HlCStringChar attribute="String Char" context="#stay"/>
119 <DetectChar attribute="String" context="#pop" char="&quot;"/>
120 </context>
121 <context attribute="Comment" lineEndContext="#stay" name="Comment1">
122 <DetectSpaces />
123 <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
124 <IncludeRules context="##Comments"/>
125 </context>
126 <context attribute="Comment" lineEndContext="#pop" name="Comment2">
127 <DetectSpaces />
128 <IncludeRules context="##Comments"/>
129 </context>
130 </contexts>
131 <itemDatas>
132 <itemData name="Normal Text" defStyleNum="dsNormal" />
133 <itemData name="Keyword" defStyleNum="dsKeyword" />
134 <itemData name="Function" defStyleNum="dsFunction"/>
135 <itemData name="Type" defStyleNum="dsDataType"/>
136 <itemData name="Number" defStyleNum="dsDecVal" />
137 <itemData name="String" defStyleNum="dsString" />
138 <itemData name="String Char" defStyleNum="dsChar"/>
139 <itemData name="Comment" defStyleNum="dsComment" />
140 </itemDatas>
141 </highlighting>
142 <general>
143 <keywords casesensitive="1" />
144 <comments>
145 <comment name="singleLine" start="//" />
146 <comment name="multiLine" start="/*" end="*/" region="Comment" />
147 </comments>
148 </general>
149 </language>
150 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->