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