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