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 'freebasic.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 0.14 |
9
|
|
|
|
|
|
|
#kate version 2.3 |
10
|
|
|
|
|
|
|
#kate author Chris Neugebauer (chrisjrn@gmail.com) |
11
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:05 2008, localtime |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::FreeBASIC; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
616
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
18
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
19
|
1
|
|
|
1
|
|
5
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1131
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
22
|
1
|
|
|
1
|
0
|
637
|
my $proto = shift; |
23
|
1
|
|
33
|
|
|
7
|
my $class = ref($proto) || $proto; |
24
|
1
|
|
|
|
|
10
|
my $self = $class->SUPER::new(@_); |
25
|
1
|
|
|
|
|
12
|
$self->attributes({ |
26
|
|
|
|
|
|
|
'Comment' => 'Comment', |
27
|
|
|
|
|
|
|
'Constant' => 'BaseN', |
28
|
|
|
|
|
|
|
'Data Types' => 'DataType', |
29
|
|
|
|
|
|
|
'Functions' => 'Function', |
30
|
|
|
|
|
|
|
'Keyword' => 'Keyword', |
31
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
32
|
|
|
|
|
|
|
'Number' => 'DecVal', |
33
|
|
|
|
|
|
|
'Preprocessor' => 'Operator', |
34
|
|
|
|
|
|
|
'Region Marker ' => 'RegionMarker', |
35
|
|
|
|
|
|
|
'String' => 'String', |
36
|
|
|
|
|
|
|
}); |
37
|
1
|
|
|
|
|
12
|
$self->listAdd('Assembly Operators', |
38
|
|
|
|
|
|
|
'AH', |
39
|
|
|
|
|
|
|
'AL', |
40
|
|
|
|
|
|
|
'AX', |
41
|
|
|
|
|
|
|
'BH', |
42
|
|
|
|
|
|
|
'BL', |
43
|
|
|
|
|
|
|
'BP', |
44
|
|
|
|
|
|
|
'BX', |
45
|
|
|
|
|
|
|
'CH', |
46
|
|
|
|
|
|
|
'CL', |
47
|
|
|
|
|
|
|
'CS', |
48
|
|
|
|
|
|
|
'CX', |
49
|
|
|
|
|
|
|
'DH', |
50
|
|
|
|
|
|
|
'DI', |
51
|
|
|
|
|
|
|
'DL', |
52
|
|
|
|
|
|
|
'DS', |
53
|
|
|
|
|
|
|
'DX', |
54
|
|
|
|
|
|
|
'EAX', |
55
|
|
|
|
|
|
|
'EBP', |
56
|
|
|
|
|
|
|
'EBX', |
57
|
|
|
|
|
|
|
'ECX', |
58
|
|
|
|
|
|
|
'EDI', |
59
|
|
|
|
|
|
|
'EDX', |
60
|
|
|
|
|
|
|
'ES', |
61
|
|
|
|
|
|
|
'ESI', |
62
|
|
|
|
|
|
|
'ESP', |
63
|
|
|
|
|
|
|
'FS', |
64
|
|
|
|
|
|
|
'GS', |
65
|
|
|
|
|
|
|
'SI', |
66
|
|
|
|
|
|
|
'SP', |
67
|
|
|
|
|
|
|
'SS', |
68
|
|
|
|
|
|
|
); |
69
|
1
|
|
|
|
|
4
|
$self->listAdd('Data Types', |
70
|
|
|
|
|
|
|
'Byte PTR', |
71
|
|
|
|
|
|
|
'Double', |
72
|
|
|
|
|
|
|
'Dword PTR', |
73
|
|
|
|
|
|
|
'Integer', |
74
|
|
|
|
|
|
|
'Long', |
75
|
|
|
|
|
|
|
'Qword PTR', |
76
|
|
|
|
|
|
|
'Single', |
77
|
|
|
|
|
|
|
'String', |
78
|
|
|
|
|
|
|
'Word PTR', |
79
|
|
|
|
|
|
|
); |
80
|
1
|
|
|
|
|
9
|
$self->listAdd('functions', |
81
|
|
|
|
|
|
|
'AAA', |
82
|
|
|
|
|
|
|
'AAD', |
83
|
|
|
|
|
|
|
'AAM', |
84
|
|
|
|
|
|
|
'AAS', |
85
|
|
|
|
|
|
|
'ABS', |
86
|
|
|
|
|
|
|
'ACOS', |
87
|
|
|
|
|
|
|
'ADC', |
88
|
|
|
|
|
|
|
'ADD', |
89
|
|
|
|
|
|
|
'ALLOCATE', |
90
|
|
|
|
|
|
|
'AND', |
91
|
|
|
|
|
|
|
'AND', |
92
|
|
|
|
|
|
|
'ARPL', |
93
|
|
|
|
|
|
|
'ASC', |
94
|
|
|
|
|
|
|
'ASIN', |
95
|
|
|
|
|
|
|
'ASM', |
96
|
|
|
|
|
|
|
'ATAN2', |
97
|
|
|
|
|
|
|
'ATN', |
98
|
|
|
|
|
|
|
'BEEP', |
99
|
|
|
|
|
|
|
'BIN$', |
100
|
|
|
|
|
|
|
'BLOAD', |
101
|
|
|
|
|
|
|
'BOUND', |
102
|
|
|
|
|
|
|
'BREAK', |
103
|
|
|
|
|
|
|
'BSAVE', |
104
|
|
|
|
|
|
|
'BSF', |
105
|
|
|
|
|
|
|
'BSR', |
106
|
|
|
|
|
|
|
'BSWAP', |
107
|
|
|
|
|
|
|
'BT', |
108
|
|
|
|
|
|
|
'BTC', |
109
|
|
|
|
|
|
|
'BTR', |
110
|
|
|
|
|
|
|
'BTS', |
111
|
|
|
|
|
|
|
'BYREF', |
112
|
|
|
|
|
|
|
'CALL', |
113
|
|
|
|
|
|
|
'CALLOCATE', |
114
|
|
|
|
|
|
|
'CALLS', |
115
|
|
|
|
|
|
|
'CBW', |
116
|
|
|
|
|
|
|
'CBYTE', |
117
|
|
|
|
|
|
|
'CDBL', |
118
|
|
|
|
|
|
|
'CDQ', |
119
|
|
|
|
|
|
|
'CHAIN', |
120
|
|
|
|
|
|
|
'CHDIR', |
121
|
|
|
|
|
|
|
'CHR$', |
122
|
|
|
|
|
|
|
'CINT', |
123
|
|
|
|
|
|
|
'CIRCLE', |
124
|
|
|
|
|
|
|
'CLC', |
125
|
|
|
|
|
|
|
'CLD', |
126
|
|
|
|
|
|
|
'CLEAR', |
127
|
|
|
|
|
|
|
'CLI', |
128
|
|
|
|
|
|
|
'CLNG', |
129
|
|
|
|
|
|
|
'CLOSE', |
130
|
|
|
|
|
|
|
'CLTS', |
131
|
|
|
|
|
|
|
'CMC', |
132
|
|
|
|
|
|
|
'CMP', |
133
|
|
|
|
|
|
|
'CMPS', |
134
|
|
|
|
|
|
|
'CMPSB', |
135
|
|
|
|
|
|
|
'CMPSD', |
136
|
|
|
|
|
|
|
'CMPSW', |
137
|
|
|
|
|
|
|
'CMPXCHG', |
138
|
|
|
|
|
|
|
'COLOR', |
139
|
|
|
|
|
|
|
'COMMAND$', |
140
|
|
|
|
|
|
|
'COMMON', |
141
|
|
|
|
|
|
|
'CONST', |
142
|
|
|
|
|
|
|
'CONTINUE', |
143
|
|
|
|
|
|
|
'COS', |
144
|
|
|
|
|
|
|
'CSHORT', |
145
|
|
|
|
|
|
|
'CSIGN', |
146
|
|
|
|
|
|
|
'CSNG', |
147
|
|
|
|
|
|
|
'CUNSG', |
148
|
|
|
|
|
|
|
'CURDIR$', |
149
|
|
|
|
|
|
|
'CVD', |
150
|
|
|
|
|
|
|
'CVI', |
151
|
|
|
|
|
|
|
'CVL', |
152
|
|
|
|
|
|
|
'CVS', |
153
|
|
|
|
|
|
|
'CWD', |
154
|
|
|
|
|
|
|
'CWDE', |
155
|
|
|
|
|
|
|
'DAA', |
156
|
|
|
|
|
|
|
'DAS', |
157
|
|
|
|
|
|
|
'DATA', |
158
|
|
|
|
|
|
|
'DATE$', |
159
|
|
|
|
|
|
|
'DEALLOCATE', |
160
|
|
|
|
|
|
|
'DEC', |
161
|
|
|
|
|
|
|
'DIM', |
162
|
|
|
|
|
|
|
'DIR$', |
163
|
|
|
|
|
|
|
'DIV', |
164
|
|
|
|
|
|
|
'DRAW', |
165
|
|
|
|
|
|
|
'END', |
166
|
|
|
|
|
|
|
'ENTER', |
167
|
|
|
|
|
|
|
'ENUM', |
168
|
|
|
|
|
|
|
'ENVIRON', |
169
|
|
|
|
|
|
|
'ENVIRON$', |
170
|
|
|
|
|
|
|
'EOF', |
171
|
|
|
|
|
|
|
'EQV', |
172
|
|
|
|
|
|
|
'ERASE', |
173
|
|
|
|
|
|
|
'EXEC', |
174
|
|
|
|
|
|
|
'EXEPATH', |
175
|
|
|
|
|
|
|
'EXP', |
176
|
|
|
|
|
|
|
'FIX', |
177
|
|
|
|
|
|
|
'FLIP', |
178
|
|
|
|
|
|
|
'FRE', |
179
|
|
|
|
|
|
|
'FREEFILE', |
180
|
|
|
|
|
|
|
'GET', |
181
|
|
|
|
|
|
|
'GETKEY', |
182
|
|
|
|
|
|
|
'GETMOUSE', |
183
|
|
|
|
|
|
|
'HEX$', |
184
|
|
|
|
|
|
|
'HLT', |
185
|
|
|
|
|
|
|
'IDIV', |
186
|
|
|
|
|
|
|
'IMP', |
187
|
|
|
|
|
|
|
'IMUL', |
188
|
|
|
|
|
|
|
'IN', |
189
|
|
|
|
|
|
|
'INC', |
190
|
|
|
|
|
|
|
'INKEY$', |
191
|
|
|
|
|
|
|
'INP', |
192
|
|
|
|
|
|
|
'INPUT', |
193
|
|
|
|
|
|
|
'INPUT$', |
194
|
|
|
|
|
|
|
'INS', |
195
|
|
|
|
|
|
|
'INSB', |
196
|
|
|
|
|
|
|
'INSD', |
197
|
|
|
|
|
|
|
'INSTR', |
198
|
|
|
|
|
|
|
'INT', |
199
|
|
|
|
|
|
|
'INT', |
200
|
|
|
|
|
|
|
'INTO', |
201
|
|
|
|
|
|
|
'INVD', |
202
|
|
|
|
|
|
|
'INVLPG', |
203
|
|
|
|
|
|
|
'IRET', |
204
|
|
|
|
|
|
|
'IRETD', |
205
|
|
|
|
|
|
|
'JA', |
206
|
|
|
|
|
|
|
'JAE', |
207
|
|
|
|
|
|
|
'JB', |
208
|
|
|
|
|
|
|
'JBE', |
209
|
|
|
|
|
|
|
'JC', |
210
|
|
|
|
|
|
|
'JCXZ', |
211
|
|
|
|
|
|
|
'JE', |
212
|
|
|
|
|
|
|
'JECXZ', |
213
|
|
|
|
|
|
|
'JG', |
214
|
|
|
|
|
|
|
'JGE', |
215
|
|
|
|
|
|
|
'JL', |
216
|
|
|
|
|
|
|
'JLE', |
217
|
|
|
|
|
|
|
'JMP', |
218
|
|
|
|
|
|
|
'JNA', |
219
|
|
|
|
|
|
|
'JNAE', |
220
|
|
|
|
|
|
|
'JNB', |
221
|
|
|
|
|
|
|
'JNBE', |
222
|
|
|
|
|
|
|
'JNC', |
223
|
|
|
|
|
|
|
'JNE', |
224
|
|
|
|
|
|
|
'JNG', |
225
|
|
|
|
|
|
|
'JNGE', |
226
|
|
|
|
|
|
|
'JNL', |
227
|
|
|
|
|
|
|
'JNLE', |
228
|
|
|
|
|
|
|
'JNO', |
229
|
|
|
|
|
|
|
'JNP', |
230
|
|
|
|
|
|
|
'JNS', |
231
|
|
|
|
|
|
|
'JNZ', |
232
|
|
|
|
|
|
|
'JO', |
233
|
|
|
|
|
|
|
'JP', |
234
|
|
|
|
|
|
|
'JPE', |
235
|
|
|
|
|
|
|
'JPO', |
236
|
|
|
|
|
|
|
'JS', |
237
|
|
|
|
|
|
|
'JUMP', |
238
|
|
|
|
|
|
|
'JZ', |
239
|
|
|
|
|
|
|
'KILL', |
240
|
|
|
|
|
|
|
'LAHF', |
241
|
|
|
|
|
|
|
'LAR', |
242
|
|
|
|
|
|
|
'LBOUND', |
243
|
|
|
|
|
|
|
'LCASE$', |
244
|
|
|
|
|
|
|
'LDS', |
245
|
|
|
|
|
|
|
'LEA', |
246
|
|
|
|
|
|
|
'LEAVE', |
247
|
|
|
|
|
|
|
'LEAVED', |
248
|
|
|
|
|
|
|
'LEAVEW', |
249
|
|
|
|
|
|
|
'LEFT$', |
250
|
|
|
|
|
|
|
'LEN', |
251
|
|
|
|
|
|
|
'LES', |
252
|
|
|
|
|
|
|
'LET', |
253
|
|
|
|
|
|
|
'LFS', |
254
|
|
|
|
|
|
|
'LGDT', |
255
|
|
|
|
|
|
|
'LGS', |
256
|
|
|
|
|
|
|
'LIB', |
257
|
|
|
|
|
|
|
'LIDT', |
258
|
|
|
|
|
|
|
'LINE', |
259
|
|
|
|
|
|
|
'LLDT', |
260
|
|
|
|
|
|
|
'LMSW', |
261
|
|
|
|
|
|
|
'LOC', |
262
|
|
|
|
|
|
|
'LOCK', |
263
|
|
|
|
|
|
|
'LOCK', |
264
|
|
|
|
|
|
|
'LODS', |
265
|
|
|
|
|
|
|
'LODSB', |
266
|
|
|
|
|
|
|
'LODSD', |
267
|
|
|
|
|
|
|
'LODSW', |
268
|
|
|
|
|
|
|
'LOF', |
269
|
|
|
|
|
|
|
'LOG', |
270
|
|
|
|
|
|
|
'LOOPD', |
271
|
|
|
|
|
|
|
'LOOPDE', |
272
|
|
|
|
|
|
|
'LOOPDNE', |
273
|
|
|
|
|
|
|
'LOOPDNZ', |
274
|
|
|
|
|
|
|
'LOOPDZ', |
275
|
|
|
|
|
|
|
'LOOPE', |
276
|
|
|
|
|
|
|
'LOOPNE', |
277
|
|
|
|
|
|
|
'LOOPNZ', |
278
|
|
|
|
|
|
|
'LOOPW', |
279
|
|
|
|
|
|
|
'LOOPWE', |
280
|
|
|
|
|
|
|
'LOOPWNE', |
281
|
|
|
|
|
|
|
'LOOPWNZ', |
282
|
|
|
|
|
|
|
'LOOPWZ', |
283
|
|
|
|
|
|
|
'LOOPZ', |
284
|
|
|
|
|
|
|
'LSET', |
285
|
|
|
|
|
|
|
'LSL', |
286
|
|
|
|
|
|
|
'LSS', |
287
|
|
|
|
|
|
|
'LTR', |
288
|
|
|
|
|
|
|
'LTRIM$', |
289
|
|
|
|
|
|
|
'MID$', |
290
|
|
|
|
|
|
|
'MKD$', |
291
|
|
|
|
|
|
|
'MKDIR', |
292
|
|
|
|
|
|
|
'MKI$', |
293
|
|
|
|
|
|
|
'MKL$', |
294
|
|
|
|
|
|
|
'MKS$', |
295
|
|
|
|
|
|
|
'MOD', |
296
|
|
|
|
|
|
|
'MOV', |
297
|
|
|
|
|
|
|
'MOVS', |
298
|
|
|
|
|
|
|
'MOVSB', |
299
|
|
|
|
|
|
|
'MOVSD', |
300
|
|
|
|
|
|
|
'MOVSW', |
301
|
|
|
|
|
|
|
'MOVSX', |
302
|
|
|
|
|
|
|
'MOVZX', |
303
|
|
|
|
|
|
|
'MUL', |
304
|
|
|
|
|
|
|
'MULTIKEY', |
305
|
|
|
|
|
|
|
'NAME', |
306
|
|
|
|
|
|
|
'NEG', |
307
|
|
|
|
|
|
|
'NOP', |
308
|
|
|
|
|
|
|
'NOT', |
309
|
|
|
|
|
|
|
'NOTHING', |
310
|
|
|
|
|
|
|
'OCT$', |
311
|
|
|
|
|
|
|
'OPTION BASE', |
312
|
|
|
|
|
|
|
'OPTION PRIVATE', |
313
|
|
|
|
|
|
|
'OR', |
314
|
|
|
|
|
|
|
'OUT', |
315
|
|
|
|
|
|
|
'OUTS', |
316
|
|
|
|
|
|
|
'OUTSB', |
317
|
|
|
|
|
|
|
'OUTSD', |
318
|
|
|
|
|
|
|
'OUTSW', |
319
|
|
|
|
|
|
|
'PAINT', |
320
|
|
|
|
|
|
|
'PALETTE', |
321
|
|
|
|
|
|
|
'PCOPY', |
322
|
|
|
|
|
|
|
'PEEK', |
323
|
|
|
|
|
|
|
'PEEKI', |
324
|
|
|
|
|
|
|
'PEEKS', |
325
|
|
|
|
|
|
|
'PMAP', |
326
|
|
|
|
|
|
|
'POINT', |
327
|
|
|
|
|
|
|
'POKE', |
328
|
|
|
|
|
|
|
'POKEI', |
329
|
|
|
|
|
|
|
'POKES', |
330
|
|
|
|
|
|
|
'POP', |
331
|
|
|
|
|
|
|
'POPA', |
332
|
|
|
|
|
|
|
'POPAD', |
333
|
|
|
|
|
|
|
'POPF', |
334
|
|
|
|
|
|
|
'POPFD', |
335
|
|
|
|
|
|
|
'POS', |
336
|
|
|
|
|
|
|
'PRESERVE', |
337
|
|
|
|
|
|
|
'PRESET', |
338
|
|
|
|
|
|
|
'PRINT', |
339
|
|
|
|
|
|
|
'PRIVATE', |
340
|
|
|
|
|
|
|
'PROCPTR', |
341
|
|
|
|
|
|
|
'PSET', |
342
|
|
|
|
|
|
|
'PTR', |
343
|
|
|
|
|
|
|
'PUBLIC', |
344
|
|
|
|
|
|
|
'PUSH', |
345
|
|
|
|
|
|
|
'PUSHA', |
346
|
|
|
|
|
|
|
'PUSHAD', |
347
|
|
|
|
|
|
|
'PUSHF', |
348
|
|
|
|
|
|
|
'PUSHFD', |
349
|
|
|
|
|
|
|
'PUT', |
350
|
|
|
|
|
|
|
'RANDOMIZE', |
351
|
|
|
|
|
|
|
'RCL', |
352
|
|
|
|
|
|
|
'RCR', |
353
|
|
|
|
|
|
|
'REALLOCATE', |
354
|
|
|
|
|
|
|
'REDIM', |
355
|
|
|
|
|
|
|
'REM', |
356
|
|
|
|
|
|
|
'REP', |
357
|
|
|
|
|
|
|
'REPE', |
358
|
|
|
|
|
|
|
'REPNE', |
359
|
|
|
|
|
|
|
'REPNZ', |
360
|
|
|
|
|
|
|
'REPZ', |
361
|
|
|
|
|
|
|
'RESET', |
362
|
|
|
|
|
|
|
'RET', |
363
|
|
|
|
|
|
|
'RETURN', |
364
|
|
|
|
|
|
|
'RGB', |
365
|
|
|
|
|
|
|
'RIGHT$', |
366
|
|
|
|
|
|
|
'RMDIR', |
367
|
|
|
|
|
|
|
'RND', |
368
|
|
|
|
|
|
|
'ROL', |
369
|
|
|
|
|
|
|
'ROR', |
370
|
|
|
|
|
|
|
'RSET', |
371
|
|
|
|
|
|
|
'RTRIM$', |
372
|
|
|
|
|
|
|
'RUN', |
373
|
|
|
|
|
|
|
'SADD', |
374
|
|
|
|
|
|
|
'SAHF', |
375
|
|
|
|
|
|
|
'SAL', |
376
|
|
|
|
|
|
|
'SAR', |
377
|
|
|
|
|
|
|
'SBB', |
378
|
|
|
|
|
|
|
'SCAS', |
379
|
|
|
|
|
|
|
'SCASB', |
380
|
|
|
|
|
|
|
'SCASD', |
381
|
|
|
|
|
|
|
'SCASW', |
382
|
|
|
|
|
|
|
'SCREEN', |
383
|
|
|
|
|
|
|
'SCREENCOPY', |
384
|
|
|
|
|
|
|
'SCREENINFO', |
385
|
|
|
|
|
|
|
'SCREENLOCK', |
386
|
|
|
|
|
|
|
'SCREENPTR', |
387
|
|
|
|
|
|
|
'SCREENSET', |
388
|
|
|
|
|
|
|
'SCREENUNLOCK', |
389
|
|
|
|
|
|
|
'SEEK', |
390
|
|
|
|
|
|
|
'SETA', |
391
|
|
|
|
|
|
|
'SETAE', |
392
|
|
|
|
|
|
|
'SETB', |
393
|
|
|
|
|
|
|
'SETBE', |
394
|
|
|
|
|
|
|
'SETC', |
395
|
|
|
|
|
|
|
'SETDATE', |
396
|
|
|
|
|
|
|
'SETE', |
397
|
|
|
|
|
|
|
'SETENVIRON', |
398
|
|
|
|
|
|
|
'SETG', |
399
|
|
|
|
|
|
|
'SETGE', |
400
|
|
|
|
|
|
|
'SETL', |
401
|
|
|
|
|
|
|
'SETLE', |
402
|
|
|
|
|
|
|
'SETNA', |
403
|
|
|
|
|
|
|
'SETNAE', |
404
|
|
|
|
|
|
|
'SETNB', |
405
|
|
|
|
|
|
|
'SETNBE', |
406
|
|
|
|
|
|
|
'SETNC', |
407
|
|
|
|
|
|
|
'SETNE', |
408
|
|
|
|
|
|
|
'SETNG', |
409
|
|
|
|
|
|
|
'SETNGE', |
410
|
|
|
|
|
|
|
'SETNL', |
411
|
|
|
|
|
|
|
'SETNLE', |
412
|
|
|
|
|
|
|
'SETNO', |
413
|
|
|
|
|
|
|
'SETNP', |
414
|
|
|
|
|
|
|
'SETNS', |
415
|
|
|
|
|
|
|
'SETNZ', |
416
|
|
|
|
|
|
|
'SETO', |
417
|
|
|
|
|
|
|
'SETP', |
418
|
|
|
|
|
|
|
'SETPE', |
419
|
|
|
|
|
|
|
'SETPO', |
420
|
|
|
|
|
|
|
'SETS', |
421
|
|
|
|
|
|
|
'SETZ', |
422
|
|
|
|
|
|
|
'SGDT', |
423
|
|
|
|
|
|
|
'SGN', |
424
|
|
|
|
|
|
|
'SHARED', |
425
|
|
|
|
|
|
|
'SHELL', |
426
|
|
|
|
|
|
|
'SHL', |
427
|
|
|
|
|
|
|
'SHLD', |
428
|
|
|
|
|
|
|
'SHR', |
429
|
|
|
|
|
|
|
'SHRD', |
430
|
|
|
|
|
|
|
'SIDT', |
431
|
|
|
|
|
|
|
'SIN', |
432
|
|
|
|
|
|
|
'SLDT', |
433
|
|
|
|
|
|
|
'SLEEP', |
434
|
|
|
|
|
|
|
'SMSW', |
435
|
|
|
|
|
|
|
'SPACE$', |
436
|
|
|
|
|
|
|
'SQR', |
437
|
|
|
|
|
|
|
'STATIC', |
438
|
|
|
|
|
|
|
'STC', |
439
|
|
|
|
|
|
|
'STD', |
440
|
|
|
|
|
|
|
'STI', |
441
|
|
|
|
|
|
|
'STOP', |
442
|
|
|
|
|
|
|
'STOS', |
443
|
|
|
|
|
|
|
'STOSB', |
444
|
|
|
|
|
|
|
'STOSD', |
445
|
|
|
|
|
|
|
'STOSW', |
446
|
|
|
|
|
|
|
'STR', |
447
|
|
|
|
|
|
|
'STR$', |
448
|
|
|
|
|
|
|
'STRING$', |
449
|
|
|
|
|
|
|
'SWAP', |
450
|
|
|
|
|
|
|
'TAN', |
451
|
|
|
|
|
|
|
'TEST', |
452
|
|
|
|
|
|
|
'TIME$', |
453
|
|
|
|
|
|
|
'TIMER', |
454
|
|
|
|
|
|
|
'TRIM$', |
455
|
|
|
|
|
|
|
'TYPE', |
456
|
|
|
|
|
|
|
'UBOUND', |
457
|
|
|
|
|
|
|
'UCASE$', |
458
|
|
|
|
|
|
|
'UNION', |
459
|
|
|
|
|
|
|
'UNLOCK', |
460
|
|
|
|
|
|
|
'VAL', |
461
|
|
|
|
|
|
|
'VARPTR', |
462
|
|
|
|
|
|
|
'VERR', |
463
|
|
|
|
|
|
|
'VERW', |
464
|
|
|
|
|
|
|
'VIEW', |
465
|
|
|
|
|
|
|
'WAIT', |
466
|
|
|
|
|
|
|
'WINDOWTITLE', |
467
|
|
|
|
|
|
|
'WRITE', |
468
|
|
|
|
|
|
|
'XADD', |
469
|
|
|
|
|
|
|
'XCHG', |
470
|
|
|
|
|
|
|
'XLAT', |
471
|
|
|
|
|
|
|
'XLATB', |
472
|
|
|
|
|
|
|
'XOR', |
473
|
|
|
|
|
|
|
); |
474
|
1
|
|
|
|
|
4
|
$self->listAdd('keywords', |
475
|
|
|
|
|
|
|
'As', |
476
|
|
|
|
|
|
|
'Break', |
477
|
|
|
|
|
|
|
'Case', |
478
|
|
|
|
|
|
|
'Close', |
479
|
|
|
|
|
|
|
'DEFBYTE', |
480
|
|
|
|
|
|
|
'DEFDBL', |
481
|
|
|
|
|
|
|
'DEFINT', |
482
|
|
|
|
|
|
|
'DEFLNG', |
483
|
|
|
|
|
|
|
'DEFSHORT', |
484
|
|
|
|
|
|
|
'DEFSNG', |
485
|
|
|
|
|
|
|
'DEFSTR', |
486
|
|
|
|
|
|
|
'DEFUBYTE', |
487
|
|
|
|
|
|
|
'DEFUINT', |
488
|
|
|
|
|
|
|
'DEFUSHORT', |
489
|
|
|
|
|
|
|
'Data', |
490
|
|
|
|
|
|
|
'Declare', |
491
|
|
|
|
|
|
|
'Declare', |
492
|
|
|
|
|
|
|
'DefType', |
493
|
|
|
|
|
|
|
'Default', |
494
|
|
|
|
|
|
|
'Dim', |
495
|
|
|
|
|
|
|
'Do', |
496
|
|
|
|
|
|
|
'Else', |
497
|
|
|
|
|
|
|
'End', |
498
|
|
|
|
|
|
|
'EndSelect', |
499
|
|
|
|
|
|
|
'Exit', |
500
|
|
|
|
|
|
|
'For', |
501
|
|
|
|
|
|
|
'For Binary', |
502
|
|
|
|
|
|
|
'For Input', |
503
|
|
|
|
|
|
|
'For Output', |
504
|
|
|
|
|
|
|
'For Random', |
505
|
|
|
|
|
|
|
'Function', |
506
|
|
|
|
|
|
|
'Global', |
507
|
|
|
|
|
|
|
'Gosub', |
508
|
|
|
|
|
|
|
'Goto', |
509
|
|
|
|
|
|
|
'If', |
510
|
|
|
|
|
|
|
'Loop', |
511
|
|
|
|
|
|
|
'Next', |
512
|
|
|
|
|
|
|
'Open', |
513
|
|
|
|
|
|
|
'Protected', |
514
|
|
|
|
|
|
|
'Read', |
515
|
|
|
|
|
|
|
'Restore', |
516
|
|
|
|
|
|
|
'Return', |
517
|
|
|
|
|
|
|
'Select', |
518
|
|
|
|
|
|
|
'Shared', |
519
|
|
|
|
|
|
|
'Static', |
520
|
|
|
|
|
|
|
'Step', |
521
|
|
|
|
|
|
|
'Sub', |
522
|
|
|
|
|
|
|
'System', |
523
|
|
|
|
|
|
|
'Then', |
524
|
|
|
|
|
|
|
'To', |
525
|
|
|
|
|
|
|
'Type', |
526
|
|
|
|
|
|
|
'Unsigned', |
527
|
|
|
|
|
|
|
'Until', |
528
|
|
|
|
|
|
|
'Wend', |
529
|
|
|
|
|
|
|
'While', |
530
|
|
|
|
|
|
|
); |
531
|
1
|
|
|
|
|
5
|
$self->listAdd('preproc', |
532
|
|
|
|
|
|
|
'#DEFINE', |
533
|
|
|
|
|
|
|
'#ELSE', |
534
|
|
|
|
|
|
|
'#ELSEIF', |
535
|
|
|
|
|
|
|
'#ENDIF', |
536
|
|
|
|
|
|
|
'#IF', |
537
|
|
|
|
|
|
|
'#IFDEF', |
538
|
|
|
|
|
|
|
'#IFNDEF', |
539
|
|
|
|
|
|
|
'#UNDEF', |
540
|
|
|
|
|
|
|
'$DYNAMIC', |
541
|
|
|
|
|
|
|
'$INCLIB', |
542
|
|
|
|
|
|
|
'$INCLUDE', |
543
|
|
|
|
|
|
|
'$STATIC', |
544
|
|
|
|
|
|
|
); |
545
|
1
|
|
|
|
|
14
|
$self->contextdata({ |
546
|
|
|
|
|
|
|
'Comment1' => { |
547
|
|
|
|
|
|
|
callback => \&parseComment1, |
548
|
|
|
|
|
|
|
attribute => 'Comment', |
549
|
|
|
|
|
|
|
lineending => '#pop', |
550
|
|
|
|
|
|
|
}, |
551
|
|
|
|
|
|
|
'Normal' => { |
552
|
|
|
|
|
|
|
callback => \&parseNormal, |
553
|
|
|
|
|
|
|
attribute => 'Normal Text', |
554
|
|
|
|
|
|
|
}, |
555
|
|
|
|
|
|
|
'String' => { |
556
|
|
|
|
|
|
|
callback => \&parseString, |
557
|
|
|
|
|
|
|
attribute => 'String', |
558
|
|
|
|
|
|
|
lineending => '#pop', |
559
|
|
|
|
|
|
|
}, |
560
|
|
|
|
|
|
|
}); |
561
|
1
|
|
|
|
|
7
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
562
|
1
|
|
|
|
|
3
|
$self->basecontext('Normal'); |
563
|
1
|
|
|
|
|
6
|
$self->keywordscase(0); |
564
|
1
|
|
|
|
|
3
|
$self->initialize; |
565
|
1
|
|
|
|
|
2
|
bless ($self, $class); |
566
|
1
|
|
|
|
|
3
|
return $self; |
567
|
|
|
|
|
|
|
} |
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
sub language { |
570
|
0
|
|
|
0
|
0
|
|
return 'FreeBASIC'; |
571
|
|
|
|
|
|
|
} |
572
|
|
|
|
|
|
|
|
573
|
|
|
|
|
|
|
sub parseComment1 { |
574
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
575
|
|
|
|
|
|
|
# context => '##Alerts' |
576
|
|
|
|
|
|
|
# type => 'IncludeRules' |
577
|
0
|
0
|
|
|
|
|
if ($self->includePlugin('Alerts', $text)) { |
578
|
0
|
|
|
|
|
|
return 1 |
579
|
|
|
|
|
|
|
} |
580
|
0
|
|
|
|
|
|
return 0; |
581
|
|
|
|
|
|
|
}; |
582
|
|
|
|
|
|
|
|
583
|
|
|
|
|
|
|
sub parseNormal { |
584
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
585
|
|
|
|
|
|
|
# String => '\b(exit (function|sub|for|do|while|type|select))([\s]|$)' |
586
|
|
|
|
|
|
|
# attribute => 'Keyword' |
587
|
|
|
|
|
|
|
# context => '#stay' |
588
|
|
|
|
|
|
|
# insensitive => 'true' |
589
|
|
|
|
|
|
|
# type => 'RegExpr' |
590
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(exit (function|sub|for|do|while|type|select))([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
591
|
0
|
|
|
|
|
|
return 1 |
592
|
|
|
|
|
|
|
} |
593
|
|
|
|
|
|
|
# String => '\b(declare (function|sub))([\s]|$)' |
594
|
|
|
|
|
|
|
# attribute => 'Keyword' |
595
|
|
|
|
|
|
|
# context => '#stay' |
596
|
|
|
|
|
|
|
# insensitive => 'true' |
597
|
|
|
|
|
|
|
# type => 'RegExpr' |
598
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(declare (function|sub))([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
599
|
0
|
|
|
|
|
|
return 1 |
600
|
|
|
|
|
|
|
} |
601
|
|
|
|
|
|
|
# String => '\b(while)([\s]|$)' |
602
|
|
|
|
|
|
|
# attribute => 'Keyword' |
603
|
|
|
|
|
|
|
# beginRegion => 'WhileRegion' |
604
|
|
|
|
|
|
|
# context => '#stay' |
605
|
|
|
|
|
|
|
# insensitive => 'true' |
606
|
|
|
|
|
|
|
# type => 'RegExpr' |
607
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(while)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
608
|
0
|
|
|
|
|
|
return 1 |
609
|
|
|
|
|
|
|
} |
610
|
|
|
|
|
|
|
# String => '\b(wend)([\s]|$)' |
611
|
|
|
|
|
|
|
# attribute => 'Keyword' |
612
|
|
|
|
|
|
|
# context => '#stay' |
613
|
|
|
|
|
|
|
# endRegion => 'WhileRegion' |
614
|
|
|
|
|
|
|
# insensitive => 'true' |
615
|
|
|
|
|
|
|
# type => 'RegExpr' |
616
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(wend)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
617
|
0
|
|
|
|
|
|
return 1 |
618
|
|
|
|
|
|
|
} |
619
|
|
|
|
|
|
|
# String => '\b(do)([\s]|$)' |
620
|
|
|
|
|
|
|
# attribute => 'Keyword' |
621
|
|
|
|
|
|
|
# beginRegion => 'DoRegion' |
622
|
|
|
|
|
|
|
# context => '#stay' |
623
|
|
|
|
|
|
|
# insensitive => 'true' |
624
|
|
|
|
|
|
|
# type => 'RegExpr' |
625
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(do)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
626
|
0
|
|
|
|
|
|
return 1 |
627
|
|
|
|
|
|
|
} |
628
|
|
|
|
|
|
|
# String => '\b(loop)([\s]|$)' |
629
|
|
|
|
|
|
|
# attribute => 'Keyword' |
630
|
|
|
|
|
|
|
# context => '#stay' |
631
|
|
|
|
|
|
|
# endRegion => 'DoRegion' |
632
|
|
|
|
|
|
|
# insensitive => 'true' |
633
|
|
|
|
|
|
|
# type => 'RegExpr' |
634
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(loop)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
635
|
0
|
|
|
|
|
|
return 1 |
636
|
|
|
|
|
|
|
} |
637
|
|
|
|
|
|
|
# String => '\b(select)([\s]|$)' |
638
|
|
|
|
|
|
|
# attribute => 'Keyword' |
639
|
|
|
|
|
|
|
# beginRegion => 'SelectRegion' |
640
|
|
|
|
|
|
|
# context => '#stay' |
641
|
|
|
|
|
|
|
# insensitive => 'true' |
642
|
|
|
|
|
|
|
# type => 'RegExpr' |
643
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(select)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
644
|
0
|
|
|
|
|
|
return 1 |
645
|
|
|
|
|
|
|
} |
646
|
|
|
|
|
|
|
# String => '\b(end select)([\s]|$)' |
647
|
|
|
|
|
|
|
# attribute => 'Keyword' |
648
|
|
|
|
|
|
|
# context => '#stay' |
649
|
|
|
|
|
|
|
# endRegion => 'SelectRegion' |
650
|
|
|
|
|
|
|
# insensitive => 'true' |
651
|
|
|
|
|
|
|
# type => 'RegExpr' |
652
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(end select)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
653
|
0
|
|
|
|
|
|
return 1 |
654
|
|
|
|
|
|
|
} |
655
|
|
|
|
|
|
|
# String => '\b(for (input|output|binary|random))([\s]|$)' |
656
|
|
|
|
|
|
|
# attribute => 'Keyword' |
657
|
|
|
|
|
|
|
# context => '#stay' |
658
|
|
|
|
|
|
|
# insensitive => 'true' |
659
|
|
|
|
|
|
|
# type => 'RegExpr' |
660
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(for (input|output|binary|random))([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
661
|
0
|
|
|
|
|
|
return 1 |
662
|
|
|
|
|
|
|
} |
663
|
|
|
|
|
|
|
# String => '\b(for)([\s]|$)' |
664
|
|
|
|
|
|
|
# attribute => 'Keyword' |
665
|
|
|
|
|
|
|
# beginRegion => 'ForRegion' |
666
|
|
|
|
|
|
|
# context => '#stay' |
667
|
|
|
|
|
|
|
# insensitive => 'true' |
668
|
|
|
|
|
|
|
# type => 'RegExpr' |
669
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(for)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
670
|
0
|
|
|
|
|
|
return 1 |
671
|
|
|
|
|
|
|
} |
672
|
|
|
|
|
|
|
# String => '\b(next)([\s]|$)' |
673
|
|
|
|
|
|
|
# attribute => 'Keyword' |
674
|
|
|
|
|
|
|
# context => '#stay' |
675
|
|
|
|
|
|
|
# endRegion => 'ForRegion' |
676
|
|
|
|
|
|
|
# insensitive => 'true' |
677
|
|
|
|
|
|
|
# type => 'RegExpr' |
678
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(next)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
679
|
0
|
|
|
|
|
|
return 1 |
680
|
|
|
|
|
|
|
} |
681
|
|
|
|
|
|
|
# String => '\b(function)([.\s]|$)' |
682
|
|
|
|
|
|
|
# attribute => 'Keyword' |
683
|
|
|
|
|
|
|
# beginRegion => 'fProcedureRegion' |
684
|
|
|
|
|
|
|
# context => '#stay' |
685
|
|
|
|
|
|
|
# insensitive => 'true' |
686
|
|
|
|
|
|
|
# type => 'RegExpr' |
687
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(function)([.\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
688
|
0
|
|
|
|
|
|
return 1 |
689
|
|
|
|
|
|
|
} |
690
|
|
|
|
|
|
|
# String => '\b(end function)([\s]|$)' |
691
|
|
|
|
|
|
|
# attribute => 'Keyword' |
692
|
|
|
|
|
|
|
# context => '#stay' |
693
|
|
|
|
|
|
|
# endRegion => 'fProcedureRegion' |
694
|
|
|
|
|
|
|
# insensitive => 'true' |
695
|
|
|
|
|
|
|
# type => 'RegExpr' |
696
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(end function)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
697
|
0
|
|
|
|
|
|
return 1 |
698
|
|
|
|
|
|
|
} |
699
|
|
|
|
|
|
|
# String => '\b(sub)([.\s]|$)' |
700
|
|
|
|
|
|
|
# attribute => 'Keyword' |
701
|
|
|
|
|
|
|
# beginRegion => 'sProcedureRegion' |
702
|
|
|
|
|
|
|
# context => '#stay' |
703
|
|
|
|
|
|
|
# insensitive => 'true' |
704
|
|
|
|
|
|
|
# type => 'RegExpr' |
705
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(sub)([.\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
706
|
0
|
|
|
|
|
|
return 1 |
707
|
|
|
|
|
|
|
} |
708
|
|
|
|
|
|
|
# String => '\b(end sub)([\s]|$)' |
709
|
|
|
|
|
|
|
# attribute => 'Keyword' |
710
|
|
|
|
|
|
|
# context => '#stay' |
711
|
|
|
|
|
|
|
# endRegion => 'sProcedureRegion' |
712
|
|
|
|
|
|
|
# insensitive => 'true' |
713
|
|
|
|
|
|
|
# type => 'RegExpr' |
714
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(end sub)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
715
|
0
|
|
|
|
|
|
return 1 |
716
|
|
|
|
|
|
|
} |
717
|
|
|
|
|
|
|
# String => '\b(type)([\s]|$)' |
718
|
|
|
|
|
|
|
# attribute => 'Keyword' |
719
|
|
|
|
|
|
|
# beginRegion => 'StructureRegion' |
720
|
|
|
|
|
|
|
# context => '#stay' |
721
|
|
|
|
|
|
|
# insensitive => 'true' |
722
|
|
|
|
|
|
|
# type => 'RegExpr' |
723
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(type)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
724
|
0
|
|
|
|
|
|
return 1 |
725
|
|
|
|
|
|
|
} |
726
|
|
|
|
|
|
|
# String => '\b(end type)([\s]|$)' |
727
|
|
|
|
|
|
|
# attribute => 'Keyword' |
728
|
|
|
|
|
|
|
# context => '#stay' |
729
|
|
|
|
|
|
|
# endRegion => 'StructureRegion' |
730
|
|
|
|
|
|
|
# insensitive => 'true' |
731
|
|
|
|
|
|
|
# type => 'RegExpr' |
732
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(end type)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
733
|
0
|
|
|
|
|
|
return 1 |
734
|
|
|
|
|
|
|
} |
735
|
|
|
|
|
|
|
# String => '\b(if)([\s]|$)' |
736
|
|
|
|
|
|
|
# attribute => 'Keyword' |
737
|
|
|
|
|
|
|
# beginRegion => 'IfRegion' |
738
|
|
|
|
|
|
|
# context => '#stay' |
739
|
|
|
|
|
|
|
# insensitive => 'true' |
740
|
|
|
|
|
|
|
# type => 'RegExpr' |
741
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(if)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
742
|
0
|
|
|
|
|
|
return 1 |
743
|
|
|
|
|
|
|
} |
744
|
|
|
|
|
|
|
# String => '\b(then )[a-zA-Z_\x7f-\xff].' |
745
|
|
|
|
|
|
|
# attribute => 'Keyword' |
746
|
|
|
|
|
|
|
# context => '#stay' |
747
|
|
|
|
|
|
|
# endRegion => 'IfRegion' |
748
|
|
|
|
|
|
|
# insensitive => 'true' |
749
|
|
|
|
|
|
|
# type => 'RegExpr' |
750
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(then )[a-zA-Z_\\x7f-\\xff].', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
751
|
0
|
|
|
|
|
|
return 1 |
752
|
|
|
|
|
|
|
} |
753
|
|
|
|
|
|
|
# String => '\b(end if)([\s]|$)' |
754
|
|
|
|
|
|
|
# attribute => 'Keyword' |
755
|
|
|
|
|
|
|
# context => '#stay' |
756
|
|
|
|
|
|
|
# endRegion => 'IfRegion' |
757
|
|
|
|
|
|
|
# insensitive => 'true' |
758
|
|
|
|
|
|
|
# type => 'RegExpr' |
759
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(end if)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { |
760
|
0
|
|
|
|
|
|
return 1 |
761
|
|
|
|
|
|
|
} |
762
|
|
|
|
|
|
|
# String => 'keywords' |
763
|
|
|
|
|
|
|
# attribute => 'Keyword' |
764
|
|
|
|
|
|
|
# context => '#stay' |
765
|
|
|
|
|
|
|
# type => 'keyword' |
766
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { |
767
|
0
|
|
|
|
|
|
return 1 |
768
|
|
|
|
|
|
|
} |
769
|
|
|
|
|
|
|
# String => 'Data Types' |
770
|
|
|
|
|
|
|
# attribute => 'Data Types' |
771
|
|
|
|
|
|
|
# context => '#stay' |
772
|
|
|
|
|
|
|
# type => 'keyword' |
773
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'Data Types', 0, undef, 0, '#stay', 'Data Types')) { |
774
|
0
|
|
|
|
|
|
return 1 |
775
|
|
|
|
|
|
|
} |
776
|
|
|
|
|
|
|
# String => 'functions' |
777
|
|
|
|
|
|
|
# attribute => 'Functions' |
778
|
|
|
|
|
|
|
# context => '#stay' |
779
|
|
|
|
|
|
|
# type => 'keyword' |
780
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'Functions')) { |
781
|
0
|
|
|
|
|
|
return 1 |
782
|
|
|
|
|
|
|
} |
783
|
|
|
|
|
|
|
# String => '\#+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' |
784
|
|
|
|
|
|
|
# attribute => 'Constant' |
785
|
|
|
|
|
|
|
# context => '#stay' |
786
|
|
|
|
|
|
|
# type => 'RegExpr' |
787
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\#+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*', 0, 0, 0, undef, 0, '#stay', 'Constant')) { |
788
|
0
|
|
|
|
|
|
return 1 |
789
|
|
|
|
|
|
|
} |
790
|
|
|
|
|
|
|
# attribute => 'Number' |
791
|
|
|
|
|
|
|
# context => '#stay' |
792
|
|
|
|
|
|
|
# type => 'Float' |
793
|
0
|
0
|
|
|
|
|
if ($self->testFloat($text, 0, undef, 0, '#stay', 'Number')) { |
794
|
0
|
|
|
|
|
|
return 1 |
795
|
|
|
|
|
|
|
} |
796
|
|
|
|
|
|
|
# attribute => 'Number' |
797
|
|
|
|
|
|
|
# context => '#stay' |
798
|
|
|
|
|
|
|
# type => 'Int' |
799
|
0
|
0
|
|
|
|
|
if ($self->testInt($text, 0, undef, 0, '#stay', 'Number')) { |
800
|
0
|
|
|
|
|
|
return 1 |
801
|
|
|
|
|
|
|
} |
802
|
|
|
|
|
|
|
# attribute => 'String' |
803
|
|
|
|
|
|
|
# char => '"' |
804
|
|
|
|
|
|
|
# context => 'String' |
805
|
|
|
|
|
|
|
# type => 'DetectChar' |
806
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { |
807
|
0
|
|
|
|
|
|
return 1 |
808
|
|
|
|
|
|
|
} |
809
|
|
|
|
|
|
|
# String => '^\s*;+\s*BEGIN.*$' |
810
|
|
|
|
|
|
|
# attribute => 'Region Marker' |
811
|
|
|
|
|
|
|
# beginRegion => 'marker' |
812
|
|
|
|
|
|
|
# context => '#stay' |
813
|
|
|
|
|
|
|
# type => 'RegExpr' |
814
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '^\\s*;+\\s*BEGIN.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { |
815
|
0
|
|
|
|
|
|
return 1 |
816
|
|
|
|
|
|
|
} |
817
|
|
|
|
|
|
|
# String => '^\s*;+\s*END.*$' |
818
|
|
|
|
|
|
|
# attribute => 'Region Marker' |
819
|
|
|
|
|
|
|
# context => '#stay' |
820
|
|
|
|
|
|
|
# endRegion => 'marker' |
821
|
|
|
|
|
|
|
# type => 'RegExpr' |
822
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '^\\s*;+\\s*END.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { |
823
|
0
|
|
|
|
|
|
return 1 |
824
|
|
|
|
|
|
|
} |
825
|
|
|
|
|
|
|
# attribute => 'Comment' |
826
|
|
|
|
|
|
|
# char => ''' |
827
|
|
|
|
|
|
|
# context => 'Comment1' |
828
|
|
|
|
|
|
|
# type => 'DetectChar' |
829
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Comment1', 'Comment')) { |
830
|
0
|
|
|
|
|
|
return 1 |
831
|
|
|
|
|
|
|
} |
832
|
0
|
|
|
|
|
|
return 0; |
833
|
|
|
|
|
|
|
}; |
834
|
|
|
|
|
|
|
|
835
|
|
|
|
|
|
|
sub parseString { |
836
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
837
|
|
|
|
|
|
|
# attribute => 'String' |
838
|
|
|
|
|
|
|
# char => '"' |
839
|
|
|
|
|
|
|
# context => '#pop' |
840
|
|
|
|
|
|
|
# type => 'DetectChar' |
841
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
842
|
0
|
|
|
|
|
|
return 1 |
843
|
|
|
|
|
|
|
} |
844
|
0
|
|
|
|
|
|
return 0; |
845
|
|
|
|
|
|
|
}; |
846
|
|
|
|
|
|
|
|
847
|
|
|
|
|
|
|
|
848
|
|
|
|
|
|
|
1; |
849
|
|
|
|
|
|
|
|
850
|
|
|
|
|
|
|
__END__ |