regexp_parser 2.6.0 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +5 -5
- data/LICENSE +1 -1
- data/lib/regexp_parser/expression/base.rb +0 -7
- data/lib/regexp_parser/expression/classes/alternation.rb +1 -1
- data/lib/regexp_parser/expression/classes/backreference.rb +17 -3
- data/lib/regexp_parser/expression/classes/character_set/range.rb +2 -7
- data/lib/regexp_parser/expression/classes/character_set.rb +4 -8
- data/lib/regexp_parser/expression/classes/conditional.rb +2 -6
- data/lib/regexp_parser/expression/classes/escape_sequence.rb +3 -1
- data/lib/regexp_parser/expression/classes/free_space.rb +3 -1
- data/lib/regexp_parser/expression/classes/group.rb +0 -22
- data/lib/regexp_parser/expression/classes/keep.rb +1 -1
- data/lib/regexp_parser/expression/classes/posix_class.rb +5 -5
- data/lib/regexp_parser/expression/classes/unicode_property.rb +11 -11
- data/lib/regexp_parser/expression/methods/construct.rb +2 -4
- data/lib/regexp_parser/expression/methods/match_length.rb +8 -4
- data/lib/regexp_parser/expression/methods/negative.rb +20 -0
- data/lib/regexp_parser/expression/methods/parts.rb +23 -0
- data/lib/regexp_parser/expression/methods/printing.rb +26 -0
- data/lib/regexp_parser/expression/methods/tests.rb +40 -3
- data/lib/regexp_parser/expression/methods/traverse.rb +35 -19
- data/lib/regexp_parser/expression/quantifier.rb +30 -17
- data/lib/regexp_parser/expression/sequence.rb +5 -10
- data/lib/regexp_parser/expression/sequence_operation.rb +4 -9
- data/lib/regexp_parser/expression/shared.rb +37 -20
- data/lib/regexp_parser/expression/subexpression.rb +20 -15
- data/lib/regexp_parser/expression.rb +34 -31
- data/lib/regexp_parser/lexer.rb +76 -36
- data/lib/regexp_parser/parser.rb +101 -100
- data/lib/regexp_parser/scanner/errors/premature_end_error.rb +8 -0
- data/lib/regexp_parser/scanner/errors/scanner_error.rb +6 -0
- data/lib/regexp_parser/scanner/errors/validation_error.rb +63 -0
- data/lib/regexp_parser/scanner/properties/long.csv +29 -0
- data/lib/regexp_parser/scanner/properties/short.csv +3 -0
- data/lib/regexp_parser/scanner/property.rl +2 -2
- data/lib/regexp_parser/scanner/scanner.rl +101 -172
- data/lib/regexp_parser/scanner.rb +1132 -1283
- data/lib/regexp_parser/syntax/token/backreference.rb +3 -0
- data/lib/regexp_parser/syntax/token/character_set.rb +3 -0
- data/lib/regexp_parser/syntax/token/escape.rb +3 -1
- data/lib/regexp_parser/syntax/token/meta.rb +9 -2
- data/lib/regexp_parser/syntax/token/unicode_property.rb +35 -1
- data/lib/regexp_parser/syntax/token/virtual.rb +11 -0
- data/lib/regexp_parser/syntax/token.rb +13 -13
- data/lib/regexp_parser/syntax/version_lookup.rb +0 -8
- data/lib/regexp_parser/syntax/versions.rb +3 -1
- data/lib/regexp_parser/syntax.rb +1 -1
- data/lib/regexp_parser/version.rb +1 -1
- data/lib/regexp_parser.rb +6 -6
- data/regexp_parser.gemspec +5 -5
- metadata +14 -8
- data/CHANGELOG.md +0 -601
- data/README.md +0 -503
@@ -1,157 +1,96 @@
|
|
1
1
|
# -*- warn-indent:false; -*-
|
2
|
-
|
3
|
-
# line 1 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
4
|
-
|
5
|
-
# line 646 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
6
|
-
|
7
|
-
|
2
|
+
#
|
8
3
|
# THIS IS A GENERATED FILE, DO NOT EDIT DIRECTLY
|
9
|
-
#
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
class Regexp::Scanner
|
14
|
-
# General scanner error (catch all)
|
15
|
-
class ScannerError < Regexp::Parser::Error; end
|
4
|
+
#
|
5
|
+
# This file was generated from scanner.rl
|
6
|
+
# by running `bundle exec rake ragel:rb`
|
16
7
|
|
17
|
-
# Base for all scanner validation errors
|
18
|
-
class ValidationError < Regexp::Parser::Error
|
19
|
-
def initialize(reason)
|
20
|
-
super reason
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
# Unexpected end of pattern
|
25
|
-
class PrematureEndError < ScannerError
|
26
|
-
def initialize(where = '')
|
27
|
-
super "Premature end of pattern at #{where}"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
# Invalid sequence format. Used for escape sequences, mainly.
|
32
|
-
class InvalidSequenceError < ValidationError
|
33
|
-
def initialize(what = 'sequence', where = '')
|
34
|
-
super "Invalid #{what} at #{where}"
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
# Invalid group. Used for named groups.
|
39
|
-
class InvalidGroupError < ValidationError
|
40
|
-
def initialize(what, reason)
|
41
|
-
super "Invalid #{what}, #{reason}."
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
# Invalid groupOption. Used for inline options.
|
46
|
-
# TODO: should become InvalidGroupOptionError in v3.0.0 for consistency
|
47
|
-
class InvalidGroupOption < ValidationError
|
48
|
-
def initialize(option, text)
|
49
|
-
super "Invalid group option #{option} in #{text}"
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
# Invalid back reference. Used for name a number refs/calls.
|
54
|
-
class InvalidBackrefError < ValidationError
|
55
|
-
def initialize(what, reason)
|
56
|
-
super "Invalid back reference #{what}, #{reason}"
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
# The property name was not recognized by the scanner.
|
61
|
-
class UnknownUnicodePropertyError < ValidationError
|
62
|
-
def initialize(name)
|
63
|
-
super "Unknown unicode character property name #{name}"
|
64
|
-
end
|
65
|
-
end
|
66
8
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
super "Unknown POSIX class #{text}"
|
71
|
-
end
|
72
|
-
end
|
9
|
+
require_relative 'scanner/errors/scanner_error'
|
10
|
+
require_relative 'scanner/errors/premature_end_error'
|
11
|
+
require_relative 'scanner/errors/validation_error'
|
73
12
|
|
13
|
+
class Regexp::Scanner
|
74
14
|
# Scans the given regular expression text, or Regexp object and collects the
|
75
15
|
# emitted token into an array that gets returned at the end. If a block is
|
76
16
|
# given, it gets called for each emitted token.
|
77
17
|
#
|
78
18
|
# This method may raise errors if a syntax error is encountered.
|
79
19
|
# --------------------------------------------------------------------------
|
80
|
-
def self.scan(input_object, options: nil, &block)
|
81
|
-
new.scan(input_object, options: options, &block)
|
20
|
+
def self.scan(input_object, options: nil, collect_tokens: true, &block)
|
21
|
+
new.scan(input_object, options: options, collect_tokens: collect_tokens, &block)
|
82
22
|
end
|
83
23
|
|
84
|
-
def scan(input_object, options: nil, &block)
|
85
|
-
self.
|
24
|
+
def scan(input_object, options: nil, collect_tokens: true, &block)
|
25
|
+
self.collect_tokens = collect_tokens
|
26
|
+
self.literal_run = nil
|
86
27
|
stack = []
|
87
28
|
|
88
29
|
input = input_object.is_a?(Regexp) ? input_object.source : input_object
|
89
30
|
self.free_spacing = free_spacing?(input_object, options)
|
90
31
|
self.spacing_stack = [{:free_spacing => free_spacing, :depth => 0}]
|
91
32
|
|
92
|
-
data = input.unpack("c*")
|
33
|
+
data = input.unpack("c*")
|
93
34
|
eof = data.length
|
94
35
|
|
95
36
|
self.tokens = []
|
96
|
-
self.block =
|
37
|
+
self.block = block
|
97
38
|
|
98
39
|
self.set_depth = 0
|
99
40
|
self.group_depth = 0
|
100
41
|
self.conditional_stack = []
|
101
42
|
self.char_pos = 0
|
102
43
|
|
103
|
-
|
104
|
-
# line 104 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner.rb"
|
105
44
|
class << self
|
106
45
|
attr_accessor :_re_scanner_trans_keys
|
107
46
|
private :_re_scanner_trans_keys, :_re_scanner_trans_keys=
|
108
47
|
end
|
109
48
|
self._re_scanner_trans_keys = [
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
49
|
+
0,0,-128,-65,-128,-65,
|
50
|
+
-128,-65,41,41,39,
|
51
|
+
57,39,39,33,62,
|
52
|
+
62,62,39,60,39,57,
|
53
|
+
39,39,48,57,39,
|
54
|
+
57,48,57,39,57,
|
55
|
+
33,62,62,62,48,57,
|
56
|
+
43,62,48,57,48,
|
57
|
+
62,39,60,39,57,
|
58
|
+
39,39,48,57,39,57,
|
59
|
+
48,57,39,57,33,
|
60
|
+
62,62,62,48,57,
|
61
|
+
43,62,48,57,48,62,
|
62
|
+
48,57,48,125,44,
|
63
|
+
125,123,123,9,122,
|
64
|
+
9,125,9,122,-128,-65,
|
65
|
+
-128,-65,38,38,58,
|
66
|
+
93,58,93,-128,-65,
|
67
|
+
-128,-65,45,45,92,92,
|
68
|
+
92,92,45,45,92,
|
69
|
+
92,92,92,48,123,
|
70
|
+
48,102,48,102,48,102,
|
71
|
+
48,102,9,125,9,
|
72
|
+
125,9,125,9,125,
|
73
|
+
9,125,9,125,48,123,
|
74
|
+
39,39,41,41,41,
|
75
|
+
57,62,62,-128,127,
|
76
|
+
-62,-12,1,127,1,127,
|
77
|
+
9,32,33,126,10,
|
78
|
+
10,63,63,33,126,
|
79
|
+
33,126,62,62,43,63,
|
80
|
+
43,63,43,63,65,
|
81
|
+
122,44,57,68,119,
|
82
|
+
80,112,-62,125,-128,-65,
|
83
|
+
-128,-65,-128,-65,38,
|
84
|
+
38,38,93,58,58,
|
85
|
+
48,120,48,55,48,55,
|
86
|
+
-62,125,-128,-65,-128,
|
87
|
+
-65,-128,-65,48,55,
|
88
|
+
48,55,48,57,77,77,
|
89
|
+
45,45,0,0,67,
|
90
|
+
99,45,45,0,0,
|
91
|
+
92,92,48,102,39,60,
|
92
|
+
39,57,48,57,41,
|
93
|
+
57,33,62,0
|
155
94
|
]
|
156
95
|
|
157
96
|
class << self
|
@@ -159,21 +98,21 @@ class << self
|
|
159
98
|
private :_re_scanner_key_spans, :_re_scanner_key_spans=
|
160
99
|
end
|
161
100
|
self._re_scanner_key_spans = [
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
101
|
+
0,64,64,64,1,19,1,30,
|
102
|
+
1,22,19,1,10,19,10,19,
|
103
|
+
30,1,10,20,10,15,22,19,
|
104
|
+
1,10,19,10,19,30,1,10,
|
105
|
+
20,10,15,10,78,82,1,114,
|
106
|
+
117,114,64,64,1,36,36,64,
|
107
|
+
64,1,1,1,1,1,1,76,
|
108
|
+
55,55,55,55,117,117,117,117,
|
109
|
+
117,117,76,1,1,17,1,256,
|
110
|
+
51,127,127,24,94,1,1,94,
|
111
|
+
94,1,21,21,21,58,14,52,
|
112
|
+
33,188,64,64,64,1,56,1,
|
113
|
+
73,8,8,188,64,64,64,8,
|
114
|
+
8,10,1,1,0,33,1,0,
|
115
|
+
1,55,22,19,10,17,30
|
177
116
|
]
|
178
117
|
|
179
118
|
class << self
|
@@ -181,21 +120,21 @@ class << self
|
|
181
120
|
private :_re_scanner_index_offsets, :_re_scanner_index_offsets=
|
182
121
|
end
|
183
122
|
self._re_scanner_index_offsets = [
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
123
|
+
0,0,65,130,195,197,217,219,
|
124
|
+
250,252,275,295,297,308,328,339,
|
125
|
+
359,390,392,403,424,435,451,474,
|
126
|
+
494,496,507,527,538,558,589,591,
|
127
|
+
602,623,634,650,661,740,823,825,
|
128
|
+
940,1058,1173,1238,1303,1305,1342,1379,
|
129
|
+
1444,1509,1511,1513,1515,1517,1519,1521,
|
130
|
+
1598,1654,1710,1766,1822,1940,2058,2176,
|
131
|
+
2294,2412,2530,2607,2609,2611,2629,2631,
|
132
|
+
2888,2940,3068,3196,3221,3316,3318,3320,
|
133
|
+
3415,3510,3512,3534,3556,3578,3637,3652,
|
134
|
+
3705,3739,3928,3993,4058,4123,4125,4182,
|
135
|
+
4184,4258,4267,4276,4465,4530,4595,4660,
|
136
|
+
4669,4678,4689,4691,4693,4694,4728,4730,
|
137
|
+
4731,4733,4789,4812,4832,4843,4861
|
199
138
|
]
|
200
139
|
|
201
140
|
class << self
|
@@ -203,608 +142,618 @@ class << self
|
|
203
142
|
private :_re_scanner_indicies, :_re_scanner_indicies=
|
204
143
|
end
|
205
144
|
self._re_scanner_indicies = [
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
145
|
+
1,1,1,1,1,1,1,1,
|
146
|
+
1,1,1,1,1,1,1,1,
|
147
|
+
1,1,1,1,1,1,1,1,
|
148
|
+
1,1,1,1,1,1,1,1,
|
149
|
+
1,1,1,1,1,1,1,1,
|
150
|
+
1,1,1,1,1,1,1,1,
|
151
|
+
1,1,1,1,1,1,1,1,
|
152
|
+
1,1,1,1,1,1,1,1,
|
153
|
+
0,2,2,2,2,2,2,2,
|
154
|
+
2,2,2,2,2,2,2,2,
|
155
|
+
2,2,2,2,2,2,2,2,
|
156
|
+
2,2,2,2,2,2,2,2,
|
157
|
+
2,2,2,2,2,2,2,2,
|
158
|
+
2,2,2,2,2,2,2,2,
|
159
|
+
2,2,2,2,2,2,2,2,
|
160
|
+
2,2,2,2,2,2,2,2,
|
161
|
+
2,0,3,3,3,3,3,3,
|
162
|
+
3,3,3,3,3,3,3,3,
|
163
|
+
3,3,3,3,3,3,3,3,
|
164
|
+
3,3,3,3,3,3,3,3,
|
165
|
+
3,3,3,3,3,3,3,3,
|
166
|
+
3,3,3,3,3,3,3,3,
|
167
|
+
3,3,3,3,3,3,3,3,
|
168
|
+
3,3,3,3,3,3,3,3,
|
169
|
+
3,3,0,6,5,8,7,7,
|
170
|
+
7,7,7,4,7,7,4,4,
|
171
|
+
4,4,4,4,4,4,4,4,
|
172
|
+
7,8,7,10,9,9,9,9,
|
173
|
+
9,9,9,9,9,9,9,4,
|
174
|
+
9,9,4,4,4,4,4,4,
|
175
|
+
4,4,4,4,9,9,9,11,
|
176
|
+
8,9,8,9,13,12,12,12,
|
177
|
+
12,12,12,12,12,12,12,12,
|
178
|
+
12,12,12,12,12,12,12,12,
|
179
|
+
12,14,12,16,15,15,15,15,
|
180
|
+
15,17,15,15,18,18,18,18,
|
181
|
+
18,18,18,18,18,18,15,16,
|
182
|
+
15,18,18,18,18,18,18,18,
|
183
|
+
18,18,18,12,16,12,12,12,
|
184
|
+
19,12,19,12,12,18,18,18,
|
185
|
+
18,18,18,18,18,18,18,12,
|
186
|
+
20,20,20,20,20,20,20,20,
|
187
|
+
20,20,12,16,12,12,12,12,
|
188
|
+
12,12,12,12,20,20,20,20,
|
189
|
+
20,20,20,20,20,20,12,12,
|
190
|
+
21,21,21,21,21,21,21,21,
|
191
|
+
21,21,21,22,21,21,23,23,
|
192
|
+
23,23,23,23,23,23,23,23,
|
193
|
+
21,21,21,21,16,21,16,21,
|
194
|
+
23,23,23,23,23,23,23,23,
|
195
|
+
23,23,12,24,12,24,12,12,
|
196
|
+
23,23,23,23,23,23,23,23,
|
197
|
+
23,23,12,12,12,12,16,12,
|
198
|
+
25,25,25,25,25,25,25,25,
|
199
|
+
25,25,12,25,25,25,25,25,
|
200
|
+
25,25,25,25,25,12,12,12,
|
201
|
+
12,16,12,26,12,12,12,12,
|
202
|
+
12,12,12,12,12,12,12,12,
|
203
|
+
12,12,12,12,12,12,12,12,
|
204
|
+
27,12,29,28,28,28,28,28,
|
205
|
+
30,28,28,31,31,31,31,31,
|
206
|
+
31,31,31,31,31,28,29,28,
|
207
|
+
31,31,31,31,31,31,31,31,
|
208
|
+
31,31,12,29,12,12,12,32,
|
209
|
+
12,32,12,12,31,31,31,31,
|
210
|
+
31,31,31,31,31,31,12,33,
|
211
|
+
33,33,33,33,33,33,33,33,
|
212
|
+
33,12,29,12,12,12,12,12,
|
213
|
+
12,12,12,33,33,33,33,33,
|
214
|
+
33,33,33,33,33,12,12,34,
|
215
|
+
34,34,34,34,34,34,34,34,
|
216
|
+
34,34,35,34,34,36,36,36,
|
217
|
+
36,36,36,36,36,36,36,34,
|
218
|
+
34,34,34,29,34,29,34,36,
|
219
|
+
36,36,36,36,36,36,36,36,
|
220
|
+
36,12,37,12,37,12,12,36,
|
221
|
+
36,36,36,36,36,36,36,36,
|
222
|
+
36,12,12,12,12,29,12,38,
|
223
|
+
38,38,38,38,38,38,38,38,
|
224
|
+
38,12,38,38,38,38,38,38,
|
225
|
+
38,38,38,38,12,12,12,12,
|
226
|
+
29,12,40,40,40,40,40,40,
|
227
|
+
40,40,40,40,39,40,40,40,
|
228
|
+
40,40,40,40,40,40,40,39,
|
229
|
+
39,39,39,39,39,39,39,39,
|
230
|
+
39,39,39,39,39,39,39,39,
|
231
|
+
39,39,39,39,39,39,39,39,
|
232
|
+
39,39,39,39,39,39,39,39,
|
233
|
+
39,39,39,39,39,39,39,39,
|
234
|
+
39,39,39,39,39,39,39,39,
|
235
|
+
39,39,39,39,39,39,39,39,
|
236
|
+
39,39,39,39,39,39,39,39,
|
237
|
+
39,39,41,39,40,39,39,39,
|
238
|
+
42,42,42,42,42,42,42,42,
|
239
|
+
42,42,39,39,39,39,39,39,
|
240
|
+
39,39,39,39,39,39,39,39,
|
241
|
+
39,39,39,39,39,39,39,39,
|
242
|
+
39,39,39,39,39,39,39,39,
|
243
|
+
39,39,39,39,39,39,39,39,
|
244
|
+
39,39,39,39,39,39,39,39,
|
245
|
+
39,39,39,39,39,39,39,39,
|
246
|
+
39,39,39,39,39,39,39,39,
|
247
|
+
39,39,39,39,39,41,39,43,
|
248
|
+
44,45,45,45,45,45,44,44,
|
249
|
+
44,44,44,44,44,44,44,44,
|
250
|
+
44,44,44,44,44,44,44,44,
|
251
|
+
45,44,44,44,44,44,44,44,
|
252
|
+
44,44,44,44,44,45,45,44,
|
253
|
+
45,45,45,45,45,45,45,45,
|
254
|
+
45,45,44,44,44,45,44,44,
|
255
|
+
44,45,45,45,45,45,45,45,
|
256
|
+
45,45,45,45,45,45,45,45,
|
257
|
+
45,45,45,45,45,45,45,45,
|
258
|
+
45,45,45,44,44,44,46,45,
|
259
|
+
44,45,45,45,45,45,45,45,
|
260
|
+
45,45,45,45,45,45,45,45,
|
261
|
+
45,45,45,45,45,45,45,45,
|
262
|
+
45,45,45,44,45,45,45,45,
|
263
|
+
45,44,44,44,44,44,44,44,
|
264
|
+
44,44,44,44,44,44,44,44,
|
265
|
+
44,44,44,45,44,44,44,44,
|
266
|
+
44,44,44,44,44,44,44,44,
|
267
|
+
45,45,44,45,45,45,45,45,
|
268
|
+
45,45,45,45,45,44,44,44,
|
269
|
+
45,44,44,44,45,45,45,45,
|
270
|
+
45,45,45,45,45,45,45,45,
|
271
|
+
45,45,45,45,45,45,45,45,
|
272
|
+
45,45,45,45,45,45,44,44,
|
273
|
+
44,44,45,44,45,45,45,45,
|
274
|
+
45,45,45,45,45,45,45,45,
|
275
|
+
45,45,45,45,45,45,45,45,
|
276
|
+
45,45,45,45,45,45,44,44,
|
277
|
+
47,44,45,45,45,45,45,44,
|
278
|
+
44,44,44,44,44,44,44,44,
|
279
|
+
44,44,44,44,44,44,44,44,
|
280
|
+
44,45,44,44,44,44,44,44,
|
281
|
+
44,44,44,44,44,44,45,45,
|
282
|
+
44,45,45,45,45,45,45,45,
|
283
|
+
45,45,45,44,44,44,45,44,
|
284
|
+
44,44,45,45,45,45,45,45,
|
285
|
+
45,45,45,45,45,45,45,45,
|
286
|
+
45,45,45,45,45,45,45,45,
|
287
|
+
45,45,45,45,44,44,44,44,
|
288
|
+
45,44,45,45,45,45,45,45,
|
289
|
+
45,45,45,45,45,45,45,45,
|
290
|
+
45,45,45,45,45,45,45,45,
|
291
|
+
45,45,45,45,44,49,49,49,
|
292
|
+
49,49,49,49,49,49,49,49,
|
293
|
+
49,49,49,49,49,49,49,49,
|
294
|
+
49,49,49,49,49,49,49,49,
|
295
|
+
49,49,49,49,49,49,49,49,
|
296
|
+
49,49,49,49,49,49,49,49,
|
297
|
+
49,49,49,49,49,49,49,49,
|
298
|
+
49,49,49,49,49,49,49,49,
|
299
|
+
49,49,49,49,49,48,50,50,
|
300
|
+
50,50,50,50,50,50,50,50,
|
301
|
+
50,50,50,50,50,50,50,50,
|
302
|
+
50,50,50,50,50,50,50,50,
|
303
|
+
50,50,50,50,50,50,50,50,
|
304
|
+
50,50,50,50,50,50,50,50,
|
305
|
+
50,50,50,50,50,50,50,50,
|
306
|
+
50,50,50,50,50,50,50,50,
|
307
|
+
50,50,50,50,50,50,48,52,
|
308
|
+
51,55,54,54,54,54,54,54,
|
309
|
+
54,54,54,54,54,54,54,54,
|
310
|
+
54,54,54,54,54,54,54,54,
|
311
|
+
54,54,54,54,54,54,54,54,
|
312
|
+
54,54,56,54,56,54,55,54,
|
313
|
+
54,54,54,54,54,54,54,54,
|
314
|
+
54,54,54,54,54,54,54,54,
|
315
|
+
54,54,54,54,54,54,54,54,
|
316
|
+
54,54,54,54,54,54,54,56,
|
317
|
+
54,57,54,59,59,59,59,59,
|
318
|
+
59,59,59,59,59,59,59,59,
|
319
|
+
59,59,59,59,59,59,59,59,
|
320
|
+
59,59,59,59,59,59,59,59,
|
321
|
+
59,59,59,59,59,59,59,59,
|
322
|
+
59,59,59,59,59,59,59,59,
|
323
|
+
59,59,59,59,59,59,59,59,
|
324
|
+
59,59,59,59,59,59,59,59,
|
325
|
+
59,59,59,58,60,60,60,60,
|
326
|
+
60,60,60,60,60,60,60,60,
|
327
|
+
60,60,60,60,60,60,60,60,
|
328
|
+
60,60,60,60,60,60,60,60,
|
329
|
+
60,60,60,60,60,60,60,60,
|
330
|
+
60,60,60,60,60,60,60,60,
|
331
|
+
60,60,60,60,60,60,60,60,
|
332
|
+
60,60,60,60,60,60,60,60,
|
333
|
+
60,60,60,60,58,61,44,63,
|
334
|
+
62,65,62,66,44,68,67,70,
|
335
|
+
67,71,71,71,71,71,71,71,
|
336
|
+
71,71,71,44,44,44,44,44,
|
337
|
+
44,44,71,71,71,71,71,71,
|
338
|
+
44,44,44,44,44,44,44,44,
|
339
|
+
44,44,44,44,44,44,44,44,
|
340
|
+
44,44,44,44,44,44,44,44,
|
341
|
+
44,44,71,71,71,71,71,71,
|
342
|
+
44,44,44,44,44,44,44,44,
|
343
|
+
44,44,44,44,44,44,44,44,
|
344
|
+
44,44,44,44,72,44,73,73,
|
345
|
+
73,73,73,73,73,73,73,73,
|
346
|
+
44,44,44,44,44,44,44,73,
|
347
|
+
73,73,73,73,73,44,44,44,
|
348
|
+
44,44,44,44,44,44,44,44,
|
349
|
+
44,44,44,44,44,44,44,44,
|
350
|
+
44,44,44,44,44,44,44,73,
|
351
|
+
73,73,73,73,73,44,74,74,
|
352
|
+
74,74,74,74,74,74,74,74,
|
353
|
+
44,44,44,44,44,44,44,74,
|
354
|
+
74,74,74,74,74,44,44,44,
|
355
|
+
44,44,44,44,44,44,44,44,
|
356
|
+
44,44,44,44,44,44,44,44,
|
357
|
+
44,44,44,44,44,44,44,74,
|
358
|
+
74,74,74,74,74,44,75,75,
|
359
|
+
75,75,75,75,75,75,75,75,
|
360
|
+
44,44,44,44,44,44,44,75,
|
361
|
+
75,75,75,75,75,44,44,44,
|
362
|
+
44,44,44,44,44,44,44,44,
|
363
|
+
44,44,44,44,44,44,44,44,
|
364
|
+
44,44,44,44,44,44,44,75,
|
365
|
+
75,75,75,75,75,44,76,76,
|
366
|
+
76,76,76,76,76,76,76,76,
|
367
|
+
44,44,44,44,44,44,44,76,
|
368
|
+
76,76,76,76,76,44,44,44,
|
369
|
+
44,44,44,44,44,44,44,44,
|
370
|
+
44,44,44,44,44,44,44,44,
|
371
|
+
44,44,44,44,44,44,44,76,
|
372
|
+
76,76,76,76,76,44,72,72,
|
373
|
+
72,72,72,44,44,44,44,44,
|
374
|
+
44,44,44,44,44,44,44,44,
|
375
|
+
44,44,44,44,44,72,44,44,
|
376
|
+
44,44,44,44,44,44,44,44,
|
377
|
+
44,44,44,44,44,77,77,77,
|
378
|
+
77,77,77,77,77,77,77,44,
|
379
|
+
44,44,44,44,44,44,77,77,
|
380
|
+
77,77,77,77,44,44,44,44,
|
381
|
+
44,44,44,44,44,44,44,44,
|
382
|
+
44,44,44,44,44,44,44,44,
|
383
|
+
44,44,44,44,44,44,77,77,
|
384
|
+
77,77,77,77,44,44,44,44,
|
385
|
+
44,44,44,44,44,44,44,44,
|
386
|
+
44,44,44,44,44,44,44,44,
|
387
|
+
44,44,75,44,72,72,72,72,
|
388
|
+
72,44,44,44,44,44,44,44,
|
389
|
+
44,44,44,44,44,44,44,44,
|
390
|
+
44,44,44,72,44,44,44,44,
|
391
|
+
44,44,44,44,44,44,44,44,
|
392
|
+
44,44,44,78,78,78,78,78,
|
393
|
+
78,78,78,78,78,44,44,44,
|
394
|
+
44,44,44,44,78,78,78,78,
|
395
|
+
78,78,44,44,44,44,44,44,
|
396
|
+
44,44,44,44,44,44,44,44,
|
397
|
+
44,44,44,44,44,44,44,44,
|
398
|
+
44,44,44,44,78,78,78,78,
|
399
|
+
78,78,44,44,44,44,44,44,
|
400
|
+
44,44,44,44,44,44,44,44,
|
401
|
+
44,44,44,44,44,44,44,44,
|
402
|
+
75,44,72,72,72,72,72,44,
|
403
|
+
44,44,44,44,44,44,44,44,
|
404
|
+
44,44,44,44,44,44,44,44,
|
405
|
+
44,72,44,44,44,44,44,44,
|
406
|
+
44,44,44,44,44,44,44,44,
|
407
|
+
44,79,79,79,79,79,79,79,
|
408
|
+
79,79,79,44,44,44,44,44,
|
409
|
+
44,44,79,79,79,79,79,79,
|
410
|
+
44,44,44,44,44,44,44,44,
|
411
|
+
44,44,44,44,44,44,44,44,
|
412
|
+
44,44,44,44,44,44,44,44,
|
413
|
+
44,44,79,79,79,79,79,79,
|
414
|
+
44,44,44,44,44,44,44,44,
|
415
|
+
44,44,44,44,44,44,44,44,
|
416
|
+
44,44,44,44,44,44,75,44,
|
417
|
+
72,72,72,72,72,44,44,44,
|
418
|
+
44,44,44,44,44,44,44,44,
|
419
|
+
44,44,44,44,44,44,44,72,
|
420
|
+
44,44,44,44,44,44,44,44,
|
421
|
+
44,44,44,44,44,44,44,80,
|
422
|
+
80,80,80,80,80,80,80,80,
|
423
|
+
80,44,44,44,44,44,44,44,
|
424
|
+
80,80,80,80,80,80,44,44,
|
425
|
+
44,44,44,44,44,44,44,44,
|
426
|
+
44,44,44,44,44,44,44,44,
|
427
|
+
44,44,44,44,44,44,44,44,
|
428
|
+
80,80,80,80,80,80,44,44,
|
429
|
+
44,44,44,44,44,44,44,44,
|
430
|
+
44,44,44,44,44,44,44,44,
|
431
|
+
44,44,44,44,75,44,72,72,
|
432
|
+
72,72,72,44,44,44,44,44,
|
433
|
+
44,44,44,44,44,44,44,44,
|
434
|
+
44,44,44,44,44,72,44,44,
|
435
|
+
44,44,44,44,44,44,44,44,
|
436
|
+
44,44,44,44,44,81,81,81,
|
437
|
+
81,81,81,81,81,81,81,44,
|
438
|
+
44,44,44,44,44,44,81,81,
|
439
|
+
81,81,81,81,44,44,44,44,
|
440
|
+
44,44,44,44,44,44,44,44,
|
441
|
+
44,44,44,44,44,44,44,44,
|
442
|
+
44,44,44,44,44,44,81,81,
|
443
|
+
81,81,81,81,44,44,44,44,
|
444
|
+
44,44,44,44,44,44,44,44,
|
445
|
+
44,44,44,44,44,44,44,44,
|
446
|
+
44,44,75,44,72,72,72,72,
|
447
|
+
72,44,44,44,44,44,44,44,
|
448
|
+
44,44,44,44,44,44,44,44,
|
449
|
+
44,44,44,72,44,44,44,44,
|
450
|
+
44,44,44,44,44,44,44,44,
|
451
|
+
44,44,44,44,44,44,44,44,
|
452
|
+
44,44,44,44,44,44,44,44,
|
453
|
+
44,44,44,44,44,44,44,44,
|
454
|
+
44,44,44,44,44,44,44,44,
|
455
|
+
44,44,44,44,44,44,44,44,
|
456
|
+
44,44,44,44,44,44,44,44,
|
457
|
+
44,44,44,44,44,44,44,44,
|
458
|
+
44,44,44,44,44,44,44,44,
|
459
|
+
44,44,44,44,44,44,44,44,
|
460
|
+
44,44,44,44,44,44,44,44,
|
461
|
+
75,44,83,83,83,83,83,83,
|
462
|
+
83,83,83,83,82,82,82,82,
|
463
|
+
82,82,82,83,83,83,83,83,
|
464
|
+
83,82,82,82,82,82,82,82,
|
465
|
+
82,82,82,82,82,82,82,82,
|
466
|
+
82,82,82,82,82,82,82,82,
|
467
|
+
82,82,82,83,83,83,83,83,
|
468
|
+
83,82,82,82,82,82,82,82,
|
469
|
+
82,82,82,82,82,82,82,82,
|
470
|
+
82,82,82,82,82,44,82,86,
|
471
|
+
85,87,84,87,84,84,84,84,
|
472
|
+
84,84,88,88,88,88,88,88,
|
473
|
+
88,88,88,88,84,86,89,44,
|
474
|
+
44,44,44,44,44,44,44,44,
|
475
|
+
44,44,44,44,44,44,44,44,
|
476
|
+
44,44,44,44,44,44,44,44,
|
477
|
+
44,44,44,44,44,44,44,44,
|
478
|
+
44,44,44,44,44,44,44,44,
|
479
|
+
44,44,44,44,44,44,44,44,
|
480
|
+
44,44,44,44,44,44,44,44,
|
481
|
+
44,44,44,44,44,44,44,44,
|
482
|
+
44,2,2,2,2,2,2,2,
|
483
|
+
2,2,2,2,2,2,2,2,
|
484
|
+
2,2,2,2,2,2,2,2,
|
485
|
+
2,2,2,2,2,2,2,3,
|
486
|
+
3,3,3,3,3,3,3,3,
|
487
|
+
3,3,3,3,3,3,3,90,
|
488
|
+
90,90,90,90,44,44,44,44,
|
489
|
+
44,44,44,44,44,44,44,44,
|
490
|
+
91,91,91,91,91,91,91,91,
|
491
|
+
92,92,92,92,92,91,91,91,
|
492
|
+
91,91,91,91,91,91,91,91,
|
493
|
+
91,91,91,91,91,91,91,93,
|
494
|
+
94,94,95,96,94,94,94,97,
|
495
|
+
98,99,100,94,94,101,94,94,
|
496
|
+
94,94,94,94,94,94,94,94,
|
497
|
+
94,94,94,94,94,94,102,94,
|
498
|
+
94,94,94,94,94,94,94,94,
|
499
|
+
94,94,94,94,94,94,94,94,
|
500
|
+
94,94,94,94,94,94,94,94,
|
501
|
+
94,94,103,104,105,106,94,94,
|
502
|
+
94,94,94,94,94,94,94,94,
|
503
|
+
94,94,94,94,94,94,94,94,
|
504
|
+
94,94,94,94,94,94,94,94,
|
505
|
+
94,94,107,108,105,94,91,94,
|
506
|
+
2,2,2,2,2,2,2,2,
|
507
|
+
2,2,2,2,2,2,2,2,
|
508
|
+
2,2,2,2,2,2,2,2,
|
509
|
+
2,2,2,2,2,2,3,3,
|
510
|
+
3,3,3,3,3,3,3,3,
|
511
|
+
3,3,3,3,3,3,90,90,
|
512
|
+
90,90,90,109,91,91,91,91,
|
513
|
+
91,91,91,91,91,91,91,91,
|
514
|
+
91,91,91,91,91,91,91,91,
|
515
|
+
91,91,91,91,91,91,91,91,
|
516
|
+
91,91,91,109,109,109,109,109,
|
517
|
+
109,109,109,109,109,109,109,109,
|
518
|
+
109,109,109,109,109,109,109,109,
|
519
|
+
109,109,109,109,109,109,109,109,
|
520
|
+
109,109,109,109,109,109,109,109,
|
521
|
+
109,109,109,109,109,109,109,109,
|
522
|
+
109,109,109,109,109,109,109,109,
|
523
|
+
109,109,109,109,109,109,109,109,
|
524
|
+
109,109,109,109,109,109,109,109,
|
525
|
+
109,109,109,109,109,109,109,109,
|
526
|
+
109,109,109,109,109,109,109,109,
|
527
|
+
109,109,109,109,109,109,109,109,
|
528
|
+
109,109,91,109,91,91,91,91,
|
529
|
+
91,91,91,91,92,92,92,92,
|
530
|
+
92,91,91,91,91,91,91,91,
|
531
|
+
91,91,91,91,91,91,91,91,
|
532
|
+
91,91,91,93,110,110,110,110,
|
533
|
+
110,110,110,110,110,110,110,110,
|
534
|
+
110,110,110,110,110,110,110,110,
|
535
|
+
110,110,110,110,110,110,110,110,
|
536
|
+
110,110,110,110,110,110,110,110,
|
537
|
+
110,110,110,110,110,110,110,110,
|
538
|
+
110,110,110,110,110,110,110,110,
|
539
|
+
110,110,110,110,110,110,110,110,
|
540
|
+
110,110,110,110,110,110,110,110,
|
541
|
+
110,110,110,110,110,110,110,110,
|
542
|
+
110,110,110,110,110,110,110,110,
|
543
|
+
110,110,110,110,110,110,110,110,
|
544
|
+
110,110,91,110,93,93,93,93,
|
545
|
+
93,110,110,110,110,110,110,110,
|
546
|
+
110,110,110,110,110,110,110,110,
|
547
|
+
110,110,110,93,110,94,94,109,
|
548
|
+
109,94,94,94,109,109,109,109,
|
549
|
+
94,94,109,94,94,94,94,94,
|
550
|
+
94,94,94,94,94,94,94,94,
|
551
|
+
94,94,94,109,94,94,94,94,
|
552
|
+
94,94,94,94,94,94,94,94,
|
553
|
+
94,94,94,94,94,94,94,94,
|
554
|
+
94,94,94,94,94,94,94,109,
|
555
|
+
109,109,109,94,94,94,94,94,
|
556
|
+
94,94,94,94,94,94,94,94,
|
557
|
+
94,94,94,94,94,94,94,94,
|
558
|
+
94,94,94,94,94,94,94,109,
|
559
|
+
109,109,94,109,112,95,114,113,
|
560
|
+
10,116,5,116,116,116,117,118,
|
561
|
+
115,116,116,116,116,116,116,116,
|
562
|
+
116,116,116,116,116,116,116,116,
|
563
|
+
116,8,116,119,10,8,116,116,
|
564
|
+
116,116,116,116,116,116,116,116,
|
565
|
+
116,116,116,116,116,116,116,116,
|
566
|
+
116,116,116,116,116,116,116,116,
|
567
|
+
116,116,116,116,116,116,116,116,
|
568
|
+
116,116,116,116,116,116,116,116,
|
569
|
+
116,116,116,116,116,116,116,116,
|
570
|
+
116,116,116,116,116,116,116,116,
|
571
|
+
116,116,116,116,116,8,116,115,
|
572
|
+
116,115,116,116,116,115,115,115,
|
573
|
+
116,116,116,116,116,116,116,116,
|
574
|
+
116,116,116,116,116,116,116,116,
|
575
|
+
120,116,115,115,115,116,116,116,
|
576
|
+
116,116,116,116,116,116,116,116,
|
577
|
+
116,116,116,116,116,116,116,116,
|
578
|
+
116,116,116,116,116,116,116,116,
|
579
|
+
116,116,116,116,116,116,116,116,
|
580
|
+
116,116,116,116,116,116,116,116,
|
581
|
+
116,116,116,116,116,116,116,116,
|
582
|
+
116,116,116,116,116,116,116,116,
|
583
|
+
116,116,116,116,115,116,8,9,
|
584
|
+
123,122,122,122,122,122,122,122,
|
585
|
+
122,122,122,122,122,122,122,122,
|
586
|
+
122,122,122,122,123,122,125,124,
|
587
|
+
124,124,124,124,124,124,124,124,
|
588
|
+
124,124,124,124,124,124,124,124,
|
589
|
+
124,124,125,124,127,126,126,126,
|
590
|
+
126,126,126,126,126,126,126,126,
|
591
|
+
126,126,126,126,126,126,126,126,
|
592
|
+
127,126,129,129,128,128,128,128,
|
593
|
+
129,128,128,128,130,128,128,128,
|
594
|
+
128,128,128,128,128,128,128,128,
|
595
|
+
128,128,128,129,128,128,128,128,
|
596
|
+
128,128,128,129,128,128,128,128,
|
597
|
+
131,128,128,128,132,128,128,128,
|
598
|
+
128,128,128,128,128,128,128,128,
|
599
|
+
128,128,128,129,128,134,133,133,
|
600
|
+
133,42,42,42,42,42,42,42,
|
601
|
+
42,42,42,133,135,44,44,44,
|
602
|
+
135,44,44,44,44,44,44,44,
|
603
|
+
44,44,135,135,44,44,44,135,
|
604
|
+
135,44,44,44,44,44,44,44,
|
605
|
+
44,44,44,44,135,44,44,44,
|
606
|
+
135,44,44,44,44,44,44,44,
|
607
|
+
44,44,44,135,44,44,44,135,
|
608
|
+
44,136,44,44,44,44,44,44,
|
609
|
+
44,44,44,44,44,44,44,44,
|
610
|
+
44,44,44,44,44,44,44,44,
|
611
|
+
44,44,44,44,44,44,44,44,
|
612
|
+
44,136,44,137,137,137,137,137,
|
613
|
+
137,137,137,137,137,137,137,137,
|
614
|
+
137,137,137,137,137,137,137,137,
|
615
|
+
137,137,137,137,137,137,137,137,
|
616
|
+
137,138,138,138,138,138,138,138,
|
617
|
+
138,138,138,138,138,138,138,138,
|
618
|
+
138,139,139,139,139,139,49,49,
|
619
|
+
49,49,49,49,49,49,49,49,
|
620
|
+
49,49,49,49,49,49,49,49,
|
621
|
+
49,49,49,49,49,49,49,49,
|
622
|
+
49,49,49,49,49,49,49,49,
|
623
|
+
49,49,49,49,49,49,49,49,
|
624
|
+
49,49,49,49,49,140,49,141,
|
625
|
+
49,140,140,140,140,49,142,140,
|
626
|
+
49,49,49,49,49,49,49,49,
|
627
|
+
49,49,49,49,49,49,49,49,
|
628
|
+
140,49,49,49,49,49,49,49,
|
629
|
+
49,49,49,49,49,49,49,49,
|
630
|
+
49,49,49,49,49,49,49,49,
|
631
|
+
49,49,49,49,143,144,145,146,
|
632
|
+
49,49,49,49,49,49,49,49,
|
633
|
+
49,49,49,49,49,49,49,49,
|
634
|
+
49,49,49,49,49,49,49,49,
|
635
|
+
49,49,49,49,140,140,140,49,
|
636
|
+
49,49,49,49,49,49,49,49,
|
637
|
+
49,49,49,49,49,49,49,49,
|
638
|
+
49,49,49,49,49,49,49,49,
|
639
|
+
49,49,49,49,49,49,49,49,
|
640
|
+
49,49,49,49,49,49,49,49,
|
641
|
+
49,49,49,49,49,49,49,49,
|
642
|
+
49,49,49,49,49,49,49,49,
|
643
|
+
49,49,49,49,49,49,49,49,
|
644
|
+
147,50,50,50,50,50,50,50,
|
645
|
+
50,50,50,50,50,50,50,50,
|
646
|
+
50,50,50,50,50,50,50,50,
|
647
|
+
50,50,50,50,50,50,50,50,
|
648
|
+
50,50,50,50,50,50,50,50,
|
649
|
+
50,50,50,50,50,50,50,50,
|
650
|
+
50,50,50,50,50,50,50,50,
|
651
|
+
50,50,50,50,50,50,50,50,
|
652
|
+
50,147,148,148,148,148,148,148,
|
653
|
+
148,148,148,148,148,148,148,148,
|
654
|
+
148,148,148,148,148,148,148,148,
|
655
|
+
148,148,148,148,148,148,148,148,
|
656
|
+
148,148,148,148,148,148,148,148,
|
657
|
+
148,148,148,148,148,148,148,148,
|
658
|
+
148,148,148,148,148,148,148,148,
|
659
|
+
148,148,148,148,148,148,148,148,
|
660
|
+
148,148,147,149,147,151,150,150,
|
661
|
+
150,150,150,150,150,150,150,150,
|
662
|
+
150,150,150,150,150,150,150,150,
|
663
|
+
150,150,150,150,150,150,150,150,
|
664
|
+
150,150,150,150,150,150,150,150,
|
665
|
+
150,150,150,150,150,150,150,150,
|
666
|
+
150,150,150,150,150,150,150,150,
|
667
|
+
150,150,150,150,152,150,54,154,
|
668
|
+
156,156,156,156,156,156,156,156,
|
669
|
+
155,155,155,155,155,155,155,155,
|
670
|
+
155,155,155,157,157,155,155,155,
|
671
|
+
157,155,155,155,155,157,155,155,
|
672
|
+
157,155,155,157,155,155,155,157,
|
673
|
+
155,155,155,157,157,157,155,155,
|
674
|
+
155,157,157,157,157,157,157,155,
|
675
|
+
157,155,155,155,155,155,157,155,
|
676
|
+
157,155,157,157,157,157,157,157,
|
677
|
+
157,155,159,159,159,159,159,159,
|
678
|
+
159,159,158,160,160,160,160,160,
|
679
|
+
160,160,160,158,161,161,161,161,
|
680
|
+
161,161,161,161,161,161,161,161,
|
681
|
+
161,161,161,161,161,161,161,161,
|
682
|
+
161,161,161,161,161,161,161,161,
|
683
|
+
161,161,162,162,162,162,162,162,
|
684
|
+
162,162,162,162,162,162,162,162,
|
685
|
+
162,162,163,163,163,163,163,59,
|
686
|
+
59,59,59,59,59,59,59,59,
|
687
|
+
59,59,59,59,59,59,59,59,
|
688
|
+
59,59,59,59,59,59,59,59,
|
689
|
+
59,59,59,59,59,59,59,59,
|
690
|
+
59,59,59,59,59,59,59,59,
|
691
|
+
59,59,59,59,59,59,164,59,
|
692
|
+
59,59,164,164,164,164,59,59,
|
693
|
+
164,59,165,166,166,166,166,166,
|
694
|
+
166,166,167,167,59,59,59,59,
|
695
|
+
59,164,59,44,44,168,169,59,
|
696
|
+
59,44,169,59,59,44,59,170,
|
697
|
+
59,59,171,59,169,169,59,59,
|
698
|
+
59,169,169,59,44,164,164,164,
|
699
|
+
164,59,59,172,172,61,169,172,
|
700
|
+
172,59,169,59,59,59,59,59,
|
701
|
+
172,59,171,59,172,169,172,173,
|
702
|
+
172,169,174,59,44,164,164,164,
|
703
|
+
59,59,59,59,59,59,59,59,
|
704
|
+
59,59,59,59,59,59,59,59,
|
705
|
+
59,59,59,59,59,59,59,59,
|
706
|
+
59,59,59,59,59,59,59,59,
|
707
|
+
59,59,59,59,59,59,59,59,
|
708
|
+
59,59,59,59,59,59,59,59,
|
709
|
+
59,59,59,59,59,59,59,59,
|
710
|
+
59,59,59,59,59,59,59,59,
|
711
|
+
59,175,60,60,60,60,60,60,
|
712
|
+
60,60,60,60,60,60,60,60,
|
713
|
+
60,60,60,60,60,60,60,60,
|
714
|
+
60,60,60,60,60,60,60,60,
|
715
|
+
60,60,60,60,60,60,60,60,
|
716
|
+
60,60,60,60,60,60,60,60,
|
717
|
+
60,60,60,60,60,60,60,60,
|
718
|
+
60,60,60,60,60,60,60,60,
|
719
|
+
60,60,175,176,176,176,176,176,
|
720
|
+
176,176,176,176,176,176,176,176,
|
721
|
+
176,176,176,176,176,176,176,176,
|
722
|
+
176,176,176,176,176,176,176,176,
|
723
|
+
176,176,176,176,176,176,176,176,
|
724
|
+
176,176,176,176,176,176,176,176,
|
725
|
+
176,176,176,176,176,176,176,176,
|
726
|
+
176,176,176,176,176,176,176,176,
|
727
|
+
176,176,176,175,178,178,178,178,
|
728
|
+
178,178,178,178,177,180,180,180,
|
729
|
+
180,180,180,180,180,179,182,182,
|
730
|
+
182,182,182,182,182,182,182,182,
|
731
|
+
181,184,62,186,185,62,188,67,
|
732
|
+
67,67,67,67,67,67,67,67,
|
733
|
+
67,67,67,67,67,67,67,67,
|
734
|
+
67,67,67,67,67,67,67,67,
|
735
|
+
67,67,67,67,67,67,189,67,
|
736
|
+
191,190,67,70,67,193,193,193,
|
737
|
+
193,193,193,193,193,193,193,192,
|
738
|
+
192,192,192,192,192,192,193,193,
|
739
|
+
193,193,193,193,192,192,192,192,
|
740
|
+
192,192,192,192,192,192,192,192,
|
741
|
+
192,192,192,192,192,192,192,192,
|
742
|
+
192,192,192,192,192,192,193,193,
|
743
|
+
193,193,193,193,192,195,194,194,
|
744
|
+
194,194,194,196,194,194,197,197,
|
745
|
+
197,197,197,197,197,197,197,197,
|
746
|
+
194,194,198,194,86,85,85,85,
|
747
|
+
85,85,199,85,85,199,199,199,
|
748
|
+
199,199,199,199,199,199,199,85,
|
749
|
+
88,88,88,88,88,88,88,88,
|
750
|
+
88,88,199,87,199,199,199,199,
|
751
|
+
199,199,88,88,88,88,88,88,
|
752
|
+
88,88,88,88,199,199,89,89,
|
753
|
+
89,89,89,89,89,89,89,89,
|
754
|
+
89,199,89,89,199,199,199,199,
|
755
|
+
199,199,199,199,199,199,89,89,
|
756
|
+
89,89,86,89,0
|
808
757
|
]
|
809
758
|
|
810
759
|
class << self
|
@@ -812,31 +761,31 @@ class << self
|
|
812
761
|
private :_re_scanner_trans_targs, :_re_scanner_trans_targs=
|
813
762
|
end
|
814
763
|
self._re_scanner_trans_targs = [
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
764
|
+
71,72,1,2,71,4,71,6,
|
765
|
+
71,8,71,81,71,10,16,11,
|
766
|
+
71,12,13,14,15,17,18,19,
|
767
|
+
20,21,23,29,24,71,25,26,
|
768
|
+
27,28,30,31,32,33,34,71,
|
769
|
+
36,71,37,39,0,40,41,88,
|
770
|
+
89,89,42,89,89,89,45,46,
|
771
|
+
89,89,99,99,47,50,99,106,
|
772
|
+
99,108,53,99,109,99,111,56,
|
773
|
+
59,57,58,99,60,61,62,63,
|
774
|
+
64,65,99,113,114,67,68,114,
|
775
|
+
69,70,3,73,74,75,76,77,
|
776
|
+
71,78,71,82,83,71,84,71,
|
777
|
+
85,71,71,86,71,71,71,71,
|
778
|
+
71,71,79,71,80,5,71,7,
|
779
|
+
71,71,71,71,71,71,71,71,
|
780
|
+
71,71,71,9,22,71,35,87,
|
781
|
+
38,90,91,92,89,93,94,95,
|
782
|
+
89,89,89,89,43,89,89,44,
|
783
|
+
89,89,89,96,97,96,96,98,
|
784
|
+
96,100,101,102,99,103,103,105,
|
785
|
+
49,99,52,99,99,55,66,99,
|
786
|
+
48,99,104,99,99,99,99,99,
|
787
|
+
107,99,51,99,110,112,99,54,
|
788
|
+
99,99,114,115,116,117,118,114
|
840
789
|
]
|
841
790
|
|
842
791
|
class << self
|
@@ -844,31 +793,31 @@ class << self
|
|
844
793
|
private :_re_scanner_trans_actions, :_re_scanner_trans_actions=
|
845
794
|
end
|
846
795
|
self._re_scanner_trans_actions = [
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
796
|
+
1,2,0,0,3,0,4,0,
|
797
|
+
5,0,6,7,8,0,0,0,
|
798
|
+
9,0,0,0,0,0,0,0,
|
799
|
+
0,0,0,0,0,10,0,0,
|
800
|
+
0,0,0,0,0,0,0,11,
|
801
|
+
0,12,0,0,0,0,0,14,
|
802
|
+
15,16,0,17,18,19,0,0,
|
803
|
+
20,21,22,23,0,0,25,0,
|
804
|
+
26,0,0,27,0,28,0,0,
|
805
|
+
0,0,0,29,0,0,0,0,
|
806
|
+
0,0,30,0,31,0,0,32,
|
807
|
+
0,0,0,0,0,0,0,0,
|
808
|
+
35,36,37,0,0,38,0,39,
|
809
|
+
40,41,42,40,43,44,45,46,
|
810
|
+
47,48,49,50,0,0,51,0,
|
811
|
+
52,53,54,55,56,57,58,59,
|
812
|
+
60,61,62,0,0,63,0,65,
|
813
|
+
0,0,40,40,66,0,40,67,
|
814
|
+
68,69,70,71,0,72,73,0,
|
815
|
+
74,75,76,77,0,78,79,0,
|
816
|
+
80,0,40,40,81,82,83,0,
|
817
|
+
0,84,0,85,86,0,0,87,
|
818
|
+
0,88,0,89,90,91,92,93,
|
819
|
+
40,94,0,95,40,0,96,0,
|
820
|
+
97,98,99,40,40,40,40,100
|
872
821
|
]
|
873
822
|
|
874
823
|
class << self
|
@@ -876,21 +825,21 @@ class << self
|
|
876
825
|
private :_re_scanner_to_state_actions, :_re_scanner_to_state_actions=
|
877
826
|
end
|
878
827
|
self._re_scanner_to_state_actions = [
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
828
|
+
0,0,0,0,0,0,0,0,
|
829
|
+
0,0,0,0,0,0,0,0,
|
830
|
+
0,0,0,0,0,0,0,0,
|
831
|
+
0,0,0,0,0,0,0,0,
|
832
|
+
0,0,0,0,0,0,0,0,
|
833
|
+
0,0,0,0,0,0,0,0,
|
834
|
+
0,0,0,0,0,0,0,0,
|
835
|
+
0,0,0,0,0,0,0,0,
|
836
|
+
0,0,0,0,0,0,0,33,
|
837
|
+
0,0,0,0,0,0,0,0,
|
838
|
+
0,0,0,0,0,0,0,64,
|
839
|
+
64,64,0,0,0,0,0,0,
|
840
|
+
64,0,0,64,0,0,0,0,
|
841
|
+
0,0,0,0,0,0,0,0,
|
842
|
+
0,0,64,0,0,0,0
|
894
843
|
]
|
895
844
|
|
896
845
|
class << self
|
@@ -898,21 +847,21 @@ class << self
|
|
898
847
|
private :_re_scanner_from_state_actions, :_re_scanner_from_state_actions=
|
899
848
|
end
|
900
849
|
self._re_scanner_from_state_actions = [
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
850
|
+
0,0,0,0,0,0,0,0,
|
851
|
+
0,0,0,0,0,0,0,0,
|
852
|
+
0,0,0,0,0,0,0,0,
|
853
|
+
0,0,0,0,0,0,0,0,
|
854
|
+
0,0,0,0,0,0,0,0,
|
855
|
+
0,0,0,0,0,0,0,0,
|
856
|
+
0,0,0,0,0,0,0,0,
|
857
|
+
0,0,0,0,0,0,0,0,
|
858
|
+
0,0,0,0,0,0,0,34,
|
859
|
+
0,0,0,0,0,0,0,0,
|
860
|
+
0,0,0,0,0,0,0,34,
|
861
|
+
34,34,0,0,0,0,0,0,
|
862
|
+
34,0,0,34,0,0,0,0,
|
863
|
+
0,0,0,0,0,0,0,0,
|
864
|
+
0,0,34,0,0,0,0
|
916
865
|
]
|
917
866
|
|
918
867
|
class << self
|
@@ -920,21 +869,21 @@ class << self
|
|
920
869
|
private :_re_scanner_eof_actions, :_re_scanner_eof_actions=
|
921
870
|
end
|
922
871
|
self._re_scanner_eof_actions = [
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
872
|
+
0,0,0,0,0,0,0,0,
|
873
|
+
0,0,0,0,0,0,0,0,
|
874
|
+
0,0,0,0,0,0,0,0,
|
875
|
+
0,0,0,0,0,0,0,0,
|
876
|
+
0,0,0,0,0,0,13,13,
|
877
|
+
13,13,0,0,0,0,0,0,
|
878
|
+
0,24,24,0,24,24,0,24,
|
879
|
+
24,24,24,24,24,24,24,24,
|
880
|
+
24,24,24,0,0,0,0,0,
|
881
|
+
0,0,0,0,0,0,0,0,
|
882
|
+
0,0,0,0,0,0,0,0,
|
883
|
+
0,24,0,0,0,0,0,0,
|
884
|
+
0,0,0,24,0,0,0,0,
|
885
|
+
0,0,0,0,0,0,0,0,
|
886
|
+
0,0,0,0,0,0,0
|
938
887
|
]
|
939
888
|
|
940
889
|
class << self
|
@@ -942,31 +891,31 @@ class << self
|
|
942
891
|
private :_re_scanner_eof_trans, :_re_scanner_eof_trans=
|
943
892
|
end
|
944
893
|
self._re_scanner_eof_trans = [
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
894
|
+
0,1,1,1,5,5,5,5,
|
895
|
+
1,13,13,13,13,13,13,13,
|
896
|
+
13,13,13,13,13,13,13,13,
|
897
|
+
13,13,13,13,13,13,13,13,
|
898
|
+
13,13,13,40,40,40,0,0,
|
899
|
+
0,0,49,49,52,54,54,59,
|
900
|
+
59,0,0,65,0,0,70,0,
|
901
|
+
0,0,0,0,0,0,0,0,
|
902
|
+
0,0,0,85,85,85,85,0,
|
903
|
+
110,110,111,111,110,112,114,116,
|
904
|
+
116,122,123,125,127,129,134,0,
|
905
|
+
0,0,148,148,148,148,151,154,
|
906
|
+
0,159,159,0,176,176,176,178,
|
907
|
+
180,182,184,184,184,188,188,188,
|
908
|
+
188,193,0,200,200,200,200
|
960
909
|
]
|
961
910
|
|
962
911
|
class << self
|
963
912
|
attr_accessor :re_scanner_start
|
964
913
|
end
|
965
|
-
self.re_scanner_start =
|
914
|
+
self.re_scanner_start = 71;
|
966
915
|
class << self
|
967
916
|
attr_accessor :re_scanner_first_final
|
968
917
|
end
|
969
|
-
self.re_scanner_first_final =
|
918
|
+
self.re_scanner_first_final = 71;
|
970
919
|
class << self
|
971
920
|
attr_accessor :re_scanner_error
|
972
921
|
end
|
@@ -975,19 +924,19 @@ self.re_scanner_error = 0;
|
|
975
924
|
class << self
|
976
925
|
attr_accessor :re_scanner_en_char_type
|
977
926
|
end
|
978
|
-
self.re_scanner_en_char_type =
|
927
|
+
self.re_scanner_en_char_type = 87;
|
979
928
|
class << self
|
980
929
|
attr_accessor :re_scanner_en_unicode_property
|
981
930
|
end
|
982
|
-
self.re_scanner_en_unicode_property =
|
931
|
+
self.re_scanner_en_unicode_property = 88;
|
983
932
|
class << self
|
984
933
|
attr_accessor :re_scanner_en_character_set
|
985
934
|
end
|
986
|
-
self.re_scanner_en_character_set =
|
935
|
+
self.re_scanner_en_character_set = 89;
|
987
936
|
class << self
|
988
937
|
attr_accessor :re_scanner_en_set_escape_sequence
|
989
938
|
end
|
990
|
-
self.re_scanner_en_set_escape_sequence =
|
939
|
+
self.re_scanner_en_set_escape_sequence = 96;
|
991
940
|
class << self
|
992
941
|
attr_accessor :re_scanner_en_escape_sequence
|
993
942
|
end
|
@@ -995,16 +944,12 @@ self.re_scanner_en_escape_sequence = 99;
|
|
995
944
|
class << self
|
996
945
|
attr_accessor :re_scanner_en_conditional_expression
|
997
946
|
end
|
998
|
-
self.re_scanner_en_conditional_expression =
|
947
|
+
self.re_scanner_en_conditional_expression = 114;
|
999
948
|
class << self
|
1000
949
|
attr_accessor :re_scanner_en_main
|
1001
950
|
end
|
1002
|
-
self.re_scanner_en_main =
|
1003
|
-
|
951
|
+
self.re_scanner_en_main = 71;
|
1004
952
|
|
1005
|
-
# line 744 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1006
|
-
|
1007
|
-
# line 1007 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner.rb"
|
1008
953
|
begin
|
1009
954
|
p ||= 0
|
1010
955
|
pe ||= data.length
|
@@ -1015,9 +960,6 @@ begin
|
|
1015
960
|
act = 0
|
1016
961
|
end
|
1017
962
|
|
1018
|
-
# line 745 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1019
|
-
|
1020
|
-
# line 1020 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner.rb"
|
1021
963
|
begin
|
1022
964
|
testEof = false
|
1023
965
|
_slen, _trans, _keys, _inds, _acts, _nacts = nil
|
@@ -1039,24 +981,22 @@ begin
|
|
1039
981
|
end
|
1040
982
|
end
|
1041
983
|
if _goto_level <= _resume
|
1042
|
-
case _re_scanner_from_state_actions[cs]
|
984
|
+
case _re_scanner_from_state_actions[cs]
|
1043
985
|
when 34 then
|
1044
|
-
# line 1 "NONE"
|
1045
986
|
begin
|
1046
987
|
ts = p
|
1047
988
|
end
|
1048
|
-
# line 1048 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner.rb"
|
1049
989
|
end
|
1050
990
|
_keys = cs << 1
|
1051
991
|
_inds = _re_scanner_index_offsets[cs]
|
1052
992
|
_slen = _re_scanner_key_spans[cs]
|
1053
993
|
_wide = data[p].ord
|
1054
|
-
_trans = if ( _slen > 0 &&
|
1055
|
-
_re_scanner_trans_keys[_keys] <= _wide &&
|
1056
|
-
_wide <= _re_scanner_trans_keys[_keys + 1]
|
994
|
+
_trans = if ( _slen > 0 &&
|
995
|
+
_re_scanner_trans_keys[_keys] <= _wide &&
|
996
|
+
_wide <= _re_scanner_trans_keys[_keys + 1]
|
1057
997
|
) then
|
1058
|
-
_re_scanner_indicies[ _inds + _wide - _re_scanner_trans_keys[_keys] ]
|
1059
|
-
else
|
998
|
+
_re_scanner_indicies[ _inds + _wide - _re_scanner_trans_keys[_keys] ]
|
999
|
+
else
|
1060
1000
|
_re_scanner_indicies[ _inds + _slen ]
|
1061
1001
|
end
|
1062
1002
|
end
|
@@ -1065,24 +1005,17 @@ ts = p
|
|
1065
1005
|
if _re_scanner_trans_actions[_trans] != 0
|
1066
1006
|
case _re_scanner_trans_actions[_trans]
|
1067
1007
|
when 36 then
|
1068
|
-
# line 152 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1069
1008
|
begin
|
1070
1009
|
self.group_depth = group_depth + 1 end
|
1071
|
-
when 4 then
|
1072
|
-
# line 153 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1073
|
-
begin
|
1074
|
-
self.group_depth = group_depth - 1 end
|
1075
1010
|
when 40 then
|
1076
|
-
# line 1 "NONE"
|
1077
1011
|
begin
|
1078
1012
|
te = p+1
|
1079
1013
|
end
|
1080
|
-
when
|
1081
|
-
# line 12 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/char_type.rl"
|
1014
|
+
when 65 then
|
1082
1015
|
begin
|
1083
1016
|
te = p+1
|
1084
|
-
begin
|
1085
|
-
case text = copy(data, ts-1,
|
1017
|
+
begin
|
1018
|
+
case text = copy(data, ts-1,te)
|
1086
1019
|
when '\d'; emit(:type, :digit, text)
|
1087
1020
|
when '\D'; emit(:type, :nondigit, text)
|
1088
1021
|
when '\h'; emit(:type, :hex, text)
|
@@ -1104,17 +1037,16 @@ te = p+1
|
|
1104
1037
|
end
|
1105
1038
|
end
|
1106
1039
|
when 14 then
|
1107
|
-
# line 16 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/property.rl"
|
1108
1040
|
begin
|
1109
1041
|
te = p+1
|
1110
|
-
begin
|
1111
|
-
text = copy(data, ts-1,
|
1042
|
+
begin
|
1043
|
+
text = copy(data, ts-1,te)
|
1112
1044
|
type = (text[1] == 'P') ^ (text[3] == '^') ? :nonproperty : :property
|
1113
1045
|
|
1114
|
-
name =
|
1046
|
+
name = text[3..-2].gsub(/[\^\s_\-]/, '').downcase
|
1115
1047
|
|
1116
1048
|
token = self.class.short_prop_map[name] || self.class.long_prop_map[name]
|
1117
|
-
|
1049
|
+
raise ValidationError.for(:property, name) unless token
|
1118
1050
|
|
1119
1051
|
self.emit(type, token.to_sym, text)
|
1120
1052
|
|
@@ -1128,7 +1060,6 @@ te = p+1
|
|
1128
1060
|
end
|
1129
1061
|
end
|
1130
1062
|
when 18 then
|
1131
|
-
# line 180 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1132
1063
|
begin
|
1133
1064
|
te = p+1
|
1134
1065
|
begin # special case, emits two tokens
|
@@ -1136,122 +1067,111 @@ te = p+1
|
|
1136
1067
|
emit(:set, :intersection, '&&')
|
1137
1068
|
end
|
1138
1069
|
end
|
1139
|
-
when
|
1140
|
-
# line 185 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1070
|
+
when 70 then
|
1141
1071
|
begin
|
1142
1072
|
te = p+1
|
1143
|
-
begin
|
1144
|
-
|
1145
|
-
|
1146
|
-
emit(:set, :negate, text)
|
1073
|
+
begin
|
1074
|
+
if prev_token[1] == :open
|
1075
|
+
emit(:set, :negate, '^')
|
1147
1076
|
else
|
1148
|
-
emit(:literal, :literal,
|
1077
|
+
emit(:literal, :literal, '^')
|
1149
1078
|
end
|
1150
1079
|
end
|
1151
1080
|
end
|
1152
|
-
when
|
1153
|
-
# line 206 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1081
|
+
when 72 then
|
1154
1082
|
begin
|
1155
1083
|
te = p+1
|
1156
|
-
begin
|
1157
|
-
emit(:set, :intersection,
|
1084
|
+
begin
|
1085
|
+
emit(:set, :intersection, '&&')
|
1158
1086
|
end
|
1159
1087
|
end
|
1160
|
-
when
|
1161
|
-
# line 210 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1088
|
+
when 68 then
|
1162
1089
|
begin
|
1163
1090
|
te = p+1
|
1164
|
-
begin
|
1091
|
+
begin
|
1165
1092
|
begin
|
1166
1093
|
stack[top] = cs
|
1167
1094
|
top+= 1
|
1168
|
-
cs =
|
1095
|
+
cs = 96
|
1169
1096
|
_goto_level = _again
|
1170
1097
|
next
|
1171
1098
|
end
|
1172
1099
|
|
1173
1100
|
end
|
1174
1101
|
end
|
1175
|
-
when
|
1176
|
-
# line 244 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1102
|
+
when 66 then
|
1177
1103
|
begin
|
1178
1104
|
te = p+1
|
1179
|
-
begin
|
1105
|
+
begin
|
1180
1106
|
emit(:literal, :literal, copy(data, ts, te))
|
1181
1107
|
end
|
1182
1108
|
end
|
1183
1109
|
when 16 then
|
1184
|
-
# line 248 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1185
1110
|
begin
|
1186
1111
|
te = p+1
|
1187
|
-
begin
|
1112
|
+
begin
|
1188
1113
|
text = copy(data, ts, te)
|
1189
1114
|
emit(:literal, :literal, text)
|
1190
1115
|
end
|
1191
1116
|
end
|
1192
|
-
when
|
1193
|
-
# line 194 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1117
|
+
when 73 then
|
1194
1118
|
begin
|
1195
1119
|
te = p
|
1196
|
-
p = p - 1; begin
|
1197
|
-
|
1198
|
-
#
|
1199
|
-
if
|
1200
|
-
emit(:literal, :literal,
|
1120
|
+
p = p - 1; begin
|
1121
|
+
# ranges cant start with the opening bracket, a subset, or
|
1122
|
+
# intersection/negation/range operators
|
1123
|
+
if prev_token[0] == :set
|
1124
|
+
emit(:literal, :literal, '-')
|
1201
1125
|
else
|
1202
|
-
emit(:set, :range,
|
1126
|
+
emit(:set, :range, '-')
|
1203
1127
|
end
|
1204
1128
|
end
|
1205
1129
|
end
|
1206
|
-
when
|
1207
|
-
# line 214 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1130
|
+
when 76 then
|
1208
1131
|
begin
|
1209
1132
|
te = p
|
1210
|
-
p = p - 1; begin
|
1211
|
-
emit(:set, :open,
|
1133
|
+
p = p - 1; begin
|
1134
|
+
emit(:set, :open, '[')
|
1212
1135
|
begin
|
1213
1136
|
stack[top] = cs
|
1214
1137
|
top+= 1
|
1215
|
-
cs =
|
1138
|
+
cs = 89
|
1216
1139
|
_goto_level = _again
|
1217
1140
|
next
|
1218
1141
|
end
|
1219
1142
|
|
1220
1143
|
end
|
1221
1144
|
end
|
1222
|
-
when
|
1223
|
-
# line 248 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1145
|
+
when 71 then
|
1224
1146
|
begin
|
1225
1147
|
te = p
|
1226
|
-
p = p - 1; begin
|
1148
|
+
p = p - 1; begin
|
1227
1149
|
text = copy(data, ts, te)
|
1228
1150
|
emit(:literal, :literal, text)
|
1229
1151
|
end
|
1230
1152
|
end
|
1231
1153
|
when 17 then
|
1232
|
-
# line 194 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1233
1154
|
begin
|
1234
1155
|
begin p = ((te))-1; end
|
1235
|
-
begin
|
1236
|
-
|
1237
|
-
#
|
1238
|
-
if
|
1239
|
-
emit(:literal, :literal,
|
1156
|
+
begin
|
1157
|
+
# ranges cant start with the opening bracket, a subset, or
|
1158
|
+
# intersection/negation/range operators
|
1159
|
+
if prev_token[0] == :set
|
1160
|
+
emit(:literal, :literal, '-')
|
1240
1161
|
else
|
1241
|
-
emit(:set, :range,
|
1162
|
+
emit(:set, :range, '-')
|
1242
1163
|
end
|
1243
1164
|
end
|
1244
1165
|
end
|
1245
1166
|
when 20 then
|
1246
|
-
# line 214 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1247
1167
|
begin
|
1248
1168
|
begin p = ((te))-1; end
|
1249
|
-
begin
|
1250
|
-
emit(:set, :open,
|
1169
|
+
begin
|
1170
|
+
emit(:set, :open, '[')
|
1251
1171
|
begin
|
1252
1172
|
stack[top] = cs
|
1253
1173
|
top+= 1
|
1254
|
-
cs =
|
1174
|
+
cs = 89
|
1255
1175
|
_goto_level = _again
|
1256
1176
|
next
|
1257
1177
|
end
|
@@ -1259,21 +1179,33 @@ p = p - 1; begin
|
|
1259
1179
|
end
|
1260
1180
|
end
|
1261
1181
|
when 15 then
|
1262
|
-
# line 248 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1263
1182
|
begin
|
1264
1183
|
begin p = ((te))-1; end
|
1265
|
-
begin
|
1184
|
+
begin
|
1266
1185
|
text = copy(data, ts, te)
|
1267
1186
|
emit(:literal, :literal, text)
|
1268
1187
|
end
|
1269
1188
|
end
|
1270
|
-
when
|
1271
|
-
# line 257 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1189
|
+
when 80 then
|
1272
1190
|
begin
|
1273
1191
|
te = p+1
|
1274
|
-
begin
|
1192
|
+
begin
|
1193
|
+
emit(:escape, :octal, copy(data, ts-1,te))
|
1194
|
+
begin
|
1195
|
+
top -= 1
|
1196
|
+
cs = stack[top]
|
1197
|
+
_goto_level = _again
|
1198
|
+
next
|
1199
|
+
end
|
1200
|
+
|
1201
|
+
end
|
1202
|
+
end
|
1203
|
+
when 78 then
|
1204
|
+
begin
|
1205
|
+
te = p+1
|
1206
|
+
begin
|
1275
1207
|
p = p - 1;
|
1276
|
-
cs =
|
1208
|
+
cs = 89;
|
1277
1209
|
begin
|
1278
1210
|
stack[top] = cs
|
1279
1211
|
top+= 1
|
@@ -1284,12 +1216,11 @@ te = p+1
|
|
1284
1216
|
|
1285
1217
|
end
|
1286
1218
|
end
|
1287
|
-
when
|
1288
|
-
# line 263 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1219
|
+
when 77 then
|
1289
1220
|
begin
|
1290
1221
|
te = p+1
|
1291
|
-
begin
|
1292
|
-
emit(:escape, :literal, copy(data, ts-1,
|
1222
|
+
begin
|
1223
|
+
emit(:escape, :literal, copy(data, ts-1,te))
|
1293
1224
|
begin
|
1294
1225
|
top -= 1
|
1295
1226
|
cs = stack[top]
|
@@ -1299,13 +1230,11 @@ te = p+1
|
|
1299
1230
|
|
1300
1231
|
end
|
1301
1232
|
end
|
1302
|
-
when
|
1303
|
-
# line 273 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1233
|
+
when 79 then
|
1304
1234
|
begin
|
1305
|
-
te = p
|
1306
|
-
begin
|
1307
|
-
|
1308
|
-
emit(:backref, :number, text)
|
1235
|
+
te = p
|
1236
|
+
p = p - 1; begin
|
1237
|
+
emit(:escape, :octal, copy(data, ts-1,te))
|
1309
1238
|
begin
|
1310
1239
|
top -= 1
|
1311
1240
|
cs = stack[top]
|
@@ -1316,11 +1245,10 @@ te = p+1
|
|
1316
1245
|
end
|
1317
1246
|
end
|
1318
1247
|
when 90 then
|
1319
|
-
# line 279 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1320
1248
|
begin
|
1321
1249
|
te = p+1
|
1322
|
-
begin
|
1323
|
-
emit(:escape, :octal, copy(data, ts-1,
|
1250
|
+
begin
|
1251
|
+
emit(:escape, :octal, copy(data, ts-1,te))
|
1324
1252
|
begin
|
1325
1253
|
top -= 1
|
1326
1254
|
cs = stack[top]
|
@@ -1330,12 +1258,27 @@ te = p+1
|
|
1330
1258
|
|
1331
1259
|
end
|
1332
1260
|
end
|
1333
|
-
when
|
1334
|
-
# line 284 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1261
|
+
when 92 then
|
1335
1262
|
begin
|
1336
1263
|
te = p+1
|
1337
|
-
begin
|
1338
|
-
|
1264
|
+
begin # special case, emits two tokens
|
1265
|
+
text = copy(data, ts-1,te)
|
1266
|
+
emit(:escape, :literal, text[0,2])
|
1267
|
+
emit(:literal, :literal, text[2])
|
1268
|
+
begin
|
1269
|
+
top -= 1
|
1270
|
+
cs = stack[top]
|
1271
|
+
_goto_level = _again
|
1272
|
+
next
|
1273
|
+
end
|
1274
|
+
|
1275
|
+
end
|
1276
|
+
end
|
1277
|
+
when 81 then
|
1278
|
+
begin
|
1279
|
+
te = p+1
|
1280
|
+
begin
|
1281
|
+
case text = copy(data, ts-1,te)
|
1339
1282
|
when '\.'; emit(:escape, :dot, text)
|
1340
1283
|
when '\|'; emit(:escape, :alternation, text)
|
1341
1284
|
when '\^'; emit(:escape, :bol, text)
|
@@ -1362,13 +1305,12 @@ te = p+1
|
|
1362
1305
|
end
|
1363
1306
|
end
|
1364
1307
|
when 86 then
|
1365
|
-
# line 305 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1366
1308
|
begin
|
1367
1309
|
te = p+1
|
1368
|
-
begin
|
1310
|
+
begin
|
1369
1311
|
# \b is emitted as backspace only when inside a character set, otherwise
|
1370
1312
|
# it is a word boundary anchor. A syntax might "normalize" it if needed.
|
1371
|
-
case text = copy(data, ts-1,
|
1313
|
+
case text = copy(data, ts-1,te)
|
1372
1314
|
when '\a'; emit(:escape, :bell, text)
|
1373
1315
|
when '\b'; emit(:escape, :backspace, text)
|
1374
1316
|
when '\e'; emit(:escape, :escape, text)
|
@@ -1388,11 +1330,10 @@ te = p+1
|
|
1388
1330
|
end
|
1389
1331
|
end
|
1390
1332
|
when 29 then
|
1391
|
-
# line 321 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1392
1333
|
begin
|
1393
1334
|
te = p+1
|
1394
|
-
begin
|
1395
|
-
text = copy(data, ts-1,
|
1335
|
+
begin
|
1336
|
+
text = copy(data, ts-1,te)
|
1396
1337
|
if text[2] == '{'
|
1397
1338
|
emit(:escape, :codepoint_list, text)
|
1398
1339
|
else
|
@@ -1407,12 +1348,11 @@ te = p+1
|
|
1407
1348
|
|
1408
1349
|
end
|
1409
1350
|
end
|
1410
|
-
when
|
1411
|
-
# line 331 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1351
|
+
when 98 then
|
1412
1352
|
begin
|
1413
1353
|
te = p+1
|
1414
|
-
begin
|
1415
|
-
emit(:escape, :hex, copy(data, ts-1,
|
1354
|
+
begin
|
1355
|
+
emit(:escape, :hex, copy(data, ts-1,te))
|
1416
1356
|
begin
|
1417
1357
|
top -= 1
|
1418
1358
|
cs = stack[top]
|
@@ -1423,10 +1363,9 @@ te = p+1
|
|
1423
1363
|
end
|
1424
1364
|
end
|
1425
1365
|
when 25 then
|
1426
|
-
# line 340 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1427
1366
|
begin
|
1428
1367
|
te = p+1
|
1429
|
-
begin
|
1368
|
+
begin
|
1430
1369
|
emit_meta_control_sequence(data, ts, te, :control)
|
1431
1370
|
begin
|
1432
1371
|
top -= 1
|
@@ -1438,10 +1377,9 @@ te = p+1
|
|
1438
1377
|
end
|
1439
1378
|
end
|
1440
1379
|
when 27 then
|
1441
|
-
# line 345 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1442
1380
|
begin
|
1443
1381
|
te = p+1
|
1444
|
-
begin
|
1382
|
+
begin
|
1445
1383
|
emit_meta_control_sequence(data, ts, te, :meta_sequence)
|
1446
1384
|
begin
|
1447
1385
|
top -= 1
|
@@ -1453,16 +1391,15 @@ te = p+1
|
|
1453
1391
|
end
|
1454
1392
|
end
|
1455
1393
|
when 84 then
|
1456
|
-
# line 350 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1457
1394
|
begin
|
1458
1395
|
te = p+1
|
1459
|
-
begin
|
1396
|
+
begin
|
1460
1397
|
p = p - 1;
|
1461
|
-
cs = ((in_set? ?
|
1398
|
+
cs = ((in_set? ? 89 : 71));
|
1462
1399
|
begin
|
1463
1400
|
stack[top] = cs
|
1464
1401
|
top+= 1
|
1465
|
-
cs =
|
1402
|
+
cs = 87
|
1466
1403
|
_goto_level = _again
|
1467
1404
|
next
|
1468
1405
|
end
|
@@ -1470,16 +1407,15 @@ te = p+1
|
|
1470
1407
|
end
|
1471
1408
|
end
|
1472
1409
|
when 85 then
|
1473
|
-
# line 356 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1474
1410
|
begin
|
1475
1411
|
te = p+1
|
1476
|
-
begin
|
1412
|
+
begin
|
1477
1413
|
p = p - 1;
|
1478
|
-
cs = ((in_set? ?
|
1414
|
+
cs = ((in_set? ? 89 : 71));
|
1479
1415
|
begin
|
1480
1416
|
stack[top] = cs
|
1481
1417
|
top+= 1
|
1482
|
-
cs =
|
1418
|
+
cs = 88
|
1483
1419
|
_goto_level = _again
|
1484
1420
|
next
|
1485
1421
|
end
|
@@ -1487,11 +1423,25 @@ te = p+1
|
|
1487
1423
|
end
|
1488
1424
|
end
|
1489
1425
|
when 23 then
|
1490
|
-
# line 362 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1491
1426
|
begin
|
1492
1427
|
te = p+1
|
1493
|
-
begin
|
1494
|
-
emit(:escape, :literal, copy(data, ts-1,
|
1428
|
+
begin
|
1429
|
+
emit(:escape, :literal, copy(data, ts-1,te))
|
1430
|
+
begin
|
1431
|
+
top -= 1
|
1432
|
+
cs = stack[top]
|
1433
|
+
_goto_level = _again
|
1434
|
+
next
|
1435
|
+
end
|
1436
|
+
|
1437
|
+
end
|
1438
|
+
end
|
1439
|
+
when 91 then
|
1440
|
+
begin
|
1441
|
+
te = p
|
1442
|
+
p = p - 1; begin
|
1443
|
+
text = copy(data, ts-1,te)
|
1444
|
+
emit(:backref, :number, text)
|
1495
1445
|
begin
|
1496
1446
|
top -= 1
|
1497
1447
|
cs = stack[top]
|
@@ -1502,11 +1452,10 @@ te = p+1
|
|
1502
1452
|
end
|
1503
1453
|
end
|
1504
1454
|
when 89 then
|
1505
|
-
# line 279 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1506
1455
|
begin
|
1507
1456
|
te = p
|
1508
|
-
p = p - 1; begin
|
1509
|
-
emit(:escape, :octal, copy(data, ts-1,
|
1457
|
+
p = p - 1; begin
|
1458
|
+
emit(:escape, :octal, copy(data, ts-1,te))
|
1510
1459
|
begin
|
1511
1460
|
top -= 1
|
1512
1461
|
cs = stack[top]
|
@@ -1516,12 +1465,11 @@ p = p - 1; begin
|
|
1516
1465
|
|
1517
1466
|
end
|
1518
1467
|
end
|
1519
|
-
when
|
1520
|
-
# line 331 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1468
|
+
when 97 then
|
1521
1469
|
begin
|
1522
1470
|
te = p
|
1523
|
-
p = p - 1; begin
|
1524
|
-
emit(:escape, :hex, copy(data, ts-1,
|
1471
|
+
p = p - 1; begin
|
1472
|
+
emit(:escape, :hex, copy(data, ts-1,te))
|
1525
1473
|
begin
|
1526
1474
|
top -= 1
|
1527
1475
|
cs = stack[top]
|
@@ -1531,11 +1479,10 @@ p = p - 1; begin
|
|
1531
1479
|
|
1532
1480
|
end
|
1533
1481
|
end
|
1534
|
-
when
|
1535
|
-
# line 340 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1482
|
+
when 94 then
|
1536
1483
|
begin
|
1537
1484
|
te = p
|
1538
|
-
p = p - 1; begin
|
1485
|
+
p = p - 1; begin
|
1539
1486
|
emit_meta_control_sequence(data, ts, te, :control)
|
1540
1487
|
begin
|
1541
1488
|
top -= 1
|
@@ -1546,11 +1493,10 @@ p = p - 1; begin
|
|
1546
1493
|
|
1547
1494
|
end
|
1548
1495
|
end
|
1549
|
-
when
|
1550
|
-
# line 345 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1496
|
+
when 96 then
|
1551
1497
|
begin
|
1552
1498
|
te = p
|
1553
|
-
p = p - 1; begin
|
1499
|
+
p = p - 1; begin
|
1554
1500
|
emit_meta_control_sequence(data, ts, te, :meta_sequence)
|
1555
1501
|
begin
|
1556
1502
|
top -= 1
|
@@ -1562,11 +1508,10 @@ p = p - 1; begin
|
|
1562
1508
|
end
|
1563
1509
|
end
|
1564
1510
|
when 87 then
|
1565
|
-
# line 362 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1566
1511
|
begin
|
1567
1512
|
te = p
|
1568
|
-
p = p - 1; begin
|
1569
|
-
emit(:escape, :literal, copy(data, ts-1,
|
1513
|
+
p = p - 1; begin
|
1514
|
+
emit(:escape, :literal, copy(data, ts-1,te))
|
1570
1515
|
begin
|
1571
1516
|
top -= 1
|
1572
1517
|
cs = stack[top]
|
@@ -1577,11 +1522,10 @@ p = p - 1; begin
|
|
1577
1522
|
end
|
1578
1523
|
end
|
1579
1524
|
when 22 then
|
1580
|
-
# line 362 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1581
1525
|
begin
|
1582
1526
|
begin p = ((te))-1; end
|
1583
|
-
begin
|
1584
|
-
emit(:escape, :literal, copy(data, ts-1,
|
1527
|
+
begin
|
1528
|
+
emit(:escape, :literal, copy(data, ts-1,te))
|
1585
1529
|
begin
|
1586
1530
|
top -= 1
|
1587
1531
|
cs = stack[top]
|
@@ -1592,13 +1536,12 @@ p = p - 1; begin
|
|
1592
1536
|
end
|
1593
1537
|
end
|
1594
1538
|
when 88 then
|
1595
|
-
# line 1 "NONE"
|
1596
1539
|
begin
|
1597
1540
|
case act
|
1598
|
-
when
|
1541
|
+
when 17 then
|
1599
1542
|
begin begin p = ((te))-1; end
|
1600
1543
|
|
1601
|
-
text = copy(data, ts-1,
|
1544
|
+
text = copy(data, ts-1,te)
|
1602
1545
|
emit(:backref, :number, text)
|
1603
1546
|
begin
|
1604
1547
|
top -= 1
|
@@ -1608,10 +1551,10 @@ p = p - 1; begin
|
|
1608
1551
|
end
|
1609
1552
|
|
1610
1553
|
end
|
1611
|
-
when
|
1554
|
+
when 18 then
|
1612
1555
|
begin begin p = ((te))-1; end
|
1613
1556
|
|
1614
|
-
emit(:escape, :octal, copy(data, ts-1,
|
1557
|
+
emit(:escape, :octal, copy(data, ts-1,te))
|
1615
1558
|
begin
|
1616
1559
|
top -= 1
|
1617
1560
|
cs = stack[top]
|
@@ -1620,44 +1563,42 @@ p = p - 1; begin
|
|
1620
1563
|
end
|
1621
1564
|
|
1622
1565
|
end
|
1623
|
-
end
|
1566
|
+
end
|
1624
1567
|
end
|
1625
1568
|
when 32 then
|
1626
|
-
# line 372 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1627
1569
|
begin
|
1628
1570
|
te = p+1
|
1629
|
-
begin
|
1571
|
+
begin
|
1630
1572
|
text = copy(data, ts, te-1)
|
1573
|
+
text =~ /[^0]/ or raise ValidationError.for(:backref, 'condition', 'invalid ref ID')
|
1631
1574
|
emit(:conditional, :condition, text)
|
1632
1575
|
emit(:conditional, :condition_close, ')')
|
1633
1576
|
end
|
1634
1577
|
end
|
1635
|
-
when
|
1636
|
-
# line 378 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1578
|
+
when 99 then
|
1637
1579
|
begin
|
1638
1580
|
te = p+1
|
1639
|
-
begin
|
1581
|
+
begin
|
1640
1582
|
p = p - 1;
|
1641
1583
|
begin
|
1642
1584
|
stack[top] = cs
|
1643
1585
|
top+= 1
|
1644
|
-
cs =
|
1586
|
+
cs = 71
|
1645
1587
|
_goto_level = _again
|
1646
1588
|
next
|
1647
1589
|
end
|
1648
1590
|
|
1649
1591
|
end
|
1650
1592
|
end
|
1651
|
-
when
|
1652
|
-
# line 378 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1593
|
+
when 100 then
|
1653
1594
|
begin
|
1654
1595
|
te = p
|
1655
|
-
p = p - 1; begin
|
1596
|
+
p = p - 1; begin
|
1656
1597
|
p = p - 1;
|
1657
1598
|
begin
|
1658
1599
|
stack[top] = cs
|
1659
1600
|
top+= 1
|
1660
|
-
cs =
|
1601
|
+
cs = 71
|
1661
1602
|
_goto_level = _again
|
1662
1603
|
next
|
1663
1604
|
end
|
@@ -1665,15 +1606,14 @@ p = p - 1; begin
|
|
1665
1606
|
end
|
1666
1607
|
end
|
1667
1608
|
when 31 then
|
1668
|
-
# line 378 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1669
1609
|
begin
|
1670
1610
|
begin p = ((te))-1; end
|
1671
|
-
begin
|
1611
|
+
begin
|
1672
1612
|
p = p - 1;
|
1673
1613
|
begin
|
1674
1614
|
stack[top] = cs
|
1675
1615
|
top+= 1
|
1676
|
-
cs =
|
1616
|
+
cs = 71
|
1677
1617
|
_goto_level = _again
|
1678
1618
|
next
|
1679
1619
|
end
|
@@ -1681,18 +1621,16 @@ p = p - 1; begin
|
|
1681
1621
|
end
|
1682
1622
|
end
|
1683
1623
|
when 38 then
|
1684
|
-
# line 391 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1685
1624
|
begin
|
1686
1625
|
te = p+1
|
1687
|
-
begin
|
1626
|
+
begin
|
1688
1627
|
emit(:meta, :dot, copy(data, ts, te))
|
1689
1628
|
end
|
1690
1629
|
end
|
1691
1630
|
when 43 then
|
1692
|
-
# line 395 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1693
1631
|
begin
|
1694
1632
|
te = p+1
|
1695
|
-
begin
|
1633
|
+
begin
|
1696
1634
|
if conditional_stack.last == group_depth
|
1697
1635
|
emit(:conditional, :separator, copy(data, ts, te))
|
1698
1636
|
else
|
@@ -1701,34 +1639,30 @@ te = p+1
|
|
1701
1639
|
end
|
1702
1640
|
end
|
1703
1641
|
when 42 then
|
1704
|
-
# line 405 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1705
1642
|
begin
|
1706
1643
|
te = p+1
|
1707
|
-
begin
|
1644
|
+
begin
|
1708
1645
|
emit(:anchor, :bol, copy(data, ts, te))
|
1709
1646
|
end
|
1710
1647
|
end
|
1711
1648
|
when 35 then
|
1712
|
-
# line 409 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1713
1649
|
begin
|
1714
1650
|
te = p+1
|
1715
|
-
begin
|
1651
|
+
begin
|
1716
1652
|
emit(:anchor, :eol, copy(data, ts, te))
|
1717
1653
|
end
|
1718
1654
|
end
|
1719
|
-
when
|
1720
|
-
# line 413 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1655
|
+
when 62 then
|
1721
1656
|
begin
|
1722
1657
|
te = p+1
|
1723
|
-
begin
|
1658
|
+
begin
|
1724
1659
|
emit(:keep, :mark, copy(data, ts, te))
|
1725
1660
|
end
|
1726
1661
|
end
|
1727
|
-
when
|
1728
|
-
# line 417 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1662
|
+
when 61 then
|
1729
1663
|
begin
|
1730
1664
|
te = p+1
|
1731
|
-
begin
|
1665
|
+
begin
|
1732
1666
|
case text = copy(data, ts, te)
|
1733
1667
|
when '\A'; emit(:anchor, :bos, text)
|
1734
1668
|
when '\z'; emit(:anchor, :eos, text)
|
@@ -1740,18 +1674,16 @@ te = p+1
|
|
1740
1674
|
end
|
1741
1675
|
end
|
1742
1676
|
when 41 then
|
1743
|
-
# line 428 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1744
1677
|
begin
|
1745
1678
|
te = p+1
|
1746
|
-
begin
|
1679
|
+
begin
|
1747
1680
|
append_literal(data, ts, te)
|
1748
1681
|
end
|
1749
1682
|
end
|
1750
|
-
when
|
1751
|
-
# line 443 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1683
|
+
when 51 then
|
1752
1684
|
begin
|
1753
1685
|
te = p+1
|
1754
|
-
begin
|
1686
|
+
begin
|
1755
1687
|
text = copy(data, ts, te)
|
1756
1688
|
|
1757
1689
|
conditional_stack << group_depth
|
@@ -1761,30 +1693,28 @@ te = p+1
|
|
1761
1693
|
begin
|
1762
1694
|
stack[top] = cs
|
1763
1695
|
top+= 1
|
1764
|
-
cs =
|
1696
|
+
cs = 114
|
1765
1697
|
_goto_level = _again
|
1766
1698
|
next
|
1767
1699
|
end
|
1768
1700
|
|
1769
1701
|
end
|
1770
1702
|
end
|
1771
|
-
when
|
1772
|
-
# line 474 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1703
|
+
when 52 then
|
1773
1704
|
begin
|
1774
1705
|
te = p+1
|
1775
|
-
begin
|
1706
|
+
begin
|
1776
1707
|
text = copy(data, ts, te)
|
1777
1708
|
if text[2..-1] =~ /([^\-mixdau:]|^$)|-.*([dau])/
|
1778
|
-
|
1709
|
+
raise ValidationError.for(:group_option, $1 || "-#{$2}", text)
|
1779
1710
|
end
|
1780
1711
|
emit_options(text)
|
1781
1712
|
end
|
1782
1713
|
end
|
1783
|
-
when
|
1784
|
-
# line 488 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1714
|
+
when 6 then
|
1785
1715
|
begin
|
1786
1716
|
te = p+1
|
1787
|
-
begin
|
1717
|
+
begin
|
1788
1718
|
case text = copy(data, ts, te)
|
1789
1719
|
when '(?='; emit(:assertion, :lookahead, text)
|
1790
1720
|
when '(?!'; emit(:assertion, :nlookahead, text)
|
@@ -1793,18 +1723,17 @@ te = p+1
|
|
1793
1723
|
end
|
1794
1724
|
end
|
1795
1725
|
end
|
1796
|
-
when
|
1797
|
-
# line 505 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1726
|
+
when 5 then
|
1798
1727
|
begin
|
1799
1728
|
te = p+1
|
1800
|
-
begin
|
1729
|
+
begin
|
1801
1730
|
case text = copy(data, ts, te)
|
1802
1731
|
when '(?:'; emit(:group, :passive, text)
|
1803
1732
|
when '(?>'; emit(:group, :atomic, text)
|
1804
1733
|
when '(?~'; emit(:group, :absence, text)
|
1805
1734
|
|
1806
1735
|
when /^\(\?(?:<>|'')/
|
1807
|
-
|
1736
|
+
raise ValidationError.for(:group, 'named group', 'name is empty')
|
1808
1737
|
|
1809
1738
|
when /^\(\?<[^>]+>/
|
1810
1739
|
emit(:group, :named_ab, text)
|
@@ -1816,48 +1745,45 @@ te = p+1
|
|
1816
1745
|
end
|
1817
1746
|
end
|
1818
1747
|
when 10 then
|
1819
|
-
# line 546 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1820
1748
|
begin
|
1821
1749
|
te = p+1
|
1822
|
-
begin
|
1750
|
+
begin
|
1823
1751
|
case text = copy(data, ts, te)
|
1824
|
-
when /^\\k(
|
1825
|
-
validation_error(:backref, 'backreference', 'ref ID is empty')
|
1826
|
-
when /^\\k(.)[^\p{digit}\-][^+\-]*\D$/
|
1752
|
+
when /^\\k(.)[^0-9\-][^+\-]*['>]$/
|
1827
1753
|
emit(:backref, $1 == '<' ? :name_ref_ab : :name_ref_sq, text)
|
1828
|
-
when /^\\k(.)\d
|
1754
|
+
when /^\\k(.)0*[1-9]\d*['>]$/
|
1829
1755
|
emit(:backref, $1 == '<' ? :number_ref_ab : :number_ref_sq, text)
|
1830
|
-
when /^\\k(.)
|
1756
|
+
when /^\\k(.)-0*[1-9]\d*['>]$/
|
1831
1757
|
emit(:backref, $1 == '<' ? :number_rel_ref_ab : :number_rel_ref_sq, text)
|
1832
|
-
when /^\\k(.)[
|
1758
|
+
when /^\\k(.)[^0-9\-].*[+\-]\d+['>]$/
|
1833
1759
|
emit(:backref, $1 == '<' ? :name_recursion_ref_ab : :name_recursion_ref_sq, text)
|
1834
|
-
when /^\\k(.)
|
1760
|
+
when /^\\k(.)-?0*[1-9]\d*[+\-]\d+['>]$/
|
1835
1761
|
emit(:backref, $1 == '<' ? :number_recursion_ref_ab : :number_recursion_ref_sq, text)
|
1762
|
+
else
|
1763
|
+
raise ValidationError.for(:backref, 'backreference', 'invalid ref ID')
|
1836
1764
|
end
|
1837
1765
|
end
|
1838
1766
|
end
|
1839
1767
|
when 9 then
|
1840
|
-
# line 565 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1841
1768
|
begin
|
1842
1769
|
te = p+1
|
1843
|
-
begin
|
1770
|
+
begin
|
1844
1771
|
case text = copy(data, ts, te)
|
1845
|
-
when /^\\g(
|
1846
|
-
validation_error(:backref, 'subexpression call', 'ref ID is empty')
|
1847
|
-
when /^\\g(.)[^\p{digit}+\->][^+\-]*/
|
1772
|
+
when /^\\g(.)[^0-9+\-].*['>]$/
|
1848
1773
|
emit(:backref, $1 == '<' ? :name_call_ab : :name_call_sq, text)
|
1849
|
-
when /^\\g(.)\d
|
1774
|
+
when /^\\g(.)(?:0|0*[1-9]\d*)['>]$/
|
1850
1775
|
emit(:backref, $1 == '<' ? :number_call_ab : :number_call_sq, text)
|
1851
|
-
when /^\\g(.)[+-]\d
|
1776
|
+
when /^\\g(.)[+-]0*[1-9]\d*/
|
1852
1777
|
emit(:backref, $1 == '<' ? :number_rel_call_ab : :number_rel_call_sq, text)
|
1778
|
+
else
|
1779
|
+
raise ValidationError.for(:backref, 'subexpression call', 'invalid ref ID')
|
1853
1780
|
end
|
1854
1781
|
end
|
1855
1782
|
end
|
1856
|
-
when
|
1857
|
-
# line 581 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1783
|
+
when 59 then
|
1858
1784
|
begin
|
1859
1785
|
te = p+1
|
1860
|
-
begin
|
1786
|
+
begin
|
1861
1787
|
case text = copy(data, ts, te)
|
1862
1788
|
when '?' ; emit(:quantifier, :zero_or_one, text)
|
1863
1789
|
when '??'; emit(:quantifier, :zero_or_one_reluctant, text)
|
@@ -1865,11 +1791,10 @@ te = p+1
|
|
1865
1791
|
end
|
1866
1792
|
end
|
1867
1793
|
end
|
1868
|
-
when
|
1869
|
-
# line 589 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1794
|
+
when 55 then
|
1870
1795
|
begin
|
1871
1796
|
te = p+1
|
1872
|
-
begin
|
1797
|
+
begin
|
1873
1798
|
case text = copy(data, ts, te)
|
1874
1799
|
when '*' ; emit(:quantifier, :zero_or_more, text)
|
1875
1800
|
when '*?'; emit(:quantifier, :zero_or_more_reluctant, text)
|
@@ -1877,11 +1802,10 @@ te = p+1
|
|
1877
1802
|
end
|
1878
1803
|
end
|
1879
1804
|
end
|
1880
|
-
when
|
1881
|
-
# line 597 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1805
|
+
when 57 then
|
1882
1806
|
begin
|
1883
1807
|
te = p+1
|
1884
|
-
begin
|
1808
|
+
begin
|
1885
1809
|
case text = copy(data, ts, te)
|
1886
1810
|
when '+' ; emit(:quantifier, :one_or_more, text)
|
1887
1811
|
when '+?'; emit(:quantifier, :one_or_more_reluctant, text)
|
@@ -1890,18 +1814,16 @@ te = p+1
|
|
1890
1814
|
end
|
1891
1815
|
end
|
1892
1816
|
when 12 then
|
1893
|
-
# line 605 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1894
1817
|
begin
|
1895
1818
|
te = p+1
|
1896
|
-
begin
|
1819
|
+
begin
|
1897
1820
|
emit(:quantifier, :interval, copy(data, ts, te))
|
1898
1821
|
end
|
1899
1822
|
end
|
1900
1823
|
when 47 then
|
1901
|
-
# line 620 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1902
1824
|
begin
|
1903
1825
|
te = p+1
|
1904
|
-
begin
|
1826
|
+
begin
|
1905
1827
|
if free_spacing
|
1906
1828
|
emit(:free_space, :comment, copy(data, ts, te))
|
1907
1829
|
else
|
@@ -1913,22 +1835,20 @@ te = p+1
|
|
1913
1835
|
end
|
1914
1836
|
end
|
1915
1837
|
when 50 then
|
1916
|
-
# line 474 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1917
1838
|
begin
|
1918
1839
|
te = p
|
1919
|
-
p = p - 1; begin
|
1840
|
+
p = p - 1; begin
|
1920
1841
|
text = copy(data, ts, te)
|
1921
1842
|
if text[2..-1] =~ /([^\-mixdau:]|^$)|-.*([dau])/
|
1922
|
-
|
1843
|
+
raise ValidationError.for(:group_option, $1 || "-#{$2}", text)
|
1923
1844
|
end
|
1924
1845
|
emit_options(text)
|
1925
1846
|
end
|
1926
1847
|
end
|
1927
|
-
when
|
1928
|
-
# line 488 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1848
|
+
when 53 then
|
1929
1849
|
begin
|
1930
1850
|
te = p
|
1931
|
-
p = p - 1; begin
|
1851
|
+
p = p - 1; begin
|
1932
1852
|
case text = copy(data, ts, te)
|
1933
1853
|
when '(?='; emit(:assertion, :lookahead, text)
|
1934
1854
|
when '(?!'; emit(:assertion, :nlookahead, text)
|
@@ -1938,19 +1858,17 @@ p = p - 1; begin
|
|
1938
1858
|
end
|
1939
1859
|
end
|
1940
1860
|
when 48 then
|
1941
|
-
# line 523 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1942
1861
|
begin
|
1943
1862
|
te = p
|
1944
|
-
p = p - 1; begin
|
1863
|
+
p = p - 1; begin
|
1945
1864
|
text = copy(data, ts, te)
|
1946
1865
|
emit(:group, :capture, text)
|
1947
1866
|
end
|
1948
1867
|
end
|
1949
|
-
when
|
1950
|
-
# line 581 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1868
|
+
when 58 then
|
1951
1869
|
begin
|
1952
1870
|
te = p
|
1953
|
-
p = p - 1; begin
|
1871
|
+
p = p - 1; begin
|
1954
1872
|
case text = copy(data, ts, te)
|
1955
1873
|
when '?' ; emit(:quantifier, :zero_or_one, text)
|
1956
1874
|
when '??'; emit(:quantifier, :zero_or_one_reluctant, text)
|
@@ -1958,11 +1876,10 @@ p = p - 1; begin
|
|
1958
1876
|
end
|
1959
1877
|
end
|
1960
1878
|
end
|
1961
|
-
when
|
1962
|
-
# line 589 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1879
|
+
when 54 then
|
1963
1880
|
begin
|
1964
1881
|
te = p
|
1965
|
-
p = p - 1; begin
|
1882
|
+
p = p - 1; begin
|
1966
1883
|
case text = copy(data, ts, te)
|
1967
1884
|
when '*' ; emit(:quantifier, :zero_or_more, text)
|
1968
1885
|
when '*?'; emit(:quantifier, :zero_or_more_reluctant, text)
|
@@ -1970,11 +1887,10 @@ p = p - 1; begin
|
|
1970
1887
|
end
|
1971
1888
|
end
|
1972
1889
|
end
|
1973
|
-
when
|
1974
|
-
# line 597 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1890
|
+
when 56 then
|
1975
1891
|
begin
|
1976
1892
|
te = p
|
1977
|
-
p = p - 1; begin
|
1893
|
+
p = p - 1; begin
|
1978
1894
|
case text = copy(data, ts, te)
|
1979
1895
|
when '+' ; emit(:quantifier, :one_or_more, text)
|
1980
1896
|
when '+?'; emit(:quantifier, :one_or_more_reluctant, text)
|
@@ -1982,19 +1898,17 @@ p = p - 1; begin
|
|
1982
1898
|
end
|
1983
1899
|
end
|
1984
1900
|
end
|
1985
|
-
when
|
1986
|
-
# line 610 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1901
|
+
when 63 then
|
1987
1902
|
begin
|
1988
1903
|
te = p
|
1989
|
-
p = p - 1; begin
|
1904
|
+
p = p - 1; begin
|
1990
1905
|
append_literal(data, ts, te)
|
1991
1906
|
end
|
1992
1907
|
end
|
1993
|
-
when
|
1994
|
-
# line 616 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
1908
|
+
when 60 then
|
1995
1909
|
begin
|
1996
1910
|
te = p
|
1997
|
-
p = p - 1; begin
|
1911
|
+
p = p - 1; begin
|
1998
1912
|
begin
|
1999
1913
|
stack[top] = cs
|
2000
1914
|
top+= 1
|
@@ -2006,10 +1920,9 @@ p = p - 1; begin
|
|
2006
1920
|
end
|
2007
1921
|
end
|
2008
1922
|
when 46 then
|
2009
|
-
# line 620 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2010
1923
|
begin
|
2011
1924
|
te = p
|
2012
|
-
p = p - 1; begin
|
1925
|
+
p = p - 1; begin
|
2013
1926
|
if free_spacing
|
2014
1927
|
emit(:free_space, :comment, copy(data, ts, te))
|
2015
1928
|
else
|
@@ -2021,10 +1934,9 @@ p = p - 1; begin
|
|
2021
1934
|
end
|
2022
1935
|
end
|
2023
1936
|
when 45 then
|
2024
|
-
# line 630 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2025
1937
|
begin
|
2026
1938
|
te = p
|
2027
|
-
p = p - 1; begin
|
1939
|
+
p = p - 1; begin
|
2028
1940
|
if free_spacing
|
2029
1941
|
emit(:free_space, :whitespace, copy(data, ts, te))
|
2030
1942
|
else
|
@@ -2033,38 +1945,34 @@ p = p - 1; begin
|
|
2033
1945
|
end
|
2034
1946
|
end
|
2035
1947
|
when 44 then
|
2036
|
-
# line 641 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2037
1948
|
begin
|
2038
1949
|
te = p
|
2039
|
-
p = p - 1; begin
|
1950
|
+
p = p - 1; begin
|
2040
1951
|
append_literal(data, ts, te)
|
2041
1952
|
end
|
2042
1953
|
end
|
2043
1954
|
when 3 then
|
2044
|
-
# line 474 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2045
1955
|
begin
|
2046
1956
|
begin p = ((te))-1; end
|
2047
|
-
begin
|
1957
|
+
begin
|
2048
1958
|
text = copy(data, ts, te)
|
2049
1959
|
if text[2..-1] =~ /([^\-mixdau:]|^$)|-.*([dau])/
|
2050
|
-
|
1960
|
+
raise ValidationError.for(:group_option, $1 || "-#{$2}", text)
|
2051
1961
|
end
|
2052
1962
|
emit_options(text)
|
2053
1963
|
end
|
2054
1964
|
end
|
2055
1965
|
when 11 then
|
2056
|
-
# line 610 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2057
1966
|
begin
|
2058
1967
|
begin p = ((te))-1; end
|
2059
|
-
begin
|
1968
|
+
begin
|
2060
1969
|
append_literal(data, ts, te)
|
2061
1970
|
end
|
2062
1971
|
end
|
2063
1972
|
when 8 then
|
2064
|
-
# line 616 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2065
1973
|
begin
|
2066
1974
|
begin p = ((te))-1; end
|
2067
|
-
begin
|
1975
|
+
begin
|
2068
1976
|
begin
|
2069
1977
|
stack[top] = cs
|
2070
1978
|
top+= 1
|
@@ -2076,7 +1984,6 @@ p = p - 1; begin
|
|
2076
1984
|
end
|
2077
1985
|
end
|
2078
1986
|
when 1 then
|
2079
|
-
# line 1 "NONE"
|
2080
1987
|
begin
|
2081
1988
|
case act
|
2082
1989
|
when 0 then
|
@@ -2086,16 +1993,16 @@ p = p - 1; begin
|
|
2086
1993
|
next
|
2087
1994
|
end
|
2088
1995
|
end
|
2089
|
-
when
|
1996
|
+
when 42 then
|
2090
1997
|
begin begin p = ((te))-1; end
|
2091
1998
|
|
2092
1999
|
text = copy(data, ts, te)
|
2093
2000
|
if text[2..-1] =~ /([^\-mixdau:]|^$)|-.*([dau])/
|
2094
|
-
|
2001
|
+
raise ValidationError.for(:group_option, $1 || "-#{$2}", text)
|
2095
2002
|
end
|
2096
2003
|
emit_options(text)
|
2097
2004
|
end
|
2098
|
-
when
|
2005
|
+
when 43 then
|
2099
2006
|
begin begin p = ((te))-1; end
|
2100
2007
|
|
2101
2008
|
case text = copy(data, ts, te)
|
@@ -2105,29 +2012,27 @@ end
|
|
2105
2012
|
when '(?<!'; emit(:assertion, :nlookbehind, text)
|
2106
2013
|
end
|
2107
2014
|
end
|
2108
|
-
when
|
2015
|
+
when 57 then
|
2109
2016
|
begin begin p = ((te))-1; end
|
2110
2017
|
|
2111
2018
|
append_literal(data, ts, te)
|
2112
2019
|
end
|
2113
|
-
end
|
2020
|
+
end
|
2114
2021
|
end
|
2115
|
-
when
|
2116
|
-
# line 140 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2022
|
+
when 75 then
|
2117
2023
|
begin
|
2118
2024
|
|
2119
|
-
text = copy(data, ts ? ts-1 : 0
|
2120
|
-
raise PrematureEndError.new(
|
2025
|
+
text = copy(data, ts ? ts-1 : 0,-1)
|
2026
|
+
raise PrematureEndError.new(text)
|
2121
2027
|
end
|
2122
|
-
# line 214 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2123
2028
|
begin
|
2124
2029
|
te = p
|
2125
|
-
p = p - 1; begin
|
2126
|
-
emit(:set, :open,
|
2030
|
+
p = p - 1; begin
|
2031
|
+
emit(:set, :open, '[')
|
2127
2032
|
begin
|
2128
2033
|
stack[top] = cs
|
2129
2034
|
top+= 1
|
2130
|
-
cs =
|
2035
|
+
cs = 89
|
2131
2036
|
_goto_level = _again
|
2132
2037
|
next
|
2133
2038
|
end
|
@@ -2135,38 +2040,34 @@ p = p - 1; begin
|
|
2135
2040
|
end
|
2136
2041
|
end
|
2137
2042
|
when 19 then
|
2138
|
-
# line 140 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2139
2043
|
begin
|
2140
2044
|
|
2141
|
-
text = copy(data, ts ? ts-1 : 0
|
2142
|
-
raise PrematureEndError.new(
|
2045
|
+
text = copy(data, ts ? ts-1 : 0,-1)
|
2046
|
+
raise PrematureEndError.new(text)
|
2143
2047
|
end
|
2144
|
-
# line 214 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2145
2048
|
begin
|
2146
2049
|
begin p = ((te))-1; end
|
2147
|
-
begin
|
2148
|
-
emit(:set, :open,
|
2050
|
+
begin
|
2051
|
+
emit(:set, :open, '[')
|
2149
2052
|
begin
|
2150
2053
|
stack[top] = cs
|
2151
2054
|
top+= 1
|
2152
|
-
cs =
|
2055
|
+
cs = 89
|
2153
2056
|
_goto_level = _again
|
2154
2057
|
next
|
2155
2058
|
end
|
2156
2059
|
|
2157
2060
|
end
|
2158
2061
|
end
|
2159
|
-
when
|
2160
|
-
# line 140 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2062
|
+
when 93 then
|
2161
2063
|
begin
|
2162
2064
|
|
2163
|
-
text = copy(data, ts ? ts-1 : 0
|
2164
|
-
raise PrematureEndError.new(
|
2065
|
+
text = copy(data, ts ? ts-1 : 0,-1)
|
2066
|
+
raise PrematureEndError.new(text)
|
2165
2067
|
end
|
2166
|
-
# line 340 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2167
2068
|
begin
|
2168
2069
|
te = p
|
2169
|
-
p = p - 1; begin
|
2070
|
+
p = p - 1; begin
|
2170
2071
|
emit_meta_control_sequence(data, ts, te, :control)
|
2171
2072
|
begin
|
2172
2073
|
top -= 1
|
@@ -2177,17 +2078,15 @@ p = p - 1; begin
|
|
2177
2078
|
|
2178
2079
|
end
|
2179
2080
|
end
|
2180
|
-
when
|
2181
|
-
# line 140 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2081
|
+
when 95 then
|
2182
2082
|
begin
|
2183
2083
|
|
2184
|
-
text = copy(data, ts ? ts-1 : 0
|
2185
|
-
raise PrematureEndError.new(
|
2084
|
+
text = copy(data, ts ? ts-1 : 0,-1)
|
2085
|
+
raise PrematureEndError.new(text)
|
2186
2086
|
end
|
2187
|
-
# line 345 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2188
2087
|
begin
|
2189
2088
|
te = p
|
2190
|
-
p = p - 1; begin
|
2089
|
+
p = p - 1; begin
|
2191
2090
|
emit_meta_control_sequence(data, ts, te, :meta_sequence)
|
2192
2091
|
begin
|
2193
2092
|
top -= 1
|
@@ -2199,16 +2098,14 @@ p = p - 1; begin
|
|
2199
2098
|
end
|
2200
2099
|
end
|
2201
2100
|
when 26 then
|
2202
|
-
# line 140 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2203
2101
|
begin
|
2204
2102
|
|
2205
|
-
text = copy(data, ts ? ts-1 : 0
|
2206
|
-
raise PrematureEndError.new(
|
2103
|
+
text = copy(data, ts ? ts-1 : 0,-1)
|
2104
|
+
raise PrematureEndError.new(text)
|
2207
2105
|
end
|
2208
|
-
# line 340 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2209
2106
|
begin
|
2210
2107
|
begin p = ((te))-1; end
|
2211
|
-
begin
|
2108
|
+
begin
|
2212
2109
|
emit_meta_control_sequence(data, ts, te, :control)
|
2213
2110
|
begin
|
2214
2111
|
top -= 1
|
@@ -2220,16 +2117,14 @@ p = p - 1; begin
|
|
2220
2117
|
end
|
2221
2118
|
end
|
2222
2119
|
when 28 then
|
2223
|
-
# line 140 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2224
2120
|
begin
|
2225
2121
|
|
2226
|
-
text = copy(data, ts ? ts-1 : 0
|
2227
|
-
raise PrematureEndError.new(
|
2122
|
+
text = copy(data, ts ? ts-1 : 0,-1)
|
2123
|
+
raise PrematureEndError.new(text)
|
2228
2124
|
end
|
2229
|
-
# line 345 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2230
2125
|
begin
|
2231
2126
|
begin p = ((te))-1; end
|
2232
|
-
begin
|
2127
|
+
begin
|
2233
2128
|
emit_meta_control_sequence(data, ts, te, :meta_sequence)
|
2234
2129
|
begin
|
2235
2130
|
top -= 1
|
@@ -2241,16 +2136,14 @@ p = p - 1; begin
|
|
2241
2136
|
end
|
2242
2137
|
end
|
2243
2138
|
when 30 then
|
2244
|
-
# line 146 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2245
2139
|
begin
|
2246
2140
|
|
2247
|
-
text = copy(data, ts ? ts-1 : 0
|
2248
|
-
|
2141
|
+
text = copy(data, ts ? ts-1 : 0,-1)
|
2142
|
+
raise ValidationError.for(:sequence, 'sequence', text)
|
2249
2143
|
end
|
2250
|
-
# line 336 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2251
2144
|
begin
|
2252
2145
|
te = p+1
|
2253
|
-
begin
|
2146
|
+
begin
|
2254
2147
|
begin
|
2255
2148
|
top -= 1
|
2256
2149
|
cs = stack[top]
|
@@ -2260,66 +2153,60 @@ te = p+1
|
|
2260
2153
|
|
2261
2154
|
end
|
2262
2155
|
end
|
2263
|
-
when
|
2264
|
-
# line 153 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2156
|
+
when 4 then
|
2265
2157
|
begin
|
2266
2158
|
self.group_depth = group_depth - 1 end
|
2267
|
-
# line 459 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2268
2159
|
begin
|
2269
2160
|
te = p+1
|
2270
|
-
begin
|
2161
|
+
begin
|
2271
2162
|
emit(:group, :comment, copy(data, ts, te))
|
2272
2163
|
end
|
2273
2164
|
end
|
2274
2165
|
when 37 then
|
2275
|
-
# line 153 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2276
2166
|
begin
|
2277
2167
|
self.group_depth = group_depth - 1 end
|
2278
|
-
# line 528 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2279
2168
|
begin
|
2280
2169
|
te = p+1
|
2281
|
-
begin
|
2170
|
+
begin
|
2282
2171
|
if conditional_stack.last == group_depth + 1
|
2283
2172
|
conditional_stack.pop
|
2284
|
-
emit(:conditional, :close,
|
2285
|
-
|
2173
|
+
emit(:conditional, :close, ')')
|
2174
|
+
elsif group_depth >= 0
|
2286
2175
|
if spacing_stack.length > 1 &&
|
2287
2176
|
spacing_stack.last[:depth] == group_depth + 1
|
2288
2177
|
spacing_stack.pop
|
2289
2178
|
self.free_spacing = spacing_stack.last[:free_spacing]
|
2290
2179
|
end
|
2291
2180
|
|
2292
|
-
emit(:group, :close,
|
2181
|
+
emit(:group, :close, ')')
|
2182
|
+
else
|
2183
|
+
raise ValidationError.for(:group, 'group', 'unmatched close parenthesis')
|
2293
2184
|
end
|
2294
2185
|
end
|
2295
2186
|
end
|
2296
2187
|
when 39 then
|
2297
|
-
# line 154 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2298
2188
|
begin
|
2299
2189
|
self.set_depth = set_depth + 1 end
|
2300
|
-
# line 434 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2301
2190
|
begin
|
2302
2191
|
te = p+1
|
2303
|
-
begin
|
2192
|
+
begin
|
2304
2193
|
emit(:set, :open, copy(data, ts, te))
|
2305
2194
|
begin
|
2306
2195
|
stack[top] = cs
|
2307
2196
|
top+= 1
|
2308
|
-
cs =
|
2197
|
+
cs = 89
|
2309
2198
|
_goto_level = _again
|
2310
2199
|
next
|
2311
2200
|
end
|
2312
2201
|
|
2313
2202
|
end
|
2314
2203
|
end
|
2315
|
-
when
|
2316
|
-
# line 155 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2204
|
+
when 69 then
|
2317
2205
|
begin
|
2318
2206
|
self.set_depth = set_depth - 1 end
|
2319
|
-
# line 161 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2320
2207
|
begin
|
2321
2208
|
te = p+1
|
2322
|
-
begin
|
2209
|
+
begin
|
2323
2210
|
emit(:set, :close, copy(data, ts, te))
|
2324
2211
|
if in_set?
|
2325
2212
|
begin
|
@@ -2331,7 +2218,7 @@ te = p+1
|
|
2331
2218
|
|
2332
2219
|
else
|
2333
2220
|
begin
|
2334
|
-
cs =
|
2221
|
+
cs = 71
|
2335
2222
|
_goto_level = _again
|
2336
2223
|
next
|
2337
2224
|
end
|
@@ -2339,16 +2226,14 @@ te = p+1
|
|
2339
2226
|
end
|
2340
2227
|
end
|
2341
2228
|
end
|
2342
|
-
when
|
2343
|
-
# line 155 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2229
|
+
when 74 then
|
2344
2230
|
begin
|
2345
2231
|
self.set_depth = set_depth - 1 end
|
2346
|
-
# line 170 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2347
2232
|
begin
|
2348
2233
|
te = p+1
|
2349
2234
|
begin # special case, emits two tokens
|
2350
|
-
emit(:literal, :literal,
|
2351
|
-
emit(:set, :close,
|
2235
|
+
emit(:literal, :literal, '-')
|
2236
|
+
emit(:set, :close, ']')
|
2352
2237
|
if in_set?
|
2353
2238
|
begin
|
2354
2239
|
top -= 1
|
@@ -2359,7 +2244,7 @@ te = p+1
|
|
2359
2244
|
|
2360
2245
|
else
|
2361
2246
|
begin
|
2362
|
-
cs =
|
2247
|
+
cs = 71
|
2363
2248
|
_goto_level = _again
|
2364
2249
|
next
|
2365
2250
|
end
|
@@ -2368,13 +2253,11 @@ te = p+1
|
|
2368
2253
|
end
|
2369
2254
|
end
|
2370
2255
|
when 21 then
|
2371
|
-
# line 155 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2372
2256
|
begin
|
2373
2257
|
self.set_depth = set_depth - 1 end
|
2374
|
-
# line 219 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2375
2258
|
begin
|
2376
2259
|
te = p+1
|
2377
|
-
begin
|
2260
|
+
begin
|
2378
2261
|
text = copy(data, ts, te)
|
2379
2262
|
|
2380
2263
|
type = :posixclass
|
@@ -2385,85 +2268,62 @@ te = p+1
|
|
2385
2268
|
end
|
2386
2269
|
|
2387
2270
|
unless self.class.posix_classes.include?(class_name)
|
2388
|
-
|
2271
|
+
raise ValidationError.for(:posix_class, text)
|
2389
2272
|
end
|
2390
2273
|
|
2391
2274
|
emit(type, class_name.to_sym, text)
|
2392
2275
|
end
|
2393
2276
|
end
|
2394
|
-
when
|
2395
|
-
# line 1 "NONE"
|
2277
|
+
when 67 then
|
2396
2278
|
begin
|
2397
2279
|
te = p+1
|
2398
2280
|
end
|
2399
|
-
# line 154 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2400
2281
|
begin
|
2401
2282
|
self.set_depth = set_depth + 1 end
|
2402
|
-
when
|
2403
|
-
# line 1 "NONE"
|
2283
|
+
when 83 then
|
2404
2284
|
begin
|
2405
2285
|
te = p+1
|
2406
2286
|
end
|
2407
|
-
# line 273 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2408
2287
|
begin
|
2409
|
-
act =
|
2410
|
-
when
|
2411
|
-
# line 1 "NONE"
|
2288
|
+
act = 17; end
|
2289
|
+
when 82 then
|
2412
2290
|
begin
|
2413
2291
|
te = p+1
|
2414
2292
|
end
|
2415
|
-
# line 279 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2416
2293
|
begin
|
2417
|
-
act =
|
2418
|
-
when
|
2419
|
-
# line 1 "NONE"
|
2294
|
+
act = 18; end
|
2295
|
+
when 49 then
|
2420
2296
|
begin
|
2421
2297
|
te = p+1
|
2422
2298
|
end
|
2423
|
-
# line 488 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2424
2299
|
begin
|
2425
|
-
act =
|
2426
|
-
when
|
2427
|
-
# line 1 "NONE"
|
2300
|
+
act = 42; end
|
2301
|
+
when 7 then
|
2428
2302
|
begin
|
2429
2303
|
te = p+1
|
2430
2304
|
end
|
2431
|
-
# line 641 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2432
2305
|
begin
|
2433
|
-
act =
|
2434
|
-
when
|
2435
|
-
# line 1 "NONE"
|
2306
|
+
act = 43; end
|
2307
|
+
when 2 then
|
2436
2308
|
begin
|
2437
2309
|
te = p+1
|
2438
2310
|
end
|
2439
|
-
# line 153 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2440
2311
|
begin
|
2441
|
-
|
2442
|
-
# line 152 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2443
|
-
begin
|
2444
|
-
self.group_depth = group_depth + 1 end
|
2445
|
-
# line 474 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2446
|
-
begin
|
2447
|
-
act = 40; end
|
2448
|
-
# line 2448 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner.rb"
|
2312
|
+
act = 57; end
|
2449
2313
|
end
|
2450
2314
|
end
|
2451
2315
|
end
|
2452
2316
|
if _goto_level <= _again
|
2453
|
-
case _re_scanner_to_state_actions[cs]
|
2454
|
-
when
|
2455
|
-
# line 1 "NONE"
|
2317
|
+
case _re_scanner_to_state_actions[cs]
|
2318
|
+
when 64 then
|
2456
2319
|
begin
|
2457
2320
|
ts = nil; end
|
2458
2321
|
when 33 then
|
2459
|
-
# line 1 "NONE"
|
2460
2322
|
begin
|
2461
2323
|
ts = nil; end
|
2462
|
-
# line 1 "NONE"
|
2463
2324
|
begin
|
2464
2325
|
act = 0
|
2465
2326
|
end
|
2466
|
-
# line 2466 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner.rb"
|
2467
2327
|
end
|
2468
2328
|
|
2469
2329
|
if cs == 0
|
@@ -2485,19 +2345,16 @@ act = 0
|
|
2485
2345
|
end
|
2486
2346
|
case _re_scanner_eof_actions[cs]
|
2487
2347
|
when 13 then
|
2488
|
-
# line 8 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/property.rl"
|
2489
2348
|
begin
|
2490
2349
|
|
2491
2350
|
raise PrematureEndError.new('unicode property')
|
2492
2351
|
end
|
2493
2352
|
when 24 then
|
2494
|
-
# line 140 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2495
2353
|
begin
|
2496
2354
|
|
2497
|
-
text = copy(data, ts ? ts-1 : 0
|
2498
|
-
raise PrematureEndError.new(
|
2355
|
+
text = copy(data, ts ? ts-1 : 0,-1)
|
2356
|
+
raise PrematureEndError.new(text)
|
2499
2357
|
end
|
2500
|
-
# line 2500 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner.rb"
|
2501
2358
|
end
|
2502
2359
|
end
|
2503
2360
|
|
@@ -2508,13 +2365,11 @@ act = 0
|
|
2508
2365
|
end
|
2509
2366
|
end
|
2510
2367
|
|
2511
|
-
# line 746 "/Users/janoschmuller/code/regexp_parser/tasks/../lib/regexp_parser/scanner/scanner.rl"
|
2512
|
-
|
2513
2368
|
# to avoid "warning: assigned but unused variable - testEof"
|
2514
2369
|
testEof = testEof
|
2515
2370
|
|
2516
2371
|
if cs == re_scanner_error
|
2517
|
-
text = copy(data, ts ? ts-1 : 0
|
2372
|
+
text = copy(data, ts ? ts-1 : 0,-1)
|
2518
2373
|
raise ScannerError.new("Scan error at '#{text}'")
|
2519
2374
|
end
|
2520
2375
|
|
@@ -2524,7 +2379,7 @@ end
|
|
2524
2379
|
"[#{set_depth}]") if in_set?
|
2525
2380
|
|
2526
2381
|
# when the entire expression is a literal run
|
2527
|
-
emit_literal if
|
2382
|
+
emit_literal if literal_run
|
2528
2383
|
|
2529
2384
|
tokens
|
2530
2385
|
end
|
@@ -2551,26 +2406,37 @@ end
|
|
2551
2406
|
def emit(type, token, text)
|
2552
2407
|
#puts "EMIT: type: #{type}, token: #{token}, text: #{text}, ts: #{ts}, te: #{te}"
|
2553
2408
|
|
2554
|
-
emit_literal if
|
2409
|
+
emit_literal if literal_run
|
2555
2410
|
|
2556
2411
|
# Ragel runs with byte-based indices (ts, te). These are of little value to
|
2557
2412
|
# end-users, so we keep track of char-based indices and emit those instead.
|
2558
2413
|
ts_char_pos = char_pos
|
2559
2414
|
te_char_pos = char_pos + text.length
|
2560
2415
|
|
2561
|
-
|
2562
|
-
block.call type, token, text, ts_char_pos, te_char_pos
|
2563
|
-
end
|
2416
|
+
tok = [type, token, text, ts_char_pos, te_char_pos]
|
2564
2417
|
|
2565
|
-
|
2418
|
+
self.prev_token = tok
|
2566
2419
|
|
2567
2420
|
self.char_pos = te_char_pos
|
2421
|
+
|
2422
|
+
if block
|
2423
|
+
block.call type, token, text, ts_char_pos, te_char_pos
|
2424
|
+
# TODO: in v3.0.0,remove `collect_tokens:` kwarg and only collect if no block given
|
2425
|
+
tokens << tok if collect_tokens
|
2426
|
+
elsif collect_tokens
|
2427
|
+
tokens << tok
|
2428
|
+
end
|
2568
2429
|
end
|
2569
2430
|
|
2431
|
+
attr_accessor :literal_run # only public for #||= to work on ruby <= 2.5
|
2432
|
+
|
2570
2433
|
private
|
2571
2434
|
|
2572
|
-
attr_accessor :
|
2573
|
-
:
|
2435
|
+
attr_accessor :block,
|
2436
|
+
:collect_tokens, :tokens, :prev_token,
|
2437
|
+
:free_spacing, :spacing_stack,
|
2438
|
+
:group_depth, :set_depth, :conditional_stack,
|
2439
|
+
:char_pos
|
2574
2440
|
|
2575
2441
|
def free_spacing?(input_object, options)
|
2576
2442
|
if options && !input_object.is_a?(String)
|
@@ -2600,14 +2466,13 @@ end
|
|
2600
2466
|
# Appends one or more characters to the literal buffer, to be emitted later
|
2601
2467
|
# by a call to emit_literal.
|
2602
2468
|
def append_literal(data, ts, te)
|
2603
|
-
self.
|
2604
|
-
literal << copy(data, ts, te)
|
2469
|
+
(self.literal_run ||= []) << copy(data, ts, te)
|
2605
2470
|
end
|
2606
2471
|
|
2607
2472
|
# Emits the literal run collected by calls to the append_literal method.
|
2608
2473
|
def emit_literal
|
2609
|
-
text =
|
2610
|
-
self.
|
2474
|
+
text = literal_run.join
|
2475
|
+
self.literal_run = nil
|
2611
2476
|
emit(:literal, :literal, text)
|
2612
2477
|
end
|
2613
2478
|
|
@@ -2616,7 +2481,7 @@ end
|
|
2616
2481
|
|
2617
2482
|
# Ruby allows things like '(?-xxxx)' or '(?xx-xx--xx-:abc)'.
|
2618
2483
|
text =~ /\(\?([mixdau]*)(-(?:[mix]*))*(:)?/
|
2619
|
-
positive, negative, group_local = $1
|
2484
|
+
positive, negative, group_local = $1,$2,$3
|
2620
2485
|
|
2621
2486
|
if positive.include?('x')
|
2622
2487
|
self.free_spacing = true
|
@@ -2642,24 +2507,8 @@ end
|
|
2642
2507
|
|
2643
2508
|
def emit_meta_control_sequence(data, ts, te, token)
|
2644
2509
|
if data.last < 0x00 || data.last > 0x7F
|
2645
|
-
|
2510
|
+
raise ValidationError.for(:sequence, 'escape', token.to_s)
|
2646
2511
|
end
|
2647
|
-
emit(:escape, token, copy(data, ts-1,
|
2648
|
-
end
|
2649
|
-
|
2650
|
-
# Centralizes and unifies the handling of validation related
|
2651
|
-
# errors.
|
2652
|
-
def validation_error(type, what, reason = nil)
|
2653
|
-
error =
|
2654
|
-
case type
|
2655
|
-
when :backref then InvalidBackrefError.new(what, reason)
|
2656
|
-
when :group then InvalidGroupError.new(what, reason)
|
2657
|
-
when :group_option then InvalidGroupOption.new(what, reason)
|
2658
|
-
when :posix_class then UnknownPosixClassError.new(what)
|
2659
|
-
when :property then UnknownUnicodePropertyError.new(what)
|
2660
|
-
when :sequence then InvalidSequenceError.new(what, reason)
|
2661
|
-
end
|
2662
|
-
|
2663
|
-
raise error # unless @@config.validation_ignore
|
2512
|
+
emit(:escape, token, copy(data, ts-1,te))
|
2664
2513
|
end
|
2665
2514
|
end # module Regexp::Scanner
|