Kate/Euphoria.pm

filter: Statementstmt 32.9% 26 / 79 Branchbran 0.0% 0 / 46 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 4 / 8 Podpod 0.0% 0 / 5 totaltotal 21.6% 31 / 143 SCAR 58.1
CC
25
Cov
21%
parseNormal
506.0
parseComment
6.0
parseString
6.0
CRAP 332.1
« Kate/Apache_Configuration.pm ↑ Summary Kate/Makefile.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 'euphoria.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 2.08
9 #kate version 2.4
10 #kate author Irv Mullins (irvm@ellijay.com)
11 #generated: Sun Feb 3 22:02:04 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::Euphoria;
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 'Comment' => 'Comment',
27 'Directive' => 'Others',
28 'GtkKeyword' => 'Keyword',
29 'Keyword' => 'Keyword',
30 'Normal Text' => 'Normal',
31 'Number' => 'DecVal',
32 'Region Marker' => 'RegionMarker',
33 'String' => 'String',
34 'Type' => 'DataType',
35 });
36 1 $self->listAdd('GtkKeywords',
37 'Error',
38 'FALSE',
39 'Info',
40 'NULL',
41 'Question',
42 'TRUE',
43 'Warn',
44 'YesNo',
45 'addto',
46 'adjustment',
47 'alignment',
48 'append_page',
49 'appendto',
50 'arrow',
51 'aspect_frame',
52 'button',
53 'calendar',
54 'cell_renderer_text',
55 'cell_renderer_toggle',
56 'check',
57 'check_menu_item',
58 'checkbutton',
59 'choice',
60 'color_selection',
61 'combo',
62 'connect',
63 'deallocate_strings',
64 'draw_arc',
65 'draw_image',
66 'draw_line',
67 'draw_line',
68 'draw_point',
69 'draw_polygon',
70 'draw_rectangle',
71 'drawingarea',
72 'end_submenu',
73 'entry',
74 'euget',
75 'event_box',
76 'file_selection',
77 'flatten',
78 'font',
79 'font_selection_dialog',
80 'frame',
81 'g_list',
82 'g_list_to_sequence',
83 'get',
84 'getImage',
85 'getSize',
86 'hbox',
87 'hbuttonbox',
88 'hpaned',
89 'hscale',
90 'hscrollbar',
91 'hseparator',
92 'idle_add',
93 'image',
94 'image_menu_item',
95 'init',
96 'label',
97 'limit',
98 'list_store',
99 'list_view',
100 'list_view_column',
101 'main',
102 'mark_day',
103 'menu',
104 'menu_item',
105 'menubar',
106 'mouse_button',
107 'new_gc',
108 'new_group',
109 'new_menu_group',
110 'notebook',
111 'option',
112 'option_menu',
113 'pack',
114 'path',
115 'pop',
116 'progress_bar',
117 'push',
118 'quit',
119 'radio',
120 'radio_menu_item',
121 'radiobutton',
122 'rc_parse',
123 'run',
124 'scrolled_window',
125 'separator_menu_item',
126 'seq_to_str',
127 'set',
128 'setProperty',
129 'set_submenu',
130 'setfg',
131 'show',
132 'spinbutton',
133 'statusbar',
134 'str',
135 'table',
136 'textbox',
137 'timer',
138 'togglebutton',
139 'toolbar',
140 'tooltip',
141 'tree_store',
142 'tree_view',
143 'tree_view_column',
144 'vbox',
145 'vbuttonbox',
146 'vpaned',
147 'vscale',
148 'vscrollbar',
149 'vseparator',
150 'when',
151 'window',
152 );
153 1 $self->listAdd('constants',
154 'GET_SUCCESS',
155 'PI',
156 );
157 1 $self->listAdd('keywords',
158 '?',
159 'abort',
160 'allocate',
161 'allocate_string',
162 'allow_break',
163 'and',
164 'and_bits',
165 'append',
166 'arccos',
167 'arcsin',
168 'arctan',
169 'as',
170 'atom_to_float32',
171 'atom_to_float64',
172 'begin',
173 'bits_to_int',
174 'bytes_to_int',
175 'c_func',
176 'c_proc',
177 'call',
178 'call_back',
179 'call_func',
180 'call_proc',
181 'chdir',
182 'check_break',
183 'clear_screen',
184 'close',
185 'command_line',
186 'compare',
187 'cos',
188 'crash_file',
189 'crash_message',
190 'current_dir',
191 'custom_sort',
192 'date',
193 'define_c_func',
194 'define_c_proc',
195 'define_c_var',
196 'dir',
197 'display_text_image',
198 'do',
199 'else',
200 'elsif',
201 'end',
202 'equal',
203 'exit',
204 'find',
205 'float32_to_atom',
206 'float64_to_atom',
207 'floor',
208 'flush',
209 'for',
210 'free',
211 'free_console',
212 'function',
213 'get_bytes',
214 'get_key',
215 'get_mouse',
216 'get_position',
217 'get_screen_char',
218 'getc',
219 'getenv',
220 'gets',
221 'if',
222 'include',
223 'int_to_bits',
224 'int_to_bytes',
225 'length',
226 'lock_file',
227 'log',
228 'lower',
229 'machine_func',
230 'machine_proc',
231 'match',
232 'mem_copy',
233 'mem_set',
234 'mouse_events',
235 'mouse_pointer',
236 'not',
237 'not_bits',
238 'of',
239 'open',
240 'open_dll',
241 'or',
242 'or_bits',
243 'peek',
244 'peek4',
245 'peek4s',
246 'peek4u',
247 'platform',
248 'poke',
249 'poke4',
250 'position',
251 'power',
252 'prepend',
253 'print',
254 'printf',
255 'procedure',
256 'profile',
257 'prompt_number',
258 'prompt_string',
259 'put_screen_char',
260 'puts',
261 'rand',
262 'read_bitmap',
263 'register_block',
264 'remainder',
265 'repeat',
266 'return',
267 'reverse',
268 'routine_id',
269 'save_bitmap',
270 'save_text_image',
271 'scroll',
272 'seek',
273 'set_rand',
274 'sin',
275 'sleep',
276 'sort',
277 'sprint',
278 'sprintf',
279 'sqrt',
280 'system',
281 'system_exec',
282 'tan',
283 'text_color',
284 'then',
285 'time',
286 'to',
287 'trace',
288 'type',
289 'unlock_file',
290 'unregister_block',
291 'upper',
292 'value',
293 'video_config',
294 'wait_key',
295 'walk_dir',
296 'where',
297 'while',
298 'wildcard_file',
299 'wildcard_match',
300 'with',
301 'without',
302 'wrap',
303 'xor',
304 'xor_bits',
305 );
306 1 $self->listAdd('types',
307 'atom',
308 'constant',
309 'global',
310 'integer',
311 'object',
312 'sequence',
313 'type',
314 );
315 1 $self->contextdata({
316 'Comment' => {
317 callback => \&parseComment,
318 attribute => 'Comment',
319 lineending => '#pop',
320 },
321 'Normal' => {
322 callback => \&parseNormal,
323 attribute => 'Normal Text',
324 },
325 'String' => {
326 callback => \&parseString,
327 attribute => 'String',
328 lineending => '#pop',
329 },
330 });
331 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
332 1 $self->basecontext('Normal');
333 1 $self->keywordscase(0);
334 1 $self->initialize;
335 1 bless ($self, $class);
336 1 return $self;
337 }
338  
339 sub language {
340 0 ▶ return 'Euphoria';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
341 }
342  
343 sub parseComment {
344 0 ▶ my ($self, $text) = @_;
Subroutine parseComment: not called CC=2 SCAR=17.9
Pod undocumented
345 # context => '##Alerts'
346 # type => 'IncludeRules'
347 0 ▶ if ($self->includePlugin('Alerts', $text)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->includePlugin("Alerts", $text)) 0 0 0
348 0 return 1
349 }
350 0 return 0;
351 };
352  
353 sub parseNormal {
354 0 ▶ my ($self, $text) = @_;
Subroutine parseNormal: not called CC=22 SCAR=62.3
Pod undocumented
355 # String => '\bend\s+for\b'
356 # attribute => 'Keyword'
357 # context => '#stay'
358 # endRegion => 'regFor'
359 # type => 'RegExpr'
360 0 ▶ if ($self->testRegExpr($text, '\\bend\\s+for\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\bend\\s+for\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
361 0 return 1
362 }
363 # String => '\bfor\b'
364 # attribute => 'Keyword'
365 # beginRegion => 'regFor'
366 # context => '#stay'
367 # type => 'RegExpr'
368 0 ▶ if ($self->testRegExpr($text, '\\bfor\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\bfor\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
369 0 return 1
370 }
371 # String => '\bend\s+if\b'
372 # attribute => 'Keyword'
373 # context => '#stay'
374 # endRegion => 'regIf'
375 # type => 'RegExpr'
376 0 ▶ if ($self->testRegExpr($text, '\\bend\\s+if\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\bend\\s+if\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
377 0 return 1
378 }
379 # String => '\bif\b'
380 # attribute => 'Keyword'
381 # beginRegion => 'regIf'
382 # context => '#stay'
383 # type => 'RegExpr'
384 0 ▶ if ($self->testRegExpr($text, '\\bif\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\bif\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
385 0 return 1
386 }
387 # String => '\bend\s+function\b'
388 # attribute => 'Keyword'
389 # context => '#stay'
390 # endRegion => 'regFunction'
391 # type => 'RegExpr'
392 0 ▶ if ($self->testRegExpr($text, '\\bend\\s+function\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\bend\\s+function\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
393 0 return 1
394 }
395 # String => '\bfunction\b'
396 # attribute => 'Keyword'
397 # beginRegion => 'regFunction'
398 # context => '#stay'
399 # type => 'RegExpr'
400 0 ▶ if ($self->testRegExpr($text, '\\bfunction\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\bfunction\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
401 0 return 1
402 }
403 # String => '\bend\s+procedure\b'
404 # attribute => 'Keyword'
405 # context => '#stay'
406 # endRegion => 'regProcedure'
407 # type => 'RegExpr'
408 0 ▶ if ($self->testRegExpr($text, '\\bend\\s+procedure\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\bend\\s+procedure\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
409 0 return 1
410 }
411 # String => '\bprocedure\b'
412 # attribute => 'Keyword'
413 # beginRegion => 'regProcedure'
414 # context => '#stay'
415 # type => 'RegExpr'
416 0 ▶ if ($self->testRegExpr($text, '\\bprocedure\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\bprocedure\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
417 0 return 1
418 }
419 # String => '\bend\s+while\b'
420 # attribute => 'Keyword'
421 # context => '#stay'
422 # endRegion => 'regWhile'
423 # type => 'RegExpr'
424 0 ▶ if ($self->testRegExpr($text, '\\bend\\s+while\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\bend\\s+while\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
425 0 return 1
426 }
427 # String => '\bwhile\b'
428 # attribute => 'Keyword'
429 # beginRegion => 'regWhile'
430 # context => '#stay'
431 # type => 'RegExpr'
432 0 ▶ if ($self->testRegExpr($text, '\\bwhile\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\bwhile\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
433 0 return 1
434 }
435 # String => '\bend\s+type\b'
436 # attribute => 'Keyword'
437 # context => '#stay'
438 # endRegion => 'regType'
439 # type => 'RegExpr'
440 0 ▶ if ($self->testRegExpr($text, '\\bend\\s+type\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\bend\\s+type\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
441 0 return 1
442 }
443 # String => '\btype\b'
444 # attribute => 'Keyword'
445 # beginRegion => 'regType'
446 # context => '#stay'
447 # type => 'RegExpr'
448 0 ▶ if ($self->testRegExpr($text, '\\btype\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\btype\\b", 0, 0, 0, undef, 0, "#stay", "Keyword")) 0 0 0
449 0 return 1
450 }
451 # String => 'keywords'
452 # attribute => 'Keyword'
453 # context => '#stay'
454 # type => 'keyword'
455 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
456 0 return 1
457 }
458 # String => 'GtkKeywords'
459 # attribute => 'GtkKeyword'
460 # context => '#stay'
461 # type => 'keyword'
462 0 ▶ if ($self->testKeyword($text, 'GtkKeywords', 0, undef, 0, '#stay', 'GtkKeyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "GtkKeywords", 0, undef, 0, "#stay", "GtkKeyword")) 0 0 0
463 0 return 1
464 }
465 # String => 'types'
466 # attribute => 'Type'
467 # context => '#stay'
468 # type => 'keyword'
469 0 ▶ if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Type')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "types", 0, undef, 0, "#stay", "Type")) 0 0 0
470 0 return 1
471 }
472 # attribute => 'Number'
473 # context => '#stay'
474 # type => 'Float'
475 0 ▶ if ($self->testFloat($text, 0, undef, 0, '#stay', 'Number')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testFloat($text, 0, undef, 0, "#stay", "Number")) 0 0 0
476 0 return 1
477 }
478 # attribute => 'Number'
479 # context => '#stay'
480 # type => 'Int'
481 0 ▶ if ($self->testInt($text, 0, undef, 0, '#stay', 'Number')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testInt($text, 0, undef, 0, "#stay", "Number")) 0 0 0
482 0 return 1
483 }
484 # attribute => 'String'
485 # char => '"'
486 # context => 'String'
487 # type => 'DetectChar'
488 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
489 0 return 1
490 }
491 # String => '--\s*BEGIN.*'
492 # attribute => 'Region Marker'
493 # beginRegion => 'regMarker'
494 # context => '#stay'
495 # firstNonSpace => 'true'
496 # type => 'RegExpr'
497 0 ▶ if ($self->testRegExpr($text, '--\\s*BEGIN.*', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "--\\s*BEGIN.*", 0, 0, 0, undef, 1, "#stay", "Region Marker")) 0 0 0
498 0 return 1
499 }
500 # String => '--\s*END.*'
501 # attribute => 'Region Marker'
502 # context => '#stay'
503 # endRegion => 'regMarker'
504 # firstNonSpace => 'true'
505 # type => 'RegExpr'
506 0 ▶ if ($self->testRegExpr($text, '--\\s*END.*', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "--\\s*END.*", 0, 0, 0, undef, 1, "#stay", "Region Marker")) 0 0 0
507 0 return 1
508 }
509 # attribute => 'Comment'
510 # char => '-'
511 # char1 => '-'
512 # context => 'Comment'
513 # type => 'Detect2Chars'
514 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
515 0 return 1
516 }
517 0 return 0;
518 };
519  
520 sub parseString {
521 0 ▶ my ($self, $text) = @_;
Subroutine parseString: not called CC=2 SCAR=17.9
Pod undocumented
522 # attribute => 'String'
523 # char => '"'
524 # context => '#pop'
525 # type => 'DetectChar'
526 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
527 0 return 1
528 }
529 0 return 0;
530 };
531  
532  
533 1 1;
534  
535 __END__
« Kate/Apache_Configuration.pm ↑ Summary Kate/Makefile.pm »