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 'd.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 1.36 |
9
|
|
|
|
|
|
|
#kate version 2.2 |
10
|
|
|
|
|
|
|
#kate author Simon J Mackenzie (project.katedxml@smackoz.fastmail.fm) |
11
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:04 2008, localtime |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::D; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.07'; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
1036
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
38
|
|
18
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
34
|
|
19
|
1
|
|
|
1
|
|
6
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2627
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
22
|
1
|
|
|
1
|
0
|
847
|
my $proto = shift; |
23
|
1
|
|
33
|
|
|
12
|
my $class = ref($proto) || $proto; |
24
|
1
|
|
|
|
|
15
|
my $self = $class->SUPER::new(@_); |
25
|
1
|
|
|
|
|
28
|
$self->attributes({ |
26
|
|
|
|
|
|
|
'Assert' => 'Variable', |
27
|
|
|
|
|
|
|
'Binary' => 'BaseN', |
28
|
|
|
|
|
|
|
'Char' => 'Char', |
29
|
|
|
|
|
|
|
'Comment' => 'Comment', |
30
|
|
|
|
|
|
|
'Debug' => 'BaseN', |
31
|
|
|
|
|
|
|
'Escape String' => 'String', |
32
|
|
|
|
|
|
|
'Float' => 'Float', |
33
|
|
|
|
|
|
|
'Hex' => 'BaseN', |
34
|
|
|
|
|
|
|
'Integer' => 'DecVal', |
35
|
|
|
|
|
|
|
'Keyword' => 'Keyword', |
36
|
|
|
|
|
|
|
'Linkage' => 'IString', |
37
|
|
|
|
|
|
|
'Linkage Type' => 'Others', |
38
|
|
|
|
|
|
|
'Module' => 'Keyword', |
39
|
|
|
|
|
|
|
'Module Name' => 'Reserved', |
40
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
41
|
|
|
|
|
|
|
'Octal' => 'BaseN', |
42
|
|
|
|
|
|
|
'Phobos Library' => 'BString', |
43
|
|
|
|
|
|
|
'Pragma' => 'Keyword', |
44
|
|
|
|
|
|
|
'String' => 'String', |
45
|
|
|
|
|
|
|
'Type' => 'DataType', |
46
|
|
|
|
|
|
|
'Unit Test' => 'RegionMarker', |
47
|
|
|
|
|
|
|
'Version' => 'Keyword', |
48
|
|
|
|
|
|
|
'Version Type' => 'DataType', |
49
|
|
|
|
|
|
|
'Wysiwyg' => 'Char', |
50
|
|
|
|
|
|
|
}); |
51
|
1
|
|
|
|
|
9
|
$self->listAdd('assert', |
52
|
|
|
|
|
|
|
'assert', |
53
|
|
|
|
|
|
|
); |
54
|
1
|
|
|
|
|
4
|
$self->listAdd('debug', |
55
|
|
|
|
|
|
|
'debug', |
56
|
|
|
|
|
|
|
); |
57
|
1
|
|
|
|
|
5
|
$self->listAdd('keywords', |
58
|
|
|
|
|
|
|
'abstract', |
59
|
|
|
|
|
|
|
'alias', |
60
|
|
|
|
|
|
|
'align', |
61
|
|
|
|
|
|
|
'asm', |
62
|
|
|
|
|
|
|
'auto', |
63
|
|
|
|
|
|
|
'body', |
64
|
|
|
|
|
|
|
'break', |
65
|
|
|
|
|
|
|
'case', |
66
|
|
|
|
|
|
|
'cast', |
67
|
|
|
|
|
|
|
'catch', |
68
|
|
|
|
|
|
|
'class', |
69
|
|
|
|
|
|
|
'const', |
70
|
|
|
|
|
|
|
'continue', |
71
|
|
|
|
|
|
|
'default', |
72
|
|
|
|
|
|
|
'delegate', |
73
|
|
|
|
|
|
|
'delete', |
74
|
|
|
|
|
|
|
'deprecated', |
75
|
|
|
|
|
|
|
'do', |
76
|
|
|
|
|
|
|
'else', |
77
|
|
|
|
|
|
|
'enum', |
78
|
|
|
|
|
|
|
'export', |
79
|
|
|
|
|
|
|
'false', |
80
|
|
|
|
|
|
|
'final', |
81
|
|
|
|
|
|
|
'finally', |
82
|
|
|
|
|
|
|
'for', |
83
|
|
|
|
|
|
|
'foreach', |
84
|
|
|
|
|
|
|
'function', |
85
|
|
|
|
|
|
|
'goto', |
86
|
|
|
|
|
|
|
'if', |
87
|
|
|
|
|
|
|
'in', |
88
|
|
|
|
|
|
|
'inout', |
89
|
|
|
|
|
|
|
'interface', |
90
|
|
|
|
|
|
|
'invariant', |
91
|
|
|
|
|
|
|
'is', |
92
|
|
|
|
|
|
|
'mixin', |
93
|
|
|
|
|
|
|
'new', |
94
|
|
|
|
|
|
|
'null', |
95
|
|
|
|
|
|
|
'out', |
96
|
|
|
|
|
|
|
'override', |
97
|
|
|
|
|
|
|
'package', |
98
|
|
|
|
|
|
|
'private', |
99
|
|
|
|
|
|
|
'protected', |
100
|
|
|
|
|
|
|
'public', |
101
|
|
|
|
|
|
|
'return', |
102
|
|
|
|
|
|
|
'static', |
103
|
|
|
|
|
|
|
'struct', |
104
|
|
|
|
|
|
|
'super', |
105
|
|
|
|
|
|
|
'switch', |
106
|
|
|
|
|
|
|
'synchronized', |
107
|
|
|
|
|
|
|
'template', |
108
|
|
|
|
|
|
|
'this', |
109
|
|
|
|
|
|
|
'throw', |
110
|
|
|
|
|
|
|
'true', |
111
|
|
|
|
|
|
|
'try', |
112
|
|
|
|
|
|
|
'typedef', |
113
|
|
|
|
|
|
|
'typeof', |
114
|
|
|
|
|
|
|
'union', |
115
|
|
|
|
|
|
|
'volatile', |
116
|
|
|
|
|
|
|
'while', |
117
|
|
|
|
|
|
|
'with', |
118
|
|
|
|
|
|
|
); |
119
|
1
|
|
|
|
|
4
|
$self->listAdd('linkage', |
120
|
|
|
|
|
|
|
'extern', |
121
|
|
|
|
|
|
|
); |
122
|
1
|
|
|
|
|
3
|
$self->listAdd('ltypes', |
123
|
|
|
|
|
|
|
'C', |
124
|
|
|
|
|
|
|
'D', |
125
|
|
|
|
|
|
|
'Pascal', |
126
|
|
|
|
|
|
|
'Windows', |
127
|
|
|
|
|
|
|
); |
128
|
1
|
|
|
|
|
4
|
$self->listAdd('modules', |
129
|
|
|
|
|
|
|
'import', |
130
|
|
|
|
|
|
|
'module', |
131
|
|
|
|
|
|
|
); |
132
|
1
|
|
|
|
|
3
|
$self->listAdd('phobos', |
133
|
|
|
|
|
|
|
'printf', |
134
|
|
|
|
|
|
|
'writef', |
135
|
|
|
|
|
|
|
); |
136
|
1
|
|
|
|
|
4
|
$self->listAdd('pragma', |
137
|
|
|
|
|
|
|
'pragma', |
138
|
|
|
|
|
|
|
); |
139
|
1
|
|
|
|
|
4
|
$self->listAdd('ptypes', |
140
|
|
|
|
|
|
|
'msg', |
141
|
|
|
|
|
|
|
); |
142
|
1
|
|
|
|
|
7
|
$self->listAdd('types', |
143
|
|
|
|
|
|
|
'bit', |
144
|
|
|
|
|
|
|
'byte', |
145
|
|
|
|
|
|
|
'cdouble', |
146
|
|
|
|
|
|
|
'cent', |
147
|
|
|
|
|
|
|
'cfloat', |
148
|
|
|
|
|
|
|
'char', |
149
|
|
|
|
|
|
|
'creal', |
150
|
|
|
|
|
|
|
'dchar', |
151
|
|
|
|
|
|
|
'double', |
152
|
|
|
|
|
|
|
'float', |
153
|
|
|
|
|
|
|
'idouble', |
154
|
|
|
|
|
|
|
'ifloat', |
155
|
|
|
|
|
|
|
'int', |
156
|
|
|
|
|
|
|
'ireal', |
157
|
|
|
|
|
|
|
'long', |
158
|
|
|
|
|
|
|
'real', |
159
|
|
|
|
|
|
|
'short', |
160
|
|
|
|
|
|
|
'ubyte', |
161
|
|
|
|
|
|
|
'ucent', |
162
|
|
|
|
|
|
|
'uint', |
163
|
|
|
|
|
|
|
'ulong', |
164
|
|
|
|
|
|
|
'ushort', |
165
|
|
|
|
|
|
|
'void', |
166
|
|
|
|
|
|
|
'wchar', |
167
|
|
|
|
|
|
|
); |
168
|
1
|
|
|
|
|
3
|
$self->listAdd('unittest', |
169
|
|
|
|
|
|
|
'unittest', |
170
|
|
|
|
|
|
|
); |
171
|
1
|
|
|
|
|
4
|
$self->listAdd('version', |
172
|
|
|
|
|
|
|
'version', |
173
|
|
|
|
|
|
|
); |
174
|
1
|
|
|
|
|
3
|
$self->listAdd('vtypes', |
175
|
|
|
|
|
|
|
'AMD64', |
176
|
|
|
|
|
|
|
'BigEndian', |
177
|
|
|
|
|
|
|
'D_InlineAsm', |
178
|
|
|
|
|
|
|
'DigitalMars', |
179
|
|
|
|
|
|
|
'LittleEndian', |
180
|
|
|
|
|
|
|
'Win32', |
181
|
|
|
|
|
|
|
'Win64', |
182
|
|
|
|
|
|
|
'Windows', |
183
|
|
|
|
|
|
|
'X86', |
184
|
|
|
|
|
|
|
'linux', |
185
|
|
|
|
|
|
|
'none', |
186
|
|
|
|
|
|
|
); |
187
|
1
|
|
|
|
|
30
|
$self->contextdata({ |
188
|
|
|
|
|
|
|
'Char' => { |
189
|
|
|
|
|
|
|
callback => \&parseChar, |
190
|
|
|
|
|
|
|
attribute => 'Char', |
191
|
|
|
|
|
|
|
}, |
192
|
|
|
|
|
|
|
'CommentBlockA' => { |
193
|
|
|
|
|
|
|
callback => \&parseCommentBlockA, |
194
|
|
|
|
|
|
|
attribute => 'Comment', |
195
|
|
|
|
|
|
|
}, |
196
|
|
|
|
|
|
|
'CommentBlockB' => { |
197
|
|
|
|
|
|
|
callback => \&parseCommentBlockB, |
198
|
|
|
|
|
|
|
attribute => 'Comment', |
199
|
|
|
|
|
|
|
}, |
200
|
|
|
|
|
|
|
'CommentLine' => { |
201
|
|
|
|
|
|
|
callback => \&parseCommentLine, |
202
|
|
|
|
|
|
|
attribute => 'Comment', |
203
|
|
|
|
|
|
|
lineending => '#pop', |
204
|
|
|
|
|
|
|
}, |
205
|
|
|
|
|
|
|
'Hex' => { |
206
|
|
|
|
|
|
|
callback => \&parseHex, |
207
|
|
|
|
|
|
|
attribute => 'Hex', |
208
|
|
|
|
|
|
|
}, |
209
|
|
|
|
|
|
|
'Linkage' => { |
210
|
|
|
|
|
|
|
callback => \&parseLinkage, |
211
|
|
|
|
|
|
|
attribute => 'Linkage', |
212
|
|
|
|
|
|
|
lineending => '#pop', |
213
|
|
|
|
|
|
|
}, |
214
|
|
|
|
|
|
|
'ModuleName' => { |
215
|
|
|
|
|
|
|
callback => \&parseModuleName, |
216
|
|
|
|
|
|
|
attribute => 'Module Name', |
217
|
|
|
|
|
|
|
}, |
218
|
|
|
|
|
|
|
'Pragmas' => { |
219
|
|
|
|
|
|
|
callback => \&parsePragmas, |
220
|
|
|
|
|
|
|
attribute => 'Pragma', |
221
|
|
|
|
|
|
|
lineending => '#pop', |
222
|
|
|
|
|
|
|
}, |
223
|
|
|
|
|
|
|
'String' => { |
224
|
|
|
|
|
|
|
callback => \&parseString, |
225
|
|
|
|
|
|
|
attribute => 'String', |
226
|
|
|
|
|
|
|
}, |
227
|
|
|
|
|
|
|
'Version' => { |
228
|
|
|
|
|
|
|
callback => \&parseVersion, |
229
|
|
|
|
|
|
|
attribute => 'Version', |
230
|
|
|
|
|
|
|
lineending => '#pop', |
231
|
|
|
|
|
|
|
}, |
232
|
|
|
|
|
|
|
'Wysiwyg' => { |
233
|
|
|
|
|
|
|
callback => \&parseWysiwyg, |
234
|
|
|
|
|
|
|
attribute => 'Wysiwyg', |
235
|
|
|
|
|
|
|
}, |
236
|
|
|
|
|
|
|
'normal' => { |
237
|
|
|
|
|
|
|
callback => \&parsenormal, |
238
|
|
|
|
|
|
|
attribute => 'Normal Text', |
239
|
|
|
|
|
|
|
}, |
240
|
|
|
|
|
|
|
}); |
241
|
1
|
|
|
|
|
8
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
242
|
1
|
|
|
|
|
3
|
$self->basecontext('normal'); |
243
|
1
|
|
|
|
|
8
|
$self->keywordscase(1); |
244
|
1
|
|
|
|
|
4
|
$self->initialize; |
245
|
1
|
|
|
|
|
4
|
bless ($self, $class); |
246
|
1
|
|
|
|
|
3
|
return $self; |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
sub language { |
250
|
0
|
|
|
0
|
0
|
|
return 'D'; |
251
|
|
|
|
|
|
|
} |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
sub parseChar { |
254
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
255
|
|
|
|
|
|
|
# attribute => 'Char' |
256
|
|
|
|
|
|
|
# char => '\' |
257
|
|
|
|
|
|
|
# char1 => ''' |
258
|
|
|
|
|
|
|
# context => '#stay' |
259
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
260
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '\\', '\'', 0, 0, 0, undef, 0, '#stay', 'Char')) { |
261
|
0
|
|
|
|
|
|
return 1 |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
# attribute => 'Char' |
264
|
|
|
|
|
|
|
# char => '\' |
265
|
|
|
|
|
|
|
# char1 => '\' |
266
|
|
|
|
|
|
|
# context => '#stay' |
267
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
268
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Char')) { |
269
|
0
|
|
|
|
|
|
return 1 |
270
|
|
|
|
|
|
|
} |
271
|
|
|
|
|
|
|
# attribute => 'Char' |
272
|
|
|
|
|
|
|
# char => ''' |
273
|
|
|
|
|
|
|
# context => '#pop' |
274
|
|
|
|
|
|
|
# type => 'DetectChar' |
275
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Char')) { |
276
|
0
|
|
|
|
|
|
return 1 |
277
|
|
|
|
|
|
|
} |
278
|
0
|
|
|
|
|
|
return 0; |
279
|
|
|
|
|
|
|
}; |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
sub parseCommentBlockA { |
282
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
283
|
|
|
|
|
|
|
# attribute => 'Comment' |
284
|
|
|
|
|
|
|
# char => '*' |
285
|
|
|
|
|
|
|
# char1 => '/' |
286
|
|
|
|
|
|
|
# context => '#pop' |
287
|
|
|
|
|
|
|
# endRegion => 'CommentA' |
288
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
289
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { |
290
|
0
|
|
|
|
|
|
return 1 |
291
|
|
|
|
|
|
|
} |
292
|
0
|
|
|
|
|
|
return 0; |
293
|
|
|
|
|
|
|
}; |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
sub parseCommentBlockB { |
296
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
297
|
|
|
|
|
|
|
# attribute => 'Comment' |
298
|
|
|
|
|
|
|
# char => '+' |
299
|
|
|
|
|
|
|
# char1 => '/' |
300
|
|
|
|
|
|
|
# context => '#pop' |
301
|
|
|
|
|
|
|
# endRegion => 'CommentB' |
302
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
303
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '+', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { |
304
|
0
|
|
|
|
|
|
return 1 |
305
|
|
|
|
|
|
|
} |
306
|
0
|
|
|
|
|
|
return 0; |
307
|
|
|
|
|
|
|
}; |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
sub parseCommentLine { |
310
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
311
|
0
|
|
|
|
|
|
return 0; |
312
|
|
|
|
|
|
|
}; |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
sub parseHex { |
315
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
316
|
|
|
|
|
|
|
# attribute => 'Hex' |
317
|
|
|
|
|
|
|
# char => '"' |
318
|
|
|
|
|
|
|
# context => '#pop' |
319
|
|
|
|
|
|
|
# type => 'DetectChar' |
320
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Hex')) { |
321
|
0
|
|
|
|
|
|
return 1 |
322
|
|
|
|
|
|
|
} |
323
|
0
|
|
|
|
|
|
return 0; |
324
|
|
|
|
|
|
|
}; |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
sub parseLinkage { |
327
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
328
|
|
|
|
|
|
|
# String => 'types' |
329
|
|
|
|
|
|
|
# attribute => 'Type' |
330
|
|
|
|
|
|
|
# context => '#pop' |
331
|
|
|
|
|
|
|
# type => 'keyword' |
332
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'types', 0, undef, 0, '#pop', 'Type')) { |
333
|
0
|
|
|
|
|
|
return 1 |
334
|
|
|
|
|
|
|
} |
335
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
336
|
|
|
|
|
|
|
# char => '(' |
337
|
|
|
|
|
|
|
# context => '#stay' |
338
|
|
|
|
|
|
|
# type => 'DetectChar' |
339
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { |
340
|
0
|
|
|
|
|
|
return 1 |
341
|
|
|
|
|
|
|
} |
342
|
|
|
|
|
|
|
# String => 'ltypes' |
343
|
|
|
|
|
|
|
# attribute => 'Linkage Type' |
344
|
|
|
|
|
|
|
# context => '#stay' |
345
|
|
|
|
|
|
|
# type => 'keyword' |
346
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'ltypes', 0, undef, 0, '#stay', 'Linkage Type')) { |
347
|
0
|
|
|
|
|
|
return 1 |
348
|
|
|
|
|
|
|
} |
349
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
350
|
|
|
|
|
|
|
# char => ')' |
351
|
|
|
|
|
|
|
# context => '#pop' |
352
|
|
|
|
|
|
|
# type => 'DetectChar' |
353
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { |
354
|
0
|
|
|
|
|
|
return 1 |
355
|
|
|
|
|
|
|
} |
356
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
357
|
|
|
|
|
|
|
# char => ';' |
358
|
|
|
|
|
|
|
# context => '#pop' |
359
|
|
|
|
|
|
|
# type => 'DetectChar' |
360
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { |
361
|
0
|
|
|
|
|
|
return 1 |
362
|
|
|
|
|
|
|
} |
363
|
0
|
|
|
|
|
|
return 0; |
364
|
|
|
|
|
|
|
}; |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
sub parseModuleName { |
367
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
368
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
369
|
|
|
|
|
|
|
# char => ',' |
370
|
|
|
|
|
|
|
# context => '#stay' |
371
|
|
|
|
|
|
|
# type => 'DetectChar' |
372
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { |
373
|
0
|
|
|
|
|
|
return 1 |
374
|
|
|
|
|
|
|
} |
375
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
376
|
|
|
|
|
|
|
# char => ';' |
377
|
|
|
|
|
|
|
# context => '#pop' |
378
|
|
|
|
|
|
|
# type => 'DetectChar' |
379
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { |
380
|
0
|
|
|
|
|
|
return 1 |
381
|
|
|
|
|
|
|
} |
382
|
|
|
|
|
|
|
# attribute => 'Comment' |
383
|
|
|
|
|
|
|
# char => '/' |
384
|
|
|
|
|
|
|
# char1 => '/' |
385
|
|
|
|
|
|
|
# context => 'CommentLine' |
386
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
387
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'CommentLine', 'Comment')) { |
388
|
0
|
|
|
|
|
|
return 1 |
389
|
|
|
|
|
|
|
} |
390
|
|
|
|
|
|
|
# attribute => 'Comment' |
391
|
|
|
|
|
|
|
# beginRegion => 'CommentA' |
392
|
|
|
|
|
|
|
# char => '/' |
393
|
|
|
|
|
|
|
# char1 => '*' |
394
|
|
|
|
|
|
|
# context => 'CommentBlockA' |
395
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
396
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'CommentBlockA', 'Comment')) { |
397
|
0
|
|
|
|
|
|
return 1 |
398
|
|
|
|
|
|
|
} |
399
|
|
|
|
|
|
|
# attribute => 'Comment' |
400
|
|
|
|
|
|
|
# beginRegion => 'CommentB' |
401
|
|
|
|
|
|
|
# char => '/' |
402
|
|
|
|
|
|
|
# char1 => '+' |
403
|
|
|
|
|
|
|
# context => 'CommentBlockB' |
404
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
405
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '+', 0, 0, 0, undef, 0, 'CommentBlockB', 'Comment')) { |
406
|
0
|
|
|
|
|
|
return 1 |
407
|
|
|
|
|
|
|
} |
408
|
0
|
|
|
|
|
|
return 0; |
409
|
|
|
|
|
|
|
}; |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
sub parsePragmas { |
412
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
413
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
414
|
|
|
|
|
|
|
# char => '(' |
415
|
|
|
|
|
|
|
# context => '#stay' |
416
|
|
|
|
|
|
|
# type => 'DetectChar' |
417
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { |
418
|
0
|
|
|
|
|
|
return 1 |
419
|
|
|
|
|
|
|
} |
420
|
|
|
|
|
|
|
# String => 'ptypes' |
421
|
|
|
|
|
|
|
# attribute => 'Version Type' |
422
|
|
|
|
|
|
|
# context => '#stay' |
423
|
|
|
|
|
|
|
# type => 'keyword' |
424
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'ptypes', 0, undef, 0, '#stay', 'Version Type')) { |
425
|
0
|
|
|
|
|
|
return 1 |
426
|
|
|
|
|
|
|
} |
427
|
|
|
|
|
|
|
# String => 'vtypes' |
428
|
|
|
|
|
|
|
# attribute => 'Version Type' |
429
|
|
|
|
|
|
|
# context => '#stay' |
430
|
|
|
|
|
|
|
# type => 'keyword' |
431
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'vtypes', 0, undef, 0, '#stay', 'Version Type')) { |
432
|
0
|
|
|
|
|
|
return 1 |
433
|
|
|
|
|
|
|
} |
434
|
|
|
|
|
|
|
# String => '[_a-z][\w]*' |
435
|
|
|
|
|
|
|
# attribute => 'Keyword' |
436
|
|
|
|
|
|
|
# context => '#pop' |
437
|
|
|
|
|
|
|
# insensitive => 'true' |
438
|
|
|
|
|
|
|
# type => 'RegExpr' |
439
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[_a-z][\\w]*', 1, 0, 0, undef, 0, '#pop', 'Keyword')) { |
440
|
0
|
|
|
|
|
|
return 1 |
441
|
|
|
|
|
|
|
} |
442
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
443
|
|
|
|
|
|
|
# char => ',' |
444
|
|
|
|
|
|
|
# context => '#pop' |
445
|
|
|
|
|
|
|
# type => 'DetectChar' |
446
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { |
447
|
0
|
|
|
|
|
|
return 1 |
448
|
|
|
|
|
|
|
} |
449
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
450
|
|
|
|
|
|
|
# char => ')' |
451
|
|
|
|
|
|
|
# context => '#pop' |
452
|
|
|
|
|
|
|
# type => 'DetectChar' |
453
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { |
454
|
0
|
|
|
|
|
|
return 1 |
455
|
|
|
|
|
|
|
} |
456
|
0
|
|
|
|
|
|
return 0; |
457
|
|
|
|
|
|
|
}; |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
sub parseString { |
460
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
461
|
|
|
|
|
|
|
# attribute => 'String' |
462
|
|
|
|
|
|
|
# char => '"' |
463
|
|
|
|
|
|
|
# context => '#pop' |
464
|
|
|
|
|
|
|
# type => 'DetectChar' |
465
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
466
|
0
|
|
|
|
|
|
return 1 |
467
|
|
|
|
|
|
|
} |
468
|
0
|
|
|
|
|
|
return 0; |
469
|
|
|
|
|
|
|
}; |
470
|
|
|
|
|
|
|
|
471
|
|
|
|
|
|
|
sub parseVersion { |
472
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
473
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
474
|
|
|
|
|
|
|
# char => '=' |
475
|
|
|
|
|
|
|
# context => '#pop' |
476
|
|
|
|
|
|
|
# type => 'DetectChar' |
477
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { |
478
|
0
|
|
|
|
|
|
return 1 |
479
|
|
|
|
|
|
|
} |
480
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
481
|
|
|
|
|
|
|
# char => '(' |
482
|
|
|
|
|
|
|
# context => '#stay' |
483
|
|
|
|
|
|
|
# type => 'DetectChar' |
484
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { |
485
|
0
|
|
|
|
|
|
return 1 |
486
|
|
|
|
|
|
|
} |
487
|
|
|
|
|
|
|
# String => 'vtypes' |
488
|
|
|
|
|
|
|
# attribute => 'Version Type' |
489
|
|
|
|
|
|
|
# context => '#stay' |
490
|
|
|
|
|
|
|
# type => 'keyword' |
491
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'vtypes', 0, undef, 0, '#stay', 'Version Type')) { |
492
|
0
|
|
|
|
|
|
return 1 |
493
|
|
|
|
|
|
|
} |
494
|
|
|
|
|
|
|
# String => '\w' |
495
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
496
|
|
|
|
|
|
|
# context => '#pop' |
497
|
|
|
|
|
|
|
# insensitive => 'true' |
498
|
|
|
|
|
|
|
# type => 'RegExpr' |
499
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\w', 1, 0, 0, undef, 0, '#pop', 'Normal Text')) { |
500
|
0
|
|
|
|
|
|
return 1 |
501
|
|
|
|
|
|
|
} |
502
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
503
|
|
|
|
|
|
|
# char => ')' |
504
|
|
|
|
|
|
|
# context => '#pop' |
505
|
|
|
|
|
|
|
# type => 'DetectChar' |
506
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { |
507
|
0
|
|
|
|
|
|
return 1 |
508
|
|
|
|
|
|
|
} |
509
|
0
|
|
|
|
|
|
return 0; |
510
|
|
|
|
|
|
|
}; |
511
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
sub parseWysiwyg { |
513
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
514
|
|
|
|
|
|
|
# attribute => 'Wysiwyg' |
515
|
|
|
|
|
|
|
# char => '"' |
516
|
|
|
|
|
|
|
# context => '#pop' |
517
|
|
|
|
|
|
|
# type => 'DetectChar' |
518
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Wysiwyg')) { |
519
|
0
|
|
|
|
|
|
return 1 |
520
|
|
|
|
|
|
|
} |
521
|
|
|
|
|
|
|
# attribute => 'Wysiwyg' |
522
|
|
|
|
|
|
|
# char => '`' |
523
|
|
|
|
|
|
|
# context => '#pop' |
524
|
|
|
|
|
|
|
# type => 'DetectChar' |
525
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, '#pop', 'Wysiwyg')) { |
526
|
0
|
|
|
|
|
|
return 1 |
527
|
|
|
|
|
|
|
} |
528
|
0
|
|
|
|
|
|
return 0; |
529
|
|
|
|
|
|
|
}; |
530
|
|
|
|
|
|
|
|
531
|
|
|
|
|
|
|
sub parsenormal { |
532
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
533
|
|
|
|
|
|
|
# String => 'keywords' |
534
|
|
|
|
|
|
|
# attribute => 'Keyword' |
535
|
|
|
|
|
|
|
# context => '#stay' |
536
|
|
|
|
|
|
|
# type => 'keyword' |
537
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { |
538
|
0
|
|
|
|
|
|
return 1 |
539
|
|
|
|
|
|
|
} |
540
|
|
|
|
|
|
|
# String => 'modules' |
541
|
|
|
|
|
|
|
# attribute => 'Module' |
542
|
|
|
|
|
|
|
# context => 'ModuleName' |
543
|
|
|
|
|
|
|
# type => 'keyword' |
544
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'modules', 0, undef, 0, 'ModuleName', 'Module')) { |
545
|
0
|
|
|
|
|
|
return 1 |
546
|
|
|
|
|
|
|
} |
547
|
|
|
|
|
|
|
# String => 'types' |
548
|
|
|
|
|
|
|
# attribute => 'Type' |
549
|
|
|
|
|
|
|
# context => '#stay' |
550
|
|
|
|
|
|
|
# type => 'keyword' |
551
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Type')) { |
552
|
0
|
|
|
|
|
|
return 1 |
553
|
|
|
|
|
|
|
} |
554
|
|
|
|
|
|
|
# String => 'phobos' |
555
|
|
|
|
|
|
|
# attribute => 'Phobos Library' |
556
|
|
|
|
|
|
|
# context => '#stay' |
557
|
|
|
|
|
|
|
# type => 'keyword' |
558
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'phobos', 0, undef, 0, '#stay', 'Phobos Library')) { |
559
|
0
|
|
|
|
|
|
return 1 |
560
|
|
|
|
|
|
|
} |
561
|
|
|
|
|
|
|
# String => 'linkage' |
562
|
|
|
|
|
|
|
# attribute => 'Linkage' |
563
|
|
|
|
|
|
|
# context => 'Linkage' |
564
|
|
|
|
|
|
|
# type => 'keyword' |
565
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'linkage', 0, undef, 0, 'Linkage', 'Linkage')) { |
566
|
0
|
|
|
|
|
|
return 1 |
567
|
|
|
|
|
|
|
} |
568
|
|
|
|
|
|
|
# String => 'debug' |
569
|
|
|
|
|
|
|
# attribute => 'Debug' |
570
|
|
|
|
|
|
|
# context => '#stay' |
571
|
|
|
|
|
|
|
# type => 'keyword' |
572
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'debug', 0, undef, 0, '#stay', 'Debug')) { |
573
|
0
|
|
|
|
|
|
return 1 |
574
|
|
|
|
|
|
|
} |
575
|
|
|
|
|
|
|
# String => 'assert' |
576
|
|
|
|
|
|
|
# attribute => 'Assert' |
577
|
|
|
|
|
|
|
# context => '#stay' |
578
|
|
|
|
|
|
|
# type => 'keyword' |
579
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'assert', 0, undef, 0, '#stay', 'Assert')) { |
580
|
0
|
|
|
|
|
|
return 1 |
581
|
|
|
|
|
|
|
} |
582
|
|
|
|
|
|
|
# String => 'pragma' |
583
|
|
|
|
|
|
|
# attribute => 'Pragma' |
584
|
|
|
|
|
|
|
# context => 'Pragmas' |
585
|
|
|
|
|
|
|
# type => 'keyword' |
586
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'pragma', 0, undef, 0, 'Pragmas', 'Pragma')) { |
587
|
0
|
|
|
|
|
|
return 1 |
588
|
|
|
|
|
|
|
} |
589
|
|
|
|
|
|
|
# String => 'version' |
590
|
|
|
|
|
|
|
# attribute => 'Version' |
591
|
|
|
|
|
|
|
# context => 'Version' |
592
|
|
|
|
|
|
|
# type => 'keyword' |
593
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'version', 0, undef, 0, 'Version', 'Version')) { |
594
|
0
|
|
|
|
|
|
return 1 |
595
|
|
|
|
|
|
|
} |
596
|
|
|
|
|
|
|
# String => 'unittest' |
597
|
|
|
|
|
|
|
# attribute => 'Unit Test' |
598
|
|
|
|
|
|
|
# context => '#stay' |
599
|
|
|
|
|
|
|
# type => 'keyword' |
600
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'unittest', 0, undef, 0, '#stay', 'Unit Test')) { |
601
|
0
|
|
|
|
|
|
return 1 |
602
|
|
|
|
|
|
|
} |
603
|
|
|
|
|
|
|
# attribute => 'Wysiwyg' |
604
|
|
|
|
|
|
|
# char => 'r' |
605
|
|
|
|
|
|
|
# char1 => '"' |
606
|
|
|
|
|
|
|
# context => 'Wysiwyg' |
607
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
608
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, 'r', '"', 0, 0, 0, undef, 0, 'Wysiwyg', 'Wysiwyg')) { |
609
|
0
|
|
|
|
|
|
return 1 |
610
|
|
|
|
|
|
|
} |
611
|
|
|
|
|
|
|
# attribute => 'Hex' |
612
|
|
|
|
|
|
|
# char => 'x' |
613
|
|
|
|
|
|
|
# char1 => '"' |
614
|
|
|
|
|
|
|
# context => 'Hex' |
615
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
616
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, 'x', '"', 0, 0, 0, undef, 0, 'Hex', 'Hex')) { |
617
|
0
|
|
|
|
|
|
return 1 |
618
|
|
|
|
|
|
|
} |
619
|
|
|
|
|
|
|
# String => '[_a-z][\w]*' |
620
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
621
|
|
|
|
|
|
|
# context => '#pop' |
622
|
|
|
|
|
|
|
# insensitive => 'true' |
623
|
|
|
|
|
|
|
# type => 'RegExpr' |
624
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[_a-z][\\w]*', 1, 0, 0, undef, 0, '#pop', 'Normal Text')) { |
625
|
0
|
|
|
|
|
|
return 1 |
626
|
|
|
|
|
|
|
} |
627
|
|
|
|
|
|
|
# String => '\#[ ]*line' |
628
|
|
|
|
|
|
|
# attribute => 'Pragma' |
629
|
|
|
|
|
|
|
# context => '#pop' |
630
|
|
|
|
|
|
|
# type => 'RegExpr' |
631
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\#[ ]*line', 0, 0, 0, undef, 0, '#pop', 'Pragma')) { |
632
|
0
|
|
|
|
|
|
return 1 |
633
|
|
|
|
|
|
|
} |
634
|
|
|
|
|
|
|
# String => '\\[n|t|"]' |
635
|
|
|
|
|
|
|
# attribute => 'Escape String' |
636
|
|
|
|
|
|
|
# context => '#pop' |
637
|
|
|
|
|
|
|
# type => 'RegExpr' |
638
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\\\[n|t|"]', 0, 0, 0, undef, 0, '#pop', 'Escape String')) { |
639
|
0
|
|
|
|
|
|
return 1 |
640
|
|
|
|
|
|
|
} |
641
|
|
|
|
|
|
|
# String => '(\\r\\n)' |
642
|
|
|
|
|
|
|
# attribute => 'Escape String' |
643
|
|
|
|
|
|
|
# context => '#pop' |
644
|
|
|
|
|
|
|
# type => 'RegExpr' |
645
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '(\\\\r\\\\n)', 0, 0, 0, undef, 0, '#pop', 'Escape String')) { |
646
|
0
|
|
|
|
|
|
return 1 |
647
|
|
|
|
|
|
|
} |
648
|
|
|
|
|
|
|
# String => '\\0[0-7]+' |
649
|
|
|
|
|
|
|
# attribute => 'Escape String' |
650
|
|
|
|
|
|
|
# context => '#pop' |
651
|
|
|
|
|
|
|
# type => 'RegExpr' |
652
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\\\0[0-7]+', 0, 0, 0, undef, 0, '#pop', 'Escape String')) { |
653
|
0
|
|
|
|
|
|
return 1 |
654
|
|
|
|
|
|
|
} |
655
|
|
|
|
|
|
|
# String => '\\u[\d]+' |
656
|
|
|
|
|
|
|
# attribute => 'Escape String' |
657
|
|
|
|
|
|
|
# context => '#pop' |
658
|
|
|
|
|
|
|
# insensitive => 'true' |
659
|
|
|
|
|
|
|
# type => 'RegExpr' |
660
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\\\u[\\d]+', 1, 0, 0, undef, 0, '#pop', 'Escape String')) { |
661
|
0
|
|
|
|
|
|
return 1 |
662
|
|
|
|
|
|
|
} |
663
|
|
|
|
|
|
|
# String => '\\x[\da-fA-F]+' |
664
|
|
|
|
|
|
|
# attribute => 'Escape String' |
665
|
|
|
|
|
|
|
# context => '#pop' |
666
|
|
|
|
|
|
|
# type => 'RegExpr' |
667
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\\\x[\\da-fA-F]+', 0, 0, 0, undef, 0, '#pop', 'Escape String')) { |
668
|
0
|
|
|
|
|
|
return 1 |
669
|
|
|
|
|
|
|
} |
670
|
|
|
|
|
|
|
# String => '0b[01]+[_01]*[ ]*\.\.[ ]*0b[01]+[_01]*(UL|LU|U|L)?' |
671
|
|
|
|
|
|
|
# attribute => 'Binary' |
672
|
|
|
|
|
|
|
# context => '#pop' |
673
|
|
|
|
|
|
|
# insensitive => 'true' |
674
|
|
|
|
|
|
|
# type => 'RegExpr' |
675
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0b[01]+[_01]*[ ]*\\.\\.[ ]*0b[01]+[_01]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Binary')) { |
676
|
0
|
|
|
|
|
|
return 1 |
677
|
|
|
|
|
|
|
} |
678
|
|
|
|
|
|
|
# String => '0[0-7]+[_0-7]*[ ]*\.\.[ ]*0[0-7]+[_0-7]*(UL|LU|U|L)?' |
679
|
|
|
|
|
|
|
# attribute => 'Octal' |
680
|
|
|
|
|
|
|
# context => '#pop' |
681
|
|
|
|
|
|
|
# insensitive => 'true' |
682
|
|
|
|
|
|
|
# type => 'RegExpr' |
683
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0[0-7]+[_0-7]*[ ]*\\.\\.[ ]*0[0-7]+[_0-7]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Octal')) { |
684
|
0
|
|
|
|
|
|
return 1 |
685
|
|
|
|
|
|
|
} |
686
|
|
|
|
|
|
|
# String => '0x[\da-f]+[_\da-f]*[ ]*\.\.[ ]*0x[\da-f]+[_\da-f]*(UL|LU|U|L)?' |
687
|
|
|
|
|
|
|
# attribute => 'Hex' |
688
|
|
|
|
|
|
|
# context => '#pop' |
689
|
|
|
|
|
|
|
# insensitive => 'true' |
690
|
|
|
|
|
|
|
# type => 'RegExpr' |
691
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0x[\\da-f]+[_\\da-f]*[ ]*\\.\\.[ ]*0x[\\da-f]+[_\\da-f]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Hex')) { |
692
|
0
|
|
|
|
|
|
return 1 |
693
|
|
|
|
|
|
|
} |
694
|
|
|
|
|
|
|
# String => '[\d]+[_\d]*(UL|LU|U|L)?[ ]*\.\.[ ]*[\d]+[_\d]*(UL|LU|U|L)?' |
695
|
|
|
|
|
|
|
# attribute => 'Integer' |
696
|
|
|
|
|
|
|
# context => '#pop' |
697
|
|
|
|
|
|
|
# insensitive => 'true' |
698
|
|
|
|
|
|
|
# type => 'RegExpr' |
699
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[\\d]+[_\\d]*(UL|LU|U|L)?[ ]*\\.\\.[ ]*[\\d]+[_\\d]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Integer')) { |
700
|
0
|
|
|
|
|
|
return 1 |
701
|
|
|
|
|
|
|
} |
702
|
|
|
|
|
|
|
# String => '[\d]*[_\d]*\.[_\d]*(e-|e|e\+)?[\d]+[_\d]*(F|L|I|FI|LI|)?' |
703
|
|
|
|
|
|
|
# attribute => 'Float' |
704
|
|
|
|
|
|
|
# context => '#pop' |
705
|
|
|
|
|
|
|
# insensitive => 'true' |
706
|
|
|
|
|
|
|
# type => 'RegExpr' |
707
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[\\d]*[_\\d]*\\.[_\\d]*(e-|e|e\\+)?[\\d]+[_\\d]*(F|L|I|FI|LI|)?', 1, 0, 0, undef, 0, '#pop', 'Float')) { |
708
|
0
|
|
|
|
|
|
return 1 |
709
|
|
|
|
|
|
|
} |
710
|
|
|
|
|
|
|
# String => '[\d]*[_\d]*\.?[_\d]*(e-|e|e\+)[\d]+[_\d]*(F|L|I|FI|LI|)?' |
711
|
|
|
|
|
|
|
# attribute => 'Float' |
712
|
|
|
|
|
|
|
# context => '#pop' |
713
|
|
|
|
|
|
|
# insensitive => 'true' |
714
|
|
|
|
|
|
|
# type => 'RegExpr' |
715
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[\\d]*[_\\d]*\\.?[_\\d]*(e-|e|e\\+)[\\d]+[_\\d]*(F|L|I|FI|LI|)?', 1, 0, 0, undef, 0, '#pop', 'Float')) { |
716
|
0
|
|
|
|
|
|
return 1 |
717
|
|
|
|
|
|
|
} |
718
|
|
|
|
|
|
|
# String => '0x[\da-f]+[_\da-f]*\.[_\da-f]*(p-|p|p\+)?[\da-f]+[_\da-f]*(F|L|I|FI|LI)?' |
719
|
|
|
|
|
|
|
# attribute => 'Float' |
720
|
|
|
|
|
|
|
# context => '#pop' |
721
|
|
|
|
|
|
|
# insensitive => 'true' |
722
|
|
|
|
|
|
|
# type => 'RegExpr' |
723
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0x[\\da-f]+[_\\da-f]*\\.[_\\da-f]*(p-|p|p\\+)?[\\da-f]+[_\\da-f]*(F|L|I|FI|LI)?', 1, 0, 0, undef, 0, '#pop', 'Float')) { |
724
|
0
|
|
|
|
|
|
return 1 |
725
|
|
|
|
|
|
|
} |
726
|
|
|
|
|
|
|
# String => '0x[\da-f]+[_\da-f]*\.?[_\da-f]*(p-|p|p\+)[\da-f]+[_\da-f]*(F|L|I|FI|LI)?' |
727
|
|
|
|
|
|
|
# attribute => 'Float' |
728
|
|
|
|
|
|
|
# context => '#pop' |
729
|
|
|
|
|
|
|
# insensitive => 'true' |
730
|
|
|
|
|
|
|
# type => 'RegExpr' |
731
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0x[\\da-f]+[_\\da-f]*\\.?[_\\da-f]*(p-|p|p\\+)[\\da-f]+[_\\da-f]*(F|L|I|FI|LI)?', 1, 0, 0, undef, 0, '#pop', 'Float')) { |
732
|
0
|
|
|
|
|
|
return 1 |
733
|
|
|
|
|
|
|
} |
734
|
|
|
|
|
|
|
# String => '0B[01]+[_01]*(UL|LU|U|L)?' |
735
|
|
|
|
|
|
|
# attribute => 'Binary' |
736
|
|
|
|
|
|
|
# context => '#pop' |
737
|
|
|
|
|
|
|
# insensitive => 'true' |
738
|
|
|
|
|
|
|
# type => 'RegExpr' |
739
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0B[01]+[_01]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Binary')) { |
740
|
0
|
|
|
|
|
|
return 1 |
741
|
|
|
|
|
|
|
} |
742
|
|
|
|
|
|
|
# String => '0[0-7]+[_0-7]*(UL|LU|U|L)?' |
743
|
|
|
|
|
|
|
# attribute => 'Octal' |
744
|
|
|
|
|
|
|
# context => '#pop' |
745
|
|
|
|
|
|
|
# insensitive => 'true' |
746
|
|
|
|
|
|
|
# type => 'RegExpr' |
747
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0[0-7]+[_0-7]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Octal')) { |
748
|
0
|
|
|
|
|
|
return 1 |
749
|
|
|
|
|
|
|
} |
750
|
|
|
|
|
|
|
# String => '0x[\da-f]+[_\da-f]*(UL|LU|U|L)?' |
751
|
|
|
|
|
|
|
# attribute => 'Hex' |
752
|
|
|
|
|
|
|
# context => '#pop' |
753
|
|
|
|
|
|
|
# insensitive => 'true' |
754
|
|
|
|
|
|
|
# type => 'RegExpr' |
755
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0x[\\da-f]+[_\\da-f]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Hex')) { |
756
|
0
|
|
|
|
|
|
return 1 |
757
|
|
|
|
|
|
|
} |
758
|
|
|
|
|
|
|
# String => '[\d]+[_\d]*(UL|LU|U|L)?' |
759
|
|
|
|
|
|
|
# attribute => 'Integer' |
760
|
|
|
|
|
|
|
# context => '#pop' |
761
|
|
|
|
|
|
|
# insensitive => 'true' |
762
|
|
|
|
|
|
|
# type => 'RegExpr' |
763
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[\\d]+[_\\d]*(UL|LU|U|L)?', 1, 0, 0, undef, 0, '#pop', 'Integer')) { |
764
|
0
|
|
|
|
|
|
return 1 |
765
|
|
|
|
|
|
|
} |
766
|
|
|
|
|
|
|
# attribute => 'Char' |
767
|
|
|
|
|
|
|
# char => ''' |
768
|
|
|
|
|
|
|
# context => 'Char' |
769
|
|
|
|
|
|
|
# type => 'DetectChar' |
770
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Char', 'Char')) { |
771
|
0
|
|
|
|
|
|
return 1 |
772
|
|
|
|
|
|
|
} |
773
|
|
|
|
|
|
|
# attribute => 'String' |
774
|
|
|
|
|
|
|
# char => '"' |
775
|
|
|
|
|
|
|
# context => 'String' |
776
|
|
|
|
|
|
|
# type => 'DetectChar' |
777
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { |
778
|
0
|
|
|
|
|
|
return 1 |
779
|
|
|
|
|
|
|
} |
780
|
|
|
|
|
|
|
# attribute => 'Wysiwyg' |
781
|
|
|
|
|
|
|
# char => '`' |
782
|
|
|
|
|
|
|
# context => 'Wysiwyg' |
783
|
|
|
|
|
|
|
# type => 'DetectChar' |
784
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, 'Wysiwyg', 'Wysiwyg')) { |
785
|
0
|
|
|
|
|
|
return 1 |
786
|
|
|
|
|
|
|
} |
787
|
|
|
|
|
|
|
# attribute => 'Comment' |
788
|
|
|
|
|
|
|
# char => '/' |
789
|
|
|
|
|
|
|
# char1 => '/' |
790
|
|
|
|
|
|
|
# context => 'CommentLine' |
791
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
792
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'CommentLine', 'Comment')) { |
793
|
0
|
|
|
|
|
|
return 1 |
794
|
|
|
|
|
|
|
} |
795
|
|
|
|
|
|
|
# attribute => 'Comment' |
796
|
|
|
|
|
|
|
# beginRegion => 'CommentA' |
797
|
|
|
|
|
|
|
# char => '/' |
798
|
|
|
|
|
|
|
# char1 => '*' |
799
|
|
|
|
|
|
|
# context => 'CommentBlockA' |
800
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
801
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'CommentBlockA', 'Comment')) { |
802
|
0
|
|
|
|
|
|
return 1 |
803
|
|
|
|
|
|
|
} |
804
|
|
|
|
|
|
|
# attribute => 'Comment' |
805
|
|
|
|
|
|
|
# beginRegion => 'CommentB' |
806
|
|
|
|
|
|
|
# char => '/' |
807
|
|
|
|
|
|
|
# char1 => '+' |
808
|
|
|
|
|
|
|
# context => 'CommentBlockB' |
809
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
810
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '+', 0, 0, 0, undef, 0, 'CommentBlockB', 'Comment')) { |
811
|
0
|
|
|
|
|
|
return 1 |
812
|
|
|
|
|
|
|
} |
813
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
814
|
|
|
|
|
|
|
# beginRegion => 'BraceA' |
815
|
|
|
|
|
|
|
# char => '{' |
816
|
|
|
|
|
|
|
# context => '#stay' |
817
|
|
|
|
|
|
|
# type => 'DetectChar' |
818
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { |
819
|
0
|
|
|
|
|
|
return 1 |
820
|
|
|
|
|
|
|
} |
821
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
822
|
|
|
|
|
|
|
# char => '}' |
823
|
|
|
|
|
|
|
# context => '#stay' |
824
|
|
|
|
|
|
|
# endRegion => 'BraceA' |
825
|
|
|
|
|
|
|
# type => 'DetectChar' |
826
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { |
827
|
0
|
|
|
|
|
|
return 1 |
828
|
|
|
|
|
|
|
} |
829
|
0
|
|
|
|
|
|
return 0; |
830
|
|
|
|
|
|
|
}; |
831
|
|
|
|
|
|
|
|
832
|
|
|
|
|
|
|
|
833
|
|
|
|
|
|
|
1; |
834
|
|
|
|
|
|
|
|
835
|
|
|
|
|
|
|
__END__ |