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 'logtalk.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 1.40 |
9
|
|
|
|
|
|
|
#kate version 2.4 |
10
|
|
|
|
|
|
|
#kate author Paulo Moura (pmoura@logtalk.org) |
11
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:05 2008, localtime |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::Logtalk; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
612
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
18
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
19
|
1
|
|
|
1
|
|
16
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1744
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
22
|
1
|
|
|
1
|
0
|
603
|
my $proto = shift; |
23
|
1
|
|
33
|
|
|
7
|
my $class = ref($proto) || $proto; |
24
|
1
|
|
|
|
|
10
|
my $self = $class->SUPER::new(@_); |
25
|
1
|
|
|
|
|
11
|
$self->attributes({ |
26
|
|
|
|
|
|
|
'Built-in' => 'Keyword', |
27
|
|
|
|
|
|
|
'Comment' => 'Comment', |
28
|
|
|
|
|
|
|
'Directive' => 'Keyword', |
29
|
|
|
|
|
|
|
'Normal' => 'Normal', |
30
|
|
|
|
|
|
|
'Number' => 'DecVal', |
31
|
|
|
|
|
|
|
'Operator' => 'DataType', |
32
|
|
|
|
|
|
|
'String' => 'String', |
33
|
|
|
|
|
|
|
'Variable' => 'Others', |
34
|
|
|
|
|
|
|
}); |
35
|
1
|
|
|
|
|
18
|
$self->contextdata({ |
36
|
|
|
|
|
|
|
'atom' => { |
37
|
|
|
|
|
|
|
callback => \&parseatom, |
38
|
|
|
|
|
|
|
attribute => 'String', |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
'directive' => { |
41
|
|
|
|
|
|
|
callback => \&parsedirective, |
42
|
|
|
|
|
|
|
attribute => 'Directive', |
43
|
|
|
|
|
|
|
}, |
44
|
|
|
|
|
|
|
'entityrelations' => { |
45
|
|
|
|
|
|
|
callback => \&parseentityrelations, |
46
|
|
|
|
|
|
|
attribute => 'Normal', |
47
|
|
|
|
|
|
|
}, |
48
|
|
|
|
|
|
|
'multiline comment' => { |
49
|
|
|
|
|
|
|
callback => \&parsemultilinecomment, |
50
|
|
|
|
|
|
|
attribute => 'Comment', |
51
|
|
|
|
|
|
|
}, |
52
|
|
|
|
|
|
|
'normal' => { |
53
|
|
|
|
|
|
|
callback => \&parsenormal, |
54
|
|
|
|
|
|
|
attribute => 'Normal', |
55
|
|
|
|
|
|
|
}, |
56
|
|
|
|
|
|
|
'single line comment' => { |
57
|
|
|
|
|
|
|
callback => \&parsesinglelinecomment, |
58
|
|
|
|
|
|
|
attribute => 'Comment', |
59
|
|
|
|
|
|
|
lineending => '#pop', |
60
|
|
|
|
|
|
|
}, |
61
|
|
|
|
|
|
|
'string' => { |
62
|
|
|
|
|
|
|
callback => \&parsestring, |
63
|
|
|
|
|
|
|
attribute => 'String', |
64
|
|
|
|
|
|
|
}, |
65
|
|
|
|
|
|
|
}); |
66
|
1
|
|
|
|
|
6
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
67
|
1
|
|
|
|
|
3
|
$self->basecontext('normal'); |
68
|
1
|
|
|
|
|
4
|
$self->keywordscase(1); |
69
|
1
|
|
|
|
|
4
|
$self->initialize; |
70
|
1
|
|
|
|
|
3
|
bless ($self, $class); |
71
|
1
|
|
|
|
|
3
|
return $self; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub language { |
75
|
0
|
|
|
0
|
0
|
|
return 'Logtalk'; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub parseatom { |
79
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
80
|
|
|
|
|
|
|
# attribute => 'String' |
81
|
|
|
|
|
|
|
# char => ''' |
82
|
|
|
|
|
|
|
# context => '#pop' |
83
|
|
|
|
|
|
|
# type => 'DetectChar' |
84
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { |
85
|
0
|
|
|
|
|
|
return 1 |
86
|
|
|
|
|
|
|
} |
87
|
0
|
|
|
|
|
|
return 0; |
88
|
|
|
|
|
|
|
}; |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
sub parsedirective { |
91
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
92
|
|
|
|
|
|
|
# String => '\b(category|object|protocol)(?=[(])' |
93
|
|
|
|
|
|
|
# attribute => 'Directive' |
94
|
|
|
|
|
|
|
# beginRegion => 'Entity' |
95
|
|
|
|
|
|
|
# context => 'entityrelations' |
96
|
|
|
|
|
|
|
# type => 'RegExpr' |
97
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(category|object|protocol)(?=[(])', 0, 0, 0, undef, 0, 'entityrelations', 'Directive')) { |
98
|
0
|
|
|
|
|
|
return 1 |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
# String => '\bend_(category|object|protocol)[.]' |
101
|
|
|
|
|
|
|
# attribute => 'Directive' |
102
|
|
|
|
|
|
|
# context => '#pop' |
103
|
|
|
|
|
|
|
# endRegion => 'Entity' |
104
|
|
|
|
|
|
|
# type => 'RegExpr' |
105
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bend_(category|object|protocol)[.]', 0, 0, 0, undef, 0, '#pop', 'Directive')) { |
106
|
0
|
|
|
|
|
|
return 1 |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
# String => '\bp(ublic|r(otected|ivate))(?=[(])' |
109
|
|
|
|
|
|
|
# attribute => 'Directive' |
110
|
|
|
|
|
|
|
# context => '#pop' |
111
|
|
|
|
|
|
|
# type => 'RegExpr' |
112
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bp(ublic|r(otected|ivate))(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { |
113
|
0
|
|
|
|
|
|
return 1 |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
# String => '\bencoding(?=[(])' |
116
|
|
|
|
|
|
|
# attribute => 'Directive' |
117
|
|
|
|
|
|
|
# context => '#pop' |
118
|
|
|
|
|
|
|
# type => 'RegExpr' |
119
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bencoding(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { |
120
|
0
|
|
|
|
|
|
return 1 |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
# String => '\bin(fo|itialization)(?=[(])' |
123
|
|
|
|
|
|
|
# attribute => 'Directive' |
124
|
|
|
|
|
|
|
# context => '#pop' |
125
|
|
|
|
|
|
|
# type => 'RegExpr' |
126
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bin(fo|itialization)(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { |
127
|
0
|
|
|
|
|
|
return 1 |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
# String => '\bdynamic[.]' |
130
|
|
|
|
|
|
|
# attribute => 'Directive' |
131
|
|
|
|
|
|
|
# context => '#pop' |
132
|
|
|
|
|
|
|
# type => 'RegExpr' |
133
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bdynamic[.]', 0, 0, 0, undef, 0, '#pop', 'Directive')) { |
134
|
0
|
|
|
|
|
|
return 1 |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
# String => '\b(alias|d(ynamic|iscontiguous)|m(etapredicate|ode|ultifile))(?=[(])' |
137
|
|
|
|
|
|
|
# attribute => 'Directive' |
138
|
|
|
|
|
|
|
# context => '#pop' |
139
|
|
|
|
|
|
|
# type => 'RegExpr' |
140
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(alias|d(ynamic|iscontiguous)|m(etapredicate|ode|ultifile))(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { |
141
|
0
|
|
|
|
|
|
return 1 |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
# String => '\bop(?=[(])' |
144
|
|
|
|
|
|
|
# attribute => 'Directive' |
145
|
|
|
|
|
|
|
# context => '#pop' |
146
|
|
|
|
|
|
|
# type => 'RegExpr' |
147
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bop(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { |
148
|
0
|
|
|
|
|
|
return 1 |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
# String => '\b(calls|uses)(?=[(])' |
151
|
|
|
|
|
|
|
# attribute => 'Directive' |
152
|
|
|
|
|
|
|
# context => '#pop' |
153
|
|
|
|
|
|
|
# type => 'RegExpr' |
154
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(calls|uses)(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { |
155
|
0
|
|
|
|
|
|
return 1 |
156
|
|
|
|
|
|
|
} |
157
|
0
|
|
|
|
|
|
return 0; |
158
|
|
|
|
|
|
|
}; |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
sub parseentityrelations { |
161
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
162
|
|
|
|
|
|
|
# String => '\b(extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])' |
163
|
|
|
|
|
|
|
# attribute => 'Directive' |
164
|
|
|
|
|
|
|
# context => '#stay' |
165
|
|
|
|
|
|
|
# type => 'RegExpr' |
166
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Directive')) { |
167
|
0
|
|
|
|
|
|
return 1 |
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
# attribute => 'Normal' |
170
|
|
|
|
|
|
|
# char => ')' |
171
|
|
|
|
|
|
|
# char1 => '.' |
172
|
|
|
|
|
|
|
# context => 'normal' |
173
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
174
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, ')', '.', 0, 0, 0, undef, 0, 'normal', 'Normal')) { |
175
|
0
|
|
|
|
|
|
return 1 |
176
|
|
|
|
|
|
|
} |
177
|
0
|
|
|
|
|
|
return 0; |
178
|
|
|
|
|
|
|
}; |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
sub parsemultilinecomment { |
181
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
182
|
|
|
|
|
|
|
# attribute => 'Comment' |
183
|
|
|
|
|
|
|
# char => '*' |
184
|
|
|
|
|
|
|
# char1 => '/' |
185
|
|
|
|
|
|
|
# context => '#pop' |
186
|
|
|
|
|
|
|
# endRegion => 'Comment' |
187
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
188
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { |
189
|
0
|
|
|
|
|
|
return 1 |
190
|
|
|
|
|
|
|
} |
191
|
0
|
|
|
|
|
|
return 0; |
192
|
|
|
|
|
|
|
}; |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
sub parsenormal { |
195
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
196
|
|
|
|
|
|
|
# String => '^\s*:-' |
197
|
|
|
|
|
|
|
# attribute => 'Normal' |
198
|
|
|
|
|
|
|
# context => 'directive' |
199
|
|
|
|
|
|
|
# type => 'RegExpr' |
200
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '^\\s*:-', 0, 0, 0, undef, 0, 'directive', 'Normal')) { |
201
|
0
|
|
|
|
|
|
return 1 |
202
|
|
|
|
|
|
|
} |
203
|
|
|
|
|
|
|
# String => '\b(after|before)(?=[(])' |
204
|
|
|
|
|
|
|
# attribute => 'Built-in' |
205
|
|
|
|
|
|
|
# context => '#stay' |
206
|
|
|
|
|
|
|
# type => 'RegExpr' |
207
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(after|before)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
208
|
0
|
|
|
|
|
|
return 1 |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
# String => '\b(parameter|this|se(lf|nder))(?=[(])' |
211
|
|
|
|
|
|
|
# attribute => 'Built-in' |
212
|
|
|
|
|
|
|
# context => '#stay' |
213
|
|
|
|
|
|
|
# type => 'RegExpr' |
214
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(parameter|this|se(lf|nder))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
215
|
0
|
|
|
|
|
|
return 1 |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
# String => '\b(current_predicate|predicate_property)(?=[(])' |
218
|
|
|
|
|
|
|
# attribute => 'Built-in' |
219
|
|
|
|
|
|
|
# context => '#stay' |
220
|
|
|
|
|
|
|
# type => 'RegExpr' |
221
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(current_predicate|predicate_property)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
222
|
0
|
|
|
|
|
|
return 1 |
223
|
|
|
|
|
|
|
} |
224
|
|
|
|
|
|
|
# String => '\b(expand_term|phrase)(?=[(])' |
225
|
|
|
|
|
|
|
# attribute => 'Built-in' |
226
|
|
|
|
|
|
|
# context => '#stay' |
227
|
|
|
|
|
|
|
# type => 'RegExpr' |
228
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(expand_term|phrase)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
229
|
0
|
|
|
|
|
|
return 1 |
230
|
|
|
|
|
|
|
} |
231
|
|
|
|
|
|
|
# String => '\b(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])' |
232
|
|
|
|
|
|
|
# attribute => 'Built-in' |
233
|
|
|
|
|
|
|
# context => '#stay' |
234
|
|
|
|
|
|
|
# type => 'RegExpr' |
235
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
236
|
0
|
|
|
|
|
|
return 1 |
237
|
|
|
|
|
|
|
} |
238
|
|
|
|
|
|
|
# String => '\b(object|protocol|category)_property(?=[(])' |
239
|
|
|
|
|
|
|
# attribute => 'Built-in' |
240
|
|
|
|
|
|
|
# context => '#stay' |
241
|
|
|
|
|
|
|
# type => 'RegExpr' |
242
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(object|protocol|category)_property(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
243
|
0
|
|
|
|
|
|
return 1 |
244
|
|
|
|
|
|
|
} |
245
|
|
|
|
|
|
|
# String => '\bextends_(object|protocol)(?=[(])' |
246
|
|
|
|
|
|
|
# attribute => 'Built-in' |
247
|
|
|
|
|
|
|
# context => '#stay' |
248
|
|
|
|
|
|
|
# type => 'RegExpr' |
249
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bextends_(object|protocol)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
250
|
0
|
|
|
|
|
|
return 1 |
251
|
|
|
|
|
|
|
} |
252
|
|
|
|
|
|
|
# String => '\bimplements_protocol(?=[(])' |
253
|
|
|
|
|
|
|
# attribute => 'Built-in' |
254
|
|
|
|
|
|
|
# context => '#stay' |
255
|
|
|
|
|
|
|
# type => 'RegExpr' |
256
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bimplements_protocol(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
257
|
0
|
|
|
|
|
|
return 1 |
258
|
|
|
|
|
|
|
} |
259
|
|
|
|
|
|
|
# String => '\b(instantiates|specializes)_class(?=[(])' |
260
|
|
|
|
|
|
|
# attribute => 'Built-in' |
261
|
|
|
|
|
|
|
# context => '#stay' |
262
|
|
|
|
|
|
|
# type => 'RegExpr' |
263
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(instantiates|specializes)_class(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
264
|
0
|
|
|
|
|
|
return 1 |
265
|
|
|
|
|
|
|
} |
266
|
|
|
|
|
|
|
# String => '\bimports_category(?=[(])' |
267
|
|
|
|
|
|
|
# attribute => 'Built-in' |
268
|
|
|
|
|
|
|
# context => '#stay' |
269
|
|
|
|
|
|
|
# type => 'RegExpr' |
270
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bimports_category(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
271
|
0
|
|
|
|
|
|
return 1 |
272
|
|
|
|
|
|
|
} |
273
|
|
|
|
|
|
|
# String => '\b(current_event|(abolish|define)_events)(?=[(])' |
274
|
|
|
|
|
|
|
# attribute => 'Built-in' |
275
|
|
|
|
|
|
|
# context => '#stay' |
276
|
|
|
|
|
|
|
# type => 'RegExpr' |
277
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(current_event|(abolish|define)_events)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
278
|
0
|
|
|
|
|
|
return 1 |
279
|
|
|
|
|
|
|
} |
280
|
|
|
|
|
|
|
# String => '\b(current|set)_logtalk_flag(?=[(])' |
281
|
|
|
|
|
|
|
# attribute => 'Built-in' |
282
|
|
|
|
|
|
|
# context => '#stay' |
283
|
|
|
|
|
|
|
# type => 'RegExpr' |
284
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(current|set)_logtalk_flag(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
285
|
0
|
|
|
|
|
|
return 1 |
286
|
|
|
|
|
|
|
} |
287
|
|
|
|
|
|
|
# String => '\blogtalk_(compile|l(ibrary_path|oad))(?=[(])' |
288
|
|
|
|
|
|
|
# attribute => 'Built-in' |
289
|
|
|
|
|
|
|
# context => '#stay' |
290
|
|
|
|
|
|
|
# type => 'RegExpr' |
291
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\blogtalk_(compile|l(ibrary_path|oad))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
292
|
0
|
|
|
|
|
|
return 1 |
293
|
|
|
|
|
|
|
} |
294
|
|
|
|
|
|
|
# String => '\b(clause|retract(all)?)(?=[(])' |
295
|
|
|
|
|
|
|
# attribute => 'Built-in' |
296
|
|
|
|
|
|
|
# context => '#stay' |
297
|
|
|
|
|
|
|
# type => 'RegExpr' |
298
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(clause|retract(all)?)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
299
|
0
|
|
|
|
|
|
return 1 |
300
|
|
|
|
|
|
|
} |
301
|
|
|
|
|
|
|
# String => '\ba(bolish|ssert(a|z))(?=[(])' |
302
|
|
|
|
|
|
|
# attribute => 'Built-in' |
303
|
|
|
|
|
|
|
# context => '#stay' |
304
|
|
|
|
|
|
|
# type => 'RegExpr' |
305
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\ba(bolish|ssert(a|z))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
306
|
0
|
|
|
|
|
|
return 1 |
307
|
|
|
|
|
|
|
} |
308
|
|
|
|
|
|
|
# String => '\b(ca(ll|tch)|throw)(?=[(])' |
309
|
|
|
|
|
|
|
# attribute => 'Built-in' |
310
|
|
|
|
|
|
|
# context => '#stay' |
311
|
|
|
|
|
|
|
# type => 'RegExpr' |
312
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(ca(ll|tch)|throw)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
313
|
0
|
|
|
|
|
|
return 1 |
314
|
|
|
|
|
|
|
} |
315
|
|
|
|
|
|
|
# String => '\b(fail|true)\b' |
316
|
|
|
|
|
|
|
# attribute => 'Built-in' |
317
|
|
|
|
|
|
|
# context => '#stay' |
318
|
|
|
|
|
|
|
# type => 'RegExpr' |
319
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(fail|true)\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
320
|
0
|
|
|
|
|
|
return 1 |
321
|
|
|
|
|
|
|
} |
322
|
|
|
|
|
|
|
# String => '\b((bag|set)of|f(ind|or)all)(?=[(])' |
323
|
|
|
|
|
|
|
# attribute => 'Built-in' |
324
|
|
|
|
|
|
|
# context => '#stay' |
325
|
|
|
|
|
|
|
# type => 'RegExpr' |
326
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b((bag|set)of|f(ind|or)all)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
327
|
0
|
|
|
|
|
|
return 1 |
328
|
|
|
|
|
|
|
} |
329
|
|
|
|
|
|
|
# String => '\bunify_with_occurs_check(?=[(])' |
330
|
|
|
|
|
|
|
# attribute => 'Built-in' |
331
|
|
|
|
|
|
|
# context => '#stay' |
332
|
|
|
|
|
|
|
# type => 'RegExpr' |
333
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bunify_with_occurs_check(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
334
|
0
|
|
|
|
|
|
return 1 |
335
|
|
|
|
|
|
|
} |
336
|
|
|
|
|
|
|
# String => '\b(functor|arg|copy_term)(?=[(])' |
337
|
|
|
|
|
|
|
# attribute => 'Built-in' |
338
|
|
|
|
|
|
|
# context => '#stay' |
339
|
|
|
|
|
|
|
# type => 'RegExpr' |
340
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(functor|arg|copy_term)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
341
|
0
|
|
|
|
|
|
return 1 |
342
|
|
|
|
|
|
|
} |
343
|
|
|
|
|
|
|
# String => '\b(rem|mod|abs|sign)(?=[(])' |
344
|
|
|
|
|
|
|
# attribute => 'Built-in' |
345
|
|
|
|
|
|
|
# context => '#stay' |
346
|
|
|
|
|
|
|
# type => 'RegExpr' |
347
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(rem|mod|abs|sign)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
348
|
0
|
|
|
|
|
|
return 1 |
349
|
|
|
|
|
|
|
} |
350
|
|
|
|
|
|
|
# String => '\bfloat(_(integer|fractional)_part)?(?=[(])' |
351
|
|
|
|
|
|
|
# attribute => 'Built-in' |
352
|
|
|
|
|
|
|
# context => '#stay' |
353
|
|
|
|
|
|
|
# type => 'RegExpr' |
354
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bfloat(_(integer|fractional)_part)?(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
355
|
0
|
|
|
|
|
|
return 1 |
356
|
|
|
|
|
|
|
} |
357
|
|
|
|
|
|
|
# String => '\b(floor|truncate|round|ceiling)(?=[(])' |
358
|
|
|
|
|
|
|
# attribute => 'Built-in' |
359
|
|
|
|
|
|
|
# context => '#stay' |
360
|
|
|
|
|
|
|
# type => 'RegExpr' |
361
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(floor|truncate|round|ceiling)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
362
|
0
|
|
|
|
|
|
return 1 |
363
|
|
|
|
|
|
|
} |
364
|
|
|
|
|
|
|
# String => '\b(cos|atan|exp|log|s(in|qrt))(?=[(])' |
365
|
|
|
|
|
|
|
# attribute => 'Built-in' |
366
|
|
|
|
|
|
|
# context => '#stay' |
367
|
|
|
|
|
|
|
# type => 'RegExpr' |
368
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(cos|atan|exp|log|s(in|qrt))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
369
|
0
|
|
|
|
|
|
return 1 |
370
|
|
|
|
|
|
|
} |
371
|
|
|
|
|
|
|
# String => '\b(var|atom(ic)?|integer|float|compound|n(onvar|umber))(?=[(])' |
372
|
|
|
|
|
|
|
# attribute => 'Built-in' |
373
|
|
|
|
|
|
|
# context => '#stay' |
374
|
|
|
|
|
|
|
# type => 'RegExpr' |
375
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(var|atom(ic)?|integer|float|compound|n(onvar|umber))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
376
|
0
|
|
|
|
|
|
return 1 |
377
|
|
|
|
|
|
|
} |
378
|
|
|
|
|
|
|
# String => '\b(current|set)_(in|out)put(?=[(])' |
379
|
|
|
|
|
|
|
# attribute => 'Built-in' |
380
|
|
|
|
|
|
|
# context => '#stay' |
381
|
|
|
|
|
|
|
# type => 'RegExpr' |
382
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(current|set)_(in|out)put(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
383
|
0
|
|
|
|
|
|
return 1 |
384
|
|
|
|
|
|
|
} |
385
|
|
|
|
|
|
|
# String => '\b(open|close)(?=[(])' |
386
|
|
|
|
|
|
|
# attribute => 'Built-in' |
387
|
|
|
|
|
|
|
# context => '#stay' |
388
|
|
|
|
|
|
|
# type => 'RegExpr' |
389
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(open|close)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
390
|
0
|
|
|
|
|
|
return 1 |
391
|
|
|
|
|
|
|
} |
392
|
|
|
|
|
|
|
# String => '\bflush_output(?=[(])' |
393
|
|
|
|
|
|
|
# attribute => 'Built-in' |
394
|
|
|
|
|
|
|
# context => '#stay' |
395
|
|
|
|
|
|
|
# type => 'RegExpr' |
396
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bflush_output(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
397
|
0
|
|
|
|
|
|
return 1 |
398
|
|
|
|
|
|
|
} |
399
|
|
|
|
|
|
|
# String => '\bflush_output\b' |
400
|
|
|
|
|
|
|
# attribute => 'Built-in' |
401
|
|
|
|
|
|
|
# context => '#stay' |
402
|
|
|
|
|
|
|
# type => 'RegExpr' |
403
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bflush_output\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
404
|
0
|
|
|
|
|
|
return 1 |
405
|
|
|
|
|
|
|
} |
406
|
|
|
|
|
|
|
# String => '\b(stream_property|at_end_of_stream|set_stream_position)(?=[(])' |
407
|
|
|
|
|
|
|
# attribute => 'Built-in' |
408
|
|
|
|
|
|
|
# context => '#stay' |
409
|
|
|
|
|
|
|
# type => 'RegExpr' |
410
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(stream_property|at_end_of_stream|set_stream_position)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
411
|
0
|
|
|
|
|
|
return 1 |
412
|
|
|
|
|
|
|
} |
413
|
|
|
|
|
|
|
# String => '\b(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])' |
414
|
|
|
|
|
|
|
# attribute => 'Built-in' |
415
|
|
|
|
|
|
|
# context => '#stay' |
416
|
|
|
|
|
|
|
# type => 'RegExpr' |
417
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
418
|
0
|
|
|
|
|
|
return 1 |
419
|
|
|
|
|
|
|
} |
420
|
|
|
|
|
|
|
# String => '\bnl\b' |
421
|
|
|
|
|
|
|
# attribute => 'Built-in' |
422
|
|
|
|
|
|
|
# context => '#stay' |
423
|
|
|
|
|
|
|
# type => 'RegExpr' |
424
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bnl\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
425
|
0
|
|
|
|
|
|
return 1 |
426
|
|
|
|
|
|
|
} |
427
|
|
|
|
|
|
|
# String => '\bread(_term)?(?=[(])' |
428
|
|
|
|
|
|
|
# attribute => 'Built-in' |
429
|
|
|
|
|
|
|
# context => '#stay' |
430
|
|
|
|
|
|
|
# type => 'RegExpr' |
431
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bread(_term)?(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
432
|
0
|
|
|
|
|
|
return 1 |
433
|
|
|
|
|
|
|
} |
434
|
|
|
|
|
|
|
# String => '\bwrite(q|_(canonical|term))?(?=[(])' |
435
|
|
|
|
|
|
|
# attribute => 'Built-in' |
436
|
|
|
|
|
|
|
# context => '#stay' |
437
|
|
|
|
|
|
|
# type => 'RegExpr' |
438
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bwrite(q|_(canonical|term))?(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
439
|
0
|
|
|
|
|
|
return 1 |
440
|
|
|
|
|
|
|
} |
441
|
|
|
|
|
|
|
# String => '\b(current_)?op(?=[(])' |
442
|
|
|
|
|
|
|
# attribute => 'Built-in' |
443
|
|
|
|
|
|
|
# context => '#stay' |
444
|
|
|
|
|
|
|
# type => 'RegExpr' |
445
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(current_)?op(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
446
|
0
|
|
|
|
|
|
return 1 |
447
|
|
|
|
|
|
|
} |
448
|
|
|
|
|
|
|
# String => '\b(current_)?char_conversion(?=[(])' |
449
|
|
|
|
|
|
|
# attribute => 'Built-in' |
450
|
|
|
|
|
|
|
# context => '#stay' |
451
|
|
|
|
|
|
|
# type => 'RegExpr' |
452
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(current_)?char_conversion(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
453
|
0
|
|
|
|
|
|
return 1 |
454
|
|
|
|
|
|
|
} |
455
|
|
|
|
|
|
|
# String => '\batom_(length|c(hars|o(ncat|des)))(?=[(])' |
456
|
|
|
|
|
|
|
# attribute => 'Built-in' |
457
|
|
|
|
|
|
|
# context => '#stay' |
458
|
|
|
|
|
|
|
# type => 'RegExpr' |
459
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\batom_(length|c(hars|o(ncat|des)))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
460
|
0
|
|
|
|
|
|
return 1 |
461
|
|
|
|
|
|
|
} |
462
|
|
|
|
|
|
|
# String => '\b(char_code|sub_atom)(?=[(])' |
463
|
|
|
|
|
|
|
# attribute => 'Built-in' |
464
|
|
|
|
|
|
|
# context => '#stay' |
465
|
|
|
|
|
|
|
# type => 'RegExpr' |
466
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(char_code|sub_atom)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
467
|
0
|
|
|
|
|
|
return 1 |
468
|
|
|
|
|
|
|
} |
469
|
|
|
|
|
|
|
# String => '\bnumber_c(hars|odes)(?=[(])' |
470
|
|
|
|
|
|
|
# attribute => 'Built-in' |
471
|
|
|
|
|
|
|
# context => '#stay' |
472
|
|
|
|
|
|
|
# type => 'RegExpr' |
473
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bnumber_c(hars|odes)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
474
|
0
|
|
|
|
|
|
return 1 |
475
|
|
|
|
|
|
|
} |
476
|
|
|
|
|
|
|
# String => '\b(set|current)_prolog_flag(?=[(])' |
477
|
|
|
|
|
|
|
# attribute => 'Built-in' |
478
|
|
|
|
|
|
|
# context => '#stay' |
479
|
|
|
|
|
|
|
# type => 'RegExpr' |
480
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(set|current)_prolog_flag(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
481
|
0
|
|
|
|
|
|
return 1 |
482
|
|
|
|
|
|
|
} |
483
|
|
|
|
|
|
|
# String => '\bhalt\b' |
484
|
|
|
|
|
|
|
# attribute => 'Built-in' |
485
|
|
|
|
|
|
|
# context => '#stay' |
486
|
|
|
|
|
|
|
# type => 'RegExpr' |
487
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bhalt\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
488
|
0
|
|
|
|
|
|
return 1 |
489
|
|
|
|
|
|
|
} |
490
|
|
|
|
|
|
|
# String => '\bhalt(?=[(])' |
491
|
|
|
|
|
|
|
# attribute => 'Built-in' |
492
|
|
|
|
|
|
|
# context => '#stay' |
493
|
|
|
|
|
|
|
# type => 'RegExpr' |
494
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bhalt(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
495
|
0
|
|
|
|
|
|
return 1 |
496
|
|
|
|
|
|
|
} |
497
|
|
|
|
|
|
|
# String => '\b[A-Z_]\w*' |
498
|
|
|
|
|
|
|
# attribute => 'Variable' |
499
|
|
|
|
|
|
|
# context => '#stay' |
500
|
|
|
|
|
|
|
# type => 'RegExpr' |
501
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b[A-Z_]\\w*', 0, 0, 0, undef, 0, '#stay', 'Variable')) { |
502
|
0
|
|
|
|
|
|
return 1 |
503
|
|
|
|
|
|
|
} |
504
|
|
|
|
|
|
|
# attribute => 'Comment' |
505
|
|
|
|
|
|
|
# char => '%' |
506
|
|
|
|
|
|
|
# context => 'single line comment' |
507
|
|
|
|
|
|
|
# type => 'DetectChar' |
508
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, 'single line comment', 'Comment')) { |
509
|
0
|
|
|
|
|
|
return 1 |
510
|
|
|
|
|
|
|
} |
511
|
|
|
|
|
|
|
# attribute => 'Comment' |
512
|
|
|
|
|
|
|
# beginRegion => 'Comment' |
513
|
|
|
|
|
|
|
# char => '/' |
514
|
|
|
|
|
|
|
# char1 => '*' |
515
|
|
|
|
|
|
|
# context => 'multiline comment' |
516
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
517
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'multiline comment', 'Comment')) { |
518
|
0
|
|
|
|
|
|
return 1 |
519
|
|
|
|
|
|
|
} |
520
|
|
|
|
|
|
|
# attribute => 'String' |
521
|
|
|
|
|
|
|
# char => '"' |
522
|
|
|
|
|
|
|
# context => 'string' |
523
|
|
|
|
|
|
|
# type => 'DetectChar' |
524
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'String')) { |
525
|
0
|
|
|
|
|
|
return 1 |
526
|
|
|
|
|
|
|
} |
527
|
|
|
|
|
|
|
# attribute => 'String' |
528
|
|
|
|
|
|
|
# char => ''' |
529
|
|
|
|
|
|
|
# context => 'atom' |
530
|
|
|
|
|
|
|
# type => 'DetectChar' |
531
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'atom', 'String')) { |
532
|
0
|
|
|
|
|
|
return 1 |
533
|
|
|
|
|
|
|
} |
534
|
|
|
|
|
|
|
# String => '0'.' |
535
|
|
|
|
|
|
|
# attribute => 'Number' |
536
|
|
|
|
|
|
|
# context => '#stay' |
537
|
|
|
|
|
|
|
# type => 'RegExpr' |
538
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0\'.', 0, 0, 0, undef, 0, '#stay', 'Number')) { |
539
|
0
|
|
|
|
|
|
return 1 |
540
|
|
|
|
|
|
|
} |
541
|
|
|
|
|
|
|
# String => '0b[0-1]+' |
542
|
|
|
|
|
|
|
# attribute => 'Number' |
543
|
|
|
|
|
|
|
# context => '#stay' |
544
|
|
|
|
|
|
|
# type => 'RegExpr' |
545
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0b[0-1]+', 0, 0, 0, undef, 0, '#stay', 'Number')) { |
546
|
0
|
|
|
|
|
|
return 1 |
547
|
|
|
|
|
|
|
} |
548
|
|
|
|
|
|
|
# String => '0o[0-7]+' |
549
|
|
|
|
|
|
|
# attribute => 'Number' |
550
|
|
|
|
|
|
|
# context => '#stay' |
551
|
|
|
|
|
|
|
# type => 'RegExpr' |
552
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0o[0-7]+', 0, 0, 0, undef, 0, '#stay', 'Number')) { |
553
|
0
|
|
|
|
|
|
return 1 |
554
|
|
|
|
|
|
|
} |
555
|
|
|
|
|
|
|
# String => '0x[0-9a-fA-F]+' |
556
|
|
|
|
|
|
|
# attribute => 'Number' |
557
|
|
|
|
|
|
|
# context => '#stay' |
558
|
|
|
|
|
|
|
# type => 'RegExpr' |
559
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '0x[0-9a-fA-F]+', 0, 0, 0, undef, 0, '#stay', 'Number')) { |
560
|
0
|
|
|
|
|
|
return 1 |
561
|
|
|
|
|
|
|
} |
562
|
|
|
|
|
|
|
# String => '\d+(\.\d+)?([eE]([-+])?\d+)?' |
563
|
|
|
|
|
|
|
# attribute => 'Number' |
564
|
|
|
|
|
|
|
# context => '#stay' |
565
|
|
|
|
|
|
|
# type => 'RegExpr' |
566
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\d+(\\.\\d+)?([eE]([-+])?\\d+)?', 0, 0, 0, undef, 0, '#stay', 'Number')) { |
567
|
0
|
|
|
|
|
|
return 1 |
568
|
|
|
|
|
|
|
} |
569
|
|
|
|
|
|
|
# attribute => 'Operator' |
570
|
|
|
|
|
|
|
# char => ':' |
571
|
|
|
|
|
|
|
# char1 => ':' |
572
|
|
|
|
|
|
|
# context => '#stay' |
573
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
574
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, ':', ':', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
575
|
0
|
|
|
|
|
|
return 1 |
576
|
|
|
|
|
|
|
} |
577
|
|
|
|
|
|
|
# attribute => 'Operator' |
578
|
|
|
|
|
|
|
# char => '^' |
579
|
|
|
|
|
|
|
# char1 => '^' |
580
|
|
|
|
|
|
|
# context => '#stay' |
581
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
582
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '^', '^', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
583
|
0
|
|
|
|
|
|
return 1 |
584
|
|
|
|
|
|
|
} |
585
|
|
|
|
|
|
|
# attribute => 'Operator' |
586
|
|
|
|
|
|
|
# beginRegion => 'external' |
587
|
|
|
|
|
|
|
# char => '{' |
588
|
|
|
|
|
|
|
# context => '#stay' |
589
|
|
|
|
|
|
|
# type => 'DetectChar' |
590
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
591
|
0
|
|
|
|
|
|
return 1 |
592
|
|
|
|
|
|
|
} |
593
|
|
|
|
|
|
|
# attribute => 'Operator' |
594
|
|
|
|
|
|
|
# char => '}' |
595
|
|
|
|
|
|
|
# context => '#stay' |
596
|
|
|
|
|
|
|
# endRegion => 'external' |
597
|
|
|
|
|
|
|
# type => 'DetectChar' |
598
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
599
|
0
|
|
|
|
|
|
return 1 |
600
|
|
|
|
|
|
|
} |
601
|
|
|
|
|
|
|
# String => '\bonce(?=[(])' |
602
|
|
|
|
|
|
|
# attribute => 'Built-in' |
603
|
|
|
|
|
|
|
# context => '#stay' |
604
|
|
|
|
|
|
|
# type => 'RegExpr' |
605
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bonce(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
606
|
0
|
|
|
|
|
|
return 1 |
607
|
|
|
|
|
|
|
} |
608
|
|
|
|
|
|
|
# String => '\brepeat\b' |
609
|
|
|
|
|
|
|
# attribute => 'Built-in' |
610
|
|
|
|
|
|
|
# context => '#stay' |
611
|
|
|
|
|
|
|
# type => 'RegExpr' |
612
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\brepeat\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { |
613
|
0
|
|
|
|
|
|
return 1 |
614
|
|
|
|
|
|
|
} |
615
|
|
|
|
|
|
|
# attribute => 'Operator' |
616
|
|
|
|
|
|
|
# char => '>' |
617
|
|
|
|
|
|
|
# char1 => '>' |
618
|
|
|
|
|
|
|
# context => '#stay' |
619
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
620
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '>', '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
621
|
0
|
|
|
|
|
|
return 1 |
622
|
|
|
|
|
|
|
} |
623
|
|
|
|
|
|
|
# attribute => 'Operator' |
624
|
|
|
|
|
|
|
# char => '<' |
625
|
|
|
|
|
|
|
# char1 => '<' |
626
|
|
|
|
|
|
|
# context => '#stay' |
627
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
628
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '<', '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
629
|
0
|
|
|
|
|
|
return 1 |
630
|
|
|
|
|
|
|
} |
631
|
|
|
|
|
|
|
# attribute => 'Operator' |
632
|
|
|
|
|
|
|
# char => '/' |
633
|
|
|
|
|
|
|
# char1 => '\' |
634
|
|
|
|
|
|
|
# context => '#stay' |
635
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
636
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '\\', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
637
|
0
|
|
|
|
|
|
return 1 |
638
|
|
|
|
|
|
|
} |
639
|
|
|
|
|
|
|
# attribute => 'Operator' |
640
|
|
|
|
|
|
|
# char => '\' |
641
|
|
|
|
|
|
|
# char1 => '/' |
642
|
|
|
|
|
|
|
# context => '#stay' |
643
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
644
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '\\', '/', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
645
|
0
|
|
|
|
|
|
return 1 |
646
|
|
|
|
|
|
|
} |
647
|
|
|
|
|
|
|
# attribute => 'Operator' |
648
|
|
|
|
|
|
|
# char => '\' |
649
|
|
|
|
|
|
|
# char1 => '\' |
650
|
|
|
|
|
|
|
# context => '#stay' |
651
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
652
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
653
|
0
|
|
|
|
|
|
return 1 |
654
|
|
|
|
|
|
|
} |
655
|
|
|
|
|
|
|
# String => '\bis\b' |
656
|
|
|
|
|
|
|
# attribute => 'Operator' |
657
|
|
|
|
|
|
|
# context => '#stay' |
658
|
|
|
|
|
|
|
# type => 'RegExpr' |
659
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\bis\\b', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
660
|
0
|
|
|
|
|
|
return 1 |
661
|
|
|
|
|
|
|
} |
662
|
|
|
|
|
|
|
# String => '=:=' |
663
|
|
|
|
|
|
|
# attribute => 'Operator' |
664
|
|
|
|
|
|
|
# context => '#stay' |
665
|
|
|
|
|
|
|
# type => 'StringDetect' |
666
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, '=:=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
667
|
0
|
|
|
|
|
|
return 1 |
668
|
|
|
|
|
|
|
} |
669
|
|
|
|
|
|
|
# String => '=\=' |
670
|
|
|
|
|
|
|
# attribute => 'Operator' |
671
|
|
|
|
|
|
|
# context => '#stay' |
672
|
|
|
|
|
|
|
# type => 'StringDetect' |
673
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, '=\\=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
674
|
0
|
|
|
|
|
|
return 1 |
675
|
|
|
|
|
|
|
} |
676
|
|
|
|
|
|
|
# attribute => 'Operator' |
677
|
|
|
|
|
|
|
# char => '<' |
678
|
|
|
|
|
|
|
# context => '#stay' |
679
|
|
|
|
|
|
|
# type => 'DetectChar' |
680
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
681
|
0
|
|
|
|
|
|
return 1 |
682
|
|
|
|
|
|
|
} |
683
|
|
|
|
|
|
|
# attribute => 'Operator' |
684
|
|
|
|
|
|
|
# char => '=' |
685
|
|
|
|
|
|
|
# char1 => '<' |
686
|
|
|
|
|
|
|
# context => '#stay' |
687
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
688
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '=', '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
689
|
0
|
|
|
|
|
|
return 1 |
690
|
|
|
|
|
|
|
} |
691
|
|
|
|
|
|
|
# attribute => 'Operator' |
692
|
|
|
|
|
|
|
# char => '>' |
693
|
|
|
|
|
|
|
# context => '#stay' |
694
|
|
|
|
|
|
|
# type => 'DetectChar' |
695
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
696
|
0
|
|
|
|
|
|
return 1 |
697
|
|
|
|
|
|
|
} |
698
|
|
|
|
|
|
|
# attribute => 'Operator' |
699
|
|
|
|
|
|
|
# char => '>' |
700
|
|
|
|
|
|
|
# char1 => '=' |
701
|
|
|
|
|
|
|
# context => '#stay' |
702
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
703
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '>', '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
704
|
0
|
|
|
|
|
|
return 1 |
705
|
|
|
|
|
|
|
} |
706
|
|
|
|
|
|
|
# String => '=..' |
707
|
|
|
|
|
|
|
# attribute => 'Operator' |
708
|
|
|
|
|
|
|
# context => '#stay' |
709
|
|
|
|
|
|
|
# type => 'StringDetect' |
710
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, '=..', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
711
|
0
|
|
|
|
|
|
return 1 |
712
|
|
|
|
|
|
|
} |
713
|
|
|
|
|
|
|
# attribute => 'Operator' |
714
|
|
|
|
|
|
|
# char => '=' |
715
|
|
|
|
|
|
|
# context => '#stay' |
716
|
|
|
|
|
|
|
# type => 'DetectChar' |
717
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
718
|
0
|
|
|
|
|
|
return 1 |
719
|
|
|
|
|
|
|
} |
720
|
|
|
|
|
|
|
# attribute => 'Operator' |
721
|
|
|
|
|
|
|
# char => '\' |
722
|
|
|
|
|
|
|
# char1 => '=' |
723
|
|
|
|
|
|
|
# context => '#stay' |
724
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
725
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '\\', '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
726
|
0
|
|
|
|
|
|
return 1 |
727
|
|
|
|
|
|
|
} |
728
|
|
|
|
|
|
|
# attribute => 'Operator' |
729
|
|
|
|
|
|
|
# char => '=' |
730
|
|
|
|
|
|
|
# char1 => '=' |
731
|
|
|
|
|
|
|
# context => '#stay' |
732
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
733
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '=', '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
734
|
0
|
|
|
|
|
|
return 1 |
735
|
|
|
|
|
|
|
} |
736
|
|
|
|
|
|
|
# String => '\==' |
737
|
|
|
|
|
|
|
# attribute => 'Operator' |
738
|
|
|
|
|
|
|
# context => '#stay' |
739
|
|
|
|
|
|
|
# type => 'StringDetect' |
740
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, '\\==', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
741
|
0
|
|
|
|
|
|
return 1 |
742
|
|
|
|
|
|
|
} |
743
|
|
|
|
|
|
|
# String => '@=<' |
744
|
|
|
|
|
|
|
# attribute => 'Operator' |
745
|
|
|
|
|
|
|
# context => '#stay' |
746
|
|
|
|
|
|
|
# type => 'StringDetect' |
747
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, '@=<', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
748
|
0
|
|
|
|
|
|
return 1 |
749
|
|
|
|
|
|
|
} |
750
|
|
|
|
|
|
|
# attribute => 'Operator' |
751
|
|
|
|
|
|
|
# char => '@' |
752
|
|
|
|
|
|
|
# char1 => '<' |
753
|
|
|
|
|
|
|
# context => '#stay' |
754
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
755
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '@', '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
756
|
0
|
|
|
|
|
|
return 1 |
757
|
|
|
|
|
|
|
} |
758
|
|
|
|
|
|
|
# String => '@>=' |
759
|
|
|
|
|
|
|
# attribute => 'Operator' |
760
|
|
|
|
|
|
|
# context => '#stay' |
761
|
|
|
|
|
|
|
# type => 'StringDetect' |
762
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, '@>=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
763
|
0
|
|
|
|
|
|
return 1 |
764
|
|
|
|
|
|
|
} |
765
|
|
|
|
|
|
|
# attribute => 'Operator' |
766
|
|
|
|
|
|
|
# char => '@' |
767
|
|
|
|
|
|
|
# char1 => '>' |
768
|
|
|
|
|
|
|
# context => '#stay' |
769
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
770
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '@', '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
771
|
0
|
|
|
|
|
|
return 1 |
772
|
|
|
|
|
|
|
} |
773
|
|
|
|
|
|
|
# attribute => 'Operator' |
774
|
|
|
|
|
|
|
# char => '/' |
775
|
|
|
|
|
|
|
# char1 => '/' |
776
|
|
|
|
|
|
|
# context => '#stay' |
777
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
778
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
779
|
0
|
|
|
|
|
|
return 1 |
780
|
|
|
|
|
|
|
} |
781
|
|
|
|
|
|
|
# String => '+-*/' |
782
|
|
|
|
|
|
|
# attribute => 'Operator' |
783
|
|
|
|
|
|
|
# context => '#stay' |
784
|
|
|
|
|
|
|
# type => 'AnyChar' |
785
|
0
|
0
|
|
|
|
|
if ($self->testAnyChar($text, '+-*/', 0, 0, undef, 0, '#stay', 'Operator')) { |
786
|
0
|
|
|
|
|
|
return 1 |
787
|
|
|
|
|
|
|
} |
788
|
|
|
|
|
|
|
# String => '\b(mod|rem)\b' |
789
|
|
|
|
|
|
|
# attribute => 'Operator' |
790
|
|
|
|
|
|
|
# context => '#stay' |
791
|
|
|
|
|
|
|
# type => 'RegExpr' |
792
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b(mod|rem)\\b', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
793
|
0
|
|
|
|
|
|
return 1 |
794
|
|
|
|
|
|
|
} |
795
|
|
|
|
|
|
|
# attribute => 'Operator' |
796
|
|
|
|
|
|
|
# char => '*' |
797
|
|
|
|
|
|
|
# char1 => '*' |
798
|
|
|
|
|
|
|
# context => '#stay' |
799
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
800
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '*', '*', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
801
|
0
|
|
|
|
|
|
return 1 |
802
|
|
|
|
|
|
|
} |
803
|
|
|
|
|
|
|
# String => '-->' |
804
|
|
|
|
|
|
|
# attribute => 'Operator' |
805
|
|
|
|
|
|
|
# context => '#stay' |
806
|
|
|
|
|
|
|
# type => 'StringDetect' |
807
|
0
|
0
|
|
|
|
|
if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
808
|
0
|
|
|
|
|
|
return 1 |
809
|
|
|
|
|
|
|
} |
810
|
|
|
|
|
|
|
# String => '!;' |
811
|
|
|
|
|
|
|
# attribute => 'Operator' |
812
|
|
|
|
|
|
|
# context => '#stay' |
813
|
|
|
|
|
|
|
# type => 'AnyChar' |
814
|
0
|
0
|
|
|
|
|
if ($self->testAnyChar($text, '!;', 0, 0, undef, 0, '#stay', 'Operator')) { |
815
|
0
|
|
|
|
|
|
return 1 |
816
|
|
|
|
|
|
|
} |
817
|
|
|
|
|
|
|
# attribute => 'Operator' |
818
|
|
|
|
|
|
|
# char => '-' |
819
|
|
|
|
|
|
|
# char1 => '>' |
820
|
|
|
|
|
|
|
# context => '#stay' |
821
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
822
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '-', '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
823
|
0
|
|
|
|
|
|
return 1 |
824
|
|
|
|
|
|
|
} |
825
|
|
|
|
|
|
|
# attribute => 'Operator' |
826
|
|
|
|
|
|
|
# char => '\' |
827
|
|
|
|
|
|
|
# char1 => '+' |
828
|
|
|
|
|
|
|
# context => '#stay' |
829
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
830
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, '\\', '+', 0, 0, 0, undef, 0, '#stay', 'Operator')) { |
831
|
0
|
|
|
|
|
|
return 1 |
832
|
|
|
|
|
|
|
} |
833
|
|
|
|
|
|
|
# String => '?@' |
834
|
|
|
|
|
|
|
# attribute => 'Operator' |
835
|
|
|
|
|
|
|
# context => '#stay' |
836
|
|
|
|
|
|
|
# type => 'AnyChar' |
837
|
0
|
0
|
|
|
|
|
if ($self->testAnyChar($text, '?@', 0, 0, undef, 0, '#stay', 'Operator')) { |
838
|
0
|
|
|
|
|
|
return 1 |
839
|
|
|
|
|
|
|
} |
840
|
|
|
|
|
|
|
# attribute => 'Normal' |
841
|
|
|
|
|
|
|
# char => ':' |
842
|
|
|
|
|
|
|
# char1 => '-' |
843
|
|
|
|
|
|
|
# context => '#stay' |
844
|
|
|
|
|
|
|
# firstNonSpace => 'false' |
845
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
846
|
0
|
0
|
|
|
|
|
if ($self->testDetect2Chars($text, ':', '-', 0, 0, 0, undef, 0, '#stay', 'Normal')) { |
847
|
0
|
|
|
|
|
|
return 1 |
848
|
|
|
|
|
|
|
} |
849
|
|
|
|
|
|
|
# String => '\b[a-z]\w*' |
850
|
|
|
|
|
|
|
# attribute => 'Normal' |
851
|
|
|
|
|
|
|
# context => '#stay' |
852
|
|
|
|
|
|
|
# type => 'RegExpr' |
853
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\b[a-z]\\w*', 0, 0, 0, undef, 0, '#stay', 'Normal')) { |
854
|
0
|
|
|
|
|
|
return 1 |
855
|
|
|
|
|
|
|
} |
856
|
0
|
|
|
|
|
|
return 0; |
857
|
|
|
|
|
|
|
}; |
858
|
|
|
|
|
|
|
|
859
|
|
|
|
|
|
|
sub parsesinglelinecomment { |
860
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
861
|
0
|
|
|
|
|
|
return 0; |
862
|
|
|
|
|
|
|
}; |
863
|
|
|
|
|
|
|
|
864
|
|
|
|
|
|
|
sub parsestring { |
865
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
866
|
|
|
|
|
|
|
# attribute => 'String' |
867
|
|
|
|
|
|
|
# char => '"' |
868
|
|
|
|
|
|
|
# context => '#pop' |
869
|
|
|
|
|
|
|
# type => 'DetectChar' |
870
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
871
|
0
|
|
|
|
|
|
return 1 |
872
|
|
|
|
|
|
|
} |
873
|
0
|
|
|
|
|
|
return 0; |
874
|
|
|
|
|
|
|
}; |
875
|
|
|
|
|
|
|
|
876
|
|
|
|
|
|
|
|
877
|
|
|
|
|
|
|
1; |
878
|
|
|
|
|
|
|
|
879
|
|
|
|
|
|
|
__END__ |