Sha256: 2d40b09db57fa8e251afa210dc8464097ccb65de41b63d8bbf1ddcf3101e2dd9
Contents?: true
Size: 944 Bytes
Versions: 46
Compression:
Stored size: 944 Bytes
Contents
require_relative 'edge' module Rley # This module is used as a namespace module GFG # This module is used as a namespace # Specialization of an edge in a grammar flow graph # that has a end vertex (X.) as its head # and an item vertex as its tail # Responsibilities: # - To know the successor vertex (tail) class ReturnEdge < Edge attr_reader(:key) # Pre-condition: thePredecessor is an EndVertex # Pre-condition: theSuccessor is an ItemVertex def initialize(thePredecessor, theSuccessor) super(thePredecessor, theSuccessor) do_set_key(thePredecessor, theSuccessor) end private def do_set_key(_thePredecessor, theSuccessor) tail_d_item = theSuccessor.dotted_item prefix = "RET_#{tail_d_item.production.object_id}_" @key = prefix + tail_d_item.prev_position.to_s end end # class end # module end # module # End of file
Version data entries
46 entries across 46 versions & 1 rubygems