Kate/RSI_IDL.pm

filter: Statementstmt 33.7% 27 / 80 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 22.2% 32 / 144 SCAR 57.8
CC
25
Cov
22%
parseNormal
420.0
parsesystemvarcontext
30.0
new
2.0
CRAP 325.0
« Kate/Makefile.pm ↑ Summary Kate/Pascal.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 'rsiidl.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.1
10 #kate author Markus Fraenz (fraenz@linmpi.mpg.de)
11 #generated: Sun Feb 3 22:02:06 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::RSI_IDL;
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 'Char' => 'Char',
27 'Command' => 'BaseN',
28 'Comment' => 'Comment',
29 'Data Type' => 'DataType',
30 'Decimal' => 'DecVal',
31 'Float' => 'DecVal',
32 'Hex' => 'DecVal',
33 'IOCommand' => 'DataType',
34 'Keyword' => 'Keyword',
35 'Normal Text' => 'Normal',
36 'Octal' => 'DecVal',
37 'String' => 'String',
38 'String Char' => 'Char',
39 'bracketed' => 'Float',
40 });
41 1 $self->listAdd('commands',
42 'ABS',
43 'ACOS',
44 'ADAPT_HIST_EQUAL',
45 'ALOG',
46 'ALOG10',
47 'ARG_PRESENT',
48 'ASIN',
49 'ASSOC',
50 'ATAN',
51 'AXIS',
52 'BESELI',
53 'BESELJ',
54 'BESELY',
55 'BLAS_AXPY',
56 'BREAKPOINT',
57 'BROYDEN',
58 'BYTEORDER',
59 'CALL_EXTERNAL',
60 'CALL_FUNCTION',
61 'CALL_METHOD',
62 'CALL_PROCEDURE',
63 'CATCH',
64 'CEIL',
65 'CHECK_MATH',
66 'CHOLDC',
67 'CHOLSOL',
68 'COLOR_CONVERT',
69 'COLOR_QUAN',
70 'COMPILE_OPT',
71 'COMPUTE_MESH_NORMALS',
72 'CONJ',
73 'CONSTRAINED_MIN',
74 'CONTOUR',
75 'CONVERT_COORD',
76 'CONVOL',
77 'CORRELATE',
78 'COS',
79 'COSH',
80 'CREATE_STRUCT',
81 'CURSOR',
82 'DEFINE_KEY',
83 'DEFSYSV',
84 'DELVAR',
85 'DEVICE',
86 'DFPMIN',
87 'DIALOG_MESSAGE',
88 'DIALOG_PICKFILE',
89 'DIALOG_PRINTERSETUP',
90 'DIALOG_PRINTJOB',
91 'DILATE',
92 'DLM_LOAD',
93 'DRAW_ROI',
94 'ELMHES',
95 'EMPTY',
96 'ENABLE_SYSRTN',
97 'ERASE',
98 'ERODE',
99 'ERRORF',
100 'EXECUTE',
101 'EXIT',
102 'EXP',
103 'EXPAND_PATH',
104 'EXPINT',
105 'FINDFILE',
106 'FINITE',
107 'FLOOR',
108 'FORMAT_AXIS_VALUES',
109 'FORWARD_FUNCTION',
110 'FSTAT',
111 'FULSTR',
112 'FZ_ROOTS',
113 'GAUSSINT',
114 'GETENV',
115 'GET_KBRD',
116 'GRID3',
117 'GRID_TPS',
118 'HEAP_GC',
119 'HELP',
120 'HISTOGRAM',
121 'HQR',
122 'IMAGE_STATISTICS',
123 'IMAGINARY',
124 'INTERPOLATE',
125 'INVERT',
126 'ISHFT',
127 'ISOCONTOUR',
128 'ISOSURFACE',
129 'JOURNAL',
130 'KEYWORD_SET',
131 'LABEL_REGION',
132 'LINBCG',
133 'LINKIMAGE',
134 'LMGR',
135 'LNGAMMA',
136 'LNP_TEST',
137 'LOADCT',
138 'LOCALE_GET',
139 'LSODE',
140 'LUDC',
141 'LUMPROVE',
142 'LUSOL',
143 'MACHAR',
144 'MAKE_ARRAY',
145 'MAP_PROJ_INFO',
146 'MAX',
147 'MEDIAN',
148 'MESH_CLIP',
149 'MESH_DECIMATE',
150 'MESH_ISSOLID',
151 'MESH_MERGE',
152 'MESH_NUMTRIANGLES',
153 'MESH_SMOOTH',
154 'MESH_SURFACEAREA',
155 'MESH_VALIDATE',
156 'MESH_VOLUME',
157 'MESSAGE',
158 'MIN',
159 'NEWTON',
160 'N_ELEMENTS',
161 'N_PARAMS',
162 'N_TAGS',
163 'OBJ_CLASS',
164 'OBJ_DESTROY',
165 'OBJ_ISA',
166 'OBJ_NEW',
167 'OBJ_VALID',
168 'ON_ERROR',
169 'OPLOT',
170 'PARTICLE_TRACE',
171 'PLOT',
172 'PLOTS',
173 'POLYFILL',
174 'POLYFILLV',
175 'POLYSHADE',
176 'POLY_2D',
177 'POWELL',
178 'PROFILER',
179 'PTR_FREE',
180 'PTR_NEW',
181 'PTR_VALID',
182 'QROMB',
183 'QROMO',
184 'QSIMP',
185 'RANDOMN',
186 'RANDOMU',
187 'REBIN',
188 'REFORM',
189 'RETALL',
190 'RETURN',
191 'RIEMANN',
192 'RK4',
193 'ROBERTS',
194 'ROTATE',
195 'ROUND',
196 'SETENV',
197 'SET_PLOT',
198 'SET_SHADING',
199 'SHADE_SURF',
200 'SHADE_VOLUME',
201 'SHIFT',
202 'SIN',
203 'SINH',
204 'SIZE',
205 'SMOOTH',
206 'SOBEL',
207 'SORT',
208 'SPL_INIT',
209 'SPL_INTERP',
210 'SPRSAB',
211 'SPRSAX',
212 'SPRSIN',
213 'SQRT',
214 'STOP',
215 'STRCMP',
216 'STRCOMPRESS',
217 'STREGEX',
218 'STRJOIN',
219 'STRLEN',
220 'STRLOWCASE',
221 'STRMATCH',
222 'STRMESSAGE',
223 'STRMID',
224 'STRPOS',
225 'STRPUT',
226 'STRTRIM',
227 'STRUCT_ASSIGN',
228 'STRUCT_HIDE',
229 'STRUPCASE',
230 'SURFACE',
231 'SVDC',
232 'SVSOL',
233 'SYSTIME',
234 'TAG_NAMES',
235 'TAN',
236 'TANH',
237 'TEMPORARY',
238 'TETRA_CLIP',
239 'TETRA_SURFACE',
240 'TETRA_VOLUME',
241 'THIN',
242 'THREED',
243 'TOTAL',
244 'TRANSPOSE',
245 'TRIANGULATE',
246 'TRIGRID',
247 'TRIQL',
248 'TRIRED',
249 'TRISOL',
250 'TV',
251 'TVCRS',
252 'TVLCT',
253 'TVRD',
254 'TVSCLU',
255 'USERSYM',
256 'VALUE_LOCATE',
257 'VOIGT',
258 'VOXEL_PROJ',
259 'WAIT',
260 'WATERSHED',
261 'WDELETE',
262 'WHERE',
263 'WIDGET_BASE',
264 'WIDGET_BUTTON',
265 'WIDGET_CONTROL',
266 'WIDGET_DRAW',
267 'WIDGET_DROPLIST',
268 'WIDGET_EVENT',
269 'WIDGET_INFO',
270 'WIDGET_LABEL',
271 'WIDGET_LIST',
272 'WIDGET_SLIDER',
273 'WIDGET_TABLE',
274 'WIDGET_TEXT',
275 'WINDOW',
276 'WSET',
277 'WSHOW',
278 'WTN',
279 'XYOUTS',
280 );
281 1 $self->listAdd('io commands',
282 'Close',
283 'FLUSH',
284 'Free_lun',
285 'IOCTL',
286 'Open',
287 'Openr',
288 'Openu',
289 'Openw',
290 'POINT_LUN',
291 'RESTORE',
292 'SAVE',
293 'assoc',
294 'catch',
295 'cd',
296 'eof',
297 'get_lun',
298 'print',
299 'printf',
300 'prints',
301 'read',
302 'readf',
303 'reads',
304 'spawn',
305 'writu',
306 );
307 1 $self->listAdd('reserved words',
308 'And',
309 'Begin',
310 'Case',
311 'Common',
312 'Do',
313 'Else',
314 'End',
315 'Endcase',
316 'Endelse',
317 'Endfor',
318 'Endif',
319 'Endrep',
320 'Endwhile',
321 'Eq',
322 'For',
323 'Function',
324 'Ge',
325 'Goto',
326 'Gt',
327 'If',
328 'Le',
329 'Lt',
330 'Mod',
331 'Ne',
332 'Not',
333 'Of',
334 'On_ioerror',
335 'Or',
336 'Pro',
337 'Repeat',
338 'Return',
339 'Then',
340 'Then',
341 'Until',
342 'While',
343 'Xor',
344 );
345 1 $self->listAdd('system variables',
346 'c',
347 'd',
348 'dir',
349 'dlm_path',
350 'dpi',
351 'dtor',
352 'edit_input',
353 'err',
354 'err_string',
355 'error',
356 'error_state',
357 'except',
358 'help_path',
359 'journal',
360 'map',
361 'more',
362 'mouse',
363 'msg_prefix',
364 'order',
365 'p',
366 'path',
367 'pi',
368 'prompt',
369 'quiet',
370 'radeg',
371 'stime',
372 'syserr_string',
373 'syserror',
374 'values',
375 'version',
376 'warn',
377 'x',
378 'y',
379 'z',
380 );
381 1 $self->listAdd('types',
382 'Bytarr',
383 'Byte',
384 'Bytscl',
385 'Dblarr',
386 'Dcindgen',
387 'Dindgen',
388 'Double',
389 'Findgen',
390 'Fix',
391 'Float',
392 'Fltarr',
393 'Indgen',
394 'Intarr',
395 'Long',
396 'Long64',
397 'Objarr',
398 'Ptrarr',
399 'Replicate',
400 'Strarr',
401 'String',
402 'bindgen',
403 'cindgen',
404 'complex',
405 'complexarr',
406 'dcomplex',
407 'dcomplexarr',
408 'l64indgen',
409 'lindgen',
410 'lon64arr',
411 'lonarr',
412 'sindgen',
413 'uindgen',
414 'uint',
415 'uintarr',
416 'ul64indgen',
417 'ulindgen',
418 'ulon64arr',
419 'ulonarr',
420 'ulong',
421 );
422 1 $self->contextdata({
423 'Comment' => {
424 callback => \&parseComment,
425 attribute => 'Comment',
426 lineending => '#pop',
427 },
428 'Normal' => {
429 callback => \&parseNormal,
430 attribute => 'Normal Text',
431 },
432 'systemvarcontext' => {
433 callback => \&parsesystemvarcontext,
434 attribute => 'Char',
435 lineending => '#pop',
436 },
437 });
438 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
439 1 $self->basecontext('Normal');
440 1 $self->keywordscase(0);
441 1 $self->initialize;
442 1 bless ($self, $class);
443 1 return $self;
444 }
445  
446 sub language {
447 0 ▶ return 'RSI IDL';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
448 }
449  
450 sub parseComment {
451 0 ▶ my ($self, $text) = @_;
Subroutine parseComment: not called CC=1 SCAR=6.9
Pod undocumented
452 0 return 0;
453 };
454  
455 sub parseNormal {
456 0 ▶ my ($self, $text) = @_;
Subroutine parseNormal: not called CC=20 SCAR=60.4
Pod undocumented
457 # String => 'reserved words'
458 # attribute => 'Keyword'
459 # context => '#stay'
460 # type => 'keyword'
461 0 ▶ if ($self->testKeyword($text, 'reserved words', 0, undef, 0, '#stay', 'Keyword')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "reserved words", 0, undef, 0, "#stay", "Keyword")) 0 0 0
462 0 return 1
463 }
464 # String => 'types'
465 # attribute => 'Data Type'
466 # context => '#stay'
467 # type => 'keyword'
468 0 ▶ if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "types", 0, undef, 0, "#stay", "Data Type")) 0 0 0
469 0 return 1
470 }
471 # String => 'commands'
472 # attribute => 'Command'
473 # context => '#stay'
474 # type => 'keyword'
475 0 ▶ if ($self->testKeyword($text, 'commands', 0, undef, 0, '#stay', 'Command')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "commands", 0, undef, 0, "#stay", "Command")) 0 0 0
476 0 return 1
477 }
478 # String => 'io commands'
479 # attribute => 'IOCommand'
480 # context => '#stay'
481 # type => 'keyword'
482 0 ▶ if ($self->testKeyword($text, 'io commands', 0, undef, 0, '#stay', 'IOCommand')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "io commands", 0, undef, 0, "#stay", "IOCommand")) 0 0 0
483 0 return 1
484 }
485 # attribute => 'Octal'
486 # context => '#stay'
487 # type => 'Float'
488 0 ▶ if ($self->testFloat($text, 0, undef, 0, '#stay', 'Octal')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testFloat($text, 0, undef, 0, "#stay", "Octal")) 0 0 0
489 0 return 1
490 }
491 # attribute => 'Decimal'
492 # context => '#stay'
493 # type => 'Int'
494 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
495 0 return 1
496 }
497 # attribute => 'String'
498 # char => '''
499 # char1 => '''
500 # context => '#stay'
501 # type => 'RangeDetect'
502 0 ▶ if ($self->testRangeDetect($text, '\'', '\'', 0, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRangeDetect($text, "'", "'", 0, 0, undef, 0, "#stay", "String")) 0 0 0
503 0 return 1
504 }
505 # attribute => 'String'
506 # char => '"'
507 # char1 => '"'
508 # context => '#stay'
509 # type => 'RangeDetect'
510 0 ▶ if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'String')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRangeDetect($text, "\"", "\"", 0, 0, undef, 0, "#stay", "String")) 0 0 0
511 0 return 1
512 }
513 # attribute => 'Hex'
514 # char => '('
515 # context => '#stay'
516 # type => 'DetectChar'
517 0 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Hex')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "#stay", "Hex")) 0 0 0
518 0 return 1
519 }
520 # attribute => 'Hex'
521 # char => ')'
522 # context => '#stay'
523 # type => 'DetectChar'
524 0 ▶ if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#stay', 'Hex')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ")", 0, 0, 0, undef, 0, "#stay", "Hex")) 0 0 0
525 0 return 1
526 }
527 # attribute => 'Char'
528 # char => '['
529 # context => '#stay'
530 # type => 'DetectChar'
531 0 ▶ if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "[", 0, 0, 0, undef, 0, "#stay", "Char")) 0 0 0
532 0 return 1
533 }
534 # attribute => 'Char'
535 # char => ']'
536 # context => '#stay'
537 # type => 'DetectChar'
538 0 ▶ if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "]", 0, 0, 0, undef, 0, "#stay", "Char")) 0 0 0
539 0 return 1
540 }
541 # attribute => 'Float'
542 # char => '{'
543 # context => '#stay'
544 # type => 'DetectChar'
545 0 ▶ if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "{", 0, 0, 0, undef, 0, "#stay", "Float")) 0 0 0
546 0 return 1
547 }
548 # attribute => 'Float'
549 # char => '}'
550 # context => '#stay'
551 # type => 'DetectChar'
552 0 ▶ if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "}", 0, 0, 0, undef, 0, "#stay", "Float")) 0 0 0
553 0 return 1
554 }
555 # attribute => 'Char'
556 # char => '$'
557 # context => '#stay'
558 # type => 'DetectChar'
559 0 ▶ if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\$", 0, 0, 0, undef, 0, "#stay", "Char")) 0 0 0
560 0 return 1
561 }
562 # attribute => 'Char'
563 # char => '@'
564 # context => '#stay'
565 # type => 'DetectChar'
566 0 ▶ if ($self->testDetectChar($text, '@', 0, 0, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "\@", 0, 0, 0, undef, 0, "#stay", "Char")) 0 0 0
567 0 return 1
568 }
569 # attribute => 'Char'
570 # char => ':'
571 # context => '#stay'
572 # type => 'DetectChar'
573 0 ▶ if ($self->testDetectChar($text, ':', 0, 0, 0, undef, 0, '#stay', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ":", 0, 0, 0, undef, 0, "#stay", "Char")) 0 0 0
574 0 return 1
575 }
576 # attribute => 'Char'
577 # char => ';'
578 # context => 'Comment'
579 # type => 'DetectChar'
580 0 ▶ if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, 'Comment', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ";", 0, 0, 0, undef, 0, "Comment", "Char")) 0 0 0
581 0 return 1
582 }
583 # attribute => 'Char'
584 # char => '!'
585 # context => 'systemvarcontext'
586 # type => 'DetectChar'
587 0 ▶ if ($self->testDetectChar($text, '!', 0, 0, 0, undef, 0, 'systemvarcontext', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "!", 0, 0, 0, undef, 0, "systemvarcontext", "Char")) 0 0 0
588 0 return 1
589 }
590 0 return 0;
591 };
592  
593 sub parsesystemvarcontext {
594 0 ▶ my ($self, $text) = @_;
Subroutine parsesystemvarcontext: not called CC=5 SCAR=34.0
Pod undocumented
595 # attribute => 'Hex'
596 # char => '('
597 # context => '#pop'
598 # type => 'DetectChar'
599 0 ▶ if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#pop', 'Hex')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "(", 0, 0, 0, undef, 0, "#pop", "Hex")) 0 0 0
600 0 return 1
601 }
602 # attribute => 'Char'
603 # char => '.'
604 # context => '#pop'
605 # type => 'DetectChar'
606 0 ▶ if ($self->testDetectChar($text, '.', 0, 0, 0, undef, 0, '#pop', 'Char')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ".", 0, 0, 0, undef, 0, "#pop", "Char")) 0 0 0
607 0 return 1
608 }
609 # attribute => 'Hex'
610 # char => ' '
611 # context => '#pop'
612 # type => 'DetectChar'
613 0 ▶ if ($self->testDetectChar($text, ' ', 0, 0, 0, undef, 0, '#pop', 'Hex')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, " ", 0, 0, 0, undef, 0, "#pop", "Hex")) 0 0 0
614 0 return 1
615 }
616 # String => 'system variables'
617 # attribute => 'Float'
618 # context => '#pop'
619 # type => 'keyword'
620 0 ▶ if ($self->testKeyword($text, 'system variables', 0, undef, 0, '#pop', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "system variables", 0, undef, 0, "#pop", "Float")) 0 0 0
621 0 return 1
622 }
623 0 return 0;
624 };
625  
626  
627 1 1;
628  
629 __END__
« Kate/Makefile.pm ↑ Summary Kate/Pascal.pm »