2 " Language: TRASYS input file
3 " Maintainer: Adrian Nagle, anagle@ball.com
4 " Last Change: 2003 May 11
6 " URL: http://www.naglenet.org/vim/syntax/trasys.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")
20 " Force free-form fortran format
21 let fortran_free_source=1
23 " Load FORTRAN syntax file
25 source <sfile>:p:h/fortran.vim
27 runtime! syntax/fortran.vim
29 unlet b:current_syntax
37 " Define keywords for TRASYS
38 syn keyword trasysOptions model rsrec info maxfl nogo dmpdoc
39 syn keyword trasysOptions rsi rti rso rto bcdou cmerg emerg
40 syn keyword trasysOptions user1 nnmin erplot
42 syn keyword trasysSurface icsn tx ty tz rotx roty rotz inc bcsn
43 syn keyword trasysSurface nnx nny nnz nnax nnr nnth unnx
44 syn keyword trasysSurface unny unnz unnax unnr unnth type idupsf
45 syn keyword trasysSurface imagsf act active com shade bshade axmin
46 syn keyword trasysSurface axmax zmin zmax rmin rmax thmin thmin
47 syn keyword trasysSurface thmax alpha emiss trani trans spri sprs
48 syn keyword trasysSurface refno posit com dupbcs dimensions
49 syn keyword trasysSurface dimension position prop surfn
51 syn keyword trasysSurfaceType rect trap disk cyl cone sphere parab
52 syn keyword trasysSurfaceType box5 box6 shpero tor ogiv elem tape poly
54 syn keyword trasysSurfaceArgs ff di top bottom in out both no only
56 syn keyword trasysArgs fig smn nodea zero only ir sol
57 syn keyword trasysArgs both wband stepn initl
59 syn keyword trasysOperations orbgen build
61 "syn keyword trasysSubRoutine call
62 syn keyword trasysSubRoutine chgblk ndata ndatas odata odatas
63 syn keyword trasysSubRoutine pldta ffdata cmdata adsurf rbdata
64 syn keyword trasysSubRoutine rtdata pffshd orbit1 orbit2 orient
65 syn keyword trasysSubRoutine didt1 didt1s didt2 didt2s spin
66 syn keyword trasysSubRoutine spinav dicomp distab drdata gbdata
67 syn keyword trasysSubRoutine gbaprx rkdata rcdata aqdata stfaq
68 syn keyword trasysSubRoutine qodata qoinit modar modpr modtr
69 syn keyword trasysSubRoutine modprs modshd moddat rstoff rston
70 syn keyword trasysSubRoutine rsmerg ffread diread ffusr1 diusr1
71 syn keyword trasysSubRoutine surfp didt3 didt3s romain stfrc
72 syn keyword trasysSubRoutine rornt rocstr romove flxdata title
74 syn keyword trassyPrcsrSegm nplot oplot plot cmcal ffcal rbcal
75 syn keyword trassyPrcsrSegm rtcal dical drcal sfcal gbcal rccal
76 syn keyword trassyPrcsrSegm rkcal aqcal qocal
80 " Define matches for TRASYS
81 syn match trasysOptions "list source"
82 syn match trasysOptions "save source"
83 syn match trasysOptions "no print"
85 "syn match trasysSurface "^K *.* [^$]"
86 "syn match trasysSurface "^D *[0-9]*\.[0-9]\+"
87 "syn match trasysSurface "^I *.*[0-9]\+\.\="
88 "syn match trasysSurface "^N *[0-9]\+"
89 "syn match trasysSurface "^M *[a-z[A-Z0-9]\+"
90 "syn match trasysSurface "^B[C][S] *[a-zA-Z0-9]*"
91 "syn match trasysSurface "^S *SURFN.*[0-9]"
92 syn match trasysSurface "P[0-9]* *="he=e-1
94 syn match trasysIdentifier "^L "he=e-1
95 syn match trasysIdentifier "^K "he=e-1
96 syn match trasysIdentifier "^D "he=e-1
97 syn match trasysIdentifier "^I "he=e-1
98 syn match trasysIdentifier "^N "he=e-1
99 syn match trasysIdentifier "^M "he=e-1
100 syn match trasysIdentifier "^B[C][S]"
101 syn match trasysIdentifier "^S "he=e-1
103 syn match trasysComment "^C.*$"
104 syn match trasysComment "^R.*$"
105 syn match trasysComment "\$.*$"
107 syn match trasysHeader "^header[^,]*"
109 syn match trasysMacro "^FAC"
111 syn match trasysInteger "-\=\<[0-9]*\>"
112 syn match trasysFloat "-\=\<[0-9]*\.[0-9]*"
113 syn match trasysScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>"
115 syn match trasysBlank "' \+'"hs=s+1,he=e-1
117 syn match trasysEndData "^END OF DATA"
119 if exists("thermal_todo")
120 execute 'syn match trasysTodo ' . '"^'.thermal_todo.'.*$"'
122 syn match trasysTodo "^?.*$"
127 " Define regions for TRASYS
128 syn region trasysComment matchgroup=trasysHeader start="^HEADER DOCUMENTATION DATA" end="^HEADER[^,]*"
132 " Define synchronizing patterns for TRASYS
133 syn sync maxlines=500
134 syn sync match trasysSync grouphere trasysComment "^HEADER DOCUMENTATION DATA"
138 " Define the default highlighting
139 " For version 5.7 and earlier: only when not done already
140 " For version 5.8 and later: only when an item doesn't have highlighting yet
141 if version >= 508 || !exists("did_trasys_syntax_inits")
143 let did_trasys_syntax_inits = 1
144 command -nargs=+ HiLink hi link <args>
146 command -nargs=+ HiLink hi def link <args>
149 HiLink trasysOptions Special
150 HiLink trasysSurface Special
151 HiLink trasysSurfaceType Constant
152 HiLink trasysSurfaceArgs Constant
153 HiLink trasysArgs Constant
154 HiLink trasysOperations Statement
155 HiLink trasysSubRoutine Statement
156 HiLink trassyPrcsrSegm PreProc
157 HiLink trasysIdentifier Identifier
158 HiLink trasysComment Comment
159 HiLink trasysHeader Typedef
160 HiLink trasysMacro Macro
161 HiLink trasysInteger Number
162 HiLink trasysFloat Float
163 HiLink trasysScientific Float
165 HiLink trasysBlank SpecialChar
167 HiLink trasysEndData Macro
169 HiLink trasysTodo Todo
175 let b:current_syntax = "trasys"