Warning, /frameworks/syntax-highlighting/data/syntax/c.xml is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!DOCTYPE language
0003 [
0004 <!ENTITY int "(?:[0-9](?:'?[0-9]++)*+)">
0005 <!ENTITY hex_int "(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f]++)*+)">
0006 <!ENTITY exp_float "(?:[eE][+-]?∫)">
0007 <!ENTITY exp_hexfloat "(?:[pP][-+]?∫)">
0008
0009 <!ENTITY symbols ":!%&()+,-/.*<=>?[]|~^;">
0010
0011 <!-- printf-like format strings conversion specifiers -->
0012 <!ENTITY printf_like "%[-+ #0]*+(?:[0-9]++|\*)?(?:\.(?:[0-9]++|\*))?(?:(?:hh|ll|[hljzt]|wf?(?:8|16|32|64))?[dioxXubn]|(?:DD|[lLHD])?[fFeEaAgG]|l?[cs]|[p%])">
0013
0014 <!ENTITY ispphash "(?:#|%\:|\?\?=)">
0015 <!ENTITY pphash "&ispphash;\s*">
0016 ]>
0017 <language name="C" section="Sources"
0018 version="18" kateversion="5.79"
0019 indenter="cstyle"
0020 extensions="*.c;*.C;*.h"
0021 mimetype="text/x-csrc;text/x-c++src;text/x-chdr"
0022 priority="5">
0023 <!--
0024
0025 Fixes by Sebastian Pipping (webmaster@hartwork.org)
0026
0027 NOTE: Keep in sync with C++ highlighter! (cpp.xml)
0028
0029 Version 6: add more versatile numbers highlighting, taken from isocpp.xml
0030 -->
0031 <highlighting>
0032 <list name="controlflow">
0033 <item>break</item>
0034 <item>case</item>
0035 <item>continue</item>
0036 <item>default</item>
0037 <item>do</item>
0038 <item>else</item>
0039 <item>for</item>
0040 <item>goto</item>
0041 <item>if</item>
0042 <item>return</item>
0043 <item>switch</item>
0044 <item>while</item>
0045 </list>
0046
0047 <list name="keywords">
0048 <item>alignas</item> <!-- C23 -->
0049 <item>alignof</item> <!-- C23 -->
0050 <item>auto</item>
0051 <item>constexpr</item> <!-- C23 -->
0052 <item>enum</item>
0053 <item>extern</item>
0054 <item>false</item> <!-- C23 -->
0055 <item>inline</item>
0056 <item>nullptr</item> <!-- C23 -->
0057 <item>sizeof</item>
0058 <item>static_assert</item> <!-- C23 -->
0059 <item>struct</item>
0060 <item>true</item> <!-- C23 -->
0061 <item>typedef</item>
0062 <item>typeof</item> <!-- C23 -->
0063 <item>typeof_unqual</item> <!-- C23 -->
0064 <item>union</item>
0065 <item>_Alignas</item>
0066 <item>_Alignof</item>
0067 <item>_Atomic</item>
0068 <item>_Noreturn</item>
0069 <item>_Static_assert</item>
0070 <item>_Thread_local</item>
0071 </list>
0072
0073 <!-- https://en.cppreference.com/w/c/language/attributes -->
0074 <list name="attributes">
0075 <item>noreturn</item>
0076 <item>deprecated</item>
0077 <item>fallthrough</item>
0078 <item>nodiscard</item>
0079 <item>maybe_unused</item>
0080 <item>unsequenced</item>
0081 <item>reproducible</item>
0082 </list>
0083
0084 <list name="types">
0085 <item>bool</item> <!-- C23 -->
0086 <item>char</item>
0087 <item>char16_t</item>
0088 <item>char32_t</item>
0089 <item>double</item>
0090 <item>float</item>
0091 <item>int</item>
0092 <item>long</item>
0093 <item>short</item>
0094 <item>signed</item>
0095 <item>unsigned</item>
0096 <item>void</item>
0097 <item>int8_t</item>
0098 <item>int16_t</item>
0099 <item>int32_t</item>
0100 <item>int64_t</item>
0101 <item>uint8_t</item>
0102 <item>uint16_t</item>
0103 <item>uint32_t</item>
0104 <item>uint64_t</item>
0105 <item>int_least8_t</item>
0106 <item>int_least16_t</item>
0107 <item>int_least32_t</item>
0108 <item>int_least64_t</item>
0109 <item>uint_least8_t</item>
0110 <item>uint_least16_t</item>
0111 <item>uint_least32_t</item>
0112 <item>uint_least64_t</item>
0113 <item>int_fast8_t</item>
0114 <item>int_fast16_t</item>
0115 <item>int_fast32_t</item>
0116 <item>int_fast64_t</item>
0117 <item>uint_fast8_t</item>
0118 <item>uint_fast16_t</item>
0119 <item>uint_fast32_t</item>
0120 <item>uint_fast64_t</item>
0121 <item>size_t</item>
0122 <item>ssize_t</item>
0123 <item>wchar_t</item>
0124 <item>intptr_t</item>
0125 <item>uintptr_t</item>
0126 <item>intmax_t</item>
0127 <item>uintmax_t</item>
0128 <item>ptrdiff_t</item>
0129 <item>sig_atomic_t</item>
0130 <item>wint_t</item>
0131 <item>_BitInt</item> <!-- C23 -->
0132 <item>_Bool</item>
0133 <item>bool</item>
0134 <item>_Decimal32</item> <!-- C23 -->
0135 <item>_Decimal64</item> <!-- C23 -->
0136 <item>_Decimal128</item> <!-- C23 -->
0137 <item>_Complex</item>
0138 <item>complex</item>
0139 <item>_Imaginary</item>
0140 <item>imaginary</item>
0141 <item>_Generic</item>
0142 <item>va_list</item>
0143 <item>FILE</item>
0144 <item>fpos_t</item>
0145 <item>time_t</item>
0146 <item>max_align_t</item>
0147
0148 <!-- modifiers -->
0149 <item>const</item>
0150 <item>register</item>
0151 <item>restrict</item>
0152 <item>static</item>
0153 <item>thread_local</item> <!-- C23 -->
0154 <item>volatile</item>
0155 </list>
0156
0157 <list name="preprocessor">
0158 <item>if</item>
0159 <item>ifdef</item>
0160 <item>ifndef</item>
0161 <item>elif</item>
0162 <item>elifdef</item> <!-- C23 -->
0163 <item>elifndef</item> <!-- C23 -->
0164 <item>else</item>
0165 <item>endif</item>
0166 <item>define</item>
0167 <item>include</item>
0168 <item>error</item>
0169 <item>line</item>
0170 <item>pragma</item>
0171 <item>undef</item>
0172 <item>warning</item>
0173 <item>embed</item>
0174 </list>
0175
0176 <contexts>
0177 <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
0178 <DetectSpaces />
0179 <!-- Match symbols (partial for fast path) -->
0180 <AnyChar attribute="Symbol" context="#stay" String=":()]+-*=>!|&~^,;" />
0181
0182 <IncludeRules context="match keywords" />
0183 <AnyChar context="SelectString" String="UuL"'" lookAhead="1"/>
0184 <DetectIdentifier />
0185
0186 <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
0187 <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
0188 <Detect2Chars attribute="Symbol" context="#stay" char="<" char1="%" beginRegion="Brace1" /> <!-- Digraph: { -->
0189 <Detect2Chars attribute="Symbol" context="#stay" char="%" char1=">" endRegion="Brace1" /> <!-- Digraph: } -->
0190
0191 <!-- Detect attributes -->
0192 <Detect2Chars attribute="Symbol" context="Attribute" char="[" char1="[" />
0193 <StringDetect attribute="Symbol" context="Attribute" String="<:<:" /> <!-- Digraph: [[ -->
0194
0195 <!-- Match numbers -->
0196 <RegExpr context="Number" String="\.?[0-9]" lookAhead="1" />
0197
0198 <IncludeRules context="FindComments" />
0199 <RegExpr context="AfterHash" String="&ispphash;|" firstNonSpace="1" lookAhead="1" />
0200 <AnyChar attribute="Symbol" context="#stay" String="&symbols;"/>
0201 </context>
0202
0203 <context name="match keywords" attribute="Normal Text" lineEndContext="#pop">
0204 <keyword attribute="Control Flow" context="#stay" String="controlflow"/>
0205 <keyword attribute="Keyword" context="#stay" String="keywords"/>
0206 <keyword attribute="Data Type" context="#stay" String="types"/>
0207 </context>
0208
0209
0210 <context name="SelectStringPP" attribute="Preprocessor" lineEndContext="#pop">
0211 <IncludeRules context="SelectString"/>
0212 </context>
0213 <context name="SelectString" attribute="Normal Text" lineEndContext="#pop">
0214 <DetectChar attribute="String" context="#pop!String8" char="""/>
0215 <DetectChar attribute="Char" context="#pop!Char8" char="'"/>
0216 <Detect2Chars context="#pop!SelectStringPrefix" char="U" char1=""" lookAhead="1"/>
0217 <Detect2Chars context="#pop!SelectStringPrefix" char="u" char1=""" lookAhead="1"/>
0218 <Detect2Chars context="#pop!SelectStringPrefix" char="L" char1=""" lookAhead="1"/>
0219 <StringDetect context="#pop!SelectStringPrefix" String="u8"" lookAhead="1"/>
0220 <Detect2Chars context="#pop!SelectCharPrefix" char="U" char1="'" lookAhead="1"/>
0221 <Detect2Chars context="#pop!SelectCharPrefix" char="u" char1="'" lookAhead="1"/>
0222 <Detect2Chars context="#pop!SelectCharPrefix" char="L" char1="'" lookAhead="1"/>
0223 <StringDetect context="#pop!SelectCharPrefix" String="u8'" lookAhead="1"/>
0224
0225 <!-- match identifier -->
0226 <keyword attribute="Data Type" context="#pop" String="types"/>
0227 <DetectIdentifier context="#pop"/>
0228 </context>
0229
0230
0231 <context name="SelectStringPrefix" attribute="String" lineEndContext="#pop">
0232 <Detect2Chars attribute="String Literal Prefix" context="#pop!StringPrefix8" char="u" char1="8"/>
0233 <AnyChar attribute="String Literal Prefix" context="#pop!StringPrefix16" String="uL"/>
0234 <DetectChar attribute="String Literal Prefix" context="#pop!StringPrefix32" char="U"/>
0235 </context>
0236 <context name="StringPrefix8" attribute="String" lineEndContext="#pop">
0237 <DetectChar attribute="String" context="#pop!String8" char="""/>
0238 </context>
0239 <context name="StringPrefix16" attribute="String" lineEndContext="#pop">
0240 <DetectChar attribute="String" context="#pop!String16" char="""/>
0241 </context>
0242 <context name="StringPrefix32" attribute="String" lineEndContext="#pop">
0243 <DetectChar attribute="String" context="#pop!String32" char="""/>
0244 </context>
0245
0246 <context name="SelectCharPrefix" attribute="String" lineEndContext="#pop">
0247 <Detect2Chars attribute="Char Literal Prefix" context="#pop!CharPrefix8" char="u" char1="8"/>
0248 <AnyChar attribute="Char Literal Prefix" context="#pop!CharPrefix16" String="uL"/>
0249 <DetectChar attribute="Char Literal Prefix" context="#pop!CharPrefix32" char="U"/>
0250 </context>
0251 <context name="CharPrefix8" attribute="Char" lineEndContext="#pop">
0252 <DetectChar attribute="Char" context="#pop!Char8" char="'"/>
0253 </context>
0254 <context name="CharPrefix16" attribute="Char" lineEndContext="#pop">
0255 <DetectChar attribute="Char" context="#pop!Char16" char="'"/>
0256 </context>
0257 <context name="CharPrefix32" attribute="Char" lineEndContext="#pop">
0258 <DetectChar attribute="Char" context="#pop!Char32" char="'"/>
0259 </context>
0260
0261
0262 <context name="String8" attribute="String" lineEndContext="#pop">
0263 <IncludeRules context="string normal char" />
0264 <Detect2Chars context="String8EscapeX" char="\" char1="x" lookAhead="1"/>
0265 <IncludeRules context="string special char" />
0266 </context>
0267 <context name="String8EscapeX" attribute="String" lineEndContext="#pop">
0268 <HlCStringChar attribute="String Char" context="#pop!StringNoHex"/>
0269 <Detect2Chars context="#pop" attribute="Error" char="\" char1="x"/>
0270 </context>
0271
0272 <context name="String16" attribute="String" lineEndContext="#pop">
0273 <IncludeRules context="string normal char" />
0274 <Detect2Chars context="String16EscapeX" char="\" char1="x" lookAhead="1"/>
0275 <IncludeRules context="string special char" />
0276 </context>
0277 <context name="String16EscapeX" attribute="String" lineEndContext="#pop">
0278 <RegExpr attribute="String Char" context="#pop!StringNoHex" String="\\x[0-9A-Fa-f]{1,4}" />
0279 <Detect2Chars context="#pop" attribute="Error" char="\" char1="x"/>
0280 </context>
0281
0282 <context name="String32" attribute="String" lineEndContext="#pop">
0283 <IncludeRules context="string normal char" />
0284 <Detect2Chars context="String32EscapeX" char="\" char1="x" lookAhead="1"/>
0285 <IncludeRules context="string special char" />
0286 </context>
0287 <context name="String32EscapeX" attribute="String" lineEndContext="#pop">
0288 <RegExpr attribute="String Char" context="#pop!StringNoHex" String="\\x[0-9A-Fa-f]{1,8}" />
0289 <Detect2Chars context="#pop" attribute="Error" char="\" char1="x"/>
0290 </context>
0291
0292 <context name="StringNoHex" attribute="Error" lineEndContext="#pop" fallthroughContext="#pop">
0293 <RegExpr attribute="Error" context="#pop" String="[0-9A-Fa-f]{1,}" />
0294 </context>
0295
0296
0297 <context name="Char8" attribute="Char" lineEndContext="#pop" fallthroughContext="CharClose">
0298 <HlCStringChar attribute="String Char" context="CharClose"/>
0299 <IncludeRules context="FindSingleChar"/>
0300 </context>
0301
0302 <context name="Char16" attribute="Char" lineEndContext="#pop" fallthroughContext="CharClose">
0303 <RegExpr attribute="String Char" context="CharClose" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4})|" />
0304 <IncludeRules context="FindSingleChar"/>
0305 </context>
0306
0307 <context name="Char32" attribute="Char" lineEndContext="#pop" fallthroughContext="CharClose">
0308 <RegExpr attribute="String Char" context="CharClose" 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})|" />
0309 <IncludeRules context="FindSingleChar"/>
0310 </context>
0311
0312
0313 <context name="FindSingleChar" attribute="Char" lineEndContext="#pop">
0314 <DetectChar attribute="Error" context="#pop" char="'" />
0315 <RegExpr attribute="Char" context="CharClose" String="." />
0316 </context>
0317 <context name="CharClose" attribute="Error" lineEndContext="#pop#pop">
0318 <DetectChar attribute="Char" context="#pop#pop" char="'" />
0319 </context>
0320
0321
0322 <context name="FindComments" attribute="Normal Text" lineEndContext="#pop">
0323 <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="/" lookAhead="true" />
0324 <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" />
0325 </context>
0326
0327 <context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop">
0328 <StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" />
0329 <StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" />
0330 <IncludeRules context="##Doxygen" />
0331 <Detect2Chars attribute="Comment" context="#pop!Commentar 1" char="/" char1="/" />
0332 <Detect2Chars attribute="Comment" context="#pop!Commentar 2" char="/" char1="*" beginRegion="Comment" />
0333 </context>
0334
0335 <context attribute="Region Marker" lineEndContext="#pop" name="Region Marker">
0336 </context>
0337
0338 <context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
0339 <LineContinue attribute="Comment" context="#stay"/>
0340 <IncludeRules context="##Comments" />
0341 </context>
0342
0343 <context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
0344 <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
0345 <IncludeRules context="##Comments" />
0346 </context>
0347
0348
0349 <context name="string special char" attribute="String" lineEndContext="#pop">
0350 <HlCStringChar attribute="String Char"/>
0351 <RegExpr attribute="String Char" String="\\(?:u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})|&printf_like;"/>
0352 <DetectChar attribute="String" char="%"/>
0353 <RegExpr attribute="Error" String="\\(?:u[^"]{0,3}|U[^"]{0,7}|.)"/>
0354 <LineContinue attribute="Symbol"/>
0355 </context>
0356
0357 <context name="string normal char" attribute="String" lineEndContext="#pop">
0358 <!-- fast way, can be replaced by a `UntilChars` rule if it exists -->
0359 <!-- % -> printf format -->
0360 <RegExpr attribute="String" context="#stay" String="[^%\\"]+" />
0361 <DetectChar attribute="String" context="#pop" char=""" />
0362 </context>
0363
0364
0365 <context attribute="Error" lineEndContext="#pop" name="AfterHash" fallthroughContext="#pop!LineError">
0366 <RegExpr attribute="Preprocessor" context="#pop!PreprocessorCmd" String="&pphash;(?=.)|" firstNonSpace="true" />
0367 </context>
0368
0369 <context name="LineError" attribute="Error" lineEndContext="#pop">
0370 <LineContinue attribute="Error" context="#stay" />
0371 <RegExpr attribute="Error" context="#stay" String="[^\\]+" />
0372 </context>
0373
0374 <context attribute="Error" lineEndContext="#pop" name="PreprocessorCmd" fallthroughContext="#pop!LineError">
0375 <WordDetect attribute="Preprocessor" context="#pop!Include" String="include" insensitive="true" />
0376
0377 <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="ifdef" beginRegion="PP" lookAhead="true" insensitive="true" />
0378 <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="ifndef" beginRegion="PP" lookAhead="true" insensitive="true" />
0379 <RegExpr attribute="Preprocessor" context="#pop!Outscoped" String="if\s+0\s*$|" beginRegion="PP" />
0380 <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="if" beginRegion="PP" lookAhead="true" insensitive="true" />
0381 <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="elif" endRegion="PP" beginRegion="PP" lookAhead="true" insensitive="true" />
0382 <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="else" endRegion="PP" beginRegion="PP" insensitive="true" />
0383 <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="endif" endRegion="PP" insensitive="true" />
0384 <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="elifdef" endRegion="PP" beginRegion="PP" lookAhead="true" insensitive="true" />
0385 <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="elifndef" endRegion="PP" beginRegion="PP" lookAhead="true" insensitive="true" />
0386
0387 <WordDetect attribute="Preprocessor" context="#pop!Define" String="define"/>
0388
0389 <!-- folding for apple style #pragma mark - label -->
0390 <RegExpr attribute="Preprocessor" context="#pop" String="&pphash;pragma\s+mark\s+-\s*|" insensitive="true" endRegion="pragma_mark" />
0391 <RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;pragma\s+mark|" insensitive="true" endRegion="pragma_mark" beginRegion="pragma_mark" />
0392
0393 <keyword attribute="Preprocessor" context="#pop!Preprocessor" String="preprocessor" />
0394 <!-- GCC extension -->
0395 <WordDetect attribute="Preprocessor" context="#pop!Include" String="include_next" />
0396 <Int attribute="Preprocessor" context="#pop!Preprocessor"/>
0397 </context>
0398
0399 <context attribute="Preprocessor" lineEndContext="#pop" name="Include">
0400 <DetectSpaces />
0401 <RangeDetect attribute="Prep. Lib" context="#stay" char=""" char1="""/>
0402 <RangeDetect attribute="Prep. Lib" context="#stay" char="<" char1=">"/>
0403 <IncludeRules context="Preprocessor" />
0404 <DetectIdentifier/>
0405 </context>
0406
0407 <context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor">
0408 <LineContinue attribute="Symbol" context="#stay"/>
0409 <IncludeRules context="FindComments" />
0410 </context>
0411
0412 <context name="Define" attribute="Preprocessor" lineEndContext="#pop">
0413 <DetectSpaces/>
0414 <IncludeRules context="InPreprocessor" />
0415 <Detect2Chars attribute="Error" context="#pop!LineError" char="/" char1="/" />
0416 <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" />
0417 <IncludeRules context="GNUMacros##GCCExtensions" />
0418 <DetectIdentifier attribute="Preprocessor" context="#pop!In Define"/>
0419 </context>
0420
0421 <context name="In Define" attribute="Preprocessor" lineEndContext="#pop">
0422 <DetectSpaces/>
0423 <LineContinue attribute="Symbol" context="#stay" />
0424 <!-- Match symbols (partial for fast path) -->
0425 <AnyChar attribute="Symbol" context="#stay" String="#:(){}]+-*%=>!|&~^,;" />
0426
0427 <IncludeRules context="match keywords" />
0428 <AnyChar context="SelectStringPP" String="UuLR"'" lookAhead="1"/>
0429 <DetectIdentifier />
0430
0431 <!-- Detect attributes -->
0432 <Detect2Chars attribute="Symbol" context="Attribute In PP" char="[" char1="[" />
0433 <StringDetect attribute="Symbol" context="Attribute In PP" String="<:<:" /> <!-- Digraph: [[ -->
0434
0435 <!-- Match numbers -->
0436 <RegExpr context="Number" String="\.?\d" lookAhead="1" />
0437
0438 <IncludeRules context="FindComments" />
0439 <AnyChar attribute="Symbol" context="#stay" String="#&symbols;"/>
0440 </context>
0441
0442 <context name="Attribute In PP" attribute="Attribute" lineEndContext="#pop">
0443 <IncludeRules context="InPreprocessor" />
0444 <IncludeRules context="Attribute" />
0445 </context>
0446
0447 <context name="InPreprocessor" attribute="Normal Text" lineEndContext="#pop">
0448 <LineContinue attribute="Symbol" context="#stay" />
0449 <DetectChar attribute="Error" context="#stay" char="\" />
0450 </context>
0451
0452 <context attribute="Comment" lineEndContext="#stay" name="Outscoped" >
0453 <DetectSpaces />
0454 <IncludeRules context="##Comments" />
0455 <DetectIdentifier />
0456 <DetectChar attribute="String" context="String8" char="""/>
0457 <IncludeRules context="FindComments" />
0458 <RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if|" beginRegion="PP" firstNonSpace="true" />
0459 <RegExpr attribute="Preprocessor" context="#pop" String="&pphash;el(?:se|if(n?def)?)|" firstNonSpace="true" />
0460 <RegExpr attribute="Preprocessor" context="#pop" String="&pphash;endif|" endRegion="PP" firstNonSpace="true" />
0461 </context>
0462
0463 <context attribute="Comment" lineEndContext="#stay" name="Outscoped intern">
0464 <DetectSpaces />
0465 <IncludeRules context="##Comments" />
0466 <DetectIdentifier />
0467 <DetectChar attribute="String" context="String8" char="""/>
0468 <IncludeRules context="FindComments" />
0469 <RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if|" beginRegion="PP" firstNonSpace="true" />
0470 <RegExpr attribute="Comment" context="#pop" String="&pphash;endif|" endRegion="PP" firstNonSpace="true" />
0471 </context>
0472
0473
0474 <context name="Number" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop">
0475 <WordDetect attribute="Decimal" context="IntSuffix" String="0" weakDeliminator="."/>
0476 <RegExpr attribute="Float" context="FloatSuffix" String="\.∫&exp_float;?|0[xX](?:\.&hex_int;&exp_hexfloat;?|&hex_int;(?:&exp_hexfloat;|\.&hex_int;?&exp_hexfloat;?))|∫(?:&exp_float;|\.∫?&exp_float;?)" />
0477 <IncludeRules context="Integer" />
0478 </context>
0479
0480 <context name="Integer" attribute="Normal Text" lineEndContext="#pop">
0481 <DetectChar context="#pop!IntStartsWith0" char="0" lookAhead="1"/>
0482 <RegExpr attribute="Decimal" context="IntSuffix" String="∫" />
0483 <RegExpr attribute="Error" context="#pop" String="[._0-9A-Za-z']++" />
0484 </context>
0485 <context name="IntStartsWith0" attribute="Normal Text" lineEndContext="#pop">
0486 <RegExpr attribute="Hex" context="IntSuffix" String="0[xX]&hex_int;" />
0487 <RegExpr attribute="Binary" context="IntSuffix" String="0[Bb][01](?:'?[01]++)*+" />
0488 <RegExpr attribute="Octal" context="IntSuffix" String="0(?:'?[0-7]++)++" />
0489 <DetectChar attribute="Decimal" context="IntSuffix" char="0"/>
0490 </context>
0491
0492 <context name="IntSuffix" attribute="Error" lineEndContext="#pop#pop" fallthroughContext="NumericSuffixError">
0493 <DetectChar attribute="Error" context="#stay" char="'" />
0494 <!-- https://en.cppreference.com/w/c/language/integer_constant#The_type_of_the_integer_constant -->
0495 <RegExpr attribute="Standard Suffix" context="NumericSuffixError" String="([Uu](LL?|ll?|wb|WB)?|(LL?|ll?|wb|WB)[Uu]?)\b"/>
0496 </context>
0497
0498 <context name="FloatSuffix" attribute="Error" lineEndContext="#pop#pop" fallthroughContext="NumericSuffixError">
0499 <DetectChar attribute="Error" context="#stay" char="'" />
0500 <!-- https://en.cppreference.com/w/c/language/floating_constant#Suffixes -->
0501 <AnyChar attribute="Standard Suffix" context="NumericSuffixError" String="fFlL"/>
0502 <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="d" char1="f"/>
0503 <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="D" char1="F"/>
0504 <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="d" char1="d"/>
0505 <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="D" char1="D"/>
0506 <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="d" char1="l"/>
0507 <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="D" char1="L"/>
0508 </context>
0509
0510 <context name="NumericSuffixError" attribute="Error" lineEndContext="#pop#pop#pop" fallthroughContext="#pop#pop#pop">
0511 <AnyChar attribute="Error" String=".'0123456789"/>
0512 <DetectIdentifier attribute="Error"/>
0513 </context>
0514
0515 <context name="Attribute" attribute="Attribute" lineEndContext="#stay">
0516 <DetectSpaces/>
0517 <keyword attribute="Standard Attribute" context="#stay" String="attributes" />
0518 <Detect2Chars attribute="Symbol" context="#pop" char="]" char1="]" />
0519 <StringDetect attribute="Symbol" context="#pop" String=":>:>" /> <!-- Digraph: ]] -->
0520 <AnyChar attribute="Symbol" context="#stay" String="&symbols;" />
0521 <!-- Attributes may contain some text: [[deprecated("Reason text")]] -->
0522 <DetectChar attribute="String" context="String8" char=""" />
0523 <AnyChar attribute="Decimal" context="Integer" String="0123456789" lookAhead="true" />
0524 <IncludeRules context="DetectGccAttributes##GCCExtensions" />
0525 <DetectIdentifier />
0526 </context>
0527
0528 </contexts>
0529 <itemDatas>
0530 <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
0531 <itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false"/>
0532 <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
0533 <itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/>
0534 <itemData name="Attribute" defStyleNum="dsAttribute" spellChecking="false"/>
0535 <itemData name="Standard Attribute" defStyleNum="dsAttribute" spellChecking="false"/>
0536 <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
0537 <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>
0538 <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
0539 <itemData name="Binary" defStyleNum="dsBaseN" spellChecking="false"/>
0540 <itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
0541 <itemData name="Standard Suffix" defStyleNum="dsBuiltIn" spellChecking="false" />
0542 <itemData name="Char" defStyleNum="dsChar" spellChecking="false"/>
0543 <itemData name="Char Literal Prefix" defStyleNum="dsChar" spellChecking="false" />
0544 <itemData name="String" defStyleNum="dsString"/>
0545 <itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="false"/>
0546 <itemData name="String Literal Prefix" defStyleNum="dsString" spellChecking="true" />
0547 <itemData name="Comment" defStyleNum="dsComment"/>
0548 <itemData name="Symbol" defStyleNum="dsOperator" spellChecking="false"/>
0549 <itemData name="Preprocessor" defStyleNum="dsPreprocessor" spellChecking="false"/>
0550 <itemData name="Prep. Lib" defStyleNum="dsImport" spellChecking="false"/>
0551 <itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false"/>
0552 <itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
0553 </itemDatas>
0554 </highlighting>
0555 <general>
0556 <comments>
0557 <comment name="singleLine" start="//" position="afterwhitespace" />
0558 <comment name="multiLine" start="/*" end="*/" region="Comment" />
0559 </comments>
0560 <keywords casesensitive="1" additionalDeliminator="#'"" />
0561 </general>
0562 </language>
0563 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->