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 'logohighlightstyle.nl.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 0.2 |
9
|
|
|
|
|
|
|
#kate version 2.1 |
10
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:05 2008, localtime |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::Nl; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
537
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
29
|
|
17
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
18
|
1
|
|
|
1
|
|
6
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
593
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
1
|
|
|
1
|
0
|
672
|
my $proto = shift; |
22
|
1
|
|
33
|
|
|
7
|
my $class = ref($proto) || $proto; |
23
|
1
|
|
|
|
|
9
|
my $self = $class->SUPER::new(@_); |
24
|
1
|
|
|
|
|
24
|
$self->attributes({ |
25
|
|
|
|
|
|
|
'Boolean Operators' => 'BString', |
26
|
|
|
|
|
|
|
'Comment' => 'Comment', |
27
|
|
|
|
|
|
|
'Execution Controllers' => 'BaseN', |
28
|
|
|
|
|
|
|
'Expressers' => 'Datatype', |
29
|
|
|
|
|
|
|
'MetaFunctions' => 'Function', |
30
|
|
|
|
|
|
|
'Normal' => 'Normal', |
31
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
32
|
|
|
|
|
|
|
'Number' => 'Float', |
33
|
|
|
|
|
|
|
'Operator' => 'Operator', |
34
|
|
|
|
|
|
|
'Raw String' => 'String', |
35
|
|
|
|
|
|
|
'Scopes' => 'RegionMarker', |
36
|
|
|
|
|
|
|
'Statements' => 'Keyword', |
37
|
|
|
|
|
|
|
'String' => 'String', |
38
|
|
|
|
|
|
|
}); |
39
|
1
|
|
|
|
|
10
|
$self->listAdd('boolops', |
40
|
|
|
|
|
|
|
'en', |
41
|
|
|
|
|
|
|
'niet', |
42
|
|
|
|
|
|
|
'of', |
43
|
|
|
|
|
|
|
); |
44
|
1
|
|
|
|
|
16
|
$self->listAdd('controllers', |
45
|
|
|
|
|
|
|
'als', |
46
|
|
|
|
|
|
|
'anders', |
47
|
|
|
|
|
|
|
'doe', |
48
|
|
|
|
|
|
|
'geefdoor', |
49
|
|
|
|
|
|
|
'herhaal', |
50
|
|
|
|
|
|
|
'hh', |
51
|
|
|
|
|
|
|
'in', |
52
|
|
|
|
|
|
|
'kap', |
53
|
|
|
|
|
|
|
'terwijl', |
54
|
|
|
|
|
|
|
'tot', |
55
|
|
|
|
|
|
|
'voor', |
56
|
|
|
|
|
|
|
'voorelke', |
57
|
|
|
|
|
|
|
'wacht', |
58
|
|
|
|
|
|
|
); |
59
|
1
|
|
|
|
|
5
|
$self->listAdd('metafunctions', |
60
|
|
|
|
|
|
|
'leer', |
61
|
|
|
|
|
|
|
); |
62
|
1
|
|
|
|
|
5
|
$self->listAdd('statements', |
63
|
|
|
|
|
|
|
'achteruit', |
64
|
|
|
|
|
|
|
'alsnieuw', |
65
|
|
|
|
|
|
|
'at', |
66
|
|
|
|
|
|
|
'bericht', |
67
|
|
|
|
|
|
|
'canvaskleur', |
68
|
|
|
|
|
|
|
'canvasmaat', |
69
|
|
|
|
|
|
|
'ck', |
70
|
|
|
|
|
|
|
'cm', |
71
|
|
|
|
|
|
|
'cs', |
72
|
|
|
|
|
|
|
'dl', |
73
|
|
|
|
|
|
|
'dr', |
74
|
|
|
|
|
|
|
'draailinks', |
75
|
|
|
|
|
|
|
'draairechts', |
76
|
|
|
|
|
|
|
'druk', |
77
|
|
|
|
|
|
|
'ds', |
78
|
|
|
|
|
|
|
'ganaar', |
79
|
|
|
|
|
|
|
'ganaarx', |
80
|
|
|
|
|
|
|
'ganaary', |
81
|
|
|
|
|
|
|
'gok', |
82
|
|
|
|
|
|
|
'gx', |
83
|
|
|
|
|
|
|
'gy', |
84
|
|
|
|
|
|
|
'invoervenster', |
85
|
|
|
|
|
|
|
'kies', |
86
|
|
|
|
|
|
|
'ks', |
87
|
|
|
|
|
|
|
'lettermaat', |
88
|
|
|
|
|
|
|
'lettertype', |
89
|
|
|
|
|
|
|
'pendikte', |
90
|
|
|
|
|
|
|
'penkleur', |
91
|
|
|
|
|
|
|
'penneer', |
92
|
|
|
|
|
|
|
'penop', |
93
|
|
|
|
|
|
|
'pk', |
94
|
|
|
|
|
|
|
'pm', |
95
|
|
|
|
|
|
|
'pn', |
96
|
|
|
|
|
|
|
'po', |
97
|
|
|
|
|
|
|
'richting', |
98
|
|
|
|
|
|
|
'rt', |
99
|
|
|
|
|
|
|
'schoon', |
100
|
|
|
|
|
|
|
'schrijf', |
101
|
|
|
|
|
|
|
'thuis', |
102
|
|
|
|
|
|
|
'toon', |
103
|
|
|
|
|
|
|
'ts', |
104
|
|
|
|
|
|
|
'verberg', |
105
|
|
|
|
|
|
|
'voeruit', |
106
|
|
|
|
|
|
|
'vooruit', |
107
|
|
|
|
|
|
|
'vs', |
108
|
|
|
|
|
|
|
'vt', |
109
|
|
|
|
|
|
|
'wikkelaan', |
110
|
|
|
|
|
|
|
'wikkeluit', |
111
|
|
|
|
|
|
|
); |
112
|
1
|
|
|
|
|
10
|
$self->contextdata({ |
113
|
|
|
|
|
|
|
'Normal' => { |
114
|
|
|
|
|
|
|
callback => \&parseNormal, |
115
|
|
|
|
|
|
|
attribute => 'Normal Text', |
116
|
|
|
|
|
|
|
}, |
117
|
|
|
|
|
|
|
'String' => { |
118
|
|
|
|
|
|
|
callback => \&parseString, |
119
|
|
|
|
|
|
|
attribute => 'String', |
120
|
|
|
|
|
|
|
}, |
121
|
|
|
|
|
|
|
}); |
122
|
1
|
|
|
|
|
5
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
123
|
1
|
|
|
|
|
3
|
$self->basecontext('Normal'); |
124
|
1
|
|
|
|
|
5
|
$self->keywordscase(0); |
125
|
1
|
|
|
|
|
3
|
$self->initialize; |
126
|
1
|
|
|
|
|
4
|
bless ($self, $class); |
127
|
1
|
|
|
|
|
4
|
return $self; |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
sub language { |
131
|
0
|
|
|
0
|
0
|
|
return 'nl'; |
132
|
|
|
|
|
|
|
} |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
sub parseNormal { |
135
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
136
|
|
|
|
|
|
|
# String => 'metafunctions' |
137
|
|
|
|
|
|
|
# attribute => 'MetaFunctions' |
138
|
|
|
|
|
|
|
# context => '#stay' |
139
|
|
|
|
|
|
|
# type => 'keyword' |
140
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'metafunctions', 0, undef, 0, '#stay', 'MetaFunctions')) { |
141
|
0
|
|
|
|
|
|
return 1 |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
# String => 'statements' |
144
|
|
|
|
|
|
|
# attribute => 'Statements' |
145
|
|
|
|
|
|
|
# context => '#stay' |
146
|
|
|
|
|
|
|
# type => 'keyword' |
147
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'statements', 0, undef, 0, '#stay', 'Statements')) { |
148
|
0
|
|
|
|
|
|
return 1 |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
# String => 'controllers' |
151
|
|
|
|
|
|
|
# attribute => 'Execution Controllers' |
152
|
|
|
|
|
|
|
# context => '#stay' |
153
|
|
|
|
|
|
|
# type => 'keyword' |
154
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'controllers', 0, undef, 0, '#stay', 'Execution Controllers')) { |
155
|
0
|
|
|
|
|
|
return 1 |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
# String => 'boolops' |
158
|
|
|
|
|
|
|
# attribute => 'Boolean Operators' |
159
|
|
|
|
|
|
|
# context => '#stay' |
160
|
|
|
|
|
|
|
# type => 'keyword' |
161
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'boolops', 0, undef, 0, '#stay', 'Boolean Operators')) { |
162
|
0
|
|
|
|
|
|
return 1 |
163
|
|
|
|
|
|
|
} |
164
|
|
|
|
|
|
|
# String => '([!=><][=]|[><])' |
165
|
|
|
|
|
|
|
# attribute => 'Expressers' |
166
|
|
|
|
|
|
|
# context => '#stay' |
167
|
|
|
|
|
|
|
# type => 'RegExpr' |
168
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '([!=><][=]|[><])', 0, 0, 0, undef, 0, '#stay', 'Expressers')) { |
169
|
0
|
|
|
|
|
|
return 1 |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
# String => '[a-zA-Z_][a-zA-Z_0-9]+' |
172
|
|
|
|
|
|
|
# attribute => 'Normal' |
173
|
|
|
|
|
|
|
# context => '#stay' |
174
|
|
|
|
|
|
|
# type => 'RegExpr' |
175
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[a-zA-Z_][a-zA-Z_0-9]+', 0, 0, 0, undef, 0, '#stay', 'Normal')) { |
176
|
0
|
|
|
|
|
|
return 1 |
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
# String => '([0-9]+\.[0-9]*|\.[0-9]+)?|[0-9]*' |
179
|
|
|
|
|
|
|
# attribute => 'Number' |
180
|
|
|
|
|
|
|
# context => '#stay' |
181
|
|
|
|
|
|
|
# type => 'RegExpr' |
182
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '([0-9]+\\.[0-9]*|\\.[0-9]+)?|[0-9]*', 0, 0, 0, undef, 0, '#stay', 'Number')) { |
183
|
0
|
|
|
|
|
|
return 1 |
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
# String => '#.*$' |
186
|
|
|
|
|
|
|
# attribute => 'Comment' |
187
|
|
|
|
|
|
|
# context => '#stay' |
188
|
|
|
|
|
|
|
# type => 'RegExpr' |
189
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { |
190
|
0
|
|
|
|
|
|
return 1 |
191
|
|
|
|
|
|
|
} |
192
|
|
|
|
|
|
|
# String => '[+*/\(\)-]' |
193
|
|
|
|
|
|
|
# attribute => 'Operator' |
194
|
|
|
|
|
|
|
# context => '#stay' |
195
|
|
|
|
|
|
|
# type => 'RegExpr' |
196
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[+*/\\(\\)-]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
197
|
0
|
|
|
|
|
|
return 1 |
198
|
|
|
|
|
|
|
} |
199
|
|
|
|
|
|
|
# String => '[\[\]]' |
200
|
|
|
|
|
|
|
# attribute => 'Scopes' |
201
|
|
|
|
|
|
|
# context => '#stay' |
202
|
|
|
|
|
|
|
# type => 'RegExpr' |
203
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[\\[\\]]', 0, 0, 0, undef, 0, '#stay', 'Scopes')) { |
204
|
0
|
|
|
|
|
|
return 1 |
205
|
|
|
|
|
|
|
} |
206
|
|
|
|
|
|
|
# attribute => 'String' |
207
|
|
|
|
|
|
|
# char => '"' |
208
|
|
|
|
|
|
|
# context => 'String' |
209
|
|
|
|
|
|
|
# type => 'DetectChar' |
210
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { |
211
|
0
|
|
|
|
|
|
return 1 |
212
|
|
|
|
|
|
|
} |
213
|
0
|
|
|
|
|
|
return 0; |
214
|
|
|
|
|
|
|
}; |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
sub parseString { |
217
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
218
|
|
|
|
|
|
|
# attribute => 'String' |
219
|
|
|
|
|
|
|
# context => '#stay' |
220
|
|
|
|
|
|
|
# type => 'HlCStringChar' |
221
|
0
|
0
|
|
|
|
|
if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String')) { |
222
|
0
|
|
|
|
|
|
return 1 |
223
|
|
|
|
|
|
|
} |
224
|
|
|
|
|
|
|
# String => '%[a-zA-Z]' |
225
|
|
|
|
|
|
|
# attribute => 'Operator' |
226
|
|
|
|
|
|
|
# context => '#stay' |
227
|
|
|
|
|
|
|
# type => 'RegExpr' |
228
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
229
|
0
|
|
|
|
|
|
return 1 |
230
|
|
|
|
|
|
|
} |
231
|
|
|
|
|
|
|
# attribute => 'String' |
232
|
|
|
|
|
|
|
# char => '"' |
233
|
|
|
|
|
|
|
# context => '#pop' |
234
|
|
|
|
|
|
|
# type => 'DetectChar' |
235
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
236
|
0
|
|
|
|
|
|
return 1 |
237
|
|
|
|
|
|
|
} |
238
|
0
|
|
|
|
|
|
return 0; |
239
|
|
|
|
|
|
|
}; |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
1; |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
__END__ |