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