forked from hakimel/reveal.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathisocpp.xml
778 lines (710 loc) · 38.5 KB
/
isocpp.xml
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd"
[
<!ENTITY int "(?:[0-9](?:'?[0-9]+)*)">
<!ENTITY hex_int "(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f]+)*)">
<!ENTITY exp_float "(?:[eE][+-]?∫)">
<!ENTITY exp_hexfloat "(?:[pP][-+]?∫)">
<!ENTITY separators ",;">
<!ENTITY ns_punctuators "(){}[].+-/*%=<>!|&?~^@">
<!ENTITY punctuators ":&ns_punctuators;">
<!-- printf-like format strings conversion specifiers -->
<!ENTITY printf_like "%(?:ll?|[zjtL]|hh?)?[diouxXeEfFgGaAcspn%]">
<!ENTITY ispphash "(?:#|%\:|\?\?=)">
<!ENTITY pphash "&ispphash;\s*">
<!ENTITY ppemptypp "($|(?=(/\*([^*]|\*[^/])*\*/\s*)?(//.*)?$))">
<!ENTITY ppcond0 "\s+(?:0|false)\s*&ppemptypp;">
<!ENTITY ppcond1 "\s+(?:1|true)\s*(\|\|([^/]|/[^*/])+)?&ppemptypp;">
]>
<language
name="ISO C++"
section="Sources"
version="17"
kateversion="5.0"
indenter="cstyle"
style="C++"
mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr"
extensions="*.c++;*.cxx;*.cpp;*.cc;*.C;*.h;*.hh;*.H;*.h++;*.hxx;*.hpp;*.hcc;*.moc"
author="Alex Turbov ([email protected])"
license="LGPL"
priority="6"
>
<!--
Complete list of changes by Alex Turbov ([email protected])
can be found at:
http://kde-files.org/content/show.php?content=90660
-->
<highlighting>
<!-- https://en.cppreference.com/w/cpp/keyword -->
<list name="controlflow">
<item>break</item>
<item>case</item>
<item>catch</item>
<item>continue</item>
<item>default</item>
<item>do</item>
<item>else</item>
<item>for</item>
<item>goto</item>
<item>if</item>
<item>return</item>
<item>switch</item>
<item>throw</item>
<item>try</item>
<item>while</item>
</list>
<list name="keywords">
<item>alignof</item>
<item>alignas</item>
<item>asm</item>
<item>auto</item>
<item>class</item>
<item>consteval</item> <!-- C++20 -->
<item>constexpr</item>
<item>constinit</item> <!-- C++20 -->
<item>const_cast</item>
<item>decltype</item>
<item>delete</item>
<item>dynamic_cast</item>
<item>enum</item>
<item>explicit</item>
<item>false</item>
<item>final</item> <!-- According N3272 -->
<item>friend</item>
<item>inline</item>
<item>namespace</item>
<item>new</item>
<item>noexcept</item>
<item>nullptr</item>
<item>operator</item>
<item>override</item> <!-- According N3272 -->
<item>private</item>
<item>protected</item>
<item>public</item>
<item>reinterpret_cast</item>
<item>sizeof</item>
<item>static_assert</item>
<item>static_cast</item>
<item>struct</item>
<item>template</item>
<item>this</item>
<item>true</item>
<item>typedef</item>
<item>typeid</item>
<item>typename</item>
<item>union</item>
<item>using</item>
<item>virtual</item>
<!-- Alternative operators (see 2.12) -->
<item>and</item>
<item>and_eq</item>
<item>bitand</item>
<item>bitor</item>
<item>compl</item>
<item>not</item>
<item>not_eq</item>
<item>or</item>
<item>or_eq</item>
<item>xor</item>
<item>xor_eq</item>
<!-- Concept -->
<item>concept</item>
<item>requires</item>
<!-- TM TS -->
<!-- <item>atomic_cancel</item>
<item>atomic_commit</item>
<item>atomic_noexcept</item>
<item>synchronized</item>
<item>transaction_safe</item>
<item>transaction_safe_dynamic</item> -->
<!-- module -->
<item>import</item>
<item>module</item>
<item>export</item> <!-- Unused but reserved, keyword since c++20 -->
<!-- coroutine -->
<item>co_await</item>
<item>co_return</item>
<item>co_yield</item>
<!-- reflexion TS -->
<!-- <item>reflexpr</item> -->
</list>
<!-- 7.6 Attributes -->
<!-- http://en.cppreference.com/w/cpp/language/attributes -->
<list name="attributes">
<!-- C++11 -->
<item>noreturn</item>
<item>carries_dependency</item>
<!-- C++14 -->
<item>deprecated</item>
<!-- C++17 -->
<item>fallthrough</item>
<item>nodiscard</item>
<item>maybe_unused</item>
<!-- C++20 -->
<item>likely</item>
<item>unlikely</item>
<item>no_unique_address</item>
<!-- TM TS -->
<!-- <item>optimize_for_synchronized</item> -->
</list>
<!-- This keyword may appear in Attribute context. For example in code:
[[using CC: opt(1), debug]]
and it should be displayed as keyword, not like part of attribute...
-->
<list name="using">
<item>using</item>
</list>
<!-- https://en.cppreference.com/w/cpp/keyword -->
<list name="types">
<item>bool</item>
<item>char</item>
<item>char8_t</item> <!-- C++20 -->
<item>char16_t</item>
<item>char32_t</item>
<item>double</item>
<item>float</item>
<item>int</item>
<item>long</item>
<item>short</item>
<item>signed</item>
<item>unsigned</item>
<item>void</item>
<item>int8_t</item>
<item>int16_t</item>
<item>int32_t</item>
<item>int64_t</item>
<item>uint8_t</item>
<item>uint16_t</item>
<item>uint32_t</item>
<item>uint64_t</item>
<item>int_least8_t</item>
<item>int_least16_t</item>
<item>int_least32_t</item>
<item>int_least64_t</item>
<item>uint_least8_t</item>
<item>uint_least16_t</item>
<item>uint_least32_t</item>
<item>uint_least64_t</item>
<item>int_fast8_t</item>
<item>int_fast16_t</item>
<item>int_fast32_t</item>
<item>int_fast64_t</item>
<item>uint_fast8_t</item>
<item>uint_fast16_t</item>
<item>uint_fast32_t</item>
<item>uint_fast64_t</item>
<item>size_t</item>
<item>ssize_t</item>
<item>wchar_t</item>
<item>intptr_t</item>
<item>uintptr_t</item>
<item>intmax_t</item>
<item>uintmax_t</item>
<item>ptrdiff_t</item>
<item>sig_atomic_t</item>
<item>wint_t</item>
<item>va_list</item>
<item>FILE</item>
<item>fpos_t</item>
<item>time_t</item>
</list>
<list name="modifiers">
<item>const</item>
<item>extern</item>
<item>mutable</item>
<item>register</item> <!-- The keyword is unused and reserved (c++17) -->
<item>static</item>
<item>thread_local</item>
<item>volatile</item>
</list>
<!-- http://en.cppreference.com/w/cpp/preprocessor/replace -->
<list name="StdMacros">
<item>__DATE__</item>
<item>__FILE__</item>
<item>__LINE__</item>
<item>__STDCPP_DEFAULT_NEW_ALIGNMENT__</item>
<item>__STDCPP_STRICT_POINTER_SAFETY__</item>
<item>__STDCPP_THREADS__</item>
<item>__STDC_HOSTED__</item>
<item>__STDC_ISO_10646__</item>
<item>__STDC_MB_MIGHT_NEQ_WC__</item>
<item>__STDC_VERSION__</item>
<item>__STDC__</item>
<item>__TIME__</item>
<item>__cplusplus</item>
<item>__func__</item>
<item>assert</item>
<item>_Pragma</item>
<!-- C++17 -->
<item>__has_include</item>
<!-- C++20 -->
<item>__has_cpp_attribute</item>
</list>
<list name="InMacro">
<item>__VA_ARGS__</item>
<item>__VA_OPT__</item>
</list>
<list name="preprocessorIf">
<item>if</item>
</list>
<list name="preprocessorIfDef">
<item>ifdef</item>
<item>ifndef</item>
</list>
<list name="preprocessorElseIf">
<item>elif</item>
</list>
<list name="preprocessorElse">
<item>else</item>
</list>
<list name="preprocessorEndIf">
<item>endif</item>
</list>
<list name="preprocessorDefine">
<item>cmakedefine01</item>
<item>cmakedefine</item>
<item>define</item>
</list>
<list name="preprocessorInclude">
<item>include</item>
</list>
<list name="preprocessorOther">
<item>error</item>
<item>line</item>
<item>pragma</item>
<item>undef</item>
<item>warning</item>
</list>
<contexts>
<context name="Main" attribute="Normal Text" lineEndContext="#stay">
<DetectSpaces/>
<!-- Match scope regions -->
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
<Detect2Chars attribute="Symbol" context="#stay" char="<" char1="%" beginRegion="Brace1" /> <!-- Digraph: { -->
<Detect2Chars attribute="Symbol" context="#stay" char="%" char1=">" endRegion="Brace1" /> <!-- Digraph: } -->
<!-- Detect attributes -->
<Detect2Chars attribute="Symbol" context="Attribute" char="[" char1="[" />
<StringDetect attribute="Symbol" context="Attribute" String="<:<:" /> <!-- Digraph: [[ -->
<!-- Match numbers -->
<RegExpr attribute="Decimal" context="Number" String="\.?[0-9]" lookAhead="true" />
<!-- Match comments -->
<IncludeRules context="match comments and region markers" />
<!-- Match embedded Markdown -->
<RegExpr attribute="Ignore" context="#stay" String="@@.*?@@" />
<RegExpr attribute="Ignore" context="#stay" String="@.*?@" />
<!-- Match keywords -->
<IncludeRules context="match keywords" />
<!-- Match string literals -->
<IncludeRules context="match string" />
<!-- Match GCC extensions -->
<IncludeRules context="DetectGccExtensions##GCCExtensions" />
<IncludeRules context="match identifier" />
<!-- Match preprocessor directives -->
<RegExpr attribute="Preprocessor" context="AfterHash" String="&ispphash;" lookAhead="true" />
<!-- Match punctuators -->
<AnyChar attribute="Separator Symbol" context="#stay" String="&separators;" />
<AnyChar attribute="Symbol" context="#stay" String="&punctuators;" />
<!-- Match invalid symbols -->
<AnyChar attribute="Error" context="#stay" String="$" />
</context>
<context name="match comments" attribute="Normal Text" lineEndContext="#pop">
<Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="/" lookAhead="true"/>
<Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" />
</context>
<context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<IncludeRules context="##Doxygen" />
<Detect2Chars attribute="Comment" context="#pop!Comment 1" char="/" char1="/" />
<Detect2Chars attribute="Comment" context="#pop!Comment 2" char="/" char1="*" beginRegion="Comment" />
</context>
<context name="match comments and region markers" attribute="Normal Text" lineEndContext="#pop">
<Detect2Chars attribute="Comment" context="MatchCommentAndRegionMarkers" char="/" char1="/" lookAhead="true"/>
<Detect2Chars attribute="Comment" context="MatchCommentAndRegionMarkers" char="/" char1="*" lookAhead="true" />
</context>
<context name="MatchCommentAndRegionMarkers" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" />
<StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" />
<IncludeRules context="MatchComment" />
</context>
<context name="match keywords" attribute="Normal Text" lineEndContext="#pop">
<WordDetect attribute="Keyword" context="CheckUDLOperator" String="operator" />
<keyword attribute="Control Flow" context="#stay" String="controlflow" />
<keyword attribute="Keyword" context="#stay" String="keywords" />
</context>
<context name="match string" attribute="Normal Text" lineEndContext="#pop">
<DetectChar attribute="String" context="String" char=""" />
<Detect2Chars attribute="String" context="String32" char="U" char1=""" />
<Detect2Chars attribute="String" context="String16" char="u" char1=""" />
<Detect2Chars attribute="String" context="String16" char="L" char1=""" />
<StringDetect attribute="String" context="String8" String="u8"" />
<Detect2Chars attribute="String" context="RawString" char="R" char1=""" />
<StringDetect attribute="String" context="RawString" String="uR"" />
<StringDetect attribute="String" context="RawString" String="UR"" />
<StringDetect attribute="String" context="RawString" String="LR"" />
<StringDetect attribute="String" context="RawString" String="u8R"" />
<DetectChar attribute="Char" context="Char8 Literal" char="'" />
<Detect2Chars attribute="Char" context="Char16 Literal" char="L" char1="'" />
<Detect2Chars attribute="Char" context="Char16 Literal" char="u" char1="'" />
<Detect2Chars attribute="Char" context="Char32 Literal" char="U" char1="'" />
<StringDetect attribute="Char" context="Char8 Literal" String="u8'" />
</context>
<context name="match identifier" attribute="Normal Text" lineEndContext="#pop">
<keyword attribute="Data Type" context="#stay" String="types" />
<keyword attribute="Type Modifiers" context="#stay" String="modifiers" />
<keyword attribute="Standard Macros" context="#stay" String="StdMacros" />
<DetectIdentifier />
</context>
<context name="Number" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<RegExpr attribute="Float" context="FloatSuffix" String="\.∫&exp_float;?|∫(?:&exp_float;|\.∫?&exp_float;?)|0[xX](?:\.&hex_int;&exp_hexfloat;?|&hex_int;(?:&exp_hexfloat;|\.&hex_int;?&exp_hexfloat;?))" />
<IncludeRules context="Integer" />
</context>
<context name="Integer" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<RegExpr attribute="Hex" context="IntSuffix" String="0[xX]&hex_int;" />
<RegExpr attribute="Binary" context="IntSuffix" String="0[Bb][01](?:'?[01]+)*" />
<RegExpr attribute="Octal" context="IntSuffix" String="0(?:'?[0-7]+)+" />
<RegExpr attribute="Decimal" context="IntSuffix" String="0(?![xXbB0-9])|[1-9](?:'?[0-9]+)*" />
<RegExpr attribute="Error" context="#pop" String="[._0-9A-Za-z']+" />
</context>
<context name="IntSuffix" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError">
<DetectChar attribute="Error" context="#stay" char="'" />
<AnyChar attribute="Error" context="#pop!IntSuffixPattern" String="uUlLimunshyd_" lookAhead="true" />
</context>
<context name="IntSuffixPattern" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError">
<RegExpr attribute="Standard Suffix" context="NumericSuffixError" String="[Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?" />
<!-- https://en.cppreference.com/w/cpp/language/user_literal#Standard_library -->
<RegExpr attribute="Standard Classes" context="NumericSuffixError" String="(?:i[fl]?|min|[mun]?s|[hyd])\b" />
<DetectChar attribute="Error" context="#pop!NumericUserSuffixPattern" char="_" lookAhead="true" />
</context>
<context name="FloatSuffix" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError">
<AnyChar attribute="Standard Suffix" context="NumericSuffixError" String="fFlL" />
<!-- https://en.cppreference.com/w/cpp/language/user_literal#Standard_library -->
<RegExpr attribute="Standard Classes" context="NumericSuffixError" String="(?:i[fl]?|min|[mun]?s|h)\b" />
<DetectChar attribute="Error" context="#pop!NumericUserSuffixPattern" char="_" lookAhead="true" />
</context>
<context name="NumericUserSuffixPattern" attribute="Error" lineEndContext="#pop#pop">
<!--
http://en.cppreference.com/w/cpp/language/user_literal#Notes
Due to maximal munch, user-defined integer and floating point literals ending in
p, P, (since C++17) e and E, when followed by the operators + or -,
must be separated from the operator with whitespace or parentheses in the source
-->
<RegExpr attribute="Error" context="#pop#pop" String="_[eEpP][+-]" />
<RegExpr attribute="UDL Numeric Suffix" context="NumericSuffixError" String="_[_[:alnum:]]*" />
</context>
<context name="NumericSuffixError" attribute="Error" lineEndContext="#pop#pop#pop" fallthrough="true" fallthroughContext="#pop#pop#pop">
<RegExpr attribute="Error" context="#pop#pop#pop" String="\.[_0-9A-Za-z]*|[_0-9A-Za-z]+" />
</context>
<context name="CheckUDLOperator" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<DetectSpaces />
<Detect2Chars attribute="String" context="UDLOperatorName" char=""" char1=""" />
</context>
<context name="UDLOperatorName" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!IdentifierError">
<DetectSpaces />
<RegExpr attribute="Normal Text" context="#pop#pop" String="_[_[:alnum:]]*\b" />
</context>
<context name="IdentifierError" attribute="Error" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop#pop">
<RegExpr attribute="Error" context="#pop#pop" String=".[^\s()]*" />
</context>
<context name="Char8 Literal" attribute="Char" lineEndContext="#pop" fallthrough="true" fallthroughContext="Char Literal Close">
<RegExpr attribute="String Char" context="Char Literal Close" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})" />
<DetectChar attribute="Error" context="#pop" char="'" />
<RegExpr attribute="Char" context="Char Literal Close" String="." />
</context>
<context name="Char16 Literal" attribute="Char" lineEndContext="#pop" fallthrough="true" fallthroughContext="Char Literal Close">
<RegExpr attribute="String Char" context="Char Literal Close" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4})" />
<DetectChar attribute="Error" context="#pop" char="'" />
<RegExpr attribute="Char" context="Char Literal Close" String="." />
</context>
<context name="Char32 Literal" attribute="Char" lineEndContext="#pop" fallthrough="true" fallthroughContext="Char Literal Close">
<RegExpr attribute="String Char" context="Char Literal Close" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|x[0-9A-Fa-f]{1,8}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})" />
<DetectChar attribute="Error" context="#pop" char="'" />
<RegExpr attribute="Char" context="Char Literal Close" String="." />
</context>
<context name="Char Literal Close" attribute="Error" lineEndContext="#pop#pop">
<DetectChar attribute="Char" context="#pop#pop" char="'" />
</context>
<context name="String" attribute="String" lineEndContext="#pop">
<IncludeRules context="string normal char" />
<RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,8}" />
<IncludeRules context="string special char" />
</context>
<context name="String8" attribute="String" lineEndContext="#pop">
<IncludeRules context="string normal char" />
<RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,2}" />
<IncludeRules context="string special char" />
</context>
<context name="String16" attribute="String" lineEndContext="#pop">
<IncludeRules context="string normal char" />
<RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,4}" />
<IncludeRules context="string special char" />
</context>
<context name="String32" attribute="String" lineEndContext="#pop">
<IncludeRules context="string normal char" />
<RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,8}" />
<IncludeRules context="string special char" />
</context>
<context name="StringNoHex" attribute="Error" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<RegExpr attribute="Error" context="#pop" String="[0-9A-Fa-f]{1,}" />
</context>
<context name="string special char" attribute="String" lineEndContext="#pop">
<RegExpr attribute="String Char" context="#stay" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})|&printf_like;" />
<RegExpr attribute="Error" context="#stay" String="\\(?:u[^"]{0,3}|U[^"]{0,7}|.)" />
<LineContinue attribute="String" context="#stay" />
</context>
<context name="string normal char" attribute="String" lineEndContext="#pop">
<!-- fast way, can be replaced by a `UntilChars` rule if it exists -->
<RegExpr attribute="String" context="#stay" String="[^%\\"]+" />
<DetectChar attribute="String" context="UDLStringSuffix" char=""" />
</context>
<context name="UDLStringSuffix" attribute="String" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop">
<WordDetect attribute="Standard Classes" context="#pop#pop" String="sv" />
<WordDetect attribute="Standard Classes" context="#pop#pop" String="s" />
<RegExpr attribute="UDL String Suffix" context="#pop#pop" String="_[_0-9A-Za-z]*\b" />
</context>
<context name="Attribute" attribute="Attribute" lineEndContext="#stay">
<DetectSpaces/>
<keyword attribute="Standard Attribute" context="#stay" String="attributes" />
<Detect2Chars attribute="Symbol" context="#pop" char="]" char1="]" />
<StringDetect attribute="Symbol" context="#pop" String=":>:>" /> <!-- Digraph: ]] -->
<DetectChar attribute="Separator Symbol" context="#stay" char="," />
<AnyChar attribute="Symbol" context="#stay" String="&punctuators;" />
<!-- Attributes may contain some text: [[deprecated("Reason text")]] -->
<DetectChar attribute="String" context="String" char=""" />
<AnyChar attribute="Decimal" context="Integer" String="0123456789" lookAhead="true" />
<keyword attribute="Keyword" context="AttributeNamespace" String="using" />
<IncludeRules context="DetectGccAttributes##GCCExtensions" />
<DetectIdentifier />
</context>
<context name="Attribute In PP" attribute="Attribute" lineEndContext="#pop">
<IncludeRules context="InPreprocessor" />
<IncludeRules context="Attribute" />
</context>
<context name="AttributeNamespace" attribute="Attribute" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
<DetectSpaces />
<IncludeRules context="DetectNamespaceGccAttributes##GCCExtensions" />
<DetectIdentifier />
</context>
<context name="RawString" attribute="String" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!LineError">
<RegExpr attribute="String" context="#pop!InRawString" String="([^\(]{0,16})\(" />
</context>
<context name="InRawString" attribute="String" lineEndContext="#stay" dynamic="true">
<!-- fast way, can be replaced by a `UntilChars` rule if it exists -->
<RegExpr attribute="String" context="#stay" String="[^%)]+" />
<RegExpr attribute="String Char" context="#stay" String="&printf_like;" />
<StringDetect attribute="String" context="#pop" String=")%1"" dynamic="true"/>
</context>
<context name="Region Marker" attribute="Region Marker" lineEndContext="#pop" />
<context name="Comment 1" attribute="Comment" lineEndContext="#pop">
<LineContinue attribute="Error" context="#stay" />
<DetectSpaces />
<IncludeRules context="##Alerts" />
<IncludeRules context="##Modelines" />
<DetectIdentifier />
</context>
<context name="Comment 2" attribute="Comment" lineEndContext="#stay">
<DetectSpaces />
<LineContinue attribute="Comment" context="#stay" />
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment" />
<IncludeRules context="##Alerts" />
<IncludeRules context="##Modelines" />
<DetectIdentifier />
</context>
<context name="AfterHash" attribute="Error" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!AfterHashLineError">
<RegExpr attribute="Preprocessor" context="#pop!PreprocessorCmd" String="&pphash;(?=.)" firstNonSpace="true" />
</context>
<context name="AfterHashLineError" attribute="Region Marker" lineEndContext="#pop">
<LineContinue attribute="Error" context="#stay" />
<RegExpr attribute="Error" context="#pop!LineError" String="[^\\]+" />
<!-- for auto-completion in Kate editor -->
<keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorInclude" />
<keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorIfDef" />
<keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorIf" />
<keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorElseIf" />
<keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorElse" />
<keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorEndIf" />
<keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorOther" />
<keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorDefine" />
</context>
<context name="LineError" attribute="Error" lineEndContext="#pop">
<LineContinue attribute="Error" context="#stay" />
</context>
<context name="PreprocessorCmd" attribute="Error" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!AfterHashLineError">
<keyword attribute="Preprocessor" context="#pop!Include" String="preprocessorInclude" />
<keyword attribute="Preprocessor" context="#pop!PreprocessorIfDef" String="preprocessorIfDef" beginRegion="PP" lookAhead="true" />
<keyword attribute="Preprocessor" context="#pop!PreprocessorIf" String="preprocessorIf" beginRegion="PP" lookAhead="true" />
<keyword attribute="Preprocessor" context="#pop!PreprocessorIf" String="preprocessorElseIf" endRegion="PP" beginRegion="PP" lookAhead="true" />
<keyword attribute="Preprocessor" context="PreprocessorEndOfLineSpace" String="preprocessorElse" endRegion="PP" beginRegion="PP" />
<keyword attribute="Preprocessor" context="PreprocessorEndOfLineSpace" String="preprocessorEndIf" endRegion="PP" />
<keyword attribute="Preprocessor" context="#pop!Preprocessor" String="preprocessorOther" />
<keyword attribute="Preprocessor" context="#pop!Define" String="preprocessorDefine" />
<!-- GCC extension -->
<WordDetect attribute="Preprocessor" context="#pop!Include" String="include_next" />
<RegExpr attribute="Preprocessor" context="#pop!Preprocessor" String="[0-9]+" />
</context>
<context name="Include" attribute="Preprocessor" lineEndContext="#pop" >
<LineContinue attribute="Preprocessor" context="#stay" />
<RangeDetect attribute="Prep. Lib" context="PreprocessorEndOfLineSpace" char=""" char1=""" />
<RangeDetect attribute="Prep. Lib" context="PreprocessorEndOfLineSpace" char="<" char1=">" />
<IncludeRules context="Preprocessor" />
</context>
<context name="PreprocessorIfDef" attribute="Preprocessor" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!LineError">
<RegExpr attribute="Preprocessor" context="#pop!Preprocessor" String="\w+\s+([_A-Za-z][A-Za-z0-9]*\s*|(?=//|/\*))" />
</context>
<context name="PreprocessorIf" attribute="Preprocessor" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!LineError">
<RegExpr attribute="Preprocessor" context="#pop!Inscoped" String="\w+&ppcond1;" />
<RegExpr attribute="Preprocessor" context="#pop!Outscoped" String="\w+&ppcond0;" />
<RegExpr attribute="Preprocessor" context="#pop!Preprocessor" String="\w+\s+(?=[^\s])" />
</context>
<context name="PreprocessorEndOfLineSpace" attribute="Preprocessor" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop!LineError">
<DetectSpaces />
<IncludeRules context="match comments" />
</context>
<context name="Preprocessor" attribute="Preprocessor" lineEndContext="#pop">
<LineContinue attribute="Preprocessor" context="#stay" />
<keyword attribute="Standard Macros" context="#stay" String="StdMacros" />
<IncludeRules context="GNUMacros##GCCExtensions" />
<IncludeRules context="match comments" />
</context>
<context name="Define" attribute="Preprocessor" lineEndContext="#pop">
<DetectSpaces/>
<!--
Old version: non-contextual macro
<IncludeRules context="InPreprocessor" />
<keyword attribute="Standard Macros" context="#stay" String="StdMacros" />
<keyword attribute="Standard Macros" context="#stay" String="InMacro" />
<IncludeRules context="GNUMacros##GCCExtensions" />
<IncludeRules context="match comments" />
-->
<IncludeRules context="InPreprocessor" />
<Detect2Chars attribute="Error" context="#pop!LineError" char="/" char1="/" />
<IncludeRules context="##Doxygen" />
<Detect2Chars attribute="Comment" context="Comment 2" char="/" char1="*" beginRegion="Comment" />
<IncludeRules context="GNUMacros##GCCExtensions" />
<DetectIdentifier attribute="Preprocessor" context="#pop!In Define"/>
</context>
<context name="In Define" attribute="Preprocessor" lineEndContext="#pop">
<DetectSpaces/>
<IncludeRules context="InPreprocessor" />
<!-- Match scope regions -->
<AnyChar attribute="Symbol" context="#stay" String="{}" />
<!-- Detect attributes -->
<Detect2Chars attribute="Symbol" context="Attribute In PP" char="[" char1="[" />
<StringDetect attribute="Symbol" context="Attribute In PP" String="<:<:" /> <!-- Digraph: [[ -->
<!-- Match numbers -->
<RegExpr attribute="Decimal" context="Number" String="\.?[0-9]" lookAhead="true" />
<!-- Match comments -->
<IncludeRules context="match comments" />
<!-- Match embedded Markdown -->
<RegExpr attribute="Ignore" context="#stay" String="@@.*?@@" />
<RegExpr attribute="Ignore" context="#stay" String="@.*?@" />
<!-- Match punctuators -->
<AnyChar attribute="Separator Symbol" context="#stay" String="&separators;" />
<AnyChar attribute="Symbol" context="#stay" String="&punctuators;" />
<!-- Match keywords -->
<IncludeRules context="match keywords" />
<!-- Match string literals -->
<IncludeRules context="match string" />
<!-- Match GCC extensions -->
<IncludeRules context="DetectGccExtensionsInPP##GCCExtensions" />
<keyword attribute="Standard Macros" context="#stay" String="InMacro" />
<IncludeRules context="match identifier" />
<!-- Match preprocessor directives -->
<DetectChar attribute="Preprocessor" context="#stay" char="#" />
<!-- Match invalid symbols -->
<AnyChar attribute="Error" context="#stay" String="$" />
</context>
<context name="InPreprocessor" attribute="Normal Text" lineEndContext="#pop">
<LineContinue attribute="Separator Symbol" context="#stay" />
<DetectChar attribute="Error" context="#stay" char="\" />
</context>
<context name="Outscoped Common" attribute="Comment" lineEndContext="#stay">
<DetectSpaces />
<IncludeRules context="##Alerts" />
<IncludeRules context="##Modelines" />
<DetectIdentifier />
<!-- prevent incorrect highlighting in case of not closed properly comment block -->
<Detect2Chars attribute="Comment" context="#stay" char="*" char1="/" />
<IncludeRules context="match comments" />
<RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if" beginRegion="PP" firstNonSpace="true" />
<LineContinue context="#stay" />
</context>
<context name="Outscoped" attribute="Comment" lineEndContext="#stay">
<DetectSpaces />
<RegExpr attribute="Preprocessor" context="Outscoped AfterHash" String="&ispphash;" firstNonSpace="true" lookAhead="true" />
<IncludeRules context="Outscoped Common" />
</context>
<context name="Outscoped AfterHash" attribute="Comment" lineEndContext="#pop">
<RegExpr attribute="Preprocessor" context="#pop#pop!PreprocessorEndOfLineSpace" String="&pphash;endif\b" endRegion="PP" />
<RegExpr attribute="Preprocessor" context="#pop#pop!Inscoped" String="&pphash;else\b" endRegion="PP" beginRegion="PP" />
<RegExpr attribute="Comment" context="#pop!Outscoped intern" String="&pphash;if" beginRegion="PP" />
<RegExpr attribute="Preprocessor" context="#pop#pop!Inscoped" String="&pphash;elif&ppcond1;" endRegion="PP" beginRegion="PP" />
<RegExpr attribute="Preprocessor" context="#pop" String="&pphash;elif&ppcond0;" endRegion="PP" beginRegion="PP" />
<RegExpr attribute="Preprocessor" context="#pop#pop!Preprocessor" String="&pphash;elif\b" endRegion="PP" beginRegion="PP" />
<RegExpr attribute="Comment" context="#pop" String="&pphash;" />
</context>
<context name="Outscoped 2" attribute="Comment" lineEndContext="#stay">
<IncludeRules context="Outscoped Common" />
<RegExpr attribute="Preprocessor" context="#pop!PreprocessorEndOfLineSpace" String="&pphash;endif" endRegion="PP" firstNonSpace="true" />
</context>
<context name="Inscoped" attribute="Normal Text" lineEndContext="#stay">
<DetectSpaces />
<RegExpr attribute="Preprocessor" context="Inscoped AfterHash" String="&ispphash;" firstNonSpace="true" lookAhead="true" />
<IncludeRules context="Main" />
</context>
<context name="Inscoped AfterHash" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!AfterHash">
<DetectSpaces />
<RegExpr attribute="Preprocessor" context="#pop!Outscoped 2" String="&pphash;el(?:se|if)" endRegion="PP" beginRegion="PP"/>
<RegExpr attribute="Preprocessor" context="#pop#pop!PreprocessorEndOfLineSpace" String="&pphash;endif\b" endRegion="PP" />
</context>
<context name="Outscoped intern" attribute="Comment" lineEndContext="#stay">
<DetectSpaces />
<IncludeRules context="##Alerts" />
<IncludeRules context="##Modelines" />
<DetectIdentifier />
<!-- prevent incorrect highlighting in case of not closed properly comment block -->
<Detect2Chars attribute="Comment" context="#stay" char="*" char1="/" />
<IncludeRules context="match comments" />
<RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if" beginRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Comment" context="#stay" String="&pphash;el(se|if)" beginRegion="PP" endRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Comment" context="PreprocessorEndOfLineSpace" String="&pphash;endif" endRegion="PP" firstNonSpace="true" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" />
<itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false" />
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" />
<itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false" />
<itemData name="Type Modifiers" defStyleNum="dsKeyword" spellChecking="false" />
<itemData name="Attribute" defStyleNum="dsAttribute" spellChecking="false" bold="false" italic="true" />
<itemData name="Standard Attribute" defStyleNum="dsAttribute" spellChecking="false" bold="false" italic="true" />
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false" />
<itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false" />
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false" />
<itemData name="Binary" defStyleNum="dsBaseN" spellChecking="false" />
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false" />
<itemData name="Char" defStyleNum="dsChar" spellChecking="false" />
<itemData name="String" defStyleNum="dsString" spellChecking="true" />
<itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="false" />
<itemData name="Comment" defStyleNum="dsComment" spellChecking="true" />
<itemData name="Symbol" defStyleNum="dsOperator" spellChecking="false" />
<itemData name="Separator Symbol" defStyleNum="dsNormal" spellChecking="false" />
<itemData name="Preprocessor" defStyleNum="dsPreprocessor" spellChecking="false" />
<itemData name="Prep. Lib" defStyleNum="dsImport" spellChecking="false" />
<itemData name="Standard Macros" defStyleNum="dsOthers" spellChecking="false" />
<itemData name="Standard Classes" defStyleNum="dsBuiltIn" spellChecking="false" />
<itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false" />
<itemData name="UDL Numeric Suffix" defStyleNum="dsDecVal" spellChecking="false" />
<itemData name="UDL String Suffix" defStyleNum="dsString" spellChecking="false" />
<itemData name="Standard Suffix" defStyleNum="dsBuiltIn" spellChecking="false" />
<itemData name="Error" defStyleNum="dsError" spellChecking="false" />
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="//" />
<comment name="multiLine" start="/*" end="*/" region="Comment" />
</comments>
<keywords casesensitive="1" additionalDeliminator="#"" />
</general>
</language>
<!-- kate: indent-width 2; tab-width 2; -->