Class: Rley::GFG::StartVertex

Inherits:
NonTerminalVertex show all
Defined in:
lib/rley/gfg/start_vertex.rb

Overview

TODO: change definition. Represents a specialized vertex in a grammar flow graph that is associated to a given non-terminal symbol. Responsibilities (in addition to inherited ones):

  • Know its related non-terminal symbol

Instance Attribute Summary

Attributes inherited from NonTerminalVertex

#non_terminal

Attributes inherited from Vertex

#edges

Instance Method Summary collapse

Methods inherited from Vertex

#add_edge, #complete?, #inspect, #next_symbol, #prev_symbol, #selfie

Constructor Details

#initialize(aNonTerminal) ⇒ StartVertex

Returns a new instance of StartVertex.



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

def initialize(aNonTerminal)
  super(aNonTerminal)
end

Instance Method Details

#labelString

Returns:

  • (String)


18
19
20
# File 'lib/rley/gfg/start_vertex.rb', line 18

def label()
  return ".#{non_terminal}"
end