Sha256: 7e8d889178c6e8aaf43a5fc019c0419c2b859ad00ffa1cbf1e7d401ad0856355

Contents?: true

Size: 872 Bytes

Versions: 23

Compression:

Stored size: 872 Bytes

Contents

require_relative 'vertex'

module Rley # This module is used as a namespace
  module GFG # This module is used as a namespace
    # Represents a specialized vertex in a grammar flow graph 
    # that is associated to a given non-terminal symbol and
    # that may have in-degree or out-degree > 1
    # Responsibilities (in addition to inherited ones):
    # - Know its related non-terminal symbol
    class NonTerminalVertex < Vertex
      attr_reader :non_terminal
      
      def initialize(aNonTerminal)
        super()
        @non_terminal = aNonTerminal
      end
      
      protected

      # Validation method for adding an outgoing edge to the vertex.
      # A start vertex may accept an indegree and outdegree greater than one
      def check_add_edge(anEdge)
        return anEdge
      end      
    end # class
  end # module
end # module

# End of file

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rley-0.5.05 lib/rley/gfg/non_terminal_vertex.rb
rley-0.5.04 lib/rley/gfg/non_terminal_vertex.rb
rley-0.5.03 lib/rley/gfg/non_terminal_vertex.rb
rley-0.5.02 lib/rley/gfg/non_terminal_vertex.rb
rley-0.5.01 lib/rley/gfg/non_terminal_vertex.rb
rley-0.5.00 lib/rley/gfg/non_terminal_vertex.rb
rley-0.4.08 lib/rley/gfg/non_terminal_vertex.rb
rley-0.4.07 lib/rley/gfg/non_terminal_vertex.rb
rley-0.4.06 lib/rley/gfg/non_terminal_vertex.rb
rley-0.4.05 lib/rley/gfg/non_terminal_vertex.rb
rley-0.4.04 lib/rley/gfg/non_terminal_vertex.rb
rley-0.4.03 lib/rley/gfg/non_terminal_vertex.rb
rley-0.4.02 lib/rley/gfg/non_terminal_vertex.rb
rley-0.4.01 lib/rley/gfg/non_terminal_vertex.rb
rley-0.4.00 lib/rley/gfg/non_terminal_vertex.rb
rley-0.3.12 lib/rley/gfg/non_terminal_vertex.rb
rley-0.3.11 lib/rley/gfg/non_terminal_vertex.rb
rley-0.3.10 lib/rley/gfg/non_terminal_vertex.rb
rley-0.3.09 lib/rley/gfg/non_terminal_vertex.rb
rley-0.3.08 lib/rley/gfg/non_terminal_vertex.rb