rookout 0.1.6 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2bb84d3cfe961d052ba9880fd4198dd461782b7503d85584f57b4a9970279832
4
- data.tar.gz: 9e5f6cf8e552bfdf2f23b63a606a29537bd75474b042c565d53e478335498323
3
+ metadata.gz: 60302a56b6a812ebcbffa6f737d09c489451469d81faf3dc7dd40c2e8d00d47f
4
+ data.tar.gz: ffc57878db1619dacd3b3e9d742f319aa9ddd95644b0aae70cd7dd9d554b12c8
5
5
  SHA512:
6
- metadata.gz: 8bbd1e679008de0c9840437f917114ea020cff7bda9c40dbdf13e6b83207edf385bf16914f8745888007346c66b16993676e21d37210b4f401e5053b34fc0cca
7
- data.tar.gz: a5084dfeca88fdd305611e25cf62c6c5ce3eac1b93bfbd187333364b833ddc10633456bcb1c7c96115d7427a3215ab56d02bd6a798d2b8baa5306d367b170859
6
+ metadata.gz: 72955273e9f425aa5f21ed5bb6325e5806550b466eea822383d81df7adf3374f8c436036be04aed4bddb117465fd577c9ecf5f0c7f7a35449d11c6d5916d601f
7
+ data.tar.gz: 2ab2e8e7478a46bd06b42b9e346afa30bb9f4a405caa6342d4fd0bbe95dc601d37e0af5e3c9f8d58fca08125cc1e78cc12a5166c7f9da52c5c6697ef0765d7d4
@@ -52,6 +52,10 @@ def self.fork &block
52
52
  Rookout::ForkManager.instance.fork_hook method(:_rookout_original_fork), &block
53
53
  end
54
54
 
55
+ def fork &block
56
+ Rookout::ForkManager.instance.fork_hook method(:_rookout_original_fork), &block
57
+ end
58
+
55
59
  module Kernel
56
60
  alias _rookout_original_fork fork
57
61
 
@@ -7,6 +7,7 @@ module Rookout
7
7
  require_relative "../processor/namespaces/container_namespace"
8
8
  require_relative "../processor/namespaces/ruby_utils_namespace"
9
9
  require_relative "../processor/namespaces/noop_namespace"
10
+ require_relative "../logger"
10
11
 
11
12
  class Aug
12
13
  def initialize aug_id, action, condition, rate_limiter, _max_aug_time
@@ -32,6 +33,7 @@ module Rookout
32
33
 
33
34
  @rate_limiter.with_limit do
34
35
  report_id = Utils.uuid
36
+ Logger.instance.info "Executing aug-\t#{id} (msg ID #{report_id})"
35
37
  @action.execute @id, report_id, namespace, output
36
38
  end
37
39
  end
@@ -61,12 +61,12 @@ module Rookout
61
61
  window_quota = 200
62
62
  window_size = 5000
63
63
 
64
- rate_limit = configuration["rate_limit"]
64
+ rate_limit = configuration["rateLimit"]
65
65
  if rate_limit
66
66
  rate_limit_splitted = rate_limit.split "/"
67
67
  if rate_limit_splitted.length == 2
68
- window_quota = rate_limit_splitted[0]
69
- window_size = rate_limit_splitted[1]
68
+ window_quota = rate_limit_splitted[0].to_i
69
+ window_size = rate_limit_splitted[1].to_i
70
70
  end
71
71
  end
72
72
 
@@ -18,7 +18,7 @@ module Rookout
18
18
  start_time ||= Time.now
19
19
 
20
20
  # If quota, verify it
21
- if @quota
21
+ if @quota && @quota > 0
22
22
  # Get current time
23
23
  now_ms = (start_time.to_f * 1000).to_i
24
24
 
@@ -36,7 +36,7 @@ module Rookout
36
36
 
37
37
  # If exceeding quota
38
38
  if current_usage(now_ms, current_window_key, prev_window_key) > @quota
39
- warning = RookError.new Exceptions::RookRuleRateLimited.new
39
+ warning = Processor::RookError.new Exceptions::RookRuleRateLimited.new
40
40
  UserWarnings.notify_warning warning
41
41
  return
42
42
  end
@@ -46,7 +46,7 @@ module Rookout
46
46
  begin
47
47
  yield
48
48
  ensure
49
- @mutex.synchronize { record_usage current_window_key, (Time.now - start_time) * 1000 } if @quota
49
+ @mutex.synchronize { record_usage current_window_key, (Time.now - start_time) * 1000 } if @quota && @quota > 0
50
50
  end
51
51
  ensure
52
52
  # Reduce active count
@@ -28,7 +28,6 @@ module Rookout
28
28
  raise
29
29
  rescue Exception => e
30
30
  message = "Exception while processing Aug"
31
- puts e.message + "\n" + e.backtrace.join("\n\t")
32
31
  error = Processor::RookError.new e, message
33
32
  notify_warning error
34
33
  end
@@ -56,7 +55,9 @@ module Rookout
56
55
 
57
56
  Logger.instance.warning error.message
58
57
 
59
- send_rule_status :Warning, error
58
+ # For easier testing
59
+ return if @output.nil?
60
+ @output.send_rule_status id, :Warning, error
60
61
  end
61
62
 
62
63
  private
@@ -76,7 +77,6 @@ module Rookout
76
77
 
77
78
  # For easier testing
78
79
  return if @output.nil?
79
-
80
80
  @output.send_rule_status id, status, error
81
81
  end
82
82
  end
@@ -1,3 +1,3 @@
1
1
  module Rookout
2
- COMMIT = "2a847bf58dabb4d6abd2957f4c382256a4a467db".freeze
2
+ COMMIT = "abb2cf931a9859b4fd334a6b11940cd4819cd41d".freeze
3
3
  end
@@ -31,7 +31,7 @@ module Rookout
31
31
 
32
32
  class RookAttributeNotFound < ToolException
33
33
  def initialize attribute
34
- super "Failed to get attribute #{attribute}", { attribute: attribute }
34
+ super "Failed to get attribute #{attribute}", { "attribute" => attribute }
35
35
  end
36
36
  end
37
37
 
@@ -84,7 +84,8 @@ module Rookout
84
84
 
85
85
  class RookNonPrimitiveObjectType < ToolException
86
86
  def initialize path
87
- super "Object %s must be of primitive type, such as: string, int, long etc: #{path}", { path: path }
87
+ super "Object #{path} must be of primitive type, such as: string, int, long etc",
88
+ { "path" => path }
88
89
  end
89
90
  end
90
91
 
@@ -105,7 +106,7 @@ module Rookout
105
106
  end
106
107
 
107
108
  class RookInvalidToken < ToolException
108
- def initialize token
109
+ def initialize token = ""
109
110
  super "The Rookout token supplied #{token[0..6]} is not valid; please check the token and try again",
110
111
  { token: token[0...6] }
111
112
  end
@@ -114,7 +115,7 @@ module Rookout
114
115
  class RookSourceFilePathSuggestion < ToolException
115
116
  def initialize wanted_path, matching_path
116
117
  super "Rookout found alternative file path: #{matching_path}",
117
- { wanted_path: wanted_path, matching_path: matching_path }
118
+ { "wanted_path" => wanted_path, "matching_path" => matching_path }
118
119
  end
