regexp_parser 2.6.0 → 2.10.0

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