Kate/TI_Basic.pm

filter: Statementstmt 55.8% 24 / 43 Branchbran 0.0% 0 / 14 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 4 totaltotal 39.7% 29 / 73 CC 9 SCAR 33.2
CC
9
Cov
42%
parseNormal
56.0
parseString
6.0
new
2.0
CRAP 27.5
« Kate/UnrealScript.pm ↑ Summary Kate/Clipper.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 'tibasic.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.01
9 #kate version 2.3
10 #generated: Sun Feb 3 22:02:06 2008, localtime
11  
12 package Syntax::Highlight::Engine::Kate::TI_Basic;
13  
14 1 our $VERSION = '0.16';
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 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
21 1 my $proto = shift;
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 'Assignment' => 'Others',
26 'Keyword' => 'Keyword',
27 'Matrix' => 'Normal',
28 'Normal Text' => 'Normal',
29 'Special operators' => 'Normal',
30 'String' => 'String',
31 });
32 1 $self->listAdd('keywords',
33 'ClrHome',
34 'ClrTable',
35 'DS<',
36 'DelVar',
37 'Disp',
38 'DispGraph',
39 'DispTable',
40 'Else',
41 'End',
42 'For',
43 'Get',
44 'GetCalc',
45 'Goto',
46 'GraphStyle',
47 'IS>',
48 'If',
49 'Input',
50 'Lbl',
51 'Menu',
52 'Output',
53 'Pause',
54 'Prompt',
55 'Repeat',
56 'Return',
57 'Send',
58 'Then',
59 'While',
60 'getKey',
61 'prgm',
62 'prgm',
63 );
64 1 $self->listAdd('special_sym',
65 '%THETA',
66 'eogt',
67 'eolt',
68 'net',
69 'sqrt',
70 );
71 1 $self->contextdata({
72 'Normal' => {
73 callback => \&parseNormal,
74 attribute => 'Normal Text',
75 },
76 'String' => {
77 callback => \&parseString,
78 attribute => 'String',
79 },
80 });
81 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|=|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|\\%|<|>');
82 1 $self->basecontext('Normal');
83 1 $self->keywordscase(0);
84 1 $self->initialize;
85 1 bless ($self, $class);
86 1 return $self;
87 }
88  
89 0 ▶sub language {
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
90 0 return 'TI Basic';
91 }
92  
93 0 ▶sub parseNormal {
Subroutine parseNormal: not called CC=7 SCAR=40.3
Pod undocumented
94 0 my ($self, $text) = @_;
95 # String => 'keywords'
96 # attribute => 'Keyword'
97 # context => '#stay'
98 # type => 'keyword'
99 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
100 0 return 1
101 }
102 # String => 'special_sym'
103 # attribute => 'Special operators'
104 # context => '#stay'
105 # type => 'keyword'
106 0 ▶ if ($self->testKeyword($text, 'special_sym', 0, undef, 0, '#stay', 'Special operators')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "special_sym", 0, undef, 0, "#stay", "Special operators")) 0 0 0
107 0 return 1
108 }
109 # attribute => 'Assignment'
110 # char => '-'
111 # char1 => '>'
112 # context => '#stay'
113 # type => 'Detect2Chars'
114 0 ▶ if ($self->testDetect2Chars($text, '-', '>', 0, 0, 0, undef, 0, '#stay', 'Assignment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "-", ">", 0, 0, 0, undef, 0, "#stay", "Assignment")) 0 0 0
115 0 return 1
116 }
117 # attribute => 'Assignment'
118 # char => 's'
119 # char1 => 't'
120 # context => '#stay'
121 # type => 'Detect2Chars'
122 0 ▶ if ($self->testDetect2Chars($text, 's', 't', 0, 0, 0, undef, 0, '#stay', 'Assignment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetect2Chars($text, "s", "t", 0, 0, 0, undef, 0, "#stay", "Assignment")) 0 0 0
123 0 return 1
124 }
125 # String => '\[\w\]'
126 # attribute => 'Matrix'
127 # context => '#stay'
128 # type => 'RegExpr'
129 0 ▶ if ($self->testRegExpr($text, '\\[\\w\\]', 0, 0, 0, undef, 0, '#stay', 'Matrix')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\[\\w\\]", 0, 0, 0, undef, 0, "#stay", "Matrix")) 0 0 0
130 0 return 1
131 }
132 # attribute => 'String'
133 # char => '"'
134 # context => 'String'
135 # type => 'DetectChar'
136 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
137 0 return 1
138 }
139 0 return 0;
140 };
141  
142 0 ▶sub parseString {
Subroutine parseString: not called CC=2 SCAR=17.9
Pod undocumented
143 0 my ($self, $text) = @_;
144 # attribute => 'String'
145 # char => '"'
146 # context => '#pop'
147 # type => 'DetectChar'
148 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
149 0 return 1
150 }
151 0 return 0;
152 };
153  
154  
155 1 1;
156  
157 __END__
« Kate/UnrealScript.pm ↑ Summary Kate/Clipper.pm »