| 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 'component-pascal.xml' file of the syntax highlight |
|
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 1.05 |
|
9
|
|
|
|
|
|
|
#kate version 2.1 |
|
10
|
|
|
|
|
|
|
#kate author Werner Braun (wb@o3-software.de) |
|
11
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:04 2008, localtime |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::ComponentminusPascal; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.07'; |
|
16
|
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
1236
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
48
|
|
|
18
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
40
|
|
|
19
|
1
|
|
|
1
|
|
6
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
1606
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
|
22
|
1
|
|
|
1
|
0
|
594
|
my $proto = shift; |
|
23
|
1
|
|
33
|
|
|
8
|
my $class = ref($proto) || $proto; |
|
24
|
1
|
|
|
|
|
11
|
my $self = $class->SUPER::new(@_); |
|
25
|
1
|
|
|
|
|
26
|
$self->attributes({ |
|
26
|
|
|
|
|
|
|
'Attribute' => 'Others', |
|
27
|
|
|
|
|
|
|
'Builtin' => 'Normal', |
|
28
|
|
|
|
|
|
|
'Char' => 'Char', |
|
29
|
|
|
|
|
|
|
'CommentMaior' => 'Comment', |
|
30
|
|
|
|
|
|
|
'CommentMinor' => 'Comment', |
|
31
|
|
|
|
|
|
|
'Exit' => 'Keyword', |
|
32
|
|
|
|
|
|
|
'ExportFull' => 'Others', |
|
33
|
|
|
|
|
|
|
'ExportReadOnly' => 'Others', |
|
34
|
|
|
|
|
|
|
'Float' => 'Float', |
|
35
|
|
|
|
|
|
|
'Integer' => 'BaseN', |
|
36
|
|
|
|
|
|
|
'Keyword' => 'Keyword', |
|
37
|
|
|
|
|
|
|
'MemAlloc' => 'Keyword', |
|
38
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
|
39
|
|
|
|
|
|
|
'Operator' => 'Normal', |
|
40
|
|
|
|
|
|
|
'Relation' => 'Normal', |
|
41
|
|
|
|
|
|
|
'SpecialValues' => 'DecVal', |
|
42
|
|
|
|
|
|
|
'String' => 'String', |
|
43
|
|
|
|
|
|
|
'Type' => 'DataType', |
|
44
|
|
|
|
|
|
|
}); |
|
45
|
1
|
|
|
|
|
10
|
$self->listAdd('attributes', |
|
46
|
|
|
|
|
|
|
'ABSTRACT', |
|
47
|
|
|
|
|
|
|
'EMPTY', |
|
48
|
|
|
|
|
|
|
'EXTENSIBLE', |
|
49
|
|
|
|
|
|
|
'LIMITED', |
|
50
|
|
|
|
|
|
|
); |
|
51
|
1
|
|
|
|
|
5
|
$self->listAdd('builtins', |
|
52
|
|
|
|
|
|
|
'ABS', |
|
53
|
|
|
|
|
|
|
'ASH', |
|
54
|
|
|
|
|
|
|
'BITS', |
|
55
|
|
|
|
|
|
|
'CAP', |
|
56
|
|
|
|
|
|
|
'CHR', |
|
57
|
|
|
|
|
|
|
'DEC', |
|
58
|
|
|
|
|
|
|
'ENTIER', |
|
59
|
|
|
|
|
|
|
'EXCL', |
|
60
|
|
|
|
|
|
|
'INC', |
|
61
|
|
|
|
|
|
|
'INCL', |
|
62
|
|
|
|
|
|
|
'LEN', |
|
63
|
|
|
|
|
|
|
'LONG', |
|
64
|
|
|
|
|
|
|
'MAX', |
|
65
|
|
|
|
|
|
|
'MIN', |
|
66
|
|
|
|
|
|
|
'ODD', |
|
67
|
|
|
|
|
|
|
'ORD', |
|
68
|
|
|
|
|
|
|
'SHORT', |
|
69
|
|
|
|
|
|
|
'SIZE', |
|
70
|
|
|
|
|
|
|
); |
|
71
|
1
|
|
|
|
|
4
|
$self->listAdd('exits', |
|
72
|
|
|
|
|
|
|
'ASSERT', |
|
73
|
|
|
|
|
|
|
'EXIT', |
|
74
|
|
|
|
|
|
|
'HALT', |
|
75
|
|
|
|
|
|
|
'RETURN', |
|
76
|
|
|
|
|
|
|
); |
|
77
|
1
|
|
|
|
|
5
|
$self->listAdd('keywords', |
|
78
|
|
|
|
|
|
|
'BEGIN', |
|
79
|
|
|
|
|
|
|
'BY', |
|
80
|
|
|
|
|
|
|
'CASE', |
|
81
|
|
|
|
|
|
|
'CLOSE', |
|
82
|
|
|
|
|
|
|
'CONST', |
|
83
|
|
|
|
|
|
|
'DO', |
|
84
|
|
|
|
|
|
|
'ELSE', |
|
85
|
|
|
|
|
|
|
'ELSIF', |
|
86
|
|
|
|
|
|
|
'END', |
|
87
|
|
|
|
|
|
|
'FOR', |
|
88
|
|
|
|
|
|
|
'IF', |
|
89
|
|
|
|
|
|
|
'IMPORT', |
|
90
|
|
|
|
|
|
|
'LOOP', |
|
91
|
|
|
|
|
|
|
'MODULE', |
|
92
|
|
|
|
|
|
|
'NEW', |
|
93
|
|
|
|
|
|
|
'OF', |
|
94
|
|
|
|
|
|
|
'OUT', |
|
95
|
|
|
|
|
|
|
'PROCEDURE', |
|
96
|
|
|
|
|
|
|
'REPEAT', |
|
97
|
|
|
|
|
|
|
'THEN', |
|
98
|
|
|
|
|
|
|
'TO', |
|
99
|
|
|
|
|
|
|
'TYPE', |
|
100
|
|
|
|
|
|
|
'UNTIL', |
|
101
|
|
|
|
|
|
|
'VAR', |
|
102
|
|
|
|
|
|
|
'WHILE', |
|
103
|
|
|
|
|
|
|
'WITH', |
|
104
|
|
|
|
|
|
|
); |
|
105
|
1
|
|
|
|
|
4
|
$self->listAdd('specials', |
|
106
|
|
|
|
|
|
|
'FALSE', |
|
107
|
|
|
|
|
|
|
'INF', |
|
108
|
|
|
|
|
|
|
'NIL', |
|
109
|
|
|
|
|
|
|
'TRUE', |
|
110
|
|
|
|
|
|
|
); |
|
111
|
1
|
|
|
|
|
4
|
$self->listAdd('types', |
|
112
|
|
|
|
|
|
|
'ANYPTR', |
|
113
|
|
|
|
|
|
|
'ANYREC', |
|
114
|
|
|
|
|
|
|
'ARRAY', |
|
115
|
|
|
|
|
|
|
'BOOLEAN', |
|
116
|
|
|
|
|
|
|
'BYTE', |
|
117
|
|
|
|
|
|
|
'CHAR', |
|
118
|
|
|
|
|
|
|
'INTEGER', |
|
119
|
|
|
|
|
|
|
'LONGINT', |
|
120
|
|
|
|
|
|
|
'POINTER', |
|
121
|
|
|
|
|
|
|
'REAL', |
|
122
|
|
|
|
|
|
|
'RECORD', |
|
123
|
|
|
|
|
|
|
'SET', |
|
124
|
|
|
|
|
|
|
'SHORTCHAR', |
|
125
|
|
|
|
|
|
|
'SHORTINT', |
|
126
|
|
|
|
|
|
|
'SHORTREAL', |
|
127
|
|
|
|
|
|
|
); |
|
128
|
1
|
|
|
|
|
22
|
$self->contextdata({ |
|
129
|
|
|
|
|
|
|
'Comment1' => { |
|
130
|
|
|
|
|
|
|
callback => \&parseComment1, |
|
131
|
|
|
|
|
|
|
attribute => 'CommentMaior', |
|
132
|
|
|
|
|
|
|
}, |
|
133
|
|
|
|
|
|
|
'Comment2' => { |
|
134
|
|
|
|
|
|
|
callback => \&parseComment2, |
|
135
|
|
|
|
|
|
|
attribute => 'CommentMinor', |
|
136
|
|
|
|
|
|
|
}, |
|
137
|
|
|
|
|
|
|
'CommentN' => { |
|
138
|
|
|
|
|
|
|
callback => \&parseCommentN, |
|
139
|
|
|
|
|
|
|
attribute => 'CommentMinor', |
|
140
|
|
|
|
|
|
|
}, |
|
141
|
|
|
|
|
|
|
'CommentN2' => { |
|
142
|
|
|
|
|
|
|
callback => \&parseCommentN2, |
|
143
|
|
|
|
|
|
|
attribute => 'CommentMinor', |
|
144
|
|
|
|
|
|
|
}, |
|
145
|
|
|
|
|
|
|
'Normal' => { |
|
146
|
|
|
|
|
|
|
callback => \&parseNormal, |
|
147
|
|
|
|
|
|
|
attribute => 'Normal Text', |
|
148
|
|
|
|
|
|
|
}, |
|
149
|
|
|
|
|
|
|
'String1' => { |
|
150
|
|
|
|
|
|
|
callback => \&parseString1, |
|
151
|
|
|
|
|
|
|
attribute => 'String', |
|
152
|
|
|
|
|
|
|
}, |
|
153
|
|
|
|
|
|
|
'String2' => { |
|
154
|
|
|
|
|
|
|
callback => \&parseString2, |
|
155
|
|
|
|
|
|
|
attribute => 'String', |
|
156
|
|
|
|
|
|
|
}, |
|
157
|
|
|
|
|
|
|
}); |
|
158
|
1
|
|
|
|
|
8
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
|
159
|
1
|
|
|
|
|
3
|
$self->basecontext('Normal'); |
|
160
|
1
|
|
|
|
|
8
|
$self->keywordscase(0); |
|
161
|
1
|
|
|
|
|
2
|
$self->initialize; |
|
162
|
1
|
|
|
|
|
3
|
bless ($self, $class); |
|
163
|
1
|
|
|
|
|
3
|
return $self; |
|
164
|
|
|
|
|
|
|
} |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
sub language { |
|
167
|
0
|
|
|
0
|
0
|
|
return 'Component-Pascal'; |
|
168
|
|
|
|
|
|
|
} |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
sub parseComment1 { |
|
171
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
172
|
|
|
|
|
|
|
# attribute => 'CommentMaior' |
|
173
|
|
|
|
|
|
|
# char => '*' |
|
174
|
|
|
|
|
|
|
# char1 => ')' |
|
175
|
|
|
|
|
|
|
# context => '#pop' |
|
176
|
|
|
|
|
|
|
# endRegion => 'Comment' |
|
177
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
178
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '*', ')', 0, 0, 0, undef, 0, '#pop', 'CommentMaior')) { |
|
179
|
0
|
|
|
|
|
|
return 1 |
|
180
|
|
|
|
|
|
|
} |
|
181
|
|
|
|
|
|
|
# attribute => 'CommentMinor' |
|
182
|
|
|
|
|
|
|
# char => '(' |
|
183
|
|
|
|
|
|
|
# char1 => '*' |
|
184
|
|
|
|
|
|
|
# context => 'CommentN' |
|
185
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
186
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '(', '*', 0, 0, 0, undef, 0, 'CommentN', 'CommentMinor')) { |
|
187
|
0
|
|
|
|
|
|
return 1 |
|
188
|
|
|
|
|
|
|
} |
|
189
|
0
|
|
|
|
|
|
return 0; |
|
190
|
|
|
|
|
|
|
}; |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
sub parseComment2 { |
|
193
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
194
|
|
|
|
|
|
|
# attribute => 'CommentMinor' |
|
195
|
|
|
|
|
|
|
# char => '*' |
|
196
|
|
|
|
|
|
|
# char1 => ')' |
|
197
|
|
|
|
|
|
|
# context => '#pop' |
|
198
|
|
|
|
|
|
|
# endRegion => 'Comment' |
|
199
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
200
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '*', ')', 0, 0, 0, undef, 0, '#pop', 'CommentMinor')) { |
|
201
|
0
|
|
|
|
|
|
return 1 |
|
202
|
|
|
|
|
|
|
} |
|
203
|
|
|
|
|
|
|
# attribute => 'CommentMinor' |
|
204
|
|
|
|
|
|
|
# char => '(' |
|
205
|
|
|
|
|
|
|
# char1 => '*' |
|
206
|
|
|
|
|
|
|
# context => 'CommentN' |
|
207
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
208
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '(', '*', 0, 0, 0, undef, 0, 'CommentN', 'CommentMinor')) { |
|
209
|
0
|
|
|
|
|
|
return 1 |
|
210
|
|
|
|
|
|
|
} |
|
211
|
0
|
|
|
|
|
|
return 0; |
|
212
|
|
|
|
|
|
|
}; |
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
sub parseCommentN { |
|
215
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
216
|
|
|
|
|
|
|
# attribute => 'CommentMinor' |
|
217
|
|
|
|
|
|
|
# char => '*' |
|
218
|
|
|
|
|
|
|
# char1 => ')' |
|
219
|
|
|
|
|
|
|
# context => '#pop' |
|
220
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
221
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '*', ')', 0, 0, 0, undef, 0, '#pop', 'CommentMinor')) { |
|
222
|
0
|
|
|
|
|
|
return 1 |
|
223
|
|
|
|
|
|
|
} |
|
224
|
|
|
|
|
|
|
# attribute => 'CommentMinor' |
|
225
|
|
|
|
|
|
|
# char => '(' |
|
226
|
|
|
|
|
|
|
# char1 => '*' |
|
227
|
|
|
|
|
|
|
# context => 'CommentN2' |
|
228
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
229
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '(', '*', 0, 0, 0, undef, 0, 'CommentN2', 'CommentMinor')) { |
|
230
|
0
|
|
|
|
|
|
return 1 |
|
231
|
|
|
|
|
|
|
} |
|
232
|
0
|
|
|
|
|
|
return 0; |
|
233
|
|
|
|
|
|
|
}; |
|
234
|
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
sub parseCommentN2 { |
|
236
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
237
|
|
|
|
|
|
|
# attribute => 'CommentMinor' |
|
238
|
|
|
|
|
|
|
# char => '*' |
|
239
|
|
|
|
|
|
|
# char1 => ')' |
|
240
|
|
|
|
|
|
|
# context => '#pop' |
|
241
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
242
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '*', ')', 0, 0, 0, undef, 0, '#pop', 'CommentMinor')) { |
|
243
|
0
|
|
|
|
|
|
return 1 |
|
244
|
|
|
|
|
|
|
} |
|
245
|
0
|
|
|
|
|
|
return 0; |
|
246
|
|
|
|
|
|
|
}; |
|
247
|
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
sub parseNormal { |
|
249
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
250
|
|
|
|
|
|
|
# String => '(**' |
|
251
|
|
|
|
|
|
|
# attribute => 'CommentMaior' |
|
252
|
|
|
|
|
|
|
# beginRegion => 'Comment' |
|
253
|
|
|
|
|
|
|
# context => 'Comment1' |
|
254
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
255
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, '(**', 0, 0, 0, undef, 0, 'Comment1', 'CommentMaior')) { |
|
256
|
0
|
|
|
|
|
|
return 1 |
|
257
|
|
|
|
|
|
|
} |
|
258
|
|
|
|
|
|
|
# attribute => 'CommentMinor' |
|
259
|
|
|
|
|
|
|
# beginRegion => 'Comment' |
|
260
|
|
|
|
|
|
|
# char => '(' |
|
261
|
|
|
|
|
|
|
# char1 => '*' |
|
262
|
|
|
|
|
|
|
# context => 'Comment2' |
|
263
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
|
264
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '(', '*', 0, 0, 0, undef, 0, 'Comment2', 'CommentMinor')) { |
|
265
|
0
|
|
|
|
|
|
return 1 |
|
266
|
|
|
|
|
|
|
} |
|
267
|
|
|
|
|
|
|
# attribute => 'String' |
|
268
|
|
|
|
|
|
|
# char => '"' |
|
269
|
|
|
|
|
|
|
# context => 'String1' |
|
270
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
271
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String1', 'String')) { |
|
272
|
0
|
|
|
|
|
|
return 1 |
|
273
|
|
|
|
|
|
|
} |
|
274
|
|
|
|
|
|
|
# attribute => 'String' |
|
275
|
|
|
|
|
|
|
# char => ''' |
|
276
|
|
|
|
|
|
|
# context => 'String2' |
|
277
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
278
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String2', 'String')) { |
|
279
|
0
|
|
|
|
|
|
return 1 |
|
280
|
|
|
|
|
|
|
} |
|
281
|
|
|
|
|
|
|
# String => 'PROCEDURE\s' |
|
282
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
283
|
|
|
|
|
|
|
# beginRegion => 'Proc' |
|
284
|
|
|
|
|
|
|
# context => '#stay' |
|
285
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
286
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'PROCEDURE\\s', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
287
|
0
|
|
|
|
|
|
return 1 |
|
288
|
|
|
|
|
|
|
} |
|
289
|
|
|
|
|
|
|
# String => 'ABSTRACT;|EMPTY;|END\s*[A-Za-z][A-Za-z0-9_]*\;' |
|
290
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
|
291
|
|
|
|
|
|
|
# context => '#stay' |
|
292
|
|
|
|
|
|
|
# endRegion => 'Proc' |
|
293
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
294
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'ABSTRACT;|EMPTY;|END\\s*[A-Za-z][A-Za-z0-9_]*\\;', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { |
|
295
|
0
|
|
|
|
|
|
return 1 |
|
296
|
|
|
|
|
|
|
} |
|
297
|
|
|
|
|
|
|
# String => 'RECORD' |
|
298
|
|
|
|
|
|
|
# attribute => 'Type' |
|
299
|
|
|
|
|
|
|
# beginRegion => 'Rec' |
|
300
|
|
|
|
|
|
|
# context => '#stay' |
|
301
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
302
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'RECORD', 0, 0, 0, undef, 0, '#stay', 'Type')) { |
|
303
|
0
|
|
|
|
|
|
return 1 |
|
304
|
|
|
|
|
|
|
} |
|
305
|
|
|
|
|
|
|
# String => 'END' |
|
306
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
307
|
|
|
|
|
|
|
# context => '#stay' |
|
308
|
|
|
|
|
|
|
# endRegion => 'Rec' |
|
309
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
310
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'END', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { |
|
311
|
0
|
|
|
|
|
|
return 1 |
|
312
|
|
|
|
|
|
|
} |
|
313
|
|
|
|
|
|
|
# String => 'NEW' |
|
314
|
|
|
|
|
|
|
# attribute => 'MemAlloc' |
|
315
|
|
|
|
|
|
|
# context => '#stay' |
|
316
|
|
|
|
|
|
|
# type => 'StringDetect' |
|
317
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, 'NEW', 0, 0, 0, undef, 0, '#stay', 'MemAlloc')) { |
|
318
|
0
|
|
|
|
|
|
return 1 |
|
319
|
|
|
|
|
|
|
} |
|
320
|
|
|
|
|
|
|
# String => 'keywords' |
|
321
|
|
|
|
|
|
|
# attribute => 'Keyword' |
|
322
|
|
|
|
|
|
|
# context => '#stay' |
|
323
|
|
|
|
|
|
|
# type => 'keyword' |
|
324
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { |
|
325
|
0
|
|
|
|
|
|
return 1 |
|
326
|
|
|
|
|
|
|
} |
|
327
|
|
|
|
|
|
|
# String => 'exits' |
|
328
|
|
|
|
|
|
|
# attribute => 'Exit' |
|
329
|
|
|
|
|
|
|
# context => '#stay' |
|
330
|
|
|
|
|
|
|
# type => 'keyword' |
|
331
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'exits', 0, undef, 0, '#stay', 'Exit')) { |
|
332
|
0
|
|
|
|
|
|
return 1 |
|
333
|
|
|
|
|
|
|
} |
|
334
|
|
|
|
|
|
|
# String => 'types' |
|
335
|
|
|
|
|
|
|
# attribute => 'Type' |
|
336
|
|
|
|
|
|
|
# context => '#stay' |
|
337
|
|
|
|
|
|
|
# type => 'keyword' |
|
338
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Type')) { |
|
339
|
0
|
|
|
|
|
|
return 1 |
|
340
|
|
|
|
|
|
|
} |
|
341
|
|
|
|
|
|
|
# String => 'attributes' |
|
342
|
|
|
|
|
|
|
# attribute => 'Attribute' |
|
343
|
|
|
|
|
|
|
# context => '#stay' |
|
344
|
|
|
|
|
|
|
# type => 'keyword' |
|
345
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'attributes', 0, undef, 0, '#stay', 'Attribute')) { |
|
346
|
0
|
|
|
|
|
|
return 1 |
|
347
|
|
|
|
|
|
|
} |
|
348
|
|
|
|
|
|
|
# String => 'builtins' |
|
349
|
|
|
|
|
|
|
# attribute => 'Builtin' |
|
350
|
|
|
|
|
|
|
# context => '#stay' |
|
351
|
|
|
|
|
|
|
# type => 'keyword' |
|
352
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'builtins', 0, undef, 0, '#stay', 'Builtin')) { |
|
353
|
0
|
|
|
|
|
|
return 1 |
|
354
|
|
|
|
|
|
|
} |
|
355
|
|
|
|
|
|
|
# String => 'specials' |
|
356
|
|
|
|
|
|
|
# attribute => 'SpecialValues' |
|
357
|
|
|
|
|
|
|
# context => '#stay' |
|
358
|
|
|
|
|
|
|
# type => 'keyword' |
|
359
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'specials', 0, undef, 0, '#stay', 'SpecialValues')) { |
|
360
|
0
|
|
|
|
|
|
return 1 |
|
361
|
|
|
|
|
|
|
} |
|
362
|
|
|
|
|
|
|
# String => '\s[\+|\-]{0,1}[0-9]([0-9]*|[0-9A-F]*(H|L))' |
|
363
|
|
|
|
|
|
|
# attribute => 'Integer' |
|
364
|
|
|
|
|
|
|
# context => '#stay' |
|
365
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
366
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\s[\\+|\\-]{0,1}[0-9]([0-9]*|[0-9A-F]*(H|L))', 0, 0, 0, undef, 0, '#stay', 'Integer')) { |
|
367
|
0
|
|
|
|
|
|
return 1 |
|
368
|
|
|
|
|
|
|
} |
|
369
|
|
|
|
|
|
|
# attribute => 'Float' |
|
370
|
|
|
|
|
|
|
# context => '#stay' |
|
371
|
|
|
|
|
|
|
# type => 'Float' |
|
372
|
0
|
0
|
|
|
|
|
if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { |
|
373
|
0
|
|
|
|
|
|
return 1 |
|
374
|
|
|
|
|
|
|
} |
|
375
|
|
|
|
|
|
|
# String => '\s[0-9][0-9A-F]*X' |
|
376
|
|
|
|
|
|
|
# attribute => 'Char' |
|
377
|
|
|
|
|
|
|
# context => '#stay' |
|
378
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
379
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\s[0-9][0-9A-F]*X', 0, 0, 0, undef, 0, '#stay', 'Char')) { |
|
380
|
0
|
|
|
|
|
|
return 1 |
|
381
|
|
|
|
|
|
|
} |
|
382
|
|
|
|
|
|
|
# String => '[A-Za-z][A-Za-z0-9_]*\*' |
|
383
|
|
|
|
|
|
|
# attribute => 'ExportFull' |
|
384
|
|
|
|
|
|
|
# context => '#stay' |
|
385
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
386
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[A-Za-z][A-Za-z0-9_]*\\*', 0, 0, 0, undef, 0, '#stay', 'ExportFull')) { |
|
387
|
0
|
|
|
|
|
|
return 1 |
|
388
|
|
|
|
|
|
|
} |
|
389
|
|
|
|
|
|
|
# String => '[A-Za-z][A-Za-z0-9_]*\-' |
|
390
|
|
|
|
|
|
|
# attribute => 'ExportReadOnly' |
|
391
|
|
|
|
|
|
|
# context => '#stay' |
|
392
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
393
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '[A-Za-z][A-Za-z0-9_]*\\-', 0, 0, 0, undef, 0, '#stay', 'ExportReadOnly')) { |
|
394
|
0
|
|
|
|
|
|
return 1 |
|
395
|
|
|
|
|
|
|
} |
|
396
|
|
|
|
|
|
|
# String => '\s(=|#|<|<=|>|>=|IN\s|IS)' |
|
397
|
|
|
|
|
|
|
# attribute => 'Relation' |
|
398
|
|
|
|
|
|
|
# context => '#stay' |
|
399
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
400
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\s(=|#|<|<=|>|>=|IN\\s|IS)', 0, 0, 0, undef, 0, '#stay', 'Relation')) { |
|
401
|
0
|
|
|
|
|
|
return 1 |
|
402
|
|
|
|
|
|
|
} |
|
403
|
|
|
|
|
|
|
# String => '\s(\+|\-|OR|\*|/|DIV|MOD|\&)' |
|
404
|
|
|
|
|
|
|
# attribute => 'Operator' |
|
405
|
|
|
|
|
|
|
# context => '#stay' |
|
406
|
|
|
|
|
|
|
# type => 'RegExpr' |
|
407
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\s(\\+|\\-|OR|\\*|/|DIV|MOD|\\&)', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
|
408
|
0
|
|
|
|
|
|
return 1 |
|
409
|
|
|
|
|
|
|
} |
|
410
|
0
|
|
|
|
|
|
return 0; |
|
411
|
|
|
|
|
|
|
}; |
|
412
|
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
sub parseString1 { |
|
414
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
415
|
|
|
|
|
|
|
# attribute => 'String' |
|
416
|
|
|
|
|
|
|
# char => '"' |
|
417
|
|
|
|
|
|
|
# context => '#pop' |
|
418
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
419
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
|
420
|
0
|
|
|
|
|
|
return 1 |
|
421
|
|
|
|
|
|
|
} |
|
422
|
0
|
|
|
|
|
|
return 0; |
|
423
|
|
|
|
|
|
|
}; |
|
424
|
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
sub parseString2 { |
|
426
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
|
427
|
|
|
|
|
|
|
# attribute => 'String' |
|
428
|
|
|
|
|
|
|
# char => ''' |
|
429
|
|
|
|
|
|
|
# context => '#pop' |
|
430
|
|
|
|
|
|
|
# type => 'DetectChar' |
|
431
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { |
|
432
|
0
|
|
|
|
|
|
return 1 |
|
433
|
|
|
|
|
|
|
} |
|
434
|
0
|
|
|
|
|
|
return 0; |
|
435
|
|
|
|
|
|
|
}; |
|
436
|
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
1; |
|
439
|
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
__END__ |