Merged from the latest developing branch.
[MacVim/jjgod.git] / runtime / syntax / tak.vim
blob20186db1432a32bd47dc131540a10c795201321e
1 " Vim syntax file
2 " Language:     TAK2, TAK3, TAK2000 thermal modeling input file
3 " Maintainer:   Adrian Nagle, anagle@ball.com
4 " Last Change:  2003 May 11
5 " Filenames:    *.tak
6 " URL:          http://www.naglenet.org/vim/syntax/tak.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
13 if version < 600
14   syntax clear
15 elseif exists("b:current_syntax")
16   finish
17 endif
21 " Ignore case
22 syn case ignore
28 " Begin syntax definitions for tak input file.
31 " Force free-form fortran format
32 let fortran_free_source=1
34 " Load FORTRAN syntax file
35 if version < 600
36   source <sfile>:p:h/fortran.vim
37 else
38   runtime! syntax/fortran.vim
39 endif
40 unlet b:current_syntax
44 " Define keywords for TAK and TAKOUT
45 syn keyword takOptions  AUTODAMP CPRINT CSGDUMP GPRINT HPRINT LODTMP
46 syn keyword takOptions  LOGIC LPRINT NCVPRINT PLOTQ QPRINT QDUMP
47 syn keyword takOptions  SUMMARY SOLRTN UID DICTIONARIES
49 syn keyword takRoutine  SSITER FWDWRD FWDBCK BCKWRD
51 syn keyword takControl  ABSZRO BACKUP DAMP DTIMEI DTIMEL DTIMEH IFC
52 syn keyword takControl  MAXTEMP NLOOPS NLOOPT NODELIST OUTPUT PLOT
53 syn keyword takControl  SCALE SIGMA SSCRIT TIMEND TIMEN TIMEO TRCRIT
54 syn keyword takControl  PLOT
56 syn keyword takSolids   PLATE CYL
57 syn keyword takSolidsArg   ID MATNAM NTYPE TEMP XL YL ZL ISTRN ISTRG NNX
58 syn keyword takSolidsArg   NNY NNZ INCX INCY INCZ IAK IAC DIFF ARITH BOUN
59 syn keyword takSolidsArg   RMIN RMAX AXMAX NNR NNTHETA INCR INCTHETA END
61 syn case ignore
63 syn keyword takMacro    fac pstart pstop
64 syn keyword takMacro    takcommon fstart fstop
66 syn keyword takIdentifier  flq flx gen ncv per sim siv stf stv tvd tvs
67 syn keyword takIdentifier  tvt pro thm
71 " Define matches for TAK
72 syn match  takFortran     "^F[0-9 ]"me=e-1
73 syn match  takMotran      "^M[0-9 ]"me=e-1
75 syn match  takComment     "^C.*$"
76 syn match  takComment     "^R.*$"
77 syn match  takComment     "\$.*$"
79 syn match  takHeader      "^header[^,]*"
81 syn match  takIncludeFile "include \+[^ ]\+"hs=s+8 contains=fortranInclude
83 syn match  takInteger     "-\=\<[0-9]*\>"
84 syn match  takFloat       "-\=\<[0-9]*\.[0-9]*"
85 syn match  takScientific  "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>"
87 syn match  takEndData     "END OF DATA"
89 if exists("thermal_todo")
90   execute 'syn match  takTodo ' . '"^'.thermal_todo.'.*$"'
91 else
92   syn match  takTodo        "^?.*$"
93 endif
97 " Define the default highlighting
98 " For version 5.7 and earlier: only when not done already
99 " For version 5.8 and later: only when an item doesn't have highlighting yet
100 if version >= 508 || !exists("did_tak_syntax_inits")
101   if version < 508
102     let did_tak_syntax_inits = 1
103     command -nargs=+ HiLink hi link <args>
104   else
105     command -nargs=+ HiLink hi def link <args>
106   endif
108   HiLink takMacro               Macro
109   HiLink takOptions             Special
110   HiLink takRoutine             Type
111   HiLink takControl             Special
112   HiLink takSolids              Special
113   HiLink takSolidsArg           Statement
114   HiLink takIdentifier          Identifier
116   HiLink takFortran             PreProc
117   HiLink takMotran              PreProc
119   HiLink takComment             Comment
120   HiLink takHeader              Typedef
121   HiLink takIncludeFile         Type
122   HiLink takInteger             Number
123   HiLink takFloat               Float
124   HiLink takScientific          Float
126   HiLink takEndData             Macro
128   HiLink takTodo                Todo
130   delcommand HiLink
131 endif
134 let b:current_syntax = "tak"
136 " vim: ts=8 sw=2