2 " Language: TSS (Thermal Synthesizer System) Geometry
3 " Maintainer: Adrian Nagle, anagle@ball.com
4 " Last Change: 2001 May 10
6 " URL: http://www.naglenet.org/vim/syntax/tssgm.vim
7 " MAIN URL: http://www.naglenet.org/vim/
11 " For version 5.x: Clear all syntax items
12 " For version 6.x: Quit when a syntax file was already loaded
15 elseif exists("b:current_syntax")
28 " Begin syntax definitions for tss geomtery file.
31 " Define keywords for TSS
32 syn keyword tssgmParam units mirror param active sides submodel include
33 syn keyword tssgmParam iconductor nbeta ngamma optics material thickness color
34 syn keyword tssgmParam initial_temp
35 syn keyword tssgmParam initial_id node_ids node_add node_type
36 syn keyword tssgmParam gamma_boundaries gamma_add beta_boundaries
37 syn keyword tssgmParam p1 p2 p3 p4 p5 p6 rot1 rot2 rot3 tx ty tz
39 syn keyword tssgmSurfType rectangle trapezoid disc ellipse triangle
40 syn keyword tssgmSurfType polygon cylinder cone sphere ellipic-cone
41 syn keyword tssgmSurfType ogive torus box paraboloid hyperboloid ellipsoid
42 syn keyword tssgmSurfType quadrilateral trapeziod
44 syn keyword tssgmArgs OUT IN DOWN BOTH DOUBLE NONE SINGLE RADK CC FECC
45 syn keyword tssgmArgs white red blue green yellow orange violet pink
46 syn keyword tssgmArgs turquoise grey black
47 syn keyword tssgmArgs Arithmetic Boundary Heater
49 syn keyword tssgmDelim assembly
51 syn keyword tssgmEnd end
53 syn keyword tssgmUnits cm feet meters inches
54 syn keyword tssgmUnits Celsius Kelvin Fahrenheit Rankine
58 " Define matches for TSS
59 syn match tssgmDefault "^DEFAULT/LENGTH = \(ft\|in\|cm\|m\)"
60 syn match tssgmDefault "^DEFAULT/TEMP = [CKFR]"
62 syn match tssgmComment /comment \+= \+".*"/ contains=tssParam,tssgmCommentString
63 syn match tssgmCommentString /".*"/ contained
65 syn match tssgmSurfIdent " \S\+\.\d\+ \=$"
67 syn match tssgmString /"[^" ]\+"/ms=s+1,me=e-1 contains=ALLBUT,tssInteger
69 syn match tssgmArgs / = [xyz],"/ms=s+3,me=e-2
71 syn match tssgmInteger "-\=\<[0-9]*\>"
72 syn match tssgmFloat "-\=\<[0-9]*\.[0-9]*"
73 syn match tssgmScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>"
77 " Define the default highlighting
78 " For version 5.7 and earlier: only when not done already
79 " For version 5.8 and later: only when an item doesn't have highlighting yet
80 if version >= 508 || !exists("did_tssgm_syntax_inits")
82 let did_tssgm_syntax_inits = 1
83 command -nargs=+ HiLink hi link <args>
85 command -nargs=+ HiLink hi def link <args>
88 HiLink tssgmParam Statement
89 HiLink tssgmSurfType Type
90 HiLink tssgmArgs Special
91 HiLink tssgmDelim Typedef
93 HiLink tssgmUnits Special
95 HiLink tssgmDefault SpecialComment
96 HiLink tssgmComment Statement
97 HiLink tssgmCommentString Comment
98 HiLink tssgmSurfIdent Identifier
99 HiLink tssgmString Delimiter
101 HiLink tssgmInteger Number
102 HiLink tssgmFloat Float
103 HiLink tssgmScientific Float
109 let b:current_syntax = "tssgm"