]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtksourceview/test/test.lang
snapshot
[helm.git] / helm / DEVEL / lablgtksourceview / test / test.lang
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">
4         
5         <escape-char>\</escape-char>
6
7         <line-comment _name = "Line Comment" style= "Comment">
8                 <start-regex>//</start-regex>
9         </line-comment>
10
11         <block-comment _name = "Block Comment" style = "Comment">
12                 <start-regex>/\*</start-regex>
13                 <end-regex>\*/</end-regex>
14         </block-comment>
15
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>
19         </block-comment>
20
21         <string _name = "String" style = "String" end-at-line-end = "TRUE">
22                 <start-regex>&quot;</start-regex>
23                 <end-regex>&quot;</end-regex>
24         </string>
25
26         <syntax-item _name = "Include/Pragma" style = "Preprocessor">
27                 <start-regex>^#[ \t]*(include|pragma)</start-regex>
28                  <end-regex>\n</end-regex>
29         </syntax-item>
30
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>
37                 <keyword>do</keyword>
38                 <keyword>else</keyword>
39                 <keyword>for</keyword>
40                 <keyword>fortran</keyword>
41                 <keyword>goto</keyword>
42                 <keyword>if</keyword>
43                 <keyword>return</keyword>
44                 <keyword>sizeof</keyword>
45                 <keyword>switch</keyword>
46                 <keyword>while</keyword>
47         </keyword-list>
48
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>
74         </keyword-list>
75
76         <string _name = "Character Constant" style = "String" end-at-line-end = "TRUE">
77                 <start-regex>&apos;</start-regex>
78                 <end-regex>&apos;</end-regex>
79         </string>
80
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>
83         </pattern-item>
84
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>
87         </pattern-item>
88
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>
91         </pattern-item>
92
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>
95         </pattern-item>
96
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>
109         </keyword-list>
110
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>
126         </keyword-list>
127
128 </language>