1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language SYSTEM "language.dtd">
3 <language _name="C" version="1.0" _section="Sources" mimetypes="text/x-c;text/x-chdr;text/x-csrc">
5 <escape-char>\</escape-char>
7 <line-comment _name = "Line Comment" style= "Comment">
8 <start-regex>//</start-regex>
11 <block-comment _name = "Block Comment" style = "Comment">
12 <start-regex>/\*</start-regex>
13 <end-regex>\*/</end-regex>
16 <block-comment _name = "'#if 0' Comment" style = "Comment">
17 <start-regex>^[ \t]*#[ \t]*if[ \t]*0</start-regex>
18 <end-regex>[ \t]*#[ \t]*(endif|else)</end-regex>
21 <string _name = "String" style = "String" end-at-line-end = "TRUE">
22 <start-regex>"</start-regex>
23 <end-regex>"</end-regex>
26 <syntax-item _name = "Include/Pragma" style = "Preprocessor">
27 <start-regex>^#[ \t]*(include|pragma)</start-regex>
28 <end-regex>\n</end-regex>
31 <keyword-list _name = "Keywords" style = "Keyword" case-sensitive="TRUE">
32 <keyword>asm</keyword>
33 <keyword>break</keyword>
34 <keyword>case</keyword>
35 <keyword>continue</keyword>
36 <keyword>default</keyword>
38 <keyword>else</keyword>
39 <keyword>for</keyword>
40 <keyword>fortran</keyword>
41 <keyword>goto</keyword>
43 <keyword>return</keyword>
44 <keyword>sizeof</keyword>
45 <keyword>switch</keyword>
46 <keyword>while</keyword>
49 <keyword-list _name = "Types" style = "Data Type" case-sensitive="TRUE">
50 <keyword>_Bool</keyword>
51 <keyword>_Complex</keyword>
52 <keyword>_Imaginary</keyword>
53 <keyword>auto</keyword>
54 <keyword>char</keyword>
55 <keyword>const</keyword>
56 <keyword>double</keyword>
57 <keyword>enum</keyword>
58 <keyword>extern</keyword>
59 <keyword>float</keyword>
60 <keyword>int</keyword>
61 <keyword>inline</keyword>
62 <keyword>long</keyword>
63 <keyword>register</keyword>
64 <keyword>restrict</keyword>
65 <keyword>short</keyword>
66 <keyword>signed</keyword>
67 <keyword>static</keyword>
68 <keyword>struct</keyword>
69 <keyword>typedef</keyword>
70 <keyword>union</keyword>
71 <keyword>unsigned</keyword>
72 <keyword>void</keyword>
73 <keyword>volatile</keyword>
76 <string _name = "Character Constant" style = "String" end-at-line-end = "TRUE">
77 <start-regex>'</start-regex>
78 <end-regex>'</end-regex>
81 <pattern-item _name = "Decimal" style = "Decimal">
82 <regex>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
85 <pattern-item _name = "Floating Point Number" style = "Floating Point">
86 <regex>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</regex>
89 <pattern-item _name = "Octal Number" style = "Base-N Integer">
90 <regex>\b0[0-7]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
93 <pattern-item _name = "Hex Number" style = "Base-N Integer">
94 <regex>\b0[xX][0-9a-fA-F]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
97 <keyword-list _name = "Common Macro" style = "Preprocessor" case-sensitive="TRUE">
98 <keyword>NULL</keyword>
99 <keyword>TRUE</keyword>
100 <keyword>FALSE</keyword>
101 <keyword>MAX</keyword>
102 <keyword>MIN</keyword>
103 <keyword>__LINE__</keyword>
104 <keyword>__DATA__</keyword>
105 <keyword>__FILE__</keyword>
106 <keyword>__func__</keyword>
107 <keyword>__TIME__</keyword>
108 <keyword>__STDC__</keyword>
111 <keyword-list _name = "Preprocessor Definitions" style = "Preprocessor" case-sensitive="TRUE"
112 match-empty-string-at-beginning = "FALSE"
113 match-empty-string-at-end = "TRUE"
114 beginning-regex = "^[ \t]*#[ \t]*">
115 <keyword>if</keyword>
116 <keyword>ifdef</keyword>
117 <keyword>ifndef</keyword>
118 <keyword>else</keyword>
119 <keyword>elif</keyword>
120 <keyword>define</keyword>
121 <keyword>endif</keyword>
122 <keyword>undef</keyword>
123 <keyword>error</keyword>
124 <keyword>pragma</keyword>
125 <keyword>line</keyword>