annotate runtime/syntax/radiance.vim @ 4543:08ac46980953 v7.3.1019

updated for version 7.3.1019 Problem: These do not work with the new regexp engine: \%o123, \%x123, \%d123, \%u123 and \%U123. Solution: Implement these items.
author Bram Moolenaar <bram@vim.org>
date Sat, 25 May 2013 22:04:23 +0200
parents 3fc0f57ecb91
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Radiance Scene Description
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Georg Mischler <schorsch@schorsch.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last change: 26. April. 2001
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Radiance is a lighting simulation software package written
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " by Gregory Ward-Larson ("the computer artist formerly known
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " as Greg Ward"), then at LBNL.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " http://radsite.lbl.gov/radiance/HOME.html
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Of course, there is also information available about it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " from http://www.schorsch.com/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " We take a minimalist approach here, highlighting just the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " essential properties of each object, its type and ID, as well as
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " comments, external command names and the null-modifier "void".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " all printing characters except '#' and '!' are valid in names.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 if version >= 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 setlocal iskeyword=\",$-~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 set iskeyword=\",$-~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " The null-modifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword radianceKeyword void
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " The different kinds of scene description object types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " Reference types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword radianceExtraType contained alias instance
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " Surface types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword radianceSurfType contained ring polygon sphere bubble
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword radianceSurfType contained cone cup cylinder tube source
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Emitting material types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword radianceLightType contained light glow illum spotlight
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Material types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword radianceMatType contained mirror mist prism1 prism2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword radianceMatType contained metal plastic trans
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword radianceMatType contained metal2 plastic2 trans2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword radianceMatType contained metfunc plasfunc transfunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword radianceMatType contained metdata plasdata transdata
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword radianceMatType contained dielectric interface glass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword radianceMatType contained BRTDfunc antimatter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " Pattern modifier types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword radiancePatType contained colorfunc brightfunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword radiancePatType contained colordata colorpict brightdata
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword radiancePatType contained colortext brighttext
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " Texture modifier types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword radianceTexType contained texfunc texdata
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " Mixture types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword radianceMixType contained mixfunc mixdata mixpict mixtext
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " Each type name is followed by an ID.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " This doesn't work correctly if the id is one of the type names of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " same class (which is legal for radiance), in which case the id will get
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " type color as well, and the int count (or alias reference) gets id color.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn region radianceID start="\<alias\>" end="\<\k*\>" contains=radianceExtraType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn region radianceID start="\<instance\>" end="\<\k*\>" contains=radianceExtraType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn region radianceID start="\<source\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn region radianceID start="\<ring\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn region radianceID start="\<polygon\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn region radianceID start="\<sphere\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn region radianceID start="\<bubble\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn region radianceID start="\<cone\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn region radianceID start="\<cup\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn region radianceID start="\<cylinder\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn region radianceID start="\<tube\>" end="\<\k*\>" contains=radianceSurfType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn region radianceID start="\<light\>" end="\<\k*\>" contains=radianceLightType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn region radianceID start="\<glow\>" end="\<\k*\>" contains=radianceLightType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn region radianceID start="\<illum\>" end="\<\k*\>" contains=radianceLightType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn region radianceID start="\<spotlight\>" end="\<\k*\>" contains=radianceLightType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn region radianceID start="\<mirror\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn region radianceID start="\<mist\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn region radianceID start="\<prism1\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn region radianceID start="\<prism2\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn region radianceID start="\<metal\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn region radianceID start="\<plastic\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn region radianceID start="\<trans\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn region radianceID start="\<metal2\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn region radianceID start="\<plastic2\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn region radianceID start="\<trans2\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn region radianceID start="\<metfunc\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn region radianceID start="\<plasfunc\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn region radianceID start="\<transfunc\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn region radianceID start="\<metdata\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn region radianceID start="\<plasdata\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn region radianceID start="\<transdata\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn region radianceID start="\<dielectric\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn region radianceID start="\<interface\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn region radianceID start="\<glass\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn region radianceID start="\<BRTDfunc\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn region radianceID start="\<antimatter\>" end="\<\k*\>" contains=radianceMatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn region radianceID start="\<colorfunc\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn region radianceID start="\<brightfunc\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn region radianceID start="\<colordata\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn region radianceID start="\<brightdata\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn region radianceID start="\<colorpict\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn region radianceID start="\<colortext\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn region radianceID start="\<brighttext\>" end="\<\k*\>" contains=radiancePatType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn region radianceID start="\<texfunc\>" end="\<\k*\>" contains=radianceTexType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn region radianceID start="\<texdata\>" end="\<\k*\>" contains=radianceTexType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn region radianceID start="\<mixfunc\>" end="\<\k*\>" contains=radianceMixType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn region radianceID start="\<mixdata\>" end="\<\k*\>" contains=radianceMixType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn region radianceID start="\<mixtext\>" end="\<\k*\>" contains=radianceMixType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 " external commands (generators, xform et al.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn match radianceCommand "^\s*!\s*[^\s]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 " The usual suspects
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syn keyword radianceTodo contained TODO XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 syn match radianceComment "#.*$" contains=radianceTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 if version >= 508 || !exists("did_radiance_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 let did_radiance_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 HiLink radianceKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 HiLink radianceExtraType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 HiLink radianceSurfType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 HiLink radianceLightType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 HiLink radianceMatType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 HiLink radiancePatType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 HiLink radianceTexType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 HiLink radianceMixType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 HiLink radianceComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 HiLink radianceCommand Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 HiLink radianceID String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 HiLink radianceTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 let b:current_syntax = "radiance"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 " vim: ts=8 sw=2