-
Notifications
You must be signed in to change notification settings - Fork 2
/
freeciv.kld
67 lines (63 loc) · 1.96 KB
/
freeciv.kld
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
* Keditw32 1.6.x syntax coloring for Freeciv rulesets
* The output is designed for ?color A (comments) red and
* ?color G (header lines) dark green. This can be set in
* a "per file" (reprof on) WINPROF.KEX or similar by:
* if FCIV() then do /* freeciv: swap red green */
* C = 'FREECIV' ; 'parser' C C || '.KLD'
* 'ecolor A red' ; 'ecolor G dark green'
* 'pcolor A red' ; 'pcolor G dark green'
* 'coloring on' C
* end
* FCIV: procedure /* lots of special cases */
* FCIV = 'MUSICSPEC RULESET SOUNDSPEC SPEC TILESPEC'
* if TYPE( FCIV 'SAV' ) then return 1
* FCIV = 'HELPDATA.TXT MODPACKS.DB MODPACKS.LIST'
* if FILE( FCIV ) then return 1
* return NAME( '.FREECIV-CLIENT-RC-2' )
* TYPE: return WPOS( arg( 1 ), ft.1())
* NAME: return WPOS( arg( 1 ), fn.1())
* FILE: return WPOS( arg( 1 ), fn.1() || . || ft.1())
* WPOS: return sign( wordpos( arg( 2 ), arg( 1 )))
:case
*utility/section_file.c entry_from_token()
ignore
:header
*header coloring for comments
line ; any
line # any
:comment
*comment coloring for headers permits paired [ ]
paired [ ] nonest single
line *include column 1
:identifier
*utility/registry_ini.c is_secfile_entry_name_valid()
*[A-Z_0-9\-\.\,\[\]]
*ignore comma, it clobbers coloring in vectors/tables.
*ignore '[' and ']', paired [] handled above, unclear.
*require leading letter, and trailing letter or digit,
[A-Z] [A-Z0-9\-\.\_\[] [A-Z0-9\]]
:keyword
TRUE
FALSE
:label
*color NAME in NAME = VALUE
delimiter = firstnonblank
:match
_( )
{ }
:number
decimal
:string
*multiline escaped (backslash)
double multiline backslash
*multiline unescaped (verbatim)
delimiter $ multiline
*include *FILE* content as a string
delimiter *
:postcompare
*blue comma in NAME = VAL1, VAL2, ...
text , alternate 9
*red single quote (unclear)
text ' alternate 1
*red backslash not in string
text \ alternate 1