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.
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
10 #kate author David Williams <david@david-williams.info>
11 #generated: Sun Feb 3 22:02:06 2008, localtime
13 package Syntax::Highlight::Engine::Kate::RenderMan_RIB;
15 our $VERSION = '0.06';
19 use base('Syntax::Highlight::Engine::Kate::Template');
23 my $class = ref($proto) || $proto;
24 my $self = $class->SUPER::new(@_);
26 'Comment' => 'Comment',
27 'External Resource' => 'Keyword',
29 'Geometric Primitive' => 'Keyword',
30 'Graphics State' => 'Keyword',
31 'Integer' => 'DecVal',
32 'Motion' => 'Keyword',
33 'Normal Text' => 'Normal',
36 $self->listAdd('External Resources',
40 'MakeCubeFaceEnvironment',
41 'MakeLatLongEnvironment',
44 $self->listAdd('Geometric Primitives',
57 'PointsGeneralPolygons',
66 $self->listAdd('Graphics States',
91 'GeometricApproximation',
112 'ShadingInterpolation',
118 'TextureCoordinates',
128 $self->listAdd('Motions',
134 callback => \&parseComment,
135 attribute => 'Comment',
136 lineending => '#pop',
139 callback => \&parseNormal,
140 attribute => 'Normal Text',
143 callback => \&parseString,
144 attribute => 'String',
145 lineending => '#pop',
148 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
149 $self->basecontext('Normal');
150 $self->keywordscase(1);
152 bless ($self, $class);
157 return 'RenderMan RIB';
161 my ($self, $text) = @_;
166 my ($self, $text) = @_;
167 # String => 'Graphics States'
168 # attribute => 'Graphics State'
171 if ($self->testKeyword($text, 'Graphics States', 0, undef, 0, '#stay', 'Graphics State')) {
174 # String => 'Geometric Primitives'
175 # attribute => 'Geometric Primitive'
178 if ($self->testKeyword($text, 'Geometric Primitives', 0, undef, 0, '#stay', 'Geometric Primitive')) {
181 # String => 'Motions'
182 # attribute => 'Motion'
185 if ($self->testKeyword($text, 'Motions', 0, undef, 0, '#stay', 'Motion')) {
188 # String => 'External Resources'
189 # attribute => 'External Resource'
192 if ($self->testKeyword($text, 'External Resources', 0, undef, 0, '#stay', 'External Resource')) {
195 # attribute => 'Float'
198 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
201 # attribute => 'Integer'
204 if ($self->testInt($text, 0, undef, 0, '#stay', 'Integer')) {
207 # attribute => 'String'
209 # context => 'String'
210 # type => 'DetectChar'
211 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
214 # attribute => 'Comment'
216 # context => 'Comment'
217 # type => 'DetectChar'
218 if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
225 my ($self, $text) = @_;
226 # attribute => 'String'
229 # type => 'DetectChar'
230 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
243 Syntax::Highlight::Engine::Kate::RenderMan_RIB - a Plugin for RenderMan RIB syntax highlighting
247 require Syntax::Highlight::Engine::Kate::RenderMan_RIB;
248 my $sh = new Syntax::Highlight::Engine::Kate::RenderMan_RIB([
253 Syntax::Highlight::Engine::Kate::RenderMan_RIB is a plugin module that provides syntax highlighting
254 for RenderMan RIB to the Syntax::Haghlight::Engine::Kate highlighting engine.
256 This code is generated from the syntax definition files used
258 It works quite fine, but can use refinement and optimization.
260 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
266 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
272 Unknown. If you find any, please contact the author