| 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 'asp.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 Antonio Salazar (savedfastcool@gmail.com) |
|
11
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:04 2008, localtime |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::ASP; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
|
16
|
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
583
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
42
|
|
|
18
|
1
|
|
|
1
|
|
9
|
use warnings; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
48
|
|
|
19
|
1
|
|
|
1
|
|
7
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
3339
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
|
22
|
2
|
|
|
2
|
0
|
1038
|
my $proto = shift; |
|
23
|
2
|
|
33
|
|
|
15
|
my $class = ref($proto) || $proto; |
|
24
|
2
|
|
|
|
|
18
|
my $self = $class->SUPER::new(@_); |
|
25
|
2
|
|
|
|
|
43
|
$self->attributes({ |
|
26
|
|
|
|
|
|
|
'ASP Text' => 'Normal', |
|
27
|
|
|
|
|
|
|
'Comment' => 'Comment', |
|
28
|
|
|
|
|
|
|
'Control Structures' => 'Operator', |
|
29
|
|
|
|
|
|
|
'Decimal' => 'DecVal', |
|
30
|
|
|
|
|
|
|
'Escape Code' => 'Char', |
|
31
|
|
|
|
|
|
|
'Float' => 'Float', |
|
32
|
|
|
|
|
|
|
'Function' => 'Function', |
|
33
|
|
|
|
|
|
|
'HTML Comment' => 'Comment', |
|
34
|
|
|
|
|
|
|
'HTML Tag' => 'BString', |
|
35
|
|
|
|
|
|
|
'Hex' => 'BaseN', |
|
36
|
|
|
|
|
|
|
'Identifier' => 'Others', |
|
37
|
|
|
|
|
|
|
'Keyword' => 'Keyword', |
|
38
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
|
39
|
|
|
|
|
|
|
'Octal' => 'BaseN', |
|
40
|
|
|
|
|
|
|
'Other' => 'Others', |
|
41
|
|
|
|
|
|
|
'String' => 'String', |
|
42
|
|
|
|
|
|
|
'Types' => 'DataType', |
|
43
|
|
|
|
|
|
|
'Variable' => 'Variable', |
|
44
|
|
|
|
|
|
|
}); |
|
45
|
2
|
|
|
|
|
18
|
$self->listAdd('control structures', |
|
46
|
|
|
|
|
|
|
'case', |
|
47
|
|
|
|
|
|
|
'continue', |
|
48
|
|
|
|
|
|
|
'do', |
|
49
|
|
|
|
|
|
|
'each', |
|
50
|
|
|
|
|
|
|
'else', |
|
51
|
|
|
|
|
|
|
'elseif', |
|
52
|
|
|
|
|
|
|
'end if', |
|
53
|
|
|
|
|
|
|
'end select', |
|
54
|
|
|
|
|
|
|
'exit', |
|
55
|
|
|
|
|
|
|
'for', |
|
56
|
|
|
|
|
|
|
'if', |
|
57
|
|
|
|
|
|
|
'in', |
|
58
|
|
|
|
|
|
|
'loop', |
|
59
|
|
|
|
|
|
|
'next', |
|
60
|
|
|
|
|
|
|
'select', |
|
61
|
|
|
|
|
|
|
'then', |
|
62
|
|
|
|
|
|
|
'to', |
|
63
|
|
|
|
|
|
|
'until', |
|
64
|
|
|
|
|
|
|
'wend', |
|
65
|
|
|
|
|
|
|
'while', |
|
66
|
|
|
|
|
|
|
); |
|
67
|
2
|
|
|
|
|
19
|
$self->listAdd('functions', |
|
68
|
|
|
|
|
|
|
'Add', |
|
69
|
|
|
|
|
|
|
'AddFolders', |
|
70
|
|
|
|
|
|
|
'BuildPath', |
|
71
|
|
|
|
|
|
|
'Clear', |
|
72
|
|
|
|
|
|
|
'Close', |
|
73
|
|
|
|
|
|
|
'Copy', |
|
74
|
|
|
|
|
|
|
'CopyFile', |
|
75
|
|
|
|
|
|
|
'CopyFolder', |
|
76
|
|
|
|
|
|
|
'CreateFolder', |
|
77
|
|
|
|
|
|
|
'CreateTextFile', |
|
78
|
|
|
|
|
|
|
'Date', |
|
79
|
|
|
|
|
|
|
'DateDiff', |
|
80
|
|
|
|
|
|
|
'DatePart', |
|
81
|
|
|
|
|
|
|
'DateSerial', |
|
82
|
|
|
|
|
|
|
'DateValue', |
|
83
|
|
|
|
|
|
|
'Day', |
|
84
|
|
|
|
|
|
|
'Delete', |
|
85
|
|
|
|
|
|
|
'DeleteFile', |
|
86
|
|
|
|
|
|
|
'DeleteFolder', |
|
87
|
|
|
|
|
|
|
'DriveExists', |
|
88
|
|
|
|
|
|
|
'Exists', |
|
89
|
|
|
|
|
|
|
'Exp', |
|
90
|
|
|
|
|
|
|
'FileExists', |
|
91
|
|
|
|
|
|
|
'Filter', |
|
92
|
|
|
|
|
|
|
'Fix', |
|
93
|
|
|
|
|
|
|
'FolderExists', |
|
94
|
|
|
|
|
|
|
'FormatCurrency', |
|
95
|
|
|
|
|
|
|
'FormatDateTime', |
|
96
|
|
|
|
|
|
|
'FormatNumber', |
|
97
|
|
|
|
|
|
|
'FormatPercent', |
|
98
|
|
|
|
|
|
|
'GetAbsolutePathName', |
|
99
|
|
|
|
|
|
|
'GetBaseName', |
|
100
|
|
|
|
|
|
|
'GetDrive', |
|
101
|
|
|
|
|
|
|
'GetDriveName', |
|
102
|
|
|
|
|
|
|
'GetExtensionName', |
|
103
|
|
|
|
|
|
|
'GetFile', |
|
104
|
|
|
|
|
|
|
'GetFileName', |
|
105
|
|
|
|
|
|
|
'GetFolder', |
|
106
|
|
|
|
|
|
|
'GetObject', |
|
107
|
|
|
|
|
|
|
'GetParentFolderName', |
|
108
|
|
|
|
|
|
|
'GetSpecialFolder', |
|
109
|
|
|
|
|
|
|
'GetTempName', |
|
110
|
|
|
|
|
|
|
'Hex', |
|
111
|
|
|
|
|
|
|
'Hour', |
|
112
|
|
|
|
|
|
|
'InStr', |
|
113
|
|
|
|
|
|
|
'InStrRev', |
|
114
|
|
|
|
|
|
|
'InputBox', |
|
115
|
|
|
|
|
|
|
'Int', |
|
116
|
|
|
|
|
|
|
'IsArray', |
|
117
|
|
|
|
|
|
|
'IsDate', |
|
118
|
|
|
|
|
|
|
'IsEmpty', |
|
119
|
|
|
|
|
|
|
'IsNull', |
|
120
|
|
|
|
|
|
|
'IsNumeric', |
|
121
|
|
|
|
|
|
|
'IsObject', |
|
122
|
|
|
|
|
|
|
'Items', |
|
123
|
|
|
|
|
|
|
'Join', |
|
124
|
|
|
|
|
|
|
'Keys', |
|
125
|
|
|
|
|
|
|
'LBound', |
|
126
|
|
|
|
|
|
|
'LCase', |
|
127
|
|
|
|
|
|
|
'LTrim', |
|
128
|
|
|
|
|
|
|
'Left', |
|
129
|
|
|
|
|
|
|
'Len', |
|
130
|
|
|
|
|
|
|
'LoadPicture', |
|
131
|
|
|
|
|
|
|
'Log', |
|
132
|
|
|
|
|
|
|
'Mid', |
|
133
|
|
|
|
|
|
|
'Minute', |
|
134
|
|
|
|
|
|
|
'Month', |
|
135
|
|
|
|
|
|
|
'MonthName', |
|
136
|
|
|
|
|
|
|
'Move', |
|
137
|
|
|
|
|
|
|
'MoveFile', |
|
138
|
|
|
|
|
|
|
'MoveFolder', |
|
139
|
|
|
|
|
|
|
'MsgBox', |
|
140
|
|
|
|
|
|
|
'Now', |
|
141
|
|
|
|
|
|
|
'Oct', |
|
142
|
|
|
|
|
|
|
'OpenAsTextStream', |
|
143
|
|
|
|
|
|
|
'OpenTextFile', |
|
144
|
|
|
|
|
|
|
'RGB', |
|
145
|
|
|
|
|
|
|
'RTrim', |
|
146
|
|
|
|
|
|
|
'Raise', |
|
147
|
|
|
|
|
|
|
'Read', |
|
148
|
|
|
|
|
|
|
'ReadAll', |
|
149
|
|
|
|
|
|
|
'ReadLine', |
|
150
|
|
|
|
|
|
|
'Remove', |
|
151
|
|
|
|
|
|
|
'RemoveAll', |
|
152
|
|
|
|
|
|
|
'Replace', |
|
153
|
|
|
|
|
|
|
'Right', |
|
154
|
|
|
|
|
|
|
'Rnd', |
|
155
|
|
|
|
|
|
|
'Round', |
|
156
|
|
|
|
|
|
|
'ScriptEngine', |
|
157
|
|
|
|
|
|
|
'ScriptEngineBuildVersion', |
|
158
|
|
|
|
|
|
|
'ScriptEngineMajorVersion', |
|
159
|
|
|
|
|
|
|
'ScriptEngineMinorVersion', |
|
160
|
|
|
|
|
|
|
'Second', |
|
161
|
|
|
|
|
|
|
'Sgn', |
|
162
|
|
|
|
|
|
|
'Sin', |
|
163
|
|
|
|
|
|
|
'Skip', |
|
164
|
|
|
|
|
|
|
'SkipLine', |
|
165
|
|
|
|
|
|
|
'Space', |
|
166
|
|
|
|
|
|
|
'Split', |
|
167
|
|
|
|
|
|
|
'Sqr', |
|
168
|
|
|
|
|
|
|
'StrComp', |
|
169
|
|
|
|
|
|
|
'StrReverse', |
|
170
|
|
|
|
|
|
|
'String', |
|
171
|
|
|
|
|
|
|
'Tan', |
|
172
|
|
|
|
|
|
|
'Time', |
|
173
|
|
|
|
|
|
|
'TimeSerial', |
|
174
|
|
|
|
|
|
|
'TimeValue', |
|
175
|
|
|
|
|
|
|
'Timer', |
|
176
|
|
|
|
|
|
|
'Trim', |
|
177
|
|
|
|
|
|
|
'TypeName', |
|
178
|
|
|
|
|
|
|
'UBound', |
|
179
|
|
|
|
|
|
|
'UCase', |
|
180
|
|
|
|
|
|
|
'VarType', |
|
181
|
|
|
|
|
|
|
'Weekday', |
|
182
|
|
|
|
|
|
|
'WeekdayName', |
|
183
|
|
|
|
|
|
|
'Write', |
|
184
|
|
|
|
|
|
|
'WriteBlankLines', |
|
185
|
|
|
|
|
|
|
'WriteLine', |
|
186
|
|
|
|
|
|
|
'Year', |
|
187
|
|
|
|
|
|
|
'abs', |
|
188
|
|
|
|
|
|
|
'array', |
|
189
|
|
|
|
|
|
|
'asc', |
|
190
|
|
|
|
|
|
|
'atn', |
|
191
|
|
|
|
|
|
|
'cbool', |
|
192
|
|
|
|
|
|
|
'cbyte', |
|
193
|
|
|
|
|
|
|
'ccur', |
|
194
|
|
|
|
|
|
|
'cdate', |
|
195
|
|
|
|
|
|
|
'cdbl', |
|
196
|
|
|
|
|
|
|
'chr', |
|
197
|
|
|
|
|
|
|
'cint', |
|
198
|
|
|
|
|
|
|
'clng', |
|
199
|
|
|
|
|
|
|
'cookies', |
|
200
|
|
|
|
|
|
|
'cos', |
|
201
|
|
|
|
|
|
|
'createobject', |
|
202
|
|
|
|
|
|
|
'csng', |
|
203
|
|
|
|
|
|
|
'cstr', |
|
204
|
|
|
|
|
|
|
'date', |
|
205
|
|
|
|
|
|
|
'dateadd', |
|
206
|
|
|
|
|
|
|
'end', |
|
207
|
|
|
|
|
|
|
'form', |
|
208
|
|
|
|
|
|
|
'item', |
|
209
|
|
|
|
|
|
|
'querystring', |
|
210
|
|
|
|
|
|
|
'redirect', |
|
211
|
|
|
|
|
|
|
'request', |
|
212
|
|
|
|
|
|
|
'response', |
|
213
|
|
|
|
|
|
|
'server', |
|
214
|
|
|
|
|
|
|
'servervariables', |
|
215
|
|
|
|
|
|
|
'session', |
|
216
|
|
|
|
|
|
|
'write', |
|
217
|
|
|
|
|
|
|
); |
|
218
|
2
|
|
|
|
|
11
|
$self->listAdd('keywords', |
|
219
|
|
|
|
|
|
|
'and', |
|
220
|
|
|
|
|
|
|
'call', |
|
221
|
|
|
|
|
|
|
'class', |
|
222
|
|
|
|
|
|
|
'close', |
|
223
|
|
|
|
|
|
|
'const', |
|
224
|
|
|
|
|
|
|
'dim', |
|
225
|
|
|
|
|
|
|
'eof', |
|
226
|
|
|
|
|
|
|
'erase', |
|
227
|
|
|
|
|
|
|
'execute', |
|
228
|
|
|
|
|
|
|
'false', |
|
229
|
|
|
|
|
|
|
'function', |
|
230
|
|
|
|
|
|
|
'me', |
|
231
|
|
|
|
|
|
|
'movenext', |
|
232
|
|
|
|
|
|
|
'new', |
|
233
|
|
|
|
|
|
|
'not', |
|
234
|
|
|
|
|
|
|
'nothing', |
|
235
|
|
|
|
|
|
|
'open', |
|
236
|
|
|
|
|
|
|
'or', |
|
237
|
|
|
|
|
|
|
'preserve', |
|
238
|
|
|
|
|
|
|
'private', |
|
239
|
|
|
|
|
|
|
'public', |
|
240
|
|
|
|
|
|
|
'randomize', |
|
241
|
|
|
|
|
|
|
'redim', |
|
242
|
|
|
|
|
|
|
'set', |
|
243
|
|
|
|
|
|
|
'sub', |
|
244
|
|
|
|
|
|
|
'true', |
|
245
|
|
|
|
|
|
|
'with', |
|
246
|
|
|
|
|
|
|
'xor', |
|
247
|
|
|
|
|
|
|
); |
|
248
|
2
|
|
|
|
|
62
|
$self->contextdata({ |
|
249
|
|
|
|
|
|
|
'asp_onelinecomment' => { |
|
250
|
|
|
|
|
|
|
callback => \&parseasp_onelinecomment, |
|
251
|
|
|
|
|
|
|
attribute => 'Comment', |
|
252
|
|
|
|
|
|
|
lineending => '#pop', |
|
253
|
|
|
|
|
|
|
}, |
|
254
|
|
|
|
|
|
|
'aspsource' => { |
|
255
|
|
|
|
|
|
|
callback => \&parseaspsource, |
|
256
|
|
|
|
|
|
|
attribute => 'ASP Text', |
|
257
|
|
|
|
|
|
|
}, |
|
258
|
|
|
|
|
|
|
'doublequotestring' => { |
|
259
|
|
|
|
|
|
|
callback => \&parsedoublequotestring, |
|
260
|
|
|
|
|
|
|
attribute => 'String', |
|
261
|
|
|
|
|
|
|
}, |
|
262
|
|
|
|
|
|
|
'htmlcomment' => { |
|
263
|
|
|
|
|
|
|
callback => \&parsehtmlcomment, |
|
264
|
|
|
|
|
|
|
attribute => 'HTML Comment', |
|
265
|
|
|
|
|
|
|
}, |
|
266
|
|
|
|
|
|
|
'htmltag' => { |
|
267
|
|
|
|
|
|
|
callback => \&parsehtmltag, |
|
268
|
|
|
|
|
|
|
attribute => 'Identifier', |
|
269
|
|
|
|
|
|
|
}, |
|
270
|
|
|
|
|
|
|
'identifiers' => { |
|
271
|
|
|
|
|
|
|
callback => \&parseidentifiers, |
|
272
|
|
|
|
|
|
|
attribute => 'Identifier', |
|
273
|
|
|
|
|
|
|
}, |
|
274
|
|
|
|
|
|
|
'nosource' => { |
|
275
|
|
|
|
|
|
|
callback => \&parsenosource, |
|
276
|
|
|
|
|
|
|
attribute => 'Normal Text', |
|
277
|
|
|
|
|
|
|
}, |
|
278
|
|
|
|
|
|
|
'scripts' => { |
|
279
|
|
|
|
|
|
|
callback => \&parsescripts, |
|
280
|
|
|
|
|
|
|
attribute => 'Normal Text', |
|
281
|
|
|
|
|
|
|
}, |
|
282
|
|
|
|
|
|
|
'scripts_onelinecomment' => { |
|
283
|
|
|
|
|
|
|
callback => \&parsescripts_onelinecomment, |
|
284
|
|
|
|
|
|
|
attribute => 'Comment', |
|
285
|
|
|
|
|
|
|
lineending => '#pop', |
|
286
|
|
|
|
|
|
|
}, |
|
287
|
|
|
|
|
|
|
'singlequotestring' => { |
|
288
|
|
|
|
|
|
|
callback => \&parsesinglequotestring, |
|
289
|
|
|
|
|
|
|
attribute => 'String', |
|
290
|
|
|
|
|
|
|
}, |
|
291
|
|
|
|
|
|
|
'twolinecomment' => { |
|
292
|
|
|
|
|
|
|
callback => \&parsetwolinecomment, |
|
293
|
|
|
|
|
|
|
attribute => 'Comment', |
|
294
|
|
|
|
|
|
|
}, |
|
295
|
|
|
|
|
|
|
'types1' => { |
|
296
|
|
|
|
|
|
|
callback => \&parsetypes1, |
|
297
|
|
|
|
|
|
|
attribute => 'Types', |
|
298
|
|
|
|
|
|
|
}, |
|
299
|
|
|
|
|
|
|
'types2' => { |
|
300
|
|
|
|
|
|
|
callback => \&parsetypes2, |
|
301
|
|
|
|
|
|
|
attribute => 'Types', |
|
302
|
|
|
|
|
|
|
}, |
|
303
|
|
|
|
|
|
|
}); |
|
304
|
2
|
|
|
|
|
14
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
|
305
|
2
|
|
|
|
|
8
|
$self->basecontext('nosource'); |
|
306
|
2
|
|
|
|
|
14
|
$self->keywordscase(0); |
|
307
|
2
|
|
|
|
|
8
|
$self->initialize; |
|
308
|
2
|
|
|
|
|
7
|
bless ($self, $class); |
|
309
|
2
|
|
|
|
|
13
|
return $self; |
|
310
|
|
|
|
|
|
|
} |
|
311
|
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
sub language { |
|
313
|
0
|
|
|
0
|
0
|
0
|
return 'ASP'; |
|
314
|
|
|
|
|
|
|
} |
|
315
|
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
sub parseasp_onelinecomment { |
|
317
|
660
|
|
|
660
|
0
|
1243
|
my ($self, $text) = @_; |
|
318
|
|
|
|
|
|
|
# String => '%>' |
|
319
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
320
|
|
|
|
|
|
|
# context => '#pop#pop' |
|
321
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
322
|
660
|
50
|
|
|
|
1637
|
if ($self->testStringDetect($text, '%>', 0, 0, 0, undef, 0, '#pop#pop', 'Keyword')) { |
|
323
|
0
|
|
|
|
|
0
|
return 1 |
|
324
|
|
|
|
|
|
|
} |
|
325
|
660
|
|
|
|
|
1387
|
return 0; |
|
326
|
|
|
|
|
|
|
}; |
|
327
|
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
sub parseaspsource { |
|
329
|
1128
|
|
|
1128
|
0
|
2616
|
my ($self, $text) = @_; |
|
330
|
|
|
|
|
|
|
# String => '%>' |
|
331
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
332
|
|
|
|
|
|
|
# context => '#pop' |
|
333
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
334
|
1128
|
100
|
|
|
|
3580
|
if ($self->testStringDetect($text, '%>', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { |
|
335
|
6
|
|
|
|
|
18
|
return 1 |
|
336
|
|
|
|
|
|
|
} |
|
337
|
|
|
|
|
|
|
# attribute => 'Comment' |
|
338
|
|
|
|
|
|
|
# char => ''' |
|
339
|
|
|
|
|
|
|
# context => 'asp_onelinecomment' |
|
340
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
341
|
1122
|
100
|
|
|
|
3575
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'asp_onelinecomment', 'Comment')) { |
|
342
|
16
|
|
|
|
|
47
|
return 1 |
|
343
|
|
|
|
|
|
|
} |
|
344
|
|
|
|
|
|
|
# attribute => 'String' |
|
345
|
|
|
|
|
|
|
# char => '"' |
|
346
|
|
|
|
|
|
|
# context => 'doublequotestring' |
|
347
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
348
|
1106
|
100
|
|
|
|
3999
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'doublequotestring', 'String')) { |
|
349
|
24
|
|
|
|
|
78
|
return 1 |
|
350
|
|
|
|
|
|
|
} |
|
351
|
|
|
|
|
|
|
# attribute => 'String' |
|
352
|
|
|
|
|
|
|
# char => ''' |
|
353
|
|
|
|
|
|
|
# context => 'singlequotestring' |
|
354
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
355
|
1082
|
50
|
|
|
|
3118
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'singlequotestring', 'String')) { |
|
356
|
0
|
|
|
|
|
0
|
return 1 |
|
357
|
|
|
|
|
|
|
} |
|
358
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
359
|
|
|
|
|
|
|
# char => '&' |
|
360
|
|
|
|
|
|
|
# context => '#stay' |
|
361
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
362
|
1082
|
100
|
|
|
|
3026
|
if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
363
|
4
|
|
|
|
|
11
|
return 1 |
|
364
|
|
|
|
|
|
|
} |
|
365
|
|
|
|
|
|
|
# String => '' |
|
366
|
|
|
|
|
|
|
# attribute => 'String' |
|
367
|
|
|
|
|
|
|
# context => '' |
|
368
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
369
|
1078
|
50
|
|
|
|
3517
|
if ($self->testRegExpr($text, '', 0, 0, 0, undef, 0, '', 'String')) { |
|
370
|
0
|
|
|
|
|
0
|
return 1 |
|
371
|
|
|
|
|
|
|
} |
|
372
|
|
|
|
|
|
|
# String => '[0123456789]*\.\.\.[0123456789]*' |
|
373
|
|
|
|
|
|
|
# attribute => 'String' |
|
374
|
|
|
|
|
|
|
# context => '#stay' |
|
375
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
376
|
1078
|
50
|
|
|
|
3784
|
if ($self->testRegExpr($text, '[0123456789]*\\.\\.\\.[0123456789]*', 0, 0, 0, undef, 0, '#stay', 'String')) { |
|
377
|
0
|
|
|
|
|
0
|
return 1 |
|
378
|
|
|
|
|
|
|
} |
|
379
|
|
|
|
|
|
|
# attribute => 'Octal' |
|
380
|
|
|
|
|
|
|
# context => '#stay' |
|
381
|
|
|
|
|
|
|
# type => 'HlCOct' |
|
382
|
1078
|
50
|
|
|
|
4151
|
if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { |
|
383
|
0
|
|
|
|
|
0
|
return 1 |
|
384
|
|
|
|
|
|
|
} |
|
385
|
|
|
|
|
|
|
# attribute => 'Hex' |
|
386
|
|
|
|
|
|
|
# context => '#stay' |
|
387
|
|
|
|
|
|
|
# type => 'HlCHex' |
|
388
|
1078
|
50
|
|
|
|
3745
|
if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { |
|
389
|
0
|
|
|
|
|
0
|
return 1 |
|
390
|
|
|
|
|
|
|
} |
|
391
|
|
|
|
|
|
|
# attribute => 'Float' |
|
392
|
|
|
|
|
|
|
# context => '#stay' |
|
393
|
|
|
|
|
|
|
# type => 'Float' |
|
394
|
1078
|
100
|
|
|
|
3664
|
if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { |
|
395
|
22
|
|
|
|
|
65
|
return 1 |
|
396
|
|
|
|
|
|
|
} |
|
397
|
|
|
|
|
|
|
# attribute => 'Decimal' |
|
398
|
|
|
|
|
|
|
# context => '#stay' |
|
399
|
|
|
|
|
|
|
# type => 'Int' |
|
400
|
1056
|
50
|
|
|
|
3525
|
if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { |
|
401
|
0
|
|
|
|
|
0
|
return 1 |
|
402
|
|
|
|
|
|
|
} |
|
403
|
|
|
|
|
|
|
# String => ';()}{:,[]' |
|
404
|
|
|
|
|
|
|
# attribute => 'Other' |
|
405
|
|
|
|
|
|
|
# context => '#stay' |
|
406
|
|
|
|
|
|
|
# type => 'AnyChar' |
|
407
|
1056
|
100
|
|
|
|
3691
|
if ($self->testAnyChar($text, ';()}{:,[]', 0, 0, undef, 0, '#stay', 'Other')) { |
|
408
|
112
|
|
|
|
|
354
|
return 1 |
|
409
|
|
|
|
|
|
|
} |
|
410
|
|
|
|
|
|
|
# String => '\belseif\b' |
|
411
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
412
|
|
|
|
|
|
|
# beginRegion => 'iffi1' |
|
413
|
|
|
|
|
|
|
# context => '#stay' |
|
414
|
|
|
|
|
|
|
# endRegion => 'iffi1' |
|
415
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
416
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
417
|
944
|
50
|
|
|
|
3100
|
if ($self->testRegExpr($text, '\\belseif\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
418
|
0
|
|
|
|
|
0
|
return 1 |
|
419
|
|
|
|
|
|
|
} |
|
420
|
|
|
|
|
|
|
# String => '\belse\b' |
|
421
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
422
|
|
|
|
|
|
|
# beginRegion => 'iffi1' |
|
423
|
|
|
|
|
|
|
# context => '#stay' |
|
424
|
|
|
|
|
|
|
# endRegion => 'iffi1' |
|
425
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
426
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
427
|
944
|
100
|
|
|
|
3044
|
if ($self->testRegExpr($text, '\\belse\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
428
|
2
|
|
|
|
|
9
|
return 1 |
|
429
|
|
|
|
|
|
|
} |
|
430
|
|
|
|
|
|
|
# String => '\bif\b' |
|
431
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
432
|
|
|
|
|
|
|
# beginRegion => 'iffi1' |
|
433
|
|
|
|
|
|
|
# context => '#stay' |
|
434
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
435
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
436
|
942
|
100
|
|
|
|
3148
|
if ($self->testRegExpr($text, '\\bif\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
437
|
6
|
|
|
|
|
16
|
return 1 |
|
438
|
|
|
|
|
|
|
} |
|
439
|
|
|
|
|
|
|
# String => '\bend if\b' |
|
440
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
441
|
|
|
|
|
|
|
# context => '#stay' |
|
442
|
|
|
|
|
|
|
# endRegion => 'iffi1' |
|
443
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
444
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
445
|
936
|
100
|
|
|
|
3122
|
if ($self->testRegExpr($text, '\\bend if\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
446
|
6
|
|
|
|
|
19
|
return 1 |
|
447
|
|
|
|
|
|
|
} |
|
448
|
|
|
|
|
|
|
# String => '\bexit function\b' |
|
449
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
450
|
|
|
|
|
|
|
# context => '#stay' |
|
451
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
452
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
453
|
930
|
50
|
|
|
|
3190
|
if ($self->testRegExpr($text, '\\bexit function\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
454
|
0
|
|
|
|
|
0
|
return 1 |
|
455
|
|
|
|
|
|
|
} |
|
456
|
|
|
|
|
|
|
# String => '\bfunction\b' |
|
457
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
458
|
|
|
|
|
|
|
# beginRegion => 'funendfun1' |
|
459
|
|
|
|
|
|
|
# context => '#stay' |
|
460
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
461
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
462
|
930
|
100
|
|
|
|
3375
|
if ($self->testRegExpr($text, '\\bfunction\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
463
|
4
|
|
|
|
|
17
|
return 1 |
|
464
|
|
|
|
|
|
|
} |
|
465
|
|
|
|
|
|
|
# String => '\bend function\b' |
|
466
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
467
|
|
|
|
|
|
|
# context => '#stay' |
|
468
|
|
|
|
|
|
|
# endRegion => 'funendfun1' |
|
469
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
470
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
471
|
926
|
100
|
|
|
|
2953
|
if ($self->testRegExpr($text, '\\bend function\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
472
|
4
|
|
|
|
|
15
|
return 1 |
|
473
|
|
|
|
|
|
|
} |
|
474
|
|
|
|
|
|
|
# String => '\bexit sub\b' |
|
475
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
476
|
|
|
|
|
|
|
# context => '#stay' |
|
477
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
478
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
479
|
922
|
50
|
|
|
|
3362
|
if ($self->testRegExpr($text, '\\bexit sub\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
480
|
0
|
|
|
|
|
0
|
return 1 |
|
481
|
|
|
|
|
|
|
} |
|
482
|
|
|
|
|
|
|
# String => '\bsub\b' |
|
483
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
484
|
|
|
|
|
|
|
# beginRegion => 'subendsub1' |
|
485
|
|
|
|
|
|
|
# context => '#stay' |
|
486
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
487
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
488
|
922
|
100
|
|
|
|
3019
|
if ($self->testRegExpr($text, '\\bsub\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
489
|
2
|
|
|
|
|
7
|
return 1 |
|
490
|
|
|
|
|
|
|
} |
|
491
|
|
|
|
|
|
|
# String => '\bend sub\b' |
|
492
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
493
|
|
|
|
|
|
|
# context => '#stay' |
|
494
|
|
|
|
|
|
|
# endRegion => 'subendsub1' |
|
495
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
496
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
497
|
920
|
100
|
|
|
|
3146
|
if ($self->testRegExpr($text, '\\bend sub\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
498
|
2
|
|
|
|
|
8
|
return 1 |
|
499
|
|
|
|
|
|
|
} |
|
500
|
|
|
|
|
|
|
# String => '\bclass\b' |
|
501
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
502
|
|
|
|
|
|
|
# beginRegion => 'classendclass1' |
|
503
|
|
|
|
|
|
|
# context => '#stay' |
|
504
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
505
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
506
|
918
|
50
|
|
|
|
3092
|
if ($self->testRegExpr($text, '\\bclass\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
507
|
0
|
|
|
|
|
0
|
return 1 |
|
508
|
|
|
|
|
|
|
} |
|
509
|
|
|
|
|
|
|
# String => '\bend class\b' |
|
510
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
511
|
|
|
|
|
|
|
# context => '#stay' |
|
512
|
|
|
|
|
|
|
# endRegion => 'classendclass1' |
|
513
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
514
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
515
|
918
|
50
|
|
|
|
2992
|
if ($self->testRegExpr($text, '\\bend class\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
516
|
0
|
|
|
|
|
0
|
return 1 |
|
517
|
|
|
|
|
|
|
} |
|
518
|
|
|
|
|
|
|
# String => '\bexit do\b' |
|
519
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
520
|
|
|
|
|
|
|
# context => '#stay' |
|
521
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
522
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
523
|
918
|
50
|
|
|
|
2956
|
if ($self->testRegExpr($text, '\\bexit do\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
524
|
0
|
|
|
|
|
0
|
return 1 |
|
525
|
|
|
|
|
|
|
} |
|
526
|
|
|
|
|
|
|
# String => '\bdo\b' |
|
527
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
528
|
|
|
|
|
|
|
# beginRegion => 'doloop1' |
|
529
|
|
|
|
|
|
|
# context => '#stay' |
|
530
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
531
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
532
|
918
|
100
|
|
|
|
2889
|
if ($self->testRegExpr($text, '\\bdo\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
533
|
4
|
|
|
|
|
16
|
return 1 |
|
534
|
|
|
|
|
|
|
} |
|
535
|
|
|
|
|
|
|
# String => '\bloop\b' |
|
536
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
537
|
|
|
|
|
|
|
# context => '#stay' |
|
538
|
|
|
|
|
|
|
# endRegion => 'doloop1' |
|
539
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
540
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
541
|
914
|
100
|
|
|
|
2981
|
if ($self->testRegExpr($text, '\\bloop\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
542
|
4
|
|
|
|
|
17
|
return 1 |
|
543
|
|
|
|
|
|
|
} |
|
544
|
|
|
|
|
|
|
# String => '\bexit while\b' |
|
545
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
546
|
|
|
|
|
|
|
# context => '#stay' |
|
547
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
548
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
549
|
910
|
50
|
|
|
|
3228
|
if ($self->testRegExpr($text, '\\bexit while\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
550
|
0
|
|
|
|
|
0
|
return 1 |
|
551
|
|
|
|
|
|
|
} |
|
552
|
|
|
|
|
|
|
# String => '\bwhile\b' |
|
553
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
554
|
|
|
|
|
|
|
# beginRegion => 'whilewend1' |
|
555
|
|
|
|
|
|
|
# context => '#stay' |
|
556
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
557
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
558
|
910
|
50
|
|
|
|
3008
|
if ($self->testRegExpr($text, '\\bwhile\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
559
|
0
|
|
|
|
|
0
|
return 1 |
|
560
|
|
|
|
|
|
|
} |
|
561
|
|
|
|
|
|
|
# String => '\bwend\b' |
|
562
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
563
|
|
|
|
|
|
|
# context => '#stay' |
|
564
|
|
|
|
|
|
|
# endRegion => 'whilewend1' |
|
565
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
566
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
567
|
910
|
50
|
|
|
|
2928
|
if ($self->testRegExpr($text, '\\bwend\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
568
|
0
|
|
|
|
|
0
|
return 1 |
|
569
|
|
|
|
|
|
|
} |
|
570
|
|
|
|
|
|
|
# String => '\bexit for\b' |
|
571
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
572
|
|
|
|
|
|
|
# context => '#stay' |
|
573
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
574
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
575
|
910
|
50
|
|
|
|
3044
|
if ($self->testRegExpr($text, '\\bexit for\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
576
|
0
|
|
|
|
|
0
|
return 1 |
|
577
|
|
|
|
|
|
|
} |
|
578
|
|
|
|
|
|
|
# String => '\bfor\b' |
|
579
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
580
|
|
|
|
|
|
|
# beginRegion => 'fornext1' |
|
581
|
|
|
|
|
|
|
# context => '#stay' |
|
582
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
583
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
584
|
910
|
50
|
|
|
|
3048
|
if ($self->testRegExpr($text, '\\bfor\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
585
|
0
|
|
|
|
|
0
|
return 1 |
|
586
|
|
|
|
|
|
|
} |
|
587
|
|
|
|
|
|
|
# String => '\bnext\b' |
|
588
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
589
|
|
|
|
|
|
|
# context => '#stay' |
|
590
|
|
|
|
|
|
|
# endRegion => 'fornext1' |
|
591
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
592
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
593
|
910
|
50
|
|
|
|
3031
|
if ($self->testRegExpr($text, '\\bnext\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
594
|
0
|
|
|
|
|
0
|
return 1 |
|
595
|
|
|
|
|
|
|
} |
|
596
|
|
|
|
|
|
|
# String => '\bselect case\b' |
|
597
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
598
|
|
|
|
|
|
|
# beginRegion => 'selcase1' |
|
599
|
|
|
|
|
|
|
# context => '#stay' |
|
600
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
601
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
602
|
910
|
50
|
|
|
|
3137
|
if ($self->testRegExpr($text, '\\bselect case\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
603
|
0
|
|
|
|
|
0
|
return 1 |
|
604
|
|
|
|
|
|
|
} |
|
605
|
|
|
|
|
|
|
# String => '\bend select\b' |
|
606
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
607
|
|
|
|
|
|
|
# context => '#stay' |
|
608
|
|
|
|
|
|
|
# endRegion => 'selcase1' |
|
609
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
610
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
611
|
910
|
50
|
|
|
|
3050
|
if ($self->testRegExpr($text, '\\bend select\\b', 1, 0, 0, undef, 0, '#stay', 'Control Structures')) { |
|
612
|
0
|
|
|
|
|
0
|
return 1 |
|
613
|
|
|
|
|
|
|
} |
|
614
|
|
|
|
|
|
|
# String => 'keywords' |
|
615
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
616
|
|
|
|
|
|
|
# context => '#stay' |
|
617
|
|
|
|
|
|
|
# type => 'keyword' |
|
618
|
910
|
100
|
|
|
|
3717
|
if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { |
|
619
|
38
|
|
|
|
|
156
|
return 1 |
|
620
|
|
|
|
|
|
|
} |
|
621
|
|
|
|
|
|
|
# String => 'control structures' |
|
622
|
|
|
|
|
|
|
# attribute => 'Control Structures' |
|
623
|
|
|
|
|
|
|
# context => '#stay' |
|
624
|
|
|
|
|
|
|
# type => 'keyword' |
|
625
|
872
|
100
|
|
|
|
2903
|
if ($self->testKeyword($text, 'control structures', 0, undef, 0, '#stay', 'Control Structures')) { |
|
626
|
8
|
|
|
|
|
19
|
return 1 |
|
627
|
|
|
|
|
|
|
} |
|
628
|
|
|
|
|
|
|
# String => 'functions' |
|
629
|
|
|
|
|
|
|
# attribute => 'Function' |
|
630
|
|
|
|
|
|
|
# context => '#stay' |
|
631
|
|
|
|
|
|
|
# type => 'keyword' |
|
632
|
864
|
100
|
|
|
|
4555
|
if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'Function')) { |
|
633
|
38
|
|
|
|
|
163
|
return 1 |
|
634
|
|
|
|
|
|
|
} |
|
635
|
826
|
|
|
|
|
2416
|
return 0; |
|
636
|
|
|
|
|
|
|
}; |
|
637
|
|
|
|
|
|
|
|
|
638
|
|
|
|
|
|
|
sub parsedoublequotestring { |
|
639
|
234
|
|
|
234
|
0
|
499
|
my ($self, $text) = @_; |
|
640
|
|
|
|
|
|
|
# attribute => 'Escape Code' |
|
641
|
|
|
|
|
|
|
# char => '"' |
|
642
|
|
|
|
|
|
|
# char1 => '"' |
|
643
|
|
|
|
|
|
|
# context => '#stay' |
|
644
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
645
|
234
|
50
|
|
|
|
737
|
if ($self->testDetect2Chars($text, '"', '"', 0, 0, 0, undef, 0, '#stay', 'Escape Code')) { |
|
646
|
0
|
|
|
|
|
0
|
return 1 |
|
647
|
|
|
|
|
|
|
} |
|
648
|
|
|
|
|
|
|
# String => '\\[0-7]{1,3}' |
|
649
|
|
|
|
|
|
|
# attribute => 'Escape Code' |
|
650
|
|
|
|
|
|
|
# context => '#stay' |
|
651
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
652
|
234
|
50
|
|
|
|
755
|
if ($self->testRegExpr($text, '\\\\[0-7]{1,3}', 0, 0, 0, undef, 0, '#stay', 'Escape Code')) { |
|
653
|
0
|
|
|
|
|
0
|
return 1 |
|
654
|
|
|
|
|
|
|
} |
|
655
|
|
|
|
|
|
|
# String => '\\x[0-9A-Fa-f]{1,2}' |
|
656
|
|
|
|
|
|
|
# attribute => 'Escape Code' |
|
657
|
|
|
|
|
|
|
# context => '#stay' |
|
658
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
659
|
234
|
50
|
|
|
|
809
|
if ($self->testRegExpr($text, '\\\\x[0-9A-Fa-f]{1,2}', 0, 0, 0, undef, 0, '#stay', 'Escape Code')) { |
|
660
|
0
|
|
|
|
|
0
|
return 1 |
|
661
|
|
|
|
|
|
|
} |
|
662
|
|
|
|
|
|
|
# attribute => 'String' |
|
663
|
|
|
|
|
|
|
# char => '"' |
|
664
|
|
|
|
|
|
|
# context => '#pop' |
|
665
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
666
|
234
|
100
|
|
|
|
792
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
|
667
|
24
|
|
|
|
|
76
|
return 1 |
|
668
|
|
|
|
|
|
|
} |
|
669
|
210
|
|
|
|
|
522
|
return 0; |
|
670
|
|
|
|
|
|
|
}; |
|
671
|
|
|
|
|
|
|
|
|
672
|
|
|
|
|
|
|
sub parsehtmlcomment { |
|
673
|
0
|
|
|
0
|
0
|
0
|
my ($self, $text) = @_; |
|
674
|
|
|
|
|
|
|
# String => '<%' |
|
675
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
676
|
|
|
|
|
|
|
# context => 'aspsource' |
|
677
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
678
|
0
|
0
|
|
|
|
0
|
if ($self->testStringDetect($text, '<%', 0, 0, 0, undef, 0, 'aspsource', 'Keyword')) { |
|
679
|
0
|
|
|
|
|
0
|
return 1 |
|
680
|
|
|
|
|
|
|
} |
|
681
|
|
|
|
|
|
|
# String => '<%' |
|
682
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
683
|
|
|
|
|
|
|
# context => 'aspsource' |
|
684
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
685
|
0
|
0
|
|
|
|
0
|
if ($self->testStringDetect($text, '<%', 0, 0, 0, undef, 0, 'aspsource', 'Keyword')) { |
|
686
|
0
|
|
|
|
|
0
|
return 1 |
|
687
|
|
|
|
|
|
|
} |
|
688
|
|
|
|
|
|
|
# String => '-->' |
|
689
|
|
|
|
|
|
|
# attribute => 'HTML Comment' |
|
690
|
|
|
|
|
|
|
# context => '#pop' |
|
691
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
692
|
0
|
0
|
|
|
|
0
|
if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'HTML Comment')) { |
|
693
|
0
|
|
|
|
|
0
|
return 1 |
|
694
|
|
|
|
|
|
|
} |
|
695
|
|
|
|
|
|
|
# String => '\s*=\s*' |
|
696
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
|
697
|
|
|
|
|
|
|
# context => 'identifiers' |
|
698
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
699
|
0
|
0
|
|
|
|
0
|
if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'identifiers', 'Normal Text')) { |
|
700
|
0
|
|
|
|
|
0
|
return 1 |
|
701
|
|
|
|
|
|
|
} |
|
702
|
0
|
|
|
|
|
0
|
return 0; |
|
703
|
|
|
|
|
|
|
}; |
|
704
|
|
|
|
|
|
|
|
|
705
|
|
|
|
|
|
|
sub parsehtmltag { |
|
706
|
26
|
|
|
26
|
0
|
68
|
my ($self, $text) = @_; |
|
707
|
|
|
|
|
|
|
# attribute => 'HTML Tag' |
|
708
|
|
|
|
|
|
|
# char => '/' |
|
709
|
|
|
|
|
|
|
# char1 => '>' |
|
710
|
|
|
|
|
|
|
# context => '#pop' |
|
711
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
712
|
26
|
50
|
|
|
|
104
|
if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { |
|
713
|
0
|
|
|
|
|
0
|
return 1 |
|
714
|
|
|
|
|
|
|
} |
|
715
|
|
|
|
|
|
|
# attribute => 'HTML Tag' |
|
716
|
|
|
|
|
|
|
# char => '>' |
|
717
|
|
|
|
|
|
|
# context => '#pop' |
|
718
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
719
|
26
|
100
|
|
|
|
112
|
if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { |
|
720
|
12
|
|
|
|
|
43
|
return 1 |
|
721
|
|
|
|
|
|
|
} |
|
722
|
|
|
|
|
|
|
# String => '<%' |
|
723
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
724
|
|
|
|
|
|
|
# context => 'aspsource' |
|
725
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
726
|
14
|
50
|
|
|
|
57
|
if ($self->testStringDetect($text, '<%', 0, 0, 0, undef, 0, 'aspsource', 'Keyword')) { |
|
727
|
0
|
|
|
|
|
0
|
return 1 |
|
728
|
|
|
|
|
|
|
} |
|
729
|
|
|
|
|
|
|
# String => '<%' |
|
730
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
731
|
|
|
|
|
|
|
# context => 'aspsource' |
|
732
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
733
|
14
|
50
|
|
|
|
46
|
if ($self->testStringDetect($text, '<%', 0, 0, 0, undef, 0, 'aspsource', 'Keyword')) { |
|
734
|
0
|
|
|
|
|
0
|
return 1 |
|
735
|
|
|
|
|
|
|
} |
|
736
|
|
|
|
|
|
|
# String => '\s*=\s*' |
|
737
|
|
|
|
|
|
|
# attribute => 'Identifier' |
|
738
|
|
|
|
|
|
|
# context => 'identifiers' |
|
739
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
740
|
14
|
100
|
|
|
|
51
|
if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'identifiers', 'Identifier')) { |
|
741
|
2
|
|
|
|
|
9
|
return 1 |
|
742
|
|
|
|
|
|
|
} |
|
743
|
12
|
|
|
|
|
37
|
return 0; |
|
744
|
|
|
|
|
|
|
}; |
|
745
|
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
sub parseidentifiers { |
|
747
|
2
|
|
|
2
|
0
|
7
|
my ($self, $text) = @_; |
|
748
|
|
|
|
|
|
|
# String => '\s*#?[a-zA-Z0-9]*' |
|
749
|
|
|
|
|
|
|
# attribute => 'String' |
|
750
|
|
|
|
|
|
|
# context => '#pop' |
|
751
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
752
|
2
|
50
|
|
|
|
11
|
if ($self->testRegExpr($text, '\\s*#?[a-zA-Z0-9]*', 0, 0, 0, undef, 0, '#pop', 'String')) { |
|
753
|
0
|
|
|
|
|
0
|
return 1 |
|
754
|
|
|
|
|
|
|
} |
|
755
|
|
|
|
|
|
|
# attribute => 'Types' |
|
756
|
|
|
|
|
|
|
# char => ''' |
|
757
|
|
|
|
|
|
|
# context => 'types1' |
|
758
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
759
|
2
|
50
|
|
|
|
12
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'types1', 'Types')) { |
|
760
|
0
|
|
|
|
|
0
|
return 1 |
|
761
|
|
|
|
|
|
|
} |
|
762
|
|
|
|
|
|
|
# attribute => 'Types' |
|
763
|
|
|
|
|
|
|
# char => '"' |
|
764
|
|
|
|
|
|
|
# context => 'types2' |
|
765
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
766
|
2
|
50
|
|
|
|
10
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'types2', 'Types')) { |
|
767
|
2
|
|
|
|
|
9
|
return 1 |
|
768
|
|
|
|
|
|
|
} |
|
769
|
0
|
|
|
|
|
0
|
return 0; |
|
770
|
|
|
|
|
|
|
}; |
|
771
|
|
|
|
|
|
|
|
|
772
|
|
|
|
|
|
|
sub parsenosource { |
|
773
|
150
|
|
|
150
|
0
|
338
|
my ($self, $text) = @_; |
|
774
|
|
|
|
|
|
|
# String => '<%' |
|
775
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
776
|
|
|
|
|
|
|
# context => 'aspsource' |
|
777
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
778
|
150
|
100
|
|
|
|
472
|
if ($self->testStringDetect($text, '<%', 0, 0, 0, undef, 0, 'aspsource', 'Keyword')) { |
|
779
|
6
|
|
|
|
|
22
|
return 1 |
|
780
|
|
|
|
|
|
|
} |
|
781
|
|
|
|
|
|
|
# String => '<\s*script(\s|>)' |
|
782
|
|
|
|
|
|
|
# attribute => 'HTML Tag' |
|
783
|
|
|
|
|
|
|
# context => 'scripts' |
|
784
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
|
785
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
786
|
144
|
50
|
|
|
|
509
|
if ($self->testRegExpr($text, '<\\s*script(\\s|>)', 1, 0, 0, undef, 0, 'scripts', 'HTML Tag')) { |
|
787
|
0
|
|
|
|
|
0
|
return 1 |
|
788
|
|
|
|
|
|
|
} |
|
789
|
|
|
|
|
|
|
# String => '<\s*\/?\s*[a-zA-Z_:][a-zA-Z0-9._:-]*' |
|
790
|
|
|
|
|
|
|
# attribute => 'HTML Tag' |
|
791
|
|
|
|
|
|
|
# context => 'htmltag' |
|
792
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
793
|
144
|
100
|
|
|
|
510
|
if ($self->testRegExpr($text, '<\\s*\\/?\\s*[a-zA-Z_:][a-zA-Z0-9._:-]*', 0, 0, 0, undef, 0, 'htmltag', 'HTML Tag')) { |
|
794
|
12
|
|
|
|
|
46
|
return 1 |
|
795
|
|
|
|
|
|
|
} |
|
796
|
|
|
|
|
|
|
# String => ' |