Kate/XML.pm

filter: Statementstmt 63.5% 110 / 173 Branchbran 55.3% 62 / 112 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 70.8% 17 / 24 Podpod 0.0% 0 / 21 totaltotal 56.7% 190 / 335 CC 58 SCAR 24.0
CC
58
Cov
60%
parseDoctypeInternalSubset
42.0
parseCDATA
30.0
parseDoctypeMarkupdecl
20.0
CRAP 11.0
« Kate/GLSL.pm ↑ Summary Kate/SGML.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 'xml.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.96
9 #kate version 2.4
10 #kate author Wilbert Berendsen (wilbert@kde.nl)
11 #generated: Sun Feb 3 22:02:06 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::XML;
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 'Attribute' => 'Others',
27 'CDATA' => 'BaseN',
28 'Comment' => 'Comment',
29 'Doctype' => 'DataType',
30 'Element' => 'Keyword',
31 'EntityRef' => 'DecVal',
32 'Error' => 'Error',
33 'Normal Text' => 'Normal',
34 'PEntityRef' => 'DecVal',
35 'Processing Instruction' => 'Keyword',
36 'Value' => 'String',
37 });
38 2 $self->contextdata({
39 'Attribute' => {
40 callback => \&parseAttribute,
41 attribute => 'Normal Text',
42 },
43 'CDATA' => {
44 callback => \&parseCDATA,
45 attribute => 'Normal Text',
46 },
47 'Comment' => {
48 callback => \&parseComment,
49 attribute => 'Comment',
50 },
51 'Doctype' => {
52 callback => \&parseDoctype,
53 attribute => 'Normal Text',
54 },
55 'Doctype Internal Subset' => {
56 callback => \&parseDoctypeInternalSubset,
57 attribute => 'Normal Text',
58 },
59 'Doctype Markupdecl' => {
60 callback => \&parseDoctypeMarkupdecl,
61 attribute => 'Normal Text',
62 },
63 'Doctype Markupdecl DQ' => {
64 callback => \&parseDoctypeMarkupdeclDQ,
65 attribute => 'Value',
66 },
67 'Doctype Markupdecl SQ' => {
68 callback => \&parseDoctypeMarkupdeclSQ,
69 attribute => 'Value',
70 },
71 'El Content' => {
72 callback => \&parseElContent,
73 attribute => 'Normal Text',
74 },
75 'El End' => {
76 callback => \&parseElEnd,
77 attribute => 'Normal Text',
78 },
79 'Element' => {
80 callback => \&parseElement,
81 attribute => 'Normal Text',
82 },
83 'FindEntityRefs' => {
84 callback => \&parseFindEntityRefs,
85 attribute => 'Normal Text',
86 },
87 'FindPEntityRefs' => {
88 callback => \&parseFindPEntityRefs,
89 attribute => 'Normal Text',
90 },
91 'FindXML' => {
92 callback => \&parseFindXML,
93 attribute => 'Normal Text',
94 },
95 'PI' => {
96 callback => \&parsePI,
97 attribute => 'Normal Text',
98 },
99 'Start' => {
100 callback => \&parseStart,
101 attribute => 'Normal Text',
102 },
103 'Value' => {
104 callback => \&parseValue,
105 attribute => 'Normal Text',
106 },
107 'Value DQ' => {
108 callback => \&parseValueDQ,
109 attribute => 'Value',
110 },
111 'Value SQ' => {
112 callback => \&parseValueSQ,
113 attribute => 'Value',
114 },
115 });
116 2 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
117 2 $self->basecontext('Start');
118 2 $self->keywordscase(1);
119 2 $self->initialize;
120 2 bless ($self, $class);
121 2 return $self;
122 }
123  
124 0 ▶sub language {
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
125 0 return 'XML';
126 }
127  
128 26 ▶sub parseAttribute {
Subroutine parseAttribute: called CC=3 SCAR=11.2
Pod undocumented
129 26 my ($self, $text) = @_;
130 # attribute => 'Attribute'
131 # char => '='
132 # context => 'Value'
133 # type => 'DetectChar'
134 26 ▶ if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Value', 'Attribute')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "=", 0, 0, 0, undef, 0, "Value", "Attribute")) 20 6 26
135 20 return 1
136 }
137 # String => '\S'
138 # attribute => 'Error'
139 # context => '#stay'
140 # type => 'RegExpr'
141 6 ▶ if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\S", 0, 0, 0, undef, 0, "#stay", "Error")) 0 6 6
142 0 return 1
143 }
144 6 return 0;
145 };
146  
147 0 ▶sub parseCDATA {
Subroutine parseCDATA: not called CC=5 SCAR=34.0
Pod undocumented
148 0 my ($self, $text) = @_;
149 # type => 'DetectSpaces'
150 0 ▶ if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectSpaces($text, 0, undef, 0, "#stay", undef)) 0 0 0
151 0 return 1
152 }
153 # type => 'DetectIdentifier'
154 0 ▶ if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectIdentifier($text, 0, undef, 0, "#stay", undef)) 0 0 0
155 0 return 1
156 }
157 # String => ']]>'
158 # attribute => 'CDATA'
159 # context => '#pop'
160 # endRegion => 'cdata'
161 # type => 'StringDetect'
162 0 ▶ if ($self->testStringDetect($text, ']]>', 0, 0, 0, undef, 0, '#pop', 'CDATA')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "]]>", 0, 0, 0, undef, 0, "#pop", "CDATA")) 0 0 0
163 0 return 1
164 }
165 # String => ']]&gt;'
166 # attribute => 'EntityRef'
167 # context => '#stay'
168 # type => 'StringDetect'
169 0 ▶ if ($self->testStringDetect($text, ']]&gt;', 0, 0, 0, undef, 0, '#stay', 'EntityRef')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "]]&gt;", 0, 0, 0, undef, 0, "#stay", "EntityRef")) 0 0 0
170 0 return 1
171 }
172 0 return 0;
173 };
174  
175 136 ▶sub parseComment {
Subroutine parseComment: called CC=6 SCAR=18.3
Pod undocumented
176 136 my ($self, $text) = @_;
177 # type => 'DetectSpaces'
178 136 ▶ if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectSpaces($text, 0, undef, 0, "#stay", undef)) 64 72 136
179 64 return 1
180 }
181 # String => '-->'
182 # attribute => 'Comment'
183 # context => '#pop'
184 # endRegion => 'comment'
185 # type => 'StringDetect'
186 72 ▶ if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "-->", 0, 0, 0, undef, 0, "#pop", "Comment")) 10 62 72
187 10 return 1
188 }
189 # String => '-(-(?!->))+'
190 # attribute => 'Error'
191 # context => '#stay'
192 # type => 'RegExpr'
193 62 ▶ if ($self->testRegExpr($text, '-(-(?!->))+', 0, 0, 0, undef, 0, '#stay', 'Error')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "-(-(?!->))+", 0, 0, 0, undef, 0, "#stay", "Error")) 0 62 62
194 0 return 1
195 }
196 # context => '##Alerts'
197 # type => 'IncludeRules'
198 62 ▶ if ($self->includePlugin('Alerts', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("Alerts", $text)) 0 62 62
199 0 return 1
200 }
201 # type => 'DetectIdentifier'
202 62 ▶ if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectIdentifier($text, 0, undef, 0, "#stay", undef)) 48 14 62
203 48 return 1
204 }
205 14 return 0;
206 };
207  
208 180 ▶sub parseDoctype {
Subroutine parseDoctype: called CC=3 SCAR=11.2
Pod undocumented
209 180 my ($self, $text) = @_;
210 # attribute => 'Doctype'
211 # char => '>'
212 # context => '#pop'
213 # endRegion => 'doctype'
214 # type => 'DetectChar'
215 180 ▶ if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Doctype')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ">", 0, 0, 0, undef, 0, "#pop", "Doctype")) 4 176 180
216 4 return 1
217 }
218 # attribute => 'Doctype'
219 # beginRegion => 'int_subset'
220 # char => '['
221 # context => 'Doctype Internal Subset'
222 # type => 'DetectChar'
223 176 ▶ if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'Doctype Internal Subset', 'Doctype')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "[", 0, 0, 0, undef, 0, "Doctype Internal Subset", "Doctype")) 0 176 176
224 0 return 1
225 }
226 176 return 0;
227 };
228  
229 0 ▶sub parseDoctypeInternalSubset {
Subroutine parseDoctypeInternalSubset: not called CC=6 SCAR=37.4
Pod undocumented
230 0 my ($self, $text) = @_;
231 # attribute => 'Doctype'
232 # char => ']'
233 # context => '#pop'
234 # endRegion => 'int_subset'
235 # type => 'DetectChar'
236 0 ▶ if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Doctype')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "]", 0, 0, 0, undef, 0, "#pop", "Doctype")) 0 0 0
237 0 return 1
238 }
239 # String => '<!(ELEMENT|ENTITY|ATTLIST|NOTATION)\b'
240 # attribute => 'Doctype'
241 # context => 'Doctype Markupdecl'
242 # type => 'RegExpr'
243 0 ▶ if ($self->testRegExpr($text, '<!(ELEMENT|ENTITY|ATTLIST|NOTATION)\\b', 0, 0, 0, undef, 0, 'Doctype Markupdecl', 'Doctype')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<!(ELEMENT|ENTITY|ATTLIST|NOTATION)\\b", 0, 0, 0, undef, 0, "Doctype Markupdecl", "Doctype")) 0 0 0
244 0 return 1
245 }
246 # String => '<!--'
247 # attribute => 'Comment'
248 # beginRegion => 'comment'
249 # context => 'Comment'
250 # type => 'StringDetect'
251 0 ▶ if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<!--", 0, 0, 0, undef, 0, "Comment", "Comment")) 0 0 0
252 0 return 1
253 }
254 # String => '<\?[\w:_-]*'
255 # attribute => 'Processing Instruction'
256 # beginRegion => 'pi'
257 # context => 'PI'
258 # type => 'RegExpr'
259 0 ▶ if ($self->testRegExpr($text, '<\\?[\\w:_-]*', 0, 0, 0, undef, 0, 'PI', 'Processing Instruction')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<\\?[\\w:_-]*", 0, 0, 0, undef, 0, "PI", "Processing Instruction")) 0 0 0
260 0 return 1
261 }
262 # context => 'FindPEntityRefs'
263 # type => 'IncludeRules'
264 0 ▶ if ($self->includeRules('FindPEntityRefs', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPEntityRefs", $text)) 0 0 0
265 0 return 1
266 }
267 0 return 0;
268 };
269  
270 0 ▶sub parseDoctypeMarkupdecl {
Subroutine parseDoctypeMarkupdecl: not called CC=4 SCAR=30.0
Pod undocumented
271 0 my ($self, $text) = @_;
272 # attribute => 'Doctype'
273 # char => '>'
274 # context => '#pop'
275 # type => 'DetectChar'
276 0 ▶ if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Doctype')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ">", 0, 0, 0, undef, 0, "#pop", "Doctype")) 0 0 0
277 0 return 1
278 }
279 # attribute => 'Value'
280 # char => '"'
281 # context => 'Doctype Markupdecl DQ'
282 # type => 'DetectChar'
283 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Doctype Markupdecl DQ', 'Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "Doctype Markupdecl DQ", "Value")) 0 0 0
284 0 return 1
285 }
286 # attribute => 'Value'
287 # char => '''
288 # context => 'Doctype Markupdecl SQ'
289 # type => 'DetectChar'
290 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Doctype Markupdecl SQ', 'Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "Doctype Markupdecl SQ", "Value")) 0 0 0
291 0 return 1
292 }
293 0 return 0;
294 };
295  
296 0 ▶sub parseDoctypeMarkupdeclDQ {
Subroutine parseDoctypeMarkupdeclDQ: not called CC=3 SCAR=24.8
Pod undocumented
297 0 my ($self, $text) = @_;
298 # attribute => 'Value'
299 # char => '"'
300 # context => '#pop'
301 # type => 'DetectChar'
302 0 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "#pop", "Value")) 0 0 0
303 0 return 1
304 }
305 # context => 'FindPEntityRefs'
306 # type => 'IncludeRules'
307 0 ▶ if ($self->includeRules('FindPEntityRefs', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPEntityRefs", $text)) 0 0 0
308 0 return 1
309 }
310 0 return 0;
311 };
312  
313 0 ▶sub parseDoctypeMarkupdeclSQ {
Subroutine parseDoctypeMarkupdeclSQ: not called CC=3 SCAR=24.8
Pod undocumented
314 0 my ($self, $text) = @_;
315 # attribute => 'Value'
316 # char => '''
317 # context => '#pop'
318 # type => 'DetectChar'
319 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "#pop", "Value")) 0 0 0
320 0 return 1
321 }
322 # context => 'FindPEntityRefs'
323 # type => 'IncludeRules'
324 0 ▶ if ($self->includeRules('FindPEntityRefs', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindPEntityRefs", $text)) 0 0 0
325 0 return 1
326 }
327 0 return 0;
328 };
329  
330 40 ▶sub parseElContent {
Subroutine parseElContent: called CC=3 SCAR=11.2
Pod undocumented
331 40 my ($self, $text) = @_;
332 # String => '</[A-Za-z_:][\w.:_-]*'
333 # attribute => 'Element'
334 # context => 'El End'
335 # type => 'RegExpr'
336 40 ▶ if ($self->testRegExpr($text, '</[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, 'El End', 'Element')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "</[A-Za-z_:][\\w.:_-]*", 0, 0, 0, undef, 0, "El End", "Element")) 14 26 40
337 14 return 1
338 }
339 # context => 'FindXML'
340 # type => 'IncludeRules'
341 26 ▶ if ($self->includeRules('FindXML', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindXML", $text)) 26 0 26
342 26 return 1
343 }
344 0 return 0;
345 };
346  
347 14 ▶sub parseElEnd {
Subroutine parseElEnd: called CC=3 SCAR=16.0
Pod undocumented
348 14 my ($self, $text) = @_;
349 # attribute => 'Element'
350 # char => '>'
351 # context => '#pop#pop#pop'
352 # endRegion => 'element'
353 # type => 'DetectChar'
354 14 ▶ if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Element')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ">", 0, 0, 0, undef, 0, "#pop#pop#pop", "Element")) 14 0 14
355 14 return 1
356 }
357 # String => '\S'
358 # attribute => 'Error'
359 # context => '#stay'
360 # type => 'RegExpr'
361 0 ▶ if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\S", 0, 0, 0, undef, 0, "#stay", "Error")) 0 0 0
362 0 return 1
363 }
364 0 return 0;
365 };
366  
367 56 ▶sub parseElement {
Subroutine parseElement: called CC=6 SCAR=18.3
Pod undocumented
368 56 my ($self, $text) = @_;
369 # attribute => 'Element'
370 # char => '/'
371 # char1 => '>'
372 # context => '#pop'
373 # endRegion => 'element'
374 # type => 'Detect2Chars'
375 56 ▶ if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop', 'Element')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", ">", 0, 0, 0, undef, 0, "#pop", "Element")) 14 42 56
376 14 return 1
377 }
378 # attribute => 'Element'
379 # char => '>'
380 # context => 'El Content'
381 # type => 'DetectChar'
382 42 ▶ if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, 'El Content', 'Element')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ">", 0, 0, 0, undef, 0, "El Content", "Element")) 14 28 42
383 14 return 1
384 }
385 # String => '^[A-Za-z_:][\w.:_-]*'
386 # attribute => 'Attribute'
387 # context => 'Attribute'
388 # type => 'RegExpr'
389 28 ▶ if ($self->testRegExpr($text, '^[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, 'Attribute', 'Attribute')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "^[A-Za-z_:][\\w.:_-]*", 0, 0, 0, undef, 0, "Attribute", "Attribute")) 0 28 28
390 0 return 1
391 }
392 # String => '\s+[A-Za-z_:][\w.:_-]*'
393 # attribute => 'Attribute'
394 # context => 'Attribute'
395 # type => 'RegExpr'
396 28 ▶ if ($self->testRegExpr($text, '\\s+[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, 'Attribute', 'Attribute')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\s+[A-Za-z_:][\\w.:_-]*", 0, 0, 0, undef, 0, "Attribute", "Attribute")) 20 8 28
397 20 return 1
398 }
399 # String => '\S'
400 # attribute => 'Error'
401 # context => '#stay'
402 # type => 'RegExpr'
403 8 ▶ if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\S", 0, 0, 0, undef, 0, "#stay", "Error")) 0 8 8
404 0 return 1
405 }
406 8 return 0;
407 };
408  
409 384 ▶sub parseFindEntityRefs {
Subroutine parseFindEntityRefs: called CC=3 SCAR=11.0
Pod undocumented
410 384 my ($self, $text) = @_;
411 # String => '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\w.:_-]*);'
412 # attribute => 'EntityRef'
413 # context => '#stay'
414 # type => 'RegExpr'
415 384 ▶ if ($self->testRegExpr($text, '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);', 0, 0, 0, undef, 0, '#stay', 'EntityRef')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);", 0, 0, 0, undef, 0, "#stay", "EntityRef")) 20 364 384
416 20 return 1
417 }
418 # String => '&<'
419 # attribute => 'Error'
420 # context => '#stay'
421 # type => 'AnyChar'
422 364 ▶ if ($self->testAnyChar($text, '&<', 0, 0, undef, 0, '#stay', 'Error')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, "&<", 0, 0, undef, 0, "#stay", "Error")) 4 360 364
423 4 return 1
424 }
425 360 return 0;
426 };
427  
428 0 ▶sub parseFindPEntityRefs {
Subroutine parseFindPEntityRefs: not called CC=4 SCAR=30.0
Pod undocumented
429 0 my ($self, $text) = @_;
430 # String => '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\w.:_-]*);'
431 # attribute => 'EntityRef'
432 # context => '#stay'
433 # type => 'RegExpr'
434 0 ▶ if ($self->testRegExpr($text, '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);', 0, 0, 0, undef, 0, '#stay', 'EntityRef')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);", 0, 0, 0, undef, 0, "#stay", "EntityRef")) 0 0 0
435 0 return 1
436 }
437 # String => '%[A-Za-z_:][\w.:_-]*;'
438 # attribute => 'PEntityRef'
439 # context => '#stay'
440 # type => 'RegExpr'
441 0 ▶ if ($self->testRegExpr($text, '%[A-Za-z_:][\\w.:_-]*;', 0, 0, 0, undef, 0, '#stay', 'PEntityRef')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "%[A-Za-z_:][\\w.:_-]*;", 0, 0, 0, undef, 0, "#stay", "PEntityRef")) 0 0 0
442 0 return 1
443 }
444 # String => '&%'
445 # attribute => 'Error'
446 # context => '#stay'
447 # type => 'AnyChar'
448 0 ▶ if ($self->testAnyChar($text, '&%', 0, 0, undef, 0, '#stay', 'Error')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, "&%", 0, 0, undef, 0, "#stay", "Error")) 0 0 0
449 0 return 1
450 }
451 0 return 0;
452 };
453  
454 446 ▶sub parseFindXML {
Subroutine parseFindXML: called CC=9 SCAR=22.0
Pod undocumented
455 446 my ($self, $text) = @_;
456 # type => 'DetectSpaces'
457 446 ▶ if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectSpaces($text, 0, undef, 0, "#stay", undef)) 170 276 446
458 170 return 1
459 }
460 # String => '<!--'
461 # attribute => 'Comment'
462 # beginRegion => 'comment'
463 # context => 'Comment'
464 # type => 'StringDetect'
465 276 ▶ if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<!--", 0, 0, 0, undef, 0, "Comment", "Comment")) 10 266 276
466 10 return 1
467 }
468 # String => '<![CDATA['
469 # attribute => 'CDATA'
470 # beginRegion => 'cdata'
471 # context => 'CDATA'
472 # type => 'StringDetect'
473 266 ▶ if ($self->testStringDetect($text, '<![CDATA[', 0, 0, 0, undef, 0, 'CDATA', 'CDATA')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "<![CDATA[", 0, 0, 0, undef, 0, "CDATA", "CDATA")) 0 266 266
474 0 return 1
475 }
476 # String => '<!DOCTYPE\s+'
477 # attribute => 'Doctype'
478 # beginRegion => 'doctype'
479 # context => 'Doctype'
480 # type => 'RegExpr'
481 266 ▶ if ($self->testRegExpr($text, '<!DOCTYPE\\s+', 0, 0, 0, undef, 0, 'Doctype', 'Doctype')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<!DOCTYPE\\s+", 0, 0, 0, undef, 0, "Doctype", "Doctype")) 4 262 266
482 4 return 1
483 }
484 # String => '<\?[\w:_-]*'
485 # attribute => 'Processing Instruction'
486 # beginRegion => 'pi'
487 # context => 'PI'
488 # type => 'RegExpr'
489 262 ▶ if ($self->testRegExpr($text, '<\\?[\\w:_-]*', 0, 0, 0, undef, 0, 'PI', 'Processing Instruction')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<\\?[\\w:_-]*", 0, 0, 0, undef, 0, "PI", "Processing Instruction")) 4 258 262
490 4 return 1
491 }
492 # String => '<[A-Za-z_:][\w.:_-]*'
493 # attribute => 'Element'
494 # beginRegion => 'element'
495 # context => 'Element'
496 # type => 'RegExpr'
497 258 ▶ if ($self->testRegExpr($text, '<[A-Za-z_:][\\w.:_-]*', 0, 0, 0, undef, 0, 'Element', 'Element')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<[A-Za-z_:][\\w.:_-]*", 0, 0, 0, undef, 0, "Element", "Element")) 28 230 258
498 28 return 1
499 }
500 # context => 'FindEntityRefs'
501 # type => 'IncludeRules'
502 230 ▶ if ($self->includeRules('FindEntityRefs', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindEntityRefs", $text)) 16 214 230
503 16 return 1
504 }
505 # type => 'DetectIdentifier'
506 214 ▶ if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectIdentifier($text, 0, undef, 0, "#stay", undef)) 156 58 214
507 156 return 1
508 }
509 58 return 0;
510 };
511  
512 114 ▶sub parsePI {
Subroutine parsePI: called CC=2 SCAR=6.9
Pod undocumented
513 114 my ($self, $text) = @_;
514 # attribute => 'Processing Instruction'
515 # char => '?'
516 # char1 => '>'
517 # context => '#pop'
518 # endRegion => 'pi'
519 # type => 'Detect2Chars'
520 114 ▶ if ($self->testDetect2Chars($text, '?', '>', 0, 0, 0, undef, 0, '#pop', 'Processing Instruction')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "?", ">", 0, 0, 0, undef, 0, "#pop", "Processing Instruction")) 4 110 114
521 4 return 1
522 }
523 110 return 0;
524 };
525  
526 420 ▶sub parseStart {
Subroutine parseStart: called CC=2 SCAR=6.9
Pod undocumented
527 420 my ($self, $text) = @_;
528 # context => 'FindXML'
529 # type => 'IncludeRules'
530 420 ▶ if ($self->includeRules('FindXML', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindXML", $text)) 362 58 420
531 362 return 1
532 }
533 58 return 0;
534 };
535  
536 26 ▶sub parseValue {
Subroutine parseValue: called CC=4 SCAR=14.0
Pod undocumented
537 26 my ($self, $text) = @_;
538 # attribute => 'Value'
539 # char => '"'
540 # context => 'Value DQ'
541 # type => 'DetectChar'
542 26 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Value DQ', 'Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "Value DQ", "Value")) 18 8 26
543 18 return 1
544 }
545 # attribute => 'Value'
546 # char => '''
547 # context => 'Value SQ'
548 # type => 'DetectChar'
549 8 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Value SQ', 'Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "Value SQ", "Value")) 2 6 8
550 2 return 1
551 }
552 # String => '\S'
553 # attribute => 'Error'
554 # context => '#stay'
555 # type => 'RegExpr'
556 6 ▶ if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\S", 0, 0, 0, undef, 0, "#stay", "Error")) 0 6 6
557 0 return 1
558 }
559 6 return 0;
560 };
561  
562 138 ▶sub parseValueDQ {
Subroutine parseValueDQ: called CC=3 SCAR=11.0
Pod undocumented
563 138 my ($self, $text) = @_;
564 # attribute => 'Value'
565 # char => '"'
566 # context => '#pop#pop#pop'
567 # type => 'DetectChar'
568 138 ▶ if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\"", 0, 0, 0, undef, 0, "#pop#pop#pop", "Value")) 18 120 138
569 18 return 1
570 }
571 # context => 'FindEntityRefs'
572 # type => 'IncludeRules'
573 120 ▶ if ($self->includeRules('FindEntityRefs', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindEntityRefs", $text)) 6 114 120
574 6 return 1
575 }
576 114 return 0;
577 };
578  
579 36 ▶sub parseValueSQ {
Subroutine parseValueSQ: called CC=3 SCAR=11.0
Pod undocumented
580 36 my ($self, $text) = @_;
581 # attribute => 'Value'
582 # char => '''
583 # context => '#pop#pop#pop'
584 # type => 'DetectChar'
585 36 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "#pop#pop#pop", "Value")) 2 34 36
586 2 return 1
587 }
588 # context => 'FindEntityRefs'
589 # type => 'IncludeRules'
590 34 ▶ if ($self->includeRules('FindEntityRefs', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("FindEntityRefs", $text)) 2 32 34
591 2 return 1
592 }
593 32 return 0;
594 };
595  
596  
597 1 1;
598  
599 __END__
« Kate/GLSL.pm ↑ Summary Kate/SGML.pm »