Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/isocpp.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd" | 2 | <!DOCTYPE language SYSTEM "language.dtd" | ||
3 | [ | 3 | [ | ||
4 | <!ENTITY space " "> | 4 | <!ENTITY int "(?:[0-9](?:'?[0-9]+)*)"> | ||
5 | <!ENTITY separators ",;"> | 5 | <!ENTITY hex_int "(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f]+)*)"> | ||
6 | <!ENTITY ns_punctuators "!%&space;&()+-/.*<=>?[]{|}~^&separators;"> | 6 | <!ENTITY exp_float "(?:[eE][+-]?∫)"> | ||
7 | <!ENTITY exp_hexfloat "(?:[pP][-+]?∫)"> | ||||
8 | | ||||
9 | <!ENTITY separators ",;"> | ||||
10 | <!ENTITY ns_punctuators "(){}[].+-/*%=<>!|&?~^"> | ||||
7 | <!ENTITY punctuators ":&ns_punctuators;"> | 11 | <!ENTITY punctuators ":&ns_punctuators;"> | ||
12 | | ||||
8 | <!-- printf-like format strings conversion specifiers --> | 13 | <!-- printf-like format strings conversion specifiers --> | ||
9 | <!ENTITY convspec "diouxXeEfFgGaAcspn%"> | 14 | <!ENTITY printf_like "%(?:ll?|[zjtL]|hh?)?[diouxXeEfFgGaAcspn%]"> | ||
15 | | ||||
16 | <!ENTITY ispphash "(?:#|%\:|\?\?=)"> | ||||
17 | <!ENTITY pphash "&ispphash;\s*"> | ||||
18 | <!ENTITY ppemptypp "($|(?=(/\*([^*]|\*[^/])*\*/\s*)?(//.*)?$))"> | ||||
19 | <!ENTITY ppcond0 "\s+(?:0|false)\s*&ppemptypp;"> | ||||
20 | <!ENTITY ppcond1 "\s+(?:1|true)\s*(\|\|([^/]|/[^*/])+)?&ppemptypp;"> | ||||
10 | ]> | 21 | ]> | ||
11 | <language | 22 | <language | ||
12 | name="ISO C++" | 23 | name="ISO C++" | ||
13 | section="Sources" | 24 | section="Sources" | ||
14 | version="12" | 25 | version="13" | ||
15 | kateversion="5.0" | 26 | kateversion="5.0" | ||
16 | indenter="cstyle" | 27 | indenter="cstyle" | ||
17 | style="C++" | 28 | style="C++" | ||
18 | mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr" | 29 | mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr" | ||
19 | extensions="*.c++;*.cxx;*.cpp;*.cc;*.C;*.h;*.hh;*.H;*.h++;*.hxx;*.hpp;*.hcc;*.moc" | 30 | extensions="*.c++;*.cxx;*.cpp;*.cc;*.C;*.h;*.hh;*.H;*.h++;*.hxx;*.hpp;*.hcc;*.moc" | ||
20 | author="Alex Turbov (i.zaufi@gmail.com)" | 31 | author="Alex Turbov (i.zaufi@gmail.com)" | ||
21 | license="LGPL" | 32 | license="LGPL" | ||
22 | priority="6" | 33 | priority="6" | ||
Show All 22 Lines | 41 | <list name="controlflow"> | |||
45 | <item>while</item> | 56 | <item>while</item> | ||
46 | </list> | 57 | </list> | ||
47 | <list name="keywords"> | 58 | <list name="keywords"> | ||
48 | <item>alignof</item> | 59 | <item>alignof</item> | ||
49 | <item>alignas</item> | 60 | <item>alignas</item> | ||
50 | <item>asm</item> | 61 | <item>asm</item> | ||
51 | <item>auto</item> | 62 | <item>auto</item> | ||
52 | <item>class</item> | 63 | <item>class</item> | ||
64 | <item>concept</item> <!-- C++20 --> | ||||
65 | <item>requires</item> <!-- C++20 --> | ||||
53 | <item>constexpr</item> | 66 | <item>constexpr</item> | ||
54 | <item>const_cast</item> | 67 | <item>const_cast</item> | ||
55 | <item>decltype</item> | 68 | <item>decltype</item> | ||
56 | <item>delete</item> | 69 | <item>delete</item> | ||
57 | <item>dynamic_cast</item> | 70 | <item>dynamic_cast</item> | ||
58 | <item>enum</item> | 71 | <item>enum</item> | ||
59 | <item>explicit</item> | 72 | <item>explicit</item> | ||
60 | <item>export</item> <!-- Unused but reserved for future use --> | 73 | <item>export</item> <!-- Unused but reserved for future use --> | ||
Show All 31 Lines | |||||
92 | <item>bitor</item> | 105 | <item>bitor</item> | ||
93 | <item>compl</item> | 106 | <item>compl</item> | ||
94 | <item>not</item> | 107 | <item>not</item> | ||
95 | <item>not_eq</item> | 108 | <item>not_eq</item> | ||
96 | <item>or</item> | 109 | <item>or</item> | ||
97 | <item>or_eq</item> | 110 | <item>or_eq</item> | ||
98 | <item>xor</item> | 111 | <item>xor</item> | ||
99 | <item>xor_eq</item> | 112 | <item>xor_eq</item> | ||
113 | <!-- TM TS --> | ||||
114 | <!-- <list>atomic_cancel</list> | ||||
115 | <list>atomic_commit</list> | ||||
116 | <list>atomic_noexcept</list> | ||||
117 | <list>synchronized</list> | ||||
118 | <list>transaction_safe</list> | ||||
119 | <list>transaction_safe_dynamic</list> --> | ||||
120 | <!-- module TS --> | ||||
121 | <!-- <list>import</list> | ||||
122 | <list>module</list> --> | ||||
123 | <!-- coroutine TS --> | ||||
124 | <!-- <list>co_await</list> | ||||
125 | <list>co_return</list> | ||||
126 | <list>co_yield</list> --> | ||||
100 | </list> | 127 | </list> | ||
101 | <!-- This keyword may appear in InternalsNS context. For example in code: | 128 | <!-- This keyword may appear in InternalsNS context. For example in code: | ||
102 | details::some_class::template some_templated_static(); | 129 | details::some_class::template some_templated_static(); | ||
103 | and it should be displayed as keyword, not like part of details namespace... | 130 | and it should be displayed as keyword, not like part of details namespace... | ||
104 | --> | 131 | --> | ||
105 | <list name="template"> | 132 | <list name="template"> | ||
106 | <item>template</item> | 133 | <item>template</item> | ||
107 | </list> | 134 | </list> | ||
108 | 135 | | |||
109 | <!-- 7.6 Attributes --> | 136 | <!-- 7.6 Attributes --> | ||
137 | <!-- http://en.cppreference.com/w/cpp/language/attributes --> | ||||
110 | <list name="attributes"> | 138 | <list name="attributes"> | ||
111 | <!-- C++11 --> | 139 | <!-- C++11 --> | ||
112 | <item>noreturn</item> | 140 | <item>noreturn</item> | ||
113 | <item>carries_dependency</item> | 141 | <item>carries_dependency</item> | ||
114 | <!-- C++1y --> | 142 | <!-- C++14 --> | ||
115 | <item>deprecated</item> | 143 | <item>deprecated</item> | ||
144 | <!-- C++17 --> | ||||
145 | <item>fallthrough</item> | ||||
146 | <item>nodiscard</item> | ||||
147 | <item>maybe_unused</item> | ||||
148 | <!-- C++20 --> | ||||
149 | <item>likely</item> | ||||
150 | <item>unlikely</item> | ||||
151 | <item>no_unique_address</item> | ||||
152 | <!-- TM TS --> | ||||
153 | <!-- <item>optimize_for_synchronized</item> --> | ||||
154 | </list> | ||||
155 | <!-- This keyword may appear in Attribute context. For example in code: | ||||
156 | [[using CC: opt(1), debug]] | ||||
157 | and it should be displayed as keyword, not like part of attribute... | ||||
158 | --> | ||||
159 | <list name="using"> | ||||
160 | <item>using</item> | ||||
116 | </list> | 161 | </list> | ||
117 | 162 | | |||
118 | <list name="types"> | 163 | <list name="types"> | ||
119 | <item>bool</item> | 164 | <item>bool</item> | ||
120 | <item>char</item> | 165 | <item>char</item> | ||
121 | <item>char16_t</item> | 166 | <item>char16_t</item> | ||
122 | <item>char32_t</item> | 167 | <item>char32_t</item> | ||
123 | <item>double</item> | 168 | <item>double</item> | ||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 215 | <list name="modifiers"> | |||
171 | <item>const</item> | 216 | <item>const</item> | ||
172 | <item>extern</item> | 217 | <item>extern</item> | ||
173 | <item>mutable</item> | 218 | <item>mutable</item> | ||
174 | <item>register</item> | 219 | <item>register</item> | ||
175 | <item>static</item> | 220 | <item>static</item> | ||
176 | <item>thread_local</item> | 221 | <item>thread_local</item> | ||
177 | <item>volatile</item> | 222 | <item>volatile</item> | ||
178 | </list> | 223 | </list> | ||
224 | <!-- http://en.cppreference.com/w/cpp/preprocessor/replace --> | ||||
179 | <list name="StdMacros"> | 225 | <list name="StdMacros"> | ||
226 | <item>__DATE__</item> | ||||
180 | <item>__FILE__</item> | 227 | <item>__FILE__</item> | ||
181 | <item>__LINE__</item> | 228 | <item>__LINE__</item> | ||
182 | <item>__DATE__</item> | 229 | <item>__STDCPP_DEFAULT_NEW_ALIGNMENT__</item> | ||
183 | <item>__TIME__</item> | 230 | <item>__STDCPP_STRICT_POINTER_SAFETY__</item> | ||
184 | <item>__STDC__</item> | 231 | <item>__STDCPP_THREADS__</item> | ||
185 | <item>__STDC_VERSION__</item> | | |||
186 | <item>__STDC_HOSTED__</item> | 232 | <item>__STDC_HOSTED__</item> | ||
187 | <item>__STDC_ISO_10646__</item> | 233 | <item>__STDC_ISO_10646__</item> | ||
188 | <item>__STDC_MB_MIGHT_NEQ_WC__</item> | 234 | <item>__STDC_MB_MIGHT_NEQ_WC__</item> | ||
235 | <item>__STDC_VERSION__</item> | ||||
236 | <item>__STDC__</item> | ||||
237 | <item>__TIME__</item> | ||||
189 | <item>__cplusplus</item> | 238 | <item>__cplusplus</item> | ||
190 | <item>__func__</item> | 239 | <item>__func__</item> | ||
240 | <item>assert</item> | ||||
241 | <item>_Pragma</item> | ||||
242 | <item>__has_include</item> | ||||
243 | </list> | ||||
244 | <list name="InMacro"> | ||||
245 | <item>__VA_ARGS__</item> | ||||
246 | <item>__VA_OPT__</item> | ||||
247 | </list> | ||||
248 | <list name="preprocessorIf"> | ||||
249 | <item>if</item> | ||||
250 | </list> | ||||
251 | <list name="preprocessorIfDef"> | ||||
252 | <item>ifdef</item> | ||||
253 | <item>ifndef</item> | ||||
254 | </list> | ||||
255 | <list name="preprocessorElseIf"> | ||||
256 | <item>elif</item> | ||||
257 | </list> | ||||
258 | <list name="preprocessorElse"> | ||||
259 | <item>else</item> | ||||
260 | </list> | ||||
261 | <list name="preprocessorEndIf"> | ||||
262 | <item>endif</item> | ||||
263 | </list> | ||||
264 | <list name="preprocessorDefine"> | ||||
265 | <item>cmakedefine01</item> | ||||
266 | <item>cmakedefine</item> | ||||
267 | <item>define</item> | ||||
268 | </list> | ||||
269 | <list name="preprocessorInclude"> | ||||
270 | <item>include</item> | ||||
271 | </list> | ||||
272 | <list name="preprocessorOther"> | ||||
273 | <item>error</item> | ||||
274 | <item>line</item> | ||||
275 | <item>pragma</item> | ||||
276 | <item>undef</item> | ||||
277 | <item>warning</item> | ||||
191 | </list> | 278 | </list> | ||
192 | 279 | | |||
193 | <contexts> | 280 | <contexts> | ||
194 | <context name="Normal" attribute="Normal Text" lineEndContext="#stay"> | | |||
195 | <DetectSpaces /> | | |||
196 | <RegExpr attribute="Preprocessor" context="Outscoped" String="(#|%\:|\?\?=)\s*if\s+(0|false)\s*" beginRegion="PP" firstNonSpace="true" insensitive="false" /> | | |||
197 | <RegExpr attribute="Preprocessor" context="Inscoped" String="(#|%\:|\?\?=)\s*if\s+(1|true)\s*" beginRegion="PP" firstNonSpace="true" insensitive="false" /> | | |||
198 | <IncludeRules context="Main" /> | | |||
199 | </context> | | |||
200 | | ||||
201 | <context name="Main" attribute="Normal Text" lineEndContext="#stay"> | 281 | <context name="Main" attribute="Normal Text" lineEndContext="#stay"> | ||
202 | <!-- Match preprocessor directives --> | 282 | <DetectSpaces/> | ||
203 | <DetectChar context="AfterHash" char="#" firstNonSpace="true" lookAhead="true" /> | 283 | <!-- Match scope regions --> | ||
204 | <Detect2Chars context="AfterHash" char="%" char1=":" firstNonSpace="true" lookAhead="true" /> | 284 | <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" /> | ||
205 | <StringDetect context="AfterHash" String="??=" firstNonSpace="true" lookAhead="true" /> | 285 | <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" /> | ||
206 | <Detect2Chars attribute="Error" context="#stay" char="%" char1=":" /> | | |||
207 | <StringDetect attribute="Error" String="??=" context="#stay" /> | | |||
208 | <!-- Match special comments for region markers --> | | |||
209 | <StringDetect attribute="Region Marker" context="Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" /> | | |||
210 | <StringDetect attribute="Region Marker" context="Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" /> | | |||
211 | <!-- ATTENTION Special case `operator""` cuz Kate doesn't recognize | | |||
212 | `operator` joined w/ quotes as a keyword here. BUG?? | | |||
213 | --> | | |||
214 | <RegExpr attribute="Normal Text" context="UDLOperator" String="operator\s*"" _[_0-9A-Za-z]*\b" lookAhead="true" /> | | |||
215 | <RegExpr attribute="Error" context="#stay" String="operator\s*"" [_0-9A-Za-z]*\b" /> | | |||
216 | <!-- Match keywords --> | | |||
217 | <keyword attribute="Control Flow" context="#stay" String="controlflow" /> | | |||
218 | <keyword attribute="Keyword" context="#stay" String="keywords" /> | | |||
219 | <!-- Detect attributes --> | 286 | <!-- Detect attributes --> | ||
220 | <Detect2Chars attribute="Symbol" context="Attribute" char="[" char1="[" /> | 287 | <Detect2Chars attribute="Symbol" context="Attribute" char="[" char1="[" /> | ||
221 | <!-- Match numbers --> | 288 | <!-- Match numbers --> | ||
222 | <!-- ATTENTION Builtin number detectors have strange behaviour and definitely lack of required features --> | 289 | <RegExpr attribute="Decimal" context="Number" String="\.?[0-9]" lookAhead="true" /> | ||
223 | <!-- NOTE Order is important! --> | 290 | <!-- Match comments --> | ||
224 | <RegExpr attribute="Hex" context="#stay" String="[\+\-]?0x[0-9A-Fa-f]('?[0-9A-Fa-f]+)*([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" /> | 291 | <IncludeRules context="match comments and region markers" /> | ||
225 | <RegExpr attribute="Binary" context="#stay" String="0[Bb][01]('?[01]+)*([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" /> | 292 | <!-- Match punctuators --> | ||
226 | <Float attribute="Float" context="#stay"> | 293 | <AnyChar attribute="Separator Symbol" context="#stay" String="&separators;" /> | ||
227 | <AnyChar String="FfLl" attribute="Float" context="#stay"/> | 294 | <AnyChar attribute="Symbol" context="#stay" String="&punctuators;" /> | ||
228 | </Float> | 295 | <!-- Match keywords --> | ||
229 | <RegExpr attribute="Octal" context="#stay" String="[\+\-]?0'?[0-7]('?[0-7]+)*([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" /> | 296 | <IncludeRules context="match keywords" /> | ||
230 | <RegExpr attribute="Decimal" context="#stay" String="[\+\-]?(0|[1-9]('?[0-9]+)*)([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" /> | | |||
231 | <RegExpr attribute="Error" context="#stay" String="[\+\-]?(0x?|[1-9][0-9]*)[0-9A-Za-z][_0-9A-Za-z]*\b" /> | | |||
232 | <!-- Match string literals --> | 297 | <!-- Match string literals --> | ||
233 | <DetectChar attribute="String" context="String" char=""" /> | 298 | <IncludeRules context="match string" /> | ||
234 | <Detect2Chars attribute="String" context="String" char="U" char1=""" /> | | |||
235 | <Detect2Chars attribute="String" context="String" char="u" char1=""" /> | | |||
236 | <Detect2Chars attribute="String" context="String" char="L" char1=""" /> | | |||
237 | <StringDetect attribute="String" context="String" String="u8"" /> | | |||
238 | <RegExpr attribute="String" context="RawString" String="(u|u8|U|L)?R"([^\(]{0,16})\(" lookAhead="true" /> | | |||
239 | <RegExpr attribute="Error" context="#stay" String="(u|u8|U|L)?R"([^\(]{16,})\(" /> | | |||
240 | <DetectChar attribute="Char" context="Char Literal" char="'" /> | | |||
241 | <Detect2Chars attribute="Char" context="Char Literal" char="L" char1="'" /> | | |||
242 | <Detect2Chars attribute="Char" context="U-Char Literal" char="u" char1="'" /> | | |||
243 | <Detect2Chars attribute="Char" context="U-Char Literal" char="U" char1="'" /> | | |||
244 | <!-- Match GCC extensions --> | 299 | <!-- Match GCC extensions --> | ||
245 | <IncludeRules context="DetectGccExtensions##GCCExtensions" /> | 300 | <IncludeRules context="DetectGccExtensions##GCCExtensions" /> | ||
246 | <!-- Match most used namespaces and styles --> | 301 | <!-- Match most used namespaces and styles --> | ||
247 | <StringDetect attribute="Standard Classes" context="Standard Classes" String="std::" /> | 302 | <StringDetect attribute="Standard Classes" context="Standard Classes" String="std::" /> | ||
248 | <StringDetect attribute="Boost Stuff" context="Boost Stuff" String="boost::" /> | 303 | <StringDetect attribute="Boost Stuff" context="Boost Stuff" String="boost::" /> | ||
249 | <StringDetect attribute="Boost Stuff" context="Boost Stuff" String="BOOST_" /> | 304 | <StringDetect attribute="Boost Stuff" context="Boost Stuff" String="BOOST_" /> | ||
250 | <StringDetect attribute="Internals" context="InternalsNS" String="detail::" /> | 305 | <StringDetect attribute="Internals" context="InternalsNS" String="detail::" /> | ||
251 | <StringDetect attribute="Internals" context="InternalsNS" String="details::" /> | 306 | <StringDetect attribute="Internals" context="InternalsNS" String="details::" /> | ||
252 | <StringDetect attribute="Internals" context="InternalsNS" String="aux::" /> | 307 | <StringDetect attribute="Internals" context="InternalsNS" String="aux::" /> | ||
253 | <StringDetect attribute="Internals" context="InternalsNS" String="internals::" /> | 308 | <StringDetect attribute="Internals" context="InternalsNS" String="internals::" /> | ||
309 | <IncludeRules context="match identifier" /> | ||||
310 | <!-- Match preprocessor directives --> | ||||
311 | <RegExpr attribute="Preprocessor" context="AfterHash" String="&ispphash;" lookAhead="true" /> | ||||
312 | <!-- Match invalid symbols --> | ||||
313 | <AnyChar attribute="Error" context="#stay" String="$@`" /> | ||||
314 | </context> | ||||
315 | | ||||
316 | <context name="match comments" attribute="Normal Text" lineEndContext="#pop"> | ||||
317 | <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="/" lookAhead="true"/> | ||||
318 | <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" /> | ||||
319 | </context> | ||||
320 | | ||||
321 | <context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||||
322 | <IncludeRules context="##Doxygen" /> | ||||
323 | <Detect2Chars attribute="Comment" context="#pop!Comment 1" char="/" char1="/" /> | ||||
324 | <Detect2Chars attribute="Comment" context="#pop!Comment 2" char="/" char1="*" beginRegion="Comment" /> | ||||
325 | </context> | ||||
326 | | ||||
327 | <context name="match comments and region markers" attribute="Normal Text" lineEndContext="#pop"> | ||||
328 | <Detect2Chars attribute="Comment" context="MatchCommentAndRegionMarkers" char="/" char1="/" lookAhead="true"/> | ||||
329 | <Detect2Chars attribute="Comment" context="MatchCommentAndRegionMarkers" char="/" char1="*" lookAhead="true" /> | ||||
330 | </context> | ||||
331 | | ||||
332 | <context name="MatchCommentAndRegionMarkers" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||||
333 | <StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" /> | ||||
334 | <StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" /> | ||||
335 | <IncludeRules context="MatchComment" /> | ||||
336 | </context> | ||||
337 | | ||||
338 | <context name="match keywords" attribute="Normal Text" lineEndContext="#pop"> | ||||
339 | <WordDetect attribute="Keyword" context="CheckUDLOperator" String="operator" /> | ||||
340 | <keyword attribute="Control Flow" context="#stay" String="controlflow" /> | ||||
341 | <keyword attribute="Keyword" context="#stay" String="keywords" /> | ||||
342 | </context> | ||||
343 | | ||||
344 | <context name="match string" attribute="Normal Text" lineEndContext="#pop"> | ||||
345 | <DetectChar attribute="String" context="String" char=""" /> | ||||
346 | <Detect2Chars attribute="String" context="String32" char="U" char1=""" /> | ||||
347 | <Detect2Chars attribute="String" context="String16" char="u" char1=""" /> | ||||
348 | <Detect2Chars attribute="String" context="String16" char="L" char1=""" /> | ||||
349 | <StringDetect attribute="String" context="String8" String="u8"" /> | ||||
350 | <Detect2Chars attribute="String" context="RawString" char="R" char1=""" /> | ||||
351 | <StringDetect attribute="String" context="RawString" String="uR"" /> | ||||
352 | <StringDetect attribute="String" context="RawString" String="UR"" /> | ||||
353 | <StringDetect attribute="String" context="RawString" String="LR"" /> | ||||
354 | <StringDetect attribute="String" context="RawString" String="u8R"" /> | ||||
355 | <DetectChar attribute="Char" context="Char8 Literal" char="'" /> | ||||
356 | <Detect2Chars attribute="Char" context="Char16 Literal" char="L" char1="'" /> | ||||
357 | <Detect2Chars attribute="Char" context="Char16 Literal" char="u" char1="'" /> | ||||
358 | <Detect2Chars attribute="Char" context="Char32 Literal" char="U" char1="'" /> | ||||
359 | <StringDetect attribute="Char" context="Char8 Literal" String="u8'" /> | ||||
360 | </context> | ||||
361 | | ||||
362 | <context name="match identifier" attribute="Normal Text" lineEndContext="#pop"> | ||||
254 | <keyword attribute="Data Type" context="#stay" String="types" /> | 363 | <keyword attribute="Data Type" context="#stay" String="types" /> | ||
255 | <keyword attribute="Type Modifiers" context="#stay" String="modifiers" /> | 364 | <keyword attribute="Type Modifiers" context="#stay" String="modifiers" /> | ||
256 | <keyword attribute="Standard Macros" context="#stay" String="StdMacros" /> | 365 | <keyword attribute="Standard Macros" context="#stay" String="StdMacros" /> | ||
257 | <RegExpr attribute="Internals" context="#stay" String="_[a-zA-Z0-9_]+" /> | 366 | <RegExpr attribute="Internals" context="#stay" String="_[a-zA-Z0-9_]+|[a-zA-Z][a-zA-Z0-9_]*__\b" /> | ||
258 | <RegExpr attribute="Internals" context="#stay" String="[a-zA-Z][a-zA-Z0-9_]*__\b" /> | 367 | <RegExpr attribute="Data Members (m_*)" context="#stay" String="m_[a-zA-Z0-9_]+|[a-z][a-zA-Z0-9_]*_\b" /> | ||
259 | <RegExpr attribute="Data Members (m_*)" context="#stay" String="[a-z][a-zA-Z0-9_]*_\b" /> | | |||
260 | <RegExpr attribute="Data Members (m_*)" context="#stay" String="m_[a-zA-Z0-9_]+" /> | | |||
261 | <RegExpr attribute="Globals (g_*)" context="#stay" String="g_[a-zA-Z0-9_]+" /> | 368 | <RegExpr attribute="Globals (g_*)" context="#stay" String="g_[a-zA-Z0-9_]+" /> | ||
262 | <RegExpr attribute="Statics (s_*)" context="#stay" String="s_[a-zA-Z0-9_]+" /> | 369 | <RegExpr attribute="Statics (s_*)" context="#stay" String="s_[a-zA-Z0-9_]+" /> | ||
263 | <RegExpr attribute="CONSTS/MACROS" context="#stay" String="[A-Z][A-Z0-9_]{2,}\b" /> | 370 | <RegExpr attribute="CONSTS/MACROS" context="#stay" String="[A-Z][A-Z0-9_]{2,}\b" /> | ||
264 | <RegExpr attribute="Types (*_t/*_type)" context="#stay" String="[a-zA-Z][a-zA-Z0-9_]*_t(ype)?\b" /> | 371 | <RegExpr attribute="Types (*_t/*_type)" context="#stay" String="[a-zA-Z][a-zA-Z0-9_]*_t(ype)?\b" /> | ||
265 | <DetectIdentifier /> | 372 | <DetectIdentifier /> | ||
266 | <!-- Match comments --> | | |||
267 | <IncludeRules context="##Doxygen" /> | | |||
268 | <Detect2Chars attribute="Comment" context="Comment 1" char="/" char1="/" /> | | |||
269 | <Detect2Chars attribute="Comment" context="Comment 2" char="/" char1="*" beginRegion="Comment" /> | | |||
270 | <!-- Match scope regions --> | | |||
271 | <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" /> | | |||
272 | <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" /> | | |||
273 | <!-- Match punctuators --> | | |||
274 | <AnyChar attribute="Separator Symbol" context="#stay" String="&separators;" /> | | |||
275 | <AnyChar attribute="Symbol" context="#stay" String="&punctuators;" /> | | |||
276 | <!-- Match invalid symbols --> | | |||
277 | <DetectChar attribute="Error" context="#stay" char="#" /> | | |||
278 | <DetectChar attribute="Error" context="#stay" char="$" /> | | |||
279 | <DetectChar attribute="Error" context="#stay" char="@" /> | | |||
280 | <DetectChar attribute="Error" context="#stay" char="`" /> | | |||
281 | </context> | 373 | </context> | ||
282 | 374 | | |||
283 | <context name="UDLOperator" attribute="Normal Text" lineEndContext="#pop"> | 375 | <context name="Number" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||
284 | <StringDetect attribute="Keyword" context="#stay" String="operator" /> | 376 | <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;?))" /> | ||
285 | <StringDetect attribute="String" context="#stay" String="""" /> | 377 | <IncludeRules context="Integer" /> | ||
286 | <DetectIdentifier context="#pop" /> | 378 | </context> | ||
379 | | ||||
380 | <context name="Integer" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||||
381 | <RegExpr attribute="Hex" context="IntSuffix" String="0[xX]&hex_int;" /> | ||||
382 | <RegExpr attribute="Binary" context="IntSuffix" String="0[Bb][01](?:'?[01]+)*" /> | ||||
383 | <RegExpr attribute="Octal" context="IntSuffix" String="0(?:'?[0-7]+)+" /> | ||||
384 | <RegExpr attribute="Decimal" context="IntSuffix" String="0(?![xXbB0-9])|[1-9](?:'?[0-9]+)*" /> | ||||
385 | <RegExpr attribute="Error" context="#pop" String="[._0-9A-Za-z']+" /> | ||||
386 | </context> | ||||
387 | | ||||
388 | <context name="IntSuffix" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError"> | ||||
389 | <DetectChar attribute="Error" context="#stay" char="'" /> | ||||
390 | <AnyChar attribute="Error" context="#pop!IntSuffixPattern" String="uUlLimunshyd_" lookAhead="true" /> | ||||
391 | </context> | ||||
392 | | ||||
393 | <context name="IntSuffixPattern" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError"> | ||||
394 | <RegExpr attribute="Standard Suffix" context="NumericSuffixError" String="[Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?" /> | ||||
395 | <RegExpr attribute="Standard Classes" context="NumericSuffixError" String="(?:i[fl]?|min|[mun]?s|[hyd])\b" /> | ||||
396 | <DetectChar attribute="Error" context="#pop!NumericUserSuffixPattern" char="_" lookAhead="true" /> | ||||
287 | </context> | 397 | </context> | ||
288 | 398 | | |||
289 | <context name="Char Literal" attribute="Char" lineEndContext="#pop"> | 399 | <context name="FloatSuffix" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError"> | ||
290 | <IncludeRules context="Universal Char" /> | 400 | <AnyChar attribute="Standard Suffix" context="NumericSuffixError" String="fFlL" /> | ||
291 | <DetectChar attribute="String Char" context="Simple Esc" char="\" /> | 401 | <DetectChar attribute="Error" context="#pop!NumericUserSuffixPattern" char="_" lookAhead="true" /> | ||
292 | <DetectChar attribute="Char" context="#pop" char="'" /> | | |||
293 | </context> | 402 | </context> | ||
294 | 403 | | |||
295 | <context name="U-Char Literal" attribute="Char" lineEndContext="#pop"> | 404 | <context name="NumericUserSuffixPattern" attribute="Error" lineEndContext="#pop#pop"> | ||
296 | <IncludeRules context="Universal Char" /> | 405 | <!-- | ||
297 | <DetectChar attribute="String Char" context="Simple Esc" char="\" /> | 406 | http://en.cppreference.com/w/cpp/language/user_literal#Notes | ||
298 | <DetectChar attribute="Char" context="#pop" char="'" /> | 407 | Due to maximal munch, user-defined integer and floating point literals ending in | ||
299 | <RegExpr attribute="Error" context="#stay" String="[^']{2,}" /> | 408 | p, P, (since C++17) e and E, when followed by the operators + or -, | ||
300 | <RegExpr attribute="Char" context="#stay" String=".{1}" /> | 409 | must be separated from the operator with whitespace or parentheses in the source | ||
410 | --> | ||||
411 | <RegExpr attribute="Error" context="#pop#pop" String="_[eEpP][+-]" /> | ||||
412 | <RegExpr attribute="UDL Numeric Suffix" context="NumericSuffixError" String="_[_[:alnum:]]*" /> | ||||
413 | </context> | ||||
414 | | ||||
415 | <context name="NumericSuffixError" attribute="Error" lineEndContext="#pop#pop#pop" fallthrough="true" fallthroughContext="#pop#pop#pop"> | ||||
416 | <RegExpr attribute="Error" context="#pop#pop#pop" String="\.[_0-9A-Za-z]*|[_0-9A-Za-z]+" /> | ||||
301 | </context> | 417 | </context> | ||
302 | 418 | | |||
303 | <context name="Simple Esc" attribute="String Char" lineEndContext="#pop"> | 419 | <context name="CheckUDLOperator" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||
304 | <AnyChar attribute="String Char" context="#pop" String="tnvbrfa'"\" /> | 420 | <DetectSpaces /> | ||
305 | <RegExpr attribute="String Char" context="#pop" String="[0-7]{1,3}" /> | 421 | <Detect2Chars attribute="String" context="UDLOperatorName" char=""" char1=""" /> | ||
306 | <RegExpr attribute="String Char" context="#pop" String="x[0-9A-Fa-f]{1,}" /> | | |||
307 | <RegExpr attribute="String" context="#pop" String="." /> | | |||
308 | </context> | 422 | </context> | ||
309 | 423 | | |||
310 | <context name="Universal Char" attribute="String Char" lineEndContext="#pop"> | 424 | <context name="UDLOperatorName" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!IdentifierError"> | ||
311 | <RegExpr attribute="String Char" context="#stay" String="\\u[0-9A-Fa-f]{4}" /> | 425 | <DetectSpaces /> | ||
312 | <RegExpr attribute="Error" context="#stay" String="\\u.{0,3}" /> | 426 | <RegExpr attribute="Normal Text" context="#pop#pop" String="_[_[:alnum:]]*\b" /> | ||
313 | <RegExpr attribute="String Char" context="#stay" String="\\U[0-9A-Fa-f]{8}" /> | 427 | </context> | ||
314 | <RegExpr attribute="Error" context="#stay" String="\\U.{0,7}" /> | 428 | | ||
429 | <context name="IdentifierError" attribute="Error" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop#pop"> | ||||
430 | <RegExpr attribute="Error" context="#pop#pop" String=".[^\s()]*" /> | ||||
431 | </context> | ||||
432 | | ||||
433 | | ||||
434 | <context name="Char8 Literal" attribute="Char" lineEndContext="#pop" fallthrough="true" fallthroughContext="Char Literal Close"> | ||||
435 | <RegExpr attribute="String Char" context="Char Literal Close" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})" /> | ||||
436 | <DetectChar attribute="Error" context="#pop" char="'" /> | ||||
437 | <RegExpr attribute="Char" context="Char Literal Close" String="." /> | ||||
315 | </context> | 438 | </context> | ||
316 | 439 | | |||
440 | <context name="Char16 Literal" attribute="Char" lineEndContext="#pop" fallthrough="true" fallthroughContext="Char Literal Close"> | ||||
441 | <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})" /> | ||||
442 | <DetectChar attribute="Error" context="#pop" char="'" /> | ||||
443 | <RegExpr attribute="Char" context="Char Literal Close" String="." /> | ||||
444 | </context> | ||||
445 | | ||||
446 | <context name="Char32 Literal" attribute="Char" lineEndContext="#pop" fallthrough="true" fallthroughContext="Char Literal Close"> | ||||
447 | <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})" /> | ||||
448 | <DetectChar attribute="Error" context="#pop" char="'" /> | ||||
449 | <RegExpr attribute="Char" context="Char Literal Close" String="." /> | ||||
450 | </context> | ||||
451 | | ||||
452 | <context name="Char Literal Close" attribute="Error" lineEndContext="#pop#pop"> | ||||
453 | <DetectChar attribute="Char" context="#pop#pop" char="'" /> | ||||
454 | </context> | ||||
455 | | ||||
456 | | ||||
317 | <context name="String" attribute="String" lineEndContext="#pop"> | 457 | <context name="String" attribute="String" lineEndContext="#pop"> | ||
458 | <IncludeRules context="string normal char" /> | ||||
459 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,8}" /> | ||||
460 | <IncludeRules context="string special char" /> | ||||
461 | </context> | ||||
462 | | ||||
463 | <context name="String8" attribute="String" lineEndContext="#pop"> | ||||
464 | <IncludeRules context="string normal char" /> | ||||
465 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,2}" /> | ||||
466 | <IncludeRules context="string special char" /> | ||||
467 | </context> | ||||
468 | | ||||
469 | <context name="String16" attribute="String" lineEndContext="#pop"> | ||||
470 | <IncludeRules context="string normal char" /> | ||||
471 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,4}" /> | ||||
472 | <IncludeRules context="string special char" /> | ||||
473 | </context> | ||||
474 | | ||||
475 | <context name="String32" attribute="String" lineEndContext="#pop"> | ||||
476 | <IncludeRules context="string normal char" /> | ||||
477 | <RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,8}" /> | ||||
478 | <IncludeRules context="string special char" /> | ||||
479 | </context> | ||||
480 | | ||||
481 | <context name="StringNoHex" attribute="Error" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||||
482 | <RegExpr attribute="Error" context="#pop" String="[0-9A-Fa-f]{1,}" /> | ||||
483 | </context> | ||||
484 | | ||||
485 | <context name="string special char" attribute="String" lineEndContext="#pop"> | ||||
486 | <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;" /> | ||||
487 | <RegExpr attribute="Error" context="#stay" String="\\(?:u[^"]{0,3}|U[^"]{0,7}|.)" /> | ||||
318 | <LineContinue attribute="String" context="#stay" /> | 488 | <LineContinue attribute="String" context="#stay" /> | ||
319 | <HlCStringChar attribute="String Char" context="#stay" /> | 489 | </context> | ||
320 | <IncludeRules context="Universal Char" /> | 490 | | ||
321 | <RegExpr attribute="String Char" context="#stay" String="%[^"&convspec;\s]*[&convspec;]" /> | 491 | <context name="string normal char" attribute="String" lineEndContext="#pop"> | ||
492 | <!-- fast way, can be replaced by a `UntilChars` rule if it exists --> | ||||
493 | <RegExpr attribute="String" context="#stay" String="[^%\\"]+" /> | ||||
322 | <DetectChar attribute="String" context="UDLStringSuffix" char=""" /> | 494 | <DetectChar attribute="String" context="UDLStringSuffix" char=""" /> | ||
323 | </context> | 495 | </context> | ||
324 | 496 | | |||
325 | <context name="UDLStringSuffix" attribute="String" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop"> | 497 | <context name="UDLStringSuffix" attribute="String" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop"> | ||
326 | <!-- Standard UDL is not matched. BUG?? --> | 498 | <WordDetect attribute="Standard Classes" context="#pop#pop" String="sv" /> | ||
327 | <RegExpr attribute="String" context="#pop#pop" String="_[_0-9A-Za-z]*\b" /> | 499 | <WordDetect attribute="Standard Classes" context="#pop#pop" String="s" /> | ||
500 | <RegExpr attribute="UDL String Suffix" context="#pop#pop" String="_[_0-9A-Za-z]*\b" /> | ||||
328 | </context> | 501 | </context> | ||
329 | 502 | | |||
503 | | ||||
330 | <context name="Attribute" attribute="Attribute" lineEndContext="#stay"> | 504 | <context name="Attribute" attribute="Attribute" lineEndContext="#stay"> | ||
331 | <keyword attribute="Standard Attribute" context="#stay" String="attributes" /> | 505 | <keyword attribute="Standard Attribute" context="#stay" String="attributes" /> | ||
332 | <Detect2Chars attribute="Symbol" context="#pop" char="]" char1="]" /> | 506 | <Detect2Chars attribute="Symbol" context="#pop" char="]" char1="]" /> | ||
333 | <AnyChar context="#stay" String="&ns_punctuators;" attribute="Symbol" /> | 507 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||
508 | <AnyChar attribute="Symbol" context="#stay" String="&punctuators;" /> | ||||
334 | <!-- Attributes may contain some text: [[deprecated("Reason text")]] --> | 509 | <!-- Attributes may contain some text: [[deprecated("Reason text")]] --> | ||
335 | <DetectChar attribute="String" context="String" char=""" /> | 510 | <DetectChar attribute="String" context="String" char=""" /> | ||
511 | <AnyChar attribute="Decimal" context="Integer" String="0123456789" lookAhead="true" /> | ||||
512 | <keyword attribute="Keyword" context="AttributeNamespace" String="using" /> | ||||
513 | <IncludeRules context="DetectGccAttributes##GCCExtensions" /> | ||||
514 | <RegExpr attribute="CONSTS/MACROS" context="#stay" String="[A-Z][A-Z0-9_]{2,}\b" /> | ||||
515 | <DetectIdentifier /> | ||||
336 | </context> | 516 | </context> | ||
337 | 517 | | |||
338 | <context name="RawString" attribute="String" lineEndContext="#stay" dynamic="true"> | 518 | <context name="Attribute In PP" attribute="Attribute" lineEndContext="#pop"> | ||
339 | <LineContinue attribute="String" context="#stay" /> | 519 | <IncludeRules context="InPreprocessor" /> | ||
340 | <RegExpr attribute="String Char" context="#stay" String="%[^"&convspec;\s]*[&convspec;]" /> | 520 | <IncludeRules context="Attribute" /> | ||
341 | <RegExpr attribute="String" context="#pop" String="\)%2"" dynamic="true"/> | 521 | </context> | ||
522 | | ||||
523 | <context name="AttributeNamespace" attribute="Attribute" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | ||||
524 | <DetectSpaces /> | ||||
525 | <IncludeRules context="DetectNamespaceGccAttributes##GCCExtensions" /> | ||||
526 | <DetectIdentifier /> | ||||
527 | </context> | ||||
528 | | ||||
529 | <context name="RawString" attribute="String" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!LineError"> | ||||
530 | <RegExpr attribute="String" context="#pop!InRawString" String="([^\(]{0,16})\(" /> | ||||
531 | </context> | ||||
532 | | ||||
533 | <context name="InRawString" attribute="String" lineEndContext="#stay" dynamic="true"> | ||||
534 | <!-- fast way, can be replaced by a `UntilChars` rule if it exists --> | ||||
535 | <RegExpr attribute="String" context="#stay" String="[^%)]+" /> | ||||
536 | <RegExpr attribute="String Char" context="#stay" String="&printf_like;" /> | ||||
537 | <StringDetect attribute="String" context="#pop" String=")%1"" dynamic="true"/> | ||||
342 | </context> | 538 | </context> | ||
343 | 539 | | |||
344 | <context name="Region Marker" attribute="Region Marker" lineEndContext="#pop" /> | 540 | <context name="Region Marker" attribute="Region Marker" lineEndContext="#pop" /> | ||
345 | 541 | | |||
346 | <context name="DetectNSEnd" attribute="Normal Text" lineEndContext="#pop"> | 542 | <context name="DetectNSEnd" attribute="Normal Text" lineEndContext="#stay"> | ||
347 | <keyword attribute="Keyword" context="#stay" String="template" /> | 543 | <keyword attribute="Keyword" context="#stay" String="template" /> | ||
348 | <DetectIdentifier context="#stay" /> | 544 | <DetectIdentifier context="#stay" /> | ||
349 | <AnyChar context="#pop" String="&separators;" attribute="Separator Symbol" /> | 545 | <AnyChar attribute="Separator Symbol" context="#pop" String="&separators;" /> | ||
350 | <AnyChar context="#pop" String="&ns_punctuators;" attribute="Symbol" /> | 546 | <AnyChar attribute="Symbol" context="#pop" String="&ns_punctuators; 	" /> | ||
351 | <AnyChar context="#stay" String="&space;" attribute="Normal Text" /> | 547 | </context> | ||
548 | | ||||
549 | <context name="Standard Classes" attribute="Standard Classes" lineEndContext="#stay"> | ||||
550 | <IncludeRules context="DetectNSEnd" /> | ||||
551 | </context> | ||||
552 | | ||||
553 | <context name="Boost Stuff" attribute="Boost Stuff" lineEndContext="#stay"> | ||||
554 | <IncludeRules context="DetectNSEnd" /> | ||||
352 | </context> | 555 | </context> | ||
353 | 556 | | |||
354 | <context name="Standard Classes" attribute="Standard Classes" lineEndContext="#pop"> | 557 | <context name="InternalsNS" attribute="Internals" lineEndContext="#stay"> | ||
355 | <IncludeRules context="DetectNSEnd" /> | 558 | <IncludeRules context="DetectNSEnd" /> | ||
356 | </context> | 559 | </context> | ||
357 | 560 | | |||
358 | <context name="Boost Stuff" attribute="Boost Stuff" lineEndContext="#pop"> | 561 | <context name="Standard Classes In PP" attribute="Standard Classes" lineEndContext="#pop"> | ||
562 | <IncludeRules context="InPreprocessor" /> | ||||
359 | <IncludeRules context="DetectNSEnd" /> | 563 | <IncludeRules context="DetectNSEnd" /> | ||
360 | </context> | 564 | </context> | ||
361 | 565 | | |||
362 | <context name="InternalsNS" attribute="Internals" lineEndContext="#pop"> | 566 | <context name="Boost Stuff In PP" attribute="Boost Stuff" lineEndContext="#pop"> | ||
567 | <IncludeRules context="InPreprocessor" /> | ||||
568 | <IncludeRules context="DetectNSEnd" /> | ||||
569 | </context> | ||||
570 | | ||||
571 | <context name="InternalsNS In PP" attribute="Internals" lineEndContext="#pop"> | ||||
572 | <IncludeRules context="InPreprocessor" /> | ||||
363 | <IncludeRules context="DetectNSEnd" /> | 573 | <IncludeRules context="DetectNSEnd" /> | ||
364 | </context> | 574 | </context> | ||
365 | 575 | | |||
366 | <context name="Comment 1" attribute="Comment" lineEndContext="#pop"> | 576 | <context name="Comment 1" attribute="Comment" lineEndContext="#pop"> | ||
367 | <LineContinue attribute="Comment" context="#stay" /> | 577 | <LineContinue attribute="Error" context="#stay" /> | ||
368 | <DetectSpaces /> | 578 | <DetectSpaces /> | ||
369 | <IncludeRules context="##Alerts" /> | 579 | <IncludeRules context="##Alerts" /> | ||
370 | <IncludeRules context="##Modelines" /> | 580 | <IncludeRules context="##Modelines" /> | ||
371 | <DetectIdentifier /> | 581 | <DetectIdentifier /> | ||
372 | </context> | 582 | </context> | ||
373 | 583 | | |||
374 | <context name="Comment 2" attribute="Comment" lineEndContext="#stay"> | 584 | <context name="Comment 2" attribute="Comment" lineEndContext="#stay"> | ||
375 | <DetectSpaces /> | 585 | <DetectSpaces /> | ||
376 | <LineContinue attribute="Comment" context="#stay" /> | 586 | <LineContinue attribute="Comment" context="#stay" /> | ||
377 | <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment" /> | 587 | <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment" /> | ||
378 | <IncludeRules context="##Alerts" /> | 588 | <IncludeRules context="##Alerts" /> | ||
379 | <IncludeRules context="##Modelines" /> | 589 | <IncludeRules context="##Modelines" /> | ||
380 | <DetectIdentifier /> | 590 | <DetectIdentifier /> | ||
381 | </context> | 591 | </context> | ||
382 | 592 | | |||
383 | <context name="AfterHash" attribute="Error" lineEndContext="#pop"> | 593 | <context name="AfterHash" attribute="Error" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!AfterHashLineError"> | ||
384 | <RegExpr attribute="Preprocessor" context="Include" String="#\s*(?:include|include_next)" insensitive="true" firstNonSpace="true" /> | 594 | <RegExpr attribute="Preprocessor" context="#pop!PreprocessorCmd" String="&pphash;(?=.)" firstNonSpace="true" /> | ||
595 | </context> | ||||
385 | 596 | | |||
386 | <!-- define, elif, else, endif, error, if, ifdef, ifndef, line, pragma, undef, warning --> | 597 | <context name="AfterHashLineError" attribute="Region Marker" lineEndContext="#pop"> | ||
387 | <RegExpr attribute="Preprocessor" context="Preprocessor" String="(#|%\:|\?\?=)\s*if(?:def|ndef)?(?=(?:\(|\s+)\S)" beginRegion="PP" firstNonSpace="true" insensitive="false" /> | 598 | <LineContinue attribute="Error" context="#stay" /> | ||
388 | <RegExpr attribute="Preprocessor" context="Preprocessor" String="(#|%\:|\?\?=)\s*endif" endRegion="PP" firstNonSpace="true" insensitive="false" /> | 599 | <RegExpr attribute="Error" context="#pop!LineError" String="[^\\]+" /> | ||
389 | <!-- Switch to seperate context for multiline #defines --> | 600 | <!-- for auto-completion in Kate editor --> | ||
390 | <RegExpr attribute="Preprocessor" context="Define" String="(#|%\:|\?\?=)\s*(cmake)?define.*((?=\\))" firstNonSpace="true" lookAhead="true" insensitive="false" /> | 601 | <keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorInclude" /> | ||
391 | <RegExpr attribute="Preprocessor" context="Preprocessor" String="(#|%\:|\?\?=)\s*(?:el(?:se|if)|(cmake)?define|undef|line|error|warning|pragma)" insensitive="false" firstNonSpace="true" /> | 602 | <keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorIfDef" /> | ||
392 | <RegExpr attribute="Preprocessor" context="Preprocessor" String="(#|%\:|\?\?=)\s+[0-9]+" firstNonSpace="true" insensitive="false" /> | 603 | <keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorIf" /> | ||
604 | <keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorElseIf" /> | ||||
605 | <keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorElse" /> | ||||
606 | <keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorEndIf" /> | ||||
607 | <keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorOther" /> | ||||
608 | <keyword attribute="Preprocessor" context="#pop!LineError" String="preprocessorDefine" /> | ||||
609 | </context> | ||||
610 | | ||||
611 | <context name="LineError" attribute="Error" lineEndContext="#pop"> | ||||
612 | <LineContinue attribute="Error" context="#stay" /> | ||||
613 | </context> | ||||
614 | | ||||
615 | <context name="PreprocessorCmd" attribute="Error" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!AfterHashLineError"> | ||||
616 | <keyword attribute="Preprocessor" context="#pop!Include" String="preprocessorInclude" /> | ||||
617 | <keyword attribute="Preprocessor" context="#pop!PreprocessorIfDef" String="preprocessorIfDef" beginRegion="PP" lookAhead="true" /> | ||||
618 | <keyword attribute="Preprocessor" context="#pop!PreprocessorIf" String="preprocessorIf" beginRegion="PP" lookAhead="true" /> | ||||
619 | <keyword attribute="Preprocessor" context="#pop!PreprocessorIf" String="preprocessorElseIf" endRegion="PP" beginRegion="PP" lookAhead="true" /> | ||||
620 | <keyword attribute="Preprocessor" context="PreprocessorEndOfLineSpace" String="preprocessorElse" endRegion="PP" beginRegion="PP" /> | ||||
621 | <keyword attribute="Preprocessor" context="PreprocessorEndOfLineSpace" String="preprocessorEndIf" endRegion="PP" /> | ||||
622 | <keyword attribute="Preprocessor" context="#pop!Preprocessor" String="preprocessorOther" /> | ||||
623 | <keyword attribute="Preprocessor" context="#pop!Define" String="preprocessorDefine" /> | ||||
624 | <!-- GCC extension --> | ||||
625 | <WordDetect attribute="Preprocessor" context="#pop!Include" String="include_next" /> | ||||
626 | <RegExpr attribute="Preprocessor" context="#pop!Preprocessor" String="[0-9]+" /> | ||||
393 | </context> | 627 | </context> | ||
394 | 628 | | |||
395 | <context attribute="Preprocessor" lineEndContext="#pop" name="Include"> | 629 | <context name="Include" attribute="Preprocessor" lineEndContext="#pop" > | ||
396 | <LineContinue attribute="Preprocessor" context="#stay"/> | 630 | <LineContinue attribute="Preprocessor" context="#stay" /> | ||
397 | <RangeDetect attribute="Prep. Lib" context="#stay" char=""" char1="""/> | 631 | <RangeDetect attribute="Prep. Lib" context="PreprocessorEndOfLineSpace" char=""" char1=""" /> | ||
398 | <RangeDetect attribute="Prep. Lib" context="#stay" char="<" char1=">"/> | 632 | <RangeDetect attribute="Prep. Lib" context="PreprocessorEndOfLineSpace" char="<" char1=">" /> | ||
399 | <IncludeRules context="Preprocessor" /> | 633 | <IncludeRules context="Preprocessor" /> | ||
400 | </context> | 634 | </context> | ||
401 | 635 | | |||
636 | <context name="PreprocessorIfDef" attribute="Preprocessor" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!LineError"> | ||||
637 | <RegExpr attribute="Preprocessor" context="#pop!Preprocessor" String="\w+\s+([A-Za-z][A-Za-z0-9]*\s*|(?=//|/\*))" /> | ||||
638 | </context> | ||||
639 | | ||||
640 | <context name="PreprocessorIf" attribute="Preprocessor" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!LineError"> | ||||
641 | <RegExpr attribute="Preprocessor" context="#pop!Inscoped" String="\w+&ppcond1;" /> | ||||
642 | <RegExpr attribute="Preprocessor" context="#pop!Outscoped" String="\w+&ppcond0;" /> | ||||
643 | <RegExpr attribute="Preprocessor" context="#pop!Preprocessor" String="\w+\s+(?=[^\s])" /> | ||||
644 | </context> | ||||
645 | | ||||
646 | <context name="PreprocessorEndOfLineSpace" attribute="Preprocessor" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop!LineError"> | ||||
647 | <DetectSpaces /> | ||||
648 | <IncludeRules context="match comments" /> | ||||
649 | </context> | ||||
650 | | ||||
402 | <context name="Preprocessor" attribute="Preprocessor" lineEndContext="#pop"> | 651 | <context name="Preprocessor" attribute="Preprocessor" lineEndContext="#pop"> | ||
403 | <LineContinue attribute="Preprocessor" context="#stay" /> | 652 | <LineContinue attribute="Preprocessor" context="#stay" /> | ||
404 | <keyword attribute="Standard Macros" context="#stay" String="StdMacros" /> | 653 | <keyword attribute="Standard Macros" context="#stay" String="StdMacros" /> | ||
405 | <IncludeRules context="GNUMacros##GCCExtensions" /> | 654 | <IncludeRules context="GNUMacros##GCCExtensions" /> | ||
406 | <IncludeRules context="##Doxygen" /> | 655 | <IncludeRules context="match comments" /> | ||
407 | <Detect2Chars attribute="Comment" context="Comment/Preprocessor" char="/" char1="*" beginRegion="Comment2" /> | | |||
408 | <Detect2Chars attribute="Comment" context="Comment 1" char="/" char1="/" /> | | |||
409 | </context> | 656 | </context> | ||
410 | 657 | | |||
411 | <context name="Define" attribute="Preprocessor" lineEndContext="#pop"> | 658 | <context name="Define" attribute="Preprocessor" lineEndContext="#pop"> | ||
412 | <LineContinue attribute="Separator Symbol" context="#stay" /> | 659 | <DetectSpaces/> | ||
413 | <DetectChar attribute="Error" context="#stay" char="\" /> | 660 | <!-- | ||
661 | Old version: non-contextual macro | ||||
662 | <IncludeRules context="InPreprocessor" /> | ||||
414 | <keyword attribute="Standard Macros" context="#stay" String="StdMacros" /> | 663 | <keyword attribute="Standard Macros" context="#stay" String="StdMacros" /> | ||
664 | <keyword attribute="Standard Macros" context="#stay" String="InMacro" /> | ||||
415 | <IncludeRules context="GNUMacros##GCCExtensions" /> | 665 | <IncludeRules context="GNUMacros##GCCExtensions" /> | ||
666 | <IncludeRules context="match comments" /> | ||||
667 | --> | ||||
668 | | ||||
669 | <IncludeRules context="InPreprocessor" /> | ||||
670 | <Detect2Chars attribute="Error" context="#pop!LineError" char="/" char1="/" /> | ||||
671 | <IncludeRules context="##Doxygen" /> | ||||
672 | <Detect2Chars attribute="Comment" context="Comment 2" char="/" char1="*" beginRegion="Comment" /> | ||||
673 | <IncludeRules context="GNUMacros##GCCExtensions" /> | ||||
674 | <DetectIdentifier attribute="Preprocessor" context="#pop!In Define"/> | ||||
416 | </context> | 675 | </context> | ||
417 | 676 | | |||
418 | <context name="Comment/Preprocessor" attribute="Comment" lineEndContext="#stay"> | 677 | <context name="In Define" attribute="Preprocessor" lineEndContext="#pop"> | ||
419 | <DetectSpaces /> | 678 | <DetectSpaces/> | ||
420 | <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment2" /> | 679 | <IncludeRules context="InPreprocessor" /> | ||
421 | <DetectIdentifier /> | 680 | <!-- Match scope regions --> | ||
681 | <AnyChar attribute="Symbol" context="#stay" String="{}" /> | ||||
682 | <!-- Detect attributes --> | ||||
683 | <Detect2Chars attribute="Symbol" context="Attribute In PP" char="[" char1="[" /> | ||||
684 | <!-- Match numbers --> | ||||
685 | <RegExpr attribute="Decimal" context="Number" String="\.?[0-9]" lookAhead="true" /> | ||||
686 | <!-- Match comments --> | ||||
687 | <IncludeRules context="match comments" /> | ||||
688 | <!-- Match punctuators --> | ||||
689 | <AnyChar attribute="Separator Symbol" context="#stay" String="&separators;" /> | ||||
690 | <AnyChar attribute="Symbol" context="#stay" String="&punctuators;" /> | ||||
691 | <!-- Match keywords --> | ||||
692 | <IncludeRules context="match keywords" /> | ||||
693 | <!-- Match string literals --> | ||||
694 | <IncludeRules context="match string" /> | ||||
695 | <!-- Match GCC extensions --> | ||||
696 | <IncludeRules context="DetectGccExtensionsInPP##GCCExtensions" /> | ||||
697 | <!-- Match most used namespaces and styles --> | ||||
698 | <StringDetect attribute="Standard Classes" context="Standard Classes In PP" String="std::" /> | ||||
699 | <StringDetect attribute="Boost Stuff" context="Boost Stuff In PP" String="boost::" /> | ||||
700 | <StringDetect attribute="Boost Stuff" context="Boost Stuff In PP" String="BOOST_" /> | ||||
701 | <StringDetect attribute="Internals" context="InternalsNS In PP" String="detail::" /> | ||||
702 | <StringDetect attribute="Internals" context="InternalsNS In PP" String="details::" /> | ||||
703 | <StringDetect attribute="Internals" context="InternalsNS In PP" String="aux::" /> | ||||
704 | <StringDetect attribute="Internals" context="InternalsNS In PP" String="internals::" /> | ||||
705 | <keyword attribute="Standard Macros" context="#stay" String="InMacro" /> | ||||
706 | <IncludeRules context="match identifier" /> | ||||
707 | <!-- Match preprocessor directives --> | ||||
708 | <DetectChar attribute="Preprocessor" context="#stay" char="#" /> | ||||
709 | <!-- Match invalid symbols --> | ||||
710 | <AnyChar attribute="Error" context="#stay" String="$@`" /> | ||||
711 | </context> | ||||
712 | | ||||
713 | <context name="InPreprocessor" attribute="Normal Text" lineEndContext="#pop"> | ||||
714 | <LineContinue attribute="Separator Symbol" context="#stay" /> | ||||
715 | <DetectChar attribute="Error" context="#stay" char="\" /> | ||||
422 | </context> | 716 | </context> | ||
423 | 717 | | |||
424 | <context name="Outscoped Common" attribute="Comment" lineEndContext="#stay"> | 718 | <context name="Outscoped Common" attribute="Comment" lineEndContext="#stay"> | ||
425 | <DetectSpaces /> | 719 | <DetectSpaces /> | ||
426 | <IncludeRules context="##Alerts" /> | 720 | <IncludeRules context="##Alerts" /> | ||
427 | <IncludeRules context="##Modelines" /> | 721 | <IncludeRules context="##Modelines" /> | ||
428 | <DetectIdentifier /> | 722 | <DetectIdentifier /> | ||
429 | <IncludeRules context="##Doxygen" /> | 723 | <!-- prevent incorrect highlighting in case of not closed properly comment block --> | ||
430 | <Detect2Chars attribute="Comment" context="Comment 1" char="/" char1="/" /> | 724 | <Detect2Chars attribute="Comment" context="#stay" char="*" char1="/" /> | ||
431 | <!-- Do not try to detect "C" style comments inside outscoped text | 725 | <IncludeRules context="match comments" /> | ||
432 | to prevent incorrect highlighting in case of overlapped (or not closed properly) | 726 | <RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if" beginRegion="PP" firstNonSpace="true" /> | ||
433 | comment block... | | |||
434 | | ||||
435 | <Detect2Chars attribute="Comment" context="Comment 2" char="/" char1="*" beginRegion="Comment" /> | | |||
436 | --> | | |||
437 | <RegExpr attribute="Comment" context="Outscoped intern" String="(#|%\:|\?\?=)\s*if" beginRegion="PP" firstNonSpace="true" insensitive="false" /> | | |||
438 | <LineContinue context="#stay" /> | 727 | <LineContinue context="#stay" /> | ||
439 | </context> | 728 | </context> | ||
440 | 729 | | |||
441 | <context name="Outscoped" attribute="Comment" lineEndContext="#stay"> | 730 | <context name="Outscoped" attribute="Comment" lineEndContext="#stay"> | ||
731 | <DetectSpaces /> | ||||
732 | <RegExpr attribute="Preprocessor" context="Outscoped AfterHash" String="&ispphash;" firstNonSpace="true" lookAhead="true" /> | ||||
442 | <IncludeRules context="Outscoped Common" /> | 733 | <IncludeRules context="Outscoped Common" /> | ||
443 | <RegExpr attribute="Preprocessor" context="#pop" String="(#|%\:|\?\?=)\s*el(?:se|if)" firstNonSpace="true" insensitive="false" /> | 734 | </context> | ||
444 | <RegExpr attribute="Preprocessor" context="#pop" String="(#|%\:|\?\?=)\s*endif" endRegion="PP" firstNonSpace="true" insensitive="false" /> | 735 | | ||
736 | <context name="Outscoped AfterHash" attribute="Comment" lineEndContext="#pop"> | ||||
737 | <RegExpr attribute="Preprocessor" context="#pop#pop!PreprocessorEndOfLineSpace" String="&pphash;endif\b" endRegion="PP" /> | ||||
738 | <RegExpr attribute="Preprocessor" context="#pop#pop!Inscoped" String="&pphash;else\b" endRegion="PP" beginRegion="PP" /> | ||||
739 | <RegExpr attribute="Comment" context="#pop!Outscoped intern" String="&pphash;if" beginRegion="PP" /> | ||||
740 | <RegExpr attribute="Preprocessor" context="#pop#pop!Inscoped" String="&pphash;elif&ppcond1;" endRegion="PP" beginRegion="PP" /> | ||||
741 | <RegExpr attribute="Preprocessor" context="#pop" String="&pphash;elif&ppcond0;" endRegion="PP" beginRegion="PP" /> | ||||
742 | <RegExpr attribute="Preprocessor" context="#pop#pop!Preprocessor" String="&pphash;elif\b" endRegion="PP" beginRegion="PP" /> | ||||
743 | <RegExpr attribute="Comment" context="#pop" String="&pphash;" /> | ||||
445 | </context> | 744 | </context> | ||
446 | 745 | | |||
447 | <context name="Outscoped 2" attribute="Comment" lineEndContext="#stay"> | 746 | <context name="Outscoped 2" attribute="Comment" lineEndContext="#stay"> | ||
448 | <IncludeRules context="Outscoped Common" /> | 747 | <IncludeRules context="Outscoped Common" /> | ||
449 | <RegExpr attribute="Preprocessor" context="#pop#pop" String="(#|%\:|\?\?=)\s*endif" endRegion="PP" firstNonSpace="true" insensitive="false" /> | 748 | <RegExpr attribute="Preprocessor" context="#pop!PreprocessorEndOfLineSpace" String="&pphash;endif" endRegion="PP" firstNonSpace="true" /> | ||
450 | </context> | 749 | </context> | ||
451 | 750 | | |||
452 | <context name="Inscoped" attribute="Normal Text" lineEndContext="#stay"> | 751 | <context name="Inscoped" attribute="Normal Text" lineEndContext="#stay"> | ||
453 | <DetectSpaces /> | 752 | <DetectSpaces /> | ||
454 | <RegExpr attribute="Preprocessor" context="Outscoped" String="(#|%\:|\?\?=)\s*if\s+(0|false)\s*" beginRegion="PP" firstNonSpace="true" insensitive="false" /> | 753 | <RegExpr attribute="Preprocessor" context="Inscoped AfterHash" String="&ispphash;" firstNonSpace="true" lookAhead="true" /> | ||
455 | <RegExpr attribute="Preprocessor" context="Outscoped 2" String="(#|%\:|\?\?=)\s*el(?:se|if)" firstNonSpace="true" insensitive="false" /> | | |||
456 | <RegExpr attribute="Preprocessor" context="#pop" String="(#|%\:|\?\?=)\s*endif" endRegion="PP" firstNonSpace="true" insensitive="false" /> | | |||
457 | <IncludeRules context="Main" /> | 754 | <IncludeRules context="Main" /> | ||
458 | </context> | 755 | </context> | ||
459 | 756 | | |||
757 | <context name="Inscoped AfterHash" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!AfterHash"> | ||||
758 | <DetectSpaces /> | ||||
759 | <RegExpr attribute="Preprocessor" context="#pop!Outscoped 2" String="&pphash;el(?:se|if)" endRegion="PP" beginRegion="PP"/> | ||||
760 | <RegExpr attribute="Preprocessor" context="#pop#pop!PreprocessorEndOfLineSpace" String="&pphash;endif\b" endRegion="PP" /> | ||||
761 | </context> | ||||
762 | | ||||
460 | <context name="Outscoped intern" attribute="Comment" lineEndContext="#stay"> | 763 | <context name="Outscoped intern" attribute="Comment" lineEndContext="#stay"> | ||
461 | <DetectSpaces /> | 764 | <DetectSpaces /> | ||
462 | <IncludeRules context="##Alerts" /> | 765 | <IncludeRules context="##Alerts" /> | ||
463 | <IncludeRules context="##Modelines" /> | 766 | <IncludeRules context="##Modelines" /> | ||
464 | <DetectIdentifier /> | 767 | <DetectIdentifier /> | ||
465 | <IncludeRules context="##Doxygen" /> | 768 | <!-- prevent incorrect highlighting in case of not closed properly comment block --> | ||
466 | <Detect2Chars attribute="Comment" context="Comment 1" char="/" char1="/" /> | 769 | <Detect2Chars attribute="Comment" context="#stay" char="*" char1="/" /> | ||
467 | <Detect2Chars attribute="Comment" context="Comment 2" char="/" char1="*" beginRegion="Comment" /> | 770 | <IncludeRules context="match comments" /> | ||
468 | <RegExpr attribute="Comment" context="Outscoped intern" String="(#|%\:|\?\?=)\s*if" beginRegion="PP" firstNonSpace="true" insensitive="false" /> | 771 | <RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if" beginRegion="PP" firstNonSpace="true" /> | ||
469 | <RegExpr attribute="Comment" context="#pop" String="(#|%\:|\?\?=)\s*endif" endRegion="PP" firstNonSpace="true" insensitive="false" /> | 772 | <RegExpr attribute="Comment" context="#stay" String="&pphash;el(se|if)" beginRegion="PP" endRegion="PP" firstNonSpace="true" /> | ||
773 | <RegExpr attribute="Comment" context="PreprocessorEndOfLineSpace" String="&pphash;endif" endRegion="PP" firstNonSpace="true" /> | ||||
470 | </context> | 774 | </context> | ||
471 | </contexts> | 775 | </contexts> | ||
472 | 776 | | |||
473 | <itemDatas> | 777 | <itemDatas> | ||
474 | <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" /> | 778 | <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" /> | ||
475 | <itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false" /> | 779 | <itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false" /> | ||
476 | <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" /> | 780 | <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" /> | ||
477 | <itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false" /> | 781 | <itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false" /> | ||
478 | <itemData name="Type Modifiers" defStyleNum="dsAttribute" spellChecking="false" /> | 782 | <itemData name="Type Modifiers" defStyleNum="dsAttribute" spellChecking="false" /> | ||
479 | <itemData name="Attribute" defStyleNum="dsAttribute" spellChecking="false" bold="false" italic="true" /> | 783 | <itemData name="Attribute" defStyleNum="dsAttribute" spellChecking="false" bold="false" italic="true" /> | ||
480 | <itemData name="Standard Attribute" defStyleNum="dsAttribute" spellChecking="false" bold="false" italic="true" /> | 784 | <itemData name="Standard Attribute" defStyleNum="dsAttribute" spellChecking="false" bold="false" italic="true" /> | ||
481 | <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false" /> | 785 | <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false" /> | ||
482 | <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false" /> | 786 | <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false" /> | ||
483 | <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false" /> | 787 | <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false" /> | ||
484 | <itemData name="Binary" defStyleNum="dsBaseN" spellChecking="false" /> | 788 | <itemData name="Binary" defStyleNum="dsBaseN" spellChecking="false" /> | ||
485 | <itemData name="Float" defStyleNum="dsFloat" spellChecking="false" /> | 789 | <itemData name="Float" defStyleNum="dsFloat" spellChecking="false" /> | ||
486 | <itemData name="Char" defStyleNum="dsChar" spellChecking="false" /> | 790 | <itemData name="Char" defStyleNum="dsChar" spellChecking="false" /> | ||
487 | <itemData name="String" defStyleNum="dsString" spellChecking="true" /> | 791 | <itemData name="String" defStyleNum="dsString" spellChecking="true" /> | ||
488 | <itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="false" /> | 792 | <itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="false" /> | ||
489 | <itemData name="Comment" defStyleNum="dsComment" spellChecking="true" /> | 793 | <itemData name="Comment" defStyleNum="dsComment" spellChecking="true" /> | ||
490 | <itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false" /> | 794 | <itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false" /> | ||
491 | <itemData name="Separator Symbol" defStyleNum="dsNormal" spellChecking="false" /> | 795 | <itemData name="Separator Symbol" defStyleNum="dsNormal" spellChecking="false" /> | ||
492 | <itemData name="Data Members (m_*)" defStyleNum="dsVariable" spellChecking="false" /> | 796 | <itemData name="Data Members (m_*)" defStyleNum="dsVariable" spellChecking="false" /> | ||
493 | <itemData name="Globals (g_*)" defStyleNum="dsVariable" spellChecking="false" /> | 797 | <itemData name="Globals (g_*)" defStyleNum="dsVariable" spellChecking="false" /> | ||
494 | <itemData name="Statics (s_*)" defStyleNum="dsVariable" spellChecking="false" /> | 798 | <itemData name="Statics (s_*)" defStyleNum="dsVariable" spellChecking="false" /> | ||
495 | <itemData name="Types (*_t/*_type)" defStyleNum="dsDataType" spellChecking="false" /> | 799 | <itemData name="Types (*_t/*_type)" defStyleNum="dsDataType" spellChecking="false" /> | ||
496 | <itemData name="CONSTS/MACROS" defStyleNum="dsNormal" spellChecking="false" /> | 800 | <itemData name="CONSTS/MACROS" defStyleNum="dsNormal" spellChecking="false" /> | ||
497 | <itemData name="Preprocessor" defStyleNum="dsPreprocessor" spellChecking="false" /> | 801 | <itemData name="Preprocessor" defStyleNum="dsPreprocessor" spellChecking="false" /> | ||
498 | <itemData name="Prep. Lib" defStyleNum="dsImport" spellChecking="false" /> | 802 | <itemData name="Prep. Lib" defStyleNum="dsImport" spellChecking="false" /> | ||
499 | <itemData name="Standard Macros" defStyleNum="dsOthers" spellChecking="false" /> | 803 | <itemData name="Standard Macros" defStyleNum="dsOthers" spellChecking="false" /> | ||
500 | <itemData name="Standard Classes" defStyleNum="dsBuiltIn" spellChecking="false" /> | 804 | <itemData name="Standard Classes" defStyleNum="dsBuiltIn" spellChecking="false" /> | ||
501 | <itemData name="Boost Stuff" defStyleNum="dsExtension" spellChecking="false" /> | 805 | <itemData name="Boost Stuff" defStyleNum="dsExtension" spellChecking="false" /> | ||
502 | <itemData name="Internals" defStyleNum="dsNormal" spellChecking="false" color="#808080" selColor="#808080" /> | 806 | <itemData name="Internals" defStyleNum="dsNormal" spellChecking="false" color="#808080" selColor="#808080" /> | ||
503 | <itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false" /> | 807 | <itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false" /> | ||
808 | <itemData name="UDL Numeric Suffix" defStyleNum="dsDecVal" spellChecking="false" /> | ||||
809 | <itemData name="UDL String Suffix" defStyleNum="dsString" spellChecking="false" /> | ||||
810 | <itemData name="Standard Suffix" defStyleNum="dsBuiltIn" spellChecking="false" /> | ||||
504 | <itemData name="Error" defStyleNum="dsError" spellChecking="false" /> | 811 | <itemData name="Error" defStyleNum="dsError" spellChecking="false" /> | ||
505 | </itemDatas> | 812 | </itemDatas> | ||
506 | </highlighting> | 813 | </highlighting> | ||
507 | <general> | 814 | <general> | ||
508 | <comments> | 815 | <comments> | ||
509 | <comment name="singleLine" start="//" /> | 816 | <comment name="singleLine" start="//" /> | ||
510 | <comment name="multiLine" start="/*" end="*/" region="Comment" /> | 817 | <comment name="multiLine" start="/*" end="*/" region="Comment" /> | ||
511 | </comments> | 818 | </comments> | ||
512 | <keywords casesensitive="1" /> | 819 | <keywords casesensitive="1" additionalDeliminator="#"" /> | ||
513 | </general> | 820 | </general> | ||
514 | </language> | 821 | </language> | ||
515 | <!-- kate: indent-width 2; tab-width 2; --> | 822 | <!-- kate: indent-width 2; tab-width 2; --> |