| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. |
|
2
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or |
|
3
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# This file was generated from the 'debiancontrol.xml' file of the syntax highlight |
|
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 0.82 |
|
9
|
|
|
|
|
|
|
#kate version 2.4 |
|
10
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:04 2008, localtime |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::Debian_Control; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.14'; |
|
15
|
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
533
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
25
|
|
|
17
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
21
|
|
|
18
|
1
|
|
|
1
|
|
4
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
797
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
|
21
|
1
|
|
|
1
|
0
|
558
|
my $proto = shift; |
|
22
|
1
|
|
33
|
|
|
6
|
my $class = ref($proto) || $proto; |
|
23
|
1
|
|
|
|
|
7
|
my $self = $class->SUPER::new(@_); |
|
24
|
1
|
|
|
|
|
12
|
$self->attributes({ |
|
25
|
|
|
|
|
|
|
'Email' => 'Others', |
|
26
|
|
|
|
|
|
|
'Keyword' => 'Keyword', |
|
27
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
|
28
|
|
|
|
|
|
|
'Value' => 'DataType', |
|
29
|
|
|
|
|
|
|
'Variable' => 'Others', |
|
30
|
|
|
|
|
|
|
'Version' => 'DecVal', |
|
31
|
|
|
|
|
|
|
}); |
|
32
|
1
|
|
|
|
|
14
|
$self->contextdata({ |
|
33
|
|
|
|
|
|
|
'Constrain' => { |
|
34
|
|
|
|
|
|
|
callback => \&parseConstrain, |
|
35
|
|
|
|
|
|
|
attribute => 'Version', |
|
36
|
|
|
|
|
|
|
}, |
|
37
|
|
|
|
|
|
|
'DependencyField' => { |
|
38
|
|
|
|
|
|
|
callback => \&parseDependencyField, |
|
39
|
|
|
|
|
|
|
attribute => 'Value', |
|
40
|
|
|
|
|
|
|
lineending => '#pop', |
|
41
|
|
|
|
|
|
|
}, |
|
42
|
|
|
|
|
|
|
'Field' => { |
|
43
|
|
|
|
|
|
|
callback => \&parseField, |
|
44
|
|
|
|
|
|
|
attribute => 'Value', |
|
45
|
|
|
|
|
|
|
lineending => '#pop', |
|
46
|
|
|
|
|
|
|
}, |
|
47
|
|
|
|
|
|
|
'Variable' => { |
|
48
|
|
|
|
|
|
|
callback => \&parseVariable, |
|
49
|
|
|
|
|
|
|
attribute => 'Variable', |
|
50
|
|
|
|
|
|
|
lineending => '#pop', |
|
51
|
|
|
|
|
|
|
}, |
|
52
|
|
|
|
|
|
|
'noname' => { |
|
53
|
|
|
|
|
|
|
callback => \&parsenoname, |
|
54
|
|
|
|
|
|
|
attribute => 'Normal Text', |
|
55
|
|
|
|
|
|
|
}, |
|
56
|
|
|
|
|
|
|
}); |
|
57
|
1
|
|
|
|
|
4
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
|
58
|
1
|
|
|
|
|
5
|
$self->basecontext('noname'); |
|
59
|
1
|
|
|
|
|
12
|
$self->keywordscase(0); |
|
60
|
1
|
|
|
|
|
3
|
$self->initialize; |
|
61
|
1
|
|
|
|
|
2
|
bless ($self, $class); |
|
62
|
1
|
|
|
|
|
3
|
return $self; |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub language { |
|
66
|
0
|
|
|
0
|
0
|
|
return 'Debian Control'; |
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub parseConstrain { |
|
70
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
71
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
72
|
|
|
|
|
|
|
# char => '$' |
|
73
|
|
|
|
|
|
|
# char1 => '{' |
|
74
|
|
|
|
|
|
|
# context => 'Variable' |
|
75
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
76
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Variable', 'Keyword')) { |
|
77
|
0
|
|
|
|
|
|
return 1 |
|
78
|
|
|
|
|
|
|
} |
|
79
|
|
|
|
|
|
|
# String => '[!<=>]' |
|
80
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
81
|
|
|
|
|
|
|
# context => '#stay' |
|
82
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
83
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[!<=>]', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
84
|
0
|
|
|
|
|
|
return 1 |
|
85
|
|
|
|
|
|
|
} |
|
86
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
87
|
|
|
|
|
|
|
# char => ')' |
|
88
|
|
|
|
|
|
|
# context => '#pop' |
|
89
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
90
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { |
|
91
|
0
|
|
|
|
|
|
return 1 |
|
92
|
|
|
|
|
|
|
} |
|
93
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
94
|
|
|
|
|
|
|
# char => ']' |
|
95
|
|
|
|
|
|
|
# context => '#pop' |
|
96
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
97
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { |
|
98
|
0
|
|
|
|
|
|
return 1 |
|
99
|
|
|
|
|
|
|
} |
|
100
|
0
|
|
|
|
|
|
return 0; |
|
101
|
|
|
|
|
|
|
}; |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
sub parseDependencyField { |
|
104
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
105
|
|
|
|
|
|
|
# String => '<.*@.*>' |
|
106
|
|
|
|
|
|
|
# attribute => 'Email' |
|
107
|
|
|
|
|
|
|
# context => '#stay' |
|
108
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
109
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '<.*@.*>', 0, 0, 0, undef, 0, '#stay', 'Email')) { |
|
110
|
0
|
|
|
|
|
|
return 1 |
|
111
|
|
|
|
|
|
|
} |
|
112
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
113
|
|
|
|
|
|
|
# char => '$' |
|
114
|
|
|
|
|
|
|
# char1 => '{' |
|
115
|
|
|
|
|
|
|
# context => 'Variable' |
|
116
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
117
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Variable', 'Keyword')) { |
|
118
|
0
|
|
|
|
|
|
return 1 |
|
119
|
|
|
|
|
|
|
} |
|
120
|
|
|
|
|
|
|
# String => '[,\|]' |
|
121
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
122
|
|
|
|
|
|
|
# context => '#stay' |
|
123
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
124
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[,\\|]', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
125
|
0
|
|
|
|
|
|
return 1 |
|
126
|
|
|
|
|
|
|
} |
|
127
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
128
|
|
|
|
|
|
|
# char => '(' |
|
129
|
|
|
|
|
|
|
# context => 'Constrain' |
|
130
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
131
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Constrain', 'Keyword')) { |
|
132
|
0
|
|
|
|
|
|
return 1 |
|
133
|
|
|
|
|
|
|
} |
|
134
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
135
|
|
|
|
|
|
|
# char => '[' |
|
136
|
|
|
|
|
|
|
# context => 'Constrain' |
|
137
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
138
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'Constrain', 'Keyword')) { |
|
139
|
0
|
|
|
|
|
|
return 1 |
|
140
|
|
|
|
|
|
|
} |
|
141
|
0
|
|
|
|
|
|
return 0; |
|
142
|
|
|
|
|
|
|
}; |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
sub parseField { |
|
145
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
146
|
|
|
|
|
|
|
# String => '<.*@.*>' |
|
147
|
|
|
|
|
|
|
# attribute => 'Email' |
|
148
|
|
|
|
|
|
|
# context => '#stay' |
|
149
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
150
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '<.*@.*>', 0, 0, 0, undef, 0, '#stay', 'Email')) { |
|
151
|
0
|
|
|
|
|
|
return 1 |
|
152
|
|
|
|
|
|
|
} |
|
153
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
154
|
|
|
|
|
|
|
# char => '$' |
|
155
|
|
|
|
|
|
|
# char1 => '{' |
|
156
|
|
|
|
|
|
|
# context => 'Variable' |
|
157
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
158
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Variable', 'Keyword')) { |
|
159
|
0
|
|
|
|
|
|
return 1 |
|
160
|
|
|
|
|
|
|
} |
|
161
|
0
|
|
|
|
|
|
return 0; |
|
162
|
|
|
|
|
|
|
}; |
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
sub parseVariable { |
|
165
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
166
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
167
|
|
|
|
|
|
|
# char => '}' |
|
168
|
|
|
|
|
|
|
# context => '#pop' |
|
169
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
170
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { |
|
171
|
0
|
|
|
|
|
|
return 1 |
|
172
|
|
|
|
|
|
|
} |
|
173
|
0
|
|
|
|
|
|
return 0; |
|
174
|
|
|
|
|
|
|
}; |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
sub parsenoname { |
|
177
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
178
|
|
|
|
|
|
|
# String => 'Depends:' |
|
179
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
180
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
181
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
182
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Depends:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
183
|
0
|
|
|
|
|
|
return 1 |
|
184
|
|
|
|
|
|
|
} |
|
185
|
|
|
|
|
|
|
# String => 'Recommends:' |
|
186
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
187
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
188
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
189
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Recommends:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
190
|
0
|
|
|
|
|
|
return 1 |
|
191
|
|
|
|
|
|
|
} |
|
192
|
|
|
|
|
|
|
# String => 'Suggests:' |
|
193
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
194
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
195
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
196
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Suggests:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
197
|
0
|
|
|
|
|
|
return 1 |
|
198
|
|
|
|
|
|
|
} |
|
199
|
|
|
|
|
|
|
# String => 'Conflicts:' |
|
200
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
201
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
202
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
203
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Conflicts:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
204
|
0
|
|
|
|
|
|
return 1 |
|
205
|
|
|
|
|
|
|
} |
|
206
|
|
|
|
|
|
|
# String => 'Provides:' |
|
207
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
208
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
209
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
210
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Provides:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
211
|
0
|
|
|
|
|
|
return 1 |
|
212
|
|
|
|
|
|
|
} |
|
213
|
|
|
|
|
|
|
# String => 'Replaces:' |
|
214
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
215
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
216
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
217
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Replaces:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
218
|
0
|
|
|
|
|
|
return 1 |
|
219
|
|
|
|
|
|
|
} |
|
220
|
|
|
|
|
|
|
# String => 'Enhances:' |
|
221
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
222
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
223
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
224
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Enhances:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
225
|
0
|
|
|
|
|
|
return 1 |
|
226
|
|
|
|
|
|
|
} |
|
227
|
|
|
|
|
|
|
# String => 'Pre-Depends:' |
|
228
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
229
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
230
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
231
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Pre-Depends:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
232
|
0
|
|
|
|
|
|
return 1 |
|
233
|
|
|
|
|
|
|
} |
|
234
|
|
|
|
|
|
|
# String => 'Build-Depends:' |
|
235
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
236
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
237
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
238
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Build-Depends:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
239
|
0
|
|
|
|
|
|
return 1 |
|
240
|
|
|
|
|
|
|
} |
|
241
|
|
|
|
|
|
|
# String => 'Build-Depends-Indep:' |
|
242
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
243
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
244
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
245
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Build-Depends-Indep:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
246
|
0
|
|
|
|
|
|
return 1 |
|
247
|
|
|
|
|
|
|
} |
|
248
|
|
|
|
|
|
|
# String => 'Build-Conflicts:' |
|
249
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
250
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
251
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
252
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Build-Conflicts:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
253
|
0
|
|
|
|
|
|
return 1 |
|
254
|
|
|
|
|
|
|
} |
|
255
|
|
|
|
|
|
|
# String => 'Build-Conflicts-Indep:' |
|
256
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
257
|
|
|
|
|
|
|
# context => 'DependencyField' |
|
258
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
259
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'Build-Conflicts-Indep:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) { |
|
260
|
0
|
|
|
|
|
|
return 1 |
|
261
|
|
|
|
|
|
|
} |
|
262
|
|
|
|
|
|
|
# String => '[^ ]*:' |
|
263
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
264
|
|
|
|
|
|
|
# column => '0' |
|
265
|
|
|
|
|
|
|
# context => 'Field' |
|
266
|
|
|
|
|
|
|
# minimal => 'true' |
|
267
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
268
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[^ ]*?:', 0, 0, 0, 0, 0, 'Field', 'Keyword')) { |
|
269
|
0
|
|
|
|
|
|
return 1 |
|
270
|
|
|
|
|
|
|
} |
|
271
|
|
|
|
|
|
|
# attribute => 'Value' |
|
272
|
|
|
|
|
|
|
# char => ' ' |
|
273
|
|
|
|
|
|
|
# column => '0' |
|
274
|
|
|
|
|
|
|
# context => 'Field' |
|
275
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
276
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ' ', 0, 0, 0, 0, 0, 'Field', 'Value')) { |
|
277
|
0
|
|
|
|
|
|
return 1 |
|
278
|
|
|
|
|
|
|
} |
|
279
|
0
|
|
|
|
|
|
return 0; |
|
280
|
|
|
|
|
|
|
}; |
|
281
|
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
1; |
|
284
|
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
__END__ |