comparison runtime/syntax/nastran.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: NASTRAN input/DMAP
3 " Maintainer: Tom Kowalski <trk@schaefferas.com>
4 " Last change: April 27, 2001
5 " Thanks to the authors and maintainers of fortran.vim.
6 " Since DMAP shares some traits with fortran, this syntax file
7 " is based on the fortran.vim syntax file.
8 "----------------------------------------------------------------------
9 " Remove any old syntax stuff hanging around
10 "syn clear
11 if version < 600
12 syntax clear
13 elseif exists("b:current_syntax")
14 finish
15 endif
16 " DMAP is not case dependent
17 syn case ignore
18 "
19 "--------------------DMAP SYNTAX---------------------------------------
20 "
21 " -------Executive Modules and Statements
22 "
23 syn keyword nastranDmapexecmod call dbview delete end equiv equivx exit
24 syn keyword nastranDmapexecmod file message purge purgex return subdmap
25 syn keyword nastranDmapType type
26 syn keyword nastranDmapLabel go to goto
27 syn keyword nastranDmapRepeat if else elseif endif then
28 syn keyword nastranDmapRepeat do while
29 syn region nastranDmapString start=+"+ end=+"+ oneline
30 syn region nastranDmapString start=+'+ end=+'+ oneline
31 " If you don't like initial tabs in dmap (or at all)
32 "syn match nastranDmapIniTab "^\t.*$"
33 "syn match nastranDmapTab "\t"
34
35 " Any integer
36 syn match nastranDmapNumber "-\=\<[0-9]\+\>"
37 " floating point number, with dot, optional exponent
38 syn match nastranDmapFloat "\<[0-9]\+\.[0-9]*\([edED][-+]\=[0-9]\+\)\=\>"
39 " floating point number, starting with a dot, optional exponent
40 syn match nastranDmapFloat "\.[0-9]\+\([edED][-+]\=[0-9]\+\)\=\>"
41 " floating point number, without dot, with exponent
42 syn match nastranDmapFloat "\<[0-9]\+[edED][-+]\=[0-9]\+\>"
43
44 syn match nastranDmapLogical "\(true\|false\)"
45
46 syn match nastranDmapPreCondit "^#define\>"
47 syn match nastranDmapPreCondit "^#include\>"
48 "
49 " -------Comments may be contained in another line.
50 "
51 syn match nastranDmapComment "^[\$].*$"
52 syn match nastranDmapComment "\$.*$"
53 syn match nastranDmapComment "^[\$].*$" contained
54 syn match nastranDmapComment "\$.*$" contained
55 " Treat all past 72nd column as a comment. Do not work with tabs!
56 " Breaks down when 72-73rd column is in another match (eg number or keyword)
57 syn match nastranDmapComment "^.\{-72}.*$"lc=72 contained
58
59 "
60 " -------Utility Modules
61 "
62 syn keyword nastranDmapUtilmod append copy dbc dbdict dbdir dmin drms1
63 syn keyword nastranDmapUtilmod dtiin eltprt ifp ifp1 inputt2 inputt4 lamx
64 syn keyword nastranDmapUtilmod matgen matgpr matmod matpch matprn matprt
65 syn keyword nastranDmapUtilmod modtrl mtrxin ofp output2 output4 param
66 syn keyword nastranDmapUtilmod paraml paramr prtparam pvt scalar
67 syn keyword nastranDmapUtilmod seqp setval tabedit tabprt tabpt vec vecplot
68 syn keyword nastranDmapUtilmod xsort
69 "
70 " -------Matrix Modules
71 "
72 syn keyword nastranDmapMatmod add add5 cead dcmp decomp diagonal fbs merge
73 syn keyword nastranDmapMatmod mpyad norm read reigl smpyad solve solvit
74 syn keyword nastranDmapMatmod trnsp umerge umerge1 upartn dmiin partn
75 syn region nastranDmapMatmod start=+^ *[Dd][Mm][Ii]+ end=+[\/]+
76 "
77 " -------Implicit Functions
78 "
79 syn keyword nastranDmapImplicit abs acos acosh andl asin asinh atan atan2
80 syn keyword nastranDmapImplicit atanh atanh2 char clen clock cmplx concat1
81 syn keyword nastranDmapImplicit concat2 concat3 conjg cos cosh dble diagoff
82 syn keyword nastranDmapImplicit diagon dim dlablank dlxblank dprod eqvl exp
83 syn keyword nastranDmapImplicit getdiag getsys ichar imag impl index indexstr
84 syn keyword nastranDmapImplicit int itol leq lge lgt lle llt lne log log10
85 syn keyword nastranDmapImplicit logx ltoi mcgetsys mcputsys max min mod neqvl
86 syn keyword nastranDmapImplicit nint noop normal notl numeq numge numgt numle
87 syn keyword nastranDmapImplicit numlt numne orl pi precison putdiag putsys
88 syn keyword nastranDmapImplicit rand rdiagon real rtimtogo setcore sign sin
89 syn keyword nastranDmapImplicit sinh sngl sprod sqrt substrin tan tanh
90 syn keyword nastranDmapImplicit timetogo wlen xorl
91 "
92 "
93 "--------------------INPUT FILE SYNTAX---------------------------------------
94 "
95 "
96 " -------Nastran Statement
97 "
98 syn keyword nastranNastranCard nastran
99 "
100 " -------The File Management Section (FMS)
101 "
102 syn region nastranFMSCard start=+^ *[Aa][Cc][Qq][Uu][Ii]+ end=+$+ oneline
103 syn region nastranFMSCard start=+^ *[Aa][Ss][Ss][Ii][Gg]+ end=+$+ oneline
104 syn region nastranFMSCard start=+^ *[Cc][oO][Nn][Nn][Ee]+ end=+$+ oneline
105 syn region nastranFMSCard start=+^ *[Dd][Bb][Cc][Ll][Ee]+ end=+$+ oneline
106 syn region nastranFMSCard start=+^ *[Dd][Bb][Dd][Ii][Cc]+ end=+$+ oneline
107 syn region nastranFMSCard start=+^ *[Dd][Bb][Dd][Ii][Rr]+ end=+$+ oneline
108 syn region nastranFMSCard start=+^ *[Dd][Bb][Ff][Ii][Xx]+ end=+$+ oneline
109 syn region nastranFMSCard start=+^ *[Dd][Bb][Ll][Oo][Aa]+ end=+$+ oneline
110 syn region nastranFMSCard start=+^ *[Dd][Bb][Ll][Oo][Cc]+ end=+$+ oneline
111 syn region nastranFMSCard start=+^ *[Dd][Bb][Ss][Ee][Tt]+ end=+$+ oneline
112 syn region nastranFMSCard start=+^ *[Dd][Bb][Uu][Nn][Ll]+ end=+$+ oneline
113 syn region nastranFMSCard start=+^ *[Dd][Bb][Uu][Pp][Dd]+ end=+$+ oneline
114 syn region nastranFMSCard start=+^ *[Dd][Ee][Ff][Ii][Nn]+ end=+$+ oneline
115 syn region nastranFMSCard start=+^ *[Ee][Nn][Dd][Jj][Oo]+ end=+$+ oneline
116 syn region nastranFMSCard start=+^ *[Ee][Xx][Pp][Aa][Nn]+ end=+$+ oneline
117 syn region nastranFMSCard start=+^ *[Ii][Nn][Cc][Ll][Uu]+ end=+$+ oneline
118 syn region nastranFMSCard start=+^ *[Ii][Nn][Ii][Tt]+ end=+$+ oneline
119 syn region nastranFMSCard start=+^ *[Pp][Rr][Oo][Jj]+ end=+$+ oneline
120 syn region nastranFMSCard start=+^ *[Rr][Ee][Ss][Tt]+ end=+$+ oneline
121 syn match nastranDmapUtilmod "^ *[Rr][Ee][Ss][Tt][Aa].*,.*," contains=nastranDmapComment
122 "
123 " -------Executive Control Section
124 "
125 syn region nastranECSCard start=+^ *[Aa][Ll][Tt][Ee][Rr]+ end=+$+ oneline
126 syn region nastranECSCard start=+^ *[Aa][Pp][Pp]+ end=+$+ oneline
127 syn region nastranECSCard start=+^ *[Cc][Oo][Mm][Pp][Ii]+ end=+$+ oneline
128 syn region nastranECSCard start=+^ *[Dd][Ii][Aa][Gg] + end=+$+ oneline
129 syn region nastranECSCard start=+^ *[Ee][Cc][Hh][Oo]+ end=+$+ oneline
130 syn region nastranECSCard start=+^ *[Ee][Nn][Dd][Aa][Ll]+ end=+$+ oneline
131 syn region nastranECSCard start=+^ *[Ii][Dd]+ end=+$+ oneline
132 syn region nastranECSCard start=+^ *[Ii][Nn][Cc][Ll][Uu]+ end=+$+ oneline
133 syn region nastranECSCard start=+^ *[Ll][Ii][Nn][Kk]+ end=+$+ oneline
134 syn region nastranECSCard start=+^ *[Mm][Aa][Ll][Tt][Ee]+ end=+$+ oneline
135 syn region nastranECSCard start=+^ *[Ss][Oo][Ll] + end=+$+ oneline
136 syn region nastranECSCard start=+^ *[Tt][Ii][Mm][Ee]+ end=+$+ oneline
137 "
138 " -------Delimiters
139 "
140 syn match nastranDelimiter "[Cc][Ee][Nn][Dd]" contained
141 syn match nastranDelimiter "[Bb][Ee][Gg][Ii][Nn]" contained
142 syn match nastranDelimiter " *[Bb][Uu][Ll][Kk]" contained
143 syn match nastranDelimiter "[Ee][Nn][Dd] *[dD][Aa][Tt][Aa]" contained
144 "
145 " -------Case Control section
146 "
147 syn region nastranCC start=+^ *[Cc][Ee][Nn][Dd]+ end=+^ *[Bb][Ee][Gg][Ii][Nn]+ contains=nastranDelimiter,nastranBulkData,nastranDmapComment
148
149 "
150 " -------Bulk Data section
151 "
152 syn region nastranBulkData start=+ *[Bb][Uu][Ll][Kk] *$+ end=+^ [Ee][Nn][Dd] *[Dd]+ contains=nastranDelimiter,nastranDmapComment
153 "
154 " -------The following cards may appear in multiple sections of the file
155 "
156 syn keyword nastranUtilCard ECHOON ECHOOFF INCLUDE PARAM
157
158
159 if version >= 508 || !exists("did_nastran_syntax_inits")
160 if version < 508
161 let did_nastran_syntax_inits = 1
162 command -nargs=+ HiLink hi link <args>
163 else
164 command -nargs=+ HiLink hi link <args>
165 endif
166 " The default methods for highlighting. Can be overridden later
167 HiLink nastranDmapexecmod Statement
168 HiLink nastranDmapType Type
169 HiLink nastranDmapPreCondit Error
170 HiLink nastranDmapUtilmod PreProc
171 HiLink nastranDmapMatmod nastranDmapUtilmod
172 HiLink nastranDmapString String
173 HiLink nastranDmapNumber Constant
174 HiLink nastranDmapFloat nastranDmapNumber
175 HiLink nastranDmapInitTab nastranDmapNumber
176 HiLink nastranDmapTab nastranDmapNumber
177 HiLink nastranDmapLogical nastranDmapExecmod
178 HiLink nastranDmapImplicit Identifier
179 HiLink nastranDmapComment Comment
180 HiLink nastranDmapRepeat nastranDmapexecmod
181 HiLink nastranNastranCard nastranDmapPreCondit
182 HiLink nastranECSCard nastranDmapUtilmod
183 HiLink nastranFMSCard nastranNastranCard
184 HiLink nastranCC nastranDmapexecmod
185 HiLink nastranDelimiter Special
186 HiLink nastranBulkData nastranDmapType
187 HiLink nastranUtilCard nastranDmapexecmod
188 delcommand HiLink
189 endif
190
191 let b:current_syntax = "nastran"
192
193 "EOF vim: ts=8 noet tw=120 sw=8 sts=0