Class: Rley::GFG::NonTerminalVertex

Inherits:
Vertex
  • Object
show all
Defined in:
lib/rley/gfg/non_terminal_vertex.rb

Overview

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

Direct Known Subclasses

EndVertex, StartVertex

Instance Attribute Summary collapse

Attributes inherited from Vertex

#edges

Instance Method Summary collapse

Methods inherited from Vertex

#add_edge, #complete?, #next_symbol, #prev_symbol

Constructor Details

#initialize(aNonTerminal) ⇒ NonTerminalVertex

Returns a new instance of NonTerminalVertex.



13
14
15
16
# File 'lib/rley/gfg/non_terminal_vertex.rb', line 13

def initialize(aNonTerminal)
  super()
  @non_terminal = aNonTerminal
end

Instance Attribute Details

#non_terminalObject (readonly)

Returns the value of attribute non_terminal.



11
12
13
# File 'lib/rley/gfg/non_terminal_vertex.rb', line 11

def non_terminal
  @non_terminal
end