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 'sather.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #generated: Sun Feb 3 22:02:06 2008, localtime
12 package Syntax::Highlight::Engine::Kate::Sather;
14 our $VERSION = '0.06';
18 use base('Syntax::Highlight::Engine::Kate::Template');
22 my $class = ref($proto) || $proto;
23 my $self = $class->SUPER::new(@_);
26 'Comment' => 'Comment',
27 'Data Type' => 'DataType',
28 'Decimal' => 'DecVal',
29 'Features' => 'Others',
31 'Keyword' => 'Keyword',
32 'Normal Text' => 'Normal',
35 $self->listAdd('features',
56 $self->listAdd('keywords',
118 $self->listAdd('types',
139 callback => \&parseComment,
140 attribute => 'Comment',
141 lineending => '#pop',
144 callback => \&parseNormal,
145 attribute => 'Normal Text',
148 callback => \&parseString,
149 attribute => 'String',
152 $self->deliminators('\\s||\\.|\\(|\\)|:|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|\\$|\\!');
153 $self->basecontext('Normal');
154 $self->keywordscase(0);
156 bless ($self, $class);
165 my ($self, $text) = @_;
170 my ($self, $text) = @_;
171 # String => 'keywords'
172 # attribute => 'Keyword'
175 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
179 # attribute => 'Data Type'
182 if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) {
185 # String => 'features'
186 # attribute => 'Features'
189 if ($self->testKeyword($text, 'features', 0, undef, 0, '#stay', 'Features')) {
192 # attribute => 'Float'
195 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
198 # attribute => 'Decimal'
201 if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
205 # attribute => 'Char'
208 if ($self->testRegExpr($text, '\'.\'', 0, 0, 0, undef, 0, '#stay', 'Char')) {
211 # attribute => 'String'
213 # context => 'String'
214 # type => 'DetectChar'
215 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
218 # attribute => 'Comment'
221 # context => 'Comment'
222 # type => 'Detect2Chars'
223 if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
230 my ($self, $text) = @_;
231 # attribute => 'String'
234 # type => 'DetectChar'
235 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
248 Syntax::Highlight::Engine::Kate::Sather - a Plugin for Sather syntax highlighting
252 require Syntax::Highlight::Engine::Kate::Sather;
253 my $sh = new Syntax::Highlight::Engine::Kate::Sather([
258 Syntax::Highlight::Engine::Kate::Sather is a plugin module that provides syntax highlighting
259 for Sather to the Syntax::Haghlight::Engine::Kate highlighting engine.
261 This code is generated from the syntax definition files used
263 It works quite fine, but can use refinement and optimization.
265 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
271 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
277 Unknown. If you find any, please contact the author