/
fson-ffl.xml
438 lines (405 loc) · 23 KB
/
fson-ffl.xml
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
438
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!-- I am a Kate syntax highlighting file.
To use me, put me in with the rest of your Kate highlighting files. (eg, /usr/share/apps/katepart/syntax/)
I add an entry under 'markup', and cause .cfg files to default to using me.
In addition, I recommend using the 'python' indentation style. (tools -> indentation -> python) -->
<language name="Frogatto FSON-FFL" priority="2" section="Markup" extensions="*.cfg" version="2.0.0" kateversion="3.6.5" casesensitive="yes" author="DDR (robertsdavidddr@gmail.com)" license="Frogatto">
<highlighting>
<list name="known objects">
<!--Start Engine Tags-->
<item> prototype </item>
<item> object </item>
<item> object_type </item>
<item> properties </item>
<item> vars </item>
<item> consts </item>
<item> animation </item>
<item> control_schemes </item>
<item> button </item>
<item> font </item>
<item> chars </item>
<item> editor </item>
<item> tileset </item>
<item> preview </item>
<item> functions </item>
<item> function </item>
<item> gui </item>
<item> section </item>
<item> framed_gui_element </item>
<item> leaderboards </item>
<item> leaderboard </item>
<item> level </item>
<item> character </item>
<item> portal </item>
<item> background </item>
<item> tile_map </item>
<item> serialized_objects </item>
<item> water </item>
<item> powerups </item>
<item> powerup </item>
<item> icon </item>
<item> set_str </item>
<item> children </item>
<item> preloads </item>
<item> preload </item>
<item> schema </item>
<item> test </item>
<item> characters </item>
<item> frames </item>
<item> current_generator </item>
<item> tiles </item>
<item> achievements </item>
<item> achievement </item>
<item> level_index </item>
<item> compiled_tiles </item>
<item> particle_system </item>
<item> editor_info </item>
<item> var </item>
<item> tile_pattern </item>
<item> tmp </item>
<item> object_prototype </item>
<item> object_variation </item>
<item> set </item>
<item> objects_destroyed </item>
<item> area </item>
<item> solid </item>
<item> solid_rect </item>
<item> base </item> <!-- Used for [basex] tags. -->
<item> script </item>
<item> modification </item>
<item> frame </item>
<item> light </item>
<!--Start Common Engine Events-->
<item> on_start_level </item>
<item> on_player_death </item>
<item> on_load </item>
<item> on_load_checkpoint </item>
<item> on_create </item>
<item> on_done_create </item>
<item> on_become_active </item>
<item> on_surface_damage </item>
<item> on_enter_anim </item>
<item> on_end_anim </item>
<item> on_collide_level </item>
<item> on_collide_head </item>
<item> on_collide_feet </item>
<item> on_collide_damage </item>
<item> on_collide_side </item>
<item> on_stuck </item>
<item> on_jumped_on </item>
<item> on_get_hit </item>
<item> on_process </item>
<item> on_timer </item>
<item> on_enter_water </item>
<item> on_exit_water </item>
<item> on_change_solid_dimensions_fail </item>
<item> on_add_object_fail </item>
<item> on_change_animation_failure </item>
<item> on_die </item>
<!--<item> on_interact </item> Probably not engine.-->
<item> on_child_spawned </item>
<item> on_spawned </item>
<item> on_draw </item>
<item> on_begin_dialog </item>
<item> on_cosmic_shift </item>
<!--Start Player Engine Events-->
<item> on_ctrl_up </item>
<item> on_ctrl_down </item>
<item> on_ctrl_left </item>
<item> on_ctrl_right </item>
<item> on_ctrl_jump </item>
<item> on_ctrl_tongue </item>
<item> on_ctrl_debug </item>
</list>
<contexts>
<!-- Outside FSON Section-->
<context name="start doc" attribute="error" fallthrough="true" fallthroughContext="error" >
<DetectChar attribute="normal" context="base fson" char="{" />
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
</context>
<context name="finish doc" attribute="error" >
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
</context>
<!-- FSON Section -->
<context name="base fson" attribute="normal" fallthrough="true" fallthroughContext="fson error" >
<keyword attribute="known object" context="known object colon-val map chain" String="known objects" />
<DetectIdentifier attribute="unknown object" context="unknown object colon-val map chain" />
<RegExpr attribute="normal" context="object colon-val map chain" String=""[A-Z a-z 0-9 \* \_ \- \~]+"" minimal="true" />
<RegExpr attribute="bold" context="object colon-val map chain" String=""[A-Z a-z 0-9 \* \_ \- \@ \~]+"" minimal="true" />
<DetectChar attribute="normal" context="finish doc" char="}" />
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<DetectSpaces />
</context>
<context name="fson" attribute="normal" fallthrough="true" fallthroughContext="fson error" >
<RegExpr attribute="normal" context="object colon-val map chain" String=""[A-Z a-z 0-9 \* \_ \- \~]+"" minimal="true" />
<RegExpr attribute="bold" context="object colon-val map chain" String=""[A-Z a-z 0-9 \* \_ \- \@ \~]+"" minimal="true" />
<DetectIdentifier attribute="normal" context="object colon-val map chain" />
<DetectChar attribute="normal" context="#pop" char="}" lookAhead="true"/>
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<DetectSpaces />
</context>
<context name="unknown object colon-val map chain" attribute="unknown object" fallthrough="true" fallthroughContext="fson error" >
<DetectChar attribute="unknown object" context="fson atom, map" char=":"/>
<DetectChar attribute="unknown object" context="#pop" char="}"/>
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
<DetectChar attribute="unknown object" context="#stay" char="*" />
<DetectChar attribute="small error" context="#stay" char="/" />
</context>
<context name="known object colon-val map chain" attribute="known object" fallthrough="true" fallthroughContext="fson error" >
<DetectChar attribute="known object" context="fson atom, map" char=":"/>
<DetectChar attribute="known object" context="#pop" char="}"/>
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
<DetectChar attribute="known object" context="#stay" char="*" />
<DetectChar attribute="small error" context="#stay" char="/" />
</context>
<context name="object colon-val map chain" attribute="normal" fallthrough="true" fallthroughContext="fson error" >
<DetectChar attribute="normal" context="fson atom, map" char=":"/>
<DetectChar attribute="normal" context="#pop" char="}"/>
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
<DetectChar attribute="normal" context="#stay" char="*" />
<DetectChar attribute="small error" context="#stay" char="/" />
</context>
<context name="fson atom, map" attribute="normal" fallthrough="true" fallthroughContext="fson error" >
<DetectChar attribute="formula language" context="ffl 3" char="""/> <!-- FFL string -->
<DetectChar attribute="formula language" context="fson string 3" char="'"/> <!-- fson string -->
<DetectChar attribute="formula language" context="fson translatable string 3" char="~"/> <!-- fson string -->
<Float attribute="number" context="find comma 3" /> <!-- Positive Numbers -->
<Int attribute="number" context="find comma 3" />
<DetectChar attribute="number" context="negative 3" char="-" /> <!-- Negative Numbers -->
<DetectChar attribute="normal" context="fson" char="{" beginRegion="map" /> <!-- Maps -->
<DetectChar attribute="normal" context="find comma 3" char="}" endRegion="map" />
<DetectChar attribute="normal" context="fson atom, list" char="[" beginRegion="list" /> <!-- Lists, returns ]. -->
<DetectChar attribute="normal" context="find comma 3" char="]" endRegion="list" />
<StringDetect attribute="normal" context="find comma 3" String="true" />
<StringDetect attribute="normal" context="find comma 3" String="false" />
<StringDetect attribute="normal" context="find comma 3" String="null" />
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
<DetectChar attribute="small error" context="#stay" char="/" />
</context>
<context name="fson atom, list" attribute="normal" fallthrough="true" fallthroughContext="fson error" >
<DetectChar attribute="formula language" context="ffl 1" char="""/> <!-- FFL string -->
<DetectChar attribute="formula language" context="fson string 1" char="'"/> <!-- fson string -->
<DetectChar attribute="formula language" context="fson translatable string 1" char="~"/> <!-- fson ~ string -->
<Float attribute="number" context="find comma 1" /> <!-- Positive Numbers -->
<Int attribute="number" context="find comma 1" />
<DetectChar attribute="number" context="negative 1" char="-" /> <!-- Negative Numbers -->
<DetectChar attribute="normal" context="fson" char="{" beginRegion="map" /> <!-- Maps -->
<DetectChar attribute="normal" context="find comma 1" char="}" endRegion="map" />
<DetectChar attribute="normal" context="fson atom, list, #2" char="[" beginRegion="list" /> <!-- Lists, swallows ]. -->
<StringDetect attribute="normal" context="find comma 1" String="true" />
<StringDetect attribute="normal" context="find comma 1" String="false" />
<StringDetect attribute="normal" context="find comma 1" String="null" />
<DetectChar attribute="normal" context="#pop" char="]" lookAhead="true"/> <!-- exit -->
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<DetectSpaces />
</context>
<context name="fson atom, list, #2" attribute="normal" fallthrough="true" fallthroughContext="fson error" >
<DetectChar attribute="formula language" context="ffl 1" char="""/> <!-- FFL string -->
<DetectChar attribute="formula language" context="fson string 1" char="'"/> <!-- fson string -->
<DetectChar attribute="formula language" context="fson translatable string 1" char="~"/> <!-- fson ~ string -->
<Float attribute="number" context="find comma 1" /> <!-- Positive Numbers -->
<Int attribute="number" context="find comma 1" />
<DetectChar attribute="number" context="negative 1" char="-" /> <!-- Negative Numbers -->
<DetectChar attribute="normal" context="fson" char="{" beginRegion="map" /> <!-- Maps -->
<DetectChar attribute="normal" context="find comma 1" char="}" endRegion="map" />
<DetectChar attribute="normal" context="fson atom, list, #2" char="[" beginRegion="list" /> <!-- Lists, recurses (at last!), swallows ]. -->
<StringDetect attribute="normal" context="find comma 1" String="true" />
<StringDetect attribute="normal" context="find comma 1" String="false" />
<StringDetect attribute="normal" context="find comma 1" String="null" />
<DetectChar attribute="normal" context="find comma 2" char="]" endRegion="list" /> <!-- exit -->
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<DetectSpaces />
</context>
<context name="ffl 3" attribute="formula language" >
<DetectChar attribute="formula language" context="find comma 4" char="""/>
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="legacy multiple line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
</context>
<context name="ffl 2" attribute="formula language" >
<DetectChar attribute="formula language" context="find comma 3" char="""/>
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="legacy multiple line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
</context>
<context name="ffl 1" attribute="formula language" >
<DetectChar attribute="formula language" context="find comma 2" char="""/>
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="legacy multiple line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
</context>
<context name="fson string 3" attribute="formula language" >
<DetectChar attribute="formula language" context="find comma 4" char="'"/>
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="legacy multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
</context>
<context name="fson string 1" attribute="formula language" >
<DetectChar attribute="formula language" context="find comma 2" char="'"/>
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="legacy multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
</context>
<context name="fson translatable string 3" attribute="formula language" >
<DetectChar attribute="formula language" context="find comma 4" char="~"/>
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="legacy multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
</context>
<context name="fson translatable string 1" attribute="formula language" >
<DetectChar attribute="formula language" context="find comma 2" char="~"/>
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="legacy multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
</context>
<context name="negative 3" attribute="number" fallthrough="true" fallthroughContext="fson error" >
<Float attribute="number" context="find comma 4" />
<Int attribute="number" context="find comma 4" />
</context>
<context name="negative 1" attribute="number" fallthrough="true" fallthroughContext="fson error" >
<Float attribute="number" context="find comma 2" />
<Int attribute="number" context="find comma 2" />
</context>
<!-- Comma Return Depths -->
<context name="find comma 4" attribute="normal" fallthrough="true" fallthroughContext="fson error" >
<DetectChar attribute="normal" context="#pop#pop#pop#pop" char="," />
<DetectChar attribute="normal" context="#pop#pop#pop#pop" char="}" lookAhead="true" />
<DetectChar attribute="normal" context="#pop#pop#pop#pop" char="]" lookAhead="true" />
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
<DetectChar attribute="small error" context="#stay" char="/" />
</context>
<context name="find comma 3" attribute="normal" fallthrough="true" fallthroughContext="fson error" >
<DetectChar attribute="normal" context="#pop#pop#pop" char="," />
<DetectChar attribute="normal" context="#pop#pop#pop" char="}" lookAhead="true" />
<DetectChar attribute="normal" context="#pop#pop#pop" char="]" lookAhead="true" />
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
<DetectChar attribute="small error" context="#stay" char="/" />
</context>
<context name="find comma 2" attribute="normal" fallthrough="true" fallthroughContext="fson error" >
<DetectChar attribute="normal" context="#pop#pop" char="," />
<DetectChar attribute="normal" context="#pop#pop" char="}" lookAhead="true" />
<DetectChar attribute="normal" context="#pop#pop" char="]" lookAhead="true" />
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
<DetectChar attribute="small error" context="#stay" char="/" />
</context>
<context name="find comma 1" attribute="normal" fallthrough="true" fallthroughContext="fson error" >
<DetectChar attribute="normal" context="#pop" char="," />
<DetectChar attribute="normal" context="#pop" char="}" lookAhead="true" />
<DetectChar attribute="normal" context="#pop" char="]" lookAhead="true" />
<!-- FSON Comment Triggers -->
<Detect2Chars attribute="comment" context="single line comment" char="/" char1="/" />
<DetectChar attribute="comment" context="single line comment" char="#" />
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<!-- Exceptions -->
<DetectSpaces />
<DetectChar attribute="small error" context="#stay" char="/" />
</context>
<!-- comments & errors-->
<context name="single line comment" attribute="comment" lineEndContext="#pop" />
<context name="c-style multiple line comment" attribute="comment" >
<Detect2Chars attribute="comment" context="c-style multiple line comment" char="/" char1="*" beginRegion="comment" />
<Detect2Chars attribute="comment" context="#pop" char="*" char1="/" endRegion="comment" />
</context>
<context name="legacy multiple line comment" attribute="comment" >
<DetectChar attribute="comment" context="#pop" char="#" endRegion="comment" />
</context>
<context name="error" attribute="error" lineEndContext="#pop" />
<context name="fson error" attribute="error" lineEndContext="base fson" />
</contexts>
<itemDatas>
<itemData name="comment" defStyleNum="dsComment" />
<itemData name="error" defStyleNum="dsNormal" color="#FF0000" />
<itemData name="small error" defStyleNum="dsError" bold="true" />
<itemData name="normal" defStyleNum="dsNormal" />
<itemData name="bold" defStyleNum="dsBold" bold="true" />
<itemData name="known object" defStyleNum="dsFunction" color="#CC3096" />
<itemData name="unknown object" defStyleNum="dsFunction" />
<itemData name="formula language" defStyleNum="dsNormal" color="#604020" />
<itemData name="number" defStyleNum="dsDecVal" />
<itemData name="g" defStyleNum="dsNormal" color="#11AA22" />
</itemDatas>
</highlighting>
<general>
<keywords casesensitive="1" />
<folding indentationsensitive="0" />
<comments>
<comment name="singleLine" start="//" />
<comment name="multiLine" start="/*" end="*/" region="comment" />
</comments>
</general>
</language>