annotate runtime/syntax/sinda.vim @ 27:a01d8d9b2a58 first-working-version

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