Kate/Makefile.pm

filter: Statementstmt 28.7% 23 / 80 Branchbran 0.0% 0 / 44 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 36.3% 4 / 11 Podpod 0.0% 0 / 8 totaltotal 18.9% 28 / 148 SCAR 58.0
CC
24
Cov
19%
parseNormal
110.0
parseValue
42.0
parseVarFromValue
20.0
CRAP 331.3
« Kate/Euphoria.pm ↑ Summary Kate/RSI_IDL.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 'makefile.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.06
9 #kate version 2.4
10 #kate author Per Wigren (wigren@home.se)
11 #generated: Sun Feb 3 22:02:05 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::Makefile;
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=7.0
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 'Commands' => 'BaseN',
27 'Comment' => 'Comment',
28 'Keyword' => 'Keyword',
29 'Normal Text' => 'Normal',
30 'Operator' => 'Char',
31 'Section' => 'Others',
32 'Special' => 'Float',
33 'String' => 'String',
34 'Target' => 'DecVal',
35 'Variable' => 'DataType',
36 });
37 1 $self->listAdd('keywords',
38 'define',
39 'else',
40 'endef',
41 'endif',
42 'ifdef',
43 'ifeq',
44 'ifndef',
45 'ifneq',
46 'include',
47 );
48 1 $self->contextdata({
49 'Commands' => {
50 callback => \&parseCommands,
51 attribute => 'Normal Text',
52 lineending => '#pop',
53 },
54 'Normal' => {
55 callback => \&parseNormal,
56 attribute => 'Normal Text',
57 },
58 'String' => {
59 callback => \&parseString,
60 attribute => 'String',
61 lineending => '#pop',
62 },
63 'Value' => {
64 callback => \&parseValue,
65 attribute => 'String',
66 },
67 'VarFromNormal' => {
68 callback => \&parseVarFromNormal,
69 attribute => 'Variable',
70 },
71 'VarFromValue' => {
72 callback => \&parseVarFromValue,
73 attribute => 'Variable',
74 },
75 });
76 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
77 1 $self->basecontext('Normal');
78 1 $self->keywordscase(0);
79 1 $self->initialize;
80 1 bless ($self, $class);
81 1 return $self;
82 }
83  
84 sub language {
85 0 ▶ return 'Makefile';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
86 }
87  
88 sub parseCommands {
89 0 ▶ my ($self, $text) = @_;
Subroutine parseCommands: not called CC=3 SCAR=24.8
Pod undocumented
90 # String => '[$][\({]'
91 # attribute => 'Operator'
92 # context => 'VarFromNormal'
93 # type => 'RegExpr'
94 0 ▶ if ($self->testRegExpr($text, '[$][\\({]', 0, 0, 0, undef, 0, 'VarFromNormal', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[\$][\\({]", 0, 0, 0, undef, 0, "VarFromNormal", "Operator")) 0 0 0
95 0 return 1
96 }
97 # String => '[_\w-]*\b'
98 # attribute => 'Commands'
99 # context => '#pop'
100 # type => 'RegExpr'
101 0 ▶ if ($self->testRegExpr($text, '[_\\w-]*\\b', 0, 0, 0, undef, 0, '#pop', 'Commands')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[_\\w-]*\\b", 0, 0, 0, undef, 0, "#pop", "Commands")) 0 0 0
102 0 return 1
103 }
104 0 return 0;
105 };
106  
107 sub parseNormal {
108 0 ▶ my ($self, $text) = @_;
Subroutine parseNormal: not called CC=10 SCAR=47.0
Pod undocumented
109 # String => 'keywords'
110 # attribute => 'Keyword'
111 # context => '#stay'
112 # type => 'keyword'
113 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
114 0 return 1
115 }
116 # String => '[_\w\d]*\s*(?=:=|=)'
117 # attribute => 'Variable'
118 # context => 'Value'
119 # type => 'RegExpr'
120 0 ▶ if ($self->testRegExpr($text, '[_\\w\\d]*\\s*(?=:=|=)', 0, 0, 0, undef, 0, 'Value', 'Variable')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[_\\w\\d]*\\s*(?=:=|=)", 0, 0, 0, undef, 0, "Value", "Variable")) 0 0 0
121 0 return 1
122 }
123 # String => '[_\w\d-]*\s*:'
124 # attribute => 'Target'
125 # context => '#stay'
126 # firstNonSpace => 'true'
127 # type => 'RegExpr'
128 0 ▶ if ($self->testRegExpr($text, '[_\\w\\d-]*\\s*:', 0, 0, 0, undef, 1, '#stay', 'Target')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[_\\w\\d-]*\\s*:", 0, 0, 0, undef, 1, "#stay", "Target")) 0 0 0
129 0 return 1
130 }
131 # String => '^[.].*:'
132 # attribute => 'Section'
133 # context => '#stay'
134 # type => 'RegExpr'
135 0 ▶ if ($self->testRegExpr($text, '^[.].*:', 0, 0, 0, undef, 0, '#stay', 'Section')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "^[.].*:", 0, 0, 0, undef, 0, "#stay", "Section")) 0 0 0
136 0 return 1
137 }
138 # attribute => 'String'
139 # char => '"'
140 # context => 'String'
141 # type => 'DetectChar'
142 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
143 0 return 1
144 }
145 # String => '[$][\({]'
146 # attribute => 'Operator'
147 # context => 'VarFromNormal'
148 # type => 'RegExpr'
149 0 ▶ if ($self->testRegExpr($text, '[$][\\({]', 0, 0, 0, undef, 0, 'VarFromNormal', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[\$][\\({]", 0, 0, 0, undef, 0, "VarFromNormal", "Operator")) 0 0 0
150 0 return 1
151 }
152 # String => '+*=%$():\\;'
153 # attribute => 'Operator'
154 # context => '#stay'
155 # type => 'AnyChar'
156 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
157 0 return 1
158 }
159 # String => '[@-]'
160 # attribute => 'Operator'
161 # context => 'Commands'
162 # firstNonSpace => 'true'
163 # type => 'RegExpr'
164 0 ▶ if ($self->testRegExpr($text, '[@-]', 0, 0, 0, undef, 1, 'Commands', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[\@-]", 0, 0, 0, undef, 1, "Commands", "Operator")) 0 0 0
165 0 return 1
166 }
167 # String => '(:^|[^\\])#.*$'
168 # attribute => 'Comment'
169 # context => '#stay'
170 # type => 'RegExpr'
171 0 ▶ if ($self->testRegExpr($text, '(:^|[^\\\\])#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "(:^|[^\\\\])#.*\$", 0, 0, 0, undef, 0, "#stay", "Comment")) 0 0 0
172 0 return 1
173 }
174 0 return 0;
175 };
176  
177 sub parseString {
178 0 ▶ my ($self, $text) = @_;
Subroutine parseString: not called CC=3 SCAR=24.8
Pod undocumented
179 # attribute => 'String'
180 # context => '#stay'
181 # type => 'LineContinue'
182 0 ▶ if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "#stay", "String")) 0 0 0
183 0 return 1
184 }
185 # attribute => 'String'
186 # char => '"'
187 # context => '#pop'
188 # type => 'DetectChar'
189 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
190 0 return 1
191 }
192 0 return 0;
193 };
194  
195 sub parseValue {
196 0 ▶ my ($self, $text) = @_;
Subroutine parseValue: not called CC=6 SCAR=37.4
Pod undocumented
197 # String => '\\$'
198 # attribute => 'Operator'
199 # context => '#stay'
200 # type => 'RegExpr'
201 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
202 0 return 1
203 }
204 # String => '[^\\]?$'
205 # attribute => 'String'
206 # context => '#pop'
207 # type => 'RegExpr'
208 0 ▶ if ($self->testRegExpr($text, '[^\\\\]?$', 0, 0, 0, undef, 0, '#pop', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[^\\\\]?\$", 0, 0, 0, undef, 0, "#pop", "String")) 0 0 0
209 0 return 1
210 }
211 # String => '[$][\({]'
212 # attribute => 'Operator'
213 # context => 'VarFromValue'
214 # type => 'RegExpr'
215 0 ▶ if ($self->testRegExpr($text, '[$][\\({]', 0, 0, 0, undef, 0, 'VarFromValue', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[\$][\\({]", 0, 0, 0, undef, 0, "VarFromValue", "Operator")) 0 0 0
216 0 return 1
217 }
218 # String => '@[-_\d\w]*@'
219 # attribute => 'Special'
220 # context => '#pop'
221 # type => 'RegExpr'
222 0 ▶ if ($self->testRegExpr($text, '@[-_\\d\\w]*@', 0, 0, 0, undef, 0, '#pop', 'Special')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\@[-_\\d\\w]*\@", 0, 0, 0, undef, 0, "#pop", "Special")) 0 0 0
223 0 return 1
224 }
225 # attribute => 'Operator'
226 # char => ';'
227 # context => '#pop'
228 # type => 'DetectChar'
229 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
230 0 return 1
231 }
232 0 return 0;
233 };
234  
235 sub parseVarFromNormal {
236 0 ▶ my ($self, $text) = @_;
Subroutine parseVarFromNormal: not called CC=2 SCAR=17.9
Pod undocumented
237 # String => '[\)}]'
238 # attribute => 'Operator'
239 # context => '#pop'
240 # type => 'RegExpr'
241 0 ▶ if ($self->testRegExpr($text, '[\\)}]', 0, 0, 0, undef, 0, '#pop', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[\\)}]", 0, 0, 0, undef, 0, "#pop", "Operator")) 0 0 0
242 0 return 1
243 }
244 0 return 0;
245 };
246  
247 sub parseVarFromValue {
248 0 ▶ my ($self, $text) = @_;
Subroutine parseVarFromValue: not called CC=4 SCAR=30.0
Pod undocumented
249 # String => '[\)}](?=/)'
250 # attribute => 'Operator'
251 # context => '#pop'
252 # type => 'RegExpr'
253 0 ▶ if ($self->testRegExpr($text, '[\\)}](?=/)', 0, 0, 0, undef, 0, '#pop', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[\\)}](?=/)", 0, 0, 0, undef, 0, "#pop", "Operator")) 0 0 0
254 0 return 1
255 }
256 # String => '[\)}][^$]'
257 # attribute => 'Operator'
258 # context => '#pop'
259 # type => 'RegExpr'
260 0 ▶ if ($self->testRegExpr($text, '[\\)}][^$]', 0, 0, 0, undef, 0, '#pop', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[\\)}][^\$]", 0, 0, 0, undef, 0, "#pop", "Operator")) 0 0 0
261 0 return 1
262 }
263 # String => '[\)}]$'
264 # attribute => 'Operator'
265 # context => '#pop#pop'
266 # type => 'RegExpr'
267 0 ▶ if ($self->testRegExpr($text, '[\\)}]$', 0, 0, 0, undef, 0, '#pop#pop', 'Operator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "[\\)}]\$", 0, 0, 0, undef, 0, "#pop#pop", "Operator")) 0 0 0
268 0 return 1
269 }
270 0 return 0;
271 };
272  
273  
274 1 1;
275  
276 __END__
« Kate/Euphoria.pm ↑ Summary Kate/RSI_IDL.pm »