Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Syntax / Highlight / Engine / Kate / Ada.pm
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 'ada.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7
8 #kate xml version 1.05
9 #kate version 2.4
10 #generated: Sun Feb  3 22:02:04 2008, localtime
11
12 package Syntax::Highlight::Engine::Kate::Ada;
13
14 our $VERSION = '0.06';
15
16 use strict;
17 use warnings;
18 use base('Syntax::Highlight::Engine::Kate::Template');
19
20 sub new {
21    my $proto = shift;
22    my $class = ref($proto) || $proto;
23    my $self = $class->SUPER::new(@_);
24    $self->attributes({
25       'Base-N' => 'BaseN',
26       'Char' => 'Char',
27       'Comment' => 'Comment',
28       'Decimal' => 'DecVal',
29       'Float' => 'Float',
30       'Keyword' => 'Keyword',
31       'Normal Text' => 'Normal',
32       'String' => 'String',
33    });
34    $self->listAdd('keywords',
35       'abort',
36       'abs',
37       'abstract',
38       'accept',
39       'access',
40       'aliased',
41       'all',
42       'and',
43       'array',
44       'at',
45       'begin',
46       'body',
47       'constant',
48       'declare',
49       'delay',
50       'delta',
51       'digits',
52       'do',
53       'else',
54       'elsif',
55       'end',
56       'entry',
57       'exception',
58       'exit',
59       'for',
60       'function',
61       'generic',
62       'goto',
63       'in',
64       'is',
65       'limited',
66       'mod',
67       'new',
68       'not',
69       'null',
70       'of',
71       'or',
72       'others',
73       'out',
74       'package',
75       'pragma',
76       'private',
77       'procedure',
78       'protected',
79       'raise',
80       'range',
81       'record',
82       'rem',
83       'renames',
84       'requeue',
85       'return',
86       'reverse',
87       'separate',
88       'subtype',
89       'tagged',
90       'task',
91       'terminate',
92       'then',
93       'type',
94       'until',
95       'use',
96       'when',
97       'while',
98       'with',
99       'xor',
100    );
101    $self->contextdata({
102       'Comment' => {
103          callback => \&parseComment,
104          attribute => 'Comment',
105          lineending => '#pop',
106       },
107       'Default' => {
108          callback => \&parseDefault,
109          attribute => 'Normal Text',
110       },
111       'String' => {
112          callback => \&parseString,
113          attribute => 'String',
114          lineending => '#pop',
115       },
116    });
117    $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
118    $self->basecontext('Default');
119    $self->keywordscase(0);
120    $self->initialize;
121    bless ($self, $class);
122    return $self;
123 }
124
125 sub language {
126    return 'Ada';
127 }
128
129 sub parseComment {
130    my ($self, $text) = @_;
131    return 0;
132 };
133
134 sub parseDefault {
135    my ($self, $text) = @_;
136    # String => 'if '
137    # attribute => 'Keyword'
138    # beginRegion => 'Region1'
139    # context => '#stay'
140    # firstNonSpace => 'true'
141    # insensitive => 'TRUE'
142    # type => 'RegExpr'
143    if ($self->testRegExpr($text, 'if ', 1, 0, 0, undef, 1, '#stay', 'Keyword')) {
144       return 1
145    }
146    # String => 'end if'
147    # attribute => 'Keyword'
148    # context => '#stay'
149    # endRegion => 'Region1'
150    # insensitive => 'TRUE'
151    # type => 'StringDetect'
152    if ($self->testStringDetect($text, 'end if', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
153       return 1
154    }
155    # String => 'case '
156    # attribute => 'Keyword'
157    # beginRegion => 'Region2'
158    # context => '#stay'
159    # firstNonSpace => 'true'
160    # insensitive => 'TRUE'
161    # type => 'RegExpr'
162    if ($self->testRegExpr($text, 'case ', 1, 0, 0, undef, 1, '#stay', 'Keyword')) {
163       return 1
164    }
165    # String => 'end case'
166    # attribute => 'Keyword'
167    # context => '#stay'
168    # endRegion => 'Region2'
169    # insensitive => 'TRUE'
170    # type => 'StringDetect'
171    if ($self->testStringDetect($text, 'end case', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
172       return 1
173    }
174    # String => '\sloop\s+'
175    # attribute => 'Keyword'
176    # beginRegion => 'Region3'
177    # context => '#stay'
178    # insensitive => 'TRUE'
179    # type => 'RegExpr'
180    if ($self->testRegExpr($text, '\\sloop\\s+', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
181       return 1
182    }
183    # String => '\sloop$'
184    # attribute => 'Keyword'
185    # beginRegion => 'Region3'
186    # context => '#stay'
187    # insensitive => 'TRUE'
188    # type => 'RegExpr'
189    if ($self->testRegExpr($text, '\\sloop$', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
190       return 1
191    }
192    # String => 'end loop;'
193    # attribute => 'Keyword'
194    # context => '#stay'
195    # endRegion => 'Region3'
196    # insensitive => 'TRUE'
197    # type => 'StringDetect'
198    if ($self->testStringDetect($text, 'end loop;', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
199       return 1
200    }
201    # String => '\sselect\s+'
202    # attribute => 'Keyword'
203    # beginRegion => 'Region4'
204    # context => '#stay'
205    # insensitive => 'TRUE'
206    # type => 'RegExpr'
207    if ($self->testRegExpr($text, '\\sselect\\s+', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
208       return 1
209    }
210    # String => '\sselect$'
211    # attribute => 'Keyword'
212    # beginRegion => 'Region4'
213    # context => '#stay'
214    # insensitive => 'TRUE'
215    # type => 'RegExpr'
216    if ($self->testRegExpr($text, '\\sselect$', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
217       return 1
218    }
219    # String => 'end select;'
220    # attribute => 'Keyword'
221    # context => '#stay'
222    # endRegion => 'Region4'
223    # insensitive => 'TRUE'
224    # type => 'StringDetect'
225    if ($self->testStringDetect($text, 'end select;', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
226       return 1
227    }
228    # String => 'keywords'
229    # attribute => 'Keyword'
230    # context => '#stay'
231    # type => 'keyword'
232    if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
233       return 1
234    }
235    # attribute => 'Float'
236    # context => '#stay'
237    # type => 'Float'
238    if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
239       return 1
240    }
241    # attribute => 'Decimal'
242    # context => '#stay'
243    # type => 'Int'
244    if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
245       return 1
246    }
247    # String => ''.''
248    # attribute => 'Char'
249    # context => '#stay'
250    # type => 'RegExpr'
251    if ($self->testRegExpr($text, '\'.\'', 0, 0, 0, undef, 0, '#stay', 'Char')) {
252       return 1
253    }
254    # attribute => 'String'
255    # char => '"'
256    # context => 'String'
257    # type => 'DetectChar'
258    if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
259       return 1
260    }
261    # attribute => 'Comment'
262    # char => '-'
263    # char1 => '-'
264    # context => 'Comment'
265    # type => 'Detect2Chars'
266    if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
267       return 1
268    }
269    return 0;
270 };
271
272 sub parseString {
273    my ($self, $text) = @_;
274    # attribute => 'String'
275    # char => '"'
276    # context => '#pop'
277    # type => 'DetectChar'
278    if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
279       return 1
280    }
281    return 0;
282 };
283
284
285 1;
286
287 __END__
288
289 =head1 NAME
290
291 Syntax::Highlight::Engine::Kate::Ada - a Plugin for Ada syntax highlighting
292
293 =head1 SYNOPSIS
294
295  require Syntax::Highlight::Engine::Kate::Ada;
296  my $sh = new Syntax::Highlight::Engine::Kate::Ada([
297  ]);
298
299 =head1 DESCRIPTION
300
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.
303
304 This code is generated from the syntax definition files used
305 by the Kate project.
306 It works quite fine, but can use refinement and optimization.
307
308 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
309
310 =cut
311
312 =head1 AUTHOR
313
314 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
315
316 =cut
317
318 =head1 BUGS
319
320 Unknown. If you find any, please contact the author
321
322 =cut
323