Debian Codegraph @

data/syntax/opencl.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language>
3 <language name="OpenCL" section="Sources"
4 version="9" kateversion="5.0"
5 indenter="cstyle"
6 extensions="*.cl"
7 mimetype="text/x-clsrc"
8 priority="5">
9 <highlighting>
10 <list name="keywords">
11 <item>__constant</item>
12 <item>__global</item>
13 <item>__local</item>
14 <item>__private</item>
15 <item>__kernel</item>
16 <item>__read_only</item>
17 <item>__write_only</item>
18 <item>constant</item>
19 <item>global</item>
20 <item>local</item>
21 <item>private</item>
22 <item>kernel</item>
23 <item>read_only</item>
24 <item>write_only</item>
25 <item>break</item>
26 <item>case</item>
27 <item>continue</item>
28 <item>default</item>
29 <item>do</item>
30 <item>else</item>
31 <item>enum</item>
32 <item>for</item>
33 <item>goto</item>
34 <item>if</item>
35 <item>inline</item>
36 <item>return</item>
37 <item>sizeof</item>
38 <item>struct</item>
39 <item>switch</item>
40 <item>typedef</item>
41 <item>union</item>
42 <item>while</item>
43 </list>
44 <list name="types">
45 <item>bool</item>
46 <item>uchar</item>
47 <item>uchar2</item>
48 <item>uchar3</item>
49 <item>uchar4</item>
50 <item>uchar8</item>
51 <item>uchar16</item>
52 <item>char</item>
53 <item>char2</item>
54 <item>char3</item>
55 <item>char4</item>
56 <item>char8</item>
57 <item>char16</item>
58 <item>const</item>
59 <item>double</item>
60 <item>double2</item>
61 <item>double3</item>
62 <item>double4</item>
63 <item>double8</item>
64 <item>double16</item>
65 <item>event_t</item>
66 <item>float</item>
67 <item>float2</item>
68 <item>float3</item>
69 <item>float4</item>
70 <item>float8</item>
71 <item>float16</item>
72 <item>half</item>
73 <item>half2</item>
74 <item>half3</item>
75 <item>half4</item>
76 <item>half8</item>
77 <item>half16</item>
78 <item>image1d_t</item>
79 <item>image2d_t</item>
80 <item>image3d_t</item>
81 <item>uint</item>
82 <item>uint2</item>
83 <item>uint3</item>
84 <item>uint4</item>
85 <item>uint8</item>
86 <item>uint16</item>
87 <item>int</item>
88 <item>int2</item>
89 <item>int3</item>
90 <item>int4</item>
91 <item>int8</item>
92 <item>int16</item>
93 <item>ulong</item>
94 <item>ulong2</item>
95 <item>ulong3</item>
96 <item>ulong4</item>
97 <item>ulong8</item>
98 <item>ulong16</item>
99 <item>long</item>
100 <item>long2</item>
101 <item>long3</item>
102 <item>long4</item>
103 <item>long8</item>
104 <item>long16</item>
105 <item>restrict</item>
106 <item>sampler_t</item>
107 <item>ushort</item>
108 <item>ushort2</item>
109 <item>ushort3</item>
110 <item>ushort4</item>
111 <item>ushort8</item>
112 <item>ushort16</item>
113 <item>short</item>
114 <item>short2</item>
115 <item>short3</item>
116 <item>short4</item>
117 <item>short8</item>
118 <item>short16</item>
119 <item>signed</item>
120 <item>static</item>
121 <item>unsigned</item>
122 <item>void</item>
123 <item>volatile</item>
124 </list>
125 <contexts>
126 <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
127 <DetectSpaces />
128 <RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0\s*$" beginRegion="PP" firstNonSpace="true" />
129 <DetectChar context="AfterHash" char="#" firstNonSpace="true" lookAhead="true" />
130 <keyword attribute="Keyword" context="#stay" String="keywords"/>
131 <keyword attribute="Data Type" context="#stay" String="types"/>
132 <DetectIdentifier />
133 <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
134 <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
135 <Float attribute="Float" context="Float Suffixes"/>
136 <HlCOct attribute="Octal" context="#stay"/>
137 <HlCHex attribute="Hex" context="#stay"/>
138 <Int attribute="Decimal" context="Int Suffixes"/>
139 <HlCChar attribute="Char" context="#stay"/>
140 <DetectChar attribute="String" context="String" char="&quot;"/>
141 <IncludeRules context="FindComments" />
142 <AnyChar attribute="Symbol" context="#stay" String=":!%&amp;()+,-/.*&lt;=&gt;?[]|~^&#59;"/>
143 </context>
144
145 <context name="FindComments" attribute="Normal Text" lineEndContext="#pop">
146 <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="/" lookAhead="true" />
147 <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" />
148 </context>
149
150 <context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
151 <StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" />
152 <StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" />
153 <IncludeRules context="##Doxygen" />
154 <Detect2Chars attribute="Comment" context="#pop!Commentar 1" char="/" char1="/"/>
155 <Detect2Chars attribute="Comment" context="#pop!Commentar 2" char="/" char1="*" beginRegion="Comment"/>
156 </context>
157
158 <context name="Float Suffixes" attribute="Float" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
159 <AnyChar String="fFhH" attribute="Float" context="#pop"/>
160 </context>
161
162 <context name="Int Suffixes" attribute="Decimal" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
163 <StringDetect attribute="Decimal" context="#pop" String="ULL" insensitive="true"/>
164 <StringDetect attribute="Decimal" context="#pop" String="LLU" insensitive="true"/>
165 <StringDetect attribute="Decimal" context="#pop" String="UL" insensitive="true"/>
166 <StringDetect attribute="Decimal" context="#pop" String="LU" insensitive="true"/>
167 <StringDetect attribute="Decimal" context="#pop" String="LL" insensitive="true"/>
168 <AnyChar attribute="Decimal" context="#pop" String="ULJulj"/>
169 </context>
170
171 <context attribute="String" lineEndContext="#pop" name="String">
172 <LineContinue attribute="String" context="#stay"/>
173 <HlCStringChar attribute="String Char" context="#stay"/>
174 <DetectChar attribute="String" context="#pop" char="&quot;"/>
175 </context>
176
177 <context attribute="Region Marker" lineEndContext="#pop" name="Region Marker">
178 </context>
179
180 <context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
181 <LineContinue attribute="Comment" context="#stay"/>
182 <DetectSpaces />
183 <IncludeRules context="##Comments" />
184 </context>
185
186 <context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
187 <DetectSpaces />
188 <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
189 <IncludeRules context="##Comments" />
190 </context>
191
192 <context attribute="Error" lineEndContext="#pop" name="AfterHash">
193 <!-- define, elif, else, endif, error, if, ifdef, ifndef, include, include_next, line, pragma, undef, warning -->
194 <RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*if(?:def|ndef)?(?=\s+\S)" insensitive="true" beginRegion="PP" firstNonSpace="true" />
195 <RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*endif" insensitive="true" endRegion="PP" firstNonSpace="true" />
196 <RegExpr attribute="Preprocessor" context="Define" String="#\s*define(?:[^\\]++|\\.)++" insensitive="true" firstNonSpace="true" />
197 <RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*(?:el(?:se|if)|include(?:_next)?|define|undef|line|error|warning|pragma)|#\s+[0-9]+" insensitive="true" firstNonSpace="true" />
198 </context>
199
200 <context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor">
201 <LineContinue attribute="Preprocessor" context="#stay"/>
202 <RangeDetect attribute="Prep. Lib" context="#stay" char="&quot;" char1="&quot;"/>
203 <RangeDetect attribute="Prep. Lib" context="#stay" char="&lt;" char1="&gt;"/>
204 <IncludeRules context="FindComments" />
205 </context>
206
207 <context attribute="Preprocessor" lineEndContext="#pop" name="Define">
208 <LineContinue attribute="Preprocessor" context="#stay"/>
209 </context>
210
211 <context attribute="Comment" lineEndContext="#stay" name="Outscoped" >
212 <DetectSpaces />
213 <IncludeRules context="##Comments" />
214 <DetectIdentifier />
215 <DetectChar attribute="String" context="String" char="&quot;"/>
216 <IncludeRules context="FindComments" />
217 <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="PP" firstNonSpace="true" />
218 <RegExpr attribute="Preprocessor" context="#pop" String="#\s*el(?:se|if)" firstNonSpace="true" />
219 <RegExpr attribute="Preprocessor" context="#pop" String="#\s*endif" endRegion="PP" firstNonSpace="true" />
220 </context>
221
222 <context attribute="Comment" lineEndContext="#stay" name="Outscoped intern">
223 <DetectSpaces />
224 <IncludeRules context="##Comments" />
225 <DetectIdentifier />
226 <DetectChar attribute="String" context="String" char="&quot;"/>
227 <IncludeRules context="FindComments" />
228 <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="PP" firstNonSpace="true" />
229 <RegExpr attribute="Comment" context="#pop" String="#\s*endif" endRegion="PP" firstNonSpace="true" />
230 </context>
231 </contexts>
232 <itemDatas>
233 <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
234 <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
235 <itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/>
236 <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
237 <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>
238 <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
239 <itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
240 <itemData name="Char" defStyleNum="dsChar" spellChecking="false"/>
241 <itemData name="String" defStyleNum="dsString"/>
242 <itemData name="String Char" defStyleNum="dsChar"/>
243 <itemData name="Comment" defStyleNum="dsComment"/>
244 <itemData name="Symbol" defStyleNum="dsOperator" spellChecking="false"/>
245 <itemData name="Preprocessor" defStyleNum="dsOthers" spellChecking="false"/>
246 <itemData name="Prep. Lib" defStyleNum="dsOthers" spellChecking="false"/> <!--,Qt::darkYellow,Qt::yellow,false,false)); -->
247 <itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false"/>
248 <itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
249 </itemDatas>
250 </highlighting>
251 <general>
252 <comments>
253 <comment name="singleLine" start="//" />
254 <comment name="multiLine" start="/*" end="*/" region="Comment" />
255 </comments>
256 <keywords casesensitive="1" additionalDeliminator="'&quot;" />
257 </general>
258 </language>
259 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->