• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE language SYSTEM "language.dtd">
3
4<language
5
6name="c++"
7version="0.1.0"
8kateversion="2.4"
9section="boost::hs"
10extensions="*.cpp;*.hpp;*.h"
11mimetype="allFiles"
12author="Based on the original cpp.xml from katepart, Copyright 2006 -2007 Matias Capeletto, matias.capeletto@gmail.com"
13priority="9"
14license="Distributed under the Boost Software License, Version 1.0.
15http://www.boost.org/LICENSE_1_0.txt"
16
17>
18
19<highlighting>
20
21<!-- Keywords lists -->
22
23<list name="keywords">
24
25    <item> asm </item>
26    <item> break </item>
27    <item> case </item>
28    <item> catch </item>
29    <item> class </item>
30    <item> const_cast </item>
31    <item> continue </item>
32    <item> default </item>
33    <item> delete </item>
34    <item> do </item>
35    <item> dynamic_cast</item>
36    <item> else </item>
37    <item> enum </item>
38    <item> explicit </item>
39    <item> export </item>
40    <item> extern </item>
41    <item> false </item>
42    <item> friend </item>
43    <item> for </item>
44    <item> goto </item>
45    <item> if </item>
46    <item> inline </item>
47    <item> namespace </item>
48    <item> new </item>
49    <item> operator </item>
50    <item> private </item>
51    <item> protected </item>
52    <item> public </item>
53    <item> reinterpret_cast </item>
54    <item> return </item>
55    <item> sizeof </item>
56    <item> static_cast </item>
57    <item> struct </item>
58    <item> switch </item>
59    <item> template </item>
60    <item> this </item>
61    <item> throw </item>
62    <item> true </item>
63    <item> try </item>
64    <item> typedef </item>
65    <item> typeid </item>
66    <item> type_info </item>
67    <item> typename </item>
68    <item> union </item>
69    <item> using </item>
70    <item> virtual </item>
71    <item> while </item>
72    <item> and </item>
73    <item> and_eq </item>
74    <item> bad_cast </item>
75    <item> bad_typeid </item>
76    <item> bitand </item>
77    <item> bitor </item>
78    <item> compl </item>
79    <item> not </item>
80    <item> not_eq </item>
81    <item> or </item>
82    <item> or_eq </item>
83    <item> xor </item>
84    <item> xor_eq </item>
85    <item> except </item>
86    <item> finally </item>
87    <item> xalloc </item>
88
89</list>
90
91<list name="qt_extensions">
92
93    <item> K_DCOP </item>
94    <item> SLOT </item>
95    <item> SIGNAL </item>
96    <item> Q_CLASSINFO </item>
97    <item> Q_ENUMS </item>
98    <item> Q_EXPORT </item>
99    <item> Q_OBJECT </item>
100    <item> Q_OVERRIDE </item>
101    <item> Q_PROPERTY </item>
102    <item> Q_SETS </item>
103    <item> TRUE </item>
104    <item> FALSE </item>
105    <item> connect </item>
106    <item> disconnect </item>
107    <item> emit </item>
108    <item> signals </item>
109    <item> slots </item>
110    <item> foreach </item>
111
112</list>
113
114<list name="types">
115
116    <item> auto </item>
117    <item> bool </item>
118    <item> char </item>
119    <item> const </item>
120    <item> double </item>
121    <item> float </item>
122    <item> int </item>
123    <item> long </item>
124    <item> mutable </item>
125    <item> register </item>
126    <item> short </item>
127    <item> signed </item>
128    <item> static </item>
129    <item> unsigned </item>
130    <item> void </item>
131    <item> volatile </item>
132    <item> uchar </item>
133    <item> uint </item>
134    <item> int8_t </item>
135    <item> int16_t </item>
136    <item> int32_t </item>
137    <item> int64_t </item>
138    <item> uint8_t </item>
139    <item> uint16_t </item>
140    <item> uint32_t </item>
141    <item> uint64_t </item>
142    <item> wchar_t </item>
143
144</list>
145
146<!-- Contexts -->
147
148<contexts>
149
150<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
151
152    <DetectSpaces />
153
154    <IncludeRules context="boost::hs call finder" />
155    <IncludeRules context="preprocessor finder" />
156    <IncludeRules context="keyword finder" />
157    <IncludeRules context="extensions finder" />
158    <IncludeRules context="built in types finder" />
159    <IncludeRules context="##std-c++" />
160    <IncludeRules context="##boost" />
161    <IncludeRules context="character finder" />
162    <IncludeRules context="string finder" />
163
164    <DetectIndentifier />
165
166    <IncludeRules context="number finder" />
167    <IncludeRules context="##Doxygen" />
168    <IncludeRules context="quickbook_import_markup" />
169    <IncludeRules context="comment finder" />
170    <IncludeRules context="region finder" />
171    <IncludeRules context="symbol finder" />
172
173</context>
174
175<!-- String listerals -->
176
177<context attribute="String" name="string finder">
178    <DetectChar attribute="String" context="String" char="&quot;"/>
179</context>
180
181<context attribute="String" lineEndContext="#pop" name="String">
182
183    <LineContinue attribute="String" context="#stay"/>
184    <HlCStringChar attribute="String Char" context="#stay"/>
185    <DetectChar attribute="String" context="#pop" char="&quot;"/>
186
187</context>
188
189<!-- Character literals -->
190
191<context attribute="Character" name="character finder">
192    <HlCChar attribute="Char" context="#stay"/>
193</context>
194
195
196<!-- built in types -->
197
198<context attribute="built in types" name="built in types finder">
199    <keyword attribute="Data Type" context="#stay" String="types" />
200</context>
201
202<!-- extensions -->
203
204<context attribute="Extensions" name="extensions finder">
205    <keyword attribute="Extensions" context="#stay" String="qt_extensions" />
206</context>
207
208<!-- Keywords -->
209
210<context attribute="Keyword" name="keyword finder">
211    <keyword attribute="Keyword" context="#stay" String="keywords" />
212</context>
213
214<!-- Detect number literals -->
215
216<context attribute="Float" name="number finder">
217
218
219    <Float attribute="Float" context="#stay">
220        <AnyChar String="fF" attribute="Float" context="#stay"/>
221    </Float>
222
223    <HlCOct attribute="Octal" context="#stay"/>
224
225    <HlCHex attribute="Hex" context="#stay"/>
226
227    <Int attribute="Decimal" context="#stay">
228
229        <StringDetect attribute="Decimal" context="#stay" String="ULL" insensitive="TRUE"/>
230        <StringDetect attribute="Decimal" context="#stay" String="LUL" insensitive="TRUE"/>
231        <StringDetect attribute="Decimal" context="#stay" String="LLU" insensitive="TRUE"/>
232        <StringDetect attribute="Decimal" context="#stay" String="UL" insensitive="TRUE"/>
233        <StringDetect attribute="Decimal" context="#stay" String="LU" insensitive="TRUE"/>
234        <StringDetect attribute="Decimal" context="#stay" String="LL" insensitive="TRUE"/>
235        <StringDetect attribute="Decimal" context="#stay" String="U" insensitive="TRUE"/>
236        <StringDetect attribute="Decimal" context="#stay" String="L" insensitive="TRUE"/>
237
238    </Int>
239
240</context>
241
242
243<!-- Comments -->
244
245<context attribute="Commnet" name="comment finder">
246    <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
247    <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
248</context>
249
250<context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
251    <DetectSpaces />
252    <IncludeRules context="##Alerts" />
253    <DetectIdentifier />
254</context>
255
256<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
257    <DetectSpaces />
258    <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
259    <IncludeRules context="##Alerts" />
260    <DetectIdentifier />
261</context>
262
263<!-- QuickBook import markups -->
264
265<context attribute="Comment" lineEndContext="#stay" name="Quickbook Commentar 1">
266    <DetectSpaces />
267    <StringDetect attribute="Extensions" context="#pop" String="*/" endRegion="Comment"/>
268    <IncludeRules context="##Alerts" />
269    <DetectIdentifier />
270</context>
271
272<context attribute="Comment" lineEndContext="#stay" name="Quickbook Commentar 2">
273    <DetectSpaces />
274    <StringDetect attribute="Extensions" context="#pop" String="&gt;&gt;*/" endRegion="Comment"/>
275    <IncludeRules context="##Alerts" />
276    <DetectIdentifier />
277</context>
278
279<context attribute="Comment" lineEndContext="#stay" name="Quickbook Commentar 3">
280    <DetectSpaces />
281    <StringDetect attribute="Extensions" context="#pop" String="&gt;*/" endRegion="Comment"/>
282    <IncludeRules context="##Alerts" />
283    <DetectIdentifier />
284</context>
285
286<context name="quickbook_import_markup" attribute="Commnet">
287    <RegExpr attribute="Extensions" context="Commentar 1" String="//\[\s*\w+"/>
288    <StringDetect attribute="Extensions" context="Commentar 1" String="//]"/>
289    <StringDetect attribute="Extensions" context="Commentar 1" String="//`"/>
290    <StringDetect attribute="Extensions" context="Commentar 1" String="//&lt;--"/>
291    <StringDetect attribute="Extensions" context="Commentar 1" String="//--&gt;"/>
292    <StringDetect attribute="Extensions" context="Quickbook Commentar 1" String="/*`" beginRegion="Comment"/>
293    <StringDetect attribute="Extensions" context="Quickbook Commentar 2" String="/*&lt;&lt;" beginRegion="Comment"/>
294    <StringDetect attribute="Extensions" context="Quickbook Commentar 3" String="/*&lt;" beginRegion="Comment"/>
295</context>
296
297
298<!-- Regions -->
299
300<context attribute="Symbol" name="region finder">
301
302    <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
303    <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
304
305</context>
306
307<!-- Other reserved symbols -->
308
309<context attribute="Symbol" name="symbol finder">
310
311    <AnyChar attribute="Symbol" context="#stay" String=":!%&amp;()+,-/.*&lt;=&gt;?[]{|}~^&#59;"/>
312
313</context>
314
315<!-- Preprocessor -->
316
317<context attribute="Preprocessor" name="preprocessor finder">
318
319    <!-- ifdef/ifndef region markers -->
320
321    <RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0" beginRegion="Outscoped" firstNonSpace="true" />
322
323    <!-- Enter the preprocessor -->
324
325    <DetectChar attribute="Preprocessor" context="Preprocessor" char="#" firstNonSpace="true" />
326
327</context>
328
329<context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor">
330
331    <LineContinue attribute="Preprocessor" context="#stay"/>
332    <RegExpr attribute="Preprocessor" context="Define" String="define.*((?=\\))"/>
333    <RegExpr attribute="Preprocessor" context="#stay" String="define.*"/>
334    <RangeDetect attribute="Prep. Lib" context="#stay" char="&quot;" char1="&quot;"/>
335    <RangeDetect attribute="Prep. Lib" context="#stay" char="&lt;" char1="&gt;"/>
336    <IncludeRules context="##Doxygen" />
337    <IncludeRules context="quickbook_import_markup" />
338    <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
339    <Detect2Chars attribute="Comment" context="Commentar/Preprocessor" char="/" char1="*"/>
340
341</context>
342
343<context attribute="Preprocessor" lineEndContext="#pop" name="Define">
344    <LineContinue attribute="Preprocessor" context="#stay"/>
345</context>
346
347<context attribute="Comment" lineEndContext="#stay" name="Commentar/Preprocessor">
348    <DetectSpaces />
349    <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" />
350    <DetectIdentifier />
351</context>
352
353<context attribute="Comment" lineEndContext="#stay" name="Outscoped" >
354    <DetectSpaces />
355    <IncludeRules context="##Alerts" />
356    <DetectIdentifier />
357    <DetectChar attribute="String" context="String" char="&quot;"/>
358    <IncludeRules context="##Doxygen" />
359    <IncludeRules context="quickbook_import_markup" />
360    <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
361    <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
362    <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true" />
363    <RegExpr attribute="Preprocessor" context="#pop" String="#\s*(endif|else|elif)" endRegion="Outscoped" firstNonSpace="true" />
364</context>
365
366<context attribute="Comment" lineEndContext="#stay" name="Outscoped intern">
367
368    <DetectSpaces />
369    <IncludeRules context="##Alerts" />
370    <DetectIdentifier />
371    <DetectChar attribute="String" context="String" char="&quot;"/>
372    <IncludeRules context="##Doxygen" />
373    <IncludeRules context="quickbook_import_markup" />
374    <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
375    <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
376    <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true"/>
377    <RegExpr attribute="Comment" context="#pop" String="#\s*endif" endRegion="Outscoped" firstNonSpace="true"/>
378
379</context>
380
381
382<!-- boost::hs -->
383
384<context attribute="Comment" lineEndContext="#pop" name="boost::hs skip line" >
385
386</context>
387
388
389<context attribute="Comment" lineEndContext="#pop#pop" name="boost::hs skip line and pop pop" >
390
391</context>
392
393
394<context attribute="Comment" lineEndContext="boost::hs is off" name="boost::hs has gone off" >
395
396</context>
397
398
399<context attribute="Comment" name="boost::hs call finder">
400
401    <StringDetect attribute="boost::hs" context="boost::hs skip line" String="//boost::hs::begin_region()" beginRegion="boost::hs::Region" firstNonSpace="true" />
402    <StringDetect attribute="boost::hs" context="boost::hs skip line" String="//boost::hs::end_region()" endRegion="boost::hs::Region" firstNonSpace="true" />
403
404    <StringDetect attribute="boost::hs" context="boost::hs has gone off" String="//boost::hs::turn_off()" beginRegion="boost::hs::ScapedRegion" firstNonSpace="true" />
405    <StringDetect attribute="boost::hs" context="boost::hs skip line" String="//boost::hs::turn_on()" firstNonSpace="true" />
406
407</context>
408
409<context attribute="Normal Text" name="boost::hs is off">
410
411    <StringDetect attribute="boost::hs" context="boost::hs skip line and pop pop" String="//boost::hs::turn_off()" endRegion="boost::hs::ScapedRegion" firstNonSpace="true" />
412    <StringDetect attribute="boost::hs" context="#stay" String="//boost::hs::turn_on()" firstNonSpace="true" />
413
414</context>
415
416
417</contexts>
418
419<itemDatas>
420
421    <itemData name="Normal Text"  defStyleNum="dsNormal"/>
422    <itemData name="Keyword"      defStyleNum="dsKeyword"/>
423    <itemData name="Extensions"   defStyleNum="dsKeyword" color="#0095ff" selColor="#ffffff" bold="1" italic="0"/>
424    <itemData name="Data Type"    defStyleNum="dsDataType"/>
425    <itemData name="Decimal"      defStyleNum="dsDecVal"/>
426    <itemData name="Octal"        defStyleNum="dsBaseN"/>
427    <itemData name="Hex"          defStyleNum="dsBaseN"/>
428    <itemData name="Float"        defStyleNum="dsFloat"/>
429    <itemData name="Char"         defStyleNum="dsChar"/>
430    <itemData name="String"       defStyleNum="dsString"/>
431    <itemData name="String Char"  defStyleNum="dsChar"/>
432    <itemData name="Comment"      defStyleNum="dsComment"/>
433    <itemData name="Symbol"       defStyleNum="dsNormal"/>
434    <itemData name="Preprocessor" defStyleNum="dsOthers"/>
435    <itemData name="Prep. Lib"    defStyleNum="dsOthers"/>
436    <itemData name="boost::hs"    defStyleNum="dsOthers"/>
437
438</itemDatas>
439
440</highlighting>
441
442<general>
443
444    <comments>
445
446        <comment name="singleLine" start="//" />
447        <comment name="multiLine" start="/*" end="*/" region="Comment"/>
448
449    </comments>
450
451    <keywords casesensitive="1" />
452
453</general>
454
455</language>
456
457
458<!--
459
460Aknowelegments
461=================================================
462
463Version history
464=================================================
465
466[ 0.1.0 ] Initial beta.
467
468Known bugs
469=================================================
470
471-->