summaryrefslogtreecommitdiffstats
path: root/misc/syntax/fortran.syntax
blob: 451500af7925a9aafed0c069357dfaa4e3a3bed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# ---------------------------------------------------
# fortran.syntax
# FORTRAN language syntax highlighting template.
# Provides syntax highlighting rules for the
# FORTRAN programming language.
#
# Author: John Theal
# Email: jtheal@renegadelinuxbox.dhs.org
# December 7, 1999
# ---------------------------------------------------

# Heavily modified by Paul Sheer <psheer@obsidian.co.za>.

caseinsensitive

context default
# keywords at the beginning of line
    keyword linestart ! black yellow
    keyword linestart \* black yellow
    keyword linestart c black yellow
    keyword linestart C black yellow

    keyword linestart \s\s\s\s\s\* yellow red
    keyword linestart \s\s\s\s\s\+ yellow red

    keyword linestart \s\s\s\s\s\s black brightcyan/blue3

    keyword linestart 0\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart 1\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart 2\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart 3\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart 4\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart 5\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart 6\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart 7\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart 8\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart 9\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan

    keyword linestart \s\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart               \s\s\{0123456789\s\}\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart                             \s\s\s\{0123456789\s\}\{0123456789\s\}\s white brightcyan
    keyword linestart                                           \s\s\s\s\{0123456789\s\}\s white brightcyan

# boolean and logical expressions / operators
    keyword .and. brightred/orange
    keyword .eq. brightred/orange
    keyword .eqv. brightred/orange
    keyword .false. brightred/orange
    keyword .ge. brightred/orange
    keyword .gt. brightred/orange
    keyword .le. brightred/orange
    keyword .lt. brightred/orange
    keyword .ne. brightred/orange
    keyword .neqv. brightred/orange
    keyword .not. brightred/orange
    keyword .or. brightred/orange
    keyword .true. brightred/orange
    keyword whole lge brightred/orange
    keyword whole lgt brightred/orange
    keyword whole lle brightred/orange
    keyword whole llt brightred/orange

# declarations
    keyword whole block brightcyan
    keyword whole character brightcyan
    keyword whole common brightcyan
    keyword whole complex brightcyan
    keyword whole data brightcyan
    keyword whole dimension brightcyan
    keyword whole double brightcyan
    keyword whole external brightcyan
    keyword whole format brightcyan
    keyword whole implicit brightcyan
    keyword whole integer brightcyan
    keyword whole intrinsic brightcyan
    keyword whole logical brightcyan
    keyword whole none brightcyan
    keyword whole parameter brightcyan
    keyword whole precision brightcyan
    keyword whole real brightcyan

# general programming syntax
    keyword whole assign brightgreen
    keyword whole call brightgreen
    keyword whole continue brightgreen
    keyword whole do brightgreen
    keyword whole else brightgreen
    keyword whole elseif brightgreen
    keyword whole end brightgreen
    keyword whole enddo brightgreen
    keyword whole endif brightgreen
    keyword whole for brightgreen
    keyword whole goto brightgreen
    keyword whole if brightgreen
    keyword whole pause brightgreen
    keyword whole return brightgreen
    keyword whole stop brightgreen
    keyword whole then brightgreen
    keyword whole to brightgreen
    keyword whole while brightgreen

# headers
    keyword whole entry brightgreen
    keyword whole function yellow
    keyword whole program yellow
    keyword whole subroutine yellow

# I/O functions
# may have optional equal signs after them: 'keyword ='
    keyword whole access brightmagenta
    keyword whole backspace brightmagenta
    keyword whole blank brightmagenta
    keyword whole close brightmagenta
    keyword whole direct brightmagenta
    keyword whole endfile brightmagenta
    keyword whole err brightmagenta
    keyword whole exist brightmagenta
    keyword whole file brightmagenta
    keyword whole fmt brightmagenta
    keyword whole form brightmagenta
    keyword whole formatted brightmagenta
    keyword whole inquire brightmagenta
    keyword whole iostat brightmagenta
    keyword whole name brightmagenta
    keyword whole named brightmagenta
    keyword whole nextrec brightmagenta
    keyword whole number brightmagenta
    keyword whole open brightmagenta
    keyword whole opened brightmagenta
    keyword whole print brightmagenta
    keyword whole read brightmagenta
    keyword whole rec brightmagenta
    keyword whole recl brightmagenta
    keyword whole rewind brightmagenta
    keyword whole sequential brightmagenta
    keyword whole status brightmagenta
    keyword whole unformatted brightmagenta
    keyword whole unit brightmagenta
    keyword whole write brightmagenta

# mathematical functions
    keyword whole abs yellow
    keyword whole acos yellow
    keyword whole aimag yellow
    keyword whole aint yellow
    keyword whole alog yellow
    keyword whole alog10 yellow
    keyword whole amax0 yellow
    keyword whole amax1 yellow
    keyword whole amin0 yellow
    keyword whole amin1 yellow
    keyword whole amod yellow
    keyword whole anint yellow
    keyword whole aprime yellow
    keyword whole asin yellow
    keyword whole atan yellow
    keyword whole atan2 yellow
    keyword whole acos yellow
    keyword whole cabs yellow
    keyword whole cexp yellow
    keyword whole char yellow
    keyword whole clog yellow
    keyword whole cmplx yellow
    keyword whole conjg yellow
    keyword whole cos yellow
    keyword whole cosh yellow
    keyword whole ccos yellow
    keyword whole csin yellow
    keyword whole csqrt yellow
    keyword whole dabs yellow
    keyword whole dacos yellow
    keyword whole dasin yellow
    keyword whole datan yellow
    keyword whole datan2 yellow
    keyword whole dble yellow
    keyword whole dcos yellow
    keyword whole dcosh yellow
    keyword whole dfloat yellow
    keyword whole ddmim yellow
    keyword whole dexp yellow
    keyword whole dim yellow
    keyword whole dint yellow
    keyword whole dlog yellow
    keyword whole dlog10 yellow
    keyword whole dmax1 yellow
    keyword whole dmin1 yellow
    keyword whole dmod yellow
    keyword whole dnint yellow
    keyword whole dsign yellow
    keyword whole dsin yellow
    keyword whole dsinh yellow
    keyword whole dsqrt yellow
    keyword whole dtan yellow
    keyword whole dtanh yellow
    keyword whole equivalence yellow
    keyword whole exp yellow
    keyword whole float yellow
    keyword whole iabs yellow
    keyword whole ichar yellow
    keyword whole idim yellow
    keyword whole idint yellow
    keyword whole ifix yellow
    keyword whole index yellow
    keyword whole int yellow
    keyword whole isign yellow
    keyword whole len yellow
    keyword whole log yellow
    keyword whole log10 yellow
    keyword whole max yellow
    keyword whole max0 yellow
    keyword whole max1 yellow
    keyword whole min yellow
    keyword whole min0 yellow
    keyword whole min1 yellow
    keyword whole mod yellow
    keyword whole rand yellow
    keyword whole sign yellow
    keyword whole sin yellow
    keyword whole sinh yellow
    keyword whole sngl yellow
    keyword whole sqrt yellow
    keyword whole tan yellow
    keyword whole tanh yellow

# operators and syntax elements
    keyword ( brightcyan
    keyword ) brightcyan
    keyword , brightcyan
    keyword \+ yellow
    keyword - yellow
    keyword \* yellow
    keyword / yellow
    keyword = yellow

# comments and quotes
    keyword '*' green

context exclusive linestart ! \n brown
   spellcheck
context exclusive linestart \* \n brown
   spellcheck
context exclusive linestart c \n brown
   spellcheck
context exclusive linestart C \n brown
   spellcheck