Kate/Debian_Control.pm

filter: Statementstmt 25.8% 22 / 85 Branchbran 0.0% 0 / 52 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 40.0% 4 / 10 Podpod 0.0% 0 / 7 totaltotal 16.9% 27 / 159 CC 28 SCAR 47.0
CC
28
Cov
16%
parsenoname
240.0
parseDependencyField
42.0
parseConstrain
30.0
CRAP 109.7
« Kate/GNU_Assembler.pm ↑ Summary Kate/Pascal.pm »
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 1 our $VERSION = '0.16';
15  
16 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use base('Syntax::Highlight::Engine::Kate::Template');
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
21 1 my $proto = shift;
22 1 ▶ my $class = ref($proto) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
23 1 my $self = $class->SUPER::new(@_);
24 1 $self->attributes({
25 'Email' => 'Others',
26 'Keyword' => 'Keyword',
27 'Normal Text' => 'Normal',
28 'Value' => 'DataType',
29 'Variable' => 'Others',
30 'Version' => 'DecVal',
31 });
32 1 $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 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
58 1 $self->basecontext('noname');
59 1 $self->keywordscase(0);
60 1 $self->initialize;
61 1 bless ($self, $class);
62 1 return $self;
63 }
64  
65 0 ▶sub language {
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
66 0 return 'Debian Control';
67 }
68  
69 0 ▶sub parseConstrain {
Subroutine parseConstrain: not called CC=5 SCAR=34.0
Pod undocumented
70 0 my ($self, $text) = @_;
71 # attribute => 'Keyword'
72 # char => '$'
73 # char1 => '{'
74 # context => 'Variable'
75 # type => 'Detect2Chars'
76 0 ▶ if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Variable', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "\$", "{", 0, 0, 0, undef, 0, "Variable", "Keyword")) 0 0 0
77 0 return 1
78 }
79 # String => '[!<=>]'
80 # attribute => 'Keyword'
81 # context => '#stay'
82 # type => 'RegExpr'
83 0 ▶ if ($self->testRegExpr($text, '[!<=>]', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[!<=>]", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
84 0 return 1
85 }
86 # attribute => 'Keyword'
87 # char => ')'
88 # context => '#pop'
89 # type => 'DetectChar'
90 0 ▶ if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ")", 0, 0, 0, undef, 0, "#pop", "Keyword")) 0 0 0
91 0 return 1
92 }
93 # attribute => 'Keyword'
94 # char => ']'
95 # context => '#pop'
96 # type => 'DetectChar'
97 0 ▶ if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "]", 0, 0, 0, undef, 0, "#pop", "Keyword")) 0 0 0
98 0 return 1
99 }
100 0 return 0;
101 };
102  
103 0 ▶sub parseDependencyField {
Subroutine parseDependencyField: not called CC=6 SCAR=37.4
Pod undocumented
104 0 my ($self, $text) = @_;
105 # String => '<.*@.*>'
106 # attribute => 'Email'
107 # context => '#stay'
108 # type => 'RegExpr'
109 0 ▶ if ($self->testRegExpr($text, '<.*@.*>', 0, 0, 0, undef, 0, '#stay', 'Email')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<.*\@.*>", 0, 0, 0, undef, 0, "#stay", "Email")) 0 0 0
110 0 return 1
111 }
112 # attribute => 'Keyword'
113 # char => '$'
114 # char1 => '{'
115 # context => 'Variable'
116 # type => 'Detect2Chars'
117 0 ▶ if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Variable', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "\$", "{", 0, 0, 0, undef, 0, "Variable", "Keyword")) 0 0 0
118 0 return 1
119 }
120 # String => '[,\|]'
121 # attribute => 'Keyword'
122 # context => '#stay'
123 # type => 'RegExpr'
124 0 ▶ if ($self->testRegExpr($text, '[,\\|]', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[,\\|]", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
125 0 return 1
126 }
127 # attribute => 'Keyword'
128 # char => '('
129 # context => 'Constrain'
130 # type => 'DetectChar'
131 0 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Constrain', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "Constrain", "Keyword")) 0 0 0
132 0 return 1
133 }
134 # attribute => 'Keyword'
135 # char => '['
136 # context => 'Constrain'
137 # type => 'DetectChar'
138 0 ▶ if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'Constrain', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "[", 0, 0, 0, undef, 0, "Constrain", "Keyword")) 0 0 0
139 0 return 1
140 }
141 0 return 0;
142 };
143  
144 0 ▶sub parseField {
Subroutine parseField: not called CC=3 SCAR=24.8
Pod undocumented
145 0 my ($self, $text) = @_;
146 # String => '<.*@.*>'
147 # attribute => 'Email'
148 # context => '#stay'
149 # type => 'RegExpr'
150 0 ▶ if ($self->testRegExpr($text, '<.*@.*>', 0, 0, 0, undef, 0, '#stay', 'Email')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<.*\@.*>", 0, 0, 0, undef, 0, "#stay", "Email")) 0 0 0
151 0 return 1
152 }
153 # attribute => 'Keyword'
154 # char => '$'
155 # char1 => '{'
156 # context => 'Variable'
157 # type => 'Detect2Chars'
158 0 ▶ if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Variable', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "\$", "{", 0, 0, 0, undef, 0, "Variable", "Keyword")) 0 0 0
159 0 return 1
160 }
161 0 return 0;
162 };
163  
164 0 ▶sub parseVariable {
Subroutine parseVariable: not called CC=2 SCAR=17.9
Pod undocumented
165 0 my ($self, $text) = @_;
166 # attribute => 'Keyword'
167 # char => '}'
168 # context => '#pop'
169 # type => 'DetectChar'
170 0 ▶ if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "}", 0, 0, 0, undef, 0, "#pop", "Keyword")) 0 0 0
171 0 return 1
172 }
173 0 return 0;
174 };
175  
176 0 ▶sub parsenoname {
Subroutine parsenoname: not called CC=15 SCAR=54.8
Pod undocumented
177 0 my ($self, $text) = @_;
178 # String => 'Depends:'
179 # attribute => 'Keyword'
180 # context => 'DependencyField'
181 # type => 'StringDetect'
182 0 ▶ if ($self->testStringDetect($text, 'Depends:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Depends:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
183 0 return 1
184 }
185 # String => 'Recommends:'
186 # attribute => 'Keyword'
187 # context => 'DependencyField'
188 # type => 'StringDetect'
189 0 ▶ if ($self->testStringDetect($text, 'Recommends:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Recommends:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
190 0 return 1
191 }
192 # String => 'Suggests:'
193 # attribute => 'Keyword'
194 # context => 'DependencyField'
195 # type => 'StringDetect'
196 0 ▶ if ($self->testStringDetect($text, 'Suggests:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Suggests:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
197 0 return 1
198 }
199 # String => 'Conflicts:'
200 # attribute => 'Keyword'
201 # context => 'DependencyField'
202 # type => 'StringDetect'
203 0 ▶ if ($self->testStringDetect($text, 'Conflicts:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Conflicts:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
204 0 return 1
205 }
206 # String => 'Provides:'
207 # attribute => 'Keyword'
208 # context => 'DependencyField'
209 # type => 'StringDetect'
210 0 ▶ if ($self->testStringDetect($text, 'Provides:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Provides:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
211 0 return 1
212 }
213 # String => 'Replaces:'
214 # attribute => 'Keyword'
215 # context => 'DependencyField'
216 # type => 'StringDetect'
217 0 ▶ if ($self->testStringDetect($text, 'Replaces:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Replaces:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
218 0 return 1
219 }
220 # String => 'Enhances:'
221 # attribute => 'Keyword'
222 # context => 'DependencyField'
223 # type => 'StringDetect'
224 0 ▶ if ($self->testStringDetect($text, 'Enhances:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Enhances:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
225 0 return 1
226 }
227 # String => 'Pre-Depends:'
228 # attribute => 'Keyword'
229 # context => 'DependencyField'
230 # type => 'StringDetect'
231 0 ▶ if ($self->testStringDetect($text, 'Pre-Depends:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Pre-Depends:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
232 0 return 1
233 }
234 # String => 'Build-Depends:'
235 # attribute => 'Keyword'
236 # context => 'DependencyField'
237 # type => 'StringDetect'
238 0 ▶ if ($self->testStringDetect($text, 'Build-Depends:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Build-Depends:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
239 0 return 1
240 }
241 # String => 'Build-Depends-Indep:'
242 # attribute => 'Keyword'
243 # context => 'DependencyField'
244 # type => 'StringDetect'
245 0 ▶ if ($self->testStringDetect($text, 'Build-Depends-Indep:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Build-Depends-Indep:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
246 0 return 1
247 }
248 # String => 'Build-Conflicts:'
249 # attribute => 'Keyword'
250 # context => 'DependencyField'
251 # type => 'StringDetect'
252 0 ▶ if ($self->testStringDetect($text, 'Build-Conflicts:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Build-Conflicts:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
253 0 return 1
254 }
255 # String => 'Build-Conflicts-Indep:'
256 # attribute => 'Keyword'
257 # context => 'DependencyField'
258 # type => 'StringDetect'
259 0 ▶ if ($self->testStringDetect($text, 'Build-Conflicts-Indep:', 0, 0, 0, undef, 0, 'DependencyField', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "Build-Conflicts-Indep:", 0, 0, 0, undef, 0, "DependencyField", "Keyword")) 0 0 0
260 0 return 1
261 }
262 # String => '[^ ]*:'
263 # attribute => 'Keyword'
264 # column => '0'
265 # context => 'Field'
266 # minimal => 'true'
267 # type => 'RegExpr'
268 0 ▶ if ($self->testRegExpr($text, '[^ ]*?:', 0, 0, 0, 0, 0, 'Field', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[^ ]*?:", 0, 0, 0, 0, 0, "Field", "Keyword")) 0 0 0
269 0 return 1
270 }
271 # attribute => 'Value'
272 # char => ' '
273 # column => '0'
274 # context => 'Field'
275 # type => 'DetectChar'
276 0 ▶ if ($self->testDetectChar($text, ' ', 0, 0, 0, 0, 0, 'Field', 'Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, " ", 0, 0, 0, 0, 0, "Field", "Value")) 0 0 0
277 0 return 1
278 }
279 0 return 0;
280 };
281  
282  
283 1 1;
284  
285 __END__
« Kate/GNU_Assembler.pm ↑ Summary Kate/Pascal.pm »