blob: 3d2235ffcb82bfd5ac61544214626268058b50af [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: Renderman Interface Bytestream
3" Maintainer: Andrew Bromage <ajb@spamcop.net>
4" Last Change: 2003 May 11
5"
6
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02007" quit when a syntax file was already loaded
8if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +00009 finish
10endif
11
12syn case match
13
14" Comments
15syn match ribLineComment "#.*$"
16syn match ribStructureComment "##.*$"
17
18syn case ignore
19syn match ribCommand /[A-Z][a-zA-Z]*/
20syn case match
21
22syn region ribString start=/"/ skip=/\\"/ end=/"/
23
24syn match ribStructure "[A-Z][a-zA-Z]*Begin\>\|[A-Z][a-zA-Z]*End"
25syn region ribSectionFold start="FrameBegin" end="FrameEnd" fold transparent keepend extend
26syn region ribSectionFold start="WorldBegin" end="WorldEnd" fold transparent keepend extend
27syn region ribSectionFold start="TransformBegin" end="TransformEnd" fold transparent keepend extend
28syn region ribSectionFold start="AttributeBegin" end="AttributeEnd" fold transparent keepend extend
29syn region ribSectionFold start="MotionBegin" end="MotionEnd" fold transparent keepend extend
30syn region ribSectionFold start="SolidBegin" end="SolidEnd" fold transparent keepend extend
31syn region ribSectionFold start="ObjectBegin" end="ObjectEnd" fold transparent keepend extend
32
33syn sync fromstart
34
35"integer number, or floating point number without a dot and with "f".
36syn case ignore
37syn match ribNumbers display transparent "[-]\=\<\d\|\.\d" contains=ribNumber,ribFloat
38syn match ribNumber display contained "[-]\=\d\+\>"
39"floating point number, with dot, optional exponent
40syn match ribFloat display contained "[-]\=\d\+\.\d*\(e[-+]\=\d\+\)\="
41"floating point number, starting with a dot, optional exponent
42syn match ribFloat display contained "[-]\=\.\d\+\(e[-+]\=\d\+\)\=\>"
43"floating point number, without dot, with exponent
44syn match ribFloat display contained "[-]\=\d\+e[-+]\d\+\>"
45syn case match
46
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020047command -nargs=+ HiLink hi def link <args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000048
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020049HiLink ribStructure Structure
50HiLink ribCommand Statement
Bram Moolenaar071d4272004-06-13 20:20:40 +000051
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020052HiLink ribStructureComment SpecialComment
53HiLink ribLineComment Comment
Bram Moolenaar071d4272004-06-13 20:20:40 +000054
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020055HiLink ribString String
56HiLink ribNumber Number
57HiLink ribFloat Float
Bram Moolenaar071d4272004-06-13 20:20:40 +000058
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020059delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +000060
61
62let b:current_syntax = "rib"
63
64" Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim