1
+ # -*- mode: perl -*-
2
+ # File/language association configuration file
3
+ #
4
+
5
+ # ######################################
6
+ # File vs. language association rules #
7
+ # ######################################
8
+
9
+ {
10
+ # How to map files to languages
11
+ # Note that the string for the key and the first entry in the
12
+ # array MUST match
13
+ ' filetype' =>
14
+ # Format is
15
+ # LXR_language_name =>
16
+ # [ ctags_language_name
17
+ # , filepattern regexp
18
+ # , module to invoke
19
+ # , (optional) tabwidth
20
+ # ]
21
+ # Note that to have another language supported by Generic.pm,
22
+ # you must ensure that:
23
+ # a) exuberant ctags supports it
24
+ # b) generic.conf is updated to specify information about the language
25
+ # c) the name of the language given here matches the entry in generic.conf
26
+ # Some languages are commented out until the relevant entries in generic.conf are made
27
+ # The list here is the set supported by ctags 5.8
28
+ {
29
+ ' ant' =>
30
+ [ ' Ant'
31
+ , ' build\.xml$'
32
+ , ' LXR::Lang::Generic'
33
+ , 2
34
+ ]
35
+ ,
36
+ ' asm' =>
37
+ [ ' Asm'
38
+ , ' \.((?i)asm|s|A51|29[kK]|[68][68][kKsSxX]|x[68][68])$'
39
+ , ' LXR::Lang::C'
40
+ , 4
41
+ ]
42
+ # ,
43
+ # 'asp'
44
+ # [ 'Asp'
45
+ # , '\.as[ap]$'
46
+ # ,
47
+ # ]
48
+ ,
49
+ ' awk' =>
50
+ [ ' Awk'
51
+ , ' \.[gm]?awk$'
52
+ , ' LXR::Lang::Generic'
53
+ , 2
54
+ ]
55
+ # ,
56
+ # 'basic'
57
+ # [ 'Basic'
58
+ # , '\.(bas|b[bi]|pb)$'
59
+ # ,
60
+ # ]
61
+ # ,
62
+ # 'beta' => [ 'Beta', '(?i)\.bet$', 'LXR::Lang::Generic' ]
63
+ ,
64
+ ' C' =>
65
+ [ ' C'
66
+ , ' \.c$|\.pc$'
67
+ , ' LXR::Lang::C'
68
+ , 4
69
+ ]
70
+ ,
71
+ ' C++' =>
72
+ [ ' C++'
73
+ , ' \.C$|((?i)\.c\+\+$|\.cc$|\.cpp$|\.cxx$|\.icc$|\.h$|\.hh$|\.hpp?$|\.hxx$|\.h\+\+$)'
74
+ , ' LXR::Lang::C'
75
+ , 4
76
+ ]
77
+ ,
78
+ ' C#' =>
79
+ [ ' C#'
80
+ , ' \.cs$'
81
+ , ' LXR::Lang::CSharp'
82
+ , 4
83
+ ]
84
+ ,
85
+ ' Cobol' => [ ' Cobol' , ' (?i)\.c(ob|bl)$' , ' LXR::Lang::Cobol' ]
86
+ ,
87
+ # CAVEAT - CAVEAT - CAVEAT - 2012-08-19 (ajl)
88
+ # Do not enable CSS: causes segmentation fault with ctags 5.8-7
89
+ # 2016-08-29 ctags 5.8-9+: CSS parser returns the complete selector
90
+ # expression, not its atomic components; second it has no notion
91
+ # of "unique" declaration and the same selector expression may be
92
+ # returned several times, violating the UNIQUE keu constrained
93
+ # in the DB.
94
+ # Conclusion: for the time being, do not enable CSS parsing -- ajl
95
+ # 'css' =>
96
+ # [ 'CSS'
97
+ # , '(?i)\.css$'
98
+ # , 'LXR::Lang::Generic'
99
+ # , 4
100
+ # ]
101
+ # ,
102
+ # 'dos' =>
103
+ # [ 'DosBatch'
104
+ # , '\.(bat|cmd)$'
105
+ # # Attention! extension .cmd conflicts with REXX
106
+ # ,
107
+ # ]
108
+ # ,
109
+ # 'eiffel' => [ 'Eiffel', '(?i)\.e$', 'LXR::Lang::Generic' ]
110
+ # ,
111
+ # 'erlang' =>
112
+ # [ 'Erlang'
113
+ # , '\.[eh]rl$'
114
+ # ,
115
+ # ]
116
+ # ,
117
+ # 'flex' =>
118
+ # [ 'Flex'
119
+ # , '\.(as|mxml)$'
120
+ # ,
121
+ # ]
122
+ ,
123
+ ' fortran' =>
124
+ [ ' Fortran'
125
+ , ' (?i)\.f$|\.for$|\.ftn$|\.f77$'
126
+ , ' LXR::Lang::Generic'
127
+ ]
128
+ # ,
129
+ # 'fortran9x' => # Must define a specific parser for new F9x syntax
130
+ # [ 'Fortran'
131
+ # , '(?i)\.f90$|\.f95$'
132
+ # , 'LXR::Lang::Generic'
133
+ # ]
134
+ ,
135
+ ' html' =>
136
+ [ ' HTML'
137
+ , ' \.s?html?$'
138
+ , ' LXR::Lang::HTML'
139
+ , 4
140
+ ]
141
+ ,
142
+ ' Java' =>
143
+ [ ' Java'
144
+ , ' (?i)\.java$'
145
+ , ' LXR::Lang::Java'
146
+ , 4
147
+ ]
148
+ ,
149
+ ' JavaScript' =>
150
+ [ ' JavaScript' ,
151
+ ' (?i)\.js$'
152
+ , ' LXR::Lang::Generic'
153
+ ]
154
+ ,
155
+ # 'Lisp' =>
156
+ # [ 'Lisp'
157
+ # , '(?i)\.cl$|\.clisp$|\.el$|\.l$|\.lisp$|\.lsp$|\.ml$'
158
+ # , 'LXR::Lang::Generic'
159
+ # ]
160
+ # ,
161
+ # 'lua' =>
162
+ # [ 'Lua'
163
+ # , '\.lua$'
164
+ # ,
165
+ # ]
166
+ # ,
167
+ # No tabwidth specified here as an example
168
+ ' Make' =>
169
+ [ ' Make'
170
+ , ' (?i)\.ma?k$|Makefile.*'
171
+ , ' LXR::Lang::Make'
172
+ ]
173
+ ,
174
+ # 'matLab' =>
175
+ # [ 'Matlab'
176
+ # , '\.m$'
177
+ # ,
178
+ # ]
179
+ # ,
180
+ # 'ocaml' =>
181
+ # [ 'Ocaml'
182
+ # , '\.mli?$'
183
+ # ,
184
+ # ]
185
+ # ,
186
+ ' Pascal' =>
187
+ [ ' Pascal'
188
+ , ' (?i)\.p$|\.pas$'
189
+ , ' LXR::Lang::Pascal'
190
+ , 4
191
+ ]
192
+ ,
193
+ ' Perl' =>
194
+ [ ' Perl'
195
+ , ' (?i)\.plx?$|\.pm$|\.perl$'
196
+ , ' LXR::Lang::Perl'
197
+ , 4
198
+ ]
199
+ ,
200
+ ' php' =>
201
+ [ ' PHP'
202
+ , ' (?i)\.php3?$|\.phtml$'
203
+ , ' LXR::Lang::Generic'
204
+ , 2
205
+ ]
206
+ ,
207
+ ' Python' =>
208
+ [ ' Python'
209
+ , ' (?i)\.pyx?$|\.python$|\.px[di]$|\.scons$'
210
+ , ' LXR::Lang::Python'
211
+ , 4
212
+ ]
213
+ ,
214
+ # 'rexx' =>
215
+ # [ 'REXX'
216
+ # , '(?i)\.cmd$|\.rexx$|\.rx$'
217
+ # # Attention! extension .cmd conflicts with DOS batch
218
+ # , 'LXR::Lang::Generic'
219
+ # ]
220
+ # ,
221
+ ' ruby' =>
222
+ [ ' Ruby'
223
+ , ' (?i)\.rb$|\.ruby$'
224
+ , ' LXR::Lang::Ruby'
225
+ ]
226
+ ,
227
+ # 'scheme' => [ 'Scheme', '(?i)\.sch$|\.scheme$|\.scm$|\.sm$', 'LXR::Lang::Generic' ]
228
+ # ,
229
+ ' shell' =>
230
+ [ ' shell'
231
+ , ' (?i)\.sh$|\.ba?sh$|\.ksh$|\.zsh$|\.m4$'
232
+ # .m4 added above though it is not properly a shell
233
+ , ' LXR::Lang::Generic'
234
+ ]
235
+ ,
236
+ # 's-Lang' => [ 'Slang', '(?i)\.sl$', 'LXR::Lang::Generic' ]
237
+ # ,
238
+ # 'sml' =>
239
+ # [ 'SML'
240
+ # , '\.sml$|\.sig$'
241
+ # ,
242
+ # ]
243
+ # ,
244
+ ' SQL' =>
245
+ [ ' SQL'
246
+ , ' (?i)\.sql$|\.pk[bs]$'
247
+ , ' LXR::Lang::Generic'
248
+ ]
249
+ ,
250
+ ' tcl' =>
251
+ [ ' Tcl'
252
+ , ' (?i)\.tcl$|\.tk$|\.wish$|\.itcl$'
253
+ , ' LXR::Lang::Generic'
254
+ ]
255
+ ,
256
+ # 'tex' =>
257
+ # [ 'Tex'
258
+ # , '\.tex$'
259
+ # ,
260
+ # ]
261
+ # ,
262
+ ' VB' =>
263
+ [ ' VB'
264
+ , ' (?i)\.bas$|\.cls$|\.ctl$|\.frm$|\.vbs$'
265
+ , ' LXR::Lang::Generic'
266
+ ]
267
+ # ,
268
+ # 'vera' =>
269
+ # [ 'Vera'
270
+ # , '\.vr[hi]?$'
271
+ # ,
272
+ # ]
273
+ # ,
274
+ # 'verilog' =>
275
+ # [ 'Verilog'
276
+ # , '\.v$'
277
+ # ,
278
+ # ]
279
+ # ,
280
+ # 'vhdl' =>
281
+ # [ 'VHDL'
282
+ # , '\.vhdl?$'
283
+ # ,
284
+ # ]
285
+ # ,
286
+ # 'vim' =>
287
+ # [ 'Vim'
288
+ # , '\.vim$'
289
+ # ,
290
+ # ]
291
+ # ,
292
+ # 'yacc' =>
293
+ # [ 'YACC'
294
+ # , '\.y$'
295
+ # ,
296
+ # ]
297
+ }
298
+
299
+ # Maps interpreter names to languages. The format is:
300
+ # regexp => langname
301
+ # - regexp is matched against the tail part after #!
302
+ # on the first line of a file
303
+ # ($ is automatically added at the end of regexp
304
+ # to match only at the end of the interpreter
305
+ # name command)
306
+ # - langname must match one of the keys in filetype above.
307
+ #
308
+ # This mapping is only used if the filename doesn't match a pattern above, so
309
+ # a shell script called shell.c will be recognised as a C file, not a shell file.
310
+
311
+ , ' interpreters' =>
312
+ { ' perl' => ' Perl'
313
+ , ' bash' => ' shell'
314
+ , ' csh' => ' shell'
315
+ , ' python' => ' Python'
316
+ , ' ksh' => ' shell'
317
+ , ' zsh' => ' shell'
318
+ , ' sh' => ' shell'
319
+ , ' ksh' => ' shell'
320
+ }
321
+ }
0 commit comments