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 'eiffel.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #kate author Sebastian Vuorinen
11 #generated: Sun Feb 3 22:02:04 2008, localtime
13 package Syntax::Highlight::Engine::Kate::Eiffel;
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 'Assertions' => 'Others',
28 'Comment' => 'Comment',
29 'Decimal' => 'DecVal',
31 'Keyword' => 'Keyword',
32 'Normal Text' => 'Normal',
33 'Predefined entities' => 'Others',
36 $self->listAdd('assertions',
43 $self->listAdd('keywords',
92 $self->listAdd('predefined-entities',
102 callback => \&parseDocumentation,
103 attribute => 'Comment',
104 lineending => '#pop',
107 callback => \&parseNormal,
108 attribute => 'Normal Text',
111 callback => \&parseQuotedString,
112 attribute => 'String',
113 lineending => '#pop',
116 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
117 $self->basecontext('Normal');
118 $self->keywordscase(0);
120 bless ($self, $class);
128 sub parseDocumentation {
129 my ($self, $text) = @_;
134 my ($self, $text) = @_;
135 # String => 'keywords'
136 # attribute => 'Keyword'
139 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
142 # String => 'predefined-entities'
143 # attribute => 'Predefined entities'
146 if ($self->testKeyword($text, 'predefined-entities', 0, undef, 0, '#stay', 'Predefined entities')) {
149 # String => 'assertions'
150 # attribute => 'Assertions'
153 if ($self->testKeyword($text, 'assertions', 0, undef, 0, '#stay', 'Assertions')) {
156 # attribute => 'Decimal'
159 if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
162 # attribute => 'Float'
165 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
168 # attribute => 'Char'
171 if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) {
174 # attribute => 'String'
176 # context => 'Quoted String'
177 # type => 'DetectChar'
178 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Quoted String', 'String')) {
181 # attribute => 'Comment'
184 # context => 'Documentation'
185 # type => 'Detect2Chars'
186 if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'Documentation', 'Comment')) {
192 sub parseQuotedString {
193 my ($self, $text) = @_;
194 # attribute => 'String'
197 # type => 'DetectChar'
198 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
211 Syntax::Highlight::Engine::Kate::Eiffel - a Plugin for Eiffel syntax highlighting
215 require Syntax::Highlight::Engine::Kate::Eiffel;
216 my $sh = new Syntax::Highlight::Engine::Kate::Eiffel([
221 Syntax::Highlight::Engine::Kate::Eiffel is a plugin module that provides syntax highlighting
222 for Eiffel to the Syntax::Haghlight::Engine::Kate highlighting engine.
224 This code is generated from the syntax definition files used
226 It works quite fine, but can use refinement and optimization.
228 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
234 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
240 Unknown. If you find any, please contact the author