Class: Rley::GFG::NonTerminalVertex
- Defined in:
- lib/rley/gfg/non_terminal_vertex.rb
Overview
Abstract class. 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
Instance Attribute Summary collapse
-
#non_terminal ⇒ Syntax::NonTerminal
readonly
The non-terminal symbol associated to the vertex.
Attributes inherited from Vertex
Instance Method Summary collapse
-
#initialize(aNonTerminal) ⇒ NonTerminalVertex
constructor
Constructor to specialize in subclasses.
Methods inherited from Vertex
#add_edge, #complete?, #inspect, #next_symbol, #prev_symbol, #selfie
Constructor Details
#initialize(aNonTerminal) ⇒ NonTerminalVertex
Constructor to specialize in subclasses.
20 21 22 23 |
# File 'lib/rley/gfg/non_terminal_vertex.rb', line 20 def initialize(aNonTerminal) super() @non_terminal = aNonTerminal end |
Instance Attribute Details
#non_terminal ⇒ Syntax::NonTerminal (readonly)
The non-terminal symbol associated to the vertex
16 17 18 |
# File 'lib/rley/gfg/non_terminal_vertex.rb', line 16 def non_terminal @non_terminal end |