Kate/Yacc_Bison.pm

filter: Statementstmt 75.4% 129 / 171 Branchbran 66.9% 71 / 106 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 84.6% 22 / 26 Podpod 0.0% 0 / 23 totaltotal 67.3% 223 / 331 CC 55 SCAR 16.7
CC
55
Cov
72%
parseUnionInIn
20.0
parseChar
12.0
parseUnionStart
7.2
CRAP 5.3
« Kate/RenderMan_RIB.pm ↑ Summary Kate/BibTeX.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 'yacc.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.03
9 #kate version 2.4
10 #kate author Jan Villat (jan.villat@net2000.ch)
11 #generated: Sun Feb 3 22:02:06 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::Yacc_Bison;
14  
15 1 our $VERSION = '0.16';
16  
17 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use base('Syntax::Highlight::Engine::Kate::Template');
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 2 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
22 2 my $proto = shift;
23 2 ▶ my $class = ref($proto) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
020
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
24 2 my $self = $class->SUPER::new(@_);
25 2 $self->attributes({
26 'Alert' => 'Alert',
27 'Backslash Code' => 'String',
28 'Comment' => 'Comment',
29 'Content-Type Delimiter' => 'BaseN',
30 'Data Type' => 'DataType',
31 'Definition' => 'Normal',
32 'Directive' => 'Keyword',
33 'Normal Text' => 'Normal',
34 'Rule' => 'String',
35 'String' => 'String',
36 'String Char' => 'Char',
37 });
38 2 $self->contextdata({
39 'C Declarations' => {
40 callback => \&parseCDeclarations,
41 attribute => 'Normal Text',
42 },
43 'Char' => {
44 callback => \&parseChar,
45 attribute => 'String Char',
46 lineending => '#pop',
47 },
48 'Comment' => {
49 callback => \&parseComment,
50 attribute => 'Comment',
51 },
52 'CommentSlash' => {
53 callback => \&parseCommentSlash,
54 attribute => 'Comment',
55 },
56 'CommentStar' => {
57 callback => \&parseCommentStar,
58 attribute => 'Comment',
59 },
60 'Declarations' => {
61 callback => \&parseDeclarations,
62 attribute => 'Normal Text',
63 },
64 'Dol' => {
65 callback => \&parseDol,
66 attribute => 'Normal Text',
67 fallthrough => 'DolEnd',
68 },
69 'DolEnd' => {
70 callback => \&parseDolEnd,
71 attribute => 'Normal Text',
72 },
73 'Normal C Bloc' => {
74 callback => \&parseNormalCBloc,
75 attribute => 'Normal Text',
76 },
77 'PC type' => {
78 callback => \&parsePCtype,
79 attribute => 'Data Type',
80 lineending => '#pop#pop#pop',
81 },
82 'Percent Command' => {
83 callback => \&parsePercentCommand,
84 attribute => 'Directive',
85 lineending => '#pop',
86 },
87 'Percent Command In' => {
88 callback => \&parsePercentCommandIn,
89 attribute => 'NormalText',
90 lineending => '#pop#pop',
91 },
92 'Pre Start' => {
93 callback => \&parsePreStart,
94 attribute => 'Normal Text',
95 },
96 'Rule In' => {
97 callback => \&parseRuleIn,
98 attribute => 'Definition',
99 },
100 'Rules' => {
101 callback => \&parseRules,
102 attribute => 'Rule',
103 },
104 'String' => {
105 callback => \&parseString,
106 attribute => 'String',
107 lineending => '#pop',
108 },
109 'StringOrChar' => {
110 callback => \&parseStringOrChar,
111 attribute => 'NormalText',
112 },
113 'Union In' => {
114 callback => \&parseUnionIn,
115 attribute => 'Normal Text',
116 },
117 'Union InIn' => {
118 callback => \&parseUnionInIn,
119 attribute => 'Normal Text',
120 },
121 'Union Start' => {
122 callback => \&parseUnionStart,
123 attribute => 'Normal Text',
124 },
125 'User Code' => {
126 callback => \&parseUserCode,
127 attribute => 'Normal Text',
128 },
129 });
130 2 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
131 2 $self->basecontext('Pre Start');
132 2 $self->keywordscase(1);
133 2 $self->initialize;
134 2 bless ($self, $class);
135 2 return $self;
136 }
137  
138 0 ▶sub language {
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
139 0 return 'Yacc/Bison';
140 }
141  
142 30 ▶sub parseCDeclarations {
Subroutine parseCDeclarations: called CC=4 SCAR=14.8
Pod undocumented
143 30 my ($self, $text) = @_;
144 # context => 'Comment'
145 # type => 'IncludeRules'
146 30 ▶ if ($self->includeRules('Comment', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Comment", $text)) 0 30 30
147 0 return 1
148 }
149 # attribute => 'Content-Type Delimiter'
150 # char => '%'
151 # char1 => '}'
152 # column => '0'
153 # context => '#pop'
154 # endRegion => 'cdeclarations'
155 # type => 'Detect2Chars'
156 30 ▶ if ($self->testDetect2Chars($text, '%', '}', 0, 0, 0, 0, 0, '#pop', 'Content-Type Delimiter')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "%", "}", 0, 0, 0, 0, 0, "#pop", "Content-Type Delimiter")) 2 28 30
157 2 return 1
158 }
159 # context => '##C++'
160 # type => 'IncludeRules'
161 28 ▶ if ($self->includePlugin('C++', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("C++", $text)) 28 0 28
162 28 return 1
163 }
164 0 return 0;
165 };
166  
167 0 ▶sub parseChar {
Subroutine parseChar: not called CC=3 SCAR=24.8
Pod undocumented
168 0 my ($self, $text) = @_;
169 # String => '\\.'
170 # attribute => 'Backslash Code'
171 # context => '#stay'
172 # type => 'RegExpr'
173 0 ▶ if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'Backslash Code')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\\.", 0, 0, 0, undef, 0, "#stay", "Backslash Code")) 0 0 0
174 0 return 1
175 }
176 # attribute => 'String Char'
177 # char => '''
178 # context => '#pop'
179 # type => 'DetectChar'
180 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "#pop", "String Char")) 0 0 0
181 0 return 1
182 }
183 0 return 0;
184 };
185  
186 520 ▶sub parseComment {
Subroutine parseComment: called CC=3 SCAR=11.2
Pod undocumented
187 520 my ($self, $text) = @_;
188 # attribute => 'Comment'
189 # char => '/'
190 # char1 => '*'
191 # context => 'CommentStar'
192 # type => 'Detect2Chars'
193 520 ▶ if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'CommentStar', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "*", 0, 0, 0, undef, 0, "CommentStar", "Comment")) 2 518 520
194 2 return 1
195 }
196 # attribute => 'Comment'
197 # char => '/'
198 # char1 => '/'
199 # context => 'CommentSlash'
200 # type => 'Detect2Chars'
201 518 ▶ if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'CommentSlash', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "/", 0, 0, 0, undef, 0, "CommentSlash", "Comment")) 0 518 518
202 0 return 1
203 }
204 518 return 0;
205 };
206  
207 0 ▶sub parseCommentSlash {
Subroutine parseCommentSlash: not called CC=2 SCAR=17.9
Pod undocumented
208 0 my ($self, $text) = @_;
209 # String => '[^\\]$'
210 # attribute => 'Comment'
211 # context => '#pop'
212 # type => 'RegExpr'
213 0 ▶ if ($self->testRegExpr($text, '[^\\\\]$', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[^\\\\]\$", 0, 0, 0, undef, 0, "#pop", "Comment")) 0 0 0
214 0 return 1
215 }
216 0 return 0;
217 };
218  
219 118 ▶sub parseCommentStar {
Subroutine parseCommentStar: called CC=2 SCAR=6.9
Pod undocumented
220 118 my ($self, $text) = @_;
221 # attribute => 'Comment'
222 # char => '*'
223 # char1 => '/'
224 # context => '#pop'
225 # type => 'Detect2Chars'
226 118 ▶ 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")) 2 116 118
227 2 return 1
228 }
229 116 return 0;
230 };
231  
232 16 ▶sub parseDeclarations {
Subroutine parseDeclarations: called CC=6 SCAR=19.1
Pod undocumented
233 16 my ($self, $text) = @_;
234 # context => 'Comment'
235 # type => 'IncludeRules'
236 16 ▶ if ($self->includeRules('Comment', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Comment", $text)) 0 16 16
237 0 return 1
238 }
239 # String => '%union'
240 # attribute => 'Directive'
241 # context => 'Union Start'
242 # type => 'StringDetect'
243 16 ▶ if ($self->testStringDetect($text, '%union', 0, 0, 0, undef, 0, 'Union Start', 'Directive')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "%union", 0, 0, 0, undef, 0, "Union Start", "Directive")) 2 14 16
244 2 return 1
245 }
246 # attribute => 'Content-Type Delimiter'
247 # beginRegion => 'rules'
248 # char => '%'
249 # char1 => '%'
250 # context => 'Rules'
251 # endRegion => 'declarations'
252 # type => 'Detect2Chars'
253 14 ▶ if ($self->testDetect2Chars($text, '%', '%', 0, 0, 0, undef, 0, 'Rules', 'Content-Type Delimiter')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "%", "%", 0, 0, 0, undef, 0, "Rules", "Content-Type Delimiter")) 2 12 14
254 2 return 1
255 }
256 # attribute => 'Content-Type Delimiter'
257 # beginRegion => 'cdeclarations'
258 # char => '%'
259 # char1 => '{'
260 # column => '0'
261 # context => 'C Declarations'
262 # type => 'Detect2Chars'
263 12 ▶ if ($self->testDetect2Chars($text, '%', '{', 0, 0, 0, 0, 0, 'C Declarations', 'Content-Type Delimiter')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "%", "{", 0, 0, 0, 0, 0, "C Declarations", "Content-Type Delimiter")) 0 12 12
264 0 return 1
265 }
266 # attribute => 'Directive'
267 # char => '%'
268 # context => 'Percent Command'
269 # type => 'DetectChar'
270 12 ▶ if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, 'Percent Command', 'Directive')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "%", 0, 0, 0, undef, 0, "Percent Command", "Directive")) 12 0 12
271 12 return 1
272 }
273 0 return 0;
274 };
275  
276 12 ▶sub parseDol {
Subroutine parseDol: called CC=2 SCAR=6.9
Pod undocumented
277 12 my ($self, $text) = @_;
278 # String => '<[^>]+>'
279 # attribute => 'Data Type'
280 # context => 'DolEnd'
281 # type => 'RegExpr'
282 12 ▶ if ($self->testRegExpr($text, '<[^>]+>', 0, 0, 0, undef, 0, 'DolEnd', 'Data Type')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<[^>]+>", 0, 0, 0, undef, 0, "DolEnd", "Data Type")) 2 10 12
283 2 return 1
284 }
285 10 return 0;
286 };
287  
288 12 ▶sub parseDolEnd {
Subroutine parseDolEnd: called CC=3 SCAR=11.2
Pod undocumented
289 12 my ($self, $text) = @_;
290 # String => '\d+'
291 # attribute => 'Directive'
292 # context => '#pop#pop'
293 # type => 'RegExpr'
294 12 ▶ if ($self->testRegExpr($text, '\\d+', 0, 0, 0, undef, 0, '#pop#pop', 'Directive')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\d+", 0, 0, 0, undef, 0, "#pop#pop", "Directive")) 4 8 12
295 4 return 1
296 }
297 # attribute => 'Directive'
298 # char => '$'
299 # context => '#pop#pop'
300 # type => 'DetectChar'
301 8 ▶ if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, '#pop#pop', 'Directive')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\$", 0, 0, 0, undef, 0, "#pop#pop", "Directive")) 8 0 8
302 8 return 1
303 }
304 0 return 0;
305 };
306  
307 130 ▶sub parseNormalCBloc {
Subroutine parseNormalCBloc: called CC=5 SCAR=16.6
Pod undocumented
308 130 my ($self, $text) = @_;
309 # attribute => 'Normal Text'
310 # beginRegion => 'bloc'
311 # char => '{'
312 # context => 'Normal C Bloc'
313 # type => 'DetectChar'
314 130 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Normal C Bloc', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "Normal C Bloc", "Normal Text")) 0 130 130
315 0 return 1
316 }
317 # attribute => 'Normal Text'
318 # char => '}'
319 # context => '#pop'
320 # endRegion => 'bloc'
321 # type => 'DetectChar'
322 130 ▶ if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "}", 0, 0, 0, undef, 0, "#pop", "Normal Text")) 6 124 130
323 6 return 1
324 }
325 # context => '##C++'
326 # type => 'IncludeRules'
327 124 ▶ if ($self->includePlugin('C++', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("C++", $text)) 112 12 124
328 112 return 1
329 }
330 # attribute => 'Directive'
331 # char => '$'
332 # context => 'Dol'
333 # type => 'DetectChar'
334 12 ▶ if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, 'Dol', 'Directive')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\$", 0, 0, 0, undef, 0, "Dol", "Directive")) 12 0 12
335 12 return 1
336 }
337 0 return 0;
338 };
339  
340 80 ▶sub parsePCtype {
Subroutine parsePCtype: called CC=2 SCAR=6.9
Pod undocumented
341 80 my ($self, $text) = @_;
342 # attribute => 'Data Type'
343 # char => '>'
344 # context => '#pop'
345 # type => 'DetectChar'
346 80 ▶ if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Data Type')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ">", 0, 0, 0, undef, 0, "#pop", "Data Type")) 10 70 80
347 10 return 1
348 }
349 70 return 0;
350 };
351  
352 76 ▶sub parsePercentCommand {
Subroutine parsePercentCommand: called CC=3 SCAR=11.2
Pod undocumented
353 76 my ($self, $text) = @_;
354 # context => 'Comment'
355 # type => 'IncludeRules'
356 76 ▶ if ($self->includeRules('Comment', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Comment", $text)) 0 76 76
357 0 return 1
358 }
359 # String => '\W'
360 # attribute => 'Normal Text'
361 # context => 'Percent Command In'
362 # lookAhead => 'true'
363 # type => 'RegExpr'
364 76 ▶ if ($self->testRegExpr($text, '\\W', 0, 0, 1, undef, 0, 'Percent Command In', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\W", 0, 0, 1, undef, 0, "Percent Command In", "Normal Text")) 10 66 76
365 10 return 1
366 }
367 66 return 0;
368 };
369  
370 238 ▶sub parsePercentCommandIn {
Subroutine parsePercentCommandIn: called CC=3 SCAR=11.0
Pod undocumented
371 238 my ($self, $text) = @_;
372 # context => 'StringOrChar'
373 # type => 'IncludeRules'
374 238 ▶ if ($self->includeRules('StringOrChar', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("StringOrChar", $text)) 8 230 238
375 8 return 1
376 }
377 # attribute => 'Data Type'
378 # char => '<'
379 # context => 'PC type'
380 # type => 'DetectChar'
381 230 ▶ if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'PC type', 'Data Type')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "<", 0, 0, 0, undef, 0, "PC type", "Data Type")) 10 220 230
382 10 return 1
383 }
384 220 return 0;
385 };
386  
387 6 ▶sub parsePreStart {
Subroutine parsePreStart: called CC=5 SCAR=16.6
Pod undocumented
388 6 my ($self, $text) = @_;
389 # context => 'Comment'
390 # type => 'IncludeRules'
391 6 ▶ if ($self->includeRules('Comment', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Comment", $text)) 2 4 6
392 2 return 1
393 }
394 # type => 'DetectSpaces'
395 4 ▶ if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectSpaces($text, 0, undef, 0, "#stay", undef)) 0 4 4
396 0 return 1
397 }
398 # attribute => 'Content-Type Delimiter'
399 # beginRegion => 'cdeclarations'
400 # char => '%'
401 # char1 => '{'
402 # column => '0'
403 # context => 'C Declarations'
404 # type => 'Detect2Chars'
405 4 ▶ if ($self->testDetect2Chars($text, '%', '{', 0, 0, 0, 0, 0, 'C Declarations', 'Content-Type Delimiter')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "%", "{", 0, 0, 0, 0, 0, "C Declarations", "Content-Type Delimiter")) 2 2 4
406 2 return 1
407 }
408 # String => '.'
409 # attribute => 'Normal Text'
410 # beginRegion => 'declarations'
411 # context => 'Declarations'
412 # lookAhead => 'true'
413 # type => 'RegExpr'
414 2 ▶ if ($self->testRegExpr($text, '.', 0, 0, 1, undef, 0, 'Declarations', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, ".", 0, 0, 1, undef, 0, "Declarations", "Normal Text")) 2 0 2
415 2 return 1
416 }
417 0 return 0;
418 };
419  
420 362 ▶sub parseRuleIn {
Subroutine parseRuleIn: called CC=6 SCAR=18.3
Pod undocumented
421 362 my ($self, $text) = @_;
422 # context => 'Comment'
423 # type => 'IncludeRules'
424 362 ▶ if ($self->includeRules('Comment', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Comment", $text)) 0 362 362
425 0 return 1
426 }
427 # attribute => 'Normal Text'
428 # char => ';'
429 # context => '#pop'
430 # endRegion => 'rule'
431 # type => 'DetectChar'
432 362 ▶ if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ";", 0, 0, 0, undef, 0, "#pop", "Normal Text")) 4 358 362
433 4 return 1
434 }
435 # attribute => 'Normal Text'
436 # beginRegion => 'bloc'
437 # char => '{'
438 # context => 'Normal C Bloc'
439 # type => 'DetectChar'
440 358 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Normal C Bloc', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "Normal C Bloc", "Normal Text")) 6 352 358
441 6 return 1
442 }
443 # attribute => 'Normal Text'
444 # char => '|'
445 # context => '#stay'
446 # type => 'DetectChar'
447 352 ▶ if ($self->testDetectChar($text, '|', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "|", 0, 0, 0, undef, 0, "#stay", "Normal Text")) 2 350 352
448 2 return 1
449 }
450 # context => 'StringOrChar'
451 # type => 'IncludeRules'
452 350 ▶ if ($self->includeRules('StringOrChar', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("StringOrChar", $text)) 0 350 350
453 0 return 1
454 }
455 350 return 0;
456 };
457  
458 26 ▶sub parseRules {
Subroutine parseRules: called CC=4 SCAR=14.0
Pod undocumented
459 26 my ($self, $text) = @_;
460 # context => 'Comment'
461 # type => 'IncludeRules'
462 26 ▶ if ($self->includeRules('Comment', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Comment", $text)) 0 26 26
463 0 return 1
464 }
465 # attribute => 'Content-Type Delimiter'
466 # beginRegion => 'code'
467 # char => '%'
468 # char1 => '%'
469 # context => 'User Code'
470 # endRegion => 'rules'
471 # type => 'Detect2Chars'
472 26 ▶ if ($self->testDetect2Chars($text, '%', '%', 0, 0, 0, undef, 0, 'User Code', 'Content-Type Delimiter')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "%", "%", 0, 0, 0, undef, 0, "User Code", "Content-Type Delimiter")) 2 24 26
473 2 return 1
474 }
475 # attribute => 'Normal Text'
476 # beginRegion => 'rule'
477 # char => ':'
478 # context => 'Rule In'
479 # type => 'DetectChar'
480 24 ▶ if ($self->testDetectChar($text, ':', 0, 0, 0, undef, 0, 'Rule In', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ":", 0, 0, 0, undef, 0, "Rule In", "Normal Text")) 4 20 24
481 4 return 1
482 }
483 20 return 0;
484 };
485  
486 24 ▶sub parseString {
Subroutine parseString: called CC=3 SCAR=11.2
Pod undocumented
487 24 my ($self, $text) = @_;
488 # String => '\\.'
489 # attribute => 'Backslash Code'
490 # context => '#stay'
491 # type => 'RegExpr'
492 24 ▶ if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'Backslash Code')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\\.", 0, 0, 0, undef, 0, "#stay", "Backslash Code")) 0 24 24
493 0 return 1
494 }
495 # attribute => 'String'
496 # char => '"'
497 # context => '#pop'
498 # type => 'DetectChar'
499 24 ▶ 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")) 8 16 24
500 8 return 1
501 }
502 16 return 0;
503 };
504  
505 588 ▶sub parseStringOrChar {
Subroutine parseStringOrChar: called CC=3 SCAR=11.2
Pod undocumented
506 588 my ($self, $text) = @_;
507 # attribute => 'String Char'
508 # char => '''
509 # context => 'Char'
510 # type => 'DetectChar'
511 588 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Char', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "Char", "String Char")) 0 588 588
512 0 return 1
513 }
514 # attribute => 'String'
515 # char => '"'
516 # context => 'String'
517 # type => 'DetectChar'
518 588 ▶ 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")) 8 580 588
519 8 return 1
520 }
521 580 return 0;
522 };
523  
524 86 ▶sub parseUnionIn {
Subroutine parseUnionIn: called CC=4 SCAR=14.0
Pod undocumented
525 86 my ($self, $text) = @_;
526 # attribute => 'Normal Text'
527 # char => '{'
528 # context => 'Union InIn'
529 # type => 'DetectChar'
530 86 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Union InIn', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "Union InIn", "Normal Text")) 0 86 86
531 0 return 1
532 }
533 # attribute => 'Normal Text'
534 # char => '}'
535 # context => '#pop#pop'
536 # endRegion => 'union'
537 # type => 'DetectChar'
538 86 ▶ if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "}", 0, 0, 0, undef, 0, "#pop#pop", "Normal Text")) 2 84 86
539 2 return 1
540 }
541 # context => '##C++'
542 # type => 'IncludeRules'
543 84 ▶ if ($self->includePlugin('C++', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("C++", $text)) 82 2 84
544 82 return 1
545 }
546 2 return 0;
547 };
548  
549 0 ▶sub parseUnionInIn {
Subroutine parseUnionInIn: not called CC=4 SCAR=30.0
Pod undocumented
550 0 my ($self, $text) = @_;
551 # attribute => 'Normal Text'
552 # char => '{'
553 # context => 'Union InIn'
554 # type => 'DetectChar'
555 0 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Union InIn', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "Union InIn", "Normal Text")) 0 0 0
556 0 return 1
557 }
558 # attribute => 'Normal Text'
559 # char => '}'
560 # context => '#pop'
561 # type => 'DetectChar'
562 0 ▶ if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "}", 0, 0, 0, undef, 0, "#pop", "Normal Text")) 0 0 0
563 0 return 1
564 }
565 # context => '##C++'
566 # type => 'IncludeRules'
567 0 ▶ if ($self->includePlugin('C++', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("C++", $text)) 0 0 0
568 0 return 1
569 }
570 0 return 0;
571 };
572  
573 4 ▶sub parseUnionStart {
Subroutine parseUnionStart: called CC=5 SCAR=19.7
Pod undocumented
574 4 my ($self, $text) = @_;
575 # context => 'Comment'
576 # type => 'IncludeRules'
577 4 ▶ if ($self->includeRules('Comment', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Comment", $text)) 0 4 4
578 0 return 1
579 }
580 # type => 'DetectSpaces'
581 4 ▶ if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectSpaces($text, 0, undef, 0, "#stay", undef)) 2 2 4
582 2 return 1
583 }
584 # attribute => 'Normal Text'
585 # beginRegion => 'union'
586 # char => '{'
587 # context => 'Union In'
588 # type => 'DetectChar'
589 2 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Union In', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "Union In", "Normal Text")) 2 0 2
590 2 return 1
591 }
592 # String => '.'
593 # attribute => 'Alert'
594 # context => '#pop'
595 # type => 'RegExpr'
596 0 ▶ if ($self->testRegExpr($text, '.', 0, 0, 0, undef, 0, '#pop', 'Alert')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, ".", 0, 0, 0, undef, 0, "#pop", "Alert")) 0 0 0
597 0 return 1
598 }
599 0 return 0;
600 };
601  
602 38 ▶sub parseUserCode {
Subroutine parseUserCode: called CC=2 SCAR=7.6
Pod undocumented
603 38 my ($self, $text) = @_;
604 # context => '##C++'
605 # type => 'IncludeRules'
606 38 ▶ if ($self->includePlugin('C++', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("C++", $text)) 38 0 38
607 38 return 1
608 }
609 0 return 0;
610 };
611  
612  
613 1 1;
614  
615 __END__
« Kate/RenderMan_RIB.pm ↑ Summary Kate/BibTeX.pm »