line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# Copyright (c) 2006 Hans Jeuken. All rights reserved. |
3
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or |
4
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate; |
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
316554
|
use 5.006; |
|
5
|
|
|
|
|
70
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.14'; |
10
|
5
|
|
|
5
|
|
25
|
use strict; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
125
|
|
11
|
5
|
|
|
5
|
|
24
|
use warnings; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
148
|
|
12
|
5
|
|
|
5
|
|
30
|
use Carp qw(carp croak); |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
212
|
|
13
|
5
|
|
|
5
|
|
1539
|
use Data::Dumper; |
|
5
|
|
|
|
|
16617
|
|
|
5
|
|
|
|
|
251
|
|
14
|
5
|
|
|
5
|
|
28
|
use File::Basename; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
420
|
|
15
|
|
|
|
|
|
|
|
16
|
5
|
|
|
5
|
|
33
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
2348
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
13
|
|
|
13
|
0
|
43091
|
my $proto = shift; |
20
|
13
|
|
33
|
|
|
68
|
my $class = ref($proto) || $proto; |
21
|
13
|
|
|
|
|
45
|
my %args = (@_); |
22
|
|
|
|
|
|
|
|
23
|
13
|
|
|
|
|
30
|
my $add = delete $args{'plugins'}; |
24
|
13
|
50
|
|
|
|
41
|
unless (defined($add)) { $add = [] }; |
|
13
|
|
|
|
|
39
|
|
25
|
13
|
|
|
|
|
47
|
my $language = delete $args{'language'}; |
26
|
13
|
100
|
|
|
|
40
|
unless (defined($language)) { $language = 'Off' }; |
|
2
|
|
|
|
|
5
|
|
27
|
|
|
|
|
|
|
|
28
|
13
|
|
|
|
|
105
|
my $self = $class->SUPER::new(%args); |
29
|
|
|
|
|
|
|
|
30
|
13
|
|
|
|
|
33
|
$self->{'plugins'} = {}; |
31
|
|
|
|
|
|
|
#begin autoinsert |
32
|
13
|
|
|
|
|
2431
|
$self->{'extensions'} = { |
33
|
|
|
|
|
|
|
' *.cls' => ['LaTeX', ], |
34
|
|
|
|
|
|
|
' *.dtx' => ['LaTeX', ], |
35
|
|
|
|
|
|
|
' *.ltx' => ['LaTeX', ], |
36
|
|
|
|
|
|
|
' *.sty' => ['LaTeX', ], |
37
|
|
|
|
|
|
|
'*.4GL' => ['4GL', ], |
38
|
|
|
|
|
|
|
'*.4gl' => ['4GL', ], |
39
|
|
|
|
|
|
|
'*.ABC' => ['ABC', ], |
40
|
|
|
|
|
|
|
'*.ASM' => ['AVR Assembler', 'PicAsm', ], |
41
|
|
|
|
|
|
|
'*.BAS' => ['FreeBASIC', ], |
42
|
|
|
|
|
|
|
'*.BI' => ['FreeBASIC', ], |
43
|
|
|
|
|
|
|
'*.C' => ['C++', 'C', 'ANSI C89', ], |
44
|
|
|
|
|
|
|
'*.D' => ['D', ], |
45
|
|
|
|
|
|
|
'*.F' => ['Fortran', ], |
46
|
|
|
|
|
|
|
'*.F90' => ['Fortran', ], |
47
|
|
|
|
|
|
|
'*.F95' => ['Fortran', ], |
48
|
|
|
|
|
|
|
'*.FOR' => ['Fortran', ], |
49
|
|
|
|
|
|
|
'*.FPP' => ['Fortran', ], |
50
|
|
|
|
|
|
|
'*.GDL' => ['GDL', ], |
51
|
|
|
|
|
|
|
'*.H' => ['C++', ], |
52
|
|
|
|
|
|
|
'*.JSP' => ['JSP', ], |
53
|
|
|
|
|
|
|
'*.LOGO' => ['de_DE', 'en_US', 'nl', ], |
54
|
|
|
|
|
|
|
'*.LY' => ['LilyPond', ], |
55
|
|
|
|
|
|
|
'*.Logo' => ['de_DE', 'en_US', 'nl', ], |
56
|
|
|
|
|
|
|
'*.M' => ['Matlab', 'Octave', ], |
57
|
|
|
|
|
|
|
'*.MAB' => ['MAB-DB', ], |
58
|
|
|
|
|
|
|
'*.Mab' => ['MAB-DB', ], |
59
|
|
|
|
|
|
|
'*.PER' => ['4GL-PER', ], |
60
|
|
|
|
|
|
|
'*.PIC' => ['PicAsm', ], |
61
|
|
|
|
|
|
|
'*.PRG' => ['xHarbour', 'Clipper', ], |
62
|
|
|
|
|
|
|
'*.R' => ['R Script', ], |
63
|
|
|
|
|
|
|
'*.S' => ['GNU Assembler', ], |
64
|
|
|
|
|
|
|
'*.SQL' => ['SQL', 'SQL (MySQL)', 'SQL (PostgreSQL)', ], |
65
|
|
|
|
|
|
|
'*.SRC' => ['PicAsm', ], |
66
|
|
|
|
|
|
|
'*.V' => ['Verilog', ], |
67
|
|
|
|
|
|
|
'*.VCG' => ['GDL', ], |
68
|
|
|
|
|
|
|
'*.a' => ['Ada', ], |
69
|
|
|
|
|
|
|
'*.abc' => ['ABC', ], |
70
|
|
|
|
|
|
|
'*.ada' => ['Ada', ], |
71
|
|
|
|
|
|
|
'*.adb' => ['Ada', ], |
72
|
|
|
|
|
|
|
'*.ado' => ['Stata', ], |
73
|
|
|
|
|
|
|
'*.ads' => ['Ada', ], |
74
|
|
|
|
|
|
|
'*.ahdl' => ['AHDL', ], |
75
|
|
|
|
|
|
|
'*.ai' => ['PostScript', ], |
76
|
|
|
|
|
|
|
'*.ans' => ['Ansys', ], |
77
|
|
|
|
|
|
|
'*.asm' => ['AVR Assembler', 'Asm6502', 'Intel x86 (NASM)', 'PicAsm', ], |
78
|
|
|
|
|
|
|
'*.asm-avr' => ['AVR Assembler', ], |
79
|
|
|
|
|
|
|
'*.asp' => ['ASP', ], |
80
|
|
|
|
|
|
|
'*.awk' => ['AWK', ], |
81
|
|
|
|
|
|
|
'*.bas' => ['FreeBASIC', ], |
82
|
|
|
|
|
|
|
'*.basetest' => ['BaseTest', ], |
83
|
|
|
|
|
|
|
'*.bash' => ['Bash', ], |
84
|
|
|
|
|
|
|
'*.bi' => ['FreeBASIC', ], |
85
|
|
|
|
|
|
|
'*.bib' => ['BibTeX', ], |
86
|
|
|
|
|
|
|
'*.bro' => ['Component-Pascal', ], |
87
|
|
|
|
|
|
|
'*.c' => ['C', 'ANSI C89', 'LPC', ], |
88
|
|
|
|
|
|
|
'*.c++' => ['C++', ], |
89
|
|
|
|
|
|
|
'*.cc' => ['C++', ], |
90
|
|
|
|
|
|
|
'*.cfc' => ['ColdFusion', ], |
91
|
|
|
|
|
|
|
'*.cfg' => ['Quake Script', ], |
92
|
|
|
|
|
|
|
'*.cfm' => ['ColdFusion', ], |
93
|
|
|
|
|
|
|
'*.cfml' => ['ColdFusion', ], |
94
|
|
|
|
|
|
|
'*.cg' => ['Cg', ], |
95
|
|
|
|
|
|
|
'*.cgis' => ['CGiS', ], |
96
|
|
|
|
|
|
|
'*.ch' => ['xHarbour', 'Clipper', ], |
97
|
|
|
|
|
|
|
'*.cis' => ['Cisco', ], |
98
|
|
|
|
|
|
|
'*.cl' => ['Common Lisp', ], |
99
|
|
|
|
|
|
|
'*.cmake' => ['CMake', ], |
100
|
|
|
|
|
|
|
'*.config' => ['Logtalk', ], |
101
|
|
|
|
|
|
|
'*.cp' => ['Component-Pascal', ], |
102
|
|
|
|
|
|
|
'*.cpp' => ['C++', ], |
103
|
|
|
|
|
|
|
'*.cs' => ['C#', ], |
104
|
|
|
|
|
|
|
'*.css' => ['CSS', ], |
105
|
|
|
|
|
|
|
'*.cue' => ['CUE Sheet', ], |
106
|
|
|
|
|
|
|
'*.cxx' => ['C++', ], |
107
|
|
|
|
|
|
|
'*.d' => ['D', ], |
108
|
|
|
|
|
|
|
'*.daml' => ['XML', ], |
109
|
|
|
|
|
|
|
'*.dbm' => ['ColdFusion', ], |
110
|
|
|
|
|
|
|
'*.def' => ['Modula-2', ], |
111
|
|
|
|
|
|
|
'*.desktop' => ['.desktop', ], |
112
|
|
|
|
|
|
|
'*.diff' => ['Diff', ], |
113
|
|
|
|
|
|
|
'*.do' => ['Stata', ], |
114
|
|
|
|
|
|
|
'*.docbook' => ['XML', ], |
115
|
|
|
|
|
|
|
'*.dox' => ['Doxygen', ], |
116
|
|
|
|
|
|
|
'*.doxygen' => ['Doxygen', ], |
117
|
|
|
|
|
|
|
'*.e' => ['E Language', 'Eiffel', 'Euphoria', ], |
118
|
|
|
|
|
|
|
'*.ebuild' => ['Bash', ], |
119
|
|
|
|
|
|
|
'*.eclass' => ['Bash', ], |
120
|
|
|
|
|
|
|
'*.eml' => ['Email', ], |
121
|
|
|
|
|
|
|
'*.eps' => ['PostScript', ], |
122
|
|
|
|
|
|
|
'*.err' => ['4GL', ], |
123
|
|
|
|
|
|
|
'*.ex' => ['Euphoria', ], |
124
|
|
|
|
|
|
|
'*.exu' => ['Euphoria', ], |
125
|
|
|
|
|
|
|
'*.exw' => ['Euphoria', ], |
126
|
|
|
|
|
|
|
'*.f' => ['Fortran', ], |
127
|
|
|
|
|
|
|
'*.f90' => ['Fortran', ], |
128
|
|
|
|
|
|
|
'*.f95' => ['Fortran', ], |
129
|
|
|
|
|
|
|
'*.fe' => ['ferite', ], |
130
|
|
|
|
|
|
|
'*.feh' => ['ferite', ], |
131
|
|
|
|
|
|
|
'*.flex' => ['Lex/Flex', ], |
132
|
|
|
|
|
|
|
'*.for' => ['Fortran', ], |
133
|
|
|
|
|
|
|
'*.fpp' => ['Fortran', ], |
134
|
|
|
|
|
|
|
'*.frag' => ['GLSL', ], |
135
|
|
|
|
|
|
|
'*.gdl' => ['GDL', ], |
136
|
|
|
|
|
|
|
'*.glsl' => ['GLSL', ], |
137
|
|
|
|
|
|
|
'*.guile' => ['Scheme', ], |
138
|
|
|
|
|
|
|
'*.h' => ['C++', 'C', 'ANSI C89', 'Inform', 'LPC', 'Objective-C', ], |
139
|
|
|
|
|
|
|
'*.h++' => ['C++', ], |
140
|
|
|
|
|
|
|
'*.hcc' => ['C++', ], |
141
|
|
|
|
|
|
|
'*.hpp' => ['C++', ], |
142
|
|
|
|
|
|
|
'*.hs' => ['Haskell', ], |
143
|
|
|
|
|
|
|
'*.hsp' => ['Spice', ], |
144
|
|
|
|
|
|
|
'*.ht' => ['Apache Configuration', ], |
145
|
|
|
|
|
|
|
'*.htm' => ['HTML', ], |
146
|
|
|
|
|
|
|
'*.html' => ['HTML', 'Mason', ], |
147
|
|
|
|
|
|
|
'*.hxx' => ['C++', ], |
148
|
|
|
|
|
|
|
'*.i' => ['progress', ], |
149
|
|
|
|
|
|
|
'*.idl' => ['IDL', ], |
150
|
|
|
|
|
|
|
'*.inc' => ['POV-Ray', 'PHP (HTML)', 'LPC', ], |
151
|
|
|
|
|
|
|
'*.inf' => ['Inform', ], |
152
|
|
|
|
|
|
|
'*.ini' => ['INI Files', ], |
153
|
|
|
|
|
|
|
'*.java' => ['Java', ], |
154
|
|
|
|
|
|
|
'*.js' => ['JavaScript', ], |
155
|
|
|
|
|
|
|
'*.jsp' => ['JSP', ], |
156
|
|
|
|
|
|
|
'*.katetemplate' => ['Kate File Template', ], |
157
|
|
|
|
|
|
|
'*.kbasic' => ['KBasic', ], |
158
|
|
|
|
|
|
|
'*.kdelnk' => ['.desktop', ], |
159
|
|
|
|
|
|
|
'*.l' => ['Lex/Flex', ], |
160
|
|
|
|
|
|
|
'*.ldif' => ['LDIF', ], |
161
|
|
|
|
|
|
|
'*.lex' => ['Lex/Flex', ], |
162
|
|
|
|
|
|
|
'*.lgo' => ['de_DE', 'en_US', 'nl', ], |
163
|
|
|
|
|
|
|
'*.lgt' => ['Logtalk', ], |
164
|
|
|
|
|
|
|
'*.lhs' => ['Literate Haskell', ], |
165
|
|
|
|
|
|
|
'*.lisp' => ['Common Lisp', ], |
166
|
|
|
|
|
|
|
'*.logo' => ['de_DE', 'en_US', 'nl', ], |
167
|
|
|
|
|
|
|
'*.lsp' => ['Common Lisp', ], |
168
|
|
|
|
|
|
|
'*.lua' => ['Lua', ], |
169
|
|
|
|
|
|
|
'*.ly' => ['LilyPond', ], |
170
|
|
|
|
|
|
|
'*.m' => ['Matlab', 'Objective-C', 'Octave', ], |
171
|
|
|
|
|
|
|
'*.m3u' => ['M3U', ], |
172
|
|
|
|
|
|
|
'*.mab' => ['MAB-DB', ], |
173
|
|
|
|
|
|
|
'*.md' => ['Modula-2', ], |
174
|
|
|
|
|
|
|
'*.mi' => ['Modula-2', ], |
175
|
|
|
|
|
|
|
'*.ml' => ['Objective Caml', 'SML', ], |
176
|
|
|
|
|
|
|
'*.mli' => ['Objective Caml', ], |
177
|
|
|
|
|
|
|
'*.moc' => ['C++', ], |
178
|
|
|
|
|
|
|
'*.mod' => ['Modula-2', ], |
179
|
|
|
|
|
|
|
'*.mup' => ['Music Publisher', ], |
180
|
|
|
|
|
|
|
'*.not' => ['Music Publisher', ], |
181
|
|
|
|
|
|
|
'*.o' => ['LPC', ], |
182
|
|
|
|
|
|
|
'*.octave' => ['Octave', ], |
183
|
|
|
|
|
|
|
'*.p' => ['Pascal', 'progress', ], |
184
|
|
|
|
|
|
|
'*.pas' => ['Pascal', ], |
185
|
|
|
|
|
|
|
'*.pb' => ['PureBasic', ], |
186
|
|
|
|
|
|
|
'*.per' => ['4GL-PER', ], |
187
|
|
|
|
|
|
|
'*.per.err' => ['4GL-PER', ], |
188
|
|
|
|
|
|
|
'*.php' => ['PHP (HTML)', ], |
189
|
|
|
|
|
|
|
'*.php3' => ['PHP (HTML)', ], |
190
|
|
|
|
|
|
|
'*.phtm' => ['PHP (HTML)', ], |
191
|
|
|
|
|
|
|
'*.phtml' => ['PHP (HTML)', ], |
192
|
|
|
|
|
|
|
'*.pic' => ['PicAsm', ], |
193
|
|
|
|
|
|
|
'*.pike' => ['Pike', ], |
194
|
|
|
|
|
|
|
'*.pl' => ['Perl', ], |
195
|
|
|
|
|
|
|
'*.pls' => ['INI Files', ], |
196
|
|
|
|
|
|
|
'*.pm' => ['Perl', ], |
197
|
|
|
|
|
|
|
'*.po' => ['GNU Gettext', ], |
198
|
|
|
|
|
|
|
'*.pot' => ['GNU Gettext', ], |
199
|
|
|
|
|
|
|
'*.pov' => ['POV-Ray', ], |
200
|
|
|
|
|
|
|
'*.pp' => ['Pascal', ], |
201
|
|
|
|
|
|
|
'*.prg' => ['xHarbour', 'Clipper', ], |
202
|
|
|
|
|
|
|
'*.pro' => ['RSI IDL', ], |
203
|
|
|
|
|
|
|
'*.prolog' => ['Prolog', ], |
204
|
|
|
|
|
|
|
'*.ps' => ['PostScript', ], |
205
|
|
|
|
|
|
|
'*.py' => ['Python', ], |
206
|
|
|
|
|
|
|
'*.pyw' => ['Python', ], |
207
|
|
|
|
|
|
|
'*.rb' => ['Ruby', ], |
208
|
|
|
|
|
|
|
'*.rc' => ['XML', ], |
209
|
|
|
|
|
|
|
'*.rdf' => ['XML', ], |
210
|
|
|
|
|
|
|
'*.reg' => ['WINE Config', ], |
211
|
|
|
|
|
|
|
'*.rex' => ['REXX', ], |
212
|
|
|
|
|
|
|
'*.rib' => ['RenderMan RIB', ], |
213
|
|
|
|
|
|
|
'*.s' => ['GNU Assembler', 'MIPS Assembler', ], |
214
|
|
|
|
|
|
|
'*.sa' => ['Sather', ], |
215
|
|
|
|
|
|
|
'*.sce' => ['scilab', ], |
216
|
|
|
|
|
|
|
'*.scheme' => ['Scheme', ], |
217
|
|
|
|
|
|
|
'*.sci' => ['scilab', ], |
218
|
|
|
|
|
|
|
'*.scm' => ['Scheme', ], |
219
|
|
|
|
|
|
|
'*.sgml' => ['SGML', ], |
220
|
|
|
|
|
|
|
'*.sh' => ['Bash', ], |
221
|
|
|
|
|
|
|
'*.shtm' => ['HTML', ], |
222
|
|
|
|
|
|
|
'*.shtml' => ['HTML', ], |
223
|
|
|
|
|
|
|
'*.siv' => ['Sieve', ], |
224
|
|
|
|
|
|
|
'*.sml' => ['SML', ], |
225
|
|
|
|
|
|
|
'*.sp' => ['Spice', ], |
226
|
|
|
|
|
|
|
'*.spec' => ['RPM Spec', ], |
227
|
|
|
|
|
|
|
'*.sql' => ['SQL', 'SQL (MySQL)', 'SQL (PostgreSQL)', ], |
228
|
|
|
|
|
|
|
'*.src' => ['PicAsm', ], |
229
|
|
|
|
|
|
|
'*.ss' => ['Scheme', ], |
230
|
|
|
|
|
|
|
'*.t2t' => ['txt2tags', ], |
231
|
|
|
|
|
|
|
'*.tcl' => ['Tcl/Tk', ], |
232
|
|
|
|
|
|
|
'*.tdf' => ['AHDL', ], |
233
|
|
|
|
|
|
|
'*.tex' => ['LaTeX', ], |
234
|
|
|
|
|
|
|
'*.tji' => ['TaskJuggler', ], |
235
|
|
|
|
|
|
|
'*.tjp' => ['TaskJuggler', ], |
236
|
|
|
|
|
|
|
'*.tk' => ['Tcl/Tk', ], |
237
|
|
|
|
|
|
|
'*.tst' => ['BaseTestchild', ], |
238
|
|
|
|
|
|
|
'*.uc' => ['UnrealScript', ], |
239
|
|
|
|
|
|
|
'*.v' => ['Verilog', ], |
240
|
|
|
|
|
|
|
'*.vcg' => ['GDL', ], |
241
|
|
|
|
|
|
|
'*.vert' => ['GLSL', ], |
242
|
|
|
|
|
|
|
'*.vhd' => ['VHDL', ], |
243
|
|
|
|
|
|
|
'*.vhdl' => ['VHDL', ], |
244
|
|
|
|
|
|
|
'*.vl' => ['Verilog', ], |
245
|
|
|
|
|
|
|
'*.vm' => ['Velocity', ], |
246
|
|
|
|
|
|
|
'*.w' => ['progress', ], |
247
|
|
|
|
|
|
|
'*.wml' => ['PHP (HTML)', ], |
248
|
|
|
|
|
|
|
'*.wrl' => ['VRML', ], |
249
|
|
|
|
|
|
|
'*.xml' => ['XML', ], |
250
|
|
|
|
|
|
|
'*.xsl' => ['xslt', ], |
251
|
|
|
|
|
|
|
'*.xslt' => ['xslt', ], |
252
|
|
|
|
|
|
|
'*.y' => ['Yacc/Bison', ], |
253
|
|
|
|
|
|
|
'*.ys' => ['yacas', ], |
254
|
|
|
|
|
|
|
'*Makefile*' => ['Makefile', ], |
255
|
|
|
|
|
|
|
'*makefile*' => ['Makefile', ], |
256
|
|
|
|
|
|
|
'*patch' => ['Diff', ], |
257
|
|
|
|
|
|
|
'CMakeLists.txt' => ['CMake', ], |
258
|
|
|
|
|
|
|
'ChangeLog' => ['ChangeLog', ], |
259
|
|
|
|
|
|
|
'QRPGLESRC.*' => ['ILERPG', ], |
260
|
|
|
|
|
|
|
'apache.conf' => ['Apache Configuration', ], |
261
|
|
|
|
|
|
|
'apache2.conf' => ['Apache Configuration', ], |
262
|
|
|
|
|
|
|
'httpd.conf' => ['Apache Configuration', ], |
263
|
|
|
|
|
|
|
'httpd2.conf' => ['Apache Configuration', ], |
264
|
|
|
|
|
|
|
'xorg.conf' => ['x.org Configuration', ], |
265
|
|
|
|
|
|
|
}; |
266
|
13
|
|
|
|
|
722
|
$self->{'sections'} = { |
267
|
|
|
|
|
|
|
'Assembler' => [ |
268
|
|
|
|
|
|
|
'AVR Assembler', |
269
|
|
|
|
|
|
|
'Asm6502', |
270
|
|
|
|
|
|
|
'GNU Assembler', |
271
|
|
|
|
|
|
|
'Intel x86 (NASM)', |
272
|
|
|
|
|
|
|
'MIPS Assembler', |
273
|
|
|
|
|
|
|
'PicAsm', |
274
|
|
|
|
|
|
|
], |
275
|
|
|
|
|
|
|
'Configuration' => [ |
276
|
|
|
|
|
|
|
'.desktop', |
277
|
|
|
|
|
|
|
'Apache Configuration', |
278
|
|
|
|
|
|
|
'Cisco', |
279
|
|
|
|
|
|
|
'INI Files', |
280
|
|
|
|
|
|
|
'WINE Config', |
281
|
|
|
|
|
|
|
'x.org Configuration', |
282
|
|
|
|
|
|
|
], |
283
|
|
|
|
|
|
|
'Database' => [ |
284
|
|
|
|
|
|
|
'4GL', |
285
|
|
|
|
|
|
|
'4GL-PER', |
286
|
|
|
|
|
|
|
'LDIF', |
287
|
|
|
|
|
|
|
'SQL', |
288
|
|
|
|
|
|
|
'SQL (MySQL)', |
289
|
|
|
|
|
|
|
'SQL (PostgreSQL)', |
290
|
|
|
|
|
|
|
'progress', |
291
|
|
|
|
|
|
|
], |
292
|
|
|
|
|
|
|
'Hardware' => [ |
293
|
|
|
|
|
|
|
'AHDL', |
294
|
|
|
|
|
|
|
'Spice', |
295
|
|
|
|
|
|
|
'VHDL', |
296
|
|
|
|
|
|
|
'Verilog', |
297
|
|
|
|
|
|
|
], |
298
|
|
|
|
|
|
|
'Logo' => [ |
299
|
|
|
|
|
|
|
'de_DE', |
300
|
|
|
|
|
|
|
'en_US', |
301
|
|
|
|
|
|
|
'nl', |
302
|
|
|
|
|
|
|
], |
303
|
|
|
|
|
|
|
'Markup' => [ |
304
|
|
|
|
|
|
|
'ASP', |
305
|
|
|
|
|
|
|
'BibTeX', |
306
|
|
|
|
|
|
|
'CSS', |
307
|
|
|
|
|
|
|
'ColdFusion', |
308
|
|
|
|
|
|
|
'Doxygen', |
309
|
|
|
|
|
|
|
'GNU Gettext', |
310
|
|
|
|
|
|
|
'HTML', |
311
|
|
|
|
|
|
|
'JSP', |
312
|
|
|
|
|
|
|
'Javadoc', |
313
|
|
|
|
|
|
|
'Kate File Template', |
314
|
|
|
|
|
|
|
'LaTeX', |
315
|
|
|
|
|
|
|
'MAB-DB', |
316
|
|
|
|
|
|
|
'PostScript', |
317
|
|
|
|
|
|
|
'SGML', |
318
|
|
|
|
|
|
|
'VRML', |
319
|
|
|
|
|
|
|
'Wikimedia', |
320
|
|
|
|
|
|
|
'XML', |
321
|
|
|
|
|
|
|
'txt2tags', |
322
|
|
|
|
|
|
|
'xslt', |
323
|
|
|
|
|
|
|
], |
324
|
|
|
|
|
|
|
'Other' => [ |
325
|
|
|
|
|
|
|
'ABC', |
326
|
|
|
|
|
|
|
'Alerts', |
327
|
|
|
|
|
|
|
'CMake', |
328
|
|
|
|
|
|
|
'CSS/PHP', |
329
|
|
|
|
|
|
|
'CUE Sheet', |
330
|
|
|
|
|
|
|
'ChangeLog', |
331
|
|
|
|
|
|
|
'Debian Changelog', |
332
|
|
|
|
|
|
|
'Debian Control', |
333
|
|
|
|
|
|
|
'Diff', |
334
|
|
|
|
|
|
|
'Email', |
335
|
|
|
|
|
|
|
'JavaScript/PHP', |
336
|
|
|
|
|
|
|
'LilyPond', |
337
|
|
|
|
|
|
|
'M3U', |
338
|
|
|
|
|
|
|
'Makefile', |
339
|
|
|
|
|
|
|
'Music Publisher', |
340
|
|
|
|
|
|
|
'POV-Ray', |
341
|
|
|
|
|
|
|
'RPM Spec', |
342
|
|
|
|
|
|
|
'RenderMan RIB', |
343
|
|
|
|
|
|
|
], |
344
|
|
|
|
|
|
|
'Scientific' => [ |
345
|
|
|
|
|
|
|
'GDL', |
346
|
|
|
|
|
|
|
'Matlab', |
347
|
|
|
|
|
|
|
'Octave', |
348
|
|
|
|
|
|
|
'TI Basic', |
349
|
|
|
|
|
|
|
'scilab', |
350
|
|
|
|
|
|
|
], |
351
|
|
|
|
|
|
|
'Script' => [ |
352
|
|
|
|
|
|
|
'Ansys', |
353
|
|
|
|
|
|
|
], |
354
|
|
|
|
|
|
|
'Scripts' => [ |
355
|
|
|
|
|
|
|
'AWK', |
356
|
|
|
|
|
|
|
'Bash', |
357
|
|
|
|
|
|
|
'Common Lisp', |
358
|
|
|
|
|
|
|
'Euphoria', |
359
|
|
|
|
|
|
|
'JavaScript', |
360
|
|
|
|
|
|
|
'Lua', |
361
|
|
|
|
|
|
|
'Mason', |
362
|
|
|
|
|
|
|
'PHP (HTML)', |
363
|
|
|
|
|
|
|
'PHP/PHP', |
364
|
|
|
|
|
|
|
'Perl', |
365
|
|
|
|
|
|
|
'Pike', |
366
|
|
|
|
|
|
|
'Python', |
367
|
|
|
|
|
|
|
'Quake Script', |
368
|
|
|
|
|
|
|
'R Script', |
369
|
|
|
|
|
|
|
'REXX', |
370
|
|
|
|
|
|
|
'Ruby', |
371
|
|
|
|
|
|
|
'Scheme', |
372
|
|
|
|
|
|
|
'Sieve', |
373
|
|
|
|
|
|
|
'TaskJuggler', |
374
|
|
|
|
|
|
|
'Tcl/Tk', |
375
|
|
|
|
|
|
|
'UnrealScript', |
376
|
|
|
|
|
|
|
'Velocity', |
377
|
|
|
|
|
|
|
'ferite', |
378
|
|
|
|
|
|
|
], |
379
|
|
|
|
|
|
|
'Sources' => [ |
380
|
|
|
|
|
|
|
'ANSI C89', |
381
|
|
|
|
|
|
|
'Ada', |
382
|
|
|
|
|
|
|
'C', |
383
|
|
|
|
|
|
|
'C#', |
384
|
|
|
|
|
|
|
'C++', |
385
|
|
|
|
|
|
|
'CGiS', |
386
|
|
|
|
|
|
|
'Cg', |
387
|
|
|
|
|
|
|
'Clipper', |
388
|
|
|
|
|
|
|
'Component-Pascal', |
389
|
|
|
|
|
|
|
'D', |
390
|
|
|
|
|
|
|
'E Language', |
391
|
|
|
|
|
|
|
'Eiffel', |
392
|
|
|
|
|
|
|
'Fortran', |
393
|
|
|
|
|
|
|
'FreeBASIC', |
394
|
|
|
|
|
|
|
'GLSL', |
395
|
|
|
|
|
|
|
'Haskell', |
396
|
|
|
|
|
|
|
'IDL', |
397
|
|
|
|
|
|
|
'ILERPG', |
398
|
|
|
|
|
|
|
'Inform', |
399
|
|
|
|
|
|
|
'Java', |
400
|
|
|
|
|
|
|
'KBasic', |
401
|
|
|
|
|
|
|
'LPC', |
402
|
|
|
|
|
|
|
'Lex/Flex', |
403
|
|
|
|
|
|
|
'Literate Haskell', |
404
|
|
|
|
|
|
|
'Logtalk', |
405
|
|
|
|
|
|
|
'Modula-2', |
406
|
|
|
|
|
|
|
'Objective Caml', |
407
|
|
|
|
|
|
|
'Objective-C', |
408
|
|
|
|
|
|
|
'Pascal', |
409
|
|
|
|
|
|
|
'Prolog', |
410
|
|
|
|
|
|
|
'PureBasic', |
411
|
|
|
|
|
|
|
'RSI IDL', |
412
|
|
|
|
|
|
|
'SML', |
413
|
|
|
|
|
|
|
'Sather', |
414
|
|
|
|
|
|
|
'Stata', |
415
|
|
|
|
|
|
|
'Yacc/Bison', |
416
|
|
|
|
|
|
|
'xHarbour', |
417
|
|
|
|
|
|
|
'yacas', |
418
|
|
|
|
|
|
|
], |
419
|
|
|
|
|
|
|
'Test' => [ |
420
|
|
|
|
|
|
|
'BaseTest', |
421
|
|
|
|
|
|
|
'BaseTestchild', |
422
|
|
|
|
|
|
|
], |
423
|
|
|
|
|
|
|
}; |
424
|
13
|
|
|
|
|
826
|
$self->{'syntaxes'} = { |
425
|
|
|
|
|
|
|
'.desktop' => 'Desktop', |
426
|
|
|
|
|
|
|
'4GL' => 'FourGL', |
427
|
|
|
|
|
|
|
'4GL-PER' => 'FourGLminusPER', |
428
|
|
|
|
|
|
|
'ABC' => 'ABC', |
429
|
|
|
|
|
|
|
'AHDL' => 'AHDL', |
430
|
|
|
|
|
|
|
'ANSI C89' => 'ANSI_C89', |
431
|
|
|
|
|
|
|
'ASP' => 'ASP', |
432
|
|
|
|
|
|
|
'AVR Assembler' => 'AVR_Assembler', |
433
|
|
|
|
|
|
|
'AWK' => 'AWK', |
434
|
|
|
|
|
|
|
'Ada' => 'Ada', |
435
|
|
|
|
|
|
|
'Alerts' => 'Alerts', |
436
|
|
|
|
|
|
|
'Ansys' => 'Ansys', |
437
|
|
|
|
|
|
|
'Apache Configuration' => 'Apache_Configuration', |
438
|
|
|
|
|
|
|
'Asm6502' => 'Asm6502', |
439
|
|
|
|
|
|
|
'BaseTest' => 'BaseTest', |
440
|
|
|
|
|
|
|
'BaseTestchild' => 'BaseTestchild', |
441
|
|
|
|
|
|
|
'Bash' => 'Bash', |
442
|
|
|
|
|
|
|
'BibTeX' => 'BibTeX', |
443
|
|
|
|
|
|
|
'C' => 'C', |
444
|
|
|
|
|
|
|
'C#' => 'Cdash', |
445
|
|
|
|
|
|
|
'C++' => 'Cplusplus', |
446
|
|
|
|
|
|
|
'CGiS' => 'CGiS', |
447
|
|
|
|
|
|
|
'CMake' => 'CMake', |
448
|
|
|
|
|
|
|
'CSS' => 'CSS', |
449
|
|
|
|
|
|
|
'CSS/PHP' => 'CSS_PHP', |
450
|
|
|
|
|
|
|
'CUE Sheet' => 'CUE_Sheet', |
451
|
|
|
|
|
|
|
'Cg' => 'Cg', |
452
|
|
|
|
|
|
|
'ChangeLog' => 'ChangeLog', |
453
|
|
|
|
|
|
|
'Cisco' => 'Cisco', |
454
|
|
|
|
|
|
|
'Clipper' => 'Clipper', |
455
|
|
|
|
|
|
|
'ColdFusion' => 'ColdFusion', |
456
|
|
|
|
|
|
|
'Common Lisp' => 'Common_Lisp', |
457
|
|
|
|
|
|
|
'Component-Pascal' => 'ComponentminusPascal', |
458
|
|
|
|
|
|
|
'D' => 'D', |
459
|
|
|
|
|
|
|
'Debian Changelog' => 'Debian_Changelog', |
460
|
|
|
|
|
|
|
'Debian Control' => 'Debian_Control', |
461
|
|
|
|
|
|
|
'Diff' => 'Diff', |
462
|
|
|
|
|
|
|
'Doxygen' => 'Doxygen', |
463
|
|
|
|
|
|
|
'E Language' => 'E_Language', |
464
|
|
|
|
|
|
|
'Eiffel' => 'Eiffel', |
465
|
|
|
|
|
|
|
'Email' => 'Email', |
466
|
|
|
|
|
|
|
'Euphoria' => 'Euphoria', |
467
|
|
|
|
|
|
|
'Fortran' => 'Fortran', |
468
|
|
|
|
|
|
|
'FreeBASIC' => 'FreeBASIC', |
469
|
|
|
|
|
|
|
'GDL' => 'GDL', |
470
|
|
|
|
|
|
|
'GLSL' => 'GLSL', |
471
|
|
|
|
|
|
|
'GNU Assembler' => 'GNU_Assembler', |
472
|
|
|
|
|
|
|
'GNU Gettext' => 'GNU_Gettext', |
473
|
|
|
|
|
|
|
'HTML' => 'HTML', |
474
|
|
|
|
|
|
|
'Haskell' => 'Haskell', |
475
|
|
|
|
|
|
|
'IDL' => 'IDL', |
476
|
|
|
|
|
|
|
'ILERPG' => 'ILERPG', |
477
|
|
|
|
|
|
|
'INI Files' => 'INI_Files', |
478
|
|
|
|
|
|
|
'Inform' => 'Inform', |
479
|
|
|
|
|
|
|
'Intel x86 (NASM)' => 'Intel_x86_NASM', |
480
|
|
|
|
|
|
|
'JSP' => 'JSP', |
481
|
|
|
|
|
|
|
'Java' => 'Java', |
482
|
|
|
|
|
|
|
'JavaScript' => 'JavaScript', |
483
|
|
|
|
|
|
|
'JavaScript/PHP' => 'JavaScript_PHP', |
484
|
|
|
|
|
|
|
'Javadoc' => 'Javadoc', |
485
|
|
|
|
|
|
|
'KBasic' => 'KBasic', |
486
|
|
|
|
|
|
|
'Kate File Template' => 'Kate_File_Template', |
487
|
|
|
|
|
|
|
'LDIF' => 'LDIF', |
488
|
|
|
|
|
|
|
'LPC' => 'LPC', |
489
|
|
|
|
|
|
|
'LaTeX' => 'LaTeX', |
490
|
|
|
|
|
|
|
'Lex/Flex' => 'Lex_Flex', |
491
|
|
|
|
|
|
|
'LilyPond' => 'LilyPond', |
492
|
|
|
|
|
|
|
'Literate Haskell' => 'Literate_Haskell', |
493
|
|
|
|
|
|
|
'Logtalk' => 'Logtalk', |
494
|
|
|
|
|
|
|
'Lua' => 'Lua', |
495
|
|
|
|
|
|
|
'M3U' => 'M3U', |
496
|
|
|
|
|
|
|
'MAB-DB' => 'MABminusDB', |
497
|
|
|
|
|
|
|
'MIPS Assembler' => 'MIPS_Assembler', |
498
|
|
|
|
|
|
|
'Makefile' => 'Makefile', |
499
|
|
|
|
|
|
|
'Mason' => 'Mason', |
500
|
|
|
|
|
|
|
'Matlab' => 'Matlab', |
501
|
|
|
|
|
|
|
'Modula-2' => 'Modulaminus2', |
502
|
|
|
|
|
|
|
'Music Publisher' => 'Music_Publisher', |
503
|
|
|
|
|
|
|
'Objective Caml' => 'Objective_Caml', |
504
|
|
|
|
|
|
|
'Objective-C' => 'ObjectiveminusC', |
505
|
|
|
|
|
|
|
'Octave' => 'Octave', |
506
|
|
|
|
|
|
|
'PHP (HTML)' => 'PHP_HTML', |
507
|
|
|
|
|
|
|
'PHP/PHP' => 'PHP_PHP', |
508
|
|
|
|
|
|
|
'POV-Ray' => 'POVminusRay', |
509
|
|
|
|
|
|
|
'Pascal' => 'Pascal', |
510
|
|
|
|
|
|
|
'Perl' => 'Perl', |
511
|
|
|
|
|
|
|
'PicAsm' => 'PicAsm', |
512
|
|
|
|
|
|
|
'Pike' => 'Pike', |
513
|
|
|
|
|
|
|
'PostScript' => 'PostScript', |
514
|
|
|
|
|
|
|
'Prolog' => 'Prolog', |
515
|
|
|
|
|
|
|
'PureBasic' => 'PureBasic', |
516
|
|
|
|
|
|
|
'Python' => 'Python', |
517
|
|
|
|
|
|
|
'Quake Script' => 'Quake_Script', |
518
|
|
|
|
|
|
|
'R Script' => 'R_Script', |
519
|
|
|
|
|
|
|
'REXX' => 'REXX', |
520
|
|
|
|
|
|
|
'RPM Spec' => 'RPM_Spec', |
521
|
|
|
|
|
|
|
'RSI IDL' => 'RSI_IDL', |
522
|
|
|
|
|
|
|
'RenderMan RIB' => 'RenderMan_RIB', |
523
|
|
|
|
|
|
|
'Ruby' => 'Ruby', |
524
|
|
|
|
|
|
|
'SGML' => 'SGML', |
525
|
|
|
|
|
|
|
'SML' => 'SML', |
526
|
|
|
|
|
|
|
'SQL' => 'SQL', |
527
|
|
|
|
|
|
|
'SQL (MySQL)' => 'SQL_MySQL', |
528
|
|
|
|
|
|
|
'SQL (PostgreSQL)' => 'SQL_PostgreSQL', |
529
|
|
|
|
|
|
|
'Sather' => 'Sather', |
530
|
|
|
|
|
|
|
'Scheme' => 'Scheme', |
531
|
|
|
|
|
|
|
'Sieve' => 'Sieve', |
532
|
|
|
|
|
|
|
'Spice' => 'Spice', |
533
|
|
|
|
|
|
|
'Stata' => 'Stata', |
534
|
|
|
|
|
|
|
'TI Basic' => 'TI_Basic', |
535
|
|
|
|
|
|
|
'TaskJuggler' => 'TaskJuggler', |
536
|
|
|
|
|
|
|
'Tcl/Tk' => 'Tcl_Tk', |
537
|
|
|
|
|
|
|
'UnrealScript' => 'UnrealScript', |
538
|
|
|
|
|
|
|
'VHDL' => 'VHDL', |
539
|
|
|
|
|
|
|
'VRML' => 'VRML', |
540
|
|
|
|
|
|
|
'Velocity' => 'Velocity', |
541
|
|
|
|
|
|
|
'Verilog' => 'Verilog', |
542
|
|
|
|
|
|
|
'WINE Config' => 'WINE_Config', |
543
|
|
|
|
|
|
|
'Wikimedia' => 'Wikimedia', |
544
|
|
|
|
|
|
|
'XML' => 'XML', |
545
|
|
|
|
|
|
|
'Yacc/Bison' => 'Yacc_Bison', |
546
|
|
|
|
|
|
|
'de_DE' => 'De_DE', |
547
|
|
|
|
|
|
|
'en_US' => 'En_US', |
548
|
|
|
|
|
|
|
'ferite' => 'Ferite', |
549
|
|
|
|
|
|
|
'nl' => 'Nl', |
550
|
|
|
|
|
|
|
'progress' => 'Progress', |
551
|
|
|
|
|
|
|
'scilab' => 'Scilab', |
552
|
|
|
|
|
|
|
'txt2tags' => 'Txt2tags', |
553
|
|
|
|
|
|
|
'x.org Configuration' => 'Xorg_Configuration', |
554
|
|
|
|
|
|
|
'xHarbour' => 'XHarbour', |
555
|
|
|
|
|
|
|
'xslt' => 'Xslt', |
556
|
|
|
|
|
|
|
'yacas' => 'Yacas', |
557
|
|
|
|
|
|
|
}; |
558
|
|
|
|
|
|
|
#end autoinsert |
559
|
13
|
|
|
|
|
42
|
$self->{'language '} = ''; |
560
|
13
|
|
|
|
|
28
|
bless ($self, $class); |
561
|
13
|
50
|
|
|
|
49
|
if ($language ne '') { |
562
|
13
|
|
|
|
|
48
|
$self->language($language); |
563
|
|
|
|
|
|
|
} |
564
|
11
|
|
|
|
|
65
|
return $self; |
565
|
|
|
|
|
|
|
} |
566
|
|
|
|
|
|
|
|
567
|
|
|
|
|
|
|
sub extensions { |
568
|
6
|
|
|
6
|
1
|
7
|
my $self = shift; |
569
|
6
|
|
|
|
|
12
|
return $self->{'extensions'}; |
570
|
|
|
|
|
|
|
} |
571
|
|
|
|
|
|
|
|
572
|
|
|
|
|
|
|
#overriding Template's initialize method. now it should not do anything. |
573
|
|
|
|
|
|
|
sub initialize { |
574
|
13
|
|
|
13
|
0
|
31
|
my $cw = shift; |
575
|
|
|
|
|
|
|
} |
576
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
sub language { |
578
|
188
|
|
|
188
|
1
|
24762
|
my $self = shift; |
579
|
188
|
100
|
|
|
|
443
|
if (@_) { |
580
|
67
|
|
|
|
|
223
|
$self->{'language'} = shift; |
581
|
67
|
|
|
|
|
221
|
$self->reset; |
582
|
|
|
|
|
|
|
} |
583
|
186
|
|
|
|
|
408
|
return $self->{'language'}; |
584
|
|
|
|
|
|
|
} |
585
|
|
|
|
|
|
|
|
586
|
|
|
|
|
|
|
sub languageAutoSet { |
587
|
3
|
|
|
3
|
1
|
1316
|
my ($self, $file) = @_; |
588
|
3
|
|
|
|
|
7
|
my $lang = $self->languagePropose($file); |
589
|
3
|
50
|
|
|
|
15
|
if (defined $lang) { |
590
|
3
|
|
|
|
|
8
|
$self->language($lang) |
591
|
|
|
|
|
|
|
} else { |
592
|
0
|
|
|
|
|
0
|
$self->language('Off') |
593
|
|
|
|
|
|
|
} |
594
|
|
|
|
|
|
|
} |
595
|
|
|
|
|
|
|
|
596
|
|
|
|
|
|
|
sub languageList { |
597
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
598
|
0
|
|
|
|
|
0
|
my $l = $self->{'syntaxes'}; |
599
|
0
|
|
|
|
|
0
|
return sort {uc($a) cmp uc($b)} keys %$l; |
|
0
|
|
|
|
|
0
|
|
600
|
|
|
|
|
|
|
} |
601
|
|
|
|
|
|
|
|
602
|
|
|
|
|
|
|
sub languagePropose { |
603
|
6
|
|
|
6
|
1
|
1164
|
my ($self, $file) = @_; |
604
|
6
|
|
|
|
|
14
|
my $hsh = $self->extensions; |
605
|
6
|
|
|
|
|
111
|
foreach my $key (keys %$hsh) { |
606
|
780
|
|
|
|
|
1127
|
my $reg = $key; |
607
|
780
|
|
|
|
|
1384
|
$reg =~ s/\./\\./g; |
608
|
780
|
|
|
|
|
1008
|
$reg =~ s/\+/\\+/g; |
609
|
780
|
|
|
|
|
1160
|
$reg =~ s/\*/.*/g; |
610
|
780
|
|
|
|
|
1026
|
$reg = "$reg\$"; |
611
|
780
|
100
|
|
|
|
3775
|
if ($file =~ /$reg/) { |
612
|
6
|
|
|
|
|
40
|
return $hsh->{$key}->[0] |
613
|
|
|
|
|
|
|
} |
614
|
|
|
|
|
|
|
} |
615
|
0
|
|
|
|
|
0
|
return undef; |
616
|
|
|
|
|
|
|
} |
617
|
|
|
|
|
|
|
|
618
|
|
|
|
|
|
|
sub languagePlug { |
619
|
73
|
|
|
73
|
1
|
2601
|
my ($self, $req, $insensitive) = @_; |
620
|
|
|
|
|
|
|
|
621
|
73
|
100
|
|
|
|
215
|
unless (exists($self->{'syntaxes'}->{$req})) { |
622
|
4
|
100
|
66
|
|
|
17
|
if (defined($insensitive) && $insensitive) { |
623
|
1
|
|
|
|
|
3
|
my $matched = 0; |
624
|
1
|
|
|
|
|
2
|
foreach my $key (keys(%{$self->{'syntaxes'}})) { |
|
1
|
|
|
|
|
18
|
|
625
|
74
|
100
|
|
|
|
111
|
if (lc($key) eq lc($req)) { |
626
|
1
|
|
|
|
|
13
|
carp "substituting language $key for $req"; |
627
|
1
|
|
|
|
|
384
|
$req = $key; |
628
|
1
|
|
|
|
|
3
|
$matched = 1; |
629
|
1
|
|
|
|
|
2
|
last; |
630
|
|
|
|
|
|
|
} |
631
|
|
|
|
|
|
|
} |
632
|
|
|
|
|
|
|
|
633
|
1
|
50
|
|
|
|
8
|
unless ($matched) { |
634
|
0
|
|
|
|
|
0
|
carp "undefined language: '$req'"; |
635
|
0
|
|
|
|
|
0
|
return undef; |
636
|
|
|
|
|
|
|
} |
637
|
|
|
|
|
|
|
} else { |
638
|
3
|
|
|
|
|
48
|
carp "undefined language: '$req'"; |
639
|
3
|
|
|
|
|
1900
|
return undef; |
640
|
|
|
|
|
|
|
} |
641
|
|
|
|
|
|
|
} |
642
|
|
|
|
|
|
|
|
643
|
70
|
|
|
|
|
192
|
return $self->{'syntaxes'}->{$req}; |
644
|
|
|
|
|
|
|
} |
645
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
sub reset { |
647
|
118
|
|
|
118
|
1
|
268
|
my $self = shift; |
648
|
118
|
|
|
|
|
256
|
my $lang = $self->language; |
649
|
118
|
100
|
|
|
|
338
|
if ($lang eq 'Off') { |
650
|
2
|
|
|
|
|
15
|
$self->stack([]); |
651
|
|
|
|
|
|
|
} else { |
652
|
116
|
|
|
|
|
468
|
my $plug = $self->pluginGet($lang); |
653
|
116
|
100
|
|
|
|
273
|
if (not $plug) { |
654
|
2
|
|
|
|
|
23
|
croak "Plugin for language '$lang' could not be found."; |
655
|
|
|
|
|
|
|
} |
656
|
114
|
|
|
|
|
305
|
my $basecontext = $plug->basecontext; |
657
|
114
|
|
|
|
|
452
|
$self->stack([ |
658
|
|
|
|
|
|
|
[$plug, $basecontext] |
659
|
|
|
|
|
|
|
]); |
660
|
|
|
|
|
|
|
} |
661
|
116
|
|
|
|
|
396
|
$self->out([]); |
662
|
116
|
|
|
|
|
357
|
$self->snippet(''); |
663
|
|
|
|
|
|
|
} |
664
|
|
|
|
|
|
|
|
665
|
|
|
|
|
|
|
sub sections { |
666
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
667
|
0
|
|
|
|
|
0
|
return $self->{'sections'}; |
668
|
|
|
|
|
|
|
} |
669
|
|
|
|
|
|
|
|
670
|
|
|
|
|
|
|
sub syntaxes { |
671
|
130
|
|
|
130
|
0
|
138331
|
my $self = shift; |
672
|
130
|
|
|
|
|
454
|
return $self->{'syntaxes'} |
673
|
|
|
|
|
|
|
} |
674
|
|
|
|
|
|
|
|
675
|
|
|
|
|
|
|
|
676
|
|
|
|
|
|
|
1; |
677
|
|
|
|
|
|
|
|
678
|
|
|
|
|
|
|
__END__ |