2 " Language: Renderman Interface Bytestream
3 " Maintainer: Andrew Bromage <ajb@spamcop.net>
4 " Last Change: 2003 May 11
7 " Remove any old syntax stuff hanging around
10 elseif exists("b:current_syntax")
17 syn match ribLineComment "#.*$"
18 syn match ribStructureComment "##.*$"
21 syn match ribCommand /[A-Z][a-zA-Z]*/
24 syn region ribString start=/"/ skip=/\\"/ end=/"/
26 syn match ribStructure "[A-Z][a-zA-Z]*Begin\>\|[A-Z][a-zA-Z]*End"
27 syn region ribSectionFold start="FrameBegin" end="FrameEnd" fold transparent keepend extend
28 syn region ribSectionFold start="WorldBegin" end="WorldEnd" fold transparent keepend extend
29 syn region ribSectionFold start="TransformBegin" end="TransformEnd" fold transparent keepend extend
30 syn region ribSectionFold start="AttributeBegin" end="AttributeEnd" fold transparent keepend extend
31 syn region ribSectionFold start="MotionBegin" end="MotionEnd" fold transparent keepend extend
32 syn region ribSectionFold start="SolidBegin" end="SolidEnd" fold transparent keepend extend
33 syn region ribSectionFold start="ObjectBegin" end="ObjectEnd" fold transparent keepend extend
37 "integer number, or floating point number without a dot and with "f".
39 syn match ribNumbers display transparent "[-]\=\<\d\|\.\d" contains=ribNumber,ribFloat
40 syn match ribNumber display contained "[-]\=\d\+\>"
41 "floating point number, with dot, optional exponent
42 syn match ribFloat display contained "[-]\=\d\+\.\d*\(e[-+]\=\d\+\)\="
43 "floating point number, starting with a dot, optional exponent
44 syn match ribFloat display contained "[-]\=\.\d\+\(e[-+]\=\d\+\)\=\>"
45 "floating point number, without dot, with exponent
46 syn match ribFloat display contained "[-]\=\d\+e[-+]\d\+\>"
49 if version >= 508 || !exists("did_rib_syntax_inits")
51 let did_rib_syntax_inits = 1
52 command -nargs=+ HiLink hi link <args>
54 command -nargs=+ HiLink hi def link <args>
57 HiLink ribStructure Structure
58 HiLink ribCommand Statement
60 HiLink ribStructureComment SpecialComment
61 HiLink ribLineComment Comment
63 HiLink ribString String
64 HiLink ribNumber Number
71 let b:current_syntax = "rib"
73 " Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim