Mercurial > vim
comparison runtime/syntax/sinda.vim @ 7:3fc0f57ecb91 v7.0001
updated for version 7.0001
author | vimboss |
---|---|
date | Sun, 13 Jun 2004 20:20:40 +0000 |
parents | |
children | 43efa4f5a8ea |
comparison
equal
deleted
inserted
replaced
6:c2daee826b8f | 7:3fc0f57ecb91 |
---|---|
1 " Vim syntax file | |
2 " Language: sinda85, sinda/fluint input file | |
3 " Maintainer: Adrian Nagle, anagle@ball.com | |
4 " Last Change: 2003 May 11 | |
5 " Filenames: *.sin | |
6 " URL: http://www.naglenet.org/vim/syntax/sinda.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 sinda input and output files. | |
29 " | |
30 | |
31 " Force free-form fortran format | |
32 let fortran_free_source=1 | |
33 | |
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 | |
41 | |
42 | |
43 | |
44 " Define keywords for SINDA | |
45 syn keyword sindaMacro BUILD BUILDF DEBON DEBOFF DEFMOD FSTART FSTOP | |
46 | |
47 syn keyword sindaOptions TITLE PPSAVE RSI RSO OUTPUT SAVE QMAP USER1 USER2 | |
48 syn keyword sindaOptions MODEL PPOUT NOLIST MLINE NODEBUG DIRECTORIES | |
49 syn keyword sindaOptions DOUBLEPR | |
50 | |
51 syn keyword sindaRoutine FORWRD FWDBCK STDSTL FASTIC | |
52 | |
53 syn keyword sindaControl ABSZRO ACCELX ACCELY ACCELZ ARLXCA ATMPCA | |
54 syn keyword sindaControl BACKUP CSGFAC DRLXCA DTIMEH DTIMEI DTIMEL | |
55 syn keyword sindaControl DTIMES DTMPCA EBALNA EBALSA EXTLIM ITEROT | |
56 syn keyword sindaControl ITERXT ITHOLD NLOOPS NLOOPT OUTPUT OPEITR | |
57 syn keyword sindaControl PATMOS SIGMA TIMEO TIMEND UID | |
58 | |
59 syn keyword sindaSubRoutine ASKERS ADARIN ADDARY ADDMOD ARINDV | |
60 syn keyword sindaSubRoutine RYINV ARYMPY ARYSUB ARYTRN BAROC | |
61 syn keyword sindaSubRoutine BELACC BNDDRV BNDGET CHENNB CHGFLD | |
62 syn keyword sindaSubRoutine CHGLMP CHGSUC CHGVOL CHKCHL CHKCHP | |
63 syn keyword sindaSubRoutine CNSTAB COMBAL COMPLQ COMPRS CONTRN | |
64 syn keyword sindaSubRoutine CPRINT CRASH CRVINT CRYTRN CSIFLX | |
65 syn keyword sindaSubRoutine CVTEMP D11CYL C11DAI D11DIM D11MCY | |
66 syn keyword sindaSubRoutine D11MDA D11MDI D11MDT D12CYL D12MCY | |
67 syn keyword sindaSubRoutine D12MDA D1D1DA D1D1IM D1D1WM D1D2DA | |
68 syn keyword sindaSubRoutine D1D2WM D1DEG1 D1DEG2 D1DG1I D1IMD1 | |
69 syn keyword sindaSubRoutine D1IMIM D1IMWM D1M1DA D1M2MD D1M2WM | |
70 syn keyword sindaSubRoutine D1MDG1 D1MDG2 D2D1WM D1DEG1 D2DEG2 | |
71 syn keyword sindaSubRoutine D2D2 | |
72 | |
73 syn keyword sindaIdentifier BIV CAL DIM DIV DPM DPV DTV GEN PER PIV PIM | |
74 syn keyword sindaIdentifier SIM SIV SPM SPV TVS TVD | |
75 | |
76 | |
77 | |
78 " Define matches for SINDA | |
79 syn match sindaFortran "^F[0-9 ]"me=e-1 | |
80 syn match sindaMotran "^M[0-9 ]"me=e-1 | |
81 | |
82 syn match sindaComment "^C.*$" | |
83 syn match sindaComment "^R.*$" | |
84 syn match sindaComment "\$.*$" | |
85 | |
86 syn match sindaHeader "^header[^,]*" | |
87 | |
88 syn match sindaIncludeFile "include \+[^ ]\+"hs=s+8 contains=fortranInclude | |
89 | |
90 syn match sindaMacro "^PSTART" | |
91 syn match sindaMacro "^PSTOP" | |
92 syn match sindaMacro "^FAC" | |
93 | |
94 syn match sindaInteger "-\=\<[0-9]*\>" | |
95 syn match sindaFloat "-\=\<[0-9]*\.[0-9]*" | |
96 syn match sindaScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" | |
97 | |
98 syn match sindaEndData "^END OF DATA" | |
99 | |
100 if exists("thermal_todo") | |
101 execute 'syn match sindaTodo ' . '"^'.thermal_todo.'.*$"' | |
102 else | |
103 syn match sindaTodo "^?.*$" | |
104 endif | |
105 | |
106 | |
107 | |
108 " Define the default highlighting | |
109 " For version 5.7 and earlier: only when not done already | |
110 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
111 if version >= 508 || !exists("did_sinda_syntax_inits") | |
112 if version < 508 | |
113 let did_sinda_syntax_inits = 1 | |
114 command -nargs=+ HiLink hi link <args> | |
115 else | |
116 command -nargs=+ HiLink hi def link <args> | |
117 endif | |
118 | |
119 HiLink sindaMacro Macro | |
120 HiLink sindaOptions Special | |
121 HiLink sindaRoutine Type | |
122 HiLink sindaControl Special | |
123 HiLink sindaSubRoutine Function | |
124 HiLink sindaIdentifier Identifier | |
125 | |
126 HiLink sindaFortran PreProc | |
127 HiLink sindaMotran PreProc | |
128 | |
129 HiLink sindaComment Comment | |
130 HiLink sindaHeader Typedef | |
131 HiLink sindaIncludeFile Type | |
132 HiLink sindaInteger Number | |
133 HiLink sindaFloat Float | |
134 HiLink sindaScientific Float | |
135 | |
136 HiLink sindaEndData Macro | |
137 | |
138 HiLink sindaTodo Todo | |
139 | |
140 delcommand HiLink | |
141 endif | |
142 | |
143 | |
144 let b:current_syntax = "sinda" | |
145 | |
146 " vim: ts=8 sw=2 |