119
120
  end
120
121
 
@@ -6,7 +6,7 @@ module Maps
6
6
  include Enumerable
7
7
  attr_reader :text, :offset, :elements
8
8
 
9
- def initialize(text, offset, elements)
9
+ def initialize(text, offset, elements = [])
10
10
  @text = text
11
11
  @offset = offset
12
12
  @elements = elements
@@ -342,12 +342,12 @@ module Maps
342
342
  @offset = cached[1]
343
343
  return cached[0]
344
344
  end
345
- chunk0, max0 = nil, @offset + 1
346
- if max0 <= @input_size
347
- chunk0 = @input[@offset...max0]
345
+ chunk0 = nil
346
+ if @offset < @input_size
347
+ chunk0 = @input[@offset...@offset + 1]
348
348
  end
349
349
  if chunk0 =~ /\A[a-zA-Z_$@]/
350
- address0 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
350
+ address0 = TreeNode.new(@input[@offset...@offset + 1], @offset)
351
351
  @offset = @offset + 1
352
352
  else
353
353
  address0 = FAILURE
@@ -370,12 +370,12 @@ module Maps
370
370
  @offset = cached[1]
371
371
  return cached[0]
372
372
  end
373
- chunk0, max0 = nil, @offset + 1
374
- if max0 <= @input_size
375
- chunk0 = @input[@offset...max0]
373
+ chunk0 = nil
374
+ if @offset < @input_size
375
+ chunk0 = @input[@offset...@offset + 1]
376
376
  end
377
377
  if chunk0 =~ /\A[a-zA-Z0-9_$@]/
378
- address0 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
378
+ address0 = TreeNode.new(@input[@offset...@offset + 1], @offset)
379
379
  @offset = @offset + 1
380
380
  else
381
381
  address0 = FAILURE
@@ -447,12 +447,12 @@ module Maps
447
447
  end
448
448
  index1, elements0 = @offset, []
449
449
  address1 = FAILURE
450
- chunk0, max0 = nil, @offset + 1
451
- if max0 <= @input_size
452
- chunk0 = @input[@offset...max0]
450
+ chunk0 = nil
451
+ if @offset < @input_size
452
+ chunk0 = @input[@offset...@offset + 1]
453
453
  end
454
454
  if chunk0 == "."
455
- address1 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
455
+ address1 = TreeNode.new(@input[@offset...@offset + 1], @offset)
456
456
  @offset = @offset + 1
457
457
  else
458
458
  address1 = FAILURE
@@ -497,12 +497,12 @@ module Maps
497
497
  end
498
498
  index1, elements0 = @offset, []
499
499
  address1 = FAILURE
500
- chunk0, max0 = nil, @offset + 1
501
- if max0 <= @input_size
502
- chunk0 = @input[@offset...max0]
500
+ chunk0 = nil
501
+ if @offset < @input_size
502
+ chunk0 = @input[@offset...@offset + 1]
503
503
  end
504
504
  if chunk0 == "["
505
- address1 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
505
+ address1 = TreeNode.new(@input[@offset...@offset + 1], @offset)
506
506
  @offset = @offset + 1
507
507
  else
508
508
  address1 = FAILURE
@@ -537,12 +537,12 @@ module Maps
537
537
  unless address2 == FAILURE
538
538
  elements0 << address2
539
539
  address3 = FAILURE
540
- chunk1, max1 = nil, @offset + 1
541
- if max1 <= @input_size
542
- chunk1 = @input[@offset...max1]
540
+ chunk1 = nil
541
+ if @offset < @input_size
542
+ chunk1 = @input[@offset...@offset + 1]
543
543
  end
544
544
  if chunk1 == "]"
545
- address3 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
545
+ address3 = TreeNode.new(@input[@offset...@offset + 1], @offset)
546
546
  @offset = @offset + 1
547
547
  else
548
548
  address3 = FAILURE
@@ -608,12 +608,12 @@ module Maps
608
608
  unless address2 == FAILURE
609
609
  elements0 << address2
610
610
  address4 = FAILURE
611
- chunk0, max0 = nil, @offset + 1
612
- if max0 <= @input_size
613
- chunk0 = @input[@offset...max0]
611
+ chunk0 = nil
612
+ if @offset < @input_size
613
+ chunk0 = @input[@offset...@offset + 1]
614
614
  end
615
615
  if chunk0 == "("
616
- address4 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
616
+ address4 = TreeNode.new(@input[@offset...@offset + 1], @offset)
617
617
  @offset = @offset + 1
618
618
  else
619
619
  address4 = FAILURE
@@ -631,18 +631,18 @@ module Maps
631
631
  index3 = @offset
632
632
  address5 = _read_atom
633
633
  if address5 == FAILURE
634
- address5 = TreeNode.new(@input[index3...index3], index3, [])
634
+ address5 = TreeNode.new(@input[index3...index3], index3)
635
635
  @offset = index3
636
636
  end
637
637
  unless address5 == FAILURE
638
638
  elements0 << address5
639
639
  address6 = FAILURE
640
- chunk1, max1 = nil, @offset + 1
641
- if max1 <= @input_size
642
- chunk1 = @input[@offset...max1]
640
+ chunk1 = nil
641
+ if @offset < @input_size
642
+ chunk1 = @input[@offset...@offset + 1]
643
643
  end
644
644
  if chunk1 == ")"
645
- address6 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
645
+ address6 = TreeNode.new(@input[@offset...@offset + 1], @offset)
646
646
  @offset = @offset + 1
647
647
  else
648
648
  address6 = FAILURE
@@ -695,12 +695,12 @@ module Maps
695
695
  end
696
696
  index1, elements0 = @offset, []
697
697
  address1 = FAILURE
698
- chunk0, max0 = nil, @offset + 1
699
- if max0 <= @input_size
700
- chunk0 = @input[@offset...max0]
698
+ chunk0 = nil
699
+ if @offset < @input_size
700
+ chunk0 = @input[@offset...@offset + 1]
701
701
  end
702
702
  if chunk0 == "."
703
- address1 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
703
+ address1 = TreeNode.new(@input[@offset...@offset + 1], @offset)
704
704
  @offset = @offset + 1
705
705
  else
706
706
  address1 = FAILURE
@@ -736,12 +736,12 @@ module Maps
736
736
  unless address3 == FAILURE
737
737
  elements0 << address3
738
738
  address5 = FAILURE
739
- chunk1, max1 = nil, @offset + 1
740
- if max1 <= @input_size
741
- chunk1 = @input[@offset...max1]
739
+ chunk1 = nil
740
+ if @offset < @input_size
741
+ chunk1 = @input[@offset...@offset + 1]
742
742
  end
743
743
  if chunk1 == "("
744
- address5 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
744
+ address5 = TreeNode.new(@input[@offset...@offset + 1], @offset)
745
745
  @offset = @offset + 1
746
746
  else
747
747
  address5 = FAILURE
@@ -759,18 +759,18 @@ module Maps
759
759
  index3 = @offset
760
760
  address6 = _read_atom
761
761
  if address6 == FAILURE
762
- address6 = TreeNode.new(@input[index3...index3], index3, [])
762
+ address6 = TreeNode.new(@input[index3...index3], index3)
763
763
  @offset = index3
764
764
  end
765
765
  unless address6 == FAILURE
766
766
  elements0 << address6
767
767
  address7 = FAILURE
768
- chunk2, max2 = nil, @offset + 1
769
- if max2 <= @input_size
770
- chunk2 = @input[@offset...max2]
768
+ chunk2 = nil
769
+ if @offset < @input_size
770
+ chunk2 = @input[@offset...@offset + 1]
771
771
  end
772
772
  if chunk2 == ")"
773
- address7 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
773
+ address7 = TreeNode.new(@input[@offset...@offset + 1], @offset)
774
774
  @offset = @offset + 1
775
775
  else
776
776
  address7 = FAILURE
@@ -914,12 +914,12 @@ module Maps
914
914
  unless address1 == FAILURE
915
915
  elements0 << address1
916
916
  address2 = FAILURE
917
- chunk0, max0 = nil, @offset + 1
918
- if max0 <= @input_size
919
- chunk0 = @input[@offset...max0]
917
+ chunk0 = nil
918
+ if @offset < @input_size
919
+ chunk0 = @input[@offset...@offset + 1]
920
920
  end
921
921
  if chunk0 == "("
922
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
922
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
923
923
  @offset = @offset + 1
924
924
  else
925
925
  address2 = FAILURE
@@ -938,12 +938,12 @@ module Maps
938
938
  unless address3 == FAILURE
939
939
  elements0 << address3
940
940
  address4 = FAILURE
941
- chunk1, max1 = nil, @offset + 1
942
- if max1 <= @input_size
943
- chunk1 = @input[@offset...max1]
941
+ chunk1 = nil
942
+ if @offset < @input_size
943
+ chunk1 = @input[@offset...@offset + 1]
944
944
  end
945
945
  if chunk1 == ")"
946
- address4 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
946
+ address4 = TreeNode.new(@input[@offset...@offset + 1], @offset)
947
947
  @offset = @offset + 1
948
948
  else
949
949
  address4 = FAILURE
@@ -1004,12 +1004,12 @@ module Maps
1004
1004
  unless address1 == FAILURE
1005
1005
  elements0 << address1
1006
1006
  address2 = FAILURE
1007
- chunk0, max0 = nil, @offset + 1
1008
- if max0 <= @input_size
1009
- chunk0 = @input[@offset...max0]
1007
+ chunk0 = nil
1008
+ if @offset < @input_size
1009
+ chunk0 = @input[@offset...@offset + 1]
1010
1010
  end
1011
1011
  if chunk0 =~ /\A[\"]/
1012
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1012
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1013
1013
  @offset = @offset + 1
1014
1014
  else
1015
1015
  address2 = FAILURE
@@ -1026,12 +1026,12 @@ module Maps
1026
1026
  address3 = FAILURE
1027
1027
  remaining0, index2, elements1, address4 = 0, @offset, [], true
1028
1028
  until address4 == FAILURE
1029
- chunk1, max1 = nil, @offset + 1
1030
- if max1 <= @input_size
1031
- chunk1 = @input[@offset...max1]
1029
+ chunk1 = nil
1030
+ if @offset < @input_size
1031
+ chunk1 = @input[@offset...@offset + 1]
1032
1032
  end
1033
1033
  if chunk1 =~ /\A[ !#-~]/
1034
- address4 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1034
+ address4 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1035
1035
  @offset = @offset + 1
1036
1036
  else
1037
1037
  address4 = FAILURE
@@ -1057,12 +1057,12 @@ module Maps
1057
1057
  unless address3 == FAILURE
1058
1058
  elements0 << address3
1059
1059
  address5 = FAILURE
1060
- chunk2, max2 = nil, @offset + 1
1061
- if max2 <= @input_size
1062
- chunk2 = @input[@offset...max2]
1060
+ chunk2 = nil
1061
+ if @offset < @input_size
1062
+ chunk2 = @input[@offset...@offset + 1]
1063
1063
  end
1064
1064
  if chunk2 =~ /\A[\"]/
1065
- address5 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1065
+ address5 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1066
1066
  @offset = @offset + 1
1067
1067
  else
1068
1068
  address5 = FAILURE
@@ -1123,12 +1123,12 @@ module Maps
1123
1123
  unless address1 == FAILURE
1124
1124
  elements0 << address1
1125
1125
  address2 = FAILURE
1126
- chunk0, max0 = nil, @offset + 1
1127
- if max0 <= @input_size
1128
- chunk0 = @input[@offset...max0]
1126
+ chunk0 = nil
1127
+ if @offset < @input_size
1128
+ chunk0 = @input[@offset...@offset + 1]
1129
1129
  end
1130
1130
  if chunk0 == "'"
1131
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1131
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1132
1132
  @offset = @offset + 1
1133
1133
  else
1134
1134
  address2 = FAILURE
@@ -1145,12 +1145,12 @@ module Maps
1145
1145
  address3 = FAILURE
1146
1146
  remaining0, index2, elements1, address4 = 0, @offset, [], true
1147
1147
  until address4 == FAILURE
1148
- chunk1, max1 = nil, @offset + 1
1149
- if max1 <= @input_size
1150
- chunk1 = @input[@offset...max1]
1148
+ chunk1 = nil
1149
+ if @offset < @input_size
1150
+ chunk1 = @input[@offset...@offset + 1]
1151
1151
  end
1152
1152
  if chunk1 =~ /\A[^']/
1153
- address4 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1153
+ address4 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1154
1154
  @offset = @offset + 1
1155
1155
  else
1156
1156
  address4 = FAILURE
@@ -1176,12 +1176,12 @@ module Maps
1176
1176
  unless address3 == FAILURE
1177
1177
  elements0 << address3
1178
1178
  address5 = FAILURE
1179
- chunk2, max2 = nil, @offset + 1
1180
- if max2 <= @input_size
1181
- chunk2 = @input[@offset...max2]
1179
+ chunk2 = nil
1180
+ if @offset < @input_size
1181
+ chunk2 = @input[@offset...@offset + 1]
1182
1182
  end
1183
1183
  if chunk2 == "'"
1184
- address5 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1184
+ address5 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1185
1185
  @offset = @offset + 1
1186
1186
  else
1187
1187
  address5 = FAILURE
@@ -1242,12 +1242,12 @@ module Maps
1242
1242
  unless address1 == FAILURE
1243
1243
  elements0 << address1
1244
1244
  address2 = FAILURE
1245
- chunk0, max0 = nil, @offset + 1
1246
- if max0 <= @input_size
1247
- chunk0 = @input[@offset...max0]
1245
+ chunk0 = nil
1246
+ if @offset < @input_size
1247
+ chunk0 = @input[@offset...@offset + 1]
1248
1248
  end
1249
1249
  if chunk0 == "["
1250
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1250
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1251
1251
  @offset = @offset + 1
1252
1252
  else
1253
1253
  address2 = FAILURE
@@ -1281,12 +1281,12 @@ module Maps
1281
1281
  until address8 == FAILURE
1282
1282
  index5, elements3 = @offset, []
1283
1283
  address9 = FAILURE
1284
- chunk1, max1 = nil, @offset + 1
1285
- if max1 <= @input_size
1286
- chunk1 = @input[@offset...max1]
1284
+ chunk1 = nil
1285
+ if @offset < @input_size
1286
+ chunk1 = @input[@offset...@offset + 1]
1287
1287
  end
1288
1288
  if chunk1 == ","
1289
- address9 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1289
+ address9 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1290
1290
  @offset = @offset + 1
1291
1291
  else
1292
1292
  address9 = FAILURE
@@ -1366,7 +1366,7 @@ module Maps
1366
1366
  @offset = @offset
1367
1367
  end
1368
1368
  if address4 == FAILURE
1369
- address4 = TreeNode.new(@input[index2...index2], index2, [])
1369
+ address4 = TreeNode.new(@input[index2...index2], index2)
1370
1370
  @offset = index2
1371
1371
  end
1372
1372
  unless address4 == FAILURE
@@ -1376,12 +1376,12 @@ module Maps
1376
1376
  unless address13 == FAILURE
1377
1377
  elements0 << address13
1378
1378
  address14 = FAILURE
1379
- chunk2, max2 = nil, @offset + 1
1380
- if max2 <= @input_size
1381
- chunk2 = @input[@offset...max2]
1379
+ chunk2 = nil
1380
+ if @offset < @input_size
1381
+ chunk2 = @input[@offset...@offset + 1]
1382
1382
  end
1383
1383
  if chunk2 == "]"
1384
- address14 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1384
+ address14 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1385
1385
  @offset = @offset + 1
1386
1386
  else
1387
1387
  address14 = FAILURE
@@ -1450,12 +1450,12 @@ module Maps
1450
1450
  unless address1 == FAILURE
1451
1451
  elements0 << address1
1452
1452
  address2 = FAILURE
1453
- chunk0, max0 = nil, @offset + 1
1454
- if max0 <= @input_size
1455
- chunk0 = @input[@offset...max0]
1453
+ chunk0 = nil
1454
+ if @offset < @input_size
1455
+ chunk0 = @input[@offset...@offset + 1]
1456
1456
  end
1457
1457
  if chunk0 =~ /\A[']/
1458
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1458
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1459
1459
  @offset = @offset + 1
1460
1460
  else
1461
1461
  address2 = FAILURE
@@ -1470,12 +1470,12 @@ module Maps
1470
1470
  unless address2 == FAILURE
1471
1471
  elements0 << address2
1472
1472
  address3 = FAILURE
1473
- chunk1, max1 = nil, @offset + 1
1474
- if max1 <= @input_size
1475
- chunk1 = @input[@offset...max1]
1473
+ chunk1 = nil
1474
+ if @offset < @input_size
1475
+ chunk1 = @input[@offset...@offset + 1]
1476
1476
  end
1477
1477
  if chunk1 =~ /\A[ !#-~]/
1478
- address3 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1478
+ address3 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1479
1479
  @offset = @offset + 1
1480
1480
  else
1481
1481
  address3 = FAILURE
@@ -1490,12 +1490,12 @@ module Maps
1490
1490
  unless address3 == FAILURE
1491
1491
  elements0 << address3
1492
1492
  address4 = FAILURE
1493
- chunk2, max2 = nil, @offset + 1
1494
- if max2 <= @input_size
1495
- chunk2 = @input[@offset...max2]
1493
+ chunk2 = nil
1494
+ if @offset < @input_size
1495
+ chunk2 = @input[@offset...@offset + 1]
1496
1496
  end
1497
1497
  if chunk2 =~ /\A[']/
1498
- address4 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1498
+ address4 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1499
1499
  @offset = @offset + 1
1500
1500
  else
1501
1501
  address4 = FAILURE
@@ -1557,12 +1557,12 @@ module Maps
1557
1557
  elements0 << address1
1558
1558
  address2 = FAILURE
1559
1559
  index2 = @offset
1560
- chunk0, max0 = nil, @offset + 1
1561
- if max0 <= @input_size
1562
- chunk0 = @input[@offset...max0]
1560
+ chunk0 = nil
1561
+ if @offset < @input_size
1562
+ chunk0 = @input[@offset...@offset + 1]
1563
1563
  end
1564
1564
  if chunk0 == "-"
1565
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1565
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1566
1566
  @offset = @offset + 1
1567
1567
  else
1568
1568
  address2 = FAILURE
@@ -1575,7 +1575,7 @@ module Maps
1575
1575
  end
1576
1576
  end
1577
1577
  if address2 == FAILURE
1578
- address2 = TreeNode.new(@input[index2...index2], index2, [])
1578
+ address2 = TreeNode.new(@input[index2...index2], index2)
1579
1579
  @offset = index2
1580
1580
  end
1581
1581
  unless address2 == FAILURE
@@ -1583,12 +1583,12 @@ module Maps
1583
1583
  address3 = FAILURE
1584
1584
  remaining0, index3, elements1, address4 = 1, @offset, [], true
1585
1585
  until address4 == FAILURE
1586
- chunk1, max1 = nil, @offset + 1
1587
- if max1 <= @input_size
1588
- chunk1 = @input[@offset...max1]
1586
+ chunk1 = nil
1587
+ if @offset < @input_size
1588
+ chunk1 = @input[@offset...@offset + 1]
1589
1589
  end
1590
1590
  if chunk1 =~ /\A[0-9]/
1591
- address4 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1591
+ address4 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1592
1592
  @offset = @offset + 1
1593
1593
  else
1594
1594
  address4 = FAILURE
@@ -1657,12 +1657,12 @@ module Maps
1657
1657
  elements0 << address1
1658
1658
  address2 = FAILURE
1659
1659
  index2 = @offset
1660
- chunk0, max0 = nil, @offset + 1
1661
- if max0 <= @input_size
1662
- chunk0 = @input[@offset...max0]
1660
+ chunk0 = nil
1661
+ if @offset < @input_size
1662
+ chunk0 = @input[@offset...@offset + 1]
1663
1663
  end
1664
1664
  if chunk0 == "-"
1665
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1665
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1666
1666
  @offset = @offset + 1
1667
1667
  else
1668
1668
  address2 = FAILURE
@@ -1675,7 +1675,7 @@ module Maps
1675
1675
  end
1676
1676
  end
1677
1677
  if address2 == FAILURE
1678
- address2 = TreeNode.new(@input[index2...index2], index2, [])
1678
+ address2 = TreeNode.new(@input[index2...index2], index2)
1679
1679
  @offset = index2
1680
1680
  end
1681
1681
  unless address2 == FAILURE
@@ -1683,12 +1683,12 @@ module Maps
1683
1683
  address3 = FAILURE
1684
1684
  remaining0, index3, elements1, address4 = 1, @offset, [], true
1685
1685
  until address4 == FAILURE
1686
- chunk1, max1 = nil, @offset + 1
1687
- if max1 <= @input_size
1688
- chunk1 = @input[@offset...max1]
1686
+ chunk1 = nil
1687
+ if @offset < @input_size
1688
+ chunk1 = @input[@offset...@offset + 1]
1689
1689
  end
1690
1690
  if chunk1 =~ /\A[0-9]/
1691
- address4 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1691
+ address4 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1692
1692
  @offset = @offset + 1
1693
1693
  else
1694
1694
  address4 = FAILURE
@@ -1714,12 +1714,12 @@ module Maps
1714
1714
  unless address3 == FAILURE
1715
1715
  elements0 << address3
1716
1716
  address5 = FAILURE
1717
- chunk2, max2 = nil, @offset + 1
1718
- if max2 <= @input_size
1719
- chunk2 = @input[@offset...max2]
1717
+ chunk2 = nil
1718
+ if @offset < @input_size
1719
+ chunk2 = @input[@offset...@offset + 1]
1720
1720
  end
1721
1721
  if chunk2 == "."
1722
- address5 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1722
+ address5 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1723
1723
  @offset = @offset + 1
1724
1724
  else
1725
1725
  address5 = FAILURE
@@ -1736,12 +1736,12 @@ module Maps
1736
1736
  address6 = FAILURE
1737
1737
  remaining1, index4, elements2, address7 = 1, @offset, [], true
1738
1738
  until address7 == FAILURE
1739
- chunk3, max3 = nil, @offset + 1
1740
- if max3 <= @input_size
1741
- chunk3 = @input[@offset...max3]
1739
+ chunk3 = nil
1740
+ if @offset < @input_size
1741
+ chunk3 = @input[@offset...@offset + 1]
1742
1742
  end
1743
1743
  if chunk3 =~ /\A[0-9]/
1744
- address7 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
1744
+ address7 = TreeNode.new(@input[@offset...@offset + 1], @offset)
1745
1745
  @offset = @offset + 1
1746
1746
  else
1747
1747
  address7 = FAILURE
@@ -1818,12 +1818,12 @@ module Maps
1818
1818
  elements0 << address1
1819
1819
  address2 = FAILURE
1820
1820
  index2 = @offset
1821
- chunk0, max0 = nil, @offset + 4
1822
- if max0 <= @input_size
1823
- chunk0 = @input[@offset...max0]
1821
+ chunk0 = nil
1822
+ if @offset < @input_size
1823
+ chunk0 = @input[@offset...@offset + 4]
1824
1824
  end
1825
1825
  if chunk0 == "True"
1826
- address2 = TreeNode.new(@input[@offset...@offset + 4], @offset, [])
1826
+ address2 = TreeNode.new(@input[@offset...@offset + 4], @offset)
1827
1827
  @offset = @offset + 4
1828
1828
  else
1829
1829
  address2 = FAILURE
@@ -1837,12 +1837,12 @@ module Maps
1837
1837
  end
1838
1838
  if address2 == FAILURE
1839
1839
  @offset = index2
1840
- chunk1, max1 = nil, @offset + 4
1841
- if max1 <= @input_size
1842
- chunk1 = @input[@offset...max1]
1840
+ chunk1 = nil
1841
+ if @offset < @input_size
1842
+ chunk1 = @input[@offset...@offset + 4]
1843
1843
  end
1844
1844
  if chunk1 == "true"
1845
- address2 = TreeNode.new(@input[@offset...@offset + 4], @offset, [])
1845
+ address2 = TreeNode.new(@input[@offset...@offset + 4], @offset)
1846
1846
  @offset = @offset + 4
1847
1847
  else
1848
1848
  address2 = FAILURE
@@ -1856,12 +1856,12 @@ module Maps
1856
1856
  end
1857
1857
  if address2 == FAILURE
1858
1858
  @offset = index2
1859
- chunk2, max2 = nil, @offset + 5
1860
- if max2 <= @input_size
1861
- chunk2 = @input[@offset...max2]
1859
+ chunk2 = nil
1860
+ if @offset < @input_size
1861
+ chunk2 = @input[@offset...@offset + 5]
1862
1862
  end
1863
1863
  if chunk2 == "False"
1864
- address2 = TreeNode.new(@input[@offset...@offset + 5], @offset, [])
1864
+ address2 = TreeNode.new(@input[@offset...@offset + 5], @offset)
1865
1865
  @offset = @offset + 5
1866
1866
  else
1867
1867
  address2 = FAILURE
@@ -1875,12 +1875,12 @@ module Maps
1875
1875
  end
1876
1876
  if address2 == FAILURE
1877
1877
  @offset = index2
1878
- chunk3, max3 = nil, @offset + 5
1879
- if max3 <= @input_size
1880
- chunk3 = @input[@offset...max3]
1878
+ chunk3 = nil
1879
+ if @offset < @input_size
1880
+ chunk3 = @input[@offset...@offset + 5]
1881
1881
  end
1882
1882
  if chunk3 == "false"
1883
- address2 = TreeNode.new(@input[@offset...@offset + 5], @offset, [])
1883
+ address2 = TreeNode.new(@input[@offset...@offset + 5], @offset)
1884
1884
  @offset = @offset + 5
1885
1885
  else
1886
1886
  address2 = FAILURE
@@ -1940,12 +1940,12 @@ module Maps
1940
1940
  elements0 << address1
1941
1941
  address2 = FAILURE
1942
1942
  index2 = @offset
1943
- chunk0, max0 = nil, @offset + 4
1944
- if max0 <= @input_size
1945
- chunk0 = @input[@offset...max0]
1943
+ chunk0 = nil
1944
+ if @offset < @input_size
1945
+ chunk0 = @input[@offset...@offset + 4]
1946
1946
  end
1947
1947
  if chunk0 == "None"
1948
- address2 = TreeNode.new(@input[@offset...@offset + 4], @offset, [])
1948
+ address2 = TreeNode.new(@input[@offset...@offset + 4], @offset)
1949
1949
  @offset = @offset + 4
1950
1950
  else
1951
1951
  address2 = FAILURE
@@ -1959,12 +1959,12 @@ module Maps
1959
1959
  end
1960
1960
  if address2 == FAILURE
1961
1961
  @offset = index2
1962
- chunk1, max1 = nil, @offset + 3
1963
- if max1 <= @input_size
1964
- chunk1 = @input[@offset...max1]
1962
+ chunk1 = nil
1963
+ if @offset < @input_size
1964
+ chunk1 = @input[@offset...@offset + 3]
1965
1965
  end
1966
1966
  if chunk1 == "nil"
1967
- address2 = TreeNode.new(@input[@offset...@offset + 3], @offset, [])
1967
+ address2 = TreeNode.new(@input[@offset...@offset + 3], @offset)
1968
1968
  @offset = @offset + 3
1969
1969
  else
1970
1970
  address2 = FAILURE
@@ -1978,12 +1978,12 @@ module Maps
1978
1978
  end
1979
1979
  if address2 == FAILURE
1980
1980
  @offset = index2
1981
- chunk2, max2 = nil, @offset + 4
1982
- if max2 <= @input_size
1983
- chunk2 = @input[@offset...max2]
1981
+ chunk2 = nil
1982
+ if @offset < @input_size
1983
+ chunk2 = @input[@offset...@offset + 4]
1984
1984
  end
1985
1985
  if chunk2 == "null"
1986
- address2 = TreeNode.new(@input[@offset...@offset + 4], @offset, [])
1986
+ address2 = TreeNode.new(@input[@offset...@offset + 4], @offset)
1987
1987
  @offset = @offset + 4
1988
1988
  else
1989
1989
  address2 = FAILURE
@@ -2041,12 +2041,12 @@ module Maps
2041
2041
  unless address1 == FAILURE
2042
2042
  elements0 << address1
2043
2043
  address2 = FAILURE
2044
- chunk0, max0 = nil, @offset + 9
2045
- if max0 <= @input_size
2046
- chunk0 = @input[@offset...max0]
2044
+ chunk0 = nil
2045
+ if @offset < @input_size
2046
+ chunk0 = @input[@offset...@offset + 9]
2047
2047
  end
2048
2048
  if chunk0 == "undefined"
2049
- address2 = TreeNode.new(@input[@offset...@offset + 9], @offset, [])
2049
+ address2 = TreeNode.new(@input[@offset...@offset + 9], @offset)
2050
2050
  @offset = @offset + 9
2051
2051
  else
2052
2052
  address2 = FAILURE
@@ -2100,12 +2100,12 @@ module Maps
2100
2100
  elements0 << address1
2101
2101
  address2 = FAILURE
2102
2102
  index2 = @offset
2103
- chunk0, max0 = nil, @offset + 1
2104
- if max0 <= @input_size
2105
- chunk0 = @input[@offset...max0]
2103
+ chunk0 = nil
2104
+ if @offset < @input_size
2105
+ chunk0 = @input[@offset...@offset + 1]
2106
2106
  end
2107
2107
  if chunk0 == "+"
2108
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
2108
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
2109
2109
  @offset = @offset + 1
2110
2110
  else
2111
2111
  address2 = FAILURE
@@ -2119,12 +2119,12 @@ module Maps
2119
2119
  end
2120
2120
  if address2 == FAILURE
2121
2121
  @offset = index2
2122
- chunk1, max1 = nil, @offset + 1
2123
- if max1 <= @input_size
2124
- chunk1 = @input[@offset...max1]
2122
+ chunk1 = nil
2123
+ if @offset < @input_size
2124
+ chunk1 = @input[@offset...@offset + 1]
2125
2125
  end
2126
2126
  if chunk1 == "-"
2127
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
2127
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
2128
2128
  @offset = @offset + 1
2129
2129
  else
2130
2130
  address2 = FAILURE
@@ -2138,12 +2138,12 @@ module Maps
2138
2138
  end
2139
2139
  if address2 == FAILURE
2140
2140
  @offset = index2
2141
- chunk2, max2 = nil, @offset + 1
2142
- if max2 <= @input_size
2143
- chunk2 = @input[@offset...max2]
2141
+ chunk2 = nil
2142
+ if @offset < @input_size
2143
+ chunk2 = @input[@offset...@offset + 1]
2144
2144
  end
2145
2145
  if chunk2 == "*"
2146
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
2146
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
2147
2147
  @offset = @offset + 1
2148
2148
  else
2149
2149
  address2 = FAILURE
@@ -2157,12 +2157,12 @@ module Maps
2157
2157
  end
2158
2158
  if address2 == FAILURE
2159
2159
  @offset = index2
2160
- chunk3, max3 = nil, @offset + 1
2161
- if max3 <= @input_size
2162
- chunk3 = @input[@offset...max3]
2160
+ chunk3 = nil
2161
+ if @offset < @input_size
2162
+ chunk3 = @input[@offset...@offset + 1]
2163
2163
  end
2164
2164
  if chunk3 == "/"
2165
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
2165
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
2166
2166
  @offset = @offset + 1
2167
2167
  else
2168
2168
  address2 = FAILURE
@@ -2176,12 +2176,12 @@ module Maps
2176
2176
  end
2177
2177
  if address2 == FAILURE
2178
2178
  @offset = index2
2179
- chunk4, max4 = nil, @offset + 2
2180
- if max4 <= @input_size
2181
- chunk4 = @input[@offset...max4]
2179
+ chunk4 = nil
2180
+ if @offset < @input_size
2181
+ chunk4 = @input[@offset...@offset + 2]
2182
2182
  end
2183
2183
  if chunk4 == "<="
2184
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2184
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2185
2185
  @offset = @offset + 2
2186
2186
  else
2187
2187
  address2 = FAILURE
@@ -2195,12 +2195,12 @@ module Maps
2195
2195
  end
2196
2196
  if address2 == FAILURE
2197
2197
  @offset = index2
2198
- chunk5, max5 = nil, @offset + 2
2199
- if max5 <= @input_size
2200
- chunk5 = @input[@offset...max5]
2198
+ chunk5 = nil
2199
+ if @offset < @input_size
2200
+ chunk5 = @input[@offset...@offset + 2]
2201
2201
  end
2202
2202
  if chunk5 == ">="
2203
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2203
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2204
2204
  @offset = @offset + 2
2205
2205
  else
2206
2206
  address2 = FAILURE
@@ -2214,12 +2214,12 @@ module Maps
2214
2214
  end
2215
2215
  if address2 == FAILURE
2216
2216
  @offset = index2
2217
- chunk6, max6 = nil, @offset + 2
2218
- if max6 <= @input_size
2219
- chunk6 = @input[@offset...max6]
2217
+ chunk6 = nil
2218
+ if @offset < @input_size
2219
+ chunk6 = @input[@offset...@offset + 2]
2220
2220
  end
2221
2221
  if chunk6 == "!="
2222
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2222
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2223
2223
  @offset = @offset + 2
2224
2224
  else
2225
2225
  address2 = FAILURE
@@ -2233,12 +2233,12 @@ module Maps
2233
2233
  end
2234
2234
  if address2 == FAILURE
2235
2235
  @offset = index2
2236
- chunk7, max7 = nil, @offset + 2
2237
- if max7 <= @input_size
2238
- chunk7 = @input[@offset...max7]
2236
+ chunk7 = nil
2237
+ if @offset < @input_size
2238
+ chunk7 = @input[@offset...@offset + 2]
2239
2239
  end
2240
2240
  if chunk7 == "=="
2241
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2241
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2242
2242
  @offset = @offset + 2
2243
2243
  else
2244
2244
  address2 = FAILURE
@@ -2252,12 +2252,12 @@ module Maps
2252
2252
  end
2253
2253
  if address2 == FAILURE
2254
2254
  @offset = index2
2255
- chunk8, max8 = nil, @offset + 1
2256
- if max8 <= @input_size
2257
- chunk8 = @input[@offset...max8]
2255
+ chunk8 = nil
2256
+ if @offset < @input_size
2257
+ chunk8 = @input[@offset...@offset + 1]
2258
2258
  end
2259
2259
  if chunk8 == "="
2260
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
2260
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
2261
2261
  @offset = @offset + 1
2262
2262
  else
2263
2263
  address2 = FAILURE
@@ -2271,12 +2271,12 @@ module Maps
2271
2271
  end
2272
2272
  if address2 == FAILURE
2273
2273
  @offset = index2
2274
- chunk9, max9 = nil, @offset + 1
2275
- if max9 <= @input_size
2276
- chunk9 = @input[@offset...max9]
2274
+ chunk9 = nil
2275
+ if @offset < @input_size
2276
+ chunk9 = @input[@offset...@offset + 1]
2277
2277
  end
2278
2278
  if chunk9 == ">"
2279
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
2279
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
2280
2280
  @offset = @offset + 1
2281
2281
  else
2282
2282
  address2 = FAILURE
@@ -2290,12 +2290,12 @@ module Maps
2290
2290
  end
2291
2291
  if address2 == FAILURE
2292
2292
  @offset = index2
2293
- chunk10, max10 = nil, @offset + 1
2294
- if max10 <= @input_size
2295
- chunk10 = @input[@offset...max10]
2293
+ chunk10 = nil
2294
+ if @offset < @input_size
2295
+ chunk10 = @input[@offset...@offset + 1]
2296
2296
  end
2297
2297
  if chunk10 == "<"
2298
- address2 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
2298
+ address2 = TreeNode.new(@input[@offset...@offset + 1], @offset)
2299
2299
  @offset = @offset + 1
2300
2300
  else
2301
2301
  address2 = FAILURE
@@ -2309,12 +2309,12 @@ module Maps
2309
2309
  end
2310
2310
  if address2 == FAILURE
2311
2311
  @offset = index2
2312
- chunk11, max11 = nil, @offset + 2
2313
- if max11 <= @input_size
2314
- chunk11 = @input[@offset...max11]
2312
+ chunk11 = nil
2313
+ if @offset < @input_size
2314
+ chunk11 = @input[@offset...@offset + 2]
2315
2315
  end
2316
2316
  if chunk11 == "LT"
2317
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2317
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2318
2318
  @offset = @offset + 2
2319
2319
  else
2320
2320
  address2 = FAILURE
@@ -2328,12 +2328,12 @@ module Maps
2328
2328
  end
2329
2329
  if address2 == FAILURE
2330
2330
  @offset = index2
2331
- chunk12, max12 = nil, @offset + 2
2332
- if max12 <= @input_size
2333
- chunk12 = @input[@offset...max12]
2331
+ chunk12 = nil
2332
+ if @offset < @input_size
2333
+ chunk12 = @input[@offset...@offset + 2]
2334
2334
  end
2335
2335
  if chunk12 == "GT"
2336
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2336
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2337
2337
  @offset = @offset + 2
2338
2338
  else
2339
2339
  address2 = FAILURE
@@ -2347,12 +2347,12 @@ module Maps
2347
2347
  end
2348
2348
  if address2 == FAILURE
2349
2349
  @offset = index2
2350
- chunk13, max13 = nil, @offset + 2
2351
- if max13 <= @input_size
2352
- chunk13 = @input[@offset...max13]
2350
+ chunk13 = nil
2351
+ if @offset < @input_size
2352
+ chunk13 = @input[@offset...@offset + 2]
2353
2353
  end
2354
2354
  if chunk13 == "LE"
2355
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2355
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2356
2356
  @offset = @offset + 2
2357
2357
  else
2358
2358
  address2 = FAILURE
@@ -2366,12 +2366,12 @@ module Maps
2366
2366
  end
2367
2367
  if address2 == FAILURE
2368
2368
  @offset = index2
2369
- chunk14, max14 = nil, @offset + 2
2370
- if max14 <= @input_size
2371
- chunk14 = @input[@offset...max14]
2369
+ chunk14 = nil
2370
+ if @offset < @input_size
2371
+ chunk14 = @input[@offset...@offset + 2]
2372
2372
  end
2373
2373
  if chunk14 == "GE"
2374
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2374
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2375
2375
  @offset = @offset + 2
2376
2376
  else
2377
2377
  address2 = FAILURE
@@ -2385,12 +2385,12 @@ module Maps
2385
2385
  end
2386
2386
  if address2 == FAILURE
2387
2387
  @offset = index2
2388
- chunk15, max15 = nil, @offset + 2
2389
- if max15 <= @input_size
2390
- chunk15 = @input[@offset...max15]
2388
+ chunk15 = nil
2389
+ if @offset < @input_size
2390
+ chunk15 = @input[@offset...@offset + 2]
2391
2391
  end
2392
2392
  if chunk15 == "EQ"
2393
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2393
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2394
2394
  @offset = @offset + 2
2395
2395
  else
2396
2396
  address2 = FAILURE
@@ -2404,12 +2404,12 @@ module Maps
2404
2404
  end
2405
2405
  if address2 == FAILURE
2406
2406
  @offset = index2
2407
- chunk16, max16 = nil, @offset + 2
2408
- if max16 <= @input_size
2409
- chunk16 = @input[@offset...max16]
2407
+ chunk16 = nil
2408
+ if @offset < @input_size
2409
+ chunk16 = @input[@offset...@offset + 2]
2410
2410
  end
2411
2411
  if chunk16 == "NE"
2412
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2412
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2413
2413
  @offset = @offset + 2
2414
2414
  else
2415
2415
  address2 = FAILURE
@@ -2423,12 +2423,12 @@ module Maps
2423
2423
  end
2424
2424
  if address2 == FAILURE
2425
2425
  @offset = index2
2426
- chunk17, max17 = nil, @offset + 2
2427
- if max17 <= @input_size
2428
- chunk17 = @input[@offset...max17]
2426
+ chunk17 = nil
2427
+ if @offset < @input_size
2428
+ chunk17 = @input[@offset...@offset + 2]
2429
2429
  end
2430
2430
  if chunk17 == "lt"
2431
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2431
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2432
2432
  @offset = @offset + 2
2433
2433
  else
2434
2434
  address2 = FAILURE
@@ -2442,12 +2442,12 @@ module Maps
2442
2442
  end
2443
2443
  if address2 == FAILURE
2444
2444
  @offset = index2
2445
- chunk18, max18 = nil, @offset + 2
2446
- if max18 <= @input_size
2447
- chunk18 = @input[@offset...max18]
2445
+ chunk18 = nil
2446
+ if @offset < @input_size
2447
+ chunk18 = @input[@offset...@offset + 2]
2448
2448
  end
2449
2449
  if chunk18 == "gt"
2450
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2450
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2451
2451
  @offset = @offset + 2
2452
2452
  else
2453
2453
  address2 = FAILURE
@@ -2461,12 +2461,12 @@ module Maps
2461
2461
  end
2462
2462
  if address2 == FAILURE
2463
2463
  @offset = index2
2464
- chunk19, max19 = nil, @offset + 2
2465
- if max19 <= @input_size
2466
- chunk19 = @input[@offset...max19]
2464
+ chunk19 = nil
2465
+ if @offset < @input_size
2466
+ chunk19 = @input[@offset...@offset + 2]
2467
2467
  end
2468
2468
  if chunk19 == "le"
2469
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2469
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2470
2470
  @offset = @offset + 2
2471
2471
  else
2472
2472
  address2 = FAILURE
@@ -2480,12 +2480,12 @@ module Maps
2480
2480
  end
2481
2481
  if address2 == FAILURE
2482
2482
  @offset = index2
2483
- chunk20, max20 = nil, @offset + 2
2484
- if max20 <= @input_size
2485
- chunk20 = @input[@offset...max20]
2483
+ chunk20 = nil
2484
+ if @offset < @input_size
2485
+ chunk20 = @input[@offset...@offset + 2]
2486
2486
  end
2487
2487
  if chunk20 == "ge"
2488
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2488
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2489
2489
  @offset = @offset + 2
2490
2490
  else
2491
2491
  address2 = FAILURE
@@ -2499,12 +2499,12 @@ module Maps
2499
2499
  end
2500
2500
  if address2 == FAILURE
2501
2501
  @offset = index2
2502
- chunk21, max21 = nil, @offset + 2
2503
- if max21 <= @input_size
2504
- chunk21 = @input[@offset...max21]
2502
+ chunk21 = nil
2503
+ if @offset < @input_size
2504
+ chunk21 = @input[@offset...@offset + 2]
2505
2505
  end
2506
2506
  if chunk21 == "eq"
2507
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2507
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2508
2508
  @offset = @offset + 2
2509
2509
  else
2510
2510
  address2 = FAILURE
@@ -2518,12 +2518,12 @@ module Maps
2518
2518
  end
2519
2519
  if address2 == FAILURE
2520
2520
  @offset = index2
2521
- chunk22, max22 = nil, @offset + 2
2522
- if max22 <= @input_size
2523
- chunk22 = @input[@offset...max22]
2521
+ chunk22 = nil
2522
+ if @offset < @input_size
2523
+ chunk22 = @input[@offset...@offset + 2]
2524
2524
  end
2525
2525
  if chunk22 == "ne"
2526
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2526
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2527
2527
  @offset = @offset + 2
2528
2528
  else
2529
2529
  address2 = FAILURE
@@ -2537,12 +2537,12 @@ module Maps
2537
2537
  end
2538
2538
  if address2 == FAILURE
2539
2539
  @offset = index2
2540
- chunk23, max23 = nil, @offset + 2
2541
- if max23 <= @input_size
2542
- chunk23 = @input[@offset...max23]
2540
+ chunk23 = nil
2541
+ if @offset < @input_size
2542
+ chunk23 = @input[@offset...@offset + 2]
2543
2543
  end
2544
2544
  if chunk23 == "in"
2545
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2545
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2546
2546
  @offset = @offset + 2
2547
2547
  else
2548
2548
  address2 = FAILURE
@@ -2556,12 +2556,12 @@ module Maps
2556
2556
  end
2557
2557
  if address2 == FAILURE
2558
2558
  @offset = index2
2559
- chunk24, max24 = nil, @offset + 2
2560
- if max24 <= @input_size
2561
- chunk24 = @input[@offset...max24]
2559
+ chunk24 = nil
2560
+ if @offset < @input_size
2561
+ chunk24 = @input[@offset...@offset + 2]
2562
2562
  end
2563
2563
  if chunk24 == "IN"
2564
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2564
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2565
2565
  @offset = @offset + 2
2566
2566
  else
2567
2567
  address2 = FAILURE
@@ -2575,12 +2575,12 @@ module Maps
2575
2575
  end
2576
2576
  if address2 == FAILURE
2577
2577
  @offset = index2
2578
- chunk25, max25 = nil, @offset + 2
2579
- if max25 <= @input_size
2580
- chunk25 = @input[@offset...max25]
2578
+ chunk25 = nil
2579
+ if @offset < @input_size
2580
+ chunk25 = @input[@offset...@offset + 2]
2581
2581
  end
2582
2582
  if chunk25 == "or"
2583
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2583
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2584
2584
  @offset = @offset + 2
2585
2585
  else
2586
2586
  address2 = FAILURE
@@ -2594,12 +2594,12 @@ module Maps
2594
2594
  end
2595
2595
  if address2 == FAILURE
2596
2596
  @offset = index2
2597
- chunk26, max26 = nil, @offset + 2
2598
- if max26 <= @input_size
2599
- chunk26 = @input[@offset...max26]
2597
+ chunk26 = nil
2598
+ if @offset < @input_size
2599
+ chunk26 = @input[@offset...@offset + 2]
2600
2600
  end
2601
2601
  if chunk26 == "OR"
2602
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2602
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2603
2603
  @offset = @offset + 2
2604
2604
  else
2605
2605
  address2 = FAILURE
@@ -2613,12 +2613,12 @@ module Maps
2613
2613
  end
2614
2614
  if address2 == FAILURE
2615
2615
  @offset = index2
2616
- chunk27, max27 = nil, @offset + 2
2617
- if max27 <= @input_size
2618
- chunk27 = @input[@offset...max27]
2616
+ chunk27 = nil
2617
+ if @offset < @input_size
2618
+ chunk27 = @input[@offset...@offset + 2]
2619
2619
  end
2620
2620
  if chunk27 == "||"
2621
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2621
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2622
2622
  @offset = @offset + 2
2623
2623
  else
2624
2624
  address2 = FAILURE
@@ -2632,12 +2632,12 @@ module Maps
2632
2632
  end
2633
2633
  if address2 == FAILURE
2634
2634
  @offset = index2
2635
- chunk28, max28 = nil, @offset + 3
2636
- if max28 <= @input_size
2637
- chunk28 = @input[@offset...max28]
2635
+ chunk28 = nil
2636
+ if @offset < @input_size
2637
+ chunk28 = @input[@offset...@offset + 3]
2638
2638
  end
2639
2639
  if chunk28 == "and"
2640
- address2 = TreeNode.new(@input[@offset...@offset + 3], @offset, [])
2640
+ address2 = TreeNode.new(@input[@offset...@offset + 3], @offset)
2641
2641
  @offset = @offset + 3
2642
2642
  else
2643
2643
  address2 = FAILURE
@@ -2651,12 +2651,12 @@ module Maps
2651
2651
  end
2652
2652
  if address2 == FAILURE
2653
2653
  @offset = index2
2654
- chunk29, max29 = nil, @offset + 3
2655
- if max29 <= @input_size
2656
- chunk29 = @input[@offset...max29]
2654
+ chunk29 = nil
2655
+ if @offset < @input_size
2656
+ chunk29 = @input[@offset...@offset + 3]
2657
2657
  end
2658
2658
  if chunk29 == "AND"
2659
- address2 = TreeNode.new(@input[@offset...@offset + 3], @offset, [])
2659
+ address2 = TreeNode.new(@input[@offset...@offset + 3], @offset)
2660
2660
  @offset = @offset + 3
2661
2661
  else
2662
2662
  address2 = FAILURE
@@ -2670,12 +2670,12 @@ module Maps
2670
2670
  end
2671
2671
  if address2 == FAILURE
2672
2672
  @offset = index2
2673
- chunk30, max30 = nil, @offset + 2
2674
- if max30 <= @input_size
2675
- chunk30 = @input[@offset...max30]
2673
+ chunk30 = nil
2674
+ if @offset < @input_size
2675
+ chunk30 = @input[@offset...@offset + 2]
2676
2676
  end
2677
2677
  if chunk30 == "&&"
2678
- address2 = TreeNode.new(@input[@offset...@offset + 2], @offset, [])
2678
+ address2 = TreeNode.new(@input[@offset...@offset + 2], @offset)
2679
2679
  @offset = @offset + 2
2680
2680
  else
2681
2681
  address2 = FAILURE
@@ -2757,12 +2757,12 @@ module Maps
2757
2757
  end
2758
2758
  remaining0, index1, elements0, address1 = 0, @offset, [], true
2759
2759
  until address1 == FAILURE
2760
- chunk0, max0 = nil, @offset + 1
2761
- if max0 <= @input_size
2762
- chunk0 = @input[@offset...max0]
2760
+ chunk0 = nil
2761
+ if @offset < @input_size
2762
+ chunk0 = @input[@offset...@offset + 1]
2763
2763
  end
2764
2764
  if chunk0 =~ /\A[\s]/
2765
- address1 = TreeNode.new(@input[@offset...@offset + 1], @offset, [])
2765
+ address1 = TreeNode.new(@input[@offset...@offset + 1], @offset)
2766
2766
  @offset = @offset + 1
2767
2767
  else
2768
2768
  address1 = FAILURE