mongo-ejson 0.2.1 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +34 -0
- data/.rubocop_todo.yml +13 -0
- data/.ruby-version +1 -0
- data/.travis.yml +6 -2
- data/Gemfile +1 -1
- data/Gemfile.lock +39 -18
- data/README.md +26 -36
- data/Rakefile +9 -9
- data/bin/console +3 -3
- data/ejson.gemspec +23 -22
- data/lib/ejson.rb +10 -4
- data/lib/ejson/parser_action/abstract_json.rb +14 -11
- data/lib/ejson/parser_action/abstract_mongo.rb +11 -11
- data/lib/ejson/parser_action/bson.rb +20 -22
- data/lib/ejson/parser_action/ruby.rb +36 -25
- data/lib/ejson/parser_action/wrap.rb +8 -8
- data/lib/ejson/parser_action/wrap_types.rb +4 -4
- data/lib/ejson/version.rb +1 -1
- data/src/ejson.peg +23 -4
- data/src/ejson.rb +449 -48
- data/vendor/assets/javascripts/ejson.js +450 -49
- metadata +25 -8
@@ -1,36 +1,36 @@
|
|
1
1
|
module ParserAction
|
2
2
|
module AbstractMongo
|
3
|
-
def make_object_id(input,
|
3
|
+
def make_object_id(input, starts_at, _ends_at, elements)
|
4
4
|
end
|
5
5
|
|
6
|
-
def make_bin_data(input,
|
6
|
+
def make_bin_data(input, starts_at, _ends_at, elements)
|
7
7
|
end
|
8
8
|
|
9
|
-
def make_timestamp(input,
|
9
|
+
def make_timestamp(input, starts_at, _ends_at, elements)
|
10
10
|
end
|
11
11
|
|
12
|
-
def make_number_long(input,
|
12
|
+
def make_number_long(input, starts_at, _ends_at, elements)
|
13
13
|
end
|
14
14
|
|
15
|
-
def make_number_decimal(input,
|
15
|
+
def make_number_decimal(input, starts_at, _ends_at, elements)
|
16
16
|
end
|
17
17
|
|
18
|
-
def make_date(input,
|
18
|
+
def make_date(input, starts_at, _ends_at, elements)
|
19
19
|
end
|
20
20
|
|
21
|
-
def make_regexp(input,
|
21
|
+
def make_regexp(input, starts_at, _ends_at, elements)
|
22
22
|
end
|
23
23
|
|
24
|
-
def make_db_ref(input,
|
24
|
+
def make_db_ref(input, starts_at, _ends_at, elements)
|
25
25
|
end
|
26
26
|
|
27
|
-
def make_min_key(input,
|
27
|
+
def make_min_key(input, starts_at, _ends_at)
|
28
28
|
end
|
29
29
|
|
30
|
-
def make_max_key(input,
|
30
|
+
def make_max_key(input, starts_at, _ends_at)
|
31
31
|
end
|
32
32
|
|
33
|
-
def make_undefined(input,
|
33
|
+
def make_undefined(input, starts_at, _ends_at)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -2,59 +2,57 @@ require 'ejson/parser_action/ruby'
|
|
2
2
|
|
3
3
|
module ParserAction
|
4
4
|
class BSON < ParserAction::Ruby
|
5
|
-
def make_object_id(
|
5
|
+
def make_object_id(_input, _starts_at, _ends_at, elements)
|
6
6
|
value = elements.first
|
7
7
|
|
8
8
|
::BSON::ObjectId.from_string(value)
|
9
9
|
end
|
10
10
|
|
11
11
|
NUMBER_TO_TYPE = {
|
12
|
-
0
|
13
|
-
1
|
14
|
-
2
|
15
|
-
3
|
16
|
-
4
|
17
|
-
5
|
18
|
-
128
|
19
|
-
}
|
20
|
-
|
21
|
-
def make_bin_data(
|
12
|
+
0 => :generic,
|
13
|
+
1 => :function,
|
14
|
+
2 => :old,
|
15
|
+
3 => :uuid_old,
|
16
|
+
4 => :uuid,
|
17
|
+
5 => :md5,
|
18
|
+
128 => :user,
|
19
|
+
}.freeze
|
20
|
+
|
21
|
+
def make_bin_data(_input, _starts_at, _ends_at, elements)
|
22
22
|
data = elements.last
|
23
23
|
type = elements.first
|
24
24
|
|
25
|
-
if type.is_a? Numeric
|
26
|
-
type = NUMBER_TO_TYPE[type]
|
27
|
-
end
|
25
|
+
type = NUMBER_TO_TYPE[type] if type.is_a? Numeric
|
28
26
|
|
29
27
|
::BSON::Binary.new(data, type.to_sym)
|
30
28
|
end
|
31
29
|
|
32
|
-
def make_timestamp(
|
30
|
+
def make_timestamp(_input, _starts_at, _ends_at, elements)
|
33
31
|
::BSON::Timestamp.new(elements.first, elements.last)
|
34
32
|
end
|
35
33
|
|
36
|
-
def make_number_decimal(
|
34
|
+
def make_number_decimal(_input, _starts_at, _ends_at, elements)
|
37
35
|
value = elements.first
|
38
36
|
|
39
37
|
::BSON::Decimal128.new(value.to_s)
|
40
38
|
end
|
41
39
|
|
42
|
-
def make_db_ref(
|
40
|
+
def make_db_ref(_input, _starts_at, _ends_at, elements)
|
43
41
|
{
|
44
|
-
|
45
|
-
|
42
|
+
"$ref": elements.first,
|
43
|
+
"$id": elements.last,
|
46
44
|
}
|
47
45
|
end
|
48
46
|
|
49
|
-
def make_min_key(
|
47
|
+
def make_min_key(_input, _starts_at, _ends_at)
|
50
48
|
::BSON::MinKey
|
51
49
|
end
|
52
50
|
|
53
|
-
def make_max_key(
|
51
|
+
def make_max_key(_input, _starts_at, _ends_at)
|
54
52
|
::BSON::MaxKey
|
55
53
|
end
|
56
54
|
|
57
|
-
def make_undefined(
|
55
|
+
def make_undefined(_input, _starts_at, _ends_at)
|
58
56
|
::BSON::Undefined
|
59
57
|
end
|
60
58
|
end
|
@@ -3,15 +3,19 @@ require 'date'
|
|
3
3
|
|
4
4
|
module ParserAction
|
5
5
|
class Ruby < ParserAction::Abstract
|
6
|
-
|
6
|
+
UNICODE_ESCAPER = proc { |s|
|
7
|
+
format('\u%04X', s.codepoints[0])
|
8
|
+
}
|
9
|
+
|
10
|
+
def make_root(_input, _starts_at, _ends_at, elements)
|
7
11
|
elements.first
|
8
12
|
end
|
9
13
|
|
10
|
-
def make_object(
|
14
|
+
def make_object(_input, _starts_at, _ends_at, elements)
|
11
15
|
first_pair = elements.first
|
12
16
|
other_pairs = elements.last
|
13
17
|
|
14
|
-
object = {first_pair[0] => first_pair[1]}
|
18
|
+
object = { first_pair[0] => first_pair[1] }
|
15
19
|
other_pairs.each do |element|
|
16
20
|
pair = element.pair
|
17
21
|
object[pair.first] = pair.last
|
@@ -20,65 +24,74 @@ module ParserAction
|
|
20
24
|
object
|
21
25
|
end
|
22
26
|
|
23
|
-
def make_pair(
|
27
|
+
def make_pair(_input, _starts_at, _ends_at, elements)
|
24
28
|
elements
|
25
29
|
end
|
26
30
|
|
27
|
-
def make_empty_object(
|
31
|
+
def make_empty_object(_input, _starts_at, _ends_at, _elements)
|
28
32
|
{}
|
29
33
|
end
|
30
34
|
|
31
|
-
def make_string(
|
32
|
-
%
|
35
|
+
def make_string(_input, _starts_at, _ends_at, elements)
|
36
|
+
quoted_string = %("#{elements.first.text}")
|
37
|
+
quoted_string.encode('ASCII', fallback: UNICODE_ESCAPER).undump
|
38
|
+
end
|
39
|
+
|
40
|
+
def make_identifier(input, starts_at, ends_at, _elements)
|
41
|
+
input[starts_at...ends_at]
|
33
42
|
end
|
34
43
|
|
35
|
-
def make_numeric_string(
|
44
|
+
def make_numeric_string(_input, _starts_at, _ends_at, elements)
|
36
45
|
elements.first
|
37
46
|
end
|
38
47
|
|
39
|
-
def make_number_as_string(input,
|
40
|
-
string = input[
|
48
|
+
def make_number_as_string(input, starts_at, ends_at, _elements)
|
49
|
+
string = input[starts_at...ends_at]
|
41
50
|
string.downcase!
|
42
51
|
|
43
52
|
string
|
44
53
|
end
|
45
54
|
|
46
|
-
def make_array(
|
55
|
+
def make_array(_input, _starts_at, _ends_at, elements)
|
47
56
|
list = [elements[0]]
|
48
57
|
elements[1].each { |el| list << el.value }
|
49
58
|
list
|
50
59
|
end
|
51
60
|
|
52
|
-
def make_empty_array(
|
61
|
+
def make_empty_array(_input, _starts_at, _ends_at, _elements)
|
53
62
|
[]
|
54
63
|
end
|
55
64
|
|
56
|
-
def make_number(input,
|
57
|
-
string = input[
|
65
|
+
def make_number(input, starts_at, ends_at, _elements)
|
66
|
+
string = input[starts_at...ends_at]
|
58
67
|
string.downcase!
|
59
68
|
|
60
69
|
_number_from_string(string)
|
61
70
|
end
|
62
71
|
|
63
|
-
def make_null(
|
72
|
+
def make_null(_input, _starts_at, _ends_at)
|
64
73
|
nil
|
65
74
|
end
|
66
75
|
|
67
|
-
def make_true(
|
76
|
+
def make_true(_input, _starts_at, _ends_at)
|
68
77
|
true
|
69
78
|
end
|
70
79
|
|
71
|
-
def make_false(
|
80
|
+
def make_false(_input, _starts_at, _ends_at)
|
72
81
|
false
|
73
82
|
end
|
74
83
|
|
75
84
|
# Makes ruby date from mongo Data type
|
76
|
-
def make_date(input,
|
85
|
+
def make_date(input, _starts_at, _ends_at, elements)
|
77
86
|
value = elements.first
|
78
87
|
|
79
88
|
case value
|
80
89
|
when String
|
81
|
-
|
90
|
+
begin
|
91
|
+
DateTime.parse(value)
|
92
|
+
rescue ArgumentError => error
|
93
|
+
raise ExtendedJSON::ParseError, "Invalid date '#{value}'', expected ISO date"
|
94
|
+
end
|
82
95
|
when Numeric
|
83
96
|
Time.at(value)
|
84
97
|
else
|
@@ -87,20 +100,18 @@ module ParserAction
|
|
87
100
|
end
|
88
101
|
end
|
89
102
|
|
90
|
-
def make_regexp(
|
103
|
+
def make_regexp(_input, _starts_at, _ends_at, elements)
|
91
104
|
Regexp.new(elements.first.text, elements.last.text)
|
92
105
|
end
|
93
106
|
|
94
|
-
def make_number_long(
|
95
|
-
|
107
|
+
def make_number_long(_input, _starts_at, _ends_at, elements)
|
108
|
+
elements.first
|
96
109
|
end
|
97
110
|
|
98
111
|
private
|
99
112
|
|
100
113
|
def _number_from_string(string)
|
101
|
-
if string.include? 'e'
|
102
|
-
return Float(string)
|
103
|
-
end
|
114
|
+
return Float(string) if string.include? 'e'
|
104
115
|
|
105
116
|
if string.include? '.'
|
106
117
|
string.to_f
|
@@ -4,40 +4,40 @@ require 'bigdecimal'
|
|
4
4
|
|
5
5
|
module ParserAction
|
6
6
|
class Wrap < ParserAction::Ruby
|
7
|
-
def make_object_id(
|
7
|
+
def make_object_id(_input, _starts_at, _ends_at, elements)
|
8
8
|
value = elements.first
|
9
9
|
|
10
10
|
::Wrap::ObjectId.new(value)
|
11
11
|
end
|
12
12
|
|
13
|
-
def make_bin_data(
|
13
|
+
def make_bin_data(_input, _starts_at, _ends_at, elements)
|
14
14
|
data = elements.last
|
15
15
|
type = elements.first
|
16
16
|
|
17
17
|
::Wrap::BinData.new(type, data)
|
18
18
|
end
|
19
19
|
|
20
|
-
def make_timestamp(
|
20
|
+
def make_timestamp(_input, _starts_at, _ends_at, elements)
|
21
21
|
::Wrap::Timestamp.new(elements.first, elements.last)
|
22
22
|
end
|
23
23
|
|
24
|
-
def make_number_decimal(
|
24
|
+
def make_number_decimal(_input, _starts_at, _ends_at, elements)
|
25
25
|
BigDecimal(elements.first)
|
26
26
|
end
|
27
27
|
|
28
|
-
def make_db_ref(
|
28
|
+
def make_db_ref(_input, _starts_at, _ends_at, elements)
|
29
29
|
::Wrap::DBRef.new(elements.first, elements.last)
|
30
30
|
end
|
31
31
|
|
32
|
-
def make_min_key(
|
32
|
+
def make_min_key(_input, _starts_at, _ends_at)
|
33
33
|
::Wrap::MinKey
|
34
34
|
end
|
35
35
|
|
36
|
-
def make_max_key(
|
36
|
+
def make_max_key(_input, _starts_at, _ends_at)
|
37
37
|
::Wrap::MaxKey
|
38
38
|
end
|
39
39
|
|
40
|
-
def make_undefined(
|
40
|
+
def make_undefined(_input, _starts_at, _ends_at)
|
41
41
|
::Wrap::Undefined
|
42
42
|
end
|
43
43
|
end
|
@@ -3,9 +3,9 @@ module Wrap
|
|
3
3
|
MaxKey = Class.new
|
4
4
|
Undefined = Class.new
|
5
5
|
|
6
|
-
ObjectId = Struct.new(
|
7
|
-
BinData = Struct.new(
|
8
|
-
Timestamp = Struct.new(
|
6
|
+
ObjectId = Struct.new('ObjectId', :hex)
|
7
|
+
BinData = Struct.new('BinData', :type, :data)
|
8
|
+
Timestamp = Struct.new('Timestamp', :timestamp, :fraction)
|
9
9
|
|
10
|
-
DBRef = Struct.new(
|
10
|
+
DBRef = Struct.new('DBRef', :name, :id)
|
11
11
|
end
|
data/lib/ejson/version.rb
CHANGED
data/src/ejson.peg
CHANGED
@@ -4,7 +4,7 @@ grammar ExtendedJSON
|
|
4
4
|
|
5
5
|
object <- (non_empty_object / empty_object)
|
6
6
|
|
7
|
-
pair <- @__ string @assignment value
|
7
|
+
pair <- @__ (string / identifier) @assignment value
|
8
8
|
%make_pair
|
9
9
|
|
10
10
|
non_empty_object <- @object_open
|
@@ -48,18 +48,35 @@ grammar ExtendedJSON
|
|
48
48
|
|
49
49
|
string <- double_quote_string / single_quote_string
|
50
50
|
|
51
|
+
identifier <- (identifier_start identifier_part+)
|
52
|
+
%make_identifier
|
53
|
+
|
54
|
+
identifier_start <- unicode_letter / "$" / "_" / "\\" unicode_escape
|
55
|
+
identifier_part <- unicode_letter / unicode_digit / unicode_conn_punct
|
56
|
+
|
57
|
+
# Not fully compatible with a https://www.ecma-international.org/ecma-262/5.1/#sec-7.6
|
58
|
+
# but enough to cover most failing cases
|
59
|
+
unicode_combining <- unicode_non_spacing / unicode_comb_spacing
|
60
|
+
|
61
|
+
unicode_escape <- "u" hex_digit hex_digit hex_digit hex_digit
|
62
|
+
|
63
|
+
unicode_letter <- [a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]
|
64
|
+
unicode_digit <- [0-9]
|
65
|
+
unicode_conn_punct <- [_\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F]
|
66
|
+
|
67
|
+
# https://www.ecma-international.org/ecma-262/5.1/#sec-7.8.4
|
51
68
|
double_quote_string <- @double_quote
|
52
|
-
("\\"
|
69
|
+
("\\" [^\b\t\n\v\f\r] / [^"\b\t\n\v\f\r])*
|
53
70
|
@double_quote
|
54
71
|
%make_string
|
55
72
|
|
56
73
|
single_quote_string <- @single_quote
|
57
|
-
("\\"
|
74
|
+
("\\" [^\b\t\n\v\f\r] / [^'\b\t\n\v\f\r])*
|
58
75
|
@single_quote
|
59
76
|
%make_string
|
60
77
|
|
61
78
|
hex_string <- hex_single_quote / hex_double_quote
|
62
|
-
hex_value <-
|
79
|
+
hex_value <- hex_digit+
|
63
80
|
|
64
81
|
hex_single_quote <- @single_quote
|
65
82
|
hex_value
|
@@ -209,6 +226,8 @@ grammar ExtendedJSON
|
|
209
226
|
space <- [\s]
|
210
227
|
new_line <- [\n]
|
211
228
|
|
229
|
+
hex_digit <- [a-fA-F0-9]
|
230
|
+
|
212
231
|
comment <- "//" [^\n]*
|
213
232
|
__ <- (space / new_line / comment)*
|
214
233
|
|
data/src/ejson.rb
CHANGED
@@ -18,11 +18,10 @@ module ExtendedJSON
|
|
18
18
|
end
|
19
19
|
|
20
20
|
class TreeNode1 < TreeNode
|
21
|
-
attr_reader :
|
21
|
+
attr_reader :value
|
22
22
|
|
23
23
|
def initialize(text, offset, elements)
|
24
24
|
super
|
25
|
-
@string = elements[0]
|
26
25
|
@value = elements[1]
|
27
26
|
end
|
28
27
|
end
|
@@ -64,6 +63,33 @@ module ExtendedJSON
|
|
64
63
|
end
|
65
64
|
|
66
65
|
class TreeNode6 < TreeNode
|
66
|
+
attr_reader :identifier_start
|
67
|
+
|
68
|
+
def initialize(text, offset, elements)
|
69
|
+
super
|
70
|
+
@identifier_start = elements[0]
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
class TreeNode7 < TreeNode
|
75
|
+
attr_reader :unicode_escape
|
76
|
+
|
77
|
+
def initialize(text, offset, elements)
|
78
|
+
super
|
79
|
+
@unicode_escape = elements[1]
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
class TreeNode8 < TreeNode
|
84
|
+
attr_reader :hex_digit
|
85
|
+
|
86
|
+
def initialize(text, offset, elements)
|
87
|
+
super
|
88
|
+
@hex_digit = elements[4]
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
class TreeNode9 < TreeNode
|
67
93
|
attr_reader :hex_value
|
68
94
|
|
69
95
|
def initialize(text, offset, elements)
|
@@ -72,7 +98,7 @@ module ExtendedJSON
|
|
72
98
|
end
|
73
99
|
end
|
74
100
|
|
75
|
-
class
|
101
|
+
class TreeNode10 < TreeNode
|
76
102
|
attr_reader :hex_value
|
77
103
|
|
78
104
|
def initialize(text, offset, elements)
|
@@ -81,7 +107,7 @@ module ExtendedJSON
|
|
81
107
|
end
|
82
108
|
end
|
83
109
|
|
84
|
-
class
|
110
|
+
class TreeNode11 < TreeNode
|
85
111
|
attr_reader :integer_number
|
86
112
|
|
87
113
|
def initialize(text, offset, elements)
|
@@ -90,7 +116,7 @@ module ExtendedJSON
|
|
90
116
|
end
|
91
117
|
end
|
92
118
|
|
93
|
-
class
|
119
|
+
class TreeNode12 < TreeNode
|
94
120
|
attr_reader :integer_number
|
95
121
|
|
96
122
|
def initialize(text, offset, elements)
|
@@ -99,7 +125,7 @@ module ExtendedJSON
|
|
99
125
|
end
|
100
126
|
end
|
101
127
|
|
102
|
-
class
|
128
|
+
class TreeNode13 < TreeNode
|
103
129
|
attr_reader :number
|
104
130
|
|
105
131
|
def initialize(text, offset, elements)
|
@@ -108,7 +134,7 @@ module ExtendedJSON
|
|
108
134
|
end
|
109
135
|
end
|
110
136
|
|
111
|
-
class
|
137
|
+
class TreeNode14 < TreeNode
|
112
138
|
attr_reader :number
|
113
139
|
|
114
140
|
def initialize(text, offset, elements)
|
@@ -117,7 +143,7 @@ module ExtendedJSON
|
|
117
143
|
end
|
118
144
|
end
|
119
145
|
|
120
|
-
class
|
146
|
+
class TreeNode15 < TreeNode
|
121
147
|
attr_reader :base64_value
|
122
148
|
|
123
149
|
def initialize(text, offset, elements)
|
@@ -126,7 +152,7 @@ module ExtendedJSON
|
|
126
152
|
end
|
127
153
|
end
|
128
154
|
|
129
|
-
class
|
155
|
+
class TreeNode16 < TreeNode
|
130
156
|
attr_reader :base64_value
|
131
157
|
|
132
158
|
def initialize(text, offset, elements)
|
@@ -135,7 +161,7 @@ module ExtendedJSON
|
|
135
161
|
end
|
136
162
|
end
|
137
163
|
|
138
|
-
class
|
164
|
+
class TreeNode17 < TreeNode
|
139
165
|
attr_reader :integer
|
140
166
|
|
141
167
|
def initialize(text, offset, elements)
|
@@ -144,7 +170,7 @@ module ExtendedJSON
|
|
144
170
|
end
|
145
171
|
end
|
146
172
|
|
147
|
-
class
|
173
|
+
class TreeNode18 < TreeNode
|
148
174
|
attr_reader :integer
|
149
175
|
|
150
176
|
def initialize(text, offset, elements)
|
@@ -153,7 +179,7 @@ module ExtendedJSON
|
|
153
179
|
end
|
154
180
|
end
|
155
181
|
|
156
|
-
class
|
182
|
+
class TreeNode19 < TreeNode
|
157
183
|
attr_reader :integer
|
158
184
|
|
159
185
|
def initialize(text, offset, elements)
|
@@ -162,7 +188,7 @@ module ExtendedJSON
|
|
162
188
|
end
|
163
189
|
end
|
164
190
|
|
165
|
-
class
|
191
|
+
class TreeNode20 < TreeNode
|
166
192
|
attr_reader :hex_string
|
167
193
|
|
168
194
|
def initialize(text, offset, elements)
|
@@ -171,7 +197,7 @@ module ExtendedJSON
|
|
171
197
|
end
|
172
198
|
end
|
173
199
|
|
174
|
-
class
|
200
|
+
class TreeNode21 < TreeNode
|
175
201
|
attr_reader :bin_data_type, :base64_string
|
176
202
|
|
177
203
|
def initialize(text, offset, elements)
|
@@ -181,7 +207,7 @@ module ExtendedJSON
|
|
181
207
|
end
|
182
208
|
end
|
183
209
|
|
184
|
-
class
|
210
|
+
class TreeNode22 < TreeNode
|
185
211
|
attr_reader :integer_number
|
186
212
|
|
187
213
|
def initialize(text, offset, elements)
|
@@ -190,7 +216,7 @@ module ExtendedJSON
|
|
190
216
|
end
|
191
217
|
end
|
192
218
|
|
193
|
-
class
|
219
|
+
class TreeNode23 < TreeNode
|
194
220
|
attr_reader :number_long_value
|
195
221
|
|
196
222
|
def initialize(text, offset, elements)
|
@@ -199,7 +225,7 @@ module ExtendedJSON
|
|
199
225
|
end
|
200
226
|
end
|
201
227
|
|
202
|
-
class
|
228
|
+
class TreeNode24 < TreeNode
|
203
229
|
attr_reader :number_decimal_value
|
204
230
|
|
205
231
|
def initialize(text, offset, elements)
|
@@ -208,7 +234,7 @@ module ExtendedJSON
|
|
208
234
|
end
|
209
235
|
end
|
210
236
|
|
211
|
-
class
|
237
|
+
class TreeNode25 < TreeNode
|
212
238
|
attr_reader :date_value
|
213
239
|
|
214
240
|
def initialize(text, offset, elements)
|
@@ -217,7 +243,7 @@ module ExtendedJSON
|
|
217
243
|
end
|
218
244
|
end
|
219
245
|
|
220
|
-
class
|
246
|
+
class TreeNode26 < TreeNode
|
221
247
|
attr_reader :string
|
222
248
|
|
223
249
|
def initialize(text, offset, elements)
|
@@ -226,7 +252,7 @@ module ExtendedJSON
|
|
226
252
|
end
|
227
253
|
end
|
228
254
|
|
229
|
-
class
|
255
|
+
class TreeNode27 < TreeNode
|
230
256
|
attr_reader :comma
|
231
257
|
|
232
258
|
def initialize(text, offset, elements)
|
@@ -320,7 +346,15 @@ module ExtendedJSON
|
|
320
346
|
address1 = _read___
|
321
347
|
unless address1 == FAILURE
|
322
348
|
address2 = FAILURE
|
349
|
+
index2 = @offset
|
323
350
|
address2 = _read_string
|
351
|
+
if address2 == FAILURE
|
352
|
+
@offset = index2
|
353
|
+
address2 = _read_identifier
|
354
|
+
if address2 == FAILURE
|
355
|
+
@offset = index2
|
356
|
+
end
|
357
|
+
end
|
324
358
|
unless address2 == FAILURE
|
325
359
|
elements0 << address2
|
326
360
|
address3 = FAILURE
|
@@ -856,6 +890,353 @@ module ExtendedJSON
|
|
856
890
|
return address0
|
857
891
|
end
|
858
892
|
|
893
|
+
def _read_identifier
|
894
|
+
address0, index0 = FAILURE, @offset
|
895
|
+
cached = @cache[:identifier][index0]
|
896
|
+
if cached
|
897
|
+
@offset = cached[1]
|
898
|
+
return cached[0]
|
899
|
+
end
|
900
|
+
index1, elements0 = @offset, []
|
901
|
+
address1 = FAILURE
|
902
|
+
address1 = _read_identifier_start
|
903
|
+
unless address1 == FAILURE
|
904
|
+
elements0 << address1
|
905
|
+
address2 = FAILURE
|
906
|
+
remaining0, index2, elements1, address3 = 1, @offset, [], true
|
907
|
+
until address3 == FAILURE
|
908
|
+
address3 = _read_identifier_part
|
909
|
+
unless address3 == FAILURE
|
910
|
+
elements1 << address3
|
911
|
+
remaining0 -= 1
|
912
|
+
end
|
913
|
+
end
|
914
|
+
if remaining0 <= 0
|
915
|
+
address2 = TreeNode.new(@input[index2...@offset], index2, elements1)
|
916
|
+
@offset = @offset
|
917
|
+
else
|
918
|
+
address2 = FAILURE
|
919
|
+
end
|
920
|
+
unless address2 == FAILURE
|
921
|
+
elements0 << address2
|
922
|
+
else
|
923
|
+
elements0 = nil
|
924
|
+
@offset = index1
|
925
|
+
end
|
926
|
+
else
|
927
|
+
elements0 = nil
|
928
|
+
@offset = index1
|
929
|
+
end
|
930
|
+
if elements0.nil?
|
931
|
+
address0 = FAILURE
|
932
|
+
else
|
933
|
+
address0 = @actions.make_identifier(@input, index1, @offset, elements0)
|
934
|
+
@offset = @offset
|
935
|
+
end
|
936
|
+
@cache[:identifier][index0] = [address0, @offset]
|
937
|
+
return address0
|
938
|
+
end
|
939
|
+
|
940
|
+
def _read_identifier_start
|
941
|
+
address0, index0 = FAILURE, @offset
|
942
|
+
cached = @cache[:identifier_start][index0]
|
943
|
+
if cached
|
944
|
+
@offset = cached[1]
|
945
|
+
return cached[0]
|
946
|
+
end
|
947
|
+
index1 = @offset
|
948
|
+
address0 = _read_unicode_letter
|
949
|
+
if address0 == FAILURE
|
950
|
+
@offset = index1
|
951
|
+
chunk0 = nil
|
952
|
+
if @offset < @input_size
|
953
|
+
chunk0 = @input[@offset...@offset + 1]
|
954
|
+
end
|
955
|
+
if chunk0 == "$"
|
956
|
+
address0 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
957
|
+
@offset = @offset + 1
|
958
|
+
else
|
959
|
+
address0 = FAILURE
|
960
|
+
if @offset > @failure
|
961
|
+
@failure = @offset
|
962
|
+
@expected = []
|
963
|
+
end
|
964
|
+
if @offset == @failure
|
965
|
+
@expected << "\"$\""
|
966
|
+
end
|
967
|
+
end
|
968
|
+
if address0 == FAILURE
|
969
|
+
@offset = index1
|
970
|
+
chunk1 = nil
|
971
|
+
if @offset < @input_size
|
972
|
+
chunk1 = @input[@offset...@offset + 1]
|
973
|
+
end
|
974
|
+
if chunk1 == "_"
|
975
|
+
address0 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
976
|
+
@offset = @offset + 1
|
977
|
+
else
|
978
|
+
address0 = FAILURE
|
979
|
+
if @offset > @failure
|
980
|
+
@failure = @offset
|
981
|
+
@expected = []
|
982
|
+
end
|
983
|
+
if @offset == @failure
|
984
|
+
@expected << "\"_\""
|
985
|
+
end
|
986
|
+
end
|
987
|
+
if address0 == FAILURE
|
988
|
+
@offset = index1
|
989
|
+
index2, elements0 = @offset, []
|
990
|
+
address1 = FAILURE
|
991
|
+
chunk2 = nil
|
992
|
+
if @offset < @input_size
|
993
|
+
chunk2 = @input[@offset...@offset + 1]
|
994
|
+
end
|
995
|
+
if chunk2 == "\\"
|
996
|
+
address1 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
997
|
+
@offset = @offset + 1
|
998
|
+
else
|
999
|
+
address1 = FAILURE
|
1000
|
+
if @offset > @failure
|
1001
|
+
@failure = @offset
|
1002
|
+
@expected = []
|
1003
|
+
end
|
1004
|
+
if @offset == @failure
|
1005
|
+
@expected << "\"\\\\\""
|
1006
|
+
end
|
1007
|
+
end
|
1008
|
+
unless address1 == FAILURE
|
1009
|
+
elements0 << address1
|
1010
|
+
address2 = FAILURE
|
1011
|
+
address2 = _read_unicode_escape
|
1012
|
+
unless address2 == FAILURE
|
1013
|
+
elements0 << address2
|
1014
|
+
else
|
1015
|
+
elements0 = nil
|
1016
|
+
@offset = index2
|
1017
|
+
end
|
1018
|
+
else
|
1019
|
+
elements0 = nil
|
1020
|
+
@offset = index2
|
1021
|
+
end
|
1022
|
+
if elements0.nil?
|
1023
|
+
address0 = FAILURE
|
1024
|
+
else
|
1025
|
+
address0 = TreeNode7.new(@input[index2...@offset], index2, elements0)
|
1026
|
+
@offset = @offset
|
1027
|
+
end
|
1028
|
+
if address0 == FAILURE
|
1029
|
+
@offset = index1
|
1030
|
+
end
|
1031
|
+
end
|
1032
|
+
end
|
1033
|
+
end
|
1034
|
+
@cache[:identifier_start][index0] = [address0, @offset]
|
1035
|
+
return address0
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
def _read_identifier_part
|
1039
|
+
address0, index0 = FAILURE, @offset
|
1040
|
+
cached = @cache[:identifier_part][index0]
|
1041
|
+
if cached
|
1042
|
+
@offset = cached[1]
|
1043
|
+
return cached[0]
|
1044
|
+
end
|
1045
|
+
index1 = @offset
|
1046
|
+
address0 = _read_unicode_letter
|
1047
|
+
if address0 == FAILURE
|
1048
|
+
@offset = index1
|
1049
|
+
address0 = _read_unicode_digit
|
1050
|
+
if address0 == FAILURE
|
1051
|
+
@offset = index1
|
1052
|
+
address0 = _read_unicode_conn_punct
|
1053
|
+
if address0 == FAILURE
|
1054
|
+
@offset = index1
|
1055
|
+
end
|
1056
|
+
end
|
1057
|
+
end
|
1058
|
+
@cache[:identifier_part][index0] = [address0, @offset]
|
1059
|
+
return address0
|
1060
|
+
end
|
1061
|
+
|
1062
|
+
def _read_unicode_combining
|
1063
|
+
address0, index0 = FAILURE, @offset
|
1064
|
+
cached = @cache[:unicode_combining][index0]
|
1065
|
+
if cached
|
1066
|
+
@offset = cached[1]
|
1067
|
+
return cached[0]
|
1068
|
+
end
|
1069
|
+
index1 = @offset
|
1070
|
+
address0 = _read_unicode_non_spacing
|
1071
|
+
if address0 == FAILURE
|
1072
|
+
@offset = index1
|
1073
|
+
address0 = _read_unicode_comb_spacing
|
1074
|
+
if address0 == FAILURE
|
1075
|
+
@offset = index1
|
1076
|
+
end
|
1077
|
+
end
|
1078
|
+
@cache[:unicode_combining][index0] = [address0, @offset]
|
1079
|
+
return address0
|
1080
|
+
end
|
1081
|
+
|
1082
|
+
def _read_unicode_escape
|
1083
|
+
address0, index0 = FAILURE, @offset
|
1084
|
+
cached = @cache[:unicode_escape][index0]
|
1085
|
+
if cached
|
1086
|
+
@offset = cached[1]
|
1087
|
+
return cached[0]
|
1088
|
+
end
|
1089
|
+
index1, elements0 = @offset, []
|
1090
|
+
address1 = FAILURE
|
1091
|
+
chunk0 = nil
|
1092
|
+
if @offset < @input_size
|
1093
|
+
chunk0 = @input[@offset...@offset + 1]
|
1094
|
+
end
|
1095
|
+
if chunk0 == "u"
|
1096
|
+
address1 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
1097
|
+
@offset = @offset + 1
|
1098
|
+
else
|
1099
|
+
address1 = FAILURE
|
1100
|
+
if @offset > @failure
|
1101
|
+
@failure = @offset
|
1102
|
+
@expected = []
|
1103
|
+
end
|
1104
|
+
if @offset == @failure
|
1105
|
+
@expected << "\"u\""
|
1106
|
+
end
|
1107
|
+
end
|
1108
|
+
unless address1 == FAILURE
|
1109
|
+
elements0 << address1
|
1110
|
+
address2 = FAILURE
|
1111
|
+
address2 = _read_hex_digit
|
1112
|
+
unless address2 == FAILURE
|
1113
|
+
elements0 << address2
|
1114
|
+
address3 = FAILURE
|
1115
|
+
address3 = _read_hex_digit
|
1116
|
+
unless address3 == FAILURE
|
1117
|
+
elements0 << address3
|
1118
|
+
address4 = FAILURE
|
1119
|
+
address4 = _read_hex_digit
|
1120
|
+
unless address4 == FAILURE
|
1121
|
+
elements0 << address4
|
1122
|
+
address5 = FAILURE
|
1123
|
+
address5 = _read_hex_digit
|
1124
|
+
unless address5 == FAILURE
|
1125
|
+
elements0 << address5
|
1126
|
+
else
|
1127
|
+
elements0 = nil
|
1128
|
+
@offset = index1
|
1129
|
+
end
|
1130
|
+
else
|
1131
|
+
elements0 = nil
|
1132
|
+
@offset = index1
|
1133
|
+
end
|
1134
|
+
else
|
1135
|
+
elements0 = nil
|
1136
|
+
@offset = index1
|
1137
|
+
end
|
1138
|
+
else
|
1139
|
+
elements0 = nil
|
1140
|
+
@offset = index1
|
1141
|
+
end
|
1142
|
+
else
|
1143
|
+
elements0 = nil
|
1144
|
+
@offset = index1
|
1145
|
+
end
|
1146
|
+
if elements0.nil?
|
1147
|
+
address0 = FAILURE
|
1148
|
+
else
|
1149
|
+
address0 = TreeNode8.new(@input[index1...@offset], index1, elements0)
|
1150
|
+
@offset = @offset
|
1151
|
+
end
|
1152
|
+
@cache[:unicode_escape][index0] = [address0, @offset]
|
1153
|
+
return address0
|
1154
|
+
end
|
1155
|
+
|
1156
|
+
def _read_unicode_letter
|
1157
|
+
address0, index0 = FAILURE, @offset
|
1158
|
+
cached = @cache[:unicode_letter][index0]
|
1159
|
+
if cached
|
1160
|
+
@offset = cached[1]
|
1161
|
+
return cached[0]
|
1162
|
+
end
|
1163
|
+
chunk0 = nil
|
1164
|
+
if @offset < @input_size
|
1165
|
+
chunk0 = @input[@offset...@offset + 1]
|
1166
|
+
end
|
1167
|
+
if chunk0 =~ /\A[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]/
|
1168
|
+
address0 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
1169
|
+
@offset = @offset + 1
|
1170
|
+
else
|
1171
|
+
address0 = FAILURE
|
1172
|
+
if @offset > @failure
|
1173
|
+
@failure = @offset
|
1174
|
+
@expected = []
|
1175
|
+
end
|
1176
|
+
if @offset == @failure
|
1177
|
+
@expected << "[a-zA-Z\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]"
|
1178
|
+
end
|
1179
|
+
end
|
1180
|
+
@cache[:unicode_letter][index0] = [address0, @offset]
|
1181
|
+
return address0
|
1182
|
+
end
|
1183
|
+
|
1184
|
+
def _read_unicode_digit
|
1185
|
+
address0, index0 = FAILURE, @offset
|
1186
|
+
cached = @cache[:unicode_digit][index0]
|
1187
|
+
if cached
|
1188
|
+
@offset = cached[1]
|
1189
|
+
return cached[0]
|
1190
|
+
end
|
1191
|
+
chunk0 = nil
|
1192
|
+
if @offset < @input_size
|
1193
|
+
chunk0 = @input[@offset...@offset + 1]
|
1194
|
+
end
|
1195
|
+
if chunk0 =~ /\A[0-9]/
|
1196
|
+
address0 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
1197
|
+
@offset = @offset + 1
|
1198
|
+
else
|
1199
|
+
address0 = FAILURE
|
1200
|
+
if @offset > @failure
|
1201
|
+
@failure = @offset
|
1202
|
+
@expected = []
|
1203
|
+
end
|
1204
|
+
if @offset == @failure
|
1205
|
+
@expected << "[0-9]"
|
1206
|
+
end
|
1207
|
+
end
|
1208
|
+
@cache[:unicode_digit][index0] = [address0, @offset]
|
1209
|
+
return address0
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
def _read_unicode_conn_punct
|
1213
|
+
address0, index0 = FAILURE, @offset
|
1214
|
+
cached = @cache[:unicode_conn_punct][index0]
|
1215
|
+
if cached
|
1216
|
+
@offset = cached[1]
|
1217
|
+
return cached[0]
|
1218
|
+
end
|
1219
|
+
chunk0 = nil
|
1220
|
+
if @offset < @input_size
|
1221
|
+
chunk0 = @input[@offset...@offset + 1]
|
1222
|
+
end
|
1223
|
+
if chunk0 =~ /\A[_\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F]/
|
1224
|
+
address0 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
1225
|
+
@offset = @offset + 1
|
1226
|
+
else
|
1227
|
+
address0 = FAILURE
|
1228
|
+
if @offset > @failure
|
1229
|
+
@failure = @offset
|
1230
|
+
@expected = []
|
1231
|
+
end
|
1232
|
+
if @offset == @failure
|
1233
|
+
@expected << "[_\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]"
|
1234
|
+
end
|
1235
|
+
end
|
1236
|
+
@cache[:unicode_conn_punct][index0] = [address0, @offset]
|
1237
|
+
return address0
|
1238
|
+
end
|
1239
|
+
|
859
1240
|
def _read_double_quote_string
|
860
1241
|
address0, index0 = FAILURE, @offset
|
861
1242
|
cached = @cache[:double_quote_string][index0]
|
@@ -893,7 +1274,11 @@ module ExtendedJSON
|
|
893
1274
|
unless address4 == FAILURE
|
894
1275
|
elements2 << address4
|
895
1276
|
address5 = FAILURE
|
1277
|
+
chunk1 = nil
|
896
1278
|
if @offset < @input_size
|
1279
|
+
chunk1 = @input[@offset...@offset + 1]
|
1280
|
+
end
|
1281
|
+
if chunk1 =~ /\A[^\b\t\n\v\f\r]/
|
897
1282
|
address5 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
898
1283
|
@offset = @offset + 1
|
899
1284
|
else
|
@@ -903,7 +1288,7 @@ module ExtendedJSON
|
|
903
1288
|
@expected = []
|
904
1289
|
end
|
905
1290
|
if @offset == @failure
|
906
|
-
@expected << "
|
1291
|
+
@expected << "[^\\b\\t\\n\\v\\f\\r]"
|
907
1292
|
end
|
908
1293
|
end
|
909
1294
|
unless address5 == FAILURE
|
@@ -924,11 +1309,11 @@ module ExtendedJSON
|
|
924
1309
|
end
|
925
1310
|
if address3 == FAILURE
|
926
1311
|
@offset = index3
|
927
|
-
|
1312
|
+
chunk2 = nil
|
928
1313
|
if @offset < @input_size
|
929
|
-
|
1314
|
+
chunk2 = @input[@offset...@offset + 1]
|
930
1315
|
end
|
931
|
-
if
|
1316
|
+
if chunk2 =~ /\A[^"\b\t\n\v\f\r]/
|
932
1317
|
address3 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
933
1318
|
@offset = @offset + 1
|
934
1319
|
else
|
@@ -938,7 +1323,7 @@ module ExtendedJSON
|
|
938
1323
|
@expected = []
|
939
1324
|
end
|
940
1325
|
if @offset == @failure
|
941
|
-
@expected << "[^\"]"
|
1326
|
+
@expected << "[^\"\\b\\t\\n\\v\\f\\r]"
|
942
1327
|
end
|
943
1328
|
end
|
944
1329
|
if address3 == FAILURE
|
@@ -1020,7 +1405,11 @@ module ExtendedJSON
|
|
1020
1405
|
unless address4 == FAILURE
|
1021
1406
|
elements2 << address4
|
1022
1407
|
address5 = FAILURE
|
1408
|
+
chunk1 = nil
|
1023
1409
|
if @offset < @input_size
|
1410
|
+
chunk1 = @input[@offset...@offset + 1]
|
1411
|
+
end
|
1412
|
+
if chunk1 =~ /\A[^\b\t\n\v\f\r]/
|
1024
1413
|
address5 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
1025
1414
|
@offset = @offset + 1
|
1026
1415
|
else
|
@@ -1030,7 +1419,7 @@ module ExtendedJSON
|
|
1030
1419
|
@expected = []
|
1031
1420
|
end
|
1032
1421
|
if @offset == @failure
|
1033
|
-
@expected << "
|
1422
|
+
@expected << "[^\\b\\t\\n\\v\\f\\r]"
|
1034
1423
|
end
|
1035
1424
|
end
|
1036
1425
|
unless address5 == FAILURE
|
@@ -1051,11 +1440,11 @@ module ExtendedJSON
|
|
1051
1440
|
end
|
1052
1441
|
if address3 == FAILURE
|
1053
1442
|
@offset = index3
|
1054
|
-
|
1443
|
+
chunk2 = nil
|
1055
1444
|
if @offset < @input_size
|
1056
|
-
|
1445
|
+
chunk2 = @input[@offset...@offset + 1]
|
1057
1446
|
end
|
1058
|
-
if
|
1447
|
+
if chunk2 =~ /\A[^'\b\t\n\v\f\r]/
|
1059
1448
|
address3 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
1060
1449
|
@offset = @offset + 1
|
1061
1450
|
else
|
@@ -1065,7 +1454,7 @@ module ExtendedJSON
|
|
1065
1454
|
@expected = []
|
1066
1455
|
end
|
1067
1456
|
if @offset == @failure
|
1068
|
-
@expected << "[^']"
|
1457
|
+
@expected << "[^'\\b\\t\\n\\v\\f\\r]"
|
1069
1458
|
end
|
1070
1459
|
end
|
1071
1460
|
if address3 == FAILURE
|
@@ -1139,23 +1528,7 @@ module ExtendedJSON
|
|
1139
1528
|
end
|
1140
1529
|
remaining0, index1, elements0, address1 = 1, @offset, [], true
|
1141
1530
|
until address1 == FAILURE
|
1142
|
-
|
1143
|
-
if @offset < @input_size
|
1144
|
-
chunk0 = @input[@offset...@offset + 1]
|
1145
|
-
end
|
1146
|
-
if chunk0 =~ /\A[a-fA-F0-9]/
|
1147
|
-
address1 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
1148
|
-
@offset = @offset + 1
|
1149
|
-
else
|
1150
|
-
address1 = FAILURE
|
1151
|
-
if @offset > @failure
|
1152
|
-
@failure = @offset
|
1153
|
-
@expected = []
|
1154
|
-
end
|
1155
|
-
if @offset == @failure
|
1156
|
-
@expected << "[a-fA-F0-9]"
|
1157
|
-
end
|
1158
|
-
end
|
1531
|
+
address1 = _read_hex_digit
|
1159
1532
|
unless address1 == FAILURE
|
1160
1533
|
elements0 << address1
|
1161
1534
|
remaining0 -= 1
|
@@ -3513,6 +3886,34 @@ module ExtendedJSON
|
|
3513
3886
|
return address0
|
3514
3887
|
end
|
3515
3888
|
|
3889
|
+
def _read_hex_digit
|
3890
|
+
address0, index0 = FAILURE, @offset
|
3891
|
+
cached = @cache[:hex_digit][index0]
|
3892
|
+
if cached
|
3893
|
+
@offset = cached[1]
|
3894
|
+
return cached[0]
|
3895
|
+
end
|
3896
|
+
chunk0 = nil
|
3897
|
+
if @offset < @input_size
|
3898
|
+
chunk0 = @input[@offset...@offset + 1]
|
3899
|
+
end
|
3900
|
+
if chunk0 =~ /\A[a-fA-F0-9]/
|
3901
|
+
address0 = TreeNode.new(@input[@offset...@offset + 1], @offset)
|
3902
|
+
@offset = @offset + 1
|
3903
|
+
else
|
3904
|
+
address0 = FAILURE
|
3905
|
+
if @offset > @failure
|
3906
|
+
@failure = @offset
|
3907
|
+
@expected = []
|
3908
|
+
end
|
3909
|
+
if @offset == @failure
|
3910
|
+
@expected << "[a-fA-F0-9]"
|
3911
|
+
end
|
3912
|
+
end
|
3913
|
+
@cache[:hex_digit][index0] = [address0, @offset]
|
3914
|
+
return address0
|
3915
|
+
end
|
3916
|
+
|
3516
3917
|
def _read_comment
|
3517
3918
|
address0, index0 = FAILURE, @offset
|
3518
3919
|
cached = @cache[:comment][index0]
|
@@ -3662,7 +4063,7 @@ module ExtendedJSON
|
|
3662
4063
|
if elements0.nil?
|
3663
4064
|
address0 = FAILURE
|
3664
4065
|
else
|
3665
|
-
address0 =
|
4066
|
+
address0 = TreeNode27.new(@input[index1...@offset], index1, elements0)
|
3666
4067
|
@offset = @offset
|
3667
4068
|
end
|
3668
4069
|
@cache[:delimiter][index0] = [address0, @offset]
|