1" Vim syntax file 2" Language: sinda85, sinda/fluint input file 3" Maintainer: Adrian Nagle, [email protected] 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 13if version < 600 14 syntax clear 15elseif exists("b:current_syntax") 16 finish 17endif 18 19 20 21" Ignore case 22syn 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 32let fortran_free_source=1 33 34" Load FORTRAN syntax file 35if version < 600 36 source <sfile>:p:h/fortran.vim 37else 38 runtime! syntax/fortran.vim 39endif 40unlet b:current_syntax 41 42 43 44" Define keywords for SINDA 45syn keyword sindaMacro BUILD BUILDF DEBON DEBOFF DEFMOD FSTART FSTOP 46 47syn keyword sindaOptions TITLE PPSAVE RSI RSO OUTPUT SAVE QMAP USER1 USER2 48syn keyword sindaOptions MODEL PPOUT NOLIST MLINE NODEBUG DIRECTORIES 49syn keyword sindaOptions DOUBLEPR 50 51syn keyword sindaRoutine FORWRD FWDBCK STDSTL FASTIC 52 53syn keyword sindaControl ABSZRO ACCELX ACCELY ACCELZ ARLXCA ATMPCA 54syn keyword sindaControl BACKUP CSGFAC DRLXCA DTIMEH DTIMEI DTIMEL 55syn keyword sindaControl DTIMES DTMPCA EBALNA EBALSA EXTLIM ITEROT 56syn keyword sindaControl ITERXT ITHOLD NLOOPS NLOOPT OUTPUT OPEITR 57syn keyword sindaControl PATMOS SIGMA TIMEO TIMEND UID 58 59syn keyword sindaSubRoutine ASKERS ADARIN ADDARY ADDMOD ARINDV 60syn keyword sindaSubRoutine RYINV ARYMPY ARYSUB ARYTRN BAROC 61syn keyword sindaSubRoutine BELACC BNDDRV BNDGET CHENNB CHGFLD 62syn keyword sindaSubRoutine CHGLMP CHGSUC CHGVOL CHKCHL CHKCHP 63syn keyword sindaSubRoutine CNSTAB COMBAL COMPLQ COMPRS CONTRN 64syn keyword sindaSubRoutine CPRINT CRASH CRVINT CRYTRN CSIFLX 65syn keyword sindaSubRoutine CVTEMP D11CYL C11DAI D11DIM D11MCY 66syn keyword sindaSubRoutine D11MDA D11MDI D11MDT D12CYL D12MCY 67syn keyword sindaSubRoutine D12MDA D1D1DA D1D1IM D1D1WM D1D2DA 68syn keyword sindaSubRoutine D1D2WM D1DEG1 D1DEG2 D1DG1I D1IMD1 69syn keyword sindaSubRoutine D1IMIM D1IMWM D1M1DA D1M2MD D1M2WM 70syn keyword sindaSubRoutine D1MDG1 D1MDG2 D2D1WM D1DEG1 D2DEG2 71syn keyword sindaSubRoutine D2D2 72 73syn keyword sindaIdentifier BIV CAL DIM DIV DPM DPV DTV GEN PER PIV PIM 74syn keyword sindaIdentifier SIM SIV SPM SPV TVS TVD 75 76 77 78" Define matches for SINDA 79syn match sindaFortran "^F[0-9 ]"me=e-1 80syn match sindaMotran "^M[0-9 ]"me=e-1 81 82syn match sindaComment "^C.*$" 83syn match sindaComment "^R.*$" 84syn match sindaComment "\$.*$" 85 86syn match sindaHeader "^header[^,]*" 87 88syn match sindaIncludeFile "include \+[^ ]\+"hs=s+8 contains=fortranInclude 89 90syn match sindaMacro "^PSTART" 91syn match sindaMacro "^PSTOP" 92syn match sindaMacro "^FAC" 93 94syn match sindaInteger "-\=\<[0-9]*\>" 95syn match sindaFloat "-\=\<[0-9]*\.[0-9]*" 96syn match sindaScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" 97 98syn match sindaEndData "^END OF DATA" 99 100if exists("thermal_todo") 101 execute 'syn match sindaTodo ' . '"^'.thermal_todo.'.*$"' 102else 103 syn match sindaTodo "^?.*$" 104endif 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 111if 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 141endif 142 143 144let b:current_syntax = "sinda" 145 146" vim: ts=8 sw=2 147