7
|
1 " Vim syntax file
|
|
2 " Language: TSS (Thermal Synthesizer System) Geometry
|
|
3 " Maintainer: Adrian Nagle, anagle@ball.com
|
|
4 " Last Change: 2003 May 11
|
|
5 " Filenames: *.tssgm
|
|
6 " URL: http://www.naglenet.org/vim/syntax/tssgm.vim
|
|
7 " MAIN URL: http://www.naglenet.org/vim/
|
|
8
|
|
9
|
|
10
|
|
11 " For version 5.x: Clear all syntax items
|
|
12 " For version 6.x: Quit when a syntax file was already loaded
|
|
13 if version < 600
|
|
14 syntax clear
|
|
15 elseif exists("b:current_syntax")
|
|
16 finish
|
|
17 endif
|
|
18
|
|
19
|
|
20
|
|
21 " Ignore case
|
|
22 syn case ignore
|
|
23
|
|
24
|
|
25
|
|
26 "
|
|
27 "
|
|
28 " Begin syntax definitions for tss geomtery file.
|
|
29 "
|
|
30
|
|
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
|
|
38
|
|
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
|
|
43
|
|
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
|
|
48
|
|
49 syn keyword tssgmDelim assembly
|
|
50
|
|
51 syn keyword tssgmEnd end
|
|
52
|
|
53 syn keyword tssgmUnits cm feet meters inches
|
|
54 syn keyword tssgmUnits Celsius Kelvin Fahrenheit Rankine
|
|
55
|
|
56
|
|
57
|
|
58 " Define matches for TSS
|
|
59 syn match tssgmDefault "^DEFAULT/LENGTH = \(ft\|in\|cm\|m\)"
|
|
60 syn match tssgmDefault "^DEFAULT/TEMP = [CKFR]"
|
|
61
|
|
62 syn match tssgmComment /comment \+= \+".*"/ contains=tssParam,tssgmCommentString
|
|
63 syn match tssgmCommentString /".*"/ contained
|
|
64
|
|
65 syn match tssgmSurfIdent " \S\+\.\d\+ \=$"
|
|
66
|
|
67 syn match tssgmString /"[^" ]\+"/ms=s+1,me=e-1 contains=ALLBUT,tssInteger
|
|
68
|
|
69 syn match tssgmArgs / = [xyz],"/ms=s+3,me=e-2
|
|
70
|
|
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]\+\>"
|
|
74
|
|
75
|
|
76
|
|
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")
|
|
81 if version < 508
|
|
82 let did_tssgm_syntax_inits = 1
|
|
83 command -nargs=+ HiLink hi link <args>
|
|
84 else
|
|
85 command -nargs=+ HiLink hi def link <args>
|
|
86 endif
|
|
87
|
|
88 HiLink tssgmParam Statement
|
|
89 HiLink tssgmSurfType Type
|
|
90 HiLink tssgmArgs Special
|
|
91 HiLink tssgmDelim Typedef
|
|
92 HiLink tssgmEnd Macro
|
|
93 HiLink tssgmUnits Special
|
|
94
|
|
95 HiLink tssgmDefault SpecialComment
|
|
96 HiLink tssgmComment Statement
|
|
97 HiLink tssgmCommentString Comment
|
|
98 HiLink tssgmSurfIdent Identifier
|
|
99 HiLink tssgmString Delimiter
|
|
100
|
|
101 HiLink tssgmInteger Number
|
|
102 HiLink tssgmFloat Float
|
|
103 HiLink tssgmScientific Float
|
|
104
|
|
105 delcommand HiLink
|
|
106 endif
|
|
107
|
|
108
|
|
109 let b:current_syntax = "tssgm"
|
|
110
|
|
111 " vim: ts=8 sw=2
|