1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3
4 Authors: Oscar Torrent Artero, Joseba García Etxebarria
5 Copyright (C) 2009 Oscar Torrent Artero <q2dg@yahoo.es>
6 Copyright (C) 2010 Joseba García Etxebarria <joseba.gar@gmail.com>
7
8 GtkSourceView is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 GtkSourceView is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with this library; if not, see <http://www.gnu.org/licenses/>.
20
21-->
22<language id="bennugd" name="BennuGD" version="2.0" _section="Source">
23  <metadata>
24    <property name="globs">*.prg</property>
25    <property name="line-comment-start">//</property>
26    <property name="block-comment-start">/*</property>
27    <property name="block-comment-end">*/</property>
28  </metadata>
29
30  <styles>
31    <style id="comment"           name="Comment"               map-to="def:comment"/>
32    <style id="preprocessor"      name="Preprocessor"          map-to="def:preprocessor"/>
33    <style id="identifier"        name="Identifier"            map-to="def:identifier"/>
34    <style id="operator"          name="Operator"              map-to="def:operator"/>
35    <style id="keywords"          name="Keyword"               map-to="def:keyword"/>
36    <style id="types"             name="Data Type"             map-to="def:type"/>
37    <style id="floating-point"    name="Floating point number" map-to="def:floating-point"/>
38    <style id="decimal"           name="Decimal number"        map-to="def:decimal"/>
39    <style id="hexadecimal"       name="Hexadecimal number"    map-to="def:base-n-integer"/>
40    <style id="boolean"           name="Boolean value"         map-to="def:boolean"/>
41  </styles>
42
43  <default-regex-options case-sensitive="false" />
44  <definitions>
45
46    <!--regexs-->
47    <define-regex id="symbolchar">[-!+\\|=:&amp;&gt;&lt;]</define-regex>
48    <define-regex id="preproc-start">^\s*#\s*</define-regex>
49
50    <!--Preprocessor -->
51    <context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
52      <start extended="true">
53        \%{preproc-start}
54        (define|if(n?def)?|else|elsif|endif)
55        \b
56      </start>
57      <include>
58        <context ref="def:line-continue" ignore-style="true"/>
59        <context ref="c:string" ignore-style="true"/>
60        <context ref="def:c-like-comment"/>
61        <context ref="def:c-like-comment-multiline"/>
62      </include>
63    </context>
64
65    <context id="boolean" style-ref="boolean">
66      <keyword>false</keyword>
67      <keyword>true</keyword>
68    </context>
69
70    <context id="float" style-ref="floating-point">
71      <match extended="true">
72        (?&lt;![\w\.])
73        ([0-9]+[Ee][+-]?[0-9]+ |
74        ([0-9]*\.[0-9]+ | [0-9]+\.[0-9]*)([Ee][+-]?[0-9]+)?)
75        (?![\w\.])
76      </match>
77    </context>
78
79    <context id="decimal-number" style-ref="decimal">
80      <match extended="true">
81         (?&lt;![\w\.])
82         [+-]?([1-9][0-9]*|0)
83         (?![\w\.])
84       </match>
85    </context>
86
87    <context id="hexadecimal-number" style-ref="hexadecimal">
88      <match extended="true">
89         (?&lt;![\w\.])
90         [+-]?0x[0-9a-fA-F]+
91         (?![\w\.])
92      </match>
93    </context>
94
95    <!--Keywords -->
96    <context id="keywords" style-ref="keywords">
97      <keyword>begin</keyword>
98      <keyword>break</keyword>
99      <keyword>call</keyword>
100      <keyword>case</keyword>
101      <keyword>clone</keyword>
102      <keyword>const</keyword>
103      <keyword>continue</keyword>
104      <keyword>debug</keyword>
105      <keyword>declare</keyword>
106      <keyword>default</keyword>
107      <keyword>dup</keyword>
108      <keyword>elif</keyword>
109      <keyword>else</keyword>
110      <keyword>elseif</keyword>
111      <keyword>elsif</keyword>
112      <keyword>end</keyword>
113      <keyword>error</keyword>
114      <keyword>exit</keyword>
115      <keyword>for</keyword>
116      <keyword>frame</keyword>
117      <keyword>from</keyword>
118      <keyword>function</keyword>
119      <keyword>global</keyword>
120      <keyword>goto</keyword>
121      <keyword>if</keyword>
122      <keyword>import</keyword>
123      <keyword>include</keyword>
124      <keyword>jmp</keyword>
125      <keyword>local</keyword>
126      <keyword>loop</keyword>
127      <keyword>mod</keyword>
128      <keyword>mouse</keyword>
129      <keyword>next</keyword>
130      <keyword>offset</keyword>
131      <keyword>on</keyword>
132      <keyword>onerror</keyword>
133      <keyword>onexit</keyword>
134      <keyword>private</keyword>
135      <keyword>process</keyword>
136      <keyword>program</keyword>
137      <keyword>public</keyword>
138      <keyword>repeat</keyword>
139      <keyword>resume</keyword>
140      <keyword>return</keyword>
141      <keyword>sizeof</keyword>
142      <keyword>step</keyword>
143      <keyword>switch</keyword>
144      <keyword>to</keyword>
145      <keyword>until</keyword>
146      <keyword>while</keyword>
147    </context>
148
149    <context id="globals" style-ref="keywords">
150      <keyword>argc</keyword>
151      <keyword>argv</keyword>
152      <keyword>os_id</keyword>
153    </context>
154
155    <context id="locals" style-ref="keywords">
156      <keyword>bigbro</keyword>
157      <keyword>father</keyword>
158      <keyword>frame_percent</keyword>
159      <keyword>id</keyword>
160      <keyword>process_type</keyword>
161      <keyword>reserved</keyword>
162      <keyword>reserved.frame_percent</keyword>
163      <keyword>reserved.process_type</keyword>
164      <keyword>reserved.saved_priority</keyword>
165      <keyword>reserved.saved_status</keyword>
166      <keyword>reserved.status</keyword>
167      <keyword>saved_priority</keyword>
168      <keyword>saved_status</keyword>
169      <keyword>smallbro</keyword>
170      <keyword>status</keyword>
171      <keyword>son</keyword>
172    </context>
173
174    <context id="operators" style-ref="operator" extend-parent="false">
175      <prefix>(?&lt;!\%{symbolchar})</prefix>
176      <suffix>(?!\%{symbolchar})</suffix>
177      <keyword>==</keyword>
178      <keyword>!=</keyword>
179      <keyword>!</keyword>
180      <keyword>&lt;</keyword>
181      <keyword>&gt;</keyword>
182      <keyword>&lt;=</keyword>
183      <keyword>&gt;=</keyword>
184      <keyword>&amp;&amp;</keyword>
185      <keyword>&amp;</keyword>
186      <keyword>=</keyword>
187      <keyword>||</keyword>
188      <keyword>|</keyword>
189      <keyword>^^</keyword>
190      <keyword>^</keyword>
191    </context>
192
193    <context id="types" style-ref="types">
194      <keyword>byte</keyword>
195      <keyword>char</keyword>
196      <keyword>dword</keyword>
197      <keyword>float</keyword>
198      <keyword>int</keyword>
199      <keyword>pointer</keyword>
200      <keyword>short</keyword>
201      <keyword>signed</keyword>
202      <keyword>string</keyword>
203      <keyword>struct</keyword>
204      <keyword>type</keyword>
205      <keyword>unsigned</keyword>
206      <keyword>word</keyword>
207    </context>
208
209    <context id="commonmacros" style-ref="preprocessor">
210      <keyword>COMPILER_VERSION</keyword>
211      <keyword>__DATE__</keyword>
212      <keyword>__FILE__</keyword>
213      <keyword>__LINE__</keyword>
214      <keyword>max_byte</keyword>
215      <keyword>max_dword</keyword>
216      <keyword>max_int</keyword>
217      <keyword>max_sbyte</keyword>
218      <keyword>max_short</keyword>
219      <keyword>max_word</keyword>
220      <keyword>min_byte</keyword>
221      <keyword>min_dword</keyword>
222      <keyword>min_int</keyword>
223      <keyword>min_sbyte</keyword>
224      <keyword>min_short</keyword>
225      <keyword>min_word</keyword>
226      <keyword>null</keyword>
227      <keyword>os_beos</keyword>
228      <keyword>os_bsd</keyword>
229      <keyword>os_dc</keyword>
230      <keyword>os_gp32</keyword>
231      <keyword>os_linux</keyword>
232      <keyword>os_macos</keyword>
233      <keyword>os_win32</keyword>
234      <keyword>status_dead</keyword>
235      <keyword>status_frozen</keyword>
236      <keyword>status_killed</keyword>
237      <keyword>status_running</keyword>
238      <keyword>status_sleeping</keyword>
239      <keyword>status_waiting</keyword>
240      <keyword>__TIME__ </keyword>
241      <keyword>__VERSION__</keyword>
242    </context>
243
244    <context id="bennugd" class="no-spell-check">
245      <include>
246        <context ref="def:c-like-comment"/>
247        <context ref="def:c-like-comment-multiline"/>
248        <context ref="def:c-like-close-comment-outside-comment"/>
249        <context ref="preprocessor"/>
250        <context ref="c:string"/>
251        <context ref="c:char"/>
252        <context ref="boolean"/>
253        <context ref="float"/>
254        <context ref="decimal-number"/>
255        <context ref="hexadecimal-number"/>
256        <context ref="keywords"/>
257        <context ref="globals"/>
258        <context ref="locals"/>
259        <context ref="operators"/>
260        <context ref="types"/>
261        <context ref="commonmacros"/>
262      </include>
263    </context>
264
265  </definitions>
266</language>
267