blob: ad573ae18699777a6134cb96f8a1c20c8dfd8faa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
This file is part of TDE's kate project.
copyright : (C) 2004-2005 by Dominik Haumann
email : dhdev at gmx dot de
copyright : (C) 2004 by Goffart Olivier
email : ogoffart @ kde.org
(brackets coloration)
**********************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; if not, write to the *
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
**********************************************************************
NOTE:
This file defines highlighting rules for both Scheme AND Guile.
Scheme usually has no block comments. Guile has block comments: #! !#
I support these block comments: "Good design means good compromises" :)
Singleline comments are introduced through ';'. In reality EVERY
scheme/guile developer use ';;'. It is indented in emacs in a special way.
That's why I set <comment singleLine=";;">.
As a guile guru tole me it would not make sense to highlight all scheme and
guile procedures (cause then almost everything would be highlighted) I
removed some to have a rather small but "senseful" list of highlighted words.
-->
<language version="1.13" kateversion="2.5"
name="Chicken" section="Scripts"
extensions="*.chicken;*.scm;*.ss;*.scheme;*.meta"
indenter="lisp"
mimetype="text/x-scheme"
author="Dominik Haumann ([email protected]) [modified for Chicken by Nick Zarczynski ([email protected])]"
license="LGPL">
<highlighting>
<list name="operators">
<item> <= </item>
<item> < </item>
<item> = </item>
<item> => </item>
<item> >= </item>
<item> > </item>
<item> - </item>
<item> / </item>
<item> *,* </item>
<item> *) </item>
<item> + </item>
</list>
<list name="characters">
<item> #\nul </item>
<item> #\soh </item>
<item> #\stx </item>
<item> #\etx </item>
<item> #\eot </item>
<item> #\enq </item>
<item> #\ack </item>
<item> #\bel </item>
<item> #\bs </item>
<item> #\ht </item>
<item> #\nl </item>
<item> #\vt </item>
<item> #\np </item>
<item> #\cr </item>
<item> #\so </item>
<item> #\si </item>
<item> #\dle </item>
<item> #\dc1 </item>
<item> #\dc2 </item>
<item> #\dc3 </item>
<item> #\dc4 </item>
<item> #\nak </item>
<item> #\syn </item>
<item> #\etb </item>
<item> #\can </item>
<item> #\em </item>
<item> #\sub </item>
<item> #\esc </item>
<item> #\fs </item>
<item> #\gs </item>
<item> #\rs </item>
<item> #\us </item>
<item> #\space </item>
<item> #\sp </item>
<item> #\newline </item>
<item> #\nl </item>
<item> #\tab </item>
<item> #\ht </item>
<item> #\backspace </item>
<item> #\bs </item>
<item> #\return </item>
<item> #\cr </item>
<item> #\page </item>
<item> #\np </item>
<item> #\null </item>
<item> #\nul </item>
</list>
<list name="defines">
<item> define </item>
<item> define* </item>
<item> define-accessor </item>
<item> define-class </item>
<item> defined? </item>
<item> define-generic </item>
<item> define-macro </item>
<item> define-method </item>
<item> define-module </item>
<item> define-private </item>
<item> define-public </item>
<item> define*-public </item>
<item> define-reader-ctor </item>
<item> define-syntax </item>
<item> define-syntax-macro </item>
<item> defmacro </item>
<item> defmacro* </item>
<item> defmacro*-public </item>
</list>
<list name="keywords">
<item> abs </item>
<item> acos </item>
<item> and </item>
<item> angle </item>
<item> append </item>
<item> applymap </item>
<item> asin </item>
<item> assoc </item>
<item> assq </item>
<item> assv </item>
<item> atan </item>
<item> begin </item>
<item> boolean? </item>
<item> break </item>
<item> caaaar </item>
<item> caaadr </item>
<item> caaar </item>
<item> caadar </item>
<item> caaddr </item>
<item> caadr </item>
<item> caar </item>
<item> cadaar </item>
<item> cadadr </item>
<item> cadar </item>
<item> caddar </item>
<item> cadddr </item>
<item> caddr </item>
<item> cadr </item>
<item> call/cc </item>
<item> call-with-current-continuation </item>
<item> call-with-input-file </item>
<item> call-with-output-file </item>
<item> call-with-values </item>
<item> car </item>
<item> case </item>
<item> catch </item>
<item> cdaaar </item>
<item> cdaadr </item>
<item> cdaar </item>
<item> cdadar </item>
<item> cdaddr </item>
<item> cdadr </item>
<item> cdar </item>
<item> cddaar </item>
<item> cddadr </item>
<item> cddar </item>
<item> cdddar </item>
<item> cddddr </item>
<item> cdddr </item>
<item> cddr </item>
<item> cdr </item>
<item> ceiling </item>
<item> char-alphabetic? </item>
<item> char-ci>=? </item>
<item> char-ci>? </item>
<item> char-ci=? </item>
<item> char-ci<=? </item>
<item> char-downcase </item>
<item> char->integer </item>
<item> char>=? </item>
<item> char>? </item>
<item> char=? </item>
<item> char? </item>
<item> char-lower-case? </item>
<item> char<?c </item>
<item> char<=? </item>
<item> char-numeric? </item>
<item> char-ready? </item>
<item> char-upcase </item>
<item> char-upper-case? </item>
<item> char-whitespace? </item>
<item> close-input-port </item>
<item> close-output-port </item>
<item> complex? </item>
<item> cond </item>
<item> cons </item>
<item> continue </item>
<item> cos </item>
<item> current-input-port </item>
<item> current-output-port </item>
<item> denominator </item>
<item> display </item>
<item> do </item>
<item> dynamic-wind </item>
<item> else </item>
<item> eof-object? </item>
<item> eq? </item>
<item> equal? </item>
<item> eqv? </item>
<item> eval </item>
<item> even? </item>
<item> exact->inexact </item>
<item> exact? </item>
<item> exp </item>
<item> expt </item>
<item> floor </item>
<item> force </item>
<item> for-each </item>
<item> gcd </item>
<item> har-ci<? </item>
<item> if </item>
<item> imag-part </item>
<item> inexact->exact </item>
<item> inexact? </item>
<item> input-port? </item>
<item> integer->char </item>
<item> integer? </item>
<item> interaction-environment </item>
<item> lambda </item>
<item> lcm </item>
<item> length </item>
<item> let </item>
<item> let* </item>
<item> letrec </item>
<item> letrec-syntax </item>
<item> let-syntax </item>
<item> list->string </item>
<item> list </item>
<item> list? </item>
<item> list-ref </item>
<item> list-tail </item>
<item> load </item>
<item> log </item>
<item> magnitude </item>
<item> make-polar </item>
<item> make-rectangular </item>
<item> make-string </item>
<item> make-vector </item>
<item> max </item>
<item> member </item>
<item> memq </item>
<item> memv </item>
<item> min </item>
<item> modulo </item>
<item> negative? </item>
<item> newline </item>
<item> not </item>
<item> null-environment </item>
<item> null? </item>
<item> number? </item>
<item> number->string </item>
<item> numerator </item>
<item> odd? </item>
<item> open-input-file </item>
<item> open-output-file </item>
<item> or </item>
<item> output-port? </item>
<item> pair? </item>
<item> peek-char </item>
<item> port? </item>
<item> positive? </item>
<item> procedure? </item>
<item> quotient </item>
<item> rational? </item>
<item> rationalize </item>
<item> read-char </item>
<item> read </item>
<item> real? </item>
<item> real-part </item>
<item> remainder </item>
<item> reverse </item>
<item> round </item>
<item> scheme-report-environment </item>
<item> set-car! </item>
<item> set-cdr! </item>
<item> sin </item>
<item> sqrt </item>
<item> string-append </item>
<item> string-ci>=? </item>
<item> string-ci>? </item>
<item> string-ci=? </item>
<item> string-ci<=? </item>
<item> string-ci<? </item>
<item> string-copy </item>
<item> string-fill! </item>
<item> string>=? </item>
<item> string>? </item>
<item> string->list </item>
<item> string->number </item>
<item> string->symbol </item>
<item> string=? </item>
<item> string </item>
<item> string? </item>
<item> string-length </item>
<item> string<=? </item>
<item> string<? </item>
<item> string-ref </item>
<item> string-set! </item>
<item> substring </item>
<item> symbol->string </item>
<item> symbol? </item>
<item> syntax-rules </item>
<item> tan </item>
<item> transcript-off </item>
<item> transcript-on </item>
<item> truncate </item>
<item> values </item>
<item> vector-fill! </item>
<item> vector->listlist->vector </item>
<item> vector </item>
<item> vector? </item>
<item> vector-length </item>
<item> vector-ref </item>
<item> vector-set! </item>
<item> while </item>
<item> with-input-from-file </item>
<item> with-output-to-file </item>
<item> write-char </item>
<item> write </item>
<item> zero? </item>
</list>
<contexts>
<context name="Level0" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets1" context="Level1" char="("/>
<IncludeRules context="Default" />
</context>
<context name="Default" attribute="Normal" lineEndContext="#stay">
<RegExpr attribute="Region Marker" context="#stay" String=";+\s*BEGIN.*$" beginRegion="region"/>
<RegExpr attribute="Region Marker" context="#stay" String=";+\s*END.*$" endRegion="region"/>
<RegExpr attribute="Comment" context="#stay" String=";.*$"/>
<keyword attribute="Keyword" context="#stay" String="keywords"/>
<keyword attribute="Operator" context="#stay" String="operators"/>
<keyword attribute="Definition" context="function_decl" String="defines"/>
<keyword attribute="Char" context="#stay" String="characters"/>
<RegExpr attribute="Char" context="#stay" String="#\\."/>
<DetectChar attribute="String" context="String" char="""/>
<RegExpr attribute="Char" context="SpecialNumber" String="#[bodxei]"/>
<RegExpr attribute="Decimal" context="#stay" String="#[tf]"/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
<DetectChar attribute="Brackets1" context="Level1" char="("/>
</context>
<context name="SpecialNumber" attribute="Normal" fallthrough="true" lineEndContext="#pop">
<RegExpr attribute="Decimal" context="#pop" String="\d*(\.\d+)?"/>
</context>
<context name="String" attribute="String" lineEndContext="#stay">
<keyword attribute="Char" context="#stay" String="characters"/>
<RegExpr attribute="Char" context="#stay" String="#\\."/>
<Detect2Chars attribute="Char" context="#stay" char="\" char1="""/>
<Detect2Chars attribute="Char" context="#stay" char="\" char1="\"/>
<DetectChar attribute="String" context="#pop" char="""/>
</context>
<context name="function_decl" attribute="Function" lineEndContext="#stay">
<RegExpr attribute="Function" context="#pop" String="\s*[A-Za-z0-9-+\<\>//\*]*\s*" />
</context>
<context name="Level1" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets2" context="Level2" char="("/>
<DetectChar attribute="Brackets1" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
<context name="Level2" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets3" context="Level3" char="("/>
<DetectChar attribute="Brackets2" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
<context name="Level3" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets4" context="Level4" char="("/>
<DetectChar attribute="Brackets3" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
<context name="Level4" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets5" context="Level5" char="("/>
<DetectChar attribute="Brackets4" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
<context name="Level5" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets6" context="Level6" char="("/>
<DetectChar attribute="Brackets5" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
<context name="Level6" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets1" context="Level1" char="("/>
<DetectChar attribute="Brackets6" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal" defStyleNum="dsNormal"/>
<itemData name="Keyword" defStyleNum="dsKeyword"/>
<itemData name="Definition" defStyleNum="dsKeyword" color="#d22811"/>
<itemData name="Operator" defStyleNum="dsKeyword" color="#d22811"/>
<itemData name="Function" defStyleNum="dsFunction"/>
<itemData name="Data" defStyleNum="dsDataType"/>
<itemData name="Decimal" defStyleNum="dsDecVal"/>
<itemData name="BaseN" defStyleNum="dsBaseN"/>
<itemData name="Float" defStyleNum="dsFloat"/>
<itemData name="Char" defStyleNum="dsChar"/>
<itemData name="String" defStyleNum="dsString"/>
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Region Marker" defStyleNum="dsRegionMarker"/>
<itemData name="Brackets1" defStyleNum="dsNormal" color="#ff0000" selColor="#000000" bold="1" italic="0"/>
<itemData name="Brackets2" defStyleNum="dsNormal" color="#ff8800" selColor="#000000" bold="1" italic="0"/>
<itemData name="Brackets3" defStyleNum="dsNormal" color="#888800" selColor="#000000" bold="1" italic="0"/>
<itemData name="Brackets4" defStyleNum="dsNormal" color="#008800" selColor="#000000" bold="1" italic="0"/>
<itemData name="Brackets5" defStyleNum="dsNormal" color="#000088" selColor="#000000" bold="1" italic="0"/>
<itemData name="Brackets6" defStyleNum="dsNormal" color="#880088" selColor="#000000" bold="1" italic="0"/>
</itemDatas>
</highlighting>
<general>
<keywords casesensitive="1" weakDeliminator="-+*?!<>=/:#\"/>
<comments>
<comment name="singleLine" start=";;" />
</comments>
</general>
</language>
|