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 'taskjuggler.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 1.21 |
9
|
|
|
|
|
|
|
#kate version 2.1 |
10
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:06 2008, localtime |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::TaskJuggler; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.14'; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
496
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
17
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
18
|
1
|
|
|
1
|
|
4
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
999
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
1
|
|
|
1
|
0
|
575
|
my $proto = shift; |
22
|
1
|
|
33
|
|
|
6
|
my $class = ref($proto) || $proto; |
23
|
1
|
|
|
|
|
8
|
my $self = $class->SUPER::new(@_); |
24
|
1
|
|
|
|
|
12
|
$self->attributes({ |
25
|
|
|
|
|
|
|
'Builtin Function' => 'Function', |
26
|
|
|
|
|
|
|
'Char' => 'Char', |
27
|
|
|
|
|
|
|
'Comment' => 'Comment', |
28
|
|
|
|
|
|
|
'Data Types' => 'DataType', |
29
|
|
|
|
|
|
|
'Decimal' => 'DecVal', |
30
|
|
|
|
|
|
|
'Float' => 'Float', |
31
|
|
|
|
|
|
|
'Hex' => 'BaseN', |
32
|
|
|
|
|
|
|
'Keyword' => 'Keyword', |
33
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
34
|
|
|
|
|
|
|
'Octal' => 'BaseN', |
35
|
|
|
|
|
|
|
'String' => 'String', |
36
|
|
|
|
|
|
|
'String Char' => 'Char', |
37
|
|
|
|
|
|
|
'Symbol' => 'Normal', |
38
|
|
|
|
|
|
|
}); |
39
|
1
|
|
|
|
|
8
|
$self->listAdd('builtinfuncs', |
40
|
|
|
|
|
|
|
'accountid', |
41
|
|
|
|
|
|
|
'accountreport', |
42
|
|
|
|
|
|
|
'accumulate', |
43
|
|
|
|
|
|
|
'allocate', |
44
|
|
|
|
|
|
|
'allowredefinitions', |
45
|
|
|
|
|
|
|
'alternative', |
46
|
|
|
|
|
|
|
'barlabels', |
47
|
|
|
|
|
|
|
'booking', |
48
|
|
|
|
|
|
|
'caption', |
49
|
|
|
|
|
|
|
'celltext', |
50
|
|
|
|
|
|
|
'cellurl', |
51
|
|
|
|
|
|
|
'columns', |
52
|
|
|
|
|
|
|
'complete', |
53
|
|
|
|
|
|
|
'completed', |
54
|
|
|
|
|
|
|
'copyright', |
55
|
|
|
|
|
|
|
'cost', |
56
|
|
|
|
|
|
|
'credit', |
57
|
|
|
|
|
|
|
'criticalness', |
58
|
|
|
|
|
|
|
'csvaccountreport', |
59
|
|
|
|
|
|
|
'csvresourcereport', |
60
|
|
|
|
|
|
|
'csvtaskreport', |
61
|
|
|
|
|
|
|
'currency', |
62
|
|
|
|
|
|
|
'currencydigits', |
63
|
|
|
|
|
|
|
'currencyformat', |
64
|
|
|
|
|
|
|
'dailymax', |
65
|
|
|
|
|
|
|
'dailyworkinghours', |
66
|
|
|
|
|
|
|
'db', |
67
|
|
|
|
|
|
|
'depends', |
68
|
|
|
|
|
|
|
'disabled', |
69
|
|
|
|
|
|
|
'duration', |
70
|
|
|
|
|
|
|
'efficiency', |
71
|
|
|
|
|
|
|
'effort', |
72
|
|
|
|
|
|
|
'empty', |
73
|
|
|
|
|
|
|
'end', |
74
|
|
|
|
|
|
|
'endbuffer', |
75
|
|
|
|
|
|
|
'endbufferstart', |
76
|
|
|
|
|
|
|
'endcredit', |
77
|
|
|
|
|
|
|
'endsAfter', |
78
|
|
|
|
|
|
|
'endsBefore', |
79
|
|
|
|
|
|
|
'export', |
80
|
|
|
|
|
|
|
'extend', |
81
|
|
|
|
|
|
|
'finished', |
82
|
|
|
|
|
|
|
'flags', |
83
|
|
|
|
|
|
|
'follows', |
84
|
|
|
|
|
|
|
'freeload', |
85
|
|
|
|
|
|
|
'gapduration', |
86
|
|
|
|
|
|
|
'gaplength', |
87
|
|
|
|
|
|
|
'headline', |
88
|
|
|
|
|
|
|
'hideaccount', |
89
|
|
|
|
|
|
|
'hidecelltext', |
90
|
|
|
|
|
|
|
'hidecellurl', |
91
|
|
|
|
|
|
|
'hideresource', |
92
|
|
|
|
|
|
|
'hidetask', |
93
|
|
|
|
|
|
|
'hierarchindex', |
94
|
|
|
|
|
|
|
'hierarchno', |
95
|
|
|
|
|
|
|
'htmlaccountreport', |
96
|
|
|
|
|
|
|
'htmlresourcereport', |
97
|
|
|
|
|
|
|
'htmlstatusreport', |
98
|
|
|
|
|
|
|
'htmltaskreport', |
99
|
|
|
|
|
|
|
'htmlweeklycalendar', |
100
|
|
|
|
|
|
|
'id', |
101
|
|
|
|
|
|
|
'include', |
102
|
|
|
|
|
|
|
'index', |
103
|
|
|
|
|
|
|
'inherit', |
104
|
|
|
|
|
|
|
'inprogress', |
105
|
|
|
|
|
|
|
'journalentry', |
106
|
|
|
|
|
|
|
'kotrusid', |
107
|
|
|
|
|
|
|
'kotrusmode', |
108
|
|
|
|
|
|
|
'label', |
109
|
|
|
|
|
|
|
'late', |
110
|
|
|
|
|
|
|
'length', |
111
|
|
|
|
|
|
|
'limits', |
112
|
|
|
|
|
|
|
'load', |
113
|
|
|
|
|
|
|
'loadunit', |
114
|
|
|
|
|
|
|
'macro', |
115
|
|
|
|
|
|
|
'mandatory', |
116
|
|
|
|
|
|
|
'maxeffort', |
117
|
|
|
|
|
|
|
'maxend', |
118
|
|
|
|
|
|
|
'maxstart', |
119
|
|
|
|
|
|
|
'milestone', |
120
|
|
|
|
|
|
|
'mineffort', |
121
|
|
|
|
|
|
|
'minend', |
122
|
|
|
|
|
|
|
'minstart', |
123
|
|
|
|
|
|
|
'monthlymax', |
124
|
|
|
|
|
|
|
'name', |
125
|
|
|
|
|
|
|
'no', |
126
|
|
|
|
|
|
|
'nokotrus', |
127
|
|
|
|
|
|
|
'note', |
128
|
|
|
|
|
|
|
'notimestamp', |
129
|
|
|
|
|
|
|
'notstarted', |
130
|
|
|
|
|
|
|
'now', |
131
|
|
|
|
|
|
|
'numberformat', |
132
|
|
|
|
|
|
|
'ontime', |
133
|
|
|
|
|
|
|
'optimize', |
134
|
|
|
|
|
|
|
'order', |
135
|
|
|
|
|
|
|
'pathcriticalness', |
136
|
|
|
|
|
|
|
'persistent', |
137
|
|
|
|
|
|
|
'precedes', |
138
|
|
|
|
|
|
|
'priority', |
139
|
|
|
|
|
|
|
'profit', |
140
|
|
|
|
|
|
|
'projectid', |
141
|
|
|
|
|
|
|
'projectids', |
142
|
|
|
|
|
|
|
'projection', |
143
|
|
|
|
|
|
|
'rate', |
144
|
|
|
|
|
|
|
'rawhead', |
145
|
|
|
|
|
|
|
'rawstylesheet', |
146
|
|
|
|
|
|
|
'rawtail', |
147
|
|
|
|
|
|
|
'reference', |
148
|
|
|
|
|
|
|
'resourceid', |
149
|
|
|
|
|
|
|
'resourcereport', |
150
|
|
|
|
|
|
|
'resources', |
151
|
|
|
|
|
|
|
'responsibilities', |
152
|
|
|
|
|
|
|
'responsible', |
153
|
|
|
|
|
|
|
'revenue', |
154
|
|
|
|
|
|
|
'rollupaccount', |
155
|
|
|
|
|
|
|
'rollupresource', |
156
|
|
|
|
|
|
|
'rolluptask', |
157
|
|
|
|
|
|
|
'scenario', |
158
|
|
|
|
|
|
|
'scenarios', |
159
|
|
|
|
|
|
|
'schedule', |
160
|
|
|
|
|
|
|
'scheduled', |
161
|
|
|
|
|
|
|
'scheduling', |
162
|
|
|
|
|
|
|
'select', |
163
|
|
|
|
|
|
|
'separator', |
164
|
|
|
|
|
|
|
'seqno', |
165
|
|
|
|
|
|
|
'shorttimeformat', |
166
|
|
|
|
|
|
|
'showprojectids', |
167
|
|
|
|
|
|
|
'sortaccounts', |
168
|
|
|
|
|
|
|
'sortresources', |
169
|
|
|
|
|
|
|
'sorttasks', |
170
|
|
|
|
|
|
|
'start', |
171
|
|
|
|
|
|
|
'startbuffer', |
172
|
|
|
|
|
|
|
'startbufferend', |
173
|
|
|
|
|
|
|
'startcredit', |
174
|
|
|
|
|
|
|
'startsAfter', |
175
|
|
|
|
|
|
|
'startsBefore', |
176
|
|
|
|
|
|
|
'status', |
177
|
|
|
|
|
|
|
'statusnote', |
178
|
|
|
|
|
|
|
'subtitle', |
179
|
|
|
|
|
|
|
'subtitleurl', |
180
|
|
|
|
|
|
|
'supplement', |
181
|
|
|
|
|
|
|
'table', |
182
|
|
|
|
|
|
|
'taskattributes', |
183
|
|
|
|
|
|
|
'taskid', |
184
|
|
|
|
|
|
|
'taskprefix', |
185
|
|
|
|
|
|
|
'taskreport', |
186
|
|
|
|
|
|
|
'taskroot', |
187
|
|
|
|
|
|
|
'text', |
188
|
|
|
|
|
|
|
'timeformat', |
189
|
|
|
|
|
|
|
'timezone', |
190
|
|
|
|
|
|
|
'timingresolution', |
191
|
|
|
|
|
|
|
'title', |
192
|
|
|
|
|
|
|
'titleurl', |
193
|
|
|
|
|
|
|
'total', |
194
|
|
|
|
|
|
|
'tree', |
195
|
|
|
|
|
|
|
'treeLevel', |
196
|
|
|
|
|
|
|
'url', |
197
|
|
|
|
|
|
|
'utilization', |
198
|
|
|
|
|
|
|
'vacation', |
199
|
|
|
|
|
|
|
'version', |
200
|
|
|
|
|
|
|
'weeklymax', |
201
|
|
|
|
|
|
|
'weekstartsmonday', |
202
|
|
|
|
|
|
|
'weekstartssunday', |
203
|
|
|
|
|
|
|
'workinghours', |
204
|
|
|
|
|
|
|
'xml', |
205
|
|
|
|
|
|
|
'xmlreport', |
206
|
|
|
|
|
|
|
'yearlyworkingdays', |
207
|
|
|
|
|
|
|
); |
208
|
1
|
|
|
|
|
3
|
$self->listAdd('keywords', |
209
|
|
|
|
|
|
|
'account', |
210
|
|
|
|
|
|
|
'project', |
211
|
|
|
|
|
|
|
'resource', |
212
|
|
|
|
|
|
|
'scenario', |
213
|
|
|
|
|
|
|
'shift', |
214
|
|
|
|
|
|
|
'task', |
215
|
|
|
|
|
|
|
); |
216
|
1
|
|
|
|
|
4
|
$self->listAdd('types', |
217
|
|
|
|
|
|
|
'alap', |
218
|
|
|
|
|
|
|
'all', |
219
|
|
|
|
|
|
|
'asap', |
220
|
|
|
|
|
|
|
'completeddown', |
221
|
|
|
|
|
|
|
'completedup', |
222
|
|
|
|
|
|
|
'containstask', |
223
|
|
|
|
|
|
|
'criticalnessdown', |
224
|
|
|
|
|
|
|
'criticalnessup', |
225
|
|
|
|
|
|
|
'd', |
226
|
|
|
|
|
|
|
'daily', |
227
|
|
|
|
|
|
|
'day', |
228
|
|
|
|
|
|
|
'days', |
229
|
|
|
|
|
|
|
'enddown', |
230
|
|
|
|
|
|
|
'endup', |
231
|
|
|
|
|
|
|
'fri', |
232
|
|
|
|
|
|
|
'fullnamedown', |
233
|
|
|
|
|
|
|
'fullnameup', |
234
|
|
|
|
|
|
|
'h', |
235
|
|
|
|
|
|
|
'hours', |
236
|
|
|
|
|
|
|
'iddown', |
237
|
|
|
|
|
|
|
'idup', |
238
|
|
|
|
|
|
|
'indexdown', |
239
|
|
|
|
|
|
|
'indexup', |
240
|
|
|
|
|
|
|
'inprogressearly', |
241
|
|
|
|
|
|
|
'inprogresslate', |
242
|
|
|
|
|
|
|
'isAResource', |
243
|
|
|
|
|
|
|
'isATask', |
244
|
|
|
|
|
|
|
'isAccount', |
245
|
|
|
|
|
|
|
'isAllocated', |
246
|
|
|
|
|
|
|
'isAllocatedToProject', |
247
|
|
|
|
|
|
|
'isAnAccount', |
248
|
|
|
|
|
|
|
'isChildOf', |
249
|
|
|
|
|
|
|
'isDutyOf', |
250
|
|
|
|
|
|
|
'isLeaf', |
251
|
|
|
|
|
|
|
'isMilestone', |
252
|
|
|
|
|
|
|
'isParentOf', |
253
|
|
|
|
|
|
|
'isResource', |
254
|
|
|
|
|
|
|
'isTask', |
255
|
|
|
|
|
|
|
'isTaskOfProject', |
256
|
|
|
|
|
|
|
'isTaskStatus', |
257
|
|
|
|
|
|
|
'isactualallocated', |
258
|
|
|
|
|
|
|
'isatask', |
259
|
|
|
|
|
|
|
'isplanallocated', |
260
|
|
|
|
|
|
|
'issubtaskof', |
261
|
|
|
|
|
|
|
'kotrusiddown', |
262
|
|
|
|
|
|
|
'kotrusidup', |
263
|
|
|
|
|
|
|
'longauto', |
264
|
|
|
|
|
|
|
'm', |
265
|
|
|
|
|
|
|
'maxeffortdown', |
266
|
|
|
|
|
|
|
'maxeffortup', |
267
|
|
|
|
|
|
|
'maxloaded', |
268
|
|
|
|
|
|
|
'min', |
269
|
|
|
|
|
|
|
'minallocated', |
270
|
|
|
|
|
|
|
'mineffortdown', |
271
|
|
|
|
|
|
|
'mineffortup', |
272
|
|
|
|
|
|
|
'minloaded', |
273
|
|
|
|
|
|
|
'minutes', |
274
|
|
|
|
|
|
|
'mon', |
275
|
|
|
|
|
|
|
'month', |
276
|
|
|
|
|
|
|
'monthly', |
277
|
|
|
|
|
|
|
'months', |
278
|
|
|
|
|
|
|
'namedown', |
279
|
|
|
|
|
|
|
'nameup', |
280
|
|
|
|
|
|
|
'off', |
281
|
|
|
|
|
|
|
'pathcriticalnessdown', |
282
|
|
|
|
|
|
|
'pathcriticalnessup', |
283
|
|
|
|
|
|
|
'prioritydown', |
284
|
|
|
|
|
|
|
'priorityup', |
285
|
|
|
|
|
|
|
'quarter', |
286
|
|
|
|
|
|
|
'quarterly', |
287
|
|
|
|
|
|
|
'random', |
288
|
|
|
|
|
|
|
'ratedown', |
289
|
|
|
|
|
|
|
'rateup', |
290
|
|
|
|
|
|
|
'responsibledown', |
291
|
|
|
|
|
|
|
'responsibleup', |
292
|
|
|
|
|
|
|
'sat', |
293
|
|
|
|
|
|
|
'sequencedown', |
294
|
|
|
|
|
|
|
'sequenceup', |
295
|
|
|
|
|
|
|
'shortauto', |
296
|
|
|
|
|
|
|
'startdown', |
297
|
|
|
|
|
|
|
'startup', |
298
|
|
|
|
|
|
|
'statusdown', |
299
|
|
|
|
|
|
|
'statusup', |
300
|
|
|
|
|
|
|
'sun', |
301
|
|
|
|
|
|
|
'thu', |
302
|
|
|
|
|
|
|
'tue', |
303
|
|
|
|
|
|
|
'undefined', |
304
|
|
|
|
|
|
|
'w', |
305
|
|
|
|
|
|
|
'wed', |
306
|
|
|
|
|
|
|
'week', |
307
|
|
|
|
|
|
|
'weekly', |
308
|
|
|
|
|
|
|
'weeks', |
309
|
|
|
|
|
|
|
'y', |
310
|
|
|
|
|
|
|
'year', |
311
|
|
|
|
|
|
|
'yearly', |
312
|
|
|
|
|
|
|
'years', |
313
|
|
|
|
|
|
|
); |
314
|
1
|
|
|
|
|
13
|
$self->contextdata({ |
315
|
|
|
|
|
|
|
'Comment1' => { |
316
|
|
|
|
|
|
|
callback => \&parseComment1, |
317
|
|
|
|
|
|
|
attribute => 'Comment', |
318
|
|
|
|
|
|
|
lineending => '#pop', |
319
|
|
|
|
|
|
|
}, |
320
|
|
|
|
|
|
|
'Comment2' => { |
321
|
|
|
|
|
|
|
callback => \&parseComment2, |
322
|
|
|
|
|
|
|
attribute => 'Comment', |
323
|
|
|
|
|
|
|
}, |
324
|
|
|
|
|
|
|
'Normal' => { |
325
|
|
|
|
|
|
|
callback => \&parseNormal, |
326
|
|
|
|
|
|
|
attribute => 'Normal Text', |
327
|
|
|
|
|
|
|
}, |
328
|
|
|
|
|
|
|
'String1' => { |
329
|
|
|
|
|
|
|
callback => \&parseString1, |
330
|
|
|
|
|
|
|
attribute => 'String', |
331
|
|
|
|
|
|
|
}, |
332
|
|
|
|
|
|
|
'String2' => { |
333
|
|
|
|
|
|
|
callback => \&parseString2, |
334
|
|
|
|
|
|
|
attribute => 'String', |
335
|
|
|
|
|
|
|
}, |
336
|
|
|
|
|
|
|
}); |
337
|
1
|
|
|
|
|
5
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
338
|
1
|
|
|
|
|
4
|
$self->basecontext('Normal'); |
339
|
1
|
|
|
|
|
5
|
$self->keywordscase(0); |
340
|
1
|
|
|
|
|
3
|
$self->initialize; |
341
|
1
|
|
|
|
|
2
|
bless ($self, $class); |
342
|
1
|
|
|
|
|
2
|
return $self; |
343
|
|
|
|
|
|
|
} |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
sub language { |
346
|
0
|
|
|
0
|
0
|
|
return 'TaskJuggler'; |
347
|
|
|
|
|
|
|
} |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
sub parseComment1 { |
350
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
351
|
|
|
|
|
|
|
# context => '##Alerts' |
352
|
|
|
|
|
|
|
# type => 'IncludeRules' |
353
|
0
|
0
|
|
|
|
|
if ($self->includePlugin('Alerts', $text)) { |
354
|
0
|
|
|
|
|
|
return 1 |
355
|
|
|
|
|
|
|
} |
356
|
0
|
|
|
|
|
|
return 0; |
357
|
|
|
|
|
|
|
}; |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
sub parseComment2 { |
360
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
361
|
|
|
|
|
|
|
# attribute => 'Comment' |
362
|
|
|
|
|
|
|
# char => '*' |
363
|
|
|
|
|
|
|
# char1 => '/' |
364
|
|
|
|
|
|
|
# context => '#pop' |
365
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
366
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { |
367
|
0
|
|
|
|
|
|
return 1 |
368
|
|
|
|
|
|
|
} |
369
|
0
|
|
|
|
|
|
return 0; |
370
|
|
|
|
|
|
|
}; |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
sub parseNormal { |
373
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
374
|
|
|
|
|
|
|
# String => 'builtinfuncs' |
375
|
|
|
|
|
|
|
# attribute => 'Builtin Function' |
376
|
|
|
|
|
|
|
# context => '#stay' |
377
|
|
|
|
|
|
|
# type => 'keyword' |
378
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'builtinfuncs', 0, undef, 0, '#stay', 'Builtin Function')) { |
379
|
0
|
|
|
|
|
|
return 1 |
380
|
|
|
|
|
|
|
} |
381
|
|
|
|
|
|
|
# String => 'keywords' |
382
|
|
|
|
|
|
|
# attribute => 'Keyword' |
383
|
|
|
|
|
|
|
# context => '#stay' |
384
|
|
|
|
|
|
|
# type => 'keyword' |
385
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { |
386
|
0
|
|
|
|
|
|
return 1 |
387
|
|
|
|
|
|
|
} |
388
|
|
|
|
|
|
|
# String => 'types' |
389
|
|
|
|
|
|
|
# attribute => 'Data Types' |
390
|
|
|
|
|
|
|
# context => '#stay' |
391
|
|
|
|
|
|
|
# type => 'keyword' |
392
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Types')) { |
393
|
0
|
|
|
|
|
|
return 1 |
394
|
|
|
|
|
|
|
} |
395
|
|
|
|
|
|
|
# attribute => 'Symbol' |
396
|
|
|
|
|
|
|
# beginRegion => 'Brace2' |
397
|
|
|
|
|
|
|
# char => '{' |
398
|
|
|
|
|
|
|
# context => '#stay' |
399
|
|
|
|
|
|
|
# type => 'DetectChar' |
400
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { |
401
|
0
|
|
|
|
|
|
return 1 |
402
|
|
|
|
|
|
|
} |
403
|
|
|
|
|
|
|
# attribute => 'Symbol' |
404
|
|
|
|
|
|
|
# char => '}' |
405
|
|
|
|
|
|
|
# context => '#stay' |
406
|
|
|
|
|
|
|
# endRegion => 'Brace2' |
407
|
|
|
|
|
|
|
# type => 'DetectChar' |
408
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { |
409
|
0
|
|
|
|
|
|
return 1 |
410
|
|
|
|
|
|
|
} |
411
|
|
|
|
|
|
|
# attribute => 'Symbol' |
412
|
|
|
|
|
|
|
# beginRegion => 'Brace1' |
413
|
|
|
|
|
|
|
# char => '[' |
414
|
|
|
|
|
|
|
# context => '#stay' |
415
|
|
|
|
|
|
|
# type => 'DetectChar' |
416
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { |
417
|
0
|
|
|
|
|
|
return 1 |
418
|
|
|
|
|
|
|
} |
419
|
|
|
|
|
|
|
# attribute => 'Symbol' |
420
|
|
|
|
|
|
|
# char => ']' |
421
|
|
|
|
|
|
|
# context => '#stay' |
422
|
|
|
|
|
|
|
# endRegion => 'Brace1' |
423
|
|
|
|
|
|
|
# type => 'DetectChar' |
424
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { |
425
|
0
|
|
|
|
|
|
return 1 |
426
|
|
|
|
|
|
|
} |
427
|
|
|
|
|
|
|
# attribute => 'Float' |
428
|
|
|
|
|
|
|
# context => '#stay' |
429
|
|
|
|
|
|
|
# items => 'ARRAY(0x1782620)' |
430
|
|
|
|
|
|
|
# type => 'Float' |
431
|
0
|
0
|
|
|
|
|
if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { |
432
|
|
|
|
|
|
|
# String => 'fF' |
433
|
|
|
|
|
|
|
# attribute => 'Float' |
434
|
|
|
|
|
|
|
# context => '#stay' |
435
|
|
|
|
|
|
|
# type => 'AnyChar' |
436
|
0
|
0
|
|
|
|
|
if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { |
437
|
0
|
|
|
|
|
|
return 1 |
438
|
|
|
|
|
|
|
} |
439
|
|
|
|
|
|
|
} |
440
|
|
|
|
|
|
|
# attribute => 'Decimal' |
441
|
|
|
|
|
|
|
# context => '#stay' |
442
|
|
|
|
|
|
|
# items => 'ARRAY(0x16a0c30)' |
443
|
|
|
|
|
|
|
# type => 'Int' |
444
|
0
|
0
|
|
|
|
|
if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { |
445
|
|
|
|
|
|
|
# String => 'ULL' |
446
|
|
|
|
|
|
|
# attribute => 'Decimal' |
447
|
|
|
|
|
|
|
# context => '#stay' |
448
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
449
|
|
|
|
|
|
|
# type => 'StringDetect' |
450
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
451
|
0
|
|
|
|
|
|
return 1 |
452
|
|
|
|
|
|
|
} |
453
|
|
|
|
|
|
|
# String => 'LUL' |
454
|
|
|
|
|
|
|
# attribute => 'Decimal' |
455
|
|
|
|
|
|
|
# context => '#stay' |
456
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
457
|
|
|
|
|
|
|
# type => 'StringDetect' |
458
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
459
|
0
|
|
|
|
|
|
return 1 |
460
|
|
|
|
|
|
|
} |
461
|
|
|
|
|
|
|
# String => 'LLU' |
462
|
|
|
|
|
|
|
# attribute => 'Decimal' |
463
|
|
|
|
|
|
|
# context => '#stay' |
464
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
465
|
|
|
|
|
|
|
# type => 'StringDetect' |
466
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
467
|
0
|
|
|
|
|
|
return 1 |
468
|
|
|
|
|
|
|
} |
469
|
|
|
|
|
|
|
# String => 'UL' |
470
|
|
|
|
|
|
|
# attribute => 'Decimal' |
471
|
|
|
|
|
|
|
# context => '#stay' |
472
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
473
|
|
|
|
|
|
|
# type => 'StringDetect' |
474
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
475
|
0
|
|
|
|
|
|
return 1 |
476
|
|
|
|
|
|
|
} |
477
|
|
|
|
|
|
|
# String => 'LU' |
478
|
|
|
|
|
|
|
# attribute => 'Decimal' |
479
|
|
|
|
|
|
|
# context => '#stay' |
480
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
481
|
|
|
|
|
|
|
# type => 'StringDetect' |
482
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
483
|
0
|
|
|
|
|
|
return 1 |
484
|
|
|
|
|
|
|
} |
485
|
|
|
|
|
|
|
# String => 'LL' |
486
|
|
|
|
|
|
|
# attribute => 'Decimal' |
487
|
|
|
|
|
|
|
# context => '#stay' |
488
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
489
|
|
|
|
|
|
|
# type => 'StringDetect' |
490
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
491
|
0
|
|
|
|
|
|
return 1 |
492
|
|
|
|
|
|
|
} |
493
|
|
|
|
|
|
|
# String => 'U' |
494
|
|
|
|
|
|
|
# attribute => 'Decimal' |
495
|
|
|
|
|
|
|
# context => '#stay' |
496
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
497
|
|
|
|
|
|
|
# type => 'StringDetect' |
498
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
499
|
0
|
|
|
|
|
|
return 1 |
500
|
|
|
|
|
|
|
} |
501
|
|
|
|
|
|
|
# String => 'L' |
502
|
|
|
|
|
|
|
# attribute => 'Decimal' |
503
|
|
|
|
|
|
|
# context => '#stay' |
504
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
505
|
|
|
|
|
|
|
# type => 'StringDetect' |
506
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
507
|
0
|
|
|
|
|
|
return 1 |
508
|
|
|
|
|
|
|
} |
509
|
|
|
|
|
|
|
} |
510
|
|
|
|
|
|
|
# attribute => 'String' |
511
|
|
|
|
|
|
|
# char => ''' |
512
|
|
|
|
|
|
|
# context => 'String1' |
513
|
|
|
|
|
|
|
# type => 'DetectChar' |
514
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String1', 'String')) { |
515
|
0
|
|
|
|
|
|
return 1 |
516
|
|
|
|
|
|
|
} |
517
|
|
|
|
|
|
|
# attribute => 'String' |
518
|
|
|
|
|
|
|
# char => '"' |
519
|
|
|
|
|
|
|
# context => 'String2' |
520
|
|
|
|
|
|
|
# type => 'DetectChar' |
521
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String2', 'String')) { |
522
|
0
|
|
|
|
|
|
return 1 |
523
|
|
|
|
|
|
|
} |
524
|
|
|
|
|
|
|
# attribute => 'Comment' |
525
|
|
|
|
|
|
|
# char => '#' |
526
|
|
|
|
|
|
|
# context => 'Comment1' |
527
|
|
|
|
|
|
|
# type => 'DetectChar' |
528
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Comment1', 'Comment')) { |
529
|
0
|
|
|
|
|
|
return 1 |
530
|
|
|
|
|
|
|
} |
531
|
|
|
|
|
|
|
# attribute => 'Comment' |
532
|
|
|
|
|
|
|
# char => '/' |
533
|
|
|
|
|
|
|
# char1 => '*' |
534
|
|
|
|
|
|
|
# context => 'Comment2' |
535
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
536
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Comment2', 'Comment')) { |
537
|
0
|
|
|
|
|
|
return 1 |
538
|
|
|
|
|
|
|
} |
539
|
0
|
|
|
|
|
|
return 0; |
540
|
|
|
|
|
|
|
}; |
541
|
|
|
|
|
|
|
|
542
|
|
|
|
|
|
|
sub parseString1 { |
543
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
544
|
|
|
|
|
|
|
# attribute => 'String' |
545
|
|
|
|
|
|
|
# char => ''' |
546
|
|
|
|
|
|
|
# context => '#pop' |
547
|
|
|
|
|
|
|
# type => 'DetectChar' |
548
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { |
549
|
0
|
|
|
|
|
|
return 1 |
550
|
|
|
|
|
|
|
} |
551
|
0
|
|
|
|
|
|
return 0; |
552
|
|
|
|
|
|
|
}; |
553
|
|
|
|
|
|
|
|
554
|
|
|
|
|
|
|
sub parseString2 { |
555
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
556
|
|
|
|
|
|
|
# attribute => 'String' |
557
|
|
|
|
|
|
|
# char => '"' |
558
|
|
|
|
|
|
|
# context => '#pop' |
559
|
|
|
|
|
|
|
# type => 'DetectChar' |
560
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
561
|
0
|
|
|
|
|
|
return 1 |
562
|
|
|
|
|
|
|
} |
563
|
0
|
|
|
|
|
|
return 0; |
564
|
|
|
|
|
|
|
}; |
565
|
|
|
|
|
|
|
|
566
|
|
|
|
|
|
|
|
567
|
|
|
|
|
|
|
1; |
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
__END__ |