blob: 134792ac1127e0f4e411f3da7b9c48a4a5c6175d (
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
|
" Vim syntax file
" Language: Radiance Scene Description
" Maintainer: Georg Mischler <schorsch@schorsch.com>
" Last change: 26. April. 2001
" Radiance is a lighting simulation software package written
" by Gregory Ward-Larson ("the computer artist formerly known
" as Greg Ward"), then at LBNL.
"
" http://radsite.lbl.gov/radiance/HOME.html
"
" Of course, there is also information available about it
" from http://www.schorsch.com/
" We take a minimalist approach here, highlighting just the
" essential properties of each object, its type and ID, as well as
" comments, external command names and the null-modifier "void".
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" all printing characters except '#' and '!' are valid in names.
setlocal iskeyword=\",$-~
" The null-modifier
syn keyword radianceKeyword void
" The different kinds of scene description object types
" Reference types
syn keyword radianceExtraType contained alias instance
" Surface types
syn keyword radianceSurfType contained ring polygon sphere bubble
syn keyword radianceSurfType contained cone cup cylinder tube source
" Emitting material types
syn keyword radianceLightType contained light glow illum spotlight
" Material types
syn keyword radianceMatType contained mirror mist prism1 prism2
syn keyword radianceMatType contained metal plastic trans
syn keyword radianceMatType contained metal2 plastic2 trans2
syn keyword radianceMatType contained metfunc plasfunc transfunc
syn keyword radianceMatType contained metdata plasdata transdata
syn keyword radianceMatType contained dielectric interface glass
syn keyword radianceMatType contained BRTDfunc antimatter
" Pattern modifier types
syn keyword radiancePatType contained colorfunc brightfunc
syn keyword radiancePatType contained colordata colorpict brightdata
syn keyword radiancePatType contained colortext brighttext
" Texture modifier types
syn keyword radianceTexType contained texfunc texdata
" Mixture types
syn keyword radianceMixType contained mixfunc mixdata mixpict mixtext
" Each type name is followed by an ID.
" This doesn't work correctly if the id is one of the type names of the
" same class (which is legal for radiance), in which case the id will get
" type color as well, and the int count (or alias reference) gets id color.
syn region radianceID start="\<alias\>" end="\<\k*\>" contains=radianceExtraType
syn region radianceID start="\<instance\>" end="\<\k*\>" contains=radianceExtraType
syn region radianceID start="\<source\>" end="\<\k*\>" contains=radianceSurfType
syn region radianceID start="\<ring\>" end="\<\k*\>" contains=radianceSurfType
syn region radianceID start="\<polygon\>" end="\<\k*\>" contains=radianceSurfType
syn region radianceID start="\<sphere\>" end="\<\k*\>" contains=radianceSurfType
syn region radianceID start="\<bubble\>" end="\<\k*\>" contains=radianceSurfType
syn region radianceID start="\<cone\>" end="\<\k*\>" contains=radianceSurfType
syn region radianceID start="\<cup\>" end="\<\k*\>" contains=radianceSurfType
syn region radianceID start="\<cylinder\>" end="\<\k*\>" contains=radianceSurfType
syn region radianceID start="\<tube\>" end="\<\k*\>" contains=radianceSurfType
syn region radianceID start="\<light\>" end="\<\k*\>" contains=radianceLightType
syn region radianceID start="\<glow\>" end="\<\k*\>" contains=radianceLightType
syn region radianceID start="\<illum\>" end="\<\k*\>" contains=radianceLightType
syn region radianceID start="\<spotlight\>" end="\<\k*\>" contains=radianceLightType
syn region radianceID start="\<mirror\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<mist\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<prism1\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<prism2\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<metal\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<plastic\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<trans\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<metal2\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<plastic2\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<trans2\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<metfunc\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<plasfunc\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<transfunc\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<metdata\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<plasdata\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<transdata\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<dielectric\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<interface\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<glass\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<BRTDfunc\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<antimatter\>" end="\<\k*\>" contains=radianceMatType
syn region radianceID start="\<colorfunc\>" end="\<\k*\>" contains=radiancePatType
syn region radianceID start="\<brightfunc\>" end="\<\k*\>" contains=radiancePatType
syn region radianceID start="\<colordata\>" end="\<\k*\>" contains=radiancePatType
syn region radianceID start="\<brightdata\>" end="\<\k*\>" contains=radiancePatType
syn region radianceID start="\<colorpict\>" end="\<\k*\>" contains=radiancePatType
syn region radianceID start="\<colortext\>" end="\<\k*\>" contains=radiancePatType
syn region radianceID start="\<brighttext\>" end="\<\k*\>" contains=radiancePatType
syn region radianceID start="\<texfunc\>" end="\<\k*\>" contains=radianceTexType
syn region radianceID start="\<texdata\>" end="\<\k*\>" contains=radianceTexType
syn region radianceID start="\<mixfunc\>" end="\<\k*\>" contains=radianceMixType
syn region radianceID start="\<mixdata\>" end="\<\k*\>" contains=radianceMixType
syn region radianceID start="\<mixtext\>" end="\<\k*\>" contains=radianceMixType
" external commands (generators, xform et al.)
syn match radianceCommand "^\s*!\s*[^\s]\+\>"
" The usual suspects
syn keyword radianceTodo contained TODO XXX
syn match radianceComment "#.*$" contains=radianceTodo
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
HiLink radianceKeyword Keyword
HiLink radianceExtraType Type
HiLink radianceSurfType Type
HiLink radianceLightType Type
HiLink radianceMatType Type
HiLink radiancePatType Type
HiLink radianceTexType Type
HiLink radianceMixType Type
HiLink radianceComment Comment
HiLink radianceCommand Function
HiLink radianceID String
HiLink radianceTodo Todo
delcommand HiLink
let b:current_syntax = "radiance"
" vim: ts=8 sw=2
|