Kate/POVminusRay.pm

filter: Statementstmt 77.1% 101 / 131 Branchbran 68.7% 55 / 80 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 78.5% 11 / 14 Podpod 0.0% 0 / 11 totaltotal 69.7% 168 / 241 SCAR 43.2
CC
42
Cov
73%
parseNormal
25.9
parseString
20.0
parseCommentar
6.0
CRAP 75.3
« Kate/Matlab.pm ↑ Summary Kate/SML.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 'povray.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.04
9 #kate version 2.4
10 #generated: Sun Feb 3 22:02:06 2008, localtime
11  
12 package Syntax::Highlight::Engine::Kate::POVminusRay;
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 2 ▶ my $proto = shift;
Subroutine new: called CC=2 SCAR=6.9
Pod undocumented
22 2 ▶ my $class = ref($proto) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
020
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 2 my $self = $class->SUPER::new(@_);
24 2 $self->attributes({
25 'Char' => 'Char',
26 'Comment' => 'Comment',
27 'Constant' => 'Float',
28 'Declaration' => 'Operator',
29 'Declare Keyword' => 'Variable',
30 'Declare Macro' => 'DecVal',
31 'Directives' => 'Others',
32 'Filetype' => 'DataType',
33 'Float' => 'Float',
34 'Functions' => 'Function',
35 'Keyword' => 'Keyword',
36 'Macro' => 'Operator',
37 'Normal Text' => 'Normal',
38 'Objects' => 'Keyword',
39 'Region Marker' => 'RegionMarker',
40 'String' => 'String',
41 'String Char' => 'IString',
42 'Symbol' => 'BString',
43 'Texturing' => 'Keyword',
44 'Transforms' => 'Keyword',
45 });
46 2 $self->listAdd('attention',
47 '###',
48 'FIXME',
49 'TODO',
50 );
51 2 $self->listAdd('constants',
52 'false',
53 'no',
54 'off',
55 'on',
56 'pi',
57 'true',
58 'yes',
59 );
60 2 $self->listAdd('directives',
61 '#debug',
62 '#default',
63 '#else',
64 '#end',
65 '#error',
66 '#fclose',
67 '#fopen',
68 '#if',
69 '#ifdef',
70 '#ifndef',
71 '#include',
72 '#range',
73 '#read',
74 '#render',
75 '#statistics',
76 '#switch',
77 '#undef',
78 '#version',
79 '#warning',
80 '#while',
81 '#write',
82 );
83 2 $self->listAdd('filetypes',
84 'df3',
85 'gif',
86 'iff',
87 'jpeg',
88 'pgm',
89 'png',
90 'pot',
91 'ppm',
92 'tga',
93 'tiff',
94 'ttf',
95 );
96 2 $self->listAdd('functions',
97 'abs',
98 'acos',
99 'acosh',
100 'asc',
101 'asin',
102 'asinh',
103 'atan',
104 'atan2',
105 'atanh',
106 'ceil',
107 'chr',
108 'concat',
109 'cos',
110 'cosh',
111 'cube',
112 'defined',
113 'degress',
114 'dimension_size',
115 'dimensions',
116 'div',
117 'exp',
118 'file_exists',
119 'floor',
120 'inside',
121 'int',
122 'ln',
123 'log',
124 'max',
125 'min',
126 'mod',
127 'pow',
128 'prod',
129 'pwr',
130 'radians',
131 'rand',
132 'seed',
133 'select',
134 'sin',
135 'sinh',
136 'sqrt',
137 'str',
138 'strcmp',
139 'strlen',
140 'strlwr',
141 'strupr',
142 'substr',
143 'sum',
144 'tan',
145 'tanh',
146 'trace',
147 'val',
148 'vaxis_rotate',
149 'vcross',
150 'vdot',
151 'vlength',
152 'vnormalize',
153 'vrotate',
154 'vstr',
155 'vturbulence',
156 );
157 2 $self->listAdd('identifiers',
158 'clock',
159 'clock_delta',
160 'clock_on',
161 'final_clock',
162 'final_frame',
163 'frame_number',
164 'image_height',
165 'image_width',
166 'initial_clock',
167 'initial_frame',
168 't',
169 'u',
170 'v',
171 'x',
172 'y',
173 'z',
174 );
175 2 $self->listAdd('keywords',
176 'aa_level',
177 'aa_threshold',
178 'abs',
179 'absorption',
180 'accuracy',
181 'acos',
182 'acosh',
183 'adaptive',
184 'adc_bailout',
185 'agate',
186 'agate_turb',
187 'all',
188 'all_intersections',
189 'alpha',
190 'altitude',
191 'always_sample',
192 'ambient',
193 'ambient_light',
194 'angle',
195 'aperture',
196 'append',
197 'arc_angle',
198 'area_light',
199 'array',
200 'asc',
201 'ascii',
202 'asin',
203 'asinh',
204 'assumed_gamma',
205 'atan',
206 'atan2',
207 'atanh',
208 'autostop',
209 'average',
210 'b_spline',
211 'background',
212 'bezier_spline',
213 'bicubic_patch',
214 'black_hole',
215 'blob',
216 'blue',
217 'blur_samples',
218 'bounded_by',
219 'box',
220 'boxed',
221 'bozo',
222 'brick',
223 'brick_size',
224 'brightness',
225 'brilliance',
226 'bump_map',
227 'bump_size',
228 'bumps',
229 'camera',
230 'caustics',
231 'ceil',
232 'cells',
233 'charset',
234 'checker',
235 'chr',
236 'circular',
237 'clipped_by',
238 'clock',
239 'clock_delta',
240 'clock_on',
241 'collect',
242 'color',
243 'color_map',
244 'colour',
245 'colour_map',
246 'component',
247 'composite',
248 'concat',
249 'cone',
250 'confidence',
251 'conic_sweep',
252 'conserve_energy',
253 'contained_by',
254 'control0',
255 'control1',
256 'coords',
257 'cos',
258 'cosh',
259 'count',
260 'crackle',
261 'crand',
262 'cube',
263 'cubic',
264 'cubic_spline',
265 'cubic_wave',
266 'cutaway_textures',
267 'cylinder',
268 'cylindrical',
269 'defined',
270 'degrees',
271 'density',
272 'density_file',
273 'density_map',
274 'dents',
275 'df3',
276 'difference',
277 'diffuse',
278 'dimension_size',
279 'dimensions',
280 'direction',
281 'disc',
282 'dispersion',
283 'dispersion_samples',
284 'dist_exp',
285 'distance',
286 'distance_maximum',
287 'div',
288 'double_illuminate',
289 'eccentricity',
290 'emission',
291 'error_bound',
292 'evaluate',
293 'exp',
294 'expand_thresholds',
295 'exponent',
296 'exterior',
297 'extinction',
298 'face_indices',
299 'facets',
300 'fade_color',
301 'fade_colour',
302 'fade_distance',
303 'fade_power',
304 'falloff',
305 'falloff_angle',
306 'false',
307 'file_exists',
308 'filter',
309 'final_clock',
310 'final_frame',
311 'finish',
312 'fisheye',
313 'flatness',
314 'flip',
315 'floor',
316 'focal_point',
317 'fog',
318 'fog_alt',
319 'fog_offset',
320 'fog_type',
321 'form',
322 'frame_number',
323 'frequency',
324 'fresnel',
325 'function',
326 'gather',
327 'gif',
328 'global',
329 'global_lights',
330 'global_settings',
331 'gradient',
332 'granite',
333 'gray',
334 'gray_threshold',
335 'green',
336 'height_field',
337 'hexagon',
338 'hf_gray_16',
339 'hierarchy',
340 'hollow',
341 'hypercomplex',
342 'iff',
343 'image_height',
344 'image_map',
345 'image_pattern',
346 'image_width',
347 'initial_clock',
348 'initial_frame',
349 'inside',
350 'inside_vector',
351 'int',
352 'interior',
353 'interior_texture',
354 'internal',
355 'interpolate',
356 'intersection',
357 'intervals',
358 'inverse',
359 'ior',
360 'irid',
361 'irid_wavelength',
362 'isosurface',
363 'jitter',
364 'jpeg',
365 'julia',
366 'julia_fractal',
367 'lambda',
368 'lathe',
369 'leopard',
370 'light_group',
371 'light_source',
372 'linear_spline',
373 'linear_sweep',
374 'ln',
375 'load_file',
376 'location',
377 'log',
378 'look_at',
379 'looks_like',
380 'low_error_factor',
381 'magnet',
382 'major_radius',
383 'mandel',
384 'map_type',
385 'marble',
386 'material',
387 'material_map',
388 'matrix',
389 'max',
390 'max_extent',
391 'max_gradient',
392 'max_intersections',
393 'max_iteration',
394 'max_sample',
395 'max_trace',
396 'max_trace_level',
397 'media',
398 'media_attenuation',
399 'media_interaction',
400 'merge',
401 'mesh',
402 'mesh2',
403 'metallic',
404 'method',
405 'metric',
406 'min',
407 'min_extent',
408 'minimum_reuse',
409 'mod',
410 'mortar',
411 'natural_spline',
412 'nearest_count',
413 'no',
414 'no_bump_scale',
415 'no_image',
416 'no_reflection',
417 'no_shadow',
418 'noise_generator',
419 'normal',
420 'normal',
421 'normal_indices',
422 'normal_map',
423 'normal_vectors',
424 'number_of_waves',
425 'object',
426 'octaves',
427 'off',
428 'offset',
429 'omega',
430 'omnimax',
431 'on',
432 'once',
433 'onion',
434 'open',
435 'orient',
436 'orientation',
437 'orthographic',
438 'panoramic',
439 'parallel',
440 'parametric',
441 'pass_through',
442 'pattern',
443 'perspective',
444 'pgm',
445 'phase',
446 'phong',
447 'phong_size',
448 'photons',
449 'pi',
450 'pigment',
451 'pigment_map',
452 'pigment_pattern',
453 'planar',
454 'plane',
455 'png',
456 'point_at',
457 'poly',
458 'poly_wave',
459 'polygon',
460 'pot',
461 'pow',
462 'ppm',
463 'precision',
464 'precompute',
465 'pretrace_end',
466 'pretrace_start',
467 'prism',
468 'prod',
469 'projected_through',
470 'pwr',
471 'quadratic_spline',
472 'quadric',
473 'quartic',
474 'quaternion',
475 'quick_color',
476 'quick_colour',
477 'quilted',
478 'radial',
479 'radians',
480 'radiosity',
481 'radius',
482 'rainbow',
483 'ramp_wave',
484 'rand',
485 'range',
486 'ratio',
487 'reciprocal',
488 'recursion_limit',
489 'red',
490 'reflection',
491 'reflection_exponent',
492 'refraction',
493 'repeat',
494 'rgb',
495 'rgbf',
496 'rgbft',
497 'rgbt',
498 'right',
499 'ripples',
500 'rotate',
501 'roughness',
502 'samples',
503 'save_file',
504 'scale',
505 'scallop_wave',
506 'scattering',
507 'seed',
508 'select',
509 'shadowless',
510 'sin',
511 'sine_wave',
512 'sinh',
513 'size',
514 'sky',
515 'sky_sphere',
516 'slice',
517 'slope',
518 'slope_map',
519 'smooth',
520 'smooth_triangle',
521 'solid',
522 'sor',
523 'spacing',
524 'specular',
525 'sphere',
526 'sphere_sweep',
527 'spherical',
528 'spiral1',
529 'spiral2',
530 'spline',
531 'split_union',
532 'spotlight',
533 'spotted',
534 'sqr',
535 'sqrt',
536 'statistics',
537 'steps',
538 'str',
539 'strcmp',
540 'strength',
541 'strlen',
542 'strlwr',
543 'strupr',
544 'sturm',
545 'substr',
546 'sum',
547 'superellipsoid',
548 'sys',
549 't',
550 'tan',
551 'tanh',
552 'target',
553 'text',
554 'texture',
555 'texture_list',
556 'texture_map',
557 'tga',
558 'thickness',
559 'threshold',
560 'tiff',
561 'tightness',
562 'tile2',
563 'tiles',
564 'tolerance',
565 'toroidal',
566 'torus',
567 'trace',
568 'transform',
569 'translate',
570 'transmit',
571 'triangle',
572 'triangle_wave',
573 'true',
574 'ttf',
575 'turb_depth',
576 'turbulence',
577 'type',
578 'u',
579 'u_steps',
580 'ultra_wide_angle',
581 'union',
582 'up',
583 'use_alpha',
584 'use_color',
585 'use_colour',
586 'use_index',
587 'utf8',
588 'uv_indices',
589 'uv_mapping',
590 'uv_vectors',
591 'v',
592 'v_steps',
593 'val',
594 'variance',
595 'vaxis_rotate',
596 'vcross',
597 'vdot',
598 'vertex_vectors',
599 'vlength',
600 'vnormalize',
601 'vrotate',
602 'vstr',
603 'vturbulence',
604 'warning',
605 'warp',
606 'water_level',
607 'waves',
608 'while',
609 'width',
610 'wood',
611 'wrinkles',
612 'write',
613 'x',
614 'y',
615 'yes',
616 'z',
617 );
618 2 $self->listAdd('objects',
619 'bicubic_patch',
620 'blob',
621 'box',
622 'cone',
623 'cubic',
624 'cylinder',
625 'difference',
626 'disc',
627 'height_field',
628 'intersection',
629 'isosurface',
630 'julia_fractal',
631 'lathe',
632 'light_source',
633 'merge',
634 'mesh',
635 'mesh2',
636 'object',
637 'parametric',
638 'plane',
639 'poly',
640 'polygon',
641 'prism',
642 'quadric',
643 'quartic',
644 'smooth_triangle',
645 'sor',
646 'sphere',
647 'sphere_sweep',
648 'superellipsoid',
649 'text',
650 'torus',
651 'triangle',
652 'union',
653 );
654 2 $self->listAdd('texturing',
655 'aa_level',
656 'aa_threshold',
657 'absorption',
658 'agate',
659 'agate_turb',
660 'ambient',
661 'average',
662 'black_hole',
663 'blue',
664 'boxed',
665 'brick',
666 'brick_size',
667 'brilliance',
668 'bump_map',
669 'bump_size',
670 'bumps',
671 'caustics',
672 'cells',
673 'checker',
674 'color',
675 'color_map',
676 'colour',
677 'colour_map',
678 'conserve_energy',
679 'control0',
680 'control1',
681 'crackle',
682 'crand',
683 'cubic_wave',
684 'cutaway_textures',
685 'cylindrical',
686 'density',
687 'density_file',
688 'density_map',
689 'dents',
690 'diffuse',
691 'dist_exp',
692 'double_illuminate',
693 'eccentricity',
694 'emission',
695 'exponent',
696 'exterior',
697 'extinction',
698 'facets',
699 'fade_color',
700 'fade_colour',
701 'fade_distance',
702 'fade_power',
703 'filter',
704 'finish',
705 'form',
706 'frequency',
707 'fresnel',
708 'gradient',
709 'granite',
710 'gray',
711 'green',
712 'hexagon',
713 'hypercomplex',
714 'image_map',
715 'image_pattern',
716 'interior',
717 'interior_texture',
718 'interpolate',
719 'intervals',
720 'ior',
721 'irid',
722 'irid_wavelength',
723 'julia',
724 'lambda',
725 'leopard',
726 'magnet',
727 'mandel',
728 'map_type',
729 'marble',
730 'material',
731 'material_map',
732 'media',
733 'metallic',
734 'method',
735 'metric',
736 'mortar',
737 'no_bump_scale',
738 'normal',
739 'normal',
740 'normal_map',
741 'number_of_waves',
742 'octaves',
743 'omega',
744 'once',
745 'onion',
746 'orientation',
747 'phase',
748 'phong',
749 'phong_size',
750 'pigment',
751 'pigment_map',
752 'pigment_pattern',
753 'planar',
754 'quaternion',
755 'quick_color',
756 'quick_colour',
757 'quilted',
758 'radial',
759 'ramp_wave',
760 'red',
761 'reflection',
762 'reflection_exponent',
763 'repeat',
764 'rgb',
765 'rgbf',
766 'rgbft',
767 'rgbt',
768 'ripples',
769 'roughness',
770 'samples',
771 'scallop_wave',
772 'scattering',
773 'sine_wave',
774 'slope',
775 'slope_map',
776 'solid',
777 'specular',
778 'spherical',
779 'spiral1',
780 'spiral2',
781 'spotted',
782 'texture',
783 'texture_list',
784 'texture_map',
785 'tile2',
786 'tiles',
787 'toroidal',
788 'transmit',
789 'triangle_wave',
790 'turb_depth',
791 'turbulence',
792 'use_alpha',
793 'use_color',
794 'use_colour',
795 'use_index',
796 'uv_mapping',
797 'warp',
798 'waves',
799 'wood',
800 'wrinkles',
801 );
802 2 $self->listAdd('transforms',
803 'matrix',
804 'rotate',
805 'scale',
806 'transform',
807 'translate',
808 );
809 2 $self->contextdata({
810 'Commentar' => {
811 callback => \&parseCommentar,
812 attribute => 'Comment',
813 },
814 'Commentar 1' => {
815 callback => \&parseCommentar1,
816 attribute => 'Comment',
817 lineending => '#pop',
818 },
819 'Commentar 2' => {
820 callback => \&parseCommentar2,
821 attribute => 'Comment',
822 },
823 'Declaration' => {
824 callback => \&parseDeclaration,
825 attribute => 'Declaration',
826 lineending => '#pop',
827 },
828 'Declare_Keyword' => {
829 callback => \&parseDeclare_Keyword,
830 attribute => 'Declare Keyword',
831 lineending => '#pop',
832 },
833 'Declare_Macro' => {
834 callback => \&parseDeclare_Macro,
835 attribute => 'Declare Macro',
836 lineending => '#pop',
837 },
838 'Macro' => {
839 callback => \&parseMacro,
840 attribute => 'Macro',
841 lineending => '#pop',
842 },
843 'Normal' => {
844 callback => \&parseNormal,
845 attribute => 'Normal Text',
846 },
847 'String' => {
848 callback => \&parseString,
849 attribute => 'String',
850 lineending => '#pop',
851 },
852 });
853 2 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
854 2 $self->basecontext('Normal');
855 2 $self->keywordscase(0);
856 2 $self->initialize;
857 2 bless ($self, $class);
858 2 return $self;
859 }
860  
861 sub language {
862 0 ▶ return 'POV-Ray';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
863 }
864  
865 sub parseCommentar {
866 0 ▶ my ($self, $text) = @_;
Subroutine parseCommentar: not called CC=2 SCAR=17.9
Pod undocumented
867 # attribute => 'Comment'
868 # char => '*'
869 # char1 => '/'
870 # context => '#pop'
871 # type => 'Detect2Chars'
872 0 ▶ if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "*", "/", 0, 0, 0, undef, 0, "#pop", "Comment")) 0 0 0
873 0 return 1
874 }
875 0 return 0;
876 };
877  
878 sub parseCommentar1 {
879 276 ▶ my ($self, $text) = @_;
Subroutine parseCommentar1: called CC=2 SCAR=7.6
Pod undocumented
880 # String => 'attention'
881 # attribute => 'Decimal'
882 # context => '#stay'
883 # type => 'keyword'
884 276 ▶ if ($self->testKeyword($text, 'attention', 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "attention", 0, undef, 0, "#stay", "Decimal")) 0 276 276
885 0 return 1
886 }
887 276 return 0;
888 };
889  
890 sub parseCommentar2 {
891 72 ▶ my ($self, $text) = @_;
Subroutine parseCommentar2: called CC=3 SCAR=11.2
Pod undocumented
892 # String => 'attention'
893 # attribute => 'Decimal'
894 # context => '#stay'
895 # type => 'keyword'
896 72 ▶ if ($self->testKeyword($text, 'attention', 0, undef, 0, '#stay', 'Decimal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "attention", 0, undef, 0, "#stay", "Decimal")) 0 72 72
897 0 return 1
898 }
899 # attribute => 'Comment'
900 # char => '*'
901 # char1 => '/'
902 # context => '#pop'
903 # endRegion => 'Comment'
904 # type => 'Detect2Chars'
905 72 ▶ if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "*", "/", 0, 0, 0, undef, 0, "#pop", "Comment")) 4 68 72
906 4 return 1
907 }
908 68 return 0;
909 };
910  
911 sub parseDeclaration {
912 16 ▶ my ($self, $text) = @_;
Subroutine parseDeclaration: called CC=4 SCAR=14.8
Pod undocumented
913 # String => '\w+'
914 # attribute => 'Declare Keyword'
915 # context => 'Declare_Keyword'
916 # type => 'RegExpr'
917 16 ▶ if ($self->testRegExpr($text, '\\w+', 0, 0, 0, undef, 0, 'Declare_Keyword', 'Declare Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\w+", 0, 0, 0, undef, 0, "Declare_Keyword", "Declare Keyword")) 8 8 16
918 8 return 1
919 }
920 # attribute => 'Declaration'
921 # context => '#stay'
922 # type => 'LineContinue'
923 8 ▶ if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Declaration')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "#stay", "Declaration")) 0 8 8
924 0 return 1
925 }
926 # String => '=[('
927 # attribute => 'Symbol'
928 # context => '#pop#pop'
929 # type => 'AnyChar'
930 8 ▶ if ($self->testAnyChar($text, '=[(', 0, 0, undef, 0, '#pop#pop', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, "=[(", 0, 0, undef, 0, "#pop#pop", "Symbol")) 0 8 8
931 0 return 1
932 }
933 8 return 0;
934 };
935  
936 sub parseDeclare_Keyword {
937 8 ▶ my ($self, $text) = @_;
Subroutine parseDeclare_Keyword: called CC=3 SCAR=12.7
Pod undocumented
938 # attribute => 'Declare Keyword'
939 # context => '#stay'
940 # type => 'LineContinue'
941 8 ▶ if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Declare Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "#stay", "Declare Keyword")) 0 8 8
942 0 return 1
943 }
944 # String => '=[('
945 # attribute => 'Symbol'
946 # context => '#pop#pop'
947 # type => 'AnyChar'
948 8 ▶ if ($self->testAnyChar($text, '=[(', 0, 0, undef, 0, '#pop#pop', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, "=[(", 0, 0, undef, 0, "#pop#pop", "Symbol")) 8 0 8
949 8 return 1
950 }
951 0 return 0;
952 };
953  
954 sub parseDeclare_Macro {
955 2 ▶ my ($self, $text) = @_;
Subroutine parseDeclare_Macro: called CC=3 SCAR=12.7
Pod undocumented
956 # attribute => 'Declare Macro'
957 # context => '#stay'
958 # type => 'LineContinue'
959 2 ▶ if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Declare Macro')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "#stay", "Declare Macro")) 0 2 2
960 0 return 1
961 }
962 # attribute => 'Symbol'
963 # char => '('
964 # context => '#pop#pop'
965 # type => 'DetectChar'
966 2 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#pop#pop', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "#pop#pop", "Symbol")) 2 0 2
967 2 return 1
968 }
969 0 return 0;
970 };
971  
972 sub parseMacro {
973 4 ▶ my ($self, $text) = @_;
Subroutine parseMacro: called CC=4 SCAR=14.8
Pod undocumented
974 # String => '\w+'
975 # attribute => 'Declare Macro'
976 # context => 'Declare_Macro'
977 # type => 'RegExpr'
978 4 ▶ if ($self->testRegExpr($text, '\\w+', 0, 0, 0, undef, 0, 'Declare_Macro', 'Declare Macro')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\w+", 0, 0, 0, undef, 0, "Declare_Macro", "Declare Macro")) 2 2 4
979 2 return 1
980 }
981 # attribute => 'Macro'
982 # context => '#stay'
983 # type => 'LineContinue'
984 2 ▶ if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Macro')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testLineContinue($text, 0, undef, 0, "#stay", "Macro")) 0 2 2
985 0 return 1
986 }
987 # attribute => 'Symbol'
988 # char => '('
989 # context => '#pop#pop'
990 # type => 'DetectChar'
991 2 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#pop#pop', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "#pop#pop", "Symbol")) 0 2 2
992 0 return 1
993 }
994 2 return 0;
995 };
996  
997 sub parseNormal {
998 962 ▶ my ($self, $text) = @_;
Subroutine parseNormal: called CC=24 SCAR=32.5
Pod undocumented
999 # String => '#declare'
1000 # attribute => 'Declaration'
1001 # context => 'Declaration'
1002 # type => 'StringDetect'
1003 962 ▶ if ($self->testStringDetect($text, '#declare', 0, 0, 0, undef, 0, 'Declaration', 'Declaration')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "#declare", 0, 0, 0, undef, 0, "Declaration", "Declaration")) 2 960 962
1004 2 return 1
1005 }
1006 # String => '#local'
1007 # attribute => 'Declaration'
1008 # context => 'Declaration'
1009 # type => 'StringDetect'
1010 960 ▶ if ($self->testStringDetect($text, '#local', 0, 0, 0, undef, 0, 'Declaration', 'Declaration')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "#local", 0, 0, 0, undef, 0, "Declaration", "Declaration")) 6 954 960
1011 6 return 1
1012 }
1013 # String => '#macro'
1014 # attribute => 'Macro'
1015 # context => 'Macro'
1016 # type => 'StringDetect'
1017 954 ▶ if ($self->testStringDetect($text, '#macro', 0, 0, 0, undef, 0, 'Macro', 'Macro')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testStringDetect($text, "#macro", 0, 0, 0, undef, 0, "Macro", "Macro")) 2 952 954
1018 2 return 1
1019 }
1020 # String => 'objects'
1021 # attribute => 'Objects'
1022 # context => '#stay'
1023 # type => 'keyword'
1024 952 ▶ if ($self->testKeyword($text, 'objects', 0, undef, 0, '#stay', 'Objects')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "objects", 0, undef, 0, "#stay", "Objects")) 8 944 952
1025 8 return 1
1026 }
1027 # String => 'texturing'
1028 # attribute => 'Texturing'
1029 # context => '#stay'
1030 # type => 'keyword'
1031 944 ▶ if ($self->testKeyword($text, 'texturing', 0, undef, 0, '#stay', 'Texturing')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "texturing", 0, undef, 0, "#stay", "Texturing")) 46 898 944
1032 46 return 1
1033 }
1034 # String => 'transforms'
1035 # attribute => 'Transforms'
1036 # context => '#stay'
1037 # type => 'keyword'
1038 898 ▶ if ($self->testKeyword($text, 'transforms', 0, undef, 0, '#stay', 'Transforms')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "transforms", 0, undef, 0, "#stay", "Transforms")) 0 898 898
1039 0 return 1
1040 }
1041 # String => 'filetypes'
1042 # attribute => 'Filetype'
1043 # context => '#stay'
1044 # type => 'keyword'
1045 898 ▶ if ($self->testKeyword($text, 'filetypes', 0, undef, 0, '#stay', 'Filetype')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "filetypes", 0, undef, 0, "#stay", "Filetype")) 0 898 898
1046 0 return 1
1047 }
1048 # String => 'identifiers'
1049 # attribute => 'Keyword'
1050 # context => '#stay'
1051 # type => 'keyword'
1052 898 ▶ if ($self->testKeyword($text, 'identifiers', 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "identifiers", 0, undef, 0, "#stay", "Keyword")) 12 886 898
1053 12 return 1
1054 }
1055 # String => 'constants'
1056 # attribute => 'Constant'
1057 # context => '#stay'
1058 # type => 'keyword'
1059 886 ▶ if ($self->testKeyword($text, 'constants', 0, undef, 0, '#stay', 'Constant')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "constants", 0, undef, 0, "#stay", "Constant")) 0 886 886
1060 0 return 1
1061 }
1062 # String => 'functions'
1063 # attribute => 'Functions'
1064 # context => '#stay'
1065 # type => 'keyword'
1066 886 ▶ if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'Functions')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "functions", 0, undef, 0, "#stay", "Functions")) 16 870 886
1067 16 return 1
1068 }
1069 # String => 'directives'
1070 # attribute => 'Directives'
1071 # context => '#stay'
1072 # type => 'keyword'
1073 870 ▶ if ($self->testKeyword($text, 'directives', 0, undef, 0, '#stay', 'Directives')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "directives", 0, undef, 0, "#stay", "Directives")) 12 858 870
1074 12 return 1
1075 }
1076 # String => 'keywords'
1077 # attribute => 'Keyword'
1078 # context => '#stay'
1079 # type => 'keyword'
1080 858 ▶ if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "keywords", 0, undef, 0, "#stay", "Keyword")) 24 834 858
1081 24 return 1
1082 }
1083 # attribute => 'Float'
1084 # context => '#stay'
1085 # type => 'Float'
1086 834 ▶ if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testFloat($text, 0, undef, 0, "#stay", "Float")) 84 750 834
1087 84 return 1
1088 }
1089 # attribute => 'Float'
1090 # context => '#stay'
1091 # type => 'Int'
1092 750 ▶ if ($self->testInt($text, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testInt($text, 0, undef, 0, "#stay", "Float")) 4 746 750
1093 4 return 1
1094 }
1095 # attribute => 'Char'
1096 # context => '#stay'
1097 # type => 'HlCChar'
1098 746 ▶ if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCChar($text, 0, undef, 0, "#stay", "Char")) 0 746 746
1099 0 return 1
1100 }
1101 # attribute => 'String'
1102 # char => '"'
1103 # context => 'String'
1104 # type => 'DetectChar'
1105 746 ▶ 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 746 746
1106 0 return 1
1107 }
1108 # String => '//\s*BEGIN.*$'
1109 # attribute => 'Region Marker'
1110 # beginRegion => 'Region1'
1111 # context => '#stay'
1112 # firstNonSpace => 'true'
1113 # type => 'RegExpr'
1114 746 ▶ 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 746 746
1115 0 return 1
1116 }
1117 # String => '//\s*END.*$'
1118 # attribute => 'Region Marker'
1119 # context => '#stay'
1120 # endRegion => 'Region1'
1121 # firstNonSpace => 'true'
1122 # type => 'RegExpr'
1123 746 ▶ 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 746 746
1124 0 return 1
1125 }
1126 # attribute => 'Comment'
1127 # char => '/'
1128 # char1 => '/'
1129 # context => 'Commentar 1'
1130 # type => 'Detect2Chars'
1131 746 ▶ if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "/", 0, 0, 0, undef, 0, "Commentar 1", "Comment")) 10 736 746
1132 10 return 1
1133 }
1134 # attribute => 'Comment'
1135 # beginRegion => 'Comment'
1136 # char => '/'
1137 # char1 => '*'
1138 # context => 'Commentar 2'
1139 # type => 'Detect2Chars'
1140 736 ▶ if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "/", "*", 0, 0, 0, undef, 0, "Commentar 2", "Comment")) 4 732 736
1141 4 return 1
1142 }
1143 # attribute => 'Symbol'
1144 # beginRegion => 'Brace1'
1145 # char => '{'
1146 # context => '#stay'
1147 # type => 'DetectChar'
1148 732 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "#stay", "Symbol")) 26 706 732
1149 26 return 1
1150 }
1151 # attribute => 'Symbol'
1152 # char => '}'
1153 # context => '#stay'
1154 # endRegion => 'Brace1'
1155 # type => 'DetectChar'
1156 706 ▶ if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "}", 0, 0, 0, undef, 0, "#stay", "Symbol")) 26 680 706
1157 26 return 1
1158 }
1159 # String => ':!%&()+,-/.*<=>?[]{|}~^;'
1160 # attribute => 'Symbol'
1161 # context => '#stay'
1162 # type => 'AnyChar'
1163 680 ▶ if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]{|}~^;', 0, 0, undef, 0, '#stay', 'Symbol')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testAnyChar($text, ":!%&()+,-/.*<=>?[]{|}~^;", 0, 0, undef, 0, "#stay", "Symbol")) 152 528 680
1164 152 return 1
1165 }
1166 528 return 0;
1167 };
1168  
1169 sub parseString {
1170 0 ▶ my ($self, $text) = @_;
Subroutine parseString: not called CC=4 SCAR=30.0
Pod undocumented
1171 # attribute => 'String'
1172 # context => '#stay'
1173 # type => 'LineContinue'
1174 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
1175 0 return 1
1176 }
1177 # attribute => 'String Char'
1178 # context => '#stay'
1179 # type => 'HlCStringChar'
1180 0 ▶ if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testHlCStringChar($text, 0, undef, 0, "#stay", "String Char")) 0 0 0
1181 0 return 1
1182 }
1183 # attribute => 'String'
1184 # char => '"'
1185 # context => '#pop'
1186 # type => 'DetectChar'
1187 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
1188 0 return 1
1189 }
1190 0 return 0;
1191 };
1192  
1193  
1194 1 1;
1195  
1196 __END__
« Kate/Matlab.pm ↑ Summary Kate/SML.pm »