Kate/Cdash.pm

filter: Statementstmt 24.7% 24 / 97 Branchbran 0.0% 0 / 64 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 40.0% 4 / 10 Podpod 0.0% 0 / 7 totaltotal 15.8% 29 / 183 SCAR 66.0
CC
34
Cov
15%
parseNormal
812.0
parseString
20.0
parseCommentar2
6.0
CRAP 737.8
« Kate/Progress.pm ↑ Summary Kate/Cisco.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 'cs.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.14
9 #kate version 2.3
10 #generated: Sun Feb 3 22:02:04 2008, localtime
11  
12 package Syntax::Highlight::Engine::Kate::Cdash;
13  
14 1 our $VERSION = '0.14';
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 sub new {
21 1 ▶ my $proto = shift;
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
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 'Char' => 'Char',
26 'Comment' => 'Comment',
27 'Data Type' => 'DataType',
28 'Decimal' => 'DecVal',
29 'Float' => 'Float',
30 'Function' => 'Function',
31 'Hex' => 'BaseN',
32 'Keyword' => 'Keyword',
33 'Normal Text' => 'Normal',
34 'Octal' => 'BaseN',
35 'String' => 'String',
36 'String Char' => 'Char',
37 'Symbol' => 'Normal',
38 });
39 1 $self->listAdd('keywords',
40 '#define',
41 '#elif',
42 '#else',
43 '#endif',
44 '#error',
45 '#if',
46 '#line',
47 '#undef',
48 '#warning',
49 'abstract',
50 'as',
51 'base',
52 'break',
53 'case',
54 'catch',
55 'checked',
56 'class',
57 'continue',
58 'default',
59 'delegate',
60 'do',
61 'else',
62 'enum',
63 'event',
64 'explicit',
65 'extern',
66 'false',
67 'finally',
68 'fixed',
69 'for',
70 'foreach',
71 'goto',
72 'if',
73 'implicit',
74 'in',
75 'interface',
76 'internal',
77 'is',
78 'lock',
79 'namespace',
80 'new',
81 'null',
82 'operator',
83 'out',
84 'override',
85 'params',
86 'private',
87 'protected',
88 'public',
89 'readonly',
90 'ref',
91 'return',
92 'sealed',
93 'sizeof',
94 'stackalloc',
95 'static',
96 'struct',
97 'switch',
98 'this',
99 'throw',
100 'true',
101 'try',
102 'typeof',
103 'unchecked',
104 'unsafe',
105 'using',
106 'virtual',
107 'while',
108 );
109 1 $self->listAdd('types',
110 'bool',
111 'byte',
112 'char',
113 'const',
114 'decimal',
115 'double',
116 'float',
117 'int',
118 'long',
119 'object',
120 'sbyte',
121 'short',
122 'string',
123 'uint',
124 'ulong',
125 'ushort',
126 'void',
127 );
128 1 $self->contextdata({
129 'Commentar 1' => {
130 callback => \&parseCommentar1,
131 attribute => 'Comment',
132 lineending => '#pop',
133 },
134 'Commentar 2' => {
135 callback => \&parseCommentar2,
136 attribute => 'Comment',
137 },
138 'Member' => {
139 callback => \&parseMember,
140 attribute => 'Normal Text',
141 lineending => '#pop',
142 fallthrough => '#pop',
143 },
144 'Normal' => {
145 callback => \&parseNormal,
146 attribute => 'Normal Text',
147 },
148 'String' => {
149 callback => \&parseString,
150 attribute => 'String',
151 lineending => '#pop',
152 },
153 });
154 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
155 1 $self->basecontext('Normal');
156 1 $self->keywordscase(0);
157 1 $self->initialize;
158 1 bless ($self, $class);
159 1 return $self;
160 }
161  
162 sub language {
163 0 ▶ return 'C#';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
164 }
165  
166 sub parseCommentar1 {
167 0 ▶ my ($self, $text) = @_;
Subroutine parseCommentar1: not called CC=1 SCAR=6.9
Pod undocumented
168 0 return 0;
169 };
170  
171 sub parseCommentar2 {
172 0 ▶ my ($self, $text) = @_;
Subroutine parseCommentar2: not called CC=2 SCAR=17.9
Pod undocumented
173 # attribute => 'Comment'
174 # char => '*'
175 # char1 => '/'
176 # context => '#pop'
177 # type => 'Detect2Chars'
178 0 ▶ if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "*", "/", 0, 0, 0, undef, 0, "#pop", "Comment")) 0 0 0
179 0 return 1
180 }
181 0 return 0;
182 };
183  
184 sub parseMember {
185 0 ▶ my ($self, $text) = @_;
Subroutine parseMember: not called CC=2 SCAR=17.9
Pod undocumented
186 # String => '\b[_\w][_\w\d]*(?=[\s]*)'
187 # attribute => 'Function'
188 # context => '#pop'
189 # type => 'RegExpr'
190 0 ▶ if ($self->testRegExpr($text, '\\b[_\\w][_\\w\\d]*(?=[\\s]*)', 0, 0, 0, undef, 0, '#pop', 'Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\b[_\\w][_\\w\\d]*(?=[\\s]*)", 0, 0, 0, undef, 0, "#pop", "Function")) 0 0 0
191 0 return 1
192 }
193 0 return 0;
194 };
195  
196 sub parseNormal {
197 0 ▶ my ($self, $text) = @_;
Subroutine parseNormal: not called CC=28 SCAR=67.0
Pod undocumented
198 # String => 'keywords'
199 # attribute => 'Keyword'
200 # context => '#stay'
201 # type => 'keyword'
202 0 ▶ if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "keywords", 0, undef, 0, "#stay", "Keyword")) 0 0 0
203 0 return 1
204 }
205 # String => 'types'
206 # attribute => 'Data Type'
207 # context => '#stay'
208 # type => 'keyword'
209 0 ▶ if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "types", 0, undef, 0, "#stay", "Data Type")) 0 0 0
210 0 return 1
211 }
212 # attribute => 'Float'
213 # context => '#stay'
214 # items => 'ARRAY(0x10f55a0)'
215 # type => 'Float'
216 0 ▶ if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testFloat($text, 0, undef, 0, "#stay", "Float")) 0 0 0
217 # String => 'fF'
218 # attribute => 'Float'
219 # context => '#stay'
220 # type => 'AnyChar'
221 0 ▶ if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, "fF", 0, 0, undef, 0, "#stay", "Float")) 0 0 0
222 0 return 1
223 }
224 }
225 # attribute => 'Octal'
226 # context => '#stay'
227 # type => 'HlCOct'
228 0 ▶ if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCOct($text, 0, undef, 0, "#stay", "Octal")) 0 0 0
229 0 return 1
230 }
231 # attribute => 'Hex'
232 # context => '#stay'
233 # type => 'HlCHex'
234 0 ▶ if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCHex($text, 0, undef, 0, "#stay", "Hex")) 0 0 0
235 0 return 1
236 }
237 # attribute => 'Decimal'
238 # context => '#stay'
239 # items => 'ARRAY(0x1095b90)'
240 # type => 'Int'
241 0 ▶ if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testInt($text, 0, undef, 0, "#stay", "Decimal")) 0 0 0
242 # String => 'ULL'
243 # attribute => 'Decimal'
244 # context => '#stay'
245 # insensitive => 'TRUE'
246 # type => 'StringDetect'
247 0 ▶ if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "ULL", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
248 0 return 1
249 }
250 # String => 'LUL'
251 # attribute => 'Decimal'
252 # context => '#stay'
253 # insensitive => 'TRUE'
254 # type => 'StringDetect'
255 0 ▶ if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "LUL", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
256 0 return 1
257 }
258 # String => 'LLU'
259 # attribute => 'Decimal'
260 # context => '#stay'
261 # insensitive => 'TRUE'
262 # type => 'StringDetect'
263 0 ▶ if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "LLU", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
264 0 return 1
265 }
266 # String => 'UL'
267 # attribute => 'Decimal'
268 # context => '#stay'
269 # insensitive => 'TRUE'
270 # type => 'StringDetect'
271 0 ▶ if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "UL", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
272 0 return 1
273 }
274 # String => 'LU'
275 # attribute => 'Decimal'
276 # context => '#stay'
277 # insensitive => 'TRUE'
278 # type => 'StringDetect'
279 0 ▶ if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "LU", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
280 0 return 1
281 }
282 # String => 'LL'
283 # attribute => 'Decimal'
284 # context => '#stay'
285 # insensitive => 'TRUE'
286 # type => 'StringDetect'
287 0 ▶ if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "LL", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
288 0 return 1
289 }
290 # String => 'U'
291 # attribute => 'Decimal'
292 # context => '#stay'
293 # insensitive => 'TRUE'
294 # type => 'StringDetect'
295 0 ▶ if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "U", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
296 0 return 1
297 }
298 # String => 'L'
299 # attribute => 'Decimal'
300 # context => '#stay'
301 # insensitive => 'TRUE'
302 # type => 'StringDetect'
303 0 ▶ if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "L", 1, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
304 0 return 1
305 }
306 }
307 # attribute => 'Char'
308 # context => '#stay'
309 # type => 'HlCChar'
310 0 ▶ if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCChar($text, 0, undef, 0, "#stay", "Char")) 0 0 0
311 0 return 1
312 }
313 # attribute => 'String'
314 # char => '"'
315 # context => 'String'
316 # type => 'DetectChar'
317 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "String", "String")) 0 0 0
318 0 return 1
319 }
320 # context => '##Doxygen'
321 # type => 'IncludeRules'
322 0 ▶ if ($self->includePlugin('Doxygen', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("Doxygen", $text)) 0 0 0
323 0 return 1
324 }
325 # attribute => 'Comment'
326 # char => '/'
327 # char1 => '/'
328 # context => 'Commentar 1'
329 # type => 'Detect2Chars'
330 0 ▶ if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "/", 0, 0, 0, undef, 0, "Commentar 1", "Comment")) 0 0 0
331 0 return 1
332 }
333 # attribute => 'Comment'
334 # char => '/'
335 # char1 => '*'
336 # context => 'Commentar 2'
337 # type => 'Detect2Chars'
338 0 ▶ if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "*", 0, 0, 0, undef, 0, "Commentar 2", "Comment")) 0 0 0
339 0 return 1
340 }
341 # attribute => 'Symbol'
342 # beginRegion => 'block1'
343 # char => '{'
344 # context => '#stay'
345 # type => 'DetectChar'
346 0 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "#stay", "Symbol")) 0 0 0
347 0 return 1
348 }
349 # attribute => 'Symbol'
350 # char => '}'
351 # context => '#stay'
352 # endRegion => 'block1'
353 # type => 'DetectChar'
354 0 ▶ if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "}", 0, 0, 0, undef, 0, "#stay", "Symbol")) 0 0 0
355 0 return 1
356 }
357 # String => '#region.*$'
358 # attribute => 'Decimal'
359 # beginRegion => 'Region1'
360 # context => '#stay'
361 # type => 'RegExpr'
362 0 ▶ if ($self->testRegExpr($text, '#region.*$', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "#region.*\$", 0, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
363 0 return 1
364 }
365 # String => '#endregion.*$'
366 # attribute => 'Decimal'
367 # context => '#stay'
368 # endRegion => 'Region1'
369 # type => 'RegExpr'
370 0 ▶ if ($self->testRegExpr($text, '#endregion.*$', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "#endregion.*\$", 0, 0, 0, undef, 0, "#stay", "Decimal")) 0 0 0
371 0 return 1
372 }
373 # String => '\b[_\w][_\w\d]*(?=[\s]*[(])'
374 # attribute => 'Function'
375 # context => '#stay'
376 # type => 'RegExpr'
377 0 ▶ if ($self->testRegExpr($text, '\\b[_\\w][_\\w\\d]*(?=[\\s]*[(])', 0, 0, 0, undef, 0, '#stay', 'Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\b[_\\w][_\\w\\d]*(?=[\\s]*[(])", 0, 0, 0, undef, 0, "#stay", "Function")) 0 0 0
378 0 return 1
379 }
380 # String => '[.]{1,1}'
381 # attribute => 'Symbol'
382 # context => 'Member'
383 # type => 'RegExpr'
384 0 ▶ if ($self->testRegExpr($text, '[.]{1,1}', 0, 0, 0, undef, 0, 'Member', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[.]{1,1}", 0, 0, 0, undef, 0, "Member", "Symbol")) 0 0 0
385 0 return 1
386 }
387 # String => ':!%&()+,-/.*<=>?[]|~^;'
388 # attribute => 'Symbol'
389 # context => '#stay'
390 # type => 'AnyChar'
391 0 ▶ if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]|~^;', 0, 0, undef, 0, '#stay', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, ":!%&()+,-/.*<=>?[]|~^;", 0, 0, undef, 0, "#stay", "Symbol")) 0 0 0
392 0 return 1
393 }
394 0 return 0;
395 };
396  
397 sub parseString {
398 0 ▶ my ($self, $text) = @_;
Subroutine parseString: not called CC=4 SCAR=30.0
Pod undocumented
399 # attribute => 'String'
400 # context => '#pop'
401 # type => 'LineContinue'
402 0 ▶ if ($self->testLineContinue($text, 0, undef, 0, '#pop', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "#pop", "String")) 0 0 0
403 0 return 1
404 }
405 # attribute => 'String Char'
406 # context => '#stay'
407 # type => 'HlCStringChar'
408 0 ▶ if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCStringChar($text, 0, undef, 0, "#stay", "String Char")) 0 0 0
409 0 return 1
410 }
411 # attribute => 'String'
412 # char => '"'
413 # context => '#pop'
414 # type => 'DetectChar'
415 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "#pop", "String")) 0 0 0
416 0 return 1
417 }
418 0 return 0;
419 };
420  
421  
422 1 1;
423  
424 __END__
« Kate/Progress.pm ↑ Summary Kate/Cisco.pm »