regexp_parser 1.7.0 → 2.8.3

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