Sha256: 839bfb0169abdada7693620758f5700b5e5c16645bb0dab18da20cb8b51544c3
Contents?: true
Size: 976 Bytes
Versions: 3
Compression:
Stored size: 976 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 item vertex as its head (predecessor). # and a start vertex (.X) as its tail (successor). # Responsibilities: # - To know the successor vertex (tail) class CallEdge < Edge attr_reader(:key) # Pre-condition: thePredecessor is an ItemVertex # Pre-condition: theSuccessor is an StartVertex def initialize(thePredecessor, theSuccessor) super(thePredecessor, theSuccessor) do_set_key(thePredecessor, theSuccessor) end private def do_set_key(thePredecessor, theSuccessor) tail_d_item = thePredecessor.dotted_item @key = "CALL_#{tail_d_item.production.object_id}_#{tail_d_item.position}" end end # class end # module end # module # End of file
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rley-0.3.04 | lib/rley/gfg/call_edge.rb |
rley-0.3.01 | lib/rley/gfg/call_edge.rb |
rley-0.3.00 | lib/rley/gfg/call_edge.rb |