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 'ada.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:04 2008, localtime
12 package Syntax::Highlight::Engine::Kate::Ada;
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(@_);
27 'Comment' => 'Comment',
28 'Decimal' => 'DecVal',
30 'Keyword' => 'Keyword',
31 'Normal Text' => 'Normal',
34 $self->listAdd('keywords',
103 callback => \&parseComment,
104 attribute => 'Comment',
105 lineending => '#pop',
108 callback => \&parseDefault,
109 attribute => 'Normal Text',
112 callback => \&parseString,
113 attribute => 'String',
114 lineending => '#pop',
117 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
118 $self->basecontext('Default');
119 $self->keywordscase(0);
121 bless ($self, $class);
130 my ($self, $text) = @_;
135 my ($self, $text) = @_;
137 # attribute => 'Keyword'
138 # beginRegion => 'Region1'
140 # firstNonSpace => 'true'
141 # insensitive => 'TRUE'
143 if ($self->testRegExpr($text, 'if ', 1, 0, 0, undef, 1, '#stay', 'Keyword')) {
147 # attribute => 'Keyword'
149 # endRegion => 'Region1'
150 # insensitive => 'TRUE'
151 # type => 'StringDetect'
152 if ($self->testStringDetect($text, 'end if', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
156 # attribute => 'Keyword'
157 # beginRegion => 'Region2'
159 # firstNonSpace => 'true'
160 # insensitive => 'TRUE'
162 if ($self->testRegExpr($text, 'case ', 1, 0, 0, undef, 1, '#stay', 'Keyword')) {
165 # String => 'end case'
166 # attribute => 'Keyword'
168 # endRegion => 'Region2'
169 # insensitive => 'TRUE'
170 # type => 'StringDetect'
171 if ($self->testStringDetect($text, 'end case', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
174 # String => '\sloop\s+'
175 # attribute => 'Keyword'
176 # beginRegion => 'Region3'
178 # insensitive => 'TRUE'
180 if ($self->testRegExpr($text, '\\sloop\\s+', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
183 # String => '\sloop$'
184 # attribute => 'Keyword'
185 # beginRegion => 'Region3'
187 # insensitive => 'TRUE'
189 if ($self->testRegExpr($text, '\\sloop$', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
192 # String => 'end loop;'
193 # attribute => 'Keyword'
195 # endRegion => 'Region3'
196 # insensitive => 'TRUE'
197 # type => 'StringDetect'
198 if ($self->testStringDetect($text, 'end loop;', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
201 # String => '\sselect\s+'
202 # attribute => 'Keyword'
203 # beginRegion => 'Region4'
205 # insensitive => 'TRUE'
207 if ($self->testRegExpr($text, '\\sselect\\s+', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
210 # String => '\sselect$'
211 # attribute => 'Keyword'
212 # beginRegion => 'Region4'
214 # insensitive => 'TRUE'
216 if ($self->testRegExpr($text, '\\sselect$', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
219 # String => 'end select;'
220 # attribute => 'Keyword'
222 # endRegion => 'Region4'
223 # insensitive => 'TRUE'
224 # type => 'StringDetect'
225 if ($self->testStringDetect($text, 'end select;', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
228 # String => 'keywords'
229 # attribute => 'Keyword'
232 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
235 # attribute => 'Float'
238 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
241 # attribute => 'Decimal'
244 if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
248 # attribute => 'Char'
251 if ($self->testRegExpr($text, '\'.\'', 0, 0, 0, undef, 0, '#stay', 'Char')) {
254 # attribute => 'String'
256 # context => 'String'
257 # type => 'DetectChar'
258 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
261 # attribute => 'Comment'
264 # context => 'Comment'
265 # type => 'Detect2Chars'
266 if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
273 my ($self, $text) = @_;
274 # attribute => 'String'
277 # type => 'DetectChar'
278 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
291 Syntax::Highlight::Engine::Kate::Ada - a Plugin for Ada syntax highlighting
295 require Syntax::Highlight::Engine::Kate::Ada;
296 my $sh = new Syntax::Highlight::Engine::Kate::Ada([
301 Syntax::Highlight::Engine::Kate::Ada is a plugin module that provides syntax highlighting
302 for Ada to the Syntax::Haghlight::Engine::Kate highlighting engine.
304 This code is generated from the syntax definition files used
306 It works quite fine, but can use refinement and optimization.
308 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
314 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
320 Unknown. If you find any, please contact the author