Kate/RenderMan_RIB.pm

filter: Statementstmt 94.1% 48 / 51 Branchbran 88.8% 16 / 18 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 87.5% 7 / 8 Podpod 0.0% 0 / 5 totaltotal 82.7% 72 / 87 CC 11 SCAR 16.8
CC
11
Cov
90%
parseNormal
9.1
new
2.0
language
2.0
CRAP 5.3
« Kate/M3U.pm ↑ Summary Kate/Yacc_Bison.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 'rib.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7  
8 #kate xml version 1.00
9 #kate version 2.3
10 #kate author David Williams <david@david-williams.info>
11 #generated: Sun Feb 3 22:02:06 2008, localtime
12  
13 package Syntax::Highlight::Engine::Kate::RenderMan_RIB;
14  
15 1 our $VERSION = '0.16';
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 2 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
22 2 my $proto = shift;
23 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
24 2 my $self = $class->SUPER::new(@_);
25 2 $self->attributes({
26 'Comment' => 'Comment',
27 'External Resource' => 'Keyword',
28 'Float' => 'Float',
29 'Geometric Primitive' => 'Keyword',
30 'Graphics State' => 'Keyword',
31 'Integer' => 'DecVal',
32 'Motion' => 'Keyword',
33 'Normal Text' => 'Normal',
34 'String' => 'String',
35 });
36 2 $self->listAdd('External Resources',
37 'ArchiveRecord',
38 'ErrorHandler',
39 'MakeBump',
40 'MakeCubeFaceEnvironment',
41 'MakeLatLongEnvironment',
42 'MakeTexture',
43 );
44 2 $self->listAdd('Geometric Primitives',
45 'Basis',
46 'Cylinder',
47 'Disk',
48 'GeneralPolygon',
49 'Geometry',
50 'Hyperboloid',
51 'NuPatch',
52 'ObjectBegin',
53 'ObjectEnd',
54 'ObjectInstance',
55 'Paraboloid',
56 'Patch',
57 'PointsGeneralPolygons',
58 'PointsPolygons',
59 'Polygon',
60 'Procedural',
61 'SolidBegin',
62 'SolidEnd',
63 'Sphere',
64 'Torus',
65 );
66 2 $self->listAdd('Graphics States',
67 'AreaLightSource',
68 'Attribute',
69 'AttributeBegin',
70 'AttributeEnd',
71 'Begin',
72 'Bound',
73 'Clipping',
74 'Color',
75 'ColorSamples',
76 'ConcatTransform',
77 'CoordinateSystem',
78 'CropWindow',
79 'Declare',
80 'DepthOfField',
81 'Detail',
82 'DetailRange',
83 'Displacement',
84 'Display',
85 'End',
86 'Exterior',
87 'Format',
88 'FrameAspectRatio',
89 'FrameBegin',
90 'FrameEnd',
91 'GeometricApproximation',
92 'Hider',
93 'Identity',
94 'Illuminance',
95 'Illuminate',
96 'Interior',
97 'LightSource',
98 'Matte',
99 'Opacity',
100 'Option',
101 'Orientation',
102 'Perspective',
103 'PixelFilter',
104 'PixelSamples',
105 'PixelVariance',
106 'Projection',
107 'Quantize',
108 'RelativeDetail',
109 'Rotate',
110 'Scale',
111 'ScreenWindow',
112 'ShadingInterpolation',
113 'ShadingRate',
114 'Shutter',
115 'Sides',
116 'Skew',
117 'Surface',
118 'TextureCoordinates',
119 'Transform',
120 'TransformBegin',
121 'TransformEnd',
122 'TransformPoints',
123 'Translate',
124 'WorldBegin',
125 'WorldEnd',
126 'version',
127 );
128 2 $self->listAdd('Motions',
129 'MotionBegin',
130 'MotionEnd',
131 );
132 2 $self->contextdata({
133 'Comment' => {
134 callback => \&parseComment,
135 attribute => 'Comment',
136 lineending => '#pop',
137 },
138 'Normal' => {
139 callback => \&parseNormal,
140 attribute => 'Normal Text',
141 },
142 'String' => {
143 callback => \&parseString,
144 attribute => 'String',
145 lineending => '#pop',
146 },
147 });
148 2 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
149 2 $self->basecontext('Normal');
150 2 $self->keywordscase(1);
151 2 $self->initialize;
152 2 bless ($self, $class);
153 2 return $self;
154 }
155  
156 0 ▶sub language {
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
157 0 return 'RenderMan RIB';
158 }
159  
160 194 ▶sub parseComment {
Subroutine parseComment: called CC=1 SCAR=0.0
Pod undocumented
161 194 my ($self, $text) = @_;
162 194 return 0;
163 };
164  
165 2336 ▶sub parseNormal {
Subroutine parseNormal: called CC=9 SCAR=22.1
Pod undocumented
166 2336 my ($self, $text) = @_;
167 # String => 'Graphics States'
168 # attribute => 'Graphics State'
169 # context => '#stay'
170 # type => 'keyword'
171 2336 ▶ if ($self->testKeyword($text, 'Graphics States', 0, undef, 0, '#stay', 'Graphics State')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "Graphics States", 0, undef, 0, "#stay", "Graphics State")) 70 2266 2336
172 70 return 1
173 }
174 # String => 'Geometric Primitives'
175 # attribute => 'Geometric Primitive'
176 # context => '#stay'
177 # type => 'keyword'
178 2266 ▶ if ($self->testKeyword($text, 'Geometric Primitives', 0, undef, 0, '#stay', 'Geometric Primitive')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "Geometric Primitives", 0, undef, 0, "#stay", "Geometric Primitive")) 16 2250 2266
179 16 return 1
180 }
181 # String => 'Motions'
182 # attribute => 'Motion'
183 # context => '#stay'
184 # type => 'keyword'
185 2250 ▶ if ($self->testKeyword($text, 'Motions', 0, undef, 0, '#stay', 'Motion')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "Motions", 0, undef, 0, "#stay", "Motion")) 0 2250 2250
186 0 return 1
187 }
188 # String => 'External Resources'
189 # attribute => 'External Resource'
190 # context => '#stay'
191 # type => 'keyword'
192 2250 ▶ if ($self->testKeyword($text, 'External Resources', 0, undef, 0, '#stay', 'External Resource')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testKeyword($text, "External Resources", 0, undef, 0, "#stay", "External Resource")) 0 2250 2250
193 0 return 1
194 }
195 # attribute => 'Float'
196 # context => '#stay'
197 # type => 'Float'
198 2250 ▶ if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testFloat($text, 0, undef, 0, "#stay", "Float")) 756 1494 2250
199 756 return 1
200 }
201 # attribute => 'Integer'
202 # context => '#stay'
203 # type => 'Int'
204 1494 ▶ if ($self->testInt($text, 0, undef, 0, '#stay', 'Integer')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testInt($text, 0, undef, 0, "#stay", "Integer")) 162 1332 1494
205 162 return 1
206 }
207 # attribute => 'String'
208 # char => '"'
209 # context => 'String'
210 # type => 'DetectChar'
211 1332 ▶ 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")) 44 1288 1332
212 44 return 1
213 }
214 # attribute => 'Comment'
215 # char => '#'
216 # context => 'Comment'
217 # type => 'DetectChar'
218 1288 ▶ 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")) 12 1276 1288
219 12 return 1
220 }
221 1276 return 0;
222 };
223  
224 318 ▶sub parseString {
Subroutine parseString: called CC=2 SCAR=6.9
Pod undocumented
225 318 my ($self, $text) = @_;
226 # attribute => 'String'
227 # char => '"'
228 # context => '#pop'
229 # type => 'DetectChar'
230 318 ▶ 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")) 44 274 318
231 44 return 1
232 }
233 274 return 0;
234 };
235  
236  
237 1 1;
238  
239 __END__
« Kate/M3U.pm ↑ Summary Kate/Yacc_Bison.pm »