Kate/Ada.pm

filter: Statementstmt 35.9% 23 / 64 Branchbran 0.0% 0 / 34 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 4 / 8 Podpod 0.0% 0 / 5 totaltotal 24.1% 28 / 116 SCAR 51.9
CC
19
Cov
24%
parseDefault
306.0
parseString
6.0
new
2.0
CRAP 179.0
« Kate/Sieve.pm ↑ Summary Kate/E_Language.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 'ada.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.05
9 #kate version 2.4
10 #generated: Sun Feb 3 22:02:04 2008, localtime
11  
12 package Syntax::Highlight::Engine::Kate::Ada;
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 'Base-N' => 'BaseN',
26 'Char' => 'Char',
27 'Comment' => 'Comment',
28 'Decimal' => 'DecVal',
29 'Float' => 'Float',
30 'Keyword' => 'Keyword',
31 'Normal Text' => 'Normal',
32 'String' => 'String',
33 });
34 1 $self->listAdd('keywords',
35 'abort',
36 'abs',
37 'abstract',
38 'accept',
39 'access',
40 'aliased',
41 'all',
42 'and',
43 'array',
44 'at',
45 'begin',
46 'body',
47 'constant',
48 'declare',
49 'delay',
50 'delta',
51 'digits',
52 'do',
53 'else',
54 'elsif',
55 'end',
56 'entry',
57 'exception',
58 'exit',
59 'for',
60 'function',
61 'generic',
62 'goto',
63 'in',
64 'is',
65 'limited',
66 'mod',
67 'new',
68 'not',
69 'null',
70 'of',
71 'or',
72 'others',
73 'out',
74 'package',
75 'pragma',
76 'private',
77 'procedure',
78 'protected',
79 'raise',
80 'range',
81 'record',
82 'rem',
83 'renames',
84 'requeue',
85 'return',
86 'reverse',
87 'separate',
88 'subtype',
89 'tagged',
90 'task',
91 'terminate',
92 'then',
93 'type',
94 'until',
95 'use',
96 'when',
97 'while',
98 'with',
99 'xor',
100 );
101 1 $self->contextdata({
102 'Comment' => {
103 callback => \&parseComment,
104 attribute => 'Comment',
105 lineending => '#pop',
106 },
107 'Default' => {
108 callback => \&parseDefault,
109 attribute => 'Normal Text',
110 },
111 'String' => {
112 callback => \&parseString,
113 attribute => 'String',
114 lineending => '#pop',
115 },
116 });
117 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
118 1 $self->basecontext('Default');
119 1 $self->keywordscase(0);
120 1 $self->initialize;
121 1 bless ($self, $class);
122 1 return $self;
123 }
124  
125 sub language {
126 0 ▶ return 'Ada';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
127 }
128  
129 sub parseComment {
130 0 ▶ my ($self, $text) = @_;
Subroutine parseComment: not called CC=1 SCAR=6.9
Pod undocumented
131 0 return 0;
132 };
133  
134 sub parseDefault {
135 0 ▶ my ($self, $text) = @_;
Subroutine parseDefault: not called CC=17 SCAR=57.2
Pod undocumented
136 # String => 'if '
137 # attribute => 'Keyword'
138 # beginRegion => 'Region1'
139 # context => '#stay'
140 # firstNonSpace => 'true'
141 # insensitive => 'TRUE'
142 # type => 'RegExpr'
143 0 ▶ if ($self->testRegExpr($text, 'if ', 1, 0, 0, undef, 1, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "if ", 1, 0, 0, undef, 1, "#stay", "Keyword")) 0 0 0
144 0 return 1
145 }
146 # String => 'end if'
147 # attribute => 'Keyword'
148 # context => '#stay'
149 # endRegion => 'Region1'
150 # insensitive => 'TRUE'
151 # type => 'StringDetect'
152 0 ▶ if ($self->testStringDetect($text, 'end if', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "end if", 1, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
153 0 return 1
154 }
155 # String => 'case '
156 # attribute => 'Keyword'
157 # beginRegion => 'Region2'
158 # context => '#stay'
159 # firstNonSpace => 'true'
160 # insensitive => 'TRUE'
161 # type => 'RegExpr'
162 0 ▶ if ($self->testRegExpr($text, 'case ', 1, 0, 0, undef, 1, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "case ", 1, 0, 0, undef, 1, "#stay", "Keyword")) 0 0 0
163 0 return 1
164 }
165 # String => 'end case'
166 # attribute => 'Keyword'
167 # context => '#stay'
168 # endRegion => 'Region2'
169 # insensitive => 'TRUE'
170 # type => 'StringDetect'
171 0 ▶ if ($self->testStringDetect($text, 'end case', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "end case", 1, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
172 0 return 1
173 }
174 # String => '\sloop\s+'
175 # attribute => 'Keyword'
176 # beginRegion => 'Region3'
177 # context => '#stay'
178 # insensitive => 'TRUE'
179 # type => 'RegExpr'
180 0 ▶ if ($self->testRegExpr($text, '\\sloop\\s+', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\sloop\\s+", 1, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
181 0 return 1
182 }
183 # String => '\sloop$'
184 # attribute => 'Keyword'
185 # beginRegion => 'Region3'
186 # context => '#stay'
187 # insensitive => 'TRUE'
188 # type => 'RegExpr'
189 0 ▶ if ($self->testRegExpr($text, '\\sloop$', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\sloop\$", 1, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
190 0 return 1
191 }
192 # String => 'end loop;'
193 # attribute => 'Keyword'
194 # context => '#stay'
195 # endRegion => 'Region3'
196 # insensitive => 'TRUE'
197 # type => 'StringDetect'
198 0 ▶ if ($self->testStringDetect($text, 'end loop;', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "end loop;", 1, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
199 0 return 1
200 }
201 # String => '\sselect\s+'
202 # attribute => 'Keyword'
203 # beginRegion => 'Region4'
204 # context => '#stay'
205 # insensitive => 'TRUE'
206 # type => 'RegExpr'
207 0 ▶ if ($self->testRegExpr($text, '\\sselect\\s+', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\sselect\\s+", 1, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
208 0 return 1
209 }
210 # String => '\sselect$'
211 # attribute => 'Keyword'
212 # beginRegion => 'Region4'
213 # context => '#stay'
214 # insensitive => 'TRUE'
215 # type => 'RegExpr'
216 0 ▶ if ($self->testRegExpr($text, '\\sselect$', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\sselect\$", 1, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
217 0 return 1
218 }
219 # String => 'end select;'
220 # attribute => 'Keyword'
221 # context => '#stay'
222 # endRegion => 'Region4'
223 # insensitive => 'TRUE'
224 # type => 'StringDetect'
225 0 ▶ if ($self->testStringDetect($text, 'end select;', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "end select;", 1, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
226 0 return 1
227 }
228 # String => 'keywords'
229 # attribute => 'Keyword'
230 # context => '#stay'
231 # type => 'keyword'
232 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
233 0 return 1
234 }
235 # attribute => 'Float'
236 # context => '#stay'
237 # type => 'Float'
238 0 ▶ if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testFloat($text, 0, undef, 0, "#stay", "Float")) 0 0 0
239 0 return 1
240 }
241 # attribute => 'Decimal'
242 # context => '#stay'
243 # type => 'Int'
244 0 ▶ if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testInt($text, 0, undef, 0, "#stay", "Decimal")) 0 0 0
245 0 return 1
246 }
247 # String => ''.''
248 # attribute => 'Char'
249 # context => '#stay'
250 # type => 'RegExpr'
251 0 ▶ if ($self->testRegExpr($text, '\'.\'', 0, 0, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "'.'", 0, 0, 0, undef, 0, "#stay", "Char")) 0 0 0
252 0 return 1
253 }
254 # attribute => 'String'
255 # char => '"'
256 # context => 'String'
257 # type => 'DetectChar'
258 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
259 0 return 1
260 }
261 # attribute => 'Comment'
262 # char => '-'
263 # char1 => '-'
264 # context => 'Comment'
265 # type => 'Detect2Chars'
266 0 ▶ if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "-", "-", 0, 0, 0, undef, 0, "Comment", "Comment")) 0 0 0
267 0 return 1
268 }
269 0 return 0;
270 };
271  
272 sub parseString {
273 0 ▶ my ($self, $text) = @_;
Subroutine parseString: not called CC=2 SCAR=17.9
Pod undocumented
274 # attribute => 'String'
275 # char => '"'
276 # context => '#pop'
277 # type => 'DetectChar'
278 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
279 0 return 1
280 }
281 0 return 0;
282 };
283  
284  
285 1 1;
286  
287 __END__
« Kate/Sieve.pm ↑ Summary Kate/E_Language.pm »