Kate/Debian_Changelog.pm

filter: Statementstmt 46.3% 25 / 54 Branchbran 0.0% 0 / 22 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 4 / 8 Podpod 0.0% 0 / 5 totaltotal 31.9% 30 / 94 SCAR 41.6
CC
13
Cov
33%
parseHead
42.0
parsenoname
42.0
parseVersion
6.0
CRAP 64.0
« Kate/SML.pm ↑ Summary Kate/UnrealScript.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 'debianchangelog.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 0.62
9 #kate version 2.4
10 #generated: Sun Feb 3 22:02:04 2008, localtime
11  
12 package Syntax::Highlight::Engine::Kate::Debian_Changelog;
13  
14 1 our $VERSION = '0.14';
15  
16 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use base('Syntax::Highlight::Engine::Kate::Template');
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 sub new {
21 1 ▶ my $proto = shift;
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
22 1 ▶ my $class = ref($proto) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
23 1 my $self = $class->SUPER::new(@_);
24 1 $self->attributes({
25 'Bug' => 'DataType',
26 'Data' => 'DataType',
27 'Email' => 'Others',
28 'Keyword' => 'Keyword',
29 'Normal Text' => 'Normal',
30 'Version' => 'DataType',
31 });
32 1 $self->listAdd('distributions',
33 'experimental',
34 'frozen',
35 'stable',
36 'testing',
37 'unstable',
38 );
39 1 $self->listAdd('keywords',
40 'urgency',
41 );
42 1 $self->listAdd('urgencies',
43 'bug',
44 'emergency',
45 'high',
46 'low',
47 'medium',
48 );
49 1 $self->contextdata({
50 'Head' => {
51 callback => \&parseHead,
52 attribute => 'Normal Text',
53 lineending => '#pop',
54 },
55 'Version' => {
56 callback => \&parseVersion,
57 attribute => 'Version',
58 lineending => '#pop',
59 },
60 'noname' => {
61 callback => \&parsenoname,
62 attribute => 'Normal Text',
63 },
64 });
65 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
66 1 $self->basecontext('noname');
67 1 $self->keywordscase(0);
68 1 $self->initialize;
69 1 bless ($self, $class);
70 1 return $self;
71 }
72  
73 sub language {
74 0 ▶ return 'Debian Changelog';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
75 }
76  
77 sub parseHead {
78 0 ▶ my ($self, $text) = @_;
Subroutine parseHead: not called CC=6 SCAR=37.4
Pod undocumented
79 # attribute => 'Keyword'
80 # char => '('
81 # context => 'Version'
82 # type => 'DetectChar'
83 0 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Version', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "Version", "Keyword")) 0 0 0
84 0 return 1
85 }
86 # String => '[,;=]'
87 # attribute => 'Keyword'
88 # context => '#stay'
89 # type => 'RegExpr'
90 0 ▶ if ($self->testRegExpr($text, '[,;=]', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[,;=]", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
91 0 return 1
92 }
93 # String => 'keywords'
94 # attribute => 'Keyword'
95 # context => '#stay'
96 # type => 'keyword'
97 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
98 0 return 1
99 }
100 # String => 'distributions'
101 # attribute => 'Data'
102 # context => '#stay'
103 # type => 'keyword'
104 0 ▶ if ($self->testKeyword($text, 'distributions', 0, undef, 0, '#stay', 'Data')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "distributions", 0, undef, 0, "#stay", "Data")) 0 0 0
105 0 return 1
106 }
107 # String => 'urgencies'
108 # attribute => 'Data'
109 # context => '#stay'
110 # type => 'keyword'
111 0 ▶ if ($self->testKeyword($text, 'urgencies', 0, undef, 0, '#stay', 'Data')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "urgencies", 0, undef, 0, "#stay", "Data")) 0 0 0
112 0 return 1
113 }
114 0 return 0;
115 };
116  
117 sub parseVersion {
118 0 ▶ my ($self, $text) = @_;
Subroutine parseVersion: not called CC=2 SCAR=17.9
Pod undocumented
119 # attribute => 'Keyword'
120 # char => ')'
121 # context => '#pop'
122 # type => 'DetectChar'
123 0 ▶ if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ")", 0, 0, 0, undef, 0, "#pop", "Keyword")) 0 0 0
124 0 return 1
125 }
126 0 return 0;
127 };
128  
129 sub parsenoname {
130 0 ▶ my ($self, $text) = @_;
Subroutine parsenoname: not called CC=6 SCAR=37.4
Pod undocumented
131 # String => '[^ ]*'
132 # attribute => 'Keyword'
133 # column => '0'
134 # context => 'Head'
135 # type => 'RegExpr'
136 0 ▶ if ($self->testRegExpr($text, '[^ ]*', 0, 0, 0, 0, 0, 'Head', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[^ ]*", 0, 0, 0, 0, 0, "Head", "Keyword")) 0 0 0
137 0 return 1
138 }
139 # String => '<.*@.*>'
140 # attribute => 'Email'
141 # context => '#stay'
142 # type => 'RegExpr'
143 0 ▶ if ($self->testRegExpr($text, '<.*@.*>', 0, 0, 0, undef, 0, '#stay', 'Email')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "<.*\@.*>", 0, 0, 0, undef, 0, "#stay", "Email")) 0 0 0
144 0 return 1
145 }
146 # String => ' \-\-'
147 # attribute => 'Keyword'
148 # column => '0'
149 # context => '#stay'
150 # type => 'RegExpr'
151 0 ▶ if ($self->testRegExpr($text, ' \\-\\-', 0, 0, 0, 0, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, " \\-\\-", 0, 0, 0, 0, 0, "#stay", "Keyword")) 0 0 0
152 0 return 1
153 }
154 # String => ' \*'
155 # attribute => 'Keyword'
156 # column => '0'
157 # context => '#stay'
158 # type => 'RegExpr'
159 0 ▶ if ($self->testRegExpr($text, ' \\*', 0, 0, 0, 0, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, " \\*", 0, 0, 0, 0, 0, "#stay", "Keyword")) 0 0 0
160 0 return 1
161 }
162 # String => '[Cc][Ll][Oo][Ss][Ee][Ss]:[\s]*(([Bb][Uu][Gg]\s*)?#\s*\d+)(\s*, *([Bb[Uu][Gg]\s*)?#\s*\d+)*'
163 # attribute => 'Bug'
164 # context => '#stay'
165 # type => 'RegExpr'
166 0 ▶ if ($self->testRegExpr($text, '[Cc][Ll][Oo][Ss][Ee][Ss]:[\\s]*(([Bb][Uu][Gg]\\s*)?#\\s*\\d+)(\\s*, *([Bb[Uu][Gg]\\s*)?#\\s*\\d+)*', 0, 0, 0, undef, 0, '#stay', 'Bug')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[Cc][Ll][Oo][Ss][Ee][Ss]:[\\s]*(([Bb][Uu][Gg]\\s*)?#\\s*\\d+)(\\s*, *([Bb[Uu][Gg]\\s*)?#\\s*\\d+)*", 0, 0, 0, undef, 0, "#stay", "Bug")) 0 0 0
167 0 return 1
168 }
169 0 return 0;
170 };
171  
172  
173 1 1;
174  
175 __END__
« Kate/SML.pm ↑ Summary Kate/UnrealScript.pm »