xref: /vim-8.2.3635/runtime/syntax/trasys.vim (revision f37506f6)
1" Vim syntax file
2" Language:     TRASYS input file
3" Maintainer:   Adrian Nagle, [email protected]
4" Last Change:  2003 May 11
5" Filenames:    *.inp
6" URL:		http://www.naglenet.org/vim/syntax/trasys.vim
7" MAIN URL:     http://www.naglenet.org/vim/
8
9
10
11" quit when a syntax file was already loaded
12if exists("b:current_syntax")
13  finish
14endif
15
16
17" Force free-form fortran format
18let fortran_free_source=1
19
20" Load FORTRAN syntax file
21runtime! syntax/fortran.vim
22unlet b:current_syntax
23
24
25" Ignore case
26syn case ignore
27
28
29
30" Define keywords for TRASYS
31syn keyword trasysOptions    model rsrec info maxfl nogo dmpdoc
32syn keyword trasysOptions    rsi rti rso rto bcdou cmerg emerg
33syn keyword trasysOptions    user1 nnmin erplot
34
35syn keyword trasysSurface    icsn tx ty tz rotx roty rotz inc bcsn
36syn keyword trasysSurface    nnx nny nnz nnax nnr nnth unnx
37syn keyword trasysSurface    unny unnz unnax unnr unnth type idupsf
38syn keyword trasysSurface    imagsf act active com shade bshade axmin
39syn keyword trasysSurface    axmax zmin zmax rmin rmax thmin thmin
40syn keyword trasysSurface    thmax alpha emiss trani trans spri sprs
41syn keyword trasysSurface    refno posit com dupbcs dimensions
42syn keyword trasysSurface    dimension position prop surfn
43
44syn keyword trasysSurfaceType rect trap disk cyl cone sphere parab
45syn keyword trasysSurfaceType box5 box6 shpero tor ogiv elem tape poly
46
47syn keyword trasysSurfaceArgs ff di top bottom in out both no only
48
49syn keyword trasysArgs       fig smn nodea zero only ir sol
50syn keyword trasysArgs       both wband stepn initl
51
52syn keyword trasysOperations orbgen build
53
54"syn keyword trasysSubRoutine call
55syn keyword trasysSubRoutine chgblk ndata ndatas odata odatas
56syn keyword trasysSubRoutine pldta ffdata cmdata adsurf rbdata
57syn keyword trasysSubRoutine rtdata pffshd orbit1 orbit2 orient
58syn keyword trasysSubRoutine didt1 didt1s didt2 didt2s spin
59syn keyword trasysSubRoutine spinav dicomp distab drdata gbdata
60syn keyword trasysSubRoutine gbaprx rkdata rcdata aqdata stfaq
61syn keyword trasysSubRoutine qodata qoinit modar modpr modtr
62syn keyword trasysSubRoutine modprs modshd moddat rstoff rston
63syn keyword trasysSubRoutine rsmerg ffread diread ffusr1 diusr1
64syn keyword trasysSubRoutine surfp didt3 didt3s romain stfrc
65syn keyword trasysSubRoutine rornt rocstr romove flxdata title
66
67syn keyword trassyPrcsrSegm  nplot oplot plot cmcal ffcal rbcal
68syn keyword trassyPrcsrSegm  rtcal dical drcal sfcal gbcal rccal
69syn keyword trassyPrcsrSegm  rkcal aqcal qocal
70
71
72
73" Define matches for TRASYS
74syn match  trasysOptions     "list source"
75syn match  trasysOptions     "save source"
76syn match  trasysOptions     "no print"
77
78"syn match  trasysSurface     "^K *.* [^$]"
79"syn match  trasysSurface     "^D *[0-9]*\.[0-9]\+"
80"syn match  trasysSurface     "^I *.*[0-9]\+\.\="
81"syn match  trasysSurface     "^N *[0-9]\+"
82"syn match  trasysSurface     "^M *[a-z[A-Z0-9]\+"
83"syn match  trasysSurface     "^B[C][S] *[a-zA-Z0-9]*"
84"syn match  trasysSurface     "^S *SURFN.*[0-9]"
85syn match  trasysSurface     "P[0-9]* *="he=e-1
86
87syn match  trasysIdentifier  "^L "he=e-1
88syn match  trasysIdentifier  "^K "he=e-1
89syn match  trasysIdentifier  "^D "he=e-1
90syn match  trasysIdentifier  "^I "he=e-1
91syn match  trasysIdentifier  "^N "he=e-1
92syn match  trasysIdentifier  "^M "he=e-1
93syn match  trasysIdentifier  "^B[C][S]"
94syn match  trasysIdentifier  "^S "he=e-1
95
96syn match  trasysComment     "^C.*$"
97syn match  trasysComment     "^R.*$"
98syn match  trasysComment     "\$.*$"
99
100syn match  trasysHeader      "^header[^,]*"
101
102syn match  trasysMacro       "^FAC"
103
104syn match  trasysInteger     "-\=\<[0-9]*\>"
105syn match  trasysFloat       "-\=\<[0-9]*\.[0-9]*"
106syn match  trasysScientific  "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>"
107
108syn match  trasysBlank       "' \+'"hs=s+1,he=e-1
109
110syn match  trasysEndData     "^END OF DATA"
111
112if exists("thermal_todo")
113  execute 'syn match  trasysTodo ' . '"^'.thermal_todo.'.*$"'
114else
115  syn match  trasysTodo  "^?.*$"
116endif
117
118
119
120" Define regions for TRASYS
121syn region trasysComment  matchgroup=trasysHeader start="^HEADER DOCUMENTATION DATA" end="^HEADER[^,]*"
122
123
124
125" Define synchronizing patterns for TRASYS
126syn sync maxlines=500
127syn sync match trasysSync grouphere trasysComment "^HEADER DOCUMENTATION DATA"
128
129
130
131" Define the default highlighting
132" Only when an item doesn't have highlighting yet
133
134hi def link trasysOptions		Special
135hi def link trasysSurface		Special
136hi def link trasysSurfaceType	Constant
137hi def link trasysSurfaceArgs	Constant
138hi def link trasysArgs		Constant
139hi def link trasysOperations	Statement
140hi def link trasysSubRoutine	Statement
141hi def link trassyPrcsrSegm	PreProc
142hi def link trasysIdentifier	Identifier
143hi def link trasysComment		Comment
144hi def link trasysHeader		Typedef
145hi def link trasysMacro		Macro
146hi def link trasysInteger		Number
147hi def link trasysFloat		Float
148hi def link trasysScientific	Float
149
150hi def link trasysBlank		SpecialChar
151
152hi def link trasysEndData		Macro
153
154hi def link trasysTodo		Todo
155
156
157
158let b:current_syntax = "trasys"
159
160" vim: ts=8 sw=2
161