| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
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.07'; |
|
16
|
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
1186
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
50
|
|
|
18
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
40
|
|
|
19
|
1
|
|
|
1
|
|
8
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
706
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
|
22
|
1
|
|
|
1
|
0
|
751
|
my $proto = shift; |
|
23
|
1
|
|
33
|
|
|
10
|
my $class = ref($proto) || $proto; |
|
24
|
1
|
|
|
|
|
14
|
my $self = $class->SUPER::new(@_); |
|
25
|
1
|
|
|
|
|
19
|
$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
|
1
|
|
|
|
|
11
|
$self->listAdd('assertions', |
|
37
|
|
|
|
|
|
|
'check', |
|
38
|
|
|
|
|
|
|
'ensure', |
|
39
|
|
|
|
|
|
|
'invariant', |
|
40
|
|
|
|
|
|
|
'require', |
|
41
|
|
|
|
|
|
|
'variant', |
|
42
|
|
|
|
|
|
|
); |
|
43
|
1
|
|
|
|
|
7
|
$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
|
1
|
|
|
|
|
5
|
$self->listAdd('predefined-entities', |
|
93
|
|
|
|
|
|
|
'Current', |
|
94
|
|
|
|
|
|
|
'False', |
|
95
|
|
|
|
|
|
|
'Precursor', |
|
96
|
|
|
|
|
|
|
'Result', |
|
97
|
|
|
|
|
|
|
'TUPLE', |
|
98
|
|
|
|
|
|
|
'True', |
|
99
|
|
|
|
|
|
|
); |
|
100
|
1
|
|
|
|
|
22
|
$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
|
1
|
|
|
|
|
12
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
|
117
|
1
|
|
|
|
|
5
|
$self->basecontext('Normal'); |
|
118
|
1
|
|
|
|
|
10
|
$self->keywordscase(0); |
|
119
|
1
|
|
|
|
|
6
|
$self->initialize; |
|
120
|
1
|
|
|
|
|
3
|
bless ($self, $class); |
|
121
|
1
|
|
|
|
|
4
|
return $self; |
|
122
|
|
|
|
|
|
|
} |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
sub language { |
|
125
|
0
|
|
|
0
|
0
|
|
return 'Eiffel'; |
|
126
|
|
|
|
|
|
|
} |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
sub parseDocumentation { |
|
129
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
130
|
0
|
|
|
|
|
|
return 0; |
|
131
|
|
|
|
|
|
|
}; |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
sub parseNormal { |
|
134
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
135
|
|
|
|
|
|
|
# String => 'keywords' |
|
136
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
137
|
|
|
|
|
|
|
# context => '#stay' |
|
138
|
|
|
|
|
|
|
# type => 'keyword' |
|
139
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { |
|
140
|
0
|
|
|
|
|
|
return 1 |
|
141
|
|
|
|
|
|
|
} |
|
142
|
|
|
|
|
|
|
# String => 'predefined-entities' |
|
143
|
|
|
|
|
|
|
# attribute => 'Predefined entities' |
|
144
|
|
|
|
|
|
|
# context => '#stay' |
|
145
|
|
|
|
|
|
|
# type => 'keyword' |
|
146
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'predefined-entities', 0, undef, 0, '#stay', 'Predefined entities')) { |
|
147
|
0
|
|
|
|
|
|
return 1 |
|
148
|
|
|
|
|
|
|
} |
|
149
|
|
|
|
|
|
|
# String => 'assertions' |
|
150
|
|
|
|
|
|
|
# attribute => 'Assertions' |
|
151
|
|
|
|
|
|
|
# context => '#stay' |
|
152
|
|
|
|
|
|
|
# type => 'keyword' |
|
153
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'assertions', 0, undef, 0, '#stay', 'Assertions')) { |
|
154
|
0
|
|
|
|
|
|
return 1 |
|
155
|
|
|
|
|
|
|
} |
|
156
|
|
|
|
|
|
|
# attribute => 'Decimal' |
|
157
|
|
|
|
|
|
|
# context => '#stay' |
|
158
|
|
|
|
|
|
|
# type => 'Int' |
|
159
|
0
|
0
|
|
|
|
|
if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { |
|
160
|
0
|
|
|
|
|
|
return 1 |
|
161
|
|
|
|
|
|
|
} |
|
162
|
|
|
|
|
|
|
# attribute => 'Float' |
|
163
|
|
|
|
|
|
|
# context => '#stay' |
|
164
|
|
|
|
|
|
|
# type => 'Float' |
|
165
|
0
|
0
|
|
|
|
|
if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { |
|
166
|
0
|
|
|
|
|
|
return 1 |
|
167
|
|
|
|
|
|
|
} |
|
168
|
|
|
|
|
|
|
# attribute => 'Char' |
|
169
|
|
|
|
|
|
|
# context => '#stay' |
|
170
|
|
|
|
|
|
|
# type => 'HlCChar' |
|
171
|
0
|
0
|
|
|
|
|
if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { |
|
172
|
0
|
|
|
|
|
|
return 1 |
|
173
|
|
|
|
|
|
|
} |
|
174
|
|
|
|
|
|
|
# attribute => 'String' |
|
175
|
|
|
|
|
|
|
# char => '"' |
|
176
|
|
|
|
|
|
|
# context => 'Quoted String' |
|
177
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
178
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Quoted String', 'String')) { |
|
179
|
0
|
|
|
|
|
|
return 1 |
|
180
|
|
|
|
|
|
|
} |
|
181
|
|
|
|
|
|
|
# attribute => 'Comment' |
|
182
|
|
|
|
|
|
|
# char => '-' |
|
183
|
|
|
|
|
|
|
# char1 => '-' |
|
184
|
|
|
|
|
|
|
# context => 'Documentation' |
|
185
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
186
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'Documentation', 'Comment')) { |
|
187
|
0
|
|
|
|
|
|
return 1 |
|
188
|
|
|
|
|
|
|
} |
|
189
|
0
|
|
|
|
|
|
return 0; |
|
190
|
|
|
|
|
|
|
}; |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
sub parseQuotedString { |
|
193
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
194
|
|
|
|
|
|
|
# attribute => 'String' |
|
195
|
|
|
|
|
|
|
# char => '"' |
|
196
|
|
|
|
|
|
|
# context => '#pop' |
|
197
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
198
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
|
199
|
0
|
|
|
|
|
|
return 1 |
|
200
|
|
|
|
|
|
|
} |
|
201
|
0
|
|
|
|
|
|
return 0; |
|
202
|
|
|
|
|
|
|
}; |
|
203
|
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
1; |
|
206
|
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
__END__ |