regexp_parser 2.1.1 → 2.9.2

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