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 'css.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 2.00 |
9
|
|
|
|
|
|
|
#kate version 2.4 |
10
|
|
|
|
|
|
|
#kate author Wilbert Berendsen (wilbert@kde.nl) |
11
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:04 2008, localtime |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::CSS; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.07'; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
1252
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
44
|
|
18
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
19
|
1
|
|
|
1
|
|
7
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3118
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
22
|
2
|
|
|
2
|
0
|
894
|
my $proto = shift; |
23
|
2
|
|
33
|
|
|
20
|
my $class = ref($proto) || $proto; |
24
|
2
|
|
|
|
|
19
|
my $self = $class->SUPER::new(@_); |
25
|
2
|
|
|
|
|
43
|
$self->attributes({ |
26
|
|
|
|
|
|
|
'Alert' => 'Alert', |
27
|
|
|
|
|
|
|
'At Rule' => 'DecVal', |
28
|
|
|
|
|
|
|
'Comment' => 'Comment', |
29
|
|
|
|
|
|
|
'Error' => 'Error', |
30
|
|
|
|
|
|
|
'Important' => 'Keyword', |
31
|
|
|
|
|
|
|
'Media' => 'Others', |
32
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
33
|
|
|
|
|
|
|
'Property' => 'Keyword', |
34
|
|
|
|
|
|
|
'Region Marker' => 'RegionMarker', |
35
|
|
|
|
|
|
|
'Selector Attr' => 'Char', |
36
|
|
|
|
|
|
|
'Selector Class' => 'Float', |
37
|
|
|
|
|
|
|
'Selector Id' => 'BaseN', |
38
|
|
|
|
|
|
|
'Selector Pseudo' => 'DecVal', |
39
|
|
|
|
|
|
|
'String' => 'String', |
40
|
|
|
|
|
|
|
'Unknown Property' => 'Error', |
41
|
|
|
|
|
|
|
'Value' => 'DataType', |
42
|
|
|
|
|
|
|
}); |
43
|
2
|
|
|
|
|
18
|
$self->listAdd('colors', |
44
|
|
|
|
|
|
|
'ActiveBorder', |
45
|
|
|
|
|
|
|
'ActiveCaption', |
46
|
|
|
|
|
|
|
'AppWorkspace', |
47
|
|
|
|
|
|
|
'Background', |
48
|
|
|
|
|
|
|
'ButtonFace', |
49
|
|
|
|
|
|
|
'ButtonHighlight', |
50
|
|
|
|
|
|
|
'ButtonShadow', |
51
|
|
|
|
|
|
|
'ButtonText', |
52
|
|
|
|
|
|
|
'CaptionText', |
53
|
|
|
|
|
|
|
'GrayText', |
54
|
|
|
|
|
|
|
'Highlight', |
55
|
|
|
|
|
|
|
'HighlightText', |
56
|
|
|
|
|
|
|
'InactiveBorder', |
57
|
|
|
|
|
|
|
'InactiveCaption', |
58
|
|
|
|
|
|
|
'InactiveCaptionText', |
59
|
|
|
|
|
|
|
'InfoBackground', |
60
|
|
|
|
|
|
|
'InfoText', |
61
|
|
|
|
|
|
|
'Menu', |
62
|
|
|
|
|
|
|
'MenuText', |
63
|
|
|
|
|
|
|
'Scrollbar', |
64
|
|
|
|
|
|
|
'ThreeDDarkShadow', |
65
|
|
|
|
|
|
|
'ThreeDFace', |
66
|
|
|
|
|
|
|
'ThreeDHighlight', |
67
|
|
|
|
|
|
|
'ThreeDLightShadow', |
68
|
|
|
|
|
|
|
'ThreeDShadow', |
69
|
|
|
|
|
|
|
'Window', |
70
|
|
|
|
|
|
|
'WindowFrame', |
71
|
|
|
|
|
|
|
'WindowText', |
72
|
|
|
|
|
|
|
'aqua', |
73
|
|
|
|
|
|
|
'black', |
74
|
|
|
|
|
|
|
'blue', |
75
|
|
|
|
|
|
|
'fuchsia', |
76
|
|
|
|
|
|
|
'gray', |
77
|
|
|
|
|
|
|
'green', |
78
|
|
|
|
|
|
|
'lime', |
79
|
|
|
|
|
|
|
'maroon', |
80
|
|
|
|
|
|
|
'navy', |
81
|
|
|
|
|
|
|
'olive', |
82
|
|
|
|
|
|
|
'purple', |
83
|
|
|
|
|
|
|
'red', |
84
|
|
|
|
|
|
|
'silver', |
85
|
|
|
|
|
|
|
'teal', |
86
|
|
|
|
|
|
|
'white', |
87
|
|
|
|
|
|
|
'yellow', |
88
|
|
|
|
|
|
|
); |
89
|
2
|
|
|
|
|
8
|
$self->listAdd('mediatypes', |
90
|
|
|
|
|
|
|
'all', |
91
|
|
|
|
|
|
|
'aural', |
92
|
|
|
|
|
|
|
'braille', |
93
|
|
|
|
|
|
|
'embossed', |
94
|
|
|
|
|
|
|
'handheld', |
95
|
|
|
|
|
|
|
'print', |
96
|
|
|
|
|
|
|
'projection', |
97
|
|
|
|
|
|
|
'screen', |
98
|
|
|
|
|
|
|
'tty', |
99
|
|
|
|
|
|
|
'tv', |
100
|
|
|
|
|
|
|
); |
101
|
2
|
|
|
|
|
7
|
$self->listAdd('paren', |
102
|
|
|
|
|
|
|
'attr', |
103
|
|
|
|
|
|
|
'counter', |
104
|
|
|
|
|
|
|
'counters', |
105
|
|
|
|
|
|
|
'format', |
106
|
|
|
|
|
|
|
'local', |
107
|
|
|
|
|
|
|
'rect', |
108
|
|
|
|
|
|
|
'rgb', |
109
|
|
|
|
|
|
|
'url', |
110
|
|
|
|
|
|
|
); |
111
|
2
|
|
|
|
|
15
|
$self->listAdd('properties', |
112
|
|
|
|
|
|
|
'ascent', |
113
|
|
|
|
|
|
|
'azimuth', |
114
|
|
|
|
|
|
|
'background', |
115
|
|
|
|
|
|
|
'background-attachment', |
116
|
|
|
|
|
|
|
'background-color', |
117
|
|
|
|
|
|
|
'background-image', |
118
|
|
|
|
|
|
|
'background-position', |
119
|
|
|
|
|
|
|
'background-repeat', |
120
|
|
|
|
|
|
|
'baseline', |
121
|
|
|
|
|
|
|
'bbox', |
122
|
|
|
|
|
|
|
'border', |
123
|
|
|
|
|
|
|
'border-bottom', |
124
|
|
|
|
|
|
|
'border-bottom-color', |
125
|
|
|
|
|
|
|
'border-bottom-style', |
126
|
|
|
|
|
|
|
'border-bottom-width', |
127
|
|
|
|
|
|
|
'border-collapse', |
128
|
|
|
|
|
|
|
'border-color', |
129
|
|
|
|
|
|
|
'border-left', |
130
|
|
|
|
|
|
|
'border-left-color', |
131
|
|
|
|
|
|
|
'border-left-style', |
132
|
|
|
|
|
|
|
'border-left-width', |
133
|
|
|
|
|
|
|
'border-right', |
134
|
|
|
|
|
|
|
'border-right-color', |
135
|
|
|
|
|
|
|
'border-right-style', |
136
|
|
|
|
|
|
|
'border-right-width', |
137
|
|
|
|
|
|
|
'border-spacing', |
138
|
|
|
|
|
|
|
'border-style', |
139
|
|
|
|
|
|
|
'border-top', |
140
|
|
|
|
|
|
|
'border-top-color', |
141
|
|
|
|
|
|
|
'border-top-style', |
142
|
|
|
|
|
|
|
'border-top-width', |
143
|
|
|
|
|
|
|
'border-width', |
144
|
|
|
|
|
|
|
'bottom', |
145
|
|
|
|
|
|
|
'box-sizing', |
146
|
|
|
|
|
|
|
'cap-height', |
147
|
|
|
|
|
|
|
'caption-side', |
148
|
|
|
|
|
|
|
'centerline', |
149
|
|
|
|
|
|
|
'clear', |
150
|
|
|
|
|
|
|
'clip', |
151
|
|
|
|
|
|
|
'color', |
152
|
|
|
|
|
|
|
'content', |
153
|
|
|
|
|
|
|
'counter-increment', |
154
|
|
|
|
|
|
|
'counter-reset', |
155
|
|
|
|
|
|
|
'cue', |
156
|
|
|
|
|
|
|
'cue-after', |
157
|
|
|
|
|
|
|
'cue-before', |
158
|
|
|
|
|
|
|
'cursor', |
159
|
|
|
|
|
|
|
'definition-src', |
160
|
|
|
|
|
|
|
'descent', |
161
|
|
|
|
|
|
|
'direction', |
162
|
|
|
|
|
|
|
'display', |
163
|
|
|
|
|
|
|
'elevation', |
164
|
|
|
|
|
|
|
'empty-cells', |
165
|
|
|
|
|
|
|
'float', |
166
|
|
|
|
|
|
|
'font', |
167
|
|
|
|
|
|
|
'font-family', |
168
|
|
|
|
|
|
|
'font-family', |
169
|
|
|
|
|
|
|
'font-size', |
170
|
|
|
|
|
|
|
'font-size', |
171
|
|
|
|
|
|
|
'font-size-adjust', |
172
|
|
|
|
|
|
|
'font-stretch', |
173
|
|
|
|
|
|
|
'font-stretch', |
174
|
|
|
|
|
|
|
'font-style', |
175
|
|
|
|
|
|
|
'font-style', |
176
|
|
|
|
|
|
|
'font-variant', |
177
|
|
|
|
|
|
|
'font-variant', |
178
|
|
|
|
|
|
|
'font-weight', |
179
|
|
|
|
|
|
|
'font-weight', |
180
|
|
|
|
|
|
|
'height', |
181
|
|
|
|
|
|
|
'konq_bgpos_x', |
182
|
|
|
|
|
|
|
'konq_bgpos_y', |
183
|
|
|
|
|
|
|
'left', |
184
|
|
|
|
|
|
|
'letter-spacing', |
185
|
|
|
|
|
|
|
'line-height', |
186
|
|
|
|
|
|
|
'list-style', |
187
|
|
|
|
|
|
|
'list-style-image', |
188
|
|
|
|
|
|
|
'list-style-keyword', |
189
|
|
|
|
|
|
|
'list-style-position', |
190
|
|
|
|
|
|
|
'list-style-type', |
191
|
|
|
|
|
|
|
'margin', |
192
|
|
|
|
|
|
|
'margin-bottom', |
193
|
|
|
|
|
|
|
'margin-left', |
194
|
|
|
|
|
|
|
'margin-right', |
195
|
|
|
|
|
|
|
'margin-top', |
196
|
|
|
|
|
|
|
'marker-offset', |
197
|
|
|
|
|
|
|
'mathline', |
198
|
|
|
|
|
|
|
'max-height', |
199
|
|
|
|
|
|
|
'max-width', |
200
|
|
|
|
|
|
|
'min-height', |
201
|
|
|
|
|
|
|
'min-width', |
202
|
|
|
|
|
|
|
'opacity', |
203
|
|
|
|
|
|
|
'orphans', |
204
|
|
|
|
|
|
|
'outline', |
205
|
|
|
|
|
|
|
'outline-color', |
206
|
|
|
|
|
|
|
'outline-style', |
207
|
|
|
|
|
|
|
'outline-width', |
208
|
|
|
|
|
|
|
'overflow', |
209
|
|
|
|
|
|
|
'padding', |
210
|
|
|
|
|
|
|
'padding-bottom', |
211
|
|
|
|
|
|
|
'padding-left', |
212
|
|
|
|
|
|
|
'padding-right', |
213
|
|
|
|
|
|
|
'padding-top', |
214
|
|
|
|
|
|
|
'page', |
215
|
|
|
|
|
|
|
'page-break-after', |
216
|
|
|
|
|
|
|
'page-break-before', |
217
|
|
|
|
|
|
|
'page-break-inside', |
218
|
|
|
|
|
|
|
'panose-1', |
219
|
|
|
|
|
|
|
'pause', |
220
|
|
|
|
|
|
|
'pause-after', |
221
|
|
|
|
|
|
|
'pause-before', |
222
|
|
|
|
|
|
|
'pitch', |
223
|
|
|
|
|
|
|
'pitch-range', |
224
|
|
|
|
|
|
|
'play-during', |
225
|
|
|
|
|
|
|
'position', |
226
|
|
|
|
|
|
|
'quotes', |
227
|
|
|
|
|
|
|
'richness', |
228
|
|
|
|
|
|
|
'right', |
229
|
|
|
|
|
|
|
'size', |
230
|
|
|
|
|
|
|
'slope', |
231
|
|
|
|
|
|
|
'speak', |
232
|
|
|
|
|
|
|
'speak-header', |
233
|
|
|
|
|
|
|
'speak-numeral', |
234
|
|
|
|
|
|
|
'speak-punctuation', |
235
|
|
|
|
|
|
|
'speech-rate', |
236
|
|
|
|
|
|
|
'src', |
237
|
|
|
|
|
|
|
'stemh', |
238
|
|
|
|
|
|
|
'stemv', |
239
|
|
|
|
|
|
|
'stress', |
240
|
|
|
|
|
|
|
'table-layout', |
241
|
|
|
|
|
|
|
'text-align', |
242
|
|
|
|
|
|
|
'text-decoration', |
243
|
|
|
|
|
|
|
'text-decoration-color', |
244
|
|
|
|
|
|
|
'text-indent', |
245
|
|
|
|
|
|
|
'text-shadow', |
246
|
|
|
|
|
|
|
'text-shadow', |
247
|
|
|
|
|
|
|
'text-transform', |
248
|
|
|
|
|
|
|
'top', |
249
|
|
|
|
|
|
|
'topline', |
250
|
|
|
|
|
|
|
'unicode-bidi', |
251
|
|
|
|
|
|
|
'unicode-range', |
252
|
|
|
|
|
|
|
'units-per-em', |
253
|
|
|
|
|
|
|
'vertical-align', |
254
|
|
|
|
|
|
|
'visibility', |
255
|
|
|
|
|
|
|
'voice-family', |
256
|
|
|
|
|
|
|
'volume', |
257
|
|
|
|
|
|
|
'white-space', |
258
|
|
|
|
|
|
|
'widows', |
259
|
|
|
|
|
|
|
'width', |
260
|
|
|
|
|
|
|
'widths', |
261
|
|
|
|
|
|
|
'word-spacing', |
262
|
|
|
|
|
|
|
'x-height', |
263
|
|
|
|
|
|
|
'z-index', |
264
|
|
|
|
|
|
|
); |
265
|
2
|
|
|
|
|
9
|
$self->listAdd('pseudoclasses', |
266
|
|
|
|
|
|
|
'active', |
267
|
|
|
|
|
|
|
'after', |
268
|
|
|
|
|
|
|
'before', |
269
|
|
|
|
|
|
|
'checked', |
270
|
|
|
|
|
|
|
'disabled', |
271
|
|
|
|
|
|
|
'empty', |
272
|
|
|
|
|
|
|
'enabled', |
273
|
|
|
|
|
|
|
'first-child', |
274
|
|
|
|
|
|
|
'first-letter', |
275
|
|
|
|
|
|
|
'first-line', |
276
|
|
|
|
|
|
|
'first-of-type', |
277
|
|
|
|
|
|
|
'focus', |
278
|
|
|
|
|
|
|
'hover', |
279
|
|
|
|
|
|
|
'indeterminate', |
280
|
|
|
|
|
|
|
'last-child', |
281
|
|
|
|
|
|
|
'last-of-type', |
282
|
|
|
|
|
|
|
'link', |
283
|
|
|
|
|
|
|
'not', |
284
|
|
|
|
|
|
|
'nth-child', |
285
|
|
|
|
|
|
|
'nth-last-child', |
286
|
|
|
|
|
|
|
'nth-last-of-type', |
287
|
|
|
|
|
|
|
'nth-of-type', |
288
|
|
|
|
|
|
|
'only-child', |
289
|
|
|
|
|
|
|
'only-of-type', |
290
|
|
|
|
|
|
|
'root', |
291
|
|
|
|
|
|
|
'selection', |
292
|
|
|
|
|
|
|
'target', |
293
|
|
|
|
|
|
|
'visited', |
294
|
|
|
|
|
|
|
); |
295
|
2
|
|
|
|
|
19
|
$self->listAdd('types', |
296
|
|
|
|
|
|
|
'100', |
297
|
|
|
|
|
|
|
'200', |
298
|
|
|
|
|
|
|
'300', |
299
|
|
|
|
|
|
|
'400', |
300
|
|
|
|
|
|
|
'500', |
301
|
|
|
|
|
|
|
'600', |
302
|
|
|
|
|
|
|
'700', |
303
|
|
|
|
|
|
|
'800', |
304
|
|
|
|
|
|
|
'900', |
305
|
|
|
|
|
|
|
'above', |
306
|
|
|
|
|
|
|
'absolute', |
307
|
|
|
|
|
|
|
'always', |
308
|
|
|
|
|
|
|
'armenian', |
309
|
|
|
|
|
|
|
'auto', |
310
|
|
|
|
|
|
|
'avoid', |
311
|
|
|
|
|
|
|
'baseline', |
312
|
|
|
|
|
|
|
'below', |
313
|
|
|
|
|
|
|
'bidi-override', |
314
|
|
|
|
|
|
|
'blink', |
315
|
|
|
|
|
|
|
'block', |
316
|
|
|
|
|
|
|
'bold', |
317
|
|
|
|
|
|
|
'bolder', |
318
|
|
|
|
|
|
|
'border-box', |
319
|
|
|
|
|
|
|
'both', |
320
|
|
|
|
|
|
|
'bottom', |
321
|
|
|
|
|
|
|
'box', |
322
|
|
|
|
|
|
|
'break', |
323
|
|
|
|
|
|
|
'capitalize', |
324
|
|
|
|
|
|
|
'caption', |
325
|
|
|
|
|
|
|
'center', |
326
|
|
|
|
|
|
|
'circle', |
327
|
|
|
|
|
|
|
'cjk-ideographic', |
328
|
|
|
|
|
|
|
'close-quote', |
329
|
|
|
|
|
|
|
'collapse', |
330
|
|
|
|
|
|
|
'compact', |
331
|
|
|
|
|
|
|
'condensed', |
332
|
|
|
|
|
|
|
'content-box', |
333
|
|
|
|
|
|
|
'crop', |
334
|
|
|
|
|
|
|
'cross', |
335
|
|
|
|
|
|
|
'crosshair', |
336
|
|
|
|
|
|
|
'cursive', |
337
|
|
|
|
|
|
|
'dashed', |
338
|
|
|
|
|
|
|
'decimal', |
339
|
|
|
|
|
|
|
'decimal-leading-zero', |
340
|
|
|
|
|
|
|
'default', |
341
|
|
|
|
|
|
|
'disc', |
342
|
|
|
|
|
|
|
'dotted', |
343
|
|
|
|
|
|
|
'double', |
344
|
|
|
|
|
|
|
'e-resize', |
345
|
|
|
|
|
|
|
'embed', |
346
|
|
|
|
|
|
|
'expanded', |
347
|
|
|
|
|
|
|
'extra-condensed', |
348
|
|
|
|
|
|
|
'extra-expanded', |
349
|
|
|
|
|
|
|
'fantasy', |
350
|
|
|
|
|
|
|
'fixed', |
351
|
|
|
|
|
|
|
'georgian', |
352
|
|
|
|
|
|
|
'groove', |
353
|
|
|
|
|
|
|
'hand', |
354
|
|
|
|
|
|
|
'hebrew', |
355
|
|
|
|
|
|
|
'help', |
356
|
|
|
|
|
|
|
'hidden', |
357
|
|
|
|
|
|
|
'hide', |
358
|
|
|
|
|
|
|
'higher', |
359
|
|
|
|
|
|
|
'hiragana', |
360
|
|
|
|
|
|
|
'hiragana-iroha', |
361
|
|
|
|
|
|
|
'icon', |
362
|
|
|
|
|
|
|
'inherit', |
363
|
|
|
|
|
|
|
'inline', |
364
|
|
|
|
|
|
|
'inline-block', |
365
|
|
|
|
|
|
|
'inline-table', |
366
|
|
|
|
|
|
|
'inset', |
367
|
|
|
|
|
|
|
'inside', |
368
|
|
|
|
|
|
|
'invert', |
369
|
|
|
|
|
|
|
'italic', |
370
|
|
|
|
|
|
|
'justify', |
371
|
|
|
|
|
|
|
'katakana', |
372
|
|
|
|
|
|
|
'katakana-iroha', |
373
|
|
|
|
|
|
|
'konq-center', |
374
|
|
|
|
|
|
|
'landscape', |
375
|
|
|
|
|
|
|
'large', |
376
|
|
|
|
|
|
|
'larger', |
377
|
|
|
|
|
|
|
'left', |
378
|
|
|
|
|
|
|
'level', |
379
|
|
|
|
|
|
|
'light', |
380
|
|
|
|
|
|
|
'lighter', |
381
|
|
|
|
|
|
|
'line-through', |
382
|
|
|
|
|
|
|
'list-item', |
383
|
|
|
|
|
|
|
'loud', |
384
|
|
|
|
|
|
|
'lower', |
385
|
|
|
|
|
|
|
'lower-alpha', |
386
|
|
|
|
|
|
|
'lower-greek', |
387
|
|
|
|
|
|
|
'lower-latin', |
388
|
|
|
|
|
|
|
'lower-roman', |
389
|
|
|
|
|
|
|
'lowercase', |
390
|
|
|
|
|
|
|
'ltr', |
391
|
|
|
|
|
|
|
'marker', |
392
|
|
|
|
|
|
|
'medium', |
393
|
|
|
|
|
|
|
'menu', |
394
|
|
|
|
|
|
|
'message-box', |
395
|
|
|
|
|
|
|
'middle', |
396
|
|
|
|
|
|
|
'mix', |
397
|
|
|
|
|
|
|
'monospace', |
398
|
|
|
|
|
|
|
'move', |
399
|
|
|
|
|
|
|
'n-resize', |
400
|
|
|
|
|
|
|
'narrower', |
401
|
|
|
|
|
|
|
'ne-resize', |
402
|
|
|
|
|
|
|
'no-close-quote', |
403
|
|
|
|
|
|
|
'no-open-quote', |
404
|
|
|
|
|
|
|
'no-repeat', |
405
|
|
|
|
|
|
|
'none', |
406
|
|
|
|
|
|
|
'normal', |
407
|
|
|
|
|
|
|
'nowrap', |
408
|
|
|
|
|
|
|
'nw-resize', |
409
|
|
|
|
|
|
|
'oblique', |
410
|
|
|
|
|
|
|
'open-quote', |
411
|
|
|
|
|
|
|
'outset', |
412
|
|
|
|
|
|
|
'outside', |
413
|
|
|
|
|
|
|
'overline', |
414
|
|
|
|
|
|
|
'pointer', |
415
|
|
|
|
|
|
|
'portrait', |
416
|
|
|
|
|
|
|
'pre', |
417
|
|
|
|
|
|
|
'pre-line', |
418
|
|
|
|
|
|
|
'pre-wrap', |
419
|
|
|
|
|
|
|
'relative', |
420
|
|
|
|
|
|
|
'repeat', |
421
|
|
|
|
|
|
|
'repeat-x', |
422
|
|
|
|
|
|
|
'repeat-y', |
423
|
|
|
|
|
|
|
'ridge', |
424
|
|
|
|
|
|
|
'right', |
425
|
|
|
|
|
|
|
'rtl', |
426
|
|
|
|
|
|
|
'run-in', |
427
|
|
|
|
|
|
|
's-resize', |
428
|
|
|
|
|
|
|
'sans-serif', |
429
|
|
|
|
|
|
|
'scroll', |
430
|
|
|
|
|
|
|
'se-resize', |
431
|
|
|
|
|
|
|
'semi-condensed', |
432
|
|
|
|
|
|
|
'semi-expanded', |
433
|
|
|
|
|
|
|
'separate', |
434
|
|
|
|
|
|
|
'serif', |
435
|
|
|
|
|
|
|
'show', |
436
|
|
|
|
|
|
|
'small', |
437
|
|
|
|
|
|
|
'small-caps', |
438
|
|
|
|
|
|
|
'small-caption', |
439
|
|
|
|
|
|
|
'smaller', |
440
|
|
|
|
|
|
|
'solid', |
441
|
|
|
|
|
|
|
'square', |
442
|
|
|
|
|
|
|
'static', |
443
|
|
|
|
|
|
|
'static-position', |
444
|
|
|
|
|
|
|
'status-bar', |
445
|
|
|
|
|
|
|
'sub', |
446
|
|
|
|
|
|
|
'super', |
447
|
|
|
|
|
|
|
'sw-resize', |
448
|
|
|
|
|
|
|
'table', |
449
|
|
|
|
|
|
|
'table-caption', |
450
|
|
|
|
|
|
|
'table-cell', |
451
|
|
|
|
|
|
|
'table-column', |
452
|
|
|
|
|
|
|
'table-column-group', |
453
|
|
|
|
|
|
|
'table-footer-group', |
454
|
|
|
|
|
|
|
'table-header-group', |
455
|
|
|
|
|
|
|
'table-row', |
456
|
|
|
|
|
|
|
'table-row-group', |
457
|
|
|
|
|
|
|
'text', |
458
|
|
|
|
|
|
|
'text-bottom', |
459
|
|
|
|
|
|
|
'text-top', |
460
|
|
|
|
|
|
|
'thick', |
461
|
|
|
|
|
|
|
'thin', |
462
|
|
|
|
|
|
|
'top', |
463
|
|
|
|
|
|
|
'transparent', |
464
|
|
|
|
|
|
|
'ultra-condensed', |
465
|
|
|
|
|
|
|
'ultra-expanded', |
466
|
|
|
|
|
|
|
'underline', |
467
|
|
|
|
|
|
|
'upper-alpha', |
468
|
|
|
|
|
|
|
'upper-latin', |
469
|
|
|
|
|
|
|
'upper-roman', |
470
|
|
|
|
|
|
|
'uppercase', |
471
|
|
|
|
|
|
|
'visible', |
472
|
|
|
|
|
|
|
'w-resize', |
473
|
|
|
|
|
|
|
'wait', |
474
|
|
|
|
|
|
|
'wider', |
475
|
|
|
|
|
|
|
'x-large', |
476
|
|
|
|
|
|
|
'x-small', |
477
|
|
|
|
|
|
|
'xx-large', |
478
|
|
|
|
|
|
|
'xx-small', |
479
|
|
|
|
|
|
|
); |
480
|
2
|
|
|
|
|
103
|
$self->contextdata({ |
481
|
|
|
|
|
|
|
'Base' => { |
482
|
|
|
|
|
|
|
callback => \&parseBase, |
483
|
|
|
|
|
|
|
attribute => 'Normal Text', |
484
|
|
|
|
|
|
|
}, |
485
|
|
|
|
|
|
|
'Comment' => { |
486
|
|
|
|
|
|
|
callback => \&parseComment, |
487
|
|
|
|
|
|
|
attribute => 'Comment', |
488
|
|
|
|
|
|
|
}, |
489
|
|
|
|
|
|
|
'FindComments' => { |
490
|
|
|
|
|
|
|
callback => \&parseFindComments, |
491
|
|
|
|
|
|
|
attribute => 'Normal Text', |
492
|
|
|
|
|
|
|
}, |
493
|
|
|
|
|
|
|
'FindRuleSets' => { |
494
|
|
|
|
|
|
|
callback => \&parseFindRuleSets, |
495
|
|
|
|
|
|
|
attribute => 'Normal Text', |
496
|
|
|
|
|
|
|
}, |
497
|
|
|
|
|
|
|
'FindStrings' => { |
498
|
|
|
|
|
|
|
callback => \&parseFindStrings, |
499
|
|
|
|
|
|
|
attribute => 'Normal Text', |
500
|
|
|
|
|
|
|
}, |
501
|
|
|
|
|
|
|
'FindValues' => { |
502
|
|
|
|
|
|
|
callback => \&parseFindValues, |
503
|
|
|
|
|
|
|
attribute => 'Normal Text', |
504
|
|
|
|
|
|
|
}, |
505
|
|
|
|
|
|
|
'Import' => { |
506
|
|
|
|
|
|
|
callback => \&parseImport, |
507
|
|
|
|
|
|
|
attribute => 'Normal Text', |
508
|
|
|
|
|
|
|
}, |
509
|
|
|
|
|
|
|
'InsideString' => { |
510
|
|
|
|
|
|
|
callback => \&parseInsideString, |
511
|
|
|
|
|
|
|
attribute => 'String', |
512
|
|
|
|
|
|
|
}, |
513
|
|
|
|
|
|
|
'Media' => { |
514
|
|
|
|
|
|
|
callback => \&parseMedia, |
515
|
|
|
|
|
|
|
attribute => 'Normal Text', |
516
|
|
|
|
|
|
|
}, |
517
|
|
|
|
|
|
|
'Media2' => { |
518
|
|
|
|
|
|
|
callback => \&parseMedia2, |
519
|
|
|
|
|
|
|
attribute => 'Normal Text', |
520
|
|
|
|
|
|
|
}, |
521
|
|
|
|
|
|
|
'PropParen' => { |
522
|
|
|
|
|
|
|
callback => \&parsePropParen, |
523
|
|
|
|
|
|
|
attribute => 'Normal Text', |
524
|
|
|
|
|
|
|
}, |
525
|
|
|
|
|
|
|
'PropParen2' => { |
526
|
|
|
|
|
|
|
callback => \&parsePropParen2, |
527
|
|
|
|
|
|
|
attribute => 'Normal Text', |
528
|
|
|
|
|
|
|
}, |
529
|
|
|
|
|
|
|
'Rule' => { |
530
|
|
|
|
|
|
|
callback => \&parseRule, |
531
|
|
|
|
|
|
|
attribute => 'Normal Text', |
532
|
|
|
|
|
|
|
}, |
533
|
|
|
|
|
|
|
'Rule2' => { |
534
|
|
|
|
|
|
|
callback => \&parseRule2, |
535
|
|
|
|
|
|
|
attribute => 'Normal Text', |
536
|
|
|
|
|
|
|
}, |
537
|
|
|
|
|
|
|
'RuleSet' => { |
538
|
|
|
|
|
|
|
callback => \&parseRuleSet, |
539
|
|
|
|
|
|
|
attribute => 'Normal Text', |
540
|
|
|
|
|
|
|
}, |
541
|
|
|
|
|
|
|
'SelAttr' => { |
542
|
|
|
|
|
|
|
callback => \&parseSelAttr, |
543
|
|
|
|
|
|
|
attribute => 'Selector Attr', |
544
|
|
|
|
|
|
|
}, |
545
|
|
|
|
|
|
|
'SelPseudo' => { |
546
|
|
|
|
|
|
|
callback => \&parseSelPseudo, |
547
|
|
|
|
|
|
|
attribute => 'Selector Pseudo', |
548
|
|
|
|
|
|
|
lineending => '#pop', |
549
|
|
|
|
|
|
|
fallthrough => '#pop', |
550
|
|
|
|
|
|
|
}, |
551
|
|
|
|
|
|
|
'StringDQ' => { |
552
|
|
|
|
|
|
|
callback => \&parseStringDQ, |
553
|
|
|
|
|
|
|
attribute => 'String', |
554
|
|
|
|
|
|
|
}, |
555
|
|
|
|
|
|
|
'StringSQ' => { |
556
|
|
|
|
|
|
|
callback => \&parseStringSQ, |
557
|
|
|
|
|
|
|
attribute => 'String', |
558
|
|
|
|
|
|
|
}, |
559
|
|
|
|
|
|
|
}); |
560
|
2
|
|
|
|
|
17
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|<|=|>|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|-|\\%'); |
561
|
2
|
|
|
|
|
9
|
$self->basecontext('Base'); |
562
|
2
|
|
|
|
|
14
|
$self->keywordscase(0); |
563
|
2
|
|
|
|
|
8
|
$self->initialize; |
564
|
2
|
|
|
|
|
8
|
bless ($self, $class); |
565
|
2
|
|
|
|
|
13
|
return $self; |
566
|
|
|
|
|
|
|
} |
567
|
|
|
|
|
|
|
|
568
|
|
|
|
|
|
|
sub language { |
569
|
0
|
|
|
0
|
0
|
0
|
return 'CSS'; |
570
|
|
|
|
|
|
|
} |
571
|
|
|
|
|
|
|
|
572
|
|
|
|
|
|
|
sub parseBase { |
573
|
60
|
|
|
60
|
0
|
104
|
my ($self, $text) = @_; |
574
|
|
|
|
|
|
|
# type => 'LineContinue' |
575
|
60
|
50
|
|
|
|
259
|
if ($self->testLineContinue($text, 0, undef, 0, '#stay', undef)) { |
576
|
0
|
|
|
|
|
0
|
return 1 |
577
|
|
|
|
|
|
|
} |
578
|
|
|
|
|
|
|
# type => 'DetectSpaces' |
579
|
60
|
50
|
|
|
|
519
|
if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { |
580
|
0
|
|
|
|
|
0
|
return 1 |
581
|
|
|
|
|
|
|
} |
582
|
|
|
|
|
|
|
# context => 'FindRuleSets' |
583
|
|
|
|
|
|
|
# type => 'IncludeRules' |
584
|
60
|
100
|
|
|
|
271
|
if ($self->includeRules('FindRuleSets', $text)) { |
585
|
30
|
|
|
|
|
97
|
return 1 |
586
|
|
|
|
|
|
|
} |
587
|
30
|
|
|
|
|
87
|
return 0; |
588
|
|
|
|
|
|
|
}; |
589
|
|
|
|
|
|
|
|
590
|
|
|
|
|
|
|
sub parseComment { |
591
|
144
|
|
|
144
|
0
|
380
|
my ($self, $text) = @_; |
592
|
|
|
|
|
|
|
# type => 'DetectSpaces' |
593
|
144
|
100
|
|
|
|
455
|
if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { |
594
|
6
|
|
|
|
|
18
|
return 1 |
595
|
|
|
|
|
|
|
} |
596
|
|
|
|
|
|
|
# attribute => 'Comment' |
597
|
|
|
|
|
|
|
# char => '*' |
598
|
|
|
|
|
|
|
# char1 => '/' |
599
|
|
|
|
|
|
|
# context => '#pop' |
600
|
|
|
|
|
|
|
# endRegion => 'comment' |
601
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
602
|
138
|
100
|
|
|
|
464
|
if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { |
603
|
8
|
|
|
|
|
30
|
return 1 |
604
|
|
|
|
|
|
|
} |
605
|
|
|
|
|
|
|
# context => '##Alerts' |
606
|
|
|
|
|
|
|
# type => 'IncludeRules' |
607
|
130
|
100
|
|
|
|
447
|
if ($self->includePlugin('Alerts', $text)) { |
608
|
2
|
|
|
|
|
9
|
return 1 |
609
|
|
|
|
|
|
|
} |
610
|
|
|
|
|
|
|
# type => 'DetectIdentifier' |
611
|
128
|
100
|
|
|
|
441
|
if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { |
612
|
44
|
|
|
|
|
166
|
return 1 |
613
|
|
|
|
|
|
|
} |
614
|
84
|
|
|
|
|
444
|
return 0; |
615
|
|
|
|
|
|
|
}; |
616
|
|
|
|
|
|
|
|
617
|
|
|
|
|
|
|
sub parseFindComments { |
618
|
206
|
|
|
206
|
0
|
352
|
my ($self, $text) = @_; |
619
|
|
|
|
|
|
|
# String => '/\*BEGIN.*\*/' |
620
|
|
|
|
|
|
|
# attribute => 'Region Marker' |
621
|
|
|
|
|
|
|
# beginRegion => 'UserDefined' |
622
|
|
|
|
|
|
|
# context => '#stay' |
623
|
|
|
|
|
|
|
# type => 'RegExpr' |
624
|
206
|
50
|
|
|
|
748
|
if ($self->testRegExpr($text, '/\\*BEGIN.*\\*/', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { |
625
|
0
|
|
|
|
|
0
|
return 1 |
626
|
|
|
|
|
|
|
} |
627
|
|
|
|
|
|
|
# String => '/\*END.*\*/' |
628
|
|
|
|
|
|
|
# attribute => 'Region Marker' |
629
|
|
|
|
|
|
|
# context => '#stay' |
630
|
|
|
|
|
|
|
# endRegion => 'UserDefined' |
631
|
|
|
|
|
|
|
# type => 'RegExpr' |
632
|
206
|
50
|
|
|
|
758
|
if ($self->testRegExpr($text, '/\\*END.*\\*/', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { |
633
|
0
|
|
|
|
|
0
|
return 1 |
634
|
|
|
|
|
|
|
} |
635
|
|
|
|
|
|
|
# attribute => 'Comment' |
636
|
|
|
|
|
|
|
# beginRegion => 'comment' |
637
|
|
|
|
|
|
|
# char => '/' |
638
|
|
|
|
|
|
|
# char1 => '*' |
639
|
|
|
|
|
|
|
# context => 'Comment' |
640
|
|
|
|
|
|
|
# type => 'Detect2Chars' |
641
|
206
|
100
|
|
|
|
1590
|
if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { |
642
|
8
|
|
|
|
|
37
|
return 1 |
643
|
|
|
|
|
|
|
} |
644
|
198
|
|
|
|
|
784
|
return 0; |
645
|
|
|
|
|
|
|
}; |
646
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
sub parseFindRuleSets { |
648
|
68
|
|
|
68
|
0
|
116
|
my ($self, $text) = @_; |
649
|
|
|
|
|
|
|
# String => '@media\b' |
650
|
|
|
|
|
|
|
# attribute => 'Media' |
651
|
|
|
|
|
|
|
# context => 'Media' |
652
|
|
|
|
|
|
|
# type => 'RegExpr' |
653
|
68
|
100
|
|
|
|
295
|
if ($self->testRegExpr($text, '@media\\b', 0, 0, 0, undef, 0, 'Media', 'Media')) { |
654
|
2
|
|
|
|
|
11
|
return 1 |
655
|
|
|
|
|
|
|
} |
656
|
|
|
|
|
|
|
# String => '@import\b' |
657
|
|
|
|
|
|
|
# attribute => 'At Rule' |
658
|
|
|
|
|
|
|
# context => 'Import' |
659
|
|
|
|
|
|
|
# type => 'RegExpr' |
660
|
66
|
100
|
|
|
|
248
|
if ($self->testRegExpr($text, '@import\\b', 0, 0, 0, undef, 0, 'Import', 'At Rule')) { |
661
|
2
|
|
|
|
|
12
|
return 1 |
662
|
|
|
|
|
|
|
} |
663
|
|
|
|
|
|
|
# String => '@(font-face|charset)\b' |
664
|
|
|
|
|
|
|
# attribute => 'At Rule' |
665
|
|
|
|
|
|
|
# context => '#stay' |
666
|
|
|
|
|
|
|
# type => 'RegExpr' |
667
|
64
|
50
|
|
|
|
253
|
if ($self->testRegExpr($text, '@(font-face|charset)\\b', 0, 0, 0, undef, 0, '#stay', 'At Rule')) { |
668
|
0
|
|
|
|
|
0
|
return 1 |
669
|
|
|
|
|
|
|
} |
670
|
|
|
|
|
|
|
# attribute => 'Property' |
671
|
|
|
|
|
|
|
# beginRegion => 'ruleset' |
672
|
|
|
|
|
|
|
# char => '{' |
673
|
|
|
|
|
|
|
# context => 'RuleSet' |
674
|
|
|
|
|
|
|
# type => 'DetectChar' |
675
|
64
|
100
|
|
|
|
251
|
if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'RuleSet', 'Property')) { |
676
|
10
|
|
|
|
|
43
|
return 1 |
677
|
|
|
|
|
|
|
} |
678
|
|
|
|
|
|
|
# attribute => 'Selector Attr' |
679
|
|
|
|
|
|
|
# char => '[' |
680
|
|
|
|
|
|
|
# context => 'SelAttr' |
681
|
|
|
|
|
|
|
# type => 'DetectChar' |
682
|
54
|
100
|
|
|
|
168
|
if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'SelAttr', 'Selector Attr')) { |
683
|
2
|
|
|
|
|
10
|
return 1 |
684
|
|
|
|
|
|
|
} |
685
|
|
|
|
|
|
|
# String => '#[A-Za-z0-9][\w\-]*' |
686
|
|
|
|
|
|
|
# attribute => 'Selector Id' |
687
|
|
|
|
|
|
|
# context => '#stay' |
688
|
|
|
|
|
|
|
# type => 'RegExpr' |
689
|
52
|
100
|
|
|
|
183
|
if ($self->testRegExpr($text, '#[A-Za-z0-9][\\w\\-]*', 0, 0, 0, undef, 0, '#stay', 'Selector Id')) { |
690
|
4
|
|
|
|
|
20
|
return 1 |
691
|
|
|
|
|
|
|
} |
692
|
|
|
|
|
|
|
# String => '\.[A-Za-z0-9][\w\-]*' |
693
|
|
|
|
|
|
|
# attribute => 'Selector Class' |
694
|
|
|
|
|
|
|
# context => '#stay' |
695
|
|
|
|
|
|
|
# type => 'RegExpr' |
696
|
48
|
100
|
|
|
|
177
|
if ($self->testRegExpr($text, '\\.[A-Za-z0-9][\\w\\-]*', 0, 0, 0, undef, 0, '#stay', 'Selector Class')) { |
697
|
4
|
|
|
|
|
22
|
return 1 |
698
|
|
|
|
|
|
|
} |
699
|
|
|
|
|
|
|
# String => ':lang\([\w_-]+\)' |
700
|
|
|
|
|
|
|
# attribute => 'Selector Pseudo' |
701
|
|
|
|
|
|
|
# context => '#stay' |
702
|
|
|
|
|
|
|
# type => 'RegExpr' |
703
|
44
|
100
|
|
|
|
154
|
if ($self->testRegExpr($text, ':lang\\([\\w_-]+\\)', 0, 0, 0, undef, 0, '#stay', 'Selector Pseudo')) { |
704
|
2
|
|
|
|
|
38
|
return 1 |
705
|
|
|
|
|
|
|
} |
706
|
|
|
|
|
|
|
# attribute => 'Selector Pseudo' |
707
|
|
|
|
|
|
|
# char => ':' |
708
|
|
|
|
|
|
|
# context => 'SelPseudo' |
709
|
|
|
|
|
|
|
# type => 'DetectChar' |
710
|
42
|
100
|
|
|
|
141
|
if ($self->testDetectChar($text, ':', 0, 0, 0, undef, 0, 'SelPseudo', 'Selector Pseudo')) { |
711
|
4
|
|
|
|
|
16
|
return 1 |
712
|
|
|
|
|
|
|
} |
713
|
|
|
|
|
|
|
# context => 'FindStrings' |
714
|
|
|
|
|
|
|
# type => 'IncludeRules' |
715
|
38
|
50
|
|
|
|
163
|
if ($self->includeRules('FindStrings', $text)) { |
716
|
0
|
|
|
|
|
0
|
return 1 |
717
|
|
|
|
|
|
|
} |
718
|
|
|
|
|
|
|
# context => 'FindComments' |
719
|
|
|
|
|
|
|
# type => 'IncludeRules' |
720
|
38
|
100
|
|
|
|
121
|
if ($self->includeRules('FindComments', $text)) { |
721
|
4
|
|
|
|
|
18
|
return 1 |
722
|
|
|
|
|
|
|
} |
723
|
34
|
|
|
|
|
110
|
return 0; |
724
|
|
|
|
|
|
|
}; |
725
|
|
|
|
|
|
|
|
726
|
|
|
|
|
|
|
sub parseFindStrings { |
727
|
102
|
|
|
102
|
0
|
176
|
my ($self, $text) = @_; |
728
|
|
|
|
|
|
|
# attribute => 'String' |
729
|
|
|
|
|
|
|
# char => '"' |
730
|
|
|
|
|
|
|
# context => 'StringDQ' |
731
|
|
|
|
|
|
|
# type => 'DetectChar' |
732
|
102
|
100
|
|
|
|
383
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'StringDQ', 'String')) { |
733
|
6
|
|
|
|
|
22
|
return 1 |
734
|
|
|
|
|
|
|
} |
735
|
|
|
|
|
|
|
# attribute => 'String' |
736
|
|
|
|
|
|
|
# char => ''' |
737
|
|
|
|
|
|
|
# context => 'StringSQ' |
738
|
|
|
|
|
|
|
# type => 'DetectChar' |
739
|
96
|
50
|
|
|
|
331
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'StringSQ', 'String')) { |
740
|
0
|
|
|
|
|
0
|
return 1 |
741
|
|
|
|
|
|
|
} |
742
|
96
|
|
|
|
|
385
|
return 0; |
743
|
|
|
|
|
|
|
}; |
744
|
|
|
|
|
|
|
|
745
|
|
|
|
|
|
|
sub parseFindValues { |
746
|
72
|
|
|
72
|
0
|
132
|
my ($self, $text) = @_; |
747
|
|
|
|
|
|
|
# String => '[-+]?[0-9.]+(em|ex|px|in|cm|mm|pt|pc|deg|rad|grad|ms|s|Hz|kHz)\b' |
748
|
|
|
|
|
|
|
# attribute => 'Value' |
749
|
|
|
|
|
|
|
# context => '#stay' |
750
|
|
|
|
|
|
|
# type => 'RegExpr' |
751
|
72
|
100
|
|
|
|
313
|
if ($self->testRegExpr($text, '[-+]?[0-9.]+(em|ex|px|in|cm|mm|pt|pc|deg|rad|grad|ms|s|Hz|kHz)\\b', 0, 0, 0, undef, 0, '#stay', 'Value')) { |
752
|
16
|
|
|
|
|
65
|
return 1 |
753
|
|
|
|
|
|
|
} |
754
|
|
|
|
|
|
|
# String => '[-+]?[0-9.]+[%]?' |
755
|
|
|
|
|
|
|
# attribute => 'Value' |
756
|
|
|
|
|
|
|
# context => '#stay' |
757
|
|
|
|
|
|
|
# type => 'RegExpr' |
758
|
56
|
50
|
|
|
|
280
|
if ($self->testRegExpr($text, '[-+]?[0-9.]+[%]?', 0, 0, 0, undef, 0, '#stay', 'Value')) { |
759
|
0
|
|
|
|
|
0
|
return 1 |
760
|
|
|
|
|
|
|
} |
761
|
|
|
|
|
|
|
# String => '[\w\-]+' |
762
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
763
|
|
|
|
|
|
|
# context => '#stay' |
764
|
|
|
|
|
|
|
# type => 'RegExpr' |
765
|
56
|
100
|
|
|
|
240
|
if ($self->testRegExpr($text, '[\\w\\-]+', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { |
766
|
6
|
|
|
|
|
40
|
return 1 |
767
|
|
|
|
|
|
|
} |
768
|
50
|
|
|
|
|
246
|
return 0; |
769
|
|
|
|
|
|
|
}; |
770
|
|
|
|
|
|
|
|
771
|
|
|
|
|
|
|
sub parseImport { |
772
|
22
|
|
|
22
|
0
|
33
|
my ($self, $text) = @_; |
773
|
|
|
|
|
|
|
# attribute => 'At Rule' |
774
|
|
|
|
|
|
|
# char => ';' |
775
|
|
|
|
|
|
|
# context => '#pop' |
776
|
|
|
|
|
|
|
# type => 'DetectChar' |
777
|
22
|
100
|
|
|
|
91
|
if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'At Rule')) { |
778
|
2
|
|
|
|
|
7
|
return 1 |
779
|
|
|
|
|
|
|
} |
780
|
|
|
|
|
|
|
# String => 'mediatypes' |
781
|
|
|
|
|
|
|
# attribute => 'Media' |
782
|
|
|
|
|
|
|
# context => '#stay' |
783
|
|
|
|
|
|
|
# type => 'keyword' |
784
|
20
|
100
|
|
|
|
80
|
if ($self->testKeyword($text, 'mediatypes', 0, undef, 0, '#stay', 'Media')) { |
785
|
4
|
|
|
|
|
12
|
return 1 |
786
|
|
|
|
|
|
|
} |
787
|
|
|
|
|
|
|
# context => 'FindValues' |
788
|
|
|
|
|
|
|
# type => 'IncludeRules' |
789
|
16
|
100
|
|
|
|
53
|
if ($self->includeRules('FindValues', $text)) { |
790
|
2
|
|
|
|
|
10
|
return 1 |
791
|
|
|
|
|
|
|
} |
792
|
|
|
|
|
|
|
# context => 'FindStrings' |
793
|
|
|
|
|
|
|
# type => 'IncludeRules' |
794
|
14
|
100
|
|
|
|
56
|
if ($self->includeRules('FindStrings', $text)) { |
795
|
2
|
|
|
|
|
6
|
return 1 |
796
|
|
|
|
|
|
|
} |
797
|
|
|
|
|
|
|
# context => 'FindComments' |
798
|
|
|
|
|
|
|
# type => 'IncludeRules' |
799
|
12
|
50
|
|
|
|
46
|
if ($self->includeRules('FindComments', $text)) { |
800
|
0
|
|
|
|
|
0
|
return 1 |
801
|
|
|
|
|
|
|
} |
802
|
12
|
|
|
|
|
31
|
return 0; |
803
|
|
|
|
|
|
|
}; |
804
|
|
|
|
|
|
|
|
805
|
|
|
|
|
|
|
sub parseInsideString { |
806
|
18
|
|
|
18
|
0
|
28
|
my ($self, $text) = @_; |
807
|
|
|
|
|
|
|
# String => '\\["']' |
808
|
|
|
|
|
|
|
# attribute => 'String' |
809
|
|
|
|
|
|
|
# context => '#stay' |
810
|
|
|
|
|
|
|
# type => 'RegExpr' |
811
|
18
|
50
|
|
|
|
60
|
if ($self->testRegExpr($text, '\\\\["\']', 0, 0, 0, undef, 0, '#stay', 'String')) { |
812
|
0
|
|
|
|
|
0
|
return 1 |
813
|
|
|
|
|
|
|
} |
814
|
|
|
|
|
|
|
# type => 'DetectIdentifier' |
815
|
18
|
100
|
|
|
|
78
|
if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { |
816
|
12
|
|
|
|
|
37
|
return 1 |
817
|
|
|
|
|
|
|
} |
818
|
6
|
|
|
|
|
18
|
return 0; |
819
|
|
|
|
|
|
|
}; |
820
|
|
|
|
|
|
|
|
821
|
|
|
|
|
|
|
sub parseMedia { |
822
|
8
|
|
|
8
|
0
|
14
|
my ($self, $text) = @_; |
823
|
|
|
|
|
|
|
# attribute => 'Media' |
824
|
|
|
|
|
|
|
# beginRegion => 'media' |
825
|
|
|
|
|
|
|
# char => '{' |
826
|
|
|
|
|
|
|
# context => 'Media2' |
827
|
|
|
|
|
|
|
# type => 'DetectChar' |
828
|
8
|
100
|
|
|
|
87
|
if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Media2', 'Media')) { |
829
|
2
|
|
|
|
|
7
|
return 1 |
830
|
|
|
|
|
|
|
} |
831
|
|
|
|
|
|
|
# String => 'mediatypes' |
832
|
|
|
|
|
|
|
# attribute => 'Media' |
833
|
|
|
|
|
|
|
# context => '#stay' |
834
|
|
|
|
|
|
|
# type => 'keyword' |
835
|
6
|
100
|
|
|
|
27
|
if ($self->testKeyword($text, 'mediatypes', 0, undef, 0, '#stay', 'Media')) { |
836
|
2
|
|
|
|
|
6
|
return 1 |
837
|
|
|
|
|
|
|
} |
838
|
|
|
|
|
|
|
# attribute => 'Media' |
839
|
|
|
|
|
|
|
# char => ',' |
840
|
|
|
|
|
|
|
# context => '#stay' |
841
|
|
|
|
|
|
|
# type => 'DetectChar' |
842
|
4
|
50
|
|
|
|
17
|
if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '#stay', 'Media')) { |
843
|
0
|
|
|
|
|
0
|
return 1 |
844
|
|
|
|
|
|
|
} |
845
|
|
|
|
|
|
|
# context => 'FindComments' |
846
|
|
|
|
|
|
|
# type => 'IncludeRules' |
847
|
4
|
50
|
|
|
|
17
|
if ($self->includeRules('FindComments', $text)) { |
848
|
0
|
|
|
|
|
0
|
return 1 |
849
|
|
|
|
|
|
|
} |
850
|
|
|
|
|
|
|
# String => '\S+' |
851
|
|
|
|
|
|
|
# attribute => 'Error' |
852
|
|
|
|
|
|
|
# context => '#stay' |
853
|
|
|
|
|
|
|
# type => 'RegExpr' |
854
|
4
|
50
|
|
|
|
20
|
if ($self->testRegExpr($text, '\\S+', 0, 0, 0, undef, 0, '#stay', 'Error')) { |
855
|
0
|
|
|
|
|
0
|
return 1 |
856
|
|
|
|
|
|
|
} |
857
|
4
|
|
|
|
|
12
|
return 0; |
858
|
|
|
|
|
|
|
}; |
859
|
|
|
|
|
|
|
|
860
|
|
|
|
|
|
|
sub parseMedia2 { |
861
|
10
|
|
|
10
|
0
|
21
|
my ($self, $text) = @_; |
862
|
|
|
|
|
|
|
# attribute => 'Media' |
863
|
|
|
|
|
|
|
# char => '}' |
864
|
|
|
|
|
|
|
# context => '#pop#pop' |
865
|
|
|
|
|
|
|
# endRegion => 'media' |
866
|
|
|
|
|
|
|
# type => 'DetectChar' |
867
|
10
|
100
|
|
|
|
37
|
if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop', 'Media')) { |
868
|
2
|
|
|
|
|
7
|
return 1 |
869
|
|
|
|
|
|
|
} |
870
|
|
|
|
|
|
|
# context => 'FindRuleSets' |
871
|
|
|
|
|
|
|
# type => 'IncludeRules' |
872
|
8
|
100
|
|
|
|
34
|
if ($self->includeRules('FindRuleSets', $text)) { |
873
|
4
|
|
|
|
|
11
|
return 1 |
874
|
|
|
|
|
|
|
} |
875
|
4
|
|
|
|
|
11
|
return 0; |
876
|
|
|
|
|
|
|
}; |
877
|
|
|
|
|
|
|
|
878
|
|
|
|
|
|
|
sub parsePropParen { |
879
|
0
|
|
|
0
|
0
|
0
|
my ($self, $text) = @_; |
880
|
|
|
|
|
|
|
# attribute => 'Value' |
881
|
|
|
|
|
|
|
# char => '(' |
882
|
|
|
|
|
|
|
# context => 'PropParen2' |
883
|
|
|
|
|
|
|
# type => 'DetectChar' |
884
|
0
|
0
|
|
|
|
0
|
if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'PropParen2', 'Value')) { |
885
|
0
|
|
|
|
|
0
|
return 1 |
886
|
|
|
|
|
|
|
} |
887
|
|
|
|
|
|
|
# context => 'FindComments' |
888
|
|
|
|
|
|
|
# type => 'IncludeRules' |
889
|
0
|
0
|
|
|
|
0
|
if ($self->includeRules('FindComments', $text)) { |
890
|
0
|
|
|
|
|
0
|
return 1 |
891
|
|
|
|
|
|
|
} |
892
|
|
|
|
|
|
|
# String => '\S' |
893
|
|
|
|
|
|
|
# attribute => 'Error' |
894
|
|
|
|
|
|
|
# context => '#stay' |
895
|
|
|
|
|
|
|
# type => 'RegExpr' |
896
|
0
|
0
|
|
|
|
0
|
if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { |
897
|
0
|
|
|
|
|
0
|
return 1 |
898
|
|
|
|
|
|
|
} |
899
|
0
|
|
|
|
|
0
|
return 0; |
900
|
|
|
|
|
|
|
}; |
901
|
|
|
|
|
|
|
|
902
|
|
|
|
|
|
|
sub parsePropParen2 { |
903
|
0
|
|
|
0
|
0
|
0
|
my ($self, $text) = @_; |
904
|
|
|
|
|
|
|
# attribute => 'Value' |
905
|
|
|
|
|
|
|
# char => ')' |
906
|
|
|
|
|
|
|
# context => '#pop#pop' |
907
|
|
|
|
|
|
|
# type => 'DetectChar' |
908
|
0
|
0
|
|
|
|
0
|
if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop#pop', 'Value')) { |
909
|
0
|
|
|
|
|
0
|
return 1 |
910
|
|
|
|
|
|
|
} |
911
|
|
|
|
|
|
|
# context => 'FindValues' |
912
|
|
|
|
|
|
|
# type => 'IncludeRules' |
913
|
0
|
0
|
|
|
|
0
|
if ($self->includeRules('FindValues', $text)) { |
914
|
0
|
|
|
|
|
0
|
return 1 |
915
|
|
|
|
|
|
|
} |
916
|
|
|
|
|
|
|
# context => 'FindStrings' |
917
|
|
|
|
|
|
|
# type => 'IncludeRules' |
918
|
0
|
0
|
|
|
|
0
|
if ($self->includeRules('FindStrings', $text)) { |
919
|
0
|
|
|
|
|
0
|
return 1 |
920
|
|
|
|
|
|
|
} |
921
|
|
|
|
|
|
|
# context => 'FindComments' |
922
|
|
|
|
|
|
|
# type => 'IncludeRules' |
923
|
0
|
0
|
|
|
|
0
|
if ($self->includeRules('FindComments', $text)) { |
924
|
0
|
|
|
|
|
0
|
return 1 |
925
|
|
|
|
|
|
|
} |
926
|
0
|
|
|
|
|
0
|
return 0; |
927
|
|
|
|
|
|
|
}; |
928
|
|
|
|
|
|
|
|
929
|
|
|
|
|
|
|
sub parseRule { |
930
|
20
|
|
|
20
|
0
|
47
|
my ($self, $text) = @_; |
931
|
|
|
|
|
|
|
# attribute => 'Property' |
932
|
|
|
|
|
|
|
# char => ':' |
933
|
|
|
|
|
|
|
# context => 'Rule2' |
934
|
|
|
|
|
|
|
# type => 'DetectChar' |
935
|
20
|
50
|
|
|
|
100
|
if ($self->testDetectChar($text, ':', 0, 0, 0, undef, 0, 'Rule2', 'Property')) { |
936
|
20
|
|
|
|
|
72
|
return 1 |
937
|
|
|
|
|
|
|
} |
938
|
|
|
|
|
|
|
# String => '\S' |
939
|
|
|
|
|
|
|
# attribute => 'Error' |
940
|
|
|
|
|
|
|
# context => '#stay' |
941
|
|
|
|
|
|
|
# type => 'RegExpr' |
942
|
0
|
0
|
|
|
|
0
|
if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { |
943
|
0
|
|
|
|
|
0
|
return 1 |
944
|
|
|
|
|
|
|
} |
945
|
0
|
|
|
|
|
0
|
return 0; |
946
|
|
|
|
|
|
|
}; |
947
|
|
|
|
|
|
|
|
948
|
|
|
|
|
|
|
sub parseRule2 { |
949
|
86
|
|
|
86
|
0
|
161
|
my ($self, $text) = @_; |
950
|
|
|
|
|
|
|
# attribute => 'Property' |
951
|
|
|
|
|
|
|
# char => ';' |
952
|
|
|
|
|
|
|
# context => '#pop#pop' |
953
|
|
|
|
|
|
|
# type => 'DetectChar' |
954
|
86
|
100
|
|
|
|
328
|
if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop#pop', 'Property')) { |
955
|
20
|
|
|
|
|
56
|
return 1 |
956
|
|
|
|
|
|
|
} |
957
|
|
|
|
|
|
|
# attribute => 'Property' |
958
|
|
|
|
|
|
|
# char => '}' |
959
|
|
|
|
|
|
|
# context => '#pop#pop#pop' |
960
|
|
|
|
|
|
|
# endRegion => 'ruleset' |
961
|
|
|
|
|
|
|
# type => 'DetectChar' |
962
|
66
|
50
|
|
|
|
310
|
if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Property')) { |
963
|
0
|
|
|
|
|
0
|
return 1 |
964
|
|
|
|
|
|
|
} |
965
|
|
|
|
|
|
|
# String => 'types' |
966
|
|
|
|
|
|
|
# attribute => 'Value' |
967
|
|
|
|
|
|
|
# context => '#stay' |
968
|
|
|
|
|
|
|
# type => 'keyword' |
969
|
66
|
100
|
|
|
|
252
|
if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Value')) { |
970
|
6
|
|
|
|
|
23
|
return 1 |
971
|
|
|
|
|
|
|
} |
972
|
|
|
|
|
|
|
# String => 'colors' |
973
|
|
|
|
|
|
|
# attribute => 'Value' |
974
|
|
|
|
|
|
|
# context => '#stay' |
975
|
|
|
|
|
|
|
# type => 'keyword' |
976
|
60
|
100
|
|
|
|
221
|
if ($self->testKeyword($text, 'colors', 0, undef, 0, '#stay', 'Value')) { |
977
|
2
|
|
|
|
|
8
|
return 1 |
978
|
|
|
|
|
|
|
} |
979
|
|
|
|
|
|
|
# String => '#([0-9A-Fa-f]{3}){1,4}\b' |
980
|
|
|
|
|
|
|
# attribute => 'Value' |
981
|
|
|
|
|
|
|
# context => '#stay' |
982
|
|
|
|
|
|
|
# type => 'RegExpr' |
983
|
58
|
50
|
|
|
|
297
|
if ($self->testRegExpr($text, '#([0-9A-Fa-f]{3}){1,4}\\b', 0, 0, 0, undef, 0, '#stay', 'Value')) { |
984
|
0
|
|
|
|
|
0
|
return 1 |
985
|
|
|
|
|
|
|
} |
986
|
|
|
|
|
|
|
# String => 'paren' |
987
|
|
|
|
|
|
|
# attribute => 'Value' |
988
|
|
|
|
|
|
|
# context => 'PropParen' |
989
|
|
|
|
|
|
|
# type => 'keyword' |
990
|
58
|
50
|
|
|
|
242
|
if ($self->testKeyword($text, 'paren', 0, undef, 0, 'PropParen', 'Value')) { |
991
|
0
|
|
|
|
|
0
|
return 1 |
992
|
|
|
|
|
|
|
} |
993
|
|
|
|
|
|
|
# String => '!important\b' |
994
|
|
|
|
|
|
|
# attribute => 'Important' |
995
|
|
|
|
|
|
|
# context => '#stay' |
996
|
|
|
|
|
|
|
# type => 'RegExpr' |
997
|
58
|
100
|
|
|
|
239
|
if ($self->testRegExpr($text, '!important\\b', 0, 0, 0, undef, 0, '#stay', 'Important')) { |
998
|
2
|
|
|
|
|
9
|
return 1 |
999
|
|
|
|
|
|
|
} |
1000
|
|
|
|
|
|
|
# context => 'FindValues' |
1001
|
|
|
|
|
|
|
# type => 'IncludeRules' |
1002
|
56
|
100
|
|
|
|
230
|
if ($self->includeRules('FindValues', $text)) { |
1003
|
20
|
|
|
|
|
73
|
return 1 |
1004
|
|
|
|
|
|
|
} |
1005
|
|
|
|
|
|
|
# context => 'FindStrings' |
1006
|
|
|
|
|
|
|
# type => 'IncludeRules' |
1007
|
36
|
100
|
|
|
|
174
|
if ($self->includeRules('FindStrings', $text)) { |
1008
|
2
|
|
|
|
|
9
|
return 1 |
1009
|
|
|
|
|
|
|
} |
1010
|
|
|
|
|
|
|
# context => 'FindComments' |
1011
|
|
|
|
|
|
|
# type => 'IncludeRules' |
1012
|
34
|
50
|
|
|
|
139
|
if ($self->includeRules('FindComments', $text)) { |
1013
|
0
|
|
|
|
|
0
|
return 1 |
1014
|
|
|
|
|
|
|
} |
1015
|
34
|
|
|
|
|
122
|
return 0; |
1016
|
|
|
|
|
|
|
}; |
1017
|
|
|
|
|
|
|
|
1018
|
|
|
|
|
|
|
sub parseRuleSet { |
1019
|
148
|
|
|
148
|
0
|
252
|
my ($self, $text) = @_; |
1020
|
|
|
|
|
|
|
# attribute => 'Property' |
1021
|
|
|
|
|
|
|
# char => '}' |
1022
|
|
|
|
|
|
|
# context => '#pop' |
1023
|
|
|
|
|
|
|
# endRegion => 'ruleset' |
1024
|
|
|
|
|
|
|
# type => 'DetectChar' |
1025
|
148
|
100
|
|
|
|
521
|
if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Property')) { |
1026
|
10
|
|
|
|
|
31
|
return 1 |
1027
|
|
|
|
|
|
|
} |
1028
|
|
|
|
|
|
|
# String => 'properties' |
1029
|
|
|
|
|
|
|
# attribute => 'Property' |
1030
|
|
|
|
|
|
|
# context => 'Rule' |
1031
|
|
|
|
|
|
|
# type => 'keyword' |
1032
|
138
|
100
|
|
|
|
548
|
if ($self->testKeyword($text, 'properties', 0, undef, 0, 'Rule', 'Property')) { |
1033
|
18
|
|
|
|
|
60
|
return 1 |
1034
|
|
|
|
|
|
|
} |
1035
|
|
|
|
|
|
|
# String => '-?[A-Za-z_-]+(?=\s*:)' |
1036
|
|
|
|
|
|
|
# attribute => 'Unknown Property' |
1037
|
|
|
|
|
|
|
# context => 'Rule' |
1038
|
|
|
|
|
|
|
# type => 'RegExpr' |
1039
|
120
|
100
|
|
|
|
479
|
if ($self->testRegExpr($text, '-?[A-Za-z_-]+(?=\\s*:)', 0, 0, 0, undef, 0, 'Rule', 'Unknown Property')) { |
1040
|
2
|
|
|
|
|
8
|
return 1 |
1041
|
|
|
|
|
|
|
} |
1042
|
|
|
|
|
|
|
# context => 'FindComments' |
1043
|
|
|
|
|
|
|
# type => 'IncludeRules' |
1044
|
118
|
100
|
|
|
|
494
|
if ($self->includeRules('FindComments', $text)) { |
1045
|
4
|
|
|
|
|
11
|
return 1 |
1046
|
|
|
|
|
|
|
} |
1047
|
|
|
|
|
|
|
# String => '\S' |
1048
|
|
|
|
|
|
|
# attribute => 'Error' |
1049
|
|
|
|
|
|
|
# context => '#stay' |
1050
|
|
|
|
|
|
|
# type => 'RegExpr' |
1051
|
114
|
100
|
|
|
|
395
|
if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { |
1052
|
66
|
|
|
|
|
176
|
return 1 |
1053
|
|
|
|
|
|
|
} |
1054
|
48
|
|
|
|
|
158
|
return 0; |
1055
|
|
|
|
|
|
|
}; |
1056
|
|
|
|
|
|
|
|
1057
|
|
|
|
|
|
|
sub parseSelAttr { |
1058
|
16
|
|
|
16
|
0
|
25
|
my ($self, $text) = @_; |
1059
|
|
|
|
|
|
|
# attribute => 'Selector Attr' |
1060
|
|
|
|
|
|
|
# char => ']' |
1061
|
|
|
|
|
|
|
# context => '#pop' |
1062
|
|
|
|
|
|
|
# type => 'DetectChar' |
1063
|
16
|
100
|
|
|
|
55
|
if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Selector Attr')) { |
1064
|
2
|
|
|
|
|
7
|
return 1 |
1065
|
|
|
|
|
|
|
} |
1066
|
|
|
|
|
|
|
# context => 'FindStrings' |
1067
|
|
|
|
|
|
|
# type => 'IncludeRules' |
1068
|
14
|
100
|
|
|
|
104
|
if ($self->includeRules('FindStrings', $text)) { |
1069
|
2
|
|
|
|
|
6
|
return 1 |
1070
|
|
|
|
|
|
|
} |
1071
|
12
|
|
|
|
|
28
|
return 0; |
1072
|
|
|
|
|
|
|
}; |
1073
|
|
|
|
|
|
|
|
1074
|
|
|
|
|
|
|
sub parseSelPseudo { |
1075
|
4
|
|
|
4
|
0
|
5
|
my ($self, $text) = @_; |
1076
|
|
|
|
|
|
|
# String => 'pseudoclasses' |
1077
|
|
|
|
|
|
|
# attribute => 'Selector Pseudo' |
1078
|
|
|
|
|
|
|
# context => '#pop' |
1079
|
|
|
|
|
|
|
# type => 'keyword' |
1080
|
4
|
50
|
|
|
|
19
|
if ($self->testKeyword($text, 'pseudoclasses', 0, undef, 0, '#pop', 'Selector Pseudo')) { |
1081
|
4
|
|
|
|
|
9
|
return 1 |
1082
|
|
|
|
|
|
|
} |
1083
|
0
|
|
|
|
|
0
|
return 0; |
1084
|
|
|
|
|
|
|
}; |
1085
|
|
|
|
|
|
|
|
1086
|
|
|
|
|
|
|
sub parseStringDQ { |
1087
|
24
|
|
|
24
|
0
|
35
|
my ($self, $text) = @_; |
1088
|
|
|
|
|
|
|
# attribute => 'String' |
1089
|
|
|
|
|
|
|
# char => '"' |
1090
|
|
|
|
|
|
|
# context => '#pop' |
1091
|
|
|
|
|
|
|
# type => 'DetectChar' |
1092
|
24
|
100
|
|
|
|
85
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
1093
|
6
|
|
|
|
|
17
|
return 1 |
1094
|
|
|
|
|
|
|
} |
1095
|
|
|
|
|
|
|
# context => 'InsideString' |
1096
|
|
|
|
|
|
|
# type => 'IncludeRules' |
1097
|
18
|
100
|
|
|
|
58
|
if ($self->includeRules('InsideString', $text)) { |
1098
|
12
|
|
|
|
|
35
|
return 1 |
1099
|
|
|
|
|
|
|
} |
1100
|
6
|
|
|
|
|
17
|
return 0; |
1101
|
|
|
|
|
|
|
}; |
1102
|
|
|
|
|
|
|
|
1103
|
|
|
|
|
|
|
sub parseStringSQ { |
1104
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
1105
|
|
|
|
|
|
|
# attribute => 'String' |
1106
|
|
|
|
|
|
|
# char => ''' |
1107
|
|
|
|
|
|
|
# context => '#pop' |
1108
|
|
|
|
|
|
|
# type => 'DetectChar' |
1109
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { |
1110
|
0
|
|
|
|
|
|
return 1 |
1111
|
|
|
|
|
|
|
} |
1112
|
|
|
|
|
|
|
# context => 'InsideString' |
1113
|
|
|
|
|
|
|
# type => 'IncludeRules' |
1114
|
0
|
0
|
|
|
|
|
if ($self->includeRules('InsideString', $text)) { |
1115
|
0
|
|
|
|
|
|
return 1 |
1116
|
|
|
|
|
|
|
} |
1117
|
0
|
|
|
|
|
|
return 0; |
1118
|
|
|
|
|
|
|
}; |
1119
|
|
|
|
|
|
|
|
1120
|
|
|
|
|
|
|
|
1121
|
|
|
|
|
|
|
1; |
1122
|
|
|
|
|
|
|
|
1123
|
|
|
|
|
|
|
__END__ |