Class: Rley::GFG::NonTerminalVertex
- 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
Instance Attribute Summary collapse
-
#non_terminal ⇒ Object
readonly
Returns the value of attribute non_terminal.
Attributes inherited from Vertex
Instance Method Summary collapse
-
#initialize(aNonTerminal) ⇒ NonTerminalVertex
constructor
A new instance of NonTerminalVertex.
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_terminal ⇒ Object (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 |