Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Syntax / Highlight / Engine / Kate / Eiffel.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 'eiffel.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7
8 #kate xml version 1.02
9 #kate version 2.1
10 #kate author Sebastian Vuorinen
11 #generated: Sun Feb  3 22:02:04 2008, localtime
12
13 package Syntax::Highlight::Engine::Kate::Eiffel;
14
15 our $VERSION = '0.06';
16
17 use strict;
18 use warnings;
19 use base('Syntax::Highlight::Engine::Kate::Template');
20
21 sub new {
22    my $proto = shift;
23    my $class = ref($proto) || $proto;
24    my $self = $class->SUPER::new(@_);
25    $self->attributes({
26       'Assertions' => 'Others',
27       'Char' => 'Char',
28       'Comment' => 'Comment',
29       'Decimal' => 'DecVal',
30       'Float' => 'Float',
31       'Keyword' => 'Keyword',
32       'Normal Text' => 'Normal',
33       'Predefined entities' => 'Others',
34       'String' => 'String',
35    });
36    $self->listAdd('assertions',
37       'check',
38       'ensure',
39       'invariant',
40       'require',
41       'variant',
42    );
43    $self->listAdd('keywords',
44       'agent',
45       'alias',
46       'all',
47       'and',
48       'as',
49       'assign',
50       'class',
51       'convert',
52       'create',
53       'creation',
54       'debug',
55       'deferred',
56       'do',
57       'else',
58       'elseif',
59       'end',
60       'expanded',
61       'export',
62       'external',
63       'feature',
64       'from',
65       'frozen',
66       'if',
67       'implies',
68       'indexing',
69       'infix',
70       'inherit',
71       'inspect',
72       'is',
73       'like',
74       'local',
75       'loop',
76       'not',
77       'obsolete',
78       'old',
79       'once',
80       'or',
81       'prefix',
82       'pure',
83       'redefine',
84       'reference',
85       'rename',
86       'rescue',
87       'retry',
88       'separate',
89       'then',
90       'undefine',
91    );
92    $self->listAdd('predefined-entities',
93       'Current',
94       'False',
95       'Precursor',
96       'Result',
97       'TUPLE',
98       'True',
99    );
100    $self->contextdata({
101       'Documentation' => {
102          callback => \&parseDocumentation,
103          attribute => 'Comment',
104          lineending => '#pop',
105       },
106       'Normal' => {
107          callback => \&parseNormal,
108          attribute => 'Normal Text',
109       },
110       'Quoted String' => {
111          callback => \&parseQuotedString,
112          attribute => 'String',
113          lineending => '#pop',
114       },
115    });
116    $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
117    $self->basecontext('Normal');
118    $self->keywordscase(0);
119    $self->initialize;
120    bless ($self, $class);
121    return $self;
122 }
123
124 sub language {
125    return 'Eiffel';
126 }
127
128 sub parseDocumentation {
129    my ($self, $text) = @_;
130    return 0;
131 };
132
133 sub parseNormal {
134    my ($self, $text) = @_;
135    # String => 'keywords'
136    # attribute => 'Keyword'
137    # context => '#stay'
138    # type => 'keyword'
139    if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
140       return 1
141    }
142    # String => 'predefined-entities'
143    # attribute => 'Predefined entities'
144    # context => '#stay'
145    # type => 'keyword'
146    if ($self->testKeyword($text, 'predefined-entities', 0, undef, 0, '#stay', 'Predefined entities')) {
147       return 1
148    }
149    # String => 'assertions'
150    # attribute => 'Assertions'
151    # context => '#stay'
152    # type => 'keyword'
153    if ($self->testKeyword($text, 'assertions', 0, undef, 0, '#stay', 'Assertions')) {
154       return 1
155    }
156    # attribute => 'Decimal'
157    # context => '#stay'
158    # type => 'Int'
159    if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
160       return 1
161    }
162    # attribute => 'Float'
163    # context => '#stay'
164    # type => 'Float'
165    if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
166       return 1
167    }
168    # attribute => 'Char'
169    # context => '#stay'
170    # type => 'HlCChar'
171    if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) {
172       return 1
173    }
174    # attribute => 'String'
175    # char => '"'
176    # context => 'Quoted String'
177    # type => 'DetectChar'
178    if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Quoted String', 'String')) {
179       return 1
180    }
181    # attribute => 'Comment'
182    # char => '-'
183    # char1 => '-'
184    # context => 'Documentation'
185    # type => 'Detect2Chars'
186    if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'Documentation', 'Comment')) {
187       return 1
188    }
189    return 0;
190 };
191
192 sub parseQuotedString {
193    my ($self, $text) = @_;
194    # attribute => 'String'
195    # char => '"'
196    # context => '#pop'
197    # type => 'DetectChar'
198    if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
199       return 1
200    }
201    return 0;
202 };
203
204
205 1;
206
207 __END__
208
209 =head1 NAME
210
211 Syntax::Highlight::Engine::Kate::Eiffel - a Plugin for Eiffel syntax highlighting
212
213 =head1 SYNOPSIS
214
215  require Syntax::Highlight::Engine::Kate::Eiffel;
216  my $sh = new Syntax::Highlight::Engine::Kate::Eiffel([
217  ]);
218
219 =head1 DESCRIPTION
220
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.
223
224 This code is generated from the syntax definition files used
225 by the Kate project.
226 It works quite fine, but can use refinement and optimization.
227
228 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
229
230 =cut
231
232 =head1 AUTHOR
233
234 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
235
236 =cut
237
238 =head1 BUGS
239
240 Unknown. If you find any, please contact the author
241
242 =cut
243