Kate/CUE_Sheet.pm

filter: Statementstmt 50.9% 26 / 51 Branchbran 0.0% 0 / 18 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 4 / 8 Podpod 0.0% 0 / 5 totaltotal 35.6% 31 / 87 SCAR 37.0
CC
11
Cov
38%
parseNormal
72.0
parseString
12.0
new
2.0
CRAP 40.5
« Kate/Sather.pm ↑ Summary Kate/MABminusDB.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 'cue.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 0.91
9 #kate version 2.1
10 #generated: Sun Feb 3 22:02:04 2008, localtime
11  
12 package Syntax::Highlight::Engine::Kate::CUE_Sheet;
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 'Comment' => 'Comment',
26 'Decimal' => 'DecVal',
27 'Flags' => 'Reserved',
28 'Format' => 'Function',
29 'Keyword' => 'Keyword',
30 'Mode' => 'Operator',
31 'Normal Text' => 'Normal',
32 'String' => 'String',
33 });
34 1 $self->listAdd('flags',
35 '4CH',
36 'DCP',
37 'PRE',
38 'SCMS',
39 );
40 1 $self->listAdd('format',
41 'AIFF',
42 'BINARY',
43 'MOTOTOLA',
44 'MP3',
45 'WAVE',
46 );
47 1 $self->listAdd('keywords',
48 'CATALOG',
49 'CDTEXTFILE',
50 'FILE',
51 'FLAGS',
52 'INDEX',
53 'ISRC',
54 'PERFORMER',
55 'POSTGAP',
56 'PREGAP',
57 'REM',
58 'SONGWRITER',
59 'TITLE',
60 'TRACK',
61 );
62 1 $self->listAdd('mode',
63 'AUDIO',
64 'CDG',
65 'CDI',
66 'MODE1',
67 'MODE2',
68 'RAW',
69 );
70 1 $self->contextdata({
71 'Comment' => {
72 callback => \&parseComment,
73 attribute => 'Comment',
74 lineending => '#pop',
75 },
76 'Normal' => {
77 callback => \&parseNormal,
78 attribute => 'Normal Text',
79 },
80 'String' => {
81 callback => \&parseString,
82 attribute => 'String',
83 lineending => '#pop',
84 },
85 });
86 1 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
87 1 $self->basecontext('Normal');
88 1 $self->keywordscase(0);
89 1 $self->initialize;
90 1 bless ($self, $class);
91 1 return $self;
92 }
93  
94 sub language {
95 0 ▶ return 'CUE Sheet';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
96 }
97  
98 sub parseComment {
99 0 ▶ my ($self, $text) = @_;
Subroutine parseComment: not called CC=1 SCAR=6.9
Pod undocumented
100 0 return 0;
101 };
102  
103 sub parseNormal {
104 0 ▶ my ($self, $text) = @_;
Subroutine parseNormal: not called CC=8 SCAR=42.8
Pod undocumented
105 # String => 'keywords'
106 # attribute => 'Keyword'
107 # context => '#stay'
108 # type => 'keyword'
109 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
110 0 return 1
111 }
112 # String => 'format'
113 # attribute => 'Format'
114 # context => '#stay'
115 # type => 'keyword'
116 0 ▶ if ($self->testKeyword($text, 'format', 0, undef, 0, '#stay', 'Format')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "format", 0, undef, 0, "#stay", "Format")) 0 0 0
117 0 return 1
118 }
119 # String => 'mode'
120 # attribute => 'Mode'
121 # context => '#stay'
122 # type => 'keyword'
123 0 ▶ if ($self->testKeyword($text, 'mode', 0, undef, 0, '#stay', 'Mode')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "mode", 0, undef, 0, "#stay", "Mode")) 0 0 0
124 0 return 1
125 }
126 # String => 'flags'
127 # attribute => 'Flags'
128 # context => '#stay'
129 # type => 'keyword'
130 0 ▶ if ($self->testKeyword($text, 'flags', 0, undef, 0, '#stay', 'Flags')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "flags", 0, undef, 0, "#stay", "Flags")) 0 0 0
131 0 return 1
132 }
133 # attribute => 'Decimal'
134 # context => '#stay'
135 # type => 'Int'
136 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
137 0 return 1
138 }
139 # attribute => 'String'
140 # char => '"'
141 # context => 'String'
142 # type => 'DetectChar'
143 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
144 0 return 1
145 }
146 # attribute => 'Comment'
147 # char => ';'
148 # context => 'Comment'
149 # type => 'DetectChar'
150 0 ▶ if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, ";", 0, 0, 0, undef, 0, "Comment", "Comment")) 0 0 0
151 0 return 1
152 }
153 0 return 0;
154 };
155  
156 sub parseString {
157 0 ▶ my ($self, $text) = @_;
Subroutine parseString: not called CC=3 SCAR=24.8
Pod undocumented
158 # attribute => 'String'
159 # context => '#stay'
160 # type => 'LineContinue'
161 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
162 0 return 1
163 }
164 # attribute => 'String'
165 # char => '"'
166 # context => '#pop'
167 # type => 'DetectChar'
168 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
169 0 return 1
170 }
171 0 return 0;
172 };
173  
174  
175 1 1;
176  
177 __END__
« Kate/Sather.pm ↑ Summary Kate/MABminusDB.pm »