lib/rley/gfg/grm_flow_graph.rb in rley-0.7.00 vs lib/rley/gfg/grm_flow_graph.rb in rley-0.7.01
- old
+ new
@@ -151,10 +151,11 @@
when Rley::GFG::EndVertex
if stack.last.done?
popped = stack.pop
break if stack.empty?
+
# puts "Popped!"
return_key = popped.in_edge.key.sub(/^CALL/, 'RET')
curr_edge = visitee.edges.find { |e| e.key == return_key }
else
curr_edge = stack.last.next_edge
@@ -195,9 +196,10 @@
build_all_starts_ends(theDottedItems)
curr_prod = nil
theDottedItems.each_with_index do |d_item, index_item|
next unless curr_prod.nil? || curr_prod != d_item.production
+
# Another production found...
curr_prod = d_item.production
if curr_prod.empty?
add_single_item(d_item)
else