Kate/Lex_Flex.pm

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