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 'cpp.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 1.37 |
9
|
|
|
|
|
|
|
#kate version 2.4 |
10
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:04 2008, localtime |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::Cplusplus; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
433
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
26
|
|
17
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
18
|
1
|
|
|
1
|
|
4
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1494
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
4
|
|
|
4
|
0
|
507
|
my $proto = shift; |
22
|
4
|
|
33
|
|
|
22
|
my $class = ref($proto) || $proto; |
23
|
4
|
|
|
|
|
25
|
my $self = $class->SUPER::new(@_); |
24
|
4
|
|
|
|
|
63
|
$self->attributes({ |
25
|
|
|
|
|
|
|
'Char' => 'Char', |
26
|
|
|
|
|
|
|
'Comment' => 'Comment', |
27
|
|
|
|
|
|
|
'Data Type' => 'DataType', |
28
|
|
|
|
|
|
|
'Decimal' => 'DecVal', |
29
|
|
|
|
|
|
|
'Extensions' => 'Keyword', |
30
|
|
|
|
|
|
|
'Float' => 'Float', |
31
|
|
|
|
|
|
|
'Hex' => 'BaseN', |
32
|
|
|
|
|
|
|
'Keyword' => 'Keyword', |
33
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
34
|
|
|
|
|
|
|
'Octal' => 'BaseN', |
35
|
|
|
|
|
|
|
'Prep. Lib' => 'Others', |
36
|
|
|
|
|
|
|
'Preprocessor' => 'Others', |
37
|
|
|
|
|
|
|
'Region Marker' => 'RegionMarker', |
38
|
|
|
|
|
|
|
'String' => 'String', |
39
|
|
|
|
|
|
|
'String Char' => 'Char', |
40
|
|
|
|
|
|
|
'Symbol' => 'Normal', |
41
|
|
|
|
|
|
|
}); |
42
|
4
|
|
|
|
|
31
|
$self->listAdd('extensions', |
43
|
|
|
|
|
|
|
'FALSE', |
44
|
|
|
|
|
|
|
'K_DCOP', |
45
|
|
|
|
|
|
|
'Q_ARG', |
46
|
|
|
|
|
|
|
'Q_ASSERT', |
47
|
|
|
|
|
|
|
'Q_ASSERT_X', |
48
|
|
|
|
|
|
|
'Q_CLASSINFO', |
49
|
|
|
|
|
|
|
'Q_CLEANUP_RESOURCE', |
50
|
|
|
|
|
|
|
'Q_D', |
51
|
|
|
|
|
|
|
'Q_DECLARE_FLAGS', |
52
|
|
|
|
|
|
|
'Q_DECLARE_FLAGS', |
53
|
|
|
|
|
|
|
'Q_DECLARE_INTERFACE', |
54
|
|
|
|
|
|
|
'Q_DECLARE_OPERATORS_FOR_FLAGS', |
55
|
|
|
|
|
|
|
'Q_DECLARE_PRIVATE', |
56
|
|
|
|
|
|
|
'Q_DECLARE_PUBLIC', |
57
|
|
|
|
|
|
|
'Q_DECLARE_SHARED', |
58
|
|
|
|
|
|
|
'Q_DECLARE_TYPEINFO', |
59
|
|
|
|
|
|
|
'Q_DISABLE_COPY', |
60
|
|
|
|
|
|
|
'Q_ENUMS', |
61
|
|
|
|
|
|
|
'Q_EXPORT', |
62
|
|
|
|
|
|
|
'Q_FLAGS', |
63
|
|
|
|
|
|
|
'Q_FOREACH', |
64
|
|
|
|
|
|
|
'Q_FOREVER', |
65
|
|
|
|
|
|
|
'Q_GADGET', |
66
|
|
|
|
|
|
|
'Q_GLOBAL_STATIC', |
67
|
|
|
|
|
|
|
'Q_GLOBAL_STATIC_WITH_ARGS', |
68
|
|
|
|
|
|
|
'Q_INIT_RESOURCE', |
69
|
|
|
|
|
|
|
'Q_INTERFACES', |
70
|
|
|
|
|
|
|
'Q_INVOKABLE', |
71
|
|
|
|
|
|
|
'Q_OBJECT', |
72
|
|
|
|
|
|
|
'Q_OVERRIDE', |
73
|
|
|
|
|
|
|
'Q_PROPERTY', |
74
|
|
|
|
|
|
|
'Q_Q', |
75
|
|
|
|
|
|
|
'Q_RETURN_ARG', |
76
|
|
|
|
|
|
|
'Q_SCRIPTABLE', |
77
|
|
|
|
|
|
|
'Q_SETS', |
78
|
|
|
|
|
|
|
'Q_SIGNALS', |
79
|
|
|
|
|
|
|
'Q_SLOTS', |
80
|
|
|
|
|
|
|
'SIGNAL', |
81
|
|
|
|
|
|
|
'SLOT', |
82
|
|
|
|
|
|
|
'TRUE', |
83
|
|
|
|
|
|
|
'connect', |
84
|
|
|
|
|
|
|
'disconnect', |
85
|
|
|
|
|
|
|
'emit', |
86
|
|
|
|
|
|
|
'foreach', |
87
|
|
|
|
|
|
|
'forever', |
88
|
|
|
|
|
|
|
'signals', |
89
|
|
|
|
|
|
|
'slots', |
90
|
|
|
|
|
|
|
); |
91
|
4
|
|
|
|
|
20
|
$self->listAdd('keywords', |
92
|
|
|
|
|
|
|
'and', |
93
|
|
|
|
|
|
|
'and_eq', |
94
|
|
|
|
|
|
|
'asm', |
95
|
|
|
|
|
|
|
'bad_cast', |
96
|
|
|
|
|
|
|
'bad_typeid', |
97
|
|
|
|
|
|
|
'bitand', |
98
|
|
|
|
|
|
|
'bitor', |
99
|
|
|
|
|
|
|
'break', |
100
|
|
|
|
|
|
|
'case', |
101
|
|
|
|
|
|
|
'catch', |
102
|
|
|
|
|
|
|
'class', |
103
|
|
|
|
|
|
|
'compl', |
104
|
|
|
|
|
|
|
'const_cast', |
105
|
|
|
|
|
|
|
'continue', |
106
|
|
|
|
|
|
|
'default', |
107
|
|
|
|
|
|
|
'delete', |
108
|
|
|
|
|
|
|
'do', |
109
|
|
|
|
|
|
|
'dynamic_cast', |
110
|
|
|
|
|
|
|
'else', |
111
|
|
|
|
|
|
|
'enum', |
112
|
|
|
|
|
|
|
'except', |
113
|
|
|
|
|
|
|
'explicit', |
114
|
|
|
|
|
|
|
'export', |
115
|
|
|
|
|
|
|
'extern', |
116
|
|
|
|
|
|
|
'false', |
117
|
|
|
|
|
|
|
'finally', |
118
|
|
|
|
|
|
|
'for', |
119
|
|
|
|
|
|
|
'friend', |
120
|
|
|
|
|
|
|
'goto', |
121
|
|
|
|
|
|
|
'if', |
122
|
|
|
|
|
|
|
'inline', |
123
|
|
|
|
|
|
|
'namespace', |
124
|
|
|
|
|
|
|
'new', |
125
|
|
|
|
|
|
|
'not', |
126
|
|
|
|
|
|
|
'not_eq', |
127
|
|
|
|
|
|
|
'operator', |
128
|
|
|
|
|
|
|
'or', |
129
|
|
|
|
|
|
|
'or_eq', |
130
|
|
|
|
|
|
|
'private', |
131
|
|
|
|
|
|
|
'protected', |
132
|
|
|
|
|
|
|
'public', |
133
|
|
|
|
|
|
|
'qobject_cast', |
134
|
|
|
|
|
|
|
'reinterpret_cast', |
135
|
|
|
|
|
|
|
'return', |
136
|
|
|
|
|
|
|
'sizeof', |
137
|
|
|
|
|
|
|
'static_cast', |
138
|
|
|
|
|
|
|
'struct', |
139
|
|
|
|
|
|
|
'switch', |
140
|
|
|
|
|
|
|
'template', |
141
|
|
|
|
|
|
|
'this', |
142
|
|
|
|
|
|
|
'throw', |
143
|
|
|
|
|
|
|
'true', |
144
|
|
|
|
|
|
|
'try', |
145
|
|
|
|
|
|
|
'type_info', |
146
|
|
|
|
|
|
|
'typedef', |
147
|
|
|
|
|
|
|
'typeid', |
148
|
|
|
|
|
|
|
'typename', |
149
|
|
|
|
|
|
|
'union', |
150
|
|
|
|
|
|
|
'using', |
151
|
|
|
|
|
|
|
'virtual', |
152
|
|
|
|
|
|
|
'while', |
153
|
|
|
|
|
|
|
'xalloc', |
154
|
|
|
|
|
|
|
'xor', |
155
|
|
|
|
|
|
|
'xor_eq', |
156
|
|
|
|
|
|
|
); |
157
|
4
|
|
|
|
|
18
|
$self->listAdd('types', |
158
|
|
|
|
|
|
|
'auto', |
159
|
|
|
|
|
|
|
'bool', |
160
|
|
|
|
|
|
|
'char', |
161
|
|
|
|
|
|
|
'const', |
162
|
|
|
|
|
|
|
'double', |
163
|
|
|
|
|
|
|
'float', |
164
|
|
|
|
|
|
|
'int', |
165
|
|
|
|
|
|
|
'int16_t', |
166
|
|
|
|
|
|
|
'int32_t', |
167
|
|
|
|
|
|
|
'int64_t', |
168
|
|
|
|
|
|
|
'int8_t', |
169
|
|
|
|
|
|
|
'long', |
170
|
|
|
|
|
|
|
'mutable', |
171
|
|
|
|
|
|
|
'register', |
172
|
|
|
|
|
|
|
'short', |
173
|
|
|
|
|
|
|
'signed', |
174
|
|
|
|
|
|
|
'static', |
175
|
|
|
|
|
|
|
'uchar', |
176
|
|
|
|
|
|
|
'uint', |
177
|
|
|
|
|
|
|
'uint16_t', |
178
|
|
|
|
|
|
|
'uint32_t', |
179
|
|
|
|
|
|
|
'uint64_t', |
180
|
|
|
|
|
|
|
'uint8_t', |
181
|
|
|
|
|
|
|
'unsigned', |
182
|
|
|
|
|
|
|
'void', |
183
|
|
|
|
|
|
|
'volatile', |
184
|
|
|
|
|
|
|
'wchar_t', |
185
|
|
|
|
|
|
|
); |
186
|
4
|
|
|
|
|
97
|
$self->contextdata({ |
187
|
|
|
|
|
|
|
'Commentar 1' => { |
188
|
|
|
|
|
|
|
callback => \&parseCommentar1, |
189
|
|
|
|
|
|
|
attribute => 'Comment', |
190
|
|
|
|
|
|
|
lineending => '#pop', |
191
|
|
|
|
|
|
|
}, |
192
|
|
|
|
|
|
|
'Commentar 2' => { |
193
|
|
|
|
|
|
|
callback => \&parseCommentar2, |
194
|
|
|
|
|
|
|
attribute => 'Comment', |
195
|
|
|
|
|
|
|
}, |
196
|
|
|
|
|
|
|
'Commentar/Preprocessor' => { |
197
|
|
|
|
|
|
|
callback => \&parseCommentarPreprocessor, |
198
|
|
|
|
|
|
|
attribute => 'Comment', |
199
|
|
|
|
|
|
|
}, |
200
|
|
|
|
|
|
|
'Define' => { |
201
|
|
|
|
|
|
|
callback => \&parseDefine, |
202
|
|
|
|
|
|
|
attribute => 'Preprocessor', |
203
|
|
|
|
|
|
|
lineending => '#pop', |
204
|
|
|
|
|
|
|
}, |
205
|
|
|
|
|
|
|
'Normal' => { |
206
|
|
|
|
|
|
|
callback => \&parseNormal, |
207
|
|
|
|
|
|
|
attribute => 'Normal Text', |
208
|
|
|
|
|
|
|
}, |
209
|
|
|
|
|
|
|
'Outscoped' => { |
210
|
|
|
|
|
|
|
callback => \&parseOutscoped, |
211
|
|
|
|
|
|
|
attribute => 'Comment', |
212
|
|
|
|
|
|
|
}, |
213
|
|
|
|
|
|
|
'Outscoped intern' => { |
214
|
|
|
|
|
|
|
callback => \&parseOutscopedintern, |
215
|
|
|
|
|
|
|
attribute => 'Comment', |
216
|
|
|
|
|
|
|
}, |
217
|
|
|
|
|
|
|
'Preprocessor' => { |
218
|
|
|
|
|
|
|
callback => \&parsePreprocessor, |
219
|
|
|
|
|
|
|
attribute => 'Preprocessor', |
220
|
|
|
|
|
|
|
lineending => '#pop', |
221
|
|
|
|
|
|
|
}, |
222
|
|
|
|
|
|
|
'Region Marker' => { |
223
|
|
|
|
|
|
|
callback => \&parseRegionMarker, |
224
|
|
|
|
|
|
|
attribute => 'Region Marker', |
225
|
|
|
|
|
|
|
lineending => '#pop', |
226
|
|
|
|
|
|
|
}, |
227
|
|
|
|
|
|
|
'String' => { |
228
|
|
|
|
|
|
|
callback => \&parseString, |
229
|
|
|
|
|
|
|
attribute => 'String', |
230
|
|
|
|
|
|
|
lineending => '#pop', |
231
|
|
|
|
|
|
|
}, |
232
|
|
|
|
|
|
|
}); |
233
|
4
|
|
|
|
|
18
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
234
|
4
|
|
|
|
|
16
|
$self->basecontext('Normal'); |
235
|
4
|
|
|
|
|
15
|
$self->keywordscase(0); |
236
|
4
|
|
|
|
|
11
|
$self->initialize; |
237
|
4
|
|
|
|
|
10
|
bless ($self, $class); |
238
|
4
|
|
|
|
|
27
|
return $self; |
239
|
|
|
|
|
|
|
} |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
sub language { |
242
|
0
|
|
|
0
|
0
|
0
|
return 'C++'; |
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
sub parseCommentar1 { |
246
|
596
|
|
|
596
|
0
|
1054
|
my ($self, $text) = @_; |
247
|
|
|
|
|
|
|
# type => 'DetectSpaces' |
248
|
596
|
100
|
|
|
|
1428
|
if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { |
249
|
38
|
|
|
|
|
96
|
return 1 |
250
|
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
# context => '##Alerts' |
252
|
|
|
|
|
|
|
# type => 'IncludeRules' |
253
|
558
|
50
|
|
|
|
1240
|
if ($self->includePlugin('Alerts', $text)) { |
254
|
0
|
|
|
|
|
0
|
return 1 |
255
|
|
|
|
|
|
|
} |
256
|
|
|
|
|
|
|
# type => 'DetectIdentifier' |
257
|
558
|
100
|
|
|
|
1545
|
if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { |
258
|
172
|
|
|
|
|
379
|
return 1 |
259
|
|
|
|
|
|
|
} |
260
|
386
|
|
|
|
|
733
|
return 0; |
261
|
|
|
|
|
|
|
}; |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
sub parseCommentar2 { |
264
|
234
|
|
|
234
|
0
|
472
|
my ($self, $text) = @_; |
265
|
|
|
|
|
|
|
# type => 'DetectSpaces' |
266
|
234
|
100
|
|
|
|
562
|
if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { |
267
|
4
|
|
|
|
|
10
|
return 1 |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
# attribute => 'Comment' |
270
|
|
|
|
|
|
|
# char => '*' |
271
|
|
|
|
|
|
|
# char1 => '/' |
272
|
|
|
|
|
|
|
# context => '#pop' |
273
|
|
|
|
|
|
|
# endRegion => 'Comment' |
274
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
275
|
230
|
100
|
|
|
|
578
|
if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { |
276
|
18
|
|
|
|
|
61
|
return 1 |
277
|
|
|
|
|
|
|
} |
278
|
|
|
|
|
|
|
# context => '##Alerts' |
279
|
|
|
|
|
|
|
# type => 'IncludeRules' |
280
|
212
|
100
|
|
|
|
508
|
if ($self->includePlugin('Alerts', $text)) { |
281
|
4
|
|
|
|
|
9
|
return 1 |
282
|
|
|
|
|
|
|
} |
283
|
|
|
|
|
|
|
# type => 'DetectIdentifier' |
284
|
208
|
100
|
|
|
|
640
|
if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { |
285
|
58
|
|
|
|
|
139
|
return 1 |
286
|
|
|
|
|
|
|
} |
287
|
150
|
|
|
|
|
298
|
return 0; |
288
|
|
|
|
|
|
|
}; |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
sub parseCommentarPreprocessor { |
291
|
0
|
|
|
0
|
0
|
0
|
my ($self, $text) = @_; |
292
|
|
|
|
|
|
|
# type => 'DetectSpaces' |
293
|
0
|
0
|
|
|
|
0
|
if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { |
294
|
0
|
|
|
|
|
0
|
return 1 |
295
|
|
|
|
|
|
|
} |
296
|
|
|
|
|
|
|
# attribute => 'Comment' |
297
|
|
|
|
|
|
|
# char => '*' |
298
|
|
|
|
|
|
|
# char1 => '/' |
299
|
|
|
|
|
|
|
# context => '#pop' |
300
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
301
|
0
|
0
|
|
|
|
0
|
if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { |
302
|
0
|
|
|
|
|
0
|
return 1 |
303
|
|
|
|
|
|
|
} |
304
|
|
|
|
|
|
|
# type => 'DetectIdentifier' |
305
|
0
|
0
|
|
|
|
0
|
if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { |
306
|
0
|
|
|
|
|
0
|
return 1 |
307
|
|
|
|
|
|
|
} |
308
|
0
|
|
|
|
|
0
|
return 0; |
309
|
|
|
|
|
|
|
}; |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
sub parseDefine { |
312
|
0
|
|
|
0
|
0
|
0
|
my ($self, $text) = @_; |
313
|
|
|
|
|
|
|
# attribute => 'Preprocessor' |
314
|
|
|
|
|
|
|
# context => '#stay' |
315
|
|
|
|
|
|
|
# type => 'LineContinue' |
316
|
0
|
0
|
|
|
|
0
|
if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { |
317
|
0
|
|
|
|
|
0
|
return 1 |
318
|
|
|
|
|
|
|
} |
319
|
0
|
|
|
|
|
0
|
return 0; |
320
|
|
|
|
|
|
|
}; |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
sub parseNormal { |
323
|
4990
|
|
|
4990
|
0
|
9362
|
my ($self, $text) = @_; |
324
|
|
|
|
|
|
|
# type => 'DetectSpaces' |
325
|
4990
|
100
|
|
|
|
13110
|
if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { |
326
|
72
|
|
|
|
|
243
|
return 1 |
327
|
|
|
|
|
|
|
} |
328
|
|
|
|
|
|
|
# String => '#\s*if\s+0' |
329
|
|
|
|
|
|
|
# attribute => 'Preprocessor' |
330
|
|
|
|
|
|
|
# beginRegion => 'Outscoped' |
331
|
|
|
|
|
|
|
# context => 'Outscoped' |
332
|
|
|
|
|
|
|
# firstNonSpace => 'true' |
333
|
|
|
|
|
|
|
# type => 'RegExpr' |
334
|
4918
|
50
|
|
|
|
13928
|
if ($self->testRegExpr($text, '#\\s*if\\s+0', 0, 0, 0, undef, 1, 'Outscoped', 'Preprocessor')) { |
335
|
0
|
|
|
|
|
0
|
return 1 |
336
|
|
|
|
|
|
|
} |
337
|
|
|
|
|
|
|
# attribute => 'Preprocessor' |
338
|
|
|
|
|
|
|
# char => '#' |
339
|
|
|
|
|
|
|
# context => 'Preprocessor' |
340
|
|
|
|
|
|
|
# firstNonSpace => 'true' |
341
|
|
|
|
|
|
|
# type => 'DetectChar' |
342
|
4918
|
100
|
|
|
|
15608
|
if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Preprocessor', 'Preprocessor')) { |
343
|
22
|
|
|
|
|
98
|
return 1 |
344
|
|
|
|
|
|
|
} |
345
|
|
|
|
|
|
|
# String => '//BEGIN' |
346
|
|
|
|
|
|
|
# attribute => 'Region Marker' |
347
|
|
|
|
|
|
|
# beginRegion => 'Region1' |
348
|
|
|
|
|
|
|
# context => 'Region Marker' |
349
|
|
|
|
|
|
|
# firstNonSpace => 'true' |
350
|
|
|
|
|
|
|
# type => 'StringDetect' |
351
|
4896
|
100
|
|
|
|
13223
|
if ($self->testStringDetect($text, '//BEGIN', 0, 0, 0, undef, 1, 'Region Marker', 'Region Marker')) { |
352
|
16
|
|
|
|
|
44
|
return 1 |
353
|
|
|
|
|
|
|
} |
354
|
|
|
|
|
|
|
# String => '//END' |
355
|
|
|
|
|
|
|
# attribute => 'Region Marker' |
356
|
|
|
|
|
|
|
# context => 'Region Marker' |
357
|
|
|
|
|
|
|
# endRegion => 'Region1' |
358
|
|
|
|
|
|
|
# firstNonSpace => 'true' |
359
|
|
|
|
|
|
|
# type => 'StringDetect' |
360
|
4880
|
100
|
|
|
|
12547
|
if ($self->testStringDetect($text, '//END', 0, 0, 0, undef, 1, 'Region Marker', 'Region Marker')) { |
361
|
16
|
|
|
|
|
44
|
return 1 |
362
|
|
|
|
|
|
|
} |
363
|
|
|
|
|
|
|
# String => 'keywords' |
364
|
|
|
|
|
|
|
# attribute => 'Keyword' |
365
|
|
|
|
|
|
|
# context => '#stay' |
366
|
|
|
|
|
|
|
# type => 'keyword' |
367
|
4864
|
100
|
|
|
|
13663
|
if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { |
368
|
134
|
|
|
|
|
397
|
return 1 |
369
|
|
|
|
|
|
|
} |
370
|
|
|
|
|
|
|
# String => 'extensions' |
371
|
|
|
|
|
|
|
# attribute => 'Extensions' |
372
|
|
|
|
|
|
|
# context => '#stay' |
373
|
|
|
|
|
|
|
# type => 'keyword' |
374
|
4730
|
50
|
|
|
|
13679
|
if ($self->testKeyword($text, 'extensions', 0, undef, 0, '#stay', 'Extensions')) { |
375
|
0
|
|
|
|
|
0
|
return 1 |
376
|
|
|
|
|
|
|
} |
377
|
|
|
|
|
|
|
# String => 'types' |
378
|
|
|
|
|
|
|
# attribute => 'Data Type' |
379
|
|
|
|
|
|
|
# context => '#stay' |
380
|
|
|
|
|
|
|
# type => 'keyword' |
381
|
4730
|
100
|
|
|
|
12962
|
if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { |
382
|
156
|
|
|
|
|
458
|
return 1 |
383
|
|
|
|
|
|
|
} |
384
|
|
|
|
|
|
|
# attribute => 'Char' |
385
|
|
|
|
|
|
|
# context => '#stay' |
386
|
|
|
|
|
|
|
# type => 'HlCChar' |
387
|
4574
|
100
|
|
|
|
12587
|
if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { |
388
|
18
|
|
|
|
|
59
|
return 1 |
389
|
|
|
|
|
|
|
} |
390
|
|
|
|
|
|
|
# attribute => 'String' |
391
|
|
|
|
|
|
|
# char => '"' |
392
|
|
|
|
|
|
|
# context => 'String' |
393
|
|
|
|
|
|
|
# type => 'DetectChar' |
394
|
4556
|
100
|
|
|
|
11832
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { |
395
|
36
|
|
|
|
|
123
|
return 1 |
396
|
|
|
|
|
|
|
} |
397
|
|
|
|
|
|
|
# type => 'DetectIdentifier' |
398
|
4520
|
100
|
|
|
|
11642
|
if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { |
399
|
606
|
|
|
|
|
1809
|
return 1 |
400
|
|
|
|
|
|
|
} |
401
|
|
|
|
|
|
|
# attribute => 'Float' |
402
|
|
|
|
|
|
|
# context => '#stay' |
403
|
|
|
|
|
|
|
# items => 'ARRAY(0x1255cd0)' |
404
|
|
|
|
|
|
|
# type => 'Float' |
405
|
3914
|
100
|
|
|
|
9627
|
if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { |
406
|
|
|
|
|
|
|
# String => 'fF' |
407
|
|
|
|
|
|
|
# attribute => 'Float' |
408
|
|
|
|
|
|
|
# context => '#stay' |
409
|
|
|
|
|
|
|
# type => 'AnyChar' |
410
|
32
|
50
|
|
|
|
150
|
if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { |
411
|
0
|
|
|
|
|
0
|
return 1 |
412
|
|
|
|
|
|
|
} |
413
|
|
|
|
|
|
|
} |
414
|
|
|
|
|
|
|
# attribute => 'Octal' |
415
|
|
|
|
|
|
|
# context => '#stay' |
416
|
|
|
|
|
|
|
# type => 'HlCOct' |
417
|
3914
|
50
|
|
|
|
11346
|
if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { |
418
|
0
|
|
|
|
|
0
|
return 1 |
419
|
|
|
|
|
|
|
} |
420
|
|
|
|
|
|
|
# attribute => 'Hex' |
421
|
|
|
|
|
|
|
# context => '#stay' |
422
|
|
|
|
|
|
|
# type => 'HlCHex' |
423
|
3914
|
50
|
|
|
|
11382
|
if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { |
424
|
0
|
|
|
|
|
0
|
return 1 |
425
|
|
|
|
|
|
|
} |
426
|
|
|
|
|
|
|
# attribute => 'Decimal' |
427
|
|
|
|
|
|
|
# context => '#stay' |
428
|
|
|
|
|
|
|
# items => 'ARRAY(0x132c920)' |
429
|
|
|
|
|
|
|
# type => 'Int' |
430
|
3914
|
50
|
|
|
|
10908
|
if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { |
431
|
|
|
|
|
|
|
# String => 'ULL' |
432
|
|
|
|
|
|
|
# attribute => 'Decimal' |
433
|
|
|
|
|
|
|
# context => '#stay' |
434
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
435
|
|
|
|
|
|
|
# type => 'StringDetect' |
436
|
0
|
0
|
|
|
|
0
|
if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
437
|
0
|
|
|
|
|
0
|
return 1 |
438
|
|
|
|
|
|
|
} |
439
|
|
|
|
|
|
|
# String => 'LUL' |
440
|
|
|
|
|
|
|
# attribute => 'Decimal' |
441
|
|
|
|
|
|
|
# context => '#stay' |
442
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
443
|
|
|
|
|
|
|
# type => 'StringDetect' |
444
|
0
|
0
|
|
|
|
0
|
if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
445
|
0
|
|
|
|
|
0
|
return 1 |
446
|
|
|
|
|
|
|
} |
447
|
|
|
|
|
|
|
# String => 'LLU' |
448
|
|
|
|
|
|
|
# attribute => 'Decimal' |
449
|
|
|
|
|
|
|
# context => '#stay' |
450
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
451
|
|
|
|
|
|
|
# type => 'StringDetect' |
452
|
0
|
0
|
|
|
|
0
|
if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
453
|
0
|
|
|
|
|
0
|
return 1 |
454
|
|
|
|
|
|
|
} |
455
|
|
|
|
|
|
|
# String => 'UL' |
456
|
|
|
|
|
|
|
# attribute => 'Decimal' |
457
|
|
|
|
|
|
|
# context => '#stay' |
458
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
459
|
|
|
|
|
|
|
# type => 'StringDetect' |
460
|
0
|
0
|
|
|
|
0
|
if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
461
|
0
|
|
|
|
|
0
|
return 1 |
462
|
|
|
|
|
|
|
} |
463
|
|
|
|
|
|
|
# String => 'LU' |
464
|
|
|
|
|
|
|
# attribute => 'Decimal' |
465
|
|
|
|
|
|
|
# context => '#stay' |
466
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
467
|
|
|
|
|
|
|
# type => 'StringDetect' |
468
|
0
|
0
|
|
|
|
0
|
if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
469
|
0
|
|
|
|
|
0
|
return 1 |
470
|
|
|
|
|
|
|
} |
471
|
|
|
|
|
|
|
# String => 'LL' |
472
|
|
|
|
|
|
|
# attribute => 'Decimal' |
473
|
|
|
|
|
|
|
# context => '#stay' |
474
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
475
|
|
|
|
|
|
|
# type => 'StringDetect' |
476
|
0
|
0
|
|
|
|
0
|
if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
477
|
0
|
|
|
|
|
0
|
return 1 |
478
|
|
|
|
|
|
|
} |
479
|
|
|
|
|
|
|
# String => 'U' |
480
|
|
|
|
|
|
|
# attribute => 'Decimal' |
481
|
|
|
|
|
|
|
# context => '#stay' |
482
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
483
|
|
|
|
|
|
|
# type => 'StringDetect' |
484
|
0
|
0
|
|
|
|
0
|
if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
485
|
0
|
|
|
|
|
0
|
return 1 |
486
|
|
|
|
|
|
|
} |
487
|
|
|
|
|
|
|
# String => 'L' |
488
|
|
|
|
|
|
|
# attribute => 'Decimal' |
489
|
|
|
|
|
|
|
# context => '#stay' |
490
|
|
|
|
|
|
|
# insensitive => 'TRUE' |
491
|
|
|
|
|
|
|
# type => 'StringDetect' |
492
|
0
|
0
|
|
|
|
0
|
if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { |
493
|
0
|
|
|
|
|
0
|
return 1 |
494
|
|
|
|
|
|
|
} |
495
|
|
|
|
|
|
|
} |
496
|
|
|
|
|
|
|
# context => '##Doxygen' |
497
|
|
|
|
|
|
|
# type => 'IncludeRules' |
498
|
3914
|
100
|
|
|
|
10374
|
if ($self->includePlugin('Doxygen', $text)) { |
499
|
6
|
|
|
|
|
19
|
return 1 |
500
|
|
|
|
|
|
|
} |
501
|
|
|
|
|
|
|
# attribute => 'Comment' |
502
|
|
|
|
|
|
|
# char => '/' |
503
|
|
|
|
|
|
|
# char1 => '/' |
504
|
|
|
|
|
|
|
# context => 'Commentar 1' |
505
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
506
|
3908
|
100
|
|
|
|
12747
|
if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { |
507
|
22
|
|
|
|
|
71
|
return 1 |
508
|
|
|
|
|
|
|
} |
509
|
|
|
|
|
|
|
# attribute => 'Comment' |
510
|
|
|
|
|
|
|
# beginRegion => 'Comment' |
511
|
|
|
|
|
|
|
# char => '/' |
512
|
|
|
|
|
|
|
# char1 => '*' |
513
|
|
|
|
|
|
|
# context => 'Commentar 2' |
514
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
515
|
3886
|
100
|
|
|
|
10296
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { |
516
|
18
|
|
|
|
|
71
|
return 1 |
517
|
|
|
|
|
|
|
} |
518
|
|
|
|
|
|
|
# attribute => 'Symbol' |
519
|
|
|
|
|
|
|
# beginRegion => 'Brace1' |
520
|
|
|
|
|
|
|
# char => '{' |
521
|
|
|
|
|
|
|
# context => '#stay' |
522
|
|
|
|
|
|
|
# type => 'DetectChar' |
523
|
3868
|
100
|
|
|
|
11339
|
if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { |
524
|
44
|
|
|
|
|
126
|
return 1 |
525
|
|
|
|
|
|
|
} |
526
|
|
|
|
|
|
|
# attribute => 'Symbol' |
527
|
|
|
|
|
|
|
# char => '}' |
528
|
|
|
|
|
|
|
# context => '#stay' |
529
|
|
|
|
|
|
|
# endRegion => 'Brace1' |
530
|
|
|
|
|
|
|
# type => 'DetectChar' |
531
|
3824
|
100
|
|
|
|
9349
|
if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { |
532
|
44
|
|
|
|
|
128
|
return 1 |
533
|
|
|
|
|
|
|
} |
534
|
|
|
|
|
|
|
# String => ':!%&()+,-/.*<=>?[]{|}~^;' |
535
|
|
|
|
|
|
|
# attribute => 'Symbol' |
536
|
|
|
|
|
|
|
# context => '#stay' |
537
|
|
|
|
|
|
|
# type => 'AnyChar' |
538
|
3780
|
100
|
|
|
|
10001
|
if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]{|}~^;', 0, 0, undef, 0, '#stay', 'Symbol')) { |
539
|
1338
|
|
|
|
|
3747
|
return 1 |
540
|
|
|
|
|
|
|
} |
541
|
2442
|
|
|
|
|
6731
|
return 0; |
542
|
|
|
|
|
|
|
}; |
543
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
sub parseOutscoped { |
545
|
0
|
|
|
0
|
0
|
0
|
my ($self, $text) = @_; |
546
|
|
|
|
|
|
|
# type => 'DetectSpaces' |
547
|
0
|
0
|
|
|
|
0
|
if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { |
548
|
0
|
|
|
|
|
0
|
return 1 |
549
|
|
|
|
|
|
|
} |
550
|
|
|
|
|
|
|
# context => '##Alerts' |
551
|
|
|
|
|
|
|
# type => 'IncludeRules' |
552
|
0
|
0
|
|
|
|
0
|
if ($self->includePlugin('Alerts', $text)) { |
553
|
0
|
|
|
|
|
0
|
return 1 |
554
|
|
|
|
|
|
|
} |
555
|
|
|
|
|
|
|
# type => 'DetectIdentifier' |
556
|
0
|
0
|
|
|
|
0
|
if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { |
557
|
0
|
|
|
|
|
0
|
return 1 |
558
|
|
|
|
|
|
|
} |
559
|
|
|
|
|
|
|
# attribute => 'String' |
560
|
|
|
|
|
|
|
# char => '"' |
561
|
|
|
|
|
|
|
# context => 'String' |
562
|
|
|
|
|
|
|
# type => 'DetectChar' |
563
|
0
|
0
|
|
|
|
0
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { |
564
|
0
|
|
|
|
|
0
|
return 1 |
565
|
|
|
|
|
|
|
} |
566
|
|
|
|
|
|
|
# context => '##Doxygen' |
567
|
|
|
|
|
|
|
# type => 'IncludeRules' |
568
|
0
|
0
|
|
|
|
0
|
if ($self->includePlugin('Doxygen', $text)) { |
569
|
0
|
|
|
|
|
0
|
return 1 |
570
|
|
|
|
|
|
|
} |
571
|
|
|
|
|
|
|
# attribute => 'Comment' |
572
|
|
|
|
|
|
|
# char => '/' |
573
|
|
|
|
|
|
|
# char1 => '/' |
574
|
|
|
|
|
|
|
# context => 'Commentar 1' |
575
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
576
|
0
|
0
|
|
|
|
0
|
if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { |
577
|
0
|
|
|
|
|
0
|
return 1 |
578
|
|
|
|
|
|
|
} |
579
|
|
|
|
|
|
|
# attribute => 'Comment' |
580
|
|
|
|
|
|
|
# beginRegion => 'Comment' |
581
|
|
|
|
|
|
|
# char => '/' |
582
|
|
|
|
|
|
|
# char1 => '*' |
583
|
|
|
|
|
|
|
# context => 'Commentar 2' |
584
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
585
|
0
|
0
|
|
|
|
0
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { |
586
|
0
|
|
|
|
|
0
|
return 1 |
587
|
|
|
|
|
|
|
} |
588
|
|
|
|
|
|
|
# String => '#\s*if' |
589
|
|
|
|
|
|
|
# attribute => 'Comment' |
590
|
|
|
|
|
|
|
# beginRegion => 'Outscoped' |
591
|
|
|
|
|
|
|
# context => 'Outscoped intern' |
592
|
|
|
|
|
|
|
# firstNonSpace => 'true' |
593
|
|
|
|
|
|
|
# type => 'RegExpr' |
594
|
0
|
0
|
|
|
|
0
|
if ($self->testRegExpr($text, '#\\s*if', 0, 0, 0, undef, 1, 'Outscoped intern', 'Comment')) { |
595
|
0
|
|
|
|
|
0
|
return 1 |
596
|
|
|
|
|
|
|
} |
597
|
|
|
|
|
|
|
# String => '#\s*(endif|else|elif)' |
598
|
|
|
|
|
|
|
# attribute => 'Preprocessor' |
599
|
|
|
|
|
|
|
# context => '#pop' |
600
|
|
|
|
|
|
|
# endRegion => 'Outscoped' |
601
|
|
|
|
|
|
|
# firstNonSpace => 'true' |
602
|
|
|
|
|
|
|
# type => 'RegExpr' |
603
|
0
|
0
|
|
|
|
0
|
if ($self->testRegExpr($text, '#\\s*(endif|else|elif)', 0, 0, 0, undef, 1, '#pop', 'Preprocessor')) { |
604
|
0
|
|
|
|
|
0
|
return 1 |
605
|
|
|
|
|
|
|
} |
606
|
0
|
|
|
|
|
0
|
return 0; |
607
|
|
|
|
|
|
|
}; |
608
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
sub parseOutscopedintern { |
610
|
0
|
|
|
0
|
0
|
0
|
my ($self, $text) = @_; |
611
|
|
|
|
|
|
|
# type => 'DetectSpaces' |
612
|
0
|
0
|
|
|
|
0
|
if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { |
613
|
0
|
|
|
|
|
0
|
return 1 |
614
|
|
|
|
|
|
|
} |
615
|
|
|
|
|
|
|
# context => '##Alerts' |
616
|
|
|
|
|
|
|
# type => 'IncludeRules' |
617
|
0
|
0
|
|
|
|
0
|
if ($self->includePlugin('Alerts', $text)) { |
618
|
0
|
|
|
|
|
0
|
return 1 |
619
|
|
|
|
|
|
|
} |
620
|
|
|
|
|
|
|
# type => 'DetectIdentifier' |
621
|
0
|
0
|
|
|
|
0
|
if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { |
622
|
0
|
|
|
|
|
0
|
return 1 |
623
|
|
|
|
|
|
|
} |
624
|
|
|
|
|
|
|
# attribute => 'String' |
625
|
|
|
|
|
|
|
# char => '"' |
626
|
|
|
|
|
|
|
# context => 'String' |
627
|
|
|
|
|
|
|
# type => 'DetectChar' |
628
|
0
|
0
|
|
|
|
0
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { |
629
|
0
|
|
|
|
|
0
|
return 1 |
630
|
|
|
|
|
|
|
} |
631
|
|
|
|
|
|
|
# context => '##Doxygen' |
632
|
|
|
|
|
|
|
# type => 'IncludeRules' |
633
|
0
|
0
|
|
|
|
0
|
if ($self->includePlugin('Doxygen', $text)) { |
634
|
0
|
|
|
|
|
0
|
return 1 |
635
|
|
|
|
|
|
|
} |
636
|
|
|
|
|
|
|
# attribute => 'Comment' |
637
|
|
|
|
|
|
|
# char => '/' |
638
|
|
|
|
|
|
|
# char1 => '/' |
639
|
|
|
|
|
|
|
# context => 'Commentar 1' |
640
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
641
|
0
|
0
|
|
|
|
0
|
if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { |
642
|
0
|
|
|
|
|
0
|
return 1 |
643
|
|
|
|
|
|
|
} |
644
|
|
|
|
|
|
|
# attribute => 'Comment' |
645
|
|
|
|
|
|
|
# beginRegion => 'Comment' |
646
|
|
|
|
|
|
|
# char => '/' |
647
|
|
|
|
|
|
|
# char1 => '*' |
648
|
|
|
|
|
|
|
# context => 'Commentar 2' |
649
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
650
|
0
|
0
|
|
|
|
0
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { |
651
|
0
|
|
|
|
|
0
|
return 1 |
652
|
|
|
|
|
|
|
} |
653
|
|
|
|
|
|
|
# String => '#\s*if' |
654
|
|
|
|
|
|
|
# attribute => 'Comment' |
655
|
|
|
|
|
|
|
# beginRegion => 'Outscoped' |
656
|
|
|
|
|
|
|
# context => 'Outscoped intern' |
657
|
|
|
|
|
|
|
# firstNonSpace => 'true' |
658
|
|
|
|
|
|
|
# type => 'RegExpr' |
659
|
0
|
0
|
|
|
|
0
|
if ($self->testRegExpr($text, '#\\s*if', 0, 0, 0, undef, 1, 'Outscoped intern', 'Comment')) { |
660
|
0
|
|
|
|
|
0
|
return 1 |
661
|
|
|
|
|
|
|
} |
662
|
|
|
|
|
|
|
# String => '#\s*endif' |
663
|
|
|
|
|
|
|
# attribute => 'Comment' |
664
|
|
|
|
|
|
|
# context => '#pop' |
665
|
|
|
|
|
|
|
# endRegion => 'Outscoped' |
666
|
|
|
|
|
|
|
# firstNonSpace => 'true' |
667
|
|
|
|
|
|
|
# type => 'RegExpr' |
668
|
0
|
0
|
|
|
|
0
|
if ($self->testRegExpr($text, '#\\s*endif', 0, 0, 0, undef, 1, '#pop', 'Comment')) { |
669
|
0
|
|
|
|
|
0
|
return 1 |
670
|
|
|
|
|
|
|
} |
671
|
0
|
|
|
|
|
0
|
return 0; |
672
|
|
|
|
|
|
|
}; |
673
|
|
|
|
|
|
|
|
674
|
|
|
|
|
|
|
sub parsePreprocessor { |
675
|
166
|
|
|
166
|
0
|
317
|
my ($self, $text) = @_; |
676
|
|
|
|
|
|
|
# attribute => 'Preprocessor' |
677
|
|
|
|
|
|
|
# context => '#stay' |
678
|
|
|
|
|
|
|
# type => 'LineContinue' |
679
|
166
|
50
|
|
|
|
492
|
if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { |
680
|
0
|
|
|
|
|
0
|
return 1 |
681
|
|
|
|
|
|
|
} |
682
|
|
|
|
|
|
|
# String => 'define.*((?=\\))' |
683
|
|
|
|
|
|
|
# attribute => 'Preprocessor' |
684
|
|
|
|
|
|
|
# context => 'Define' |
685
|
|
|
|
|
|
|
# type => 'RegExpr' |
686
|
166
|
50
|
|
|
|
479
|
if ($self->testRegExpr($text, 'define.*((?=\\\\))', 0, 0, 0, undef, 0, 'Define', 'Preprocessor')) { |
687
|
0
|
|
|
|
|
0
|
return 1 |
688
|
|
|
|
|
|
|
} |
689
|
|
|
|
|
|
|
# String => 'define.*' |
690
|
|
|
|
|
|
|
# attribute => 'Preprocessor' |
691
|
|
|
|
|
|
|
# context => '#stay' |
692
|
|
|
|
|
|
|
# type => 'RegExpr' |
693
|
166
|
100
|
|
|
|
508
|
if ($self->testRegExpr($text, 'define.*', 0, 0, 0, undef, 0, '#stay', 'Preprocessor')) { |
694
|
4
|
|
|
|
|
12
|
return 1 |
695
|
|
|
|
|
|
|
} |
696
|
|
|
|
|
|
|
# attribute => 'Prep. Lib' |
697
|
|
|
|
|
|
|
# char => '"' |
698
|
|
|
|
|
|
|
# char1 => '"' |
699
|
|
|
|
|
|
|
# context => '#stay' |
700
|
|
|
|
|
|
|
# type => 'RangeDetect' |
701
|
162
|
100
|
|
|
|
512
|
if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { |
702
|
6
|
|
|
|
|
17
|
return 1 |
703
|
|
|
|
|
|
|
} |
704
|
|
|
|
|
|
|
# attribute => 'Prep. Lib' |
705
|
|
|
|
|
|
|
# char => '<' |
706
|
|
|
|
|
|
|
# char1 => '>' |
707
|
|
|
|
|
|
|
# context => '#stay' |
708
|
|
|
|
|
|
|
# type => 'RangeDetect' |
709
|
156
|
100
|
|
|
|
498
|
if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { |
710
|
12
|
|
|
|
|
42
|
return 1 |
711
|
|
|
|
|
|
|
} |
712
|
|
|
|
|
|
|
# context => '##Doxygen' |
713
|
|
|
|
|
|
|
# type => 'IncludeRules' |
714
|
144
|
50
|
|
|
|
424
|
if ($self->includePlugin('Doxygen', $text)) { |
715
|
0
|
|
|
|
|
0
|
return 1 |
716
|
|
|
|
|
|
|
} |
717
|
|
|
|
|
|
|
# attribute => 'Comment' |
718
|
|
|
|
|
|
|
# char => '/' |
719
|
|
|
|
|
|
|
# char1 => '/' |
720
|
|
|
|
|
|
|
# context => 'Commentar 1' |
721
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
722
|
144
|
50
|
|
|
|
456
|
if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { |
723
|
0
|
|
|
|
|
0
|
return 1 |
724
|
|
|
|
|
|
|
} |
725
|
|
|
|
|
|
|
# attribute => 'Comment' |
726
|
|
|
|
|
|
|
# char => '/' |
727
|
|
|
|
|
|
|
# char1 => '*' |
728
|
|
|
|
|
|
|
# context => 'Commentar/Preprocessor' |
729
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
730
|
144
|
50
|
|
|
|
364
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar/Preprocessor', 'Comment')) { |
731
|
0
|
|
|
|
|
0
|
return 1 |
732
|
|
|
|
|
|
|
} |
733
|
144
|
|
|
|
|
313
|
return 0; |
734
|
|
|
|
|
|
|
}; |
735
|
|
|
|
|
|
|
|
736
|
|
|
|
|
|
|
sub parseRegionMarker { |
737
|
282
|
|
|
282
|
0
|
496
|
my ($self, $text) = @_; |
738
|
282
|
|
|
|
|
550
|
return 0; |
739
|
|
|
|
|
|
|
}; |
740
|
|
|
|
|
|
|
|
741
|
|
|
|
|
|
|
sub parseString { |
742
|
322
|
|
|
322
|
0
|
553
|
my ($self, $text) = @_; |
743
|
|
|
|
|
|
|
# attribute => 'String' |
744
|
|
|
|
|
|
|
# context => '#stay' |
745
|
|
|
|
|
|
|
# type => 'LineContinue' |
746
|
322
|
50
|
|
|
|
850
|
if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { |
747
|
0
|
|
|
|
|
0
|
return 1 |
748
|
|
|
|
|
|
|
} |
749
|
|
|
|
|
|
|
# attribute => 'String Char' |
750
|
|
|
|
|
|
|
# context => '#stay' |
751
|
|
|
|
|
|
|
# type => 'HlCStringChar' |
752
|
322
|
100
|
|
|
|
845
|
if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { |
753
|
6
|
|
|
|
|
16
|
return 1 |
754
|
|
|
|
|
|
|
} |
755
|
|
|
|
|
|
|
# attribute => 'String' |
756
|
|
|
|
|
|
|
# char => '"' |
757
|
|
|
|
|
|
|
# context => '#pop' |
758
|
|
|
|
|
|
|
# type => 'DetectChar' |
759
|
316
|
100
|
|
|
|
782
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
760
|
32
|
|
|
|
|
102
|
return 1 |
761
|
|
|
|
|
|
|
} |
762
|
284
|
|
|
|
|
584
|
return 0; |
763
|
|
|
|
|
|
|
}; |
764
|
|
|
|
|
|
|
|
765
|
|
|
|
|
|
|
|
766
|
|
|
|
|
|
|
1; |
767
|
|
|
|
|
|
|
|
768
|
|
|
|
|
|
|
__END__ |