Kate/Inform.pm

filter: Statementstmt 18.8% 30 / 159 Branchbran 0.0% 0 / 104 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 23.5% 4 / 17 Podpod 0.0% 0 / 14 totaltotal 11.7% 35 / 299 SCAR 76.3
CC
54
Cov
12%
parseNormal
380.0
parseTopLevel
132.0
parsePropDefValrules
72.0
CRAP 2064.7
« Kate/JSP.pm ↑ Summary Kate/HTML.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 'inform.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.23
9 #kate version 2.3
10 #kate author Giancarlo Niccolai (giancarlo@niccolai.ws)
11 #generated: Sun Feb 3 22:02:05 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::Inform;
14  
15 1 our $VERSION = '0.14';
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 sub new {
22 1 ▶ my $proto = shift;
Subroutine new: called CC=2 SCAR=6.9
Pod undocumented
23 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
24 1 my $self = $class->SUPER::new(@_);
25 1 $self->attributes({
26 'Actions' => 'DataType',
27 'Comment' => 'Comment',
28 'Function' => 'Function',
29 'Keyword' => 'Keyword',
30 'Normal Text' => 'Normal',
31 'Number' => 'DecVal',
32 'OpCode' => 'Reserved',
33 'Operator' => 'Operator',
34 'Pragma' => 'Others',
35 'PredefFunction' => 'Function',
36 'String' => 'String',
37 'Values' => 'BaseN',
38 'Word' => 'IString',
39 });
40 1 $self->listAdd('ClassDeclOps',
41 'has',
42 'private',
43 'with',
44 );
45 1 $self->listAdd('actions',
46 'Answer',
47 'Ask',
48 'AskFor',
49 'Attack',
50 'Blow',
51 'Burn',
52 'Buy',
53 'Climb',
54 'Climb',
55 'Close',
56 'Consult',
57 'Cut',
58 'Dig',
59 'Disrobe',
60 'Drink',
61 'Drop',
62 'Eat',
63 'Empty',
64 'Empty',
65 'EmptyT',
66 'Enter',
67 'Examine',
68 'Exit',
69 'Fill',
70 'FullScore',
71 'GetOff',
72 'GetOff',
73 'Give',
74 'Go',
75 'GoIn',
76 'GoIn',
77 'Insert',
78 'Inv',
79 'Inv',
80 'InvTall',
81 'InvWide',
82 'Jump',
83 'JumpOn',
84 'Kiss',
85 'LMode1',
86 'LMode2',
87 'LMode3',
88 'LetGo',
89 'Listen',
90 'Lock',
91 'Look',
92 'Mild',
93 'No',
94 'NotifyOff',
95 'NotifyOn',
96 'Objects',
97 'Open',
98 'Places',
99 'Pray',
100 'Pronouns',
101 'Pull',
102 'Push',
103 'PushDir',
104 'PutOn',
105 'Quit',
106 'Receive',
107 'Restart',
108 'Restore',
109 'Rub',
110 'Save',
111 'Score',
112 'ScriptOff',
113 'ScriptOn',
114 'Search',
115 'Set',
116 'SetTo',
117 'Show',
118 'Sing',
119 'Sing',
120 'Sing',
121 'Sleep',
122 'Smell',
123 'Sorry',
124 'Squeeze',
125 'Strong',
126 'Swim',
127 'Swing',
128 'SwitchOff',
129 'SwitchOn',
130 'Take',
131 'Taste',
132 'Tell',
133 'Think',
134 'ThrowAt',
135 'ThrownAt',
136 'Tie',
137 'Touch',
138 'Transfer',
139 'Turn',
140 'Unlock',
141 'VagueGo',
142 'Verify',
143 'Version',
144 'Wave',
145 'WaveHands',
146 'Wear',
147 'Yes',
148 );
149 1 $self->listAdd('functions',
150 'Achieved',
151 'AddToScope',
152 'CDefArt',
153 'ChangeDefault',
154 'DefArt',
155 'DoMenu',
156 'EnglishNumber',
157 'HasLightSource',
158 'InDefArt',
159 'Locale',
160 'LoopOverScope',
161 'NextWord',
162 'NextWordStopped',
163 'NounDomain',
164 'ObjectIsUntouchable',
165 'OffersLight',
166 'PlaceInScope',
167 'PlayerTo',
168 'PrintShortName',
169 'ScopeWithin',
170 'SetTime',
171 'StartDaemon',
172 'StartTimer',
173 'StopDaemon',
174 'StopTimer',
175 'TestScope',
176 'TryNumber',
177 'UnsignedCompare',
178 'WordAddress',
179 'WordLenght',
180 'WriteListFrom',
181 'YesOrNo',
182 'ZRegion',
183 'allowpushdir',
184 'child',
185 'children',
186 'metaclass',
187 'parent',
188 );
189 1 $self->listAdd('inline_pragmas',
190 '#else',
191 '#endif',
192 '#ifdef',
193 '#ifndef',
194 );
195 1 $self->listAdd('keywords',
196 'box',
197 'break',
198 'continue',
199 'do',
200 'else',
201 'font',
202 'for',
203 'give',
204 'if',
205 'inversion',
206 'jump',
207 'move',
208 'new_line',
209 'objectloop',
210 'on',
211 'print',
212 'print_ret',
213 'quit',
214 'read',
215 'remove',
216 'restore',
217 'return',
218 'rfalse',
219 'rtrue',
220 'save',
221 'spaces',
222 'spring',
223 'style',
224 'switch',
225 'to',
226 'until',
227 );
228 1 $self->listAdd('operators',
229 'has',
230 'hasn\\\'t',
231 'in',
232 'notin',
233 'ofclass',
234 'or',
235 'provides',
236 );
237 1 $self->listAdd('pragmas',
238 'Abbreviate',
239 'Array',
240 'Attribute',
241 'Constant',
242 'Default',
243 'End',
244 'Endif',
245 'Extend',
246 'Global',
247 'Ifdef',
248 'Iffalse',
249 'Iffalse',
250 'Ifndef',
251 'Ifnot',
252 'Ifnot',
253 'Iftrue',
254 'Iftrue',
255 'Import',
256 'Include',
257 'Link',
258 'Lowstring',
259 'Message',
260 'Property',
261 'Release',
262 'Replace',
263 'Serial',
264 'Statusline',
265 'Switches',
266 'System_file',
267 'Verb',
268 'score',
269 );
270 1 $self->listAdd('special_vals',
271 'Routine',
272 'String',
273 'action',
274 'actor',
275 'actors_location',
276 'bold',
277 'buffer',
278 'consult_from',
279 'consult_words',
280 'false',
281 'fixed',
282 'location',
283 'nothing',
284 'noun',
285 'off',
286 'on',
287 'player',
288 'roman',
289 'score',
290 'second',
291 'self',
292 'sender',
293 'the_time',
294 'true',
295 'underline',
296 'wn',
297 );
298 1 $self->contextdata({
299 'ClassDecl' => {
300 callback => \&parseClassDecl,
301 attribute => 'Normal Text',
302 lineending => 'ClassDecl_1',
303 },
304 'ClassDecl_1' => {
305 callback => \&parseClassDecl_1,
306 attribute => 'Normal Text',
307 },
308 'Normal' => {
309 callback => \&parseNormal,
310 attribute => 'Normal Text',
311 },
312 'PropDefVal rules' => {
313 callback => \&parsePropDefValrules,
314 attribute => 'Normal Text',
315 },
316 'TopLevel' => {
317 callback => \&parseTopLevel,
318 attribute => 'Normal Text',
319 },
320 'comment' => {
321 callback => \&parsecomment,
322 attribute => 'Comment',
323 lineending => '#pop',
324 },
325 'funcdef' => {
326 callback => \&parsefuncdef,
327 attribute => 'Normal Text',
328 },
329 'has_decl' => {
330 callback => \&parsehas_decl,
331 attribute => 'Normal Text',
332 },
333 'prop_def' => {
334 callback => \&parseprop_def,
335 attribute => 'Normal Text',
336 },
337 'prop_func_def' => {
338 callback => \&parseprop_func_def,
339 attribute => 'Normal Text',
340 },
341 'string' => {
342 callback => \&parsestring,
343 attribute => 'String',
344 },
345 'word' => {
346 callback => \&parseword,
347 attribute => 'Word',
348 lineending => '#pop',
349 },
350 });
351 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
352 1 $self->basecontext('TopLevel');
353 1 $self->keywordscase(0);
354 1 $self->initialize;
355 1 bless ($self, $class);
356 1 return $self;
357 }
358  
359 sub language {
360 0 ▶ return 'Inform';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
361 }
362  
363 sub parseClassDecl {
364 0 ▶ my ($self, $text) = @_;
Subroutine parseClassDecl: not called CC=2 SCAR=17.9
Pod undocumented
365 # context => 'PropDefVal rules'
366 # type => 'IncludeRules'
367 0 ▶ if ($self->includeRules('PropDefVal rules', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("PropDefVal rules", $text)) 0 0 0
368 0 return 1
369 }
370 0 return 0;
371 };
372  
373 sub parseClassDecl_1 {
374 0 ▶ my ($self, $text) = @_;
Subroutine parseClassDecl_1: not called CC=5 SCAR=34.0
Pod undocumented
375 # String => '^[\t ]*has '
376 # attribute => 'Keyword'
377 # context => 'has_decl'
378 # insensitive => 'TRUE'
379 # type => 'RegExpr'
380 0 ▶ if ($self->testRegExpr($text, '^[\\t ]*has ', 1, 0, 0, undef, 0, 'has_decl', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "^[\\t ]*has ", 1, 0, 0, undef, 0, "has_decl", "Keyword")) 0 0 0
381 0 return 1
382 }
383 # String => 'ClassDeclOps'
384 # attribute => 'Keyword'
385 # context => '#stay'
386 # type => 'keyword'
387 0 ▶ if ($self->testKeyword($text, 'ClassDeclOps', 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "ClassDeclOps", 0, undef, 0, "#stay", "Keyword")) 0 0 0
388 0 return 1
389 }
390 # String => '[a-zA-Z_]+\w*'
391 # attribute => 'Function'
392 # context => 'prop_def'
393 # type => 'RegExpr'
394 0 ▶ if ($self->testRegExpr($text, '[a-zA-Z_]+\\w*', 0, 0, 0, undef, 0, 'prop_def', 'Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[a-zA-Z_]+\\w*", 0, 0, 0, undef, 0, "prop_def", "Function")) 0 0 0
395 0 return 1
396 }
397 # attribute => 'Pragma'
398 # char => ';'
399 # context => '#pop'
400 # endRegion => 'reg_class'
401 # type => 'DetectChar'
402 0 ▶ if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Pragma')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ";", 0, 0, 0, undef, 0, "#pop", "Pragma")) 0 0 0
403 0 return 1
404 }
405 0 return 0;
406 };
407  
408 sub parseNormal {
409 0 ▶ my ($self, $text) = @_;
Subroutine parseNormal: not called CC=19 SCAR=59.4
Pod undocumented
410 # attribute => 'Comment'
411 # char => '!'
412 # context => 'comment'
413 # type => 'DetectChar'
414 0 ▶ if ($self->testDetectChar($text, '!', 0, 0, 0, undef, 0, 'comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "!", 0, 0, 0, undef, 0, "comment", "Comment")) 0 0 0
415 0 return 1
416 }
417 # attribute => 'String'
418 # char => '"'
419 # context => 'string'
420 # type => 'DetectChar'
421 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
422 0 return 1
423 }
424 # attribute => 'Word'
425 # char => '''
426 # context => 'word'
427 # type => 'DetectChar'
428 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'word', 'Word')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "word", "Word")) 0 0 0
429 0 return 1
430 }
431 # String => 'inline_pragmas'
432 # attribute => 'Pragma'
433 # context => '#stay'
434 # type => 'keyword'
435 0 ▶ if ($self->testKeyword($text, 'inline_pragmas', 0, undef, 0, '#stay', 'Pragma')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "inline_pragmas", 0, undef, 0, "#stay", "Pragma")) 0 0 0
436 0 return 1
437 }
438 # String => '--?>'
439 # attribute => 'Operator'
440 # context => '#stay'
441 # type => 'RegExpr'
442 0 ▶ if ($self->testRegExpr($text, '--?>', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "--?>", 0, 0, 0, undef, 0, "#stay", "Operator")) 0 0 0
443 0 return 1
444 }
445 # String => 'keywords'
446 # attribute => 'Keyword'
447 # context => '#stay'
448 # type => 'keyword'
449 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
450 0 return 1
451 }
452 # String => 'actions'
453 # attribute => 'Actions'
454 # context => '#stay'
455 # type => 'keyword'
456 0 ▶ if ($self->testKeyword($text, 'actions', 0, undef, 0, '#stay', 'Actions')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "actions", 0, undef, 0, "#stay", "Actions")) 0 0 0
457 0 return 1
458 }
459 # String => 'functions'
460 # attribute => 'PredefFunction'
461 # context => '#stay'
462 # type => 'keyword'
463 0 ▶ if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'PredefFunction')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "functions", 0, undef, 0, "#stay", "PredefFunction")) 0 0 0
464 0 return 1
465 }
466 # String => 'special_vals'
467 # attribute => 'Values'
468 # context => '#stay'
469 # type => 'keyword'
470 0 ▶ if ($self->testKeyword($text, 'special_vals', 0, undef, 0, '#stay', 'Values')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "special_vals", 0, undef, 0, "#stay", "Values")) 0 0 0
471 0 return 1
472 }
473 # String => 'operators'
474 # attribute => 'Operator'
475 # context => '#stay'
476 # type => 'keyword'
477 0 ▶ if ($self->testKeyword($text, 'operators', 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "operators", 0, undef, 0, "#stay", "Operator")) 0 0 0
478 0 return 1
479 }
480 # String => '##[a-zA-Z_]+\w*'
481 # attribute => 'Actions'
482 # context => '#stay'
483 # type => 'RegExpr'
484 0 ▶ if ($self->testRegExpr($text, '##[a-zA-Z_]+\\w*', 0, 0, 0, undef, 0, '#stay', 'Actions')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "##[a-zA-Z_]+\\w*", 0, 0, 0, undef, 0, "#stay", "Actions")) 0 0 0
485 0 return 1
486 }
487 # String => '@[a-zA-Z_]+\w*'
488 # attribute => 'OpCode'
489 # context => '#stay'
490 # type => 'RegExpr'
491 0 ▶ if ($self->testRegExpr($text, '@[a-zA-Z_]+\\w*', 0, 0, 0, undef, 0, '#stay', 'OpCode')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\@[a-zA-Z_]+\\w*", 0, 0, 0, undef, 0, "#stay", "OpCode")) 0 0 0
492 0 return 1
493 }
494 # String => '\$[0-9a-fA-F]{1,4}'
495 # attribute => 'Number'
496 # context => '#stay'
497 # type => 'RegExpr'
498 0 ▶ if ($self->testRegExpr($text, '\\$[0-9a-fA-F]{1,4}', 0, 0, 0, undef, 0, '#stay', 'Number')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$[0-9a-fA-F]{1,4}", 0, 0, 0, undef, 0, "#stay", "Number")) 0 0 0
499 0 return 1
500 }
501 # String => '[a-zA-Z_]+\w*'
502 # attribute => 'Normal Text'
503 # context => '#stay'
504 # type => 'RegExpr'
505 0 ▶ if ($self->testRegExpr($text, '[a-zA-Z_]+\\w*', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[a-zA-Z_]+\\w*", 0, 0, 0, undef, 0, "#stay", "Normal Text")) 0 0 0
506 0 return 1
507 }
508 # String => '\d+'
509 # attribute => 'Number'
510 # context => '#stay'
511 # type => 'RegExpr'
512 0 ▶ if ($self->testRegExpr($text, '\\d+', 0, 0, 0, undef, 0, '#stay', 'Number')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\d+", 0, 0, 0, undef, 0, "#stay", "Number")) 0 0 0
513 0 return 1
514 }
515 # attribute => 'Keyword'
516 # beginRegion => 'reg_compound'
517 # char => '{'
518 # context => '#stay'
519 # type => 'DetectChar'
520 0 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
521 0 return 1
522 }
523 # attribute => 'Keyword'
524 # char => '}'
525 # context => '#stay'
526 # endRegion => 'reg_compound'
527 # type => 'DetectChar'
528 0 ▶ if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "}", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
529 0 return 1
530 }
531 # String => '%&()+-<=>{|}~'
532 # attribute => 'Operator'
533 # context => '#stay'
534 # type => 'AnyChar'
535 0 ▶ if ($self->testAnyChar($text, '%&()+-<=>{|}~', 0, 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, "%&()+-<=>{|}~", 0, 0, undef, 0, "#stay", "Operator")) 0 0 0
536 0 return 1
537 }
538 0 return 0;
539 };
540  
541 sub parsePropDefValrules {
542 0 ▶ my ($self, $text) = @_;
Subroutine parsePropDefValrules: not called CC=8 SCAR=42.8
Pod undocumented
543 # attribute => 'Comment'
544 # char => '!'
545 # context => 'comment'
546 # type => 'DetectChar'
547 0 ▶ if ($self->testDetectChar($text, '!', 0, 0, 0, undef, 0, 'comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "!", 0, 0, 0, undef, 0, "comment", "Comment")) 0 0 0
548 0 return 1
549 }
550 # attribute => 'String'
551 # char => '"'
552 # context => 'string'
553 # type => 'DetectChar'
554 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
555 0 return 1
556 }
557 # attribute => 'Word'
558 # char => '''
559 # context => 'word'
560 # type => 'DetectChar'
561 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'word', 'Word')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "word", "Word")) 0 0 0
562 0 return 1
563 }
564 # attribute => 'Function'
565 # beginRegion => 'reg_prop_def_func'
566 # char => '['
567 # context => 'prop_func_def'
568 # type => 'DetectChar'
569 0 ▶ if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'prop_func_def', 'Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "[", 0, 0, 0, undef, 0, "prop_func_def", "Function")) 0 0 0
570 0 return 1
571 }
572 # attribute => 'Operator'
573 # char => ','
574 # context => '#pop'
575 # type => 'DetectChar'
576 0 ▶ if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '#pop', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ",", 0, 0, 0, undef, 0, "#pop", "Operator")) 0 0 0
577 0 return 1
578 }
579 # String => '\$[0-9a-fA-F]{1,4}'
580 # attribute => 'Number'
581 # context => '#stay'
582 # type => 'RegExpr'
583 0 ▶ if ($self->testRegExpr($text, '\\$[0-9a-fA-F]{1,4}', 0, 0, 0, undef, 0, '#stay', 'Number')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$[0-9a-fA-F]{1,4}", 0, 0, 0, undef, 0, "#stay", "Number")) 0 0 0
584 0 return 1
585 }
586 # String => '\d+'
587 # attribute => 'Number'
588 # context => '#stay'
589 # type => 'RegExpr'
590 0 ▶ if ($self->testRegExpr($text, '\\d+', 0, 0, 0, undef, 0, '#stay', 'Number')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\d+", 0, 0, 0, undef, 0, "#stay", "Number")) 0 0 0
591 0 return 1
592 }
593 0 return 0;
594 };
595  
596 sub parseTopLevel {
597 0 ▶ my ($self, $text) = @_;
Subroutine parseTopLevel: not called CC=11 SCAR=48.8
Pod undocumented
598 # attribute => 'Comment'
599 # char => '!'
600 # context => 'comment'
601 # type => 'DetectChar'
602 0 ▶ if ($self->testDetectChar($text, '!', 0, 0, 0, undef, 0, 'comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "!", 0, 0, 0, undef, 0, "comment", "Comment")) 0 0 0
603 0 return 1
604 }
605 # attribute => 'String'
606 # char => '"'
607 # context => 'string'
608 # type => 'DetectChar'
609 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
610 0 return 1
611 }
612 # String => '[[]\s*[a-zA-Z_]+\w*'
613 # attribute => 'Function'
614 # beginRegion => 'reg_function'
615 # context => 'funcdef'
616 # type => 'RegExpr'
617 0 ▶ if ($self->testRegExpr($text, '[[]\\s*[a-zA-Z_]+\\w*', 0, 0, 0, undef, 0, 'funcdef', 'Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[[]\\s*[a-zA-Z_]+\\w*", 0, 0, 0, undef, 0, "funcdef", "Function")) 0 0 0
618 0 return 1
619 }
620 # String => ' *object | *class '
621 # attribute => 'Pragma'
622 # beginRegion => 'reg_class'
623 # column => '0'
624 # context => 'ClassDecl'
625 # insensitive => 'TRUE'
626 # type => 'RegExpr'
627 0 ▶ if ($self->testRegExpr($text, ' *object | *class ', 1, 0, 0, 0, 0, 'ClassDecl', 'Pragma')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, " *object | *class ", 1, 0, 0, 0, 0, "ClassDecl", "Pragma")) 0 0 0
628 0 return 1
629 }
630 # String => 'pragmas'
631 # attribute => 'Pragma'
632 # context => '#stay'
633 # type => 'keyword'
634 0 ▶ if ($self->testKeyword($text, 'pragmas', 0, undef, 0, '#stay', 'Pragma')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "pragmas", 0, undef, 0, "#stay", "Pragma")) 0 0 0
635 0 return 1
636 }
637 # String => 'inline_pragmas'
638 # attribute => 'Pragma'
639 # context => '#stay'
640 # type => 'keyword'
641 0 ▶ if ($self->testKeyword($text, 'inline_pragmas', 0, undef, 0, '#stay', 'Pragma')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "inline_pragmas", 0, undef, 0, "#stay", "Pragma")) 0 0 0
642 0 return 1
643 }
644 # String => '--?>'
645 # attribute => 'Operator'
646 # context => '#stay'
647 # type => 'RegExpr'
648 0 ▶ if ($self->testRegExpr($text, '--?>', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "--?>", 0, 0, 0, undef, 0, "#stay", "Operator")) 0 0 0
649 0 return 1
650 }
651 # String => '[a-zA-Z_]+\d*'
652 # attribute => 'Normal Text'
653 # context => '#stay'
654 # type => 'RegExpr'
655 0 ▶ if ($self->testRegExpr($text, '[a-zA-Z_]+\\d*', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[a-zA-Z_]+\\d*", 0, 0, 0, undef, 0, "#stay", "Normal Text")) 0 0 0
656 0 return 1
657 }
658 # String => '\$[0-9a-fA-F]{1,4}'
659 # attribute => 'Number'
660 # context => '#stay'
661 # type => 'RegExpr'
662 0 ▶ if ($self->testRegExpr($text, '\\$[0-9a-fA-F]{1,4}', 0, 0, 0, undef, 0, '#stay', 'Number')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\\$[0-9a-fA-F]{1,4}", 0, 0, 0, undef, 0, "#stay", "Number")) 0 0 0
663 0 return 1
664 }
665 # String => '\d+'
666 # attribute => 'Number'
667 # context => '#stay'
668 # type => 'RegExpr'
669 0 ▶ if ($self->testRegExpr($text, '\\d+', 0, 0, 0, undef, 0, '#stay', 'Number')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\d+", 0, 0, 0, undef, 0, "#stay", "Number")) 0 0 0
670 0 return 1
671 }
672 0 return 0;
673 };
674  
675 sub parsecomment {
676 0 ▶ my ($self, $text) = @_;
Subroutine parsecomment: not called CC=1 SCAR=6.9
Pod undocumented
677 0 return 0;
678 };
679  
680 sub parsefuncdef {
681 0 ▶ my ($self, $text) = @_;
Subroutine parsefuncdef: not called CC=3 SCAR=24.8
Pod undocumented
682 # context => 'Normal'
683 # type => 'IncludeRules'
684 0 ▶ if ($self->includeRules('Normal', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Normal", $text)) 0 0 0
685 0 return 1
686 }
687 # attribute => 'Function'
688 # char => ']'
689 # char1 => ';'
690 # context => '#pop'
691 # endRegion => 'reg_function'
692 # type => 'Detect2Chars'
693 0 ▶ if ($self->testDetect2Chars($text, ']', ';', 0, 0, 0, undef, 0, '#pop', 'Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "]", ";", 0, 0, 0, undef, 0, "#pop", "Function")) 0 0 0
694 0 return 1
695 }
696 0 return 0;
697 };
698  
699 sub parsehas_decl {
700 0 ▶ my ($self, $text) = @_;
Subroutine parsehas_decl: not called CC=3 SCAR=24.8
Pod undocumented
701 # attribute => 'Pragma'
702 # char => ';'
703 # context => '#pop#pop#pop'
704 # endRegion => 'reg_class'
705 # type => 'DetectChar'
706 0 ▶ if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Pragma')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ";", 0, 0, 0, undef, 0, "#pop#pop#pop", "Pragma")) 0 0 0
707 0 return 1
708 }
709 # context => 'PropDefVal rules'
710 # type => 'IncludeRules'
711 0 ▶ if ($self->includeRules('PropDefVal rules', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("PropDefVal rules", $text)) 0 0 0
712 0 return 1
713 }
714 0 return 0;
715 };
716  
717 sub parseprop_def {
718 0 ▶ my ($self, $text) = @_;
Subroutine parseprop_def: not called CC=5 SCAR=34.0
Pod undocumented
719 # attribute => 'Function'
720 # char => ','
721 # context => '#pop'
722 # endRegion => 'reg_prop'
723 # type => 'DetectChar'
724 0 ▶ if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '#pop', 'Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ",", 0, 0, 0, undef, 0, "#pop", "Function")) 0 0 0
725 0 return 1
726 }
727 # attribute => 'Pragma'
728 # char => ';'
729 # context => '#pop#pop#pop'
730 # endRegion => 'reg_class'
731 # type => 'DetectChar'
732 0 ▶ if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Pragma')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ";", 0, 0, 0, undef, 0, "#pop#pop#pop", "Pragma")) 0 0 0
733 0 return 1
734 }
735 # attribute => 'Function'
736 # beginRegion => 'reg_prop_func'
737 # char => '['
738 # context => 'prop_func_def'
739 # type => 'DetectChar'
740 0 ▶ if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'prop_func_def', 'Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "[", 0, 0, 0, undef, 0, "prop_func_def", "Function")) 0 0 0
741 0 return 1
742 }
743 # context => 'PropDefVal rules'
744 # type => 'IncludeRules'
745 0 ▶ if ($self->includeRules('PropDefVal rules', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("PropDefVal rules", $text)) 0 0 0
746 0 return 1
747 }
748 0 return 0;
749 };
750  
751 sub parseprop_func_def {
752 0 ▶ my ($self, $text) = @_;
Subroutine parseprop_func_def: not called CC=3 SCAR=24.8
Pod undocumented
753 # attribute => 'Function'
754 # char => ']'
755 # context => '#pop'
756 # endRegion => 'reg_prop_func'
757 # type => 'DetectChar'
758 0 ▶ if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Function')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "]", 0, 0, 0, undef, 0, "#pop", "Function")) 0 0 0
759 0 return 1
760 }
761 # context => 'Normal'
762 # type => 'IncludeRules'
763 0 ▶ if ($self->includeRules('Normal', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includeRules("Normal", $text)) 0 0 0
764 0 return 1
765 }
766 0 return 0;
767 };
768  
769 sub parsestring {
770 0 ▶ my ($self, $text) = @_;
Subroutine parsestring: not called CC=2 SCAR=17.9
Pod undocumented
771 # attribute => 'String'
772 # char => '"'
773 # context => '#pop'
774 # type => 'DetectChar'
775 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
776 0 return 1
777 }
778 0 return 0;
779 };
780  
781 sub parseword {
782 0 ▶ my ($self, $text) = @_;
Subroutine parseword: not called CC=2 SCAR=17.9
Pod undocumented
783 # attribute => 'Word'
784 # char => '''
785 # context => '#pop'
786 # type => 'DetectChar'
787 0 ▶ if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Word')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "'", 0, 0, 0, undef, 0, "#pop", "Word")) 0 0 0
788 0 return 1
789 }
790 0 return 0;
791 };
792  
793  
794 1 1;
795  
796 __END__
« Kate/JSP.pm ↑ Summary Kate/HTML.pm »