Debian Codegraph @

data/syntax/ansic89.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language>
3 <language name="ANSI C89" section="Sources"
4 version="8" kateversion="5.0"
5 indenter="cstyle"
6 extensions="*.c;*.C;*.h"
7 mimetype="text/x-csrc;text/x-c++src;text/x-chdr"
8 priority="2"
9 author="Dominik Haumann ([email protected])" license="MIT">
10 <highlighting>
11 <list name="keywords">
12 <item>break</item>
13 <item>case</item>
14 <item>continue</item>
15 <item>default</item>
16 <item>do</item>
17 <item>else</item>
18 <item>enum</item>
19 <item>extern</item>
20 <item>for</item>
21 <item>goto</item>
22 <item>if</item>
23 <item>return</item>
24 <item>sizeof</item>
25 <item>struct</item>
26 <item>switch</item>
27 <item>typedef</item>
28 <item>union</item>
29 <item>while</item>
30 </list>
31 <list name="types">
32 <item>auto</item>
33 <item>char</item>
34 <item>const</item>
35 <item>double</item>
36 <item>float</item>
37 <item>int</item>
38 <item>long</item>
39 <item>register</item>
40 <item>short</item>
41 <item>signed</item>
42 <item>static</item>
43 <item>unsigned</item>
44 <item>void</item>
45 <item>volatile</item>
46 </list>
47 <contexts>
48 <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
49 <DetectSpaces />
50 <RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0" beginRegion="Outscoped" firstNonSpace="true" />
51 <DetectChar attribute="Preprocessor" context="Preprocessor" char="#" firstNonSpace="true" />
52 <keyword attribute="Keyword" context="#stay" String="keywords"/>
53 <keyword attribute="Data Type" context="#stay" String="types"/>
54 <DetectIdentifier />
55 <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
56 <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
57 <Float attribute="Float" context="Float Suffixes"/>
58 <HlCOct attribute="Octal" context="#stay"/>
59 <HlCHex attribute="Hex" context="#stay"/>
60 <Int attribute="Decimal" context="Int Suffixes"/>
61 <HlCChar attribute="Char" context="#stay"/>
62 <DetectChar attribute="String" context="String" char="&quot;"/>
63 <Detect2Chars attribute="Comment" context="comment" char="/" char1="*" beginRegion="blockcomment"/>
64 <AnyChar attribute="Symbol" context="#stay" String=":!%&amp;()+,-/.*&lt;=&gt;?[]|~^&#59;"/>
65 </context>
66 <context name="Float Suffixes" attribute="Float" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
67 <AnyChar String="fF" attribute="Float" context="#pop"/>
68 </context>
69 <context name="Int Suffixes" attribute="Decimal" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
70 <StringDetect attribute="Decimal" context="#pop" String="ULL" insensitive="true"/>
71 <StringDetect attribute="Decimal" context="#pop" String="LLU" insensitive="true"/>
72 <StringDetect attribute="Decimal" context="#pop" String="UL" insensitive="true"/>
73 <StringDetect attribute="Decimal" context="#pop" String="LU" insensitive="true"/>
74 <StringDetect attribute="Decimal" context="#pop" String="LL" insensitive="true"/>
75 <AnyChar attribute="Decimal" context="#pop" String="ULul"/>
76 </context>
77 <context attribute="String" lineEndContext="#pop" name="String">
78 <LineContinue attribute="String" context="#stay"/>
79 <HlCStringChar attribute="String Char" context="#stay"/>
80 <DetectChar attribute="String" context="#pop" char="&quot;"/>
81 </context>
82 <context attribute="Comment" lineEndContext="#stay" name="comment">
83 <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="blockcomment"/>
84 <IncludeRules context="##Comments" />
85 </context>
86 <context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor">
87 <LineContinue attribute="Preprocessor" context="#stay"/>
88 <RegExpr attribute="Preprocessor" context="#stay" String="define(?:[^\\]++|\\.)++"/>
89 <RangeDetect attribute="Prep. Lib" context="#stay" char="&quot;" char1="&quot;"/>
90 <RangeDetect attribute="Prep. Lib" context="#stay" char="&lt;" char1="&gt;"/>
91 <Detect2Chars attribute="Comment" context="comment" char="/" char1="*" beginRegion="blockcomment"/>
92 </context>
93 <context attribute="Comment" lineEndContext="#stay" name="Outscoped" >
94 <Detect2Chars attribute="Comment" context="comment" char="/" char1="*" beginRegion="Comment"/>
95 <IncludeRules context="##Comments" />
96 <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true" />
97 <RegExpr attribute="Preprocessor" context="#pop" String="#\s*(?:endif|else|elif)" endRegion="Outscoped" firstNonSpace="true" />
98 </context>
99 <context attribute="Comment" lineEndContext="#stay" name="Outscoped intern">
100 <Detect2Chars attribute="Comment" context="comment" char="/" char1="*" beginRegion="Comment"/>
101 <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true" />
102 <RegExpr attribute="Comment" context="#pop" String="#\s*endif" endRegion="Outscoped" firstNonSpace="true" />
103 </context>
104 </contexts>
105 <itemDatas>
106 <itemData name="Normal Text" defStyleNum="dsNormal"/>
107 <itemData name="Keyword" defStyleNum="dsKeyword"/>
108 <itemData name="Data Type" defStyleNum="dsDataType"/>
109 <itemData name="Decimal" defStyleNum="dsDecVal"/>
110 <itemData name="Octal" defStyleNum="dsBaseN"/>
111 <itemData name="Hex" defStyleNum="dsBaseN"/>
112 <itemData name="Float" defStyleNum="dsFloat"/>
113 <itemData name="Char" defStyleNum="dsChar"/>
114 <itemData name="String" defStyleNum="dsString"/>
115 <itemData name="String Char" defStyleNum="dsSpecialChar"/>
116 <itemData name="Comment" defStyleNum="dsComment"/>
117 <itemData name="Symbol" defStyleNum="dsOperator"/>
118 <itemData name="Preprocessor" defStyleNum="dsPreprocessor"/>
119 <itemData name="Prep. Lib" defStyleNum="dsImport"/>
120 </itemDatas>
121 </highlighting>
122 <general>
123 <comments>
124 <comment name="multiLine" start="/*" end="*/" region="blockcomment" />
125 </comments>
126 <keywords casesensitive="1" />
127 </general>
128 </language>
129 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->