| 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.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 | 2 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 23 | 2 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition33%1/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 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 | sub language { | ||||||||||||||||||||
| 157 | 0 | ▶ | return 'RenderMan RIB'; | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 158 | } | ||||||||||||||||||||
| 159 | |||||||||||||||||||||
| 160 | sub parseComment { | ||||||||||||||||||||
| 161 | 194 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseComment: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 162 | 194 | return 0; | |||||||||||||||||||
| 163 | }; | ||||||||||||||||||||
| 164 | |||||||||||||||||||||
| 165 | sub parseNormal { | ||||||||||||||||||||
| 166 | 2336 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseNormal: called CC=9 SCAR=22.1
Pod
undocumented
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 219 | 12 | return 1 | |||||||||||||||||||
| 220 | } | ||||||||||||||||||||
| 221 | 1276 | return 0; | |||||||||||||||||||
| 222 | }; | ||||||||||||||||||||
| 223 | |||||||||||||||||||||
| 224 | sub parseString { | ||||||||||||||||||||
| 225 | 318 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseString: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 231 | 44 | return 1 | |||||||||||||||||||
| 232 | } | ||||||||||||||||||||
| 233 | 274 | return 0; | |||||||||||||||||||
| 234 | }; | ||||||||||||||||||||
| 235 | |||||||||||||||||||||
| 236 | |||||||||||||||||||||
| 237 | 1 | 1; | |||||||||||||||||||
| 238 | |||||||||||||||||||||
| 239 | __END__ | ||||||||||||||||||||