Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/c.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 int "(?:[0-9](?:'?[0-9]+)*)"> | 4 | <!ENTITY int "(?:[0-9]+)"> | ||
5 | <!ENTITY hex_int "(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f]+)*)"> | 5 | <!ENTITY hex_int "(?:[0-9A-Fa-f]+)"> | ||
6 | <!ENTITY exp_float "(?:[eE][+-]?∫)"> | 6 | <!ENTITY exp_float "(?:[eE][+-]?∫)"> | ||
7 | <!ENTITY exp_hexfloat "(?:[pP][-+]?∫)"> | 7 | <!ENTITY exp_hexfloat "(?:[pP][-+]?∫)"> | ||
8 | 8 | | |||
9 | <!ENTITY ispphash "(?:#|%\:|\?\?=)"> | 9 | <!ENTITY ispphash "(?:#|%\:|\?\?=)"> | ||
10 | <!ENTITY pphash "&ispphash;\s*"> | 10 | <!ENTITY pphash "&ispphash;\s*"> | ||
11 | ]> | 11 | ]> | ||
12 | <language name="C" section="Sources" | 12 | <language name="C" section="Sources" | ||
13 | version="7" kateversion="5.0" | 13 | version="8" kateversion="5.0" | ||
14 | indenter="cstyle" | 14 | indenter="cstyle" | ||
15 | extensions="*.c;*.C;*.h" | 15 | extensions="*.c;*.C;*.h" | ||
16 | mimetype="text/x-csrc;text/x-c++src;text/x-chdr" | 16 | mimetype="text/x-csrc;text/x-c++src;text/x-chdr" | ||
17 | priority="5"> | 17 | priority="5"> | ||
18 | <!-- | 18 | <!-- | ||
19 | 19 | | |||
20 | Fixes by Sebastian Pipping (webmaster@hartwork.org) | 20 | Fixes by Sebastian Pipping (webmaster@hartwork.org) | ||
21 | 21 | | |||
▲ Show 20 Lines • Show All 205 Lines • ▼ Show 20 Line(s) | 122 | <RegExpr attribute="Preprocessor" context="Outscoped" String="&pphash;if\s+0\s*$" beginRegion="PP" firstNonSpace="true" /> | |||
227 | 227 | | |||
228 | <context name="Number" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | 228 | <context name="Number" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||
229 | <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;?))" /> | 229 | <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;?))" /> | ||
230 | <IncludeRules context="Integer" /> | 230 | <IncludeRules context="Integer" /> | ||
231 | </context> | 231 | </context> | ||
232 | 232 | | |||
233 | <context name="Integer" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | 233 | <context name="Integer" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||
234 | <RegExpr attribute="Hex" context="IntSuffix" String="0[xX]&hex_int;" /> | 234 | <RegExpr attribute="Hex" context="IntSuffix" String="0[xX]&hex_int;" /> | ||
235 | <RegExpr attribute="Binary" context="IntSuffix" String="0[Bb][01](?:'?[01]+)*" /> | 235 | <RegExpr attribute="Binary" context="IntSuffix" String="0[Bb][01]+" /> | ||
236 | <RegExpr attribute="Octal" context="IntSuffix" String="0(?:'?[0-7]+)+" /> | 236 | <RegExpr attribute="Octal" context="IntSuffix" String="0[0-7]+" /> | ||
237 | <RegExpr attribute="Decimal" context="IntSuffix" String="0(?![xXbB0-9])|[1-9](?:'?[0-9]+)*" /> | 237 | <RegExpr attribute="Decimal" context="IntSuffix" String="0(?![xXbB0-9])|[1-9][0-9]*" /> | ||
238 | <RegExpr attribute="Error" context="#pop" String="[._0-9A-Za-z']+" /> | 238 | <RegExpr attribute="Error" context="#pop" String="[._0-9A-Za-z']+" /> | ||
239 | </context> | 239 | </context> | ||
240 | 240 | | |||
241 | <context name="IntSuffix" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError"> | 241 | <context name="IntSuffix" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError"> | ||
242 | <DetectChar attribute="Error" context="#stay" char="'" /> | 242 | <DetectChar attribute="Error" context="#stay" char="'" /> | ||
243 | <AnyChar attribute="Error" context="#pop!IntSuffixPattern" String="uUlLimunshyd_" lookAhead="true" /> | 243 | <AnyChar attribute="Error" context="#pop!IntSuffixPattern" String="uUlLimunshyd_" lookAhead="true" /> | ||
244 | </context> | 244 | </context> | ||
245 | 245 | | |||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |