rley 0.8.14 → 0.8.15
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +20 -2
- data/CHANGELOG.md +3 -0
- data/examples/general/calc_iter1/spec/calculator_spec.rb +9 -9
- data/examples/general/calc_iter2/spec/calculator_spec.rb +39 -39
- data/examples/general/recursive_right.rb +2 -2
- data/lib/rley/constants.rb +1 -1
- data/lib/rley/gfg/grm_flow_graph.rb +0 -1
- data/lib/rley/parser/parse_entry_set.rb +0 -1
- data/lib/rley/parser/parse_walker_factory.rb +0 -1
- data/lib/rley/rgn/grammar_builder.rb +0 -2
- data/lib/rley/rgn/tokenizer.rb +1 -1
- data/lib/rley/syntax/base_grammar_builder.rb +0 -1
- data/lib/rley/syntax/grammar.rb +0 -1
- data/spec/rley/base/dotted_item_spec.rb +46 -46
- data/spec/rley/base/grm_items_builder_spec.rb +1 -1
- data/spec/rley/engine_spec.rb +50 -50
- data/spec/rley/formatter/asciitree_spec.rb +8 -8
- data/spec/rley/formatter/bracket_notation_spec.rb +10 -10
- data/spec/rley/formatter/debug_spec.rb +10 -10
- data/spec/rley/formatter/json_spec.rb +6 -7
- data/spec/rley/gfg/call_edge_spec.rb +6 -6
- data/spec/rley/gfg/edge_spec.rb +8 -7
- data/spec/rley/gfg/end_vertex_spec.rb +8 -7
- data/spec/rley/gfg/epsilon_edge_spec.rb +5 -4
- data/spec/rley/gfg/grm_flow_graph_spec.rb +33 -34
- data/spec/rley/gfg/item_vertex_spec.rb +34 -36
- data/spec/rley/gfg/non_terminal_vertex_spec.rb +12 -12
- data/spec/rley/gfg/return_edge_spec.rb +6 -6
- data/spec/rley/gfg/scan_edge_spec.rb +7 -6
- data/spec/rley/gfg/shortcut_edge_spec.rb +15 -15
- data/spec/rley/gfg/start_vertex_spec.rb +8 -8
- data/spec/rley/gfg/vertex_spec.rb +18 -18
- data/spec/rley/lexical/literal_spec.rb +5 -5
- data/spec/rley/lexical/token_range_spec.rb +55 -55
- data/spec/rley/lexical/token_spec.rb +17 -16
- data/spec/rley/parse_forest_visitor_spec.rb +30 -32
- data/spec/rley/parse_rep/ambiguous_parse_spec.rb +2 -2
- data/spec/rley/parse_rep/ast_builder_spec.rb +30 -30
- data/spec/rley/parse_rep/cst_builder_spec.rb +85 -85
- data/spec/rley/parse_rep/groucho_spec.rb +23 -23
- data/spec/rley/parse_rep/parse_forest_builder_spec.rb +42 -42
- data/spec/rley/parse_rep/parse_forest_factory_spec.rb +10 -12
- data/spec/rley/parse_rep/parse_tree_factory_spec.rb +10 -15
- data/spec/rley/parse_tree_visitor_spec.rb +43 -46
- data/spec/rley/parser/dangling_else_spec.rb +12 -12
- data/spec/rley/parser/error_reason_spec.rb +37 -37
- data/spec/rley/parser/gfg_chart_spec.rb +27 -29
- data/spec/rley/parser/gfg_earley_parser_spec.rb +55 -56
- data/spec/rley/parser/gfg_parsing_spec.rb +106 -103
- data/spec/rley/parser/parse_entry_set_spec.rb +63 -61
- data/spec/rley/parser/parse_entry_spec.rb +73 -71
- data/spec/rley/parser/parse_walker_factory_spec.rb +14 -15
- data/spec/rley/ptree/non_terminal_node_spec.rb +16 -16
- data/spec/rley/ptree/parse_tree_node_spec.rb +11 -11
- data/spec/rley/ptree/parse_tree_spec.rb +6 -8
- data/spec/rley/ptree/terminal_node_spec.rb +6 -6
- data/spec/rley/rgn/grammar_builder_spec.rb +69 -67
- data/spec/rley/rgn/parser_spec.rb +63 -63
- data/spec/rley/rgn/repetition_node_spec.rb +15 -15
- data/spec/rley/rgn/sequence_node_spec.rb +10 -10
- data/spec/rley/rgn/symbol_node_spec.rb +5 -6
- data/spec/rley/rgn/tokenizer_spec.rb +68 -67
- data/spec/rley/sppf/alternative_node_spec.rb +16 -16
- data/spec/rley/sppf/non_terminal_node_spec.rb +20 -20
- data/spec/rley/sppf/token_node_spec.rb +13 -13
- data/spec/rley/syntax/base_grammar_builder_spec.rb +76 -86
- data/spec/rley/syntax/grammar_spec.rb +40 -78
- data/spec/rley/syntax/grm_symbol_spec.rb +7 -7
- data/spec/rley/syntax/match_closest_spec.rb +8 -8
- data/spec/rley/syntax/non_terminal_spec.rb +25 -25
- data/spec/rley/syntax/production_spec.rb +33 -33
- data/spec/rley/syntax/symbol_seq_spec.rb +27 -27
- data/spec/rley/syntax/terminal_spec.rb +12 -11
- data/spec/support/base_tokenizer_spec.rb +9 -8
- metadata +2 -2
@@ -10,39 +10,40 @@ require_relative '../../../lib/rley/lexical/token'
|
|
10
10
|
module Rley # Open this namespace to avoid module qualifier prefixes
|
11
11
|
module Lexical # Open this namespace to avoid module qualifier prefixes
|
12
12
|
describe Token do
|
13
|
+
# Default instantiation rule
|
14
|
+
subject(:a_token) { described_class.new(lexeme, a_terminal, a_pos) }
|
15
|
+
|
13
16
|
let(:lexeme) { '"some text"' }
|
14
17
|
let(:a_terminal) { Syntax::Terminal.new('if') }
|
15
18
|
let(:a_pos) { Position.new(3, 4) }
|
16
|
-
# Default instantiation rule
|
17
|
-
subject { Token.new(lexeme, a_terminal, a_pos) }
|
18
19
|
|
19
20
|
context 'Initialization:' do
|
20
|
-
it '
|
21
|
-
expect {
|
21
|
+
it 'is created with a lexeme and a terminal' do
|
22
|
+
expect { described_class.new(lexeme, a_terminal) }.not_to raise_error
|
22
23
|
end
|
23
24
|
|
24
|
-
it '
|
25
|
-
expect {
|
25
|
+
it 'is created with a lexeme, a terminal and position' do
|
26
|
+
expect { described_class.new(lexeme, a_terminal, a_pos) }.not_to raise_error
|
26
27
|
end
|
27
28
|
|
28
|
-
it '
|
29
|
-
expect(
|
29
|
+
it 'knows its lexeme' do
|
30
|
+
expect(a_token.lexeme).to eq(lexeme)
|
30
31
|
end
|
31
32
|
|
32
|
-
it '
|
33
|
-
expect(
|
33
|
+
it 'knows its terminal' do
|
34
|
+
expect(a_token.terminal).to eq(a_terminal)
|
34
35
|
end
|
35
36
|
|
36
|
-
it '
|
37
|
+
it 'knows its position' do
|
37
38
|
new_pos = Position.new(5, 7)
|
38
|
-
|
39
|
-
expect(
|
39
|
+
a_token.position = new_pos
|
40
|
+
expect(a_token.position).to eq(new_pos)
|
40
41
|
end
|
41
42
|
end # context
|
42
43
|
|
43
|
-
context '
|
44
|
-
it '
|
45
|
-
expect(
|
44
|
+
context 'Provided services:' do
|
45
|
+
it 'accepts a new position' do
|
46
|
+
expect(a_token.position).to eq(a_pos)
|
46
47
|
end
|
47
48
|
end # context
|
48
49
|
end # describe
|
@@ -25,6 +25,9 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
25
25
|
return Rley::SPPF::NonTerminalNode.new(a_vertex.non_terminal, aRange)
|
26
26
|
end
|
27
27
|
|
28
|
+
# Default instantiation rule
|
29
|
+
subject(:a_visitor) { described_class.new(forest_root) }
|
30
|
+
|
28
31
|
let(:grammar_sppf) do
|
29
32
|
builder = grammar_sppf_builder
|
30
33
|
builder.grammar
|
@@ -53,22 +56,17 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
53
56
|
factory.create
|
54
57
|
end
|
55
58
|
|
56
|
-
|
57
|
-
# Default instantiation rule
|
58
|
-
subject { ParseForestVisitor.new(forest_root) }
|
59
|
-
|
60
|
-
|
61
59
|
context 'Standard creation & initialization:' do
|
62
|
-
it '
|
63
|
-
expect {
|
60
|
+
it 'is initialized with a parse forest argument' do
|
61
|
+
expect { described_class.new(forest_root) }.not_to raise_error
|
64
62
|
end
|
65
63
|
|
66
|
-
it '
|
67
|
-
expect(
|
64
|
+
it 'knows the parse forest to visit' do
|
65
|
+
expect(a_visitor.pforest).to eq(forest_root)
|
68
66
|
end
|
69
67
|
|
70
|
-
it "
|
71
|
-
expect(
|
68
|
+
it "doesn't have subscribers at start" do
|
69
|
+
expect(a_visitor.subscribers).to be_empty
|
72
70
|
end
|
73
71
|
end # context
|
74
72
|
|
@@ -77,24 +75,24 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
77
75
|
let(:listener1) { double('fake-subscriber1') }
|
78
76
|
let(:listener2) { double('fake-subscriber2') }
|
79
77
|
|
80
|
-
it '
|
81
|
-
|
82
|
-
expect(
|
83
|
-
expect(
|
78
|
+
it 'allows subscriptions' do
|
79
|
+
a_visitor.subscribe(listener1)
|
80
|
+
expect(a_visitor.subscribers.size).to eq(1)
|
81
|
+
expect(a_visitor.subscribers).to eq([listener1])
|
84
82
|
|
85
|
-
|
86
|
-
expect(
|
87
|
-
expect(
|
83
|
+
a_visitor.subscribe(listener2)
|
84
|
+
expect(a_visitor.subscribers.size).to eq(2)
|
85
|
+
expect(a_visitor.subscribers).to eq([listener1, listener2])
|
88
86
|
end
|
89
87
|
|
90
|
-
it '
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
expect(
|
95
|
-
expect(
|
96
|
-
|
97
|
-
expect(
|
88
|
+
it 'allows un-subcriptions' do
|
89
|
+
a_visitor.subscribe(listener1)
|
90
|
+
a_visitor.subscribe(listener2)
|
91
|
+
a_visitor.unsubscribe(listener2)
|
92
|
+
expect(a_visitor.subscribers.size).to eq(1)
|
93
|
+
expect(a_visitor.subscribers).to eq([listener1])
|
94
|
+
a_visitor.unsubscribe(listener1)
|
95
|
+
expect(a_visitor.subscribers).to be_empty
|
98
96
|
end
|
99
97
|
end # context
|
100
98
|
|
@@ -140,13 +138,13 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
140
138
|
end
|
141
139
|
|
142
140
|
def check_legs(expectations)
|
143
|
-
(parent, path_signature) =
|
141
|
+
(parent, path_signature) = a_visitor.legs[-1]
|
144
142
|
expect(parent.to_string(0)).to eq(expectations[0])
|
145
143
|
expect(path_signature).to eq(expectations[1])
|
146
144
|
end
|
147
145
|
|
148
146
|
def check_node_accesses(node, paths)
|
149
|
-
actual_paths =
|
147
|
+
actual_paths = a_visitor.node_accesses.fetch(node)
|
150
148
|
expect(actual_paths).to eq(paths)
|
151
149
|
end
|
152
150
|
|
@@ -154,12 +152,12 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
154
152
|
|
155
153
|
# Default instantiation rule
|
156
154
|
subject do
|
157
|
-
instance =
|
155
|
+
instance = described_class.new(grm_sppf_pforest1)
|
158
156
|
instance.subscribe(checker)
|
159
157
|
instance
|
160
158
|
end
|
161
159
|
|
162
|
-
it '
|
160
|
+
it 'reacts to the start_visit_pforest message' do
|
163
161
|
# Notify subscribers when start the visit of the pforest
|
164
162
|
# expect(listener1).to receive(:before_pforest).with(forest_root)
|
165
163
|
checker.expectations = [
|
@@ -267,7 +265,7 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
267
265
|
check_event(event, item, [:before_alternative, prediction])
|
268
266
|
check_legs(['Alt(A => a .)[0, 1]', 7130]) # 2 * 5 * 23 * 31
|
269
267
|
check_node_accesses(item, [7130])
|
270
|
-
# p(
|
268
|
+
# p(a_visitor.legs)
|
271
269
|
end,
|
272
270
|
lambda do |event, parent, children|
|
273
271
|
prediction = 'Alt(A => a .)[0, 1]'
|
@@ -487,7 +485,7 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
487
485
|
check_event(event, item, [:after_pforest, grm_sppf_pforest1])
|
488
486
|
end
|
489
487
|
]
|
490
|
-
|
488
|
+
a_visitor.start
|
491
489
|
end
|
492
490
|
end # context
|
493
491
|
end # describe
|
@@ -46,7 +46,7 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
46
46
|
expect(child.to_string(0)).to eq(anExpectation)
|
47
47
|
end
|
48
48
|
|
49
|
-
before
|
49
|
+
before do
|
50
50
|
factory = Parser::ParseWalkerFactory.new
|
51
51
|
accept_entry = sentence_result.accepting_entry
|
52
52
|
accept_index = sentence_result.chart.last_index
|
@@ -73,7 +73,7 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
73
73
|
|
74
74
|
subject { ParseForestBuilder.new(expr_tokens) }
|
75
75
|
|
76
|
-
it '
|
76
|
+
it 'handles walker events' do
|
77
77
|
next_event(:visit, 'P. | 0') # Event 1
|
78
78
|
expected_curr_path('P[0, 5]')
|
79
79
|
|
@@ -99,7 +99,7 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
99
99
|
arr_int_tokenizer('[2 , 3, 5 ]')
|
100
100
|
end
|
101
101
|
|
102
|
-
subject {
|
102
|
+
subject(:a_builder) { described_class.new(sample_tokens) }
|
103
103
|
|
104
104
|
def init_walker(theParser, theTokens)
|
105
105
|
result = theParser.parse(theTokens)
|
@@ -112,7 +112,7 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
112
112
|
def skip_events(count)
|
113
113
|
count.times do
|
114
114
|
event = @walker.next
|
115
|
-
|
115
|
+
a_builder.receive_event(*event)
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
@@ -125,20 +125,20 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
125
125
|
end
|
126
126
|
|
127
127
|
context 'Initialization:' do
|
128
|
-
it '
|
129
|
-
expect {
|
128
|
+
it 'is created with a sequence of tokens' do
|
129
|
+
expect { described_class.new(sample_tokens) }.not_to raise_error
|
130
130
|
end
|
131
131
|
|
132
|
-
it '
|
133
|
-
expect(
|
132
|
+
it 'knows the input tokens' do
|
133
|
+
expect(a_builder.tokens).to eq(sample_tokens)
|
134
134
|
end
|
135
135
|
|
136
|
-
it "
|
137
|
-
expect(
|
136
|
+
it "doesn't know the result yet" do
|
137
|
+
expect(a_builder.result).to be_nil
|
138
138
|
end
|
139
139
|
|
140
|
-
it '
|
141
|
-
expect(
|
140
|
+
it 'has an empty stack' do
|
141
|
+
expect(a_builder.send(:stack)).to be_empty
|
142
142
|
end
|
143
143
|
end # context
|
144
144
|
|
@@ -148,11 +148,11 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
148
148
|
(ev_type, entry, index) = event
|
149
149
|
actual = "#{ev_type} #{entry} #{index}"
|
150
150
|
expect(actual).to eq(expectation)
|
151
|
-
|
151
|
+
a_builder.receive_event(*event)
|
152
152
|
end
|
153
153
|
|
154
154
|
|
155
|
-
before
|
155
|
+
before do
|
156
156
|
@parser = Parser::GFGEarleyParser.new(sample_grammar)
|
157
157
|
init_walker(@parser, sample_tokens)
|
158
158
|
end
|
@@ -189,8 +189,8 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
189
189
|
# Event: visit P => . arr | 0 0
|
190
190
|
# Event: visit .P | 0 0
|
191
191
|
|
192
|
-
it '
|
193
|
-
stack = get_stack(
|
192
|
+
it 'accepts a first visit event' do
|
193
|
+
stack = get_stack(a_builder)
|
194
194
|
|
195
195
|
next_event('visit P. | 0 7')
|
196
196
|
expect(stack.size).to eq(1)
|
@@ -199,8 +199,8 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
199
199
|
expect(stack.last.children).to be_nil
|
200
200
|
end
|
201
201
|
|
202
|
-
it '
|
203
|
-
stack = get_stack(
|
202
|
+
it 'builds a tree for an empty array' do
|
203
|
+
stack = get_stack(a_builder)
|
204
204
|
|
205
205
|
next_event('visit P. | 0 7')
|
206
206
|
next_event('visit P => arr . | 0 7')
|
@@ -216,7 +216,7 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
216
216
|
next_event('visit arr => [ sequence ] . | 0 7')
|
217
217
|
# stack: [P[0, 7], arr[0, 7]]
|
218
218
|
rbracket = stack.last.children[-1]
|
219
|
-
expect(rbracket).to
|
219
|
+
expect(rbracket).to be_a(PTree::TerminalNode)
|
220
220
|
expect(rbracket.to_s).to eq("][6, 7]: ']'")
|
221
221
|
|
222
222
|
next_event('visit arr => [ sequence . ] | 0 6')
|
@@ -238,12 +238,12 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
238
238
|
|
239
239
|
next_event('visit list => list , integer . | 1 6')
|
240
240
|
intval = stack.last.children[-1]
|
241
|
-
expect(intval).to
|
241
|
+
expect(intval).to be_a(IntegerNode)
|
242
242
|
expect(intval.value).to eq(5)
|
243
243
|
|
244
244
|
next_event('visit list => list , . integer | 1 5')
|
245
245
|
comma = stack.last.children[-2]
|
246
|
-
expect(comma).to
|
246
|
+
expect(comma).to be_a(PTree::TerminalNode)
|
247
247
|
expect(comma.to_s).to eq(",[4, 5]: ','")
|
248
248
|
|
249
249
|
next_event('visit list => list . , integer | 1 4')
|
@@ -256,12 +256,12 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
256
256
|
|
257
257
|
next_event('visit list => list , integer . | 1 4')
|
258
258
|
intval = stack.last.children[-1]
|
259
|
-
expect(intval).to
|
259
|
+
expect(intval).to be_a(IntegerNode)
|
260
260
|
expect(intval.value).to eq(3)
|
261
261
|
|
262
262
|
next_event('visit list => list , . integer | 1 3')
|
263
263
|
comma = stack.last.children[-2]
|
264
|
-
expect(comma).to
|
264
|
+
expect(comma).to be_a(PTree::TerminalNode)
|
265
265
|
expect(comma.to_s).to eq(",[2, 3]: ','")
|
266
266
|
|
267
267
|
next_event('visit list => list . , integer | 1 2')
|
@@ -275,14 +275,14 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
275
275
|
|
276
276
|
next_event('visit list => integer . | 1 2')
|
277
277
|
intval = stack.last.children[-1]
|
278
|
-
expect(intval).to
|
278
|
+
expect(intval).to be_a(IntegerNode)
|
279
279
|
expect(intval.value).to eq(2)
|
280
280
|
|
281
281
|
next_event('visit list => . integer | 1 1')
|
282
282
|
expect(stack.size).to eq(5)
|
283
283
|
# stack: [P[0, 7], arr[0, 7], sequence[1, 6], list[1, 6], list[1, 4]
|
284
284
|
list_node = stack.last.children[0]
|
285
|
-
expect(list_node).to
|
285
|
+
expect(list_node).to be_a(ArrayNode)
|
286
286
|
expect(list_node.children.size).to eq(1)
|
287
287
|
expect(list_node.children.last.value).to eq(2)
|
288
288
|
|
@@ -292,7 +292,7 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
292
292
|
expect(stack.size).to eq(4)
|
293
293
|
# stack: [P[0, 7], arr[0, 7], sequence[1, 6], list[1, 6]
|
294
294
|
list_node = stack.last.children[0]
|
295
|
-
expect(list_node).to
|
295
|
+
expect(list_node).to be_a(ArrayNode)
|
296
296
|
expect(list_node.children.size).to eq(2)
|
297
297
|
expect(list_node.children.last.value).to eq(3)
|
298
298
|
|
@@ -301,7 +301,7 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
301
301
|
next_event('revisit list => . list , integer | 1 1')
|
302
302
|
# stack: [P[0, 7], arr[0, 7], sequence[1, 6]
|
303
303
|
list_node = stack.last.children.last
|
304
|
-
expect(list_node).to
|
304
|
+
expect(list_node).to be_a(ArrayNode)
|
305
305
|
expect(list_node.children.size).to eq(3)
|
306
306
|
expect(list_node.children.last.value).to eq(5)
|
307
307
|
|
@@ -311,21 +311,21 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
311
311
|
expect(stack.size).to eq(2)
|
312
312
|
# stack: [P[0, 7], arr[0, 7]
|
313
313
|
list_node = stack.last.children[1]
|
314
|
-
expect(list_node).to
|
314
|
+
expect(list_node).to be_a(ArrayNode)
|
315
315
|
expect(list_node.children.size).to eq(3)
|
316
316
|
|
317
317
|
next_event('visit .sequence | 1 1')
|
318
318
|
|
319
319
|
next_event('visit arr => [ . sequence ] | 0 1')
|
320
320
|
lbracket = stack.last.children[0]
|
321
|
-
expect(lbracket).to
|
321
|
+
expect(lbracket).to be_a(PTree::TerminalNode)
|
322
322
|
expect(lbracket.to_s).to eq("[[0, 1]: '['")
|
323
323
|
|
324
324
|
next_event('visit arr => . [ sequence ] | 0 0')
|
325
325
|
expect(stack.size).to eq(1)
|
326
326
|
# stack: [P[0, 7]
|
327
327
|
array_node = stack.last.children[0]
|
328
|
-
expect(array_node).to
|
328
|
+
expect(array_node).to be_a(ArrayNode)
|
329
329
|
expect(array_node.children.size).to eq(3)
|
330
330
|
|
331
331
|
|
@@ -333,8 +333,8 @@ module Rley # Open this namespace to avoid module qualifier prefixes
|
|
333
333
|
|
334
334
|
next_event('visit P => . arr | 0 0')
|
335
335
|
expect(stack.size).to eq(0)
|
336
|
-
expect(
|
337
|
-
root =
|
336
|
+
expect(a_builder.result).not_to be_nil
|
337
|
+
root = a_builder.result.root
|
338
338
|
expect(root.interpret).to eq([2, 3, 5])
|
339
339
|
|
340
340
|
next_event('visit .P | 0 0')
|