class Rley::GFG::NonTerminalVertex
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
Attributes
The non-terminal symbol associated to the vertex @return [Syntax::NonTerminal]
Public Class Methods
Source
# File lib/rley/gfg/non_terminal_vertex.rb, line 20 def initialize(aNonTerminal) super() @non_terminal = aNonTerminal end
Constructor to specialize in subclasses. @param aNonTerminal [Syntax::NonTerminal]
Calls superclass method
Protected Instance Methods
Source
# File lib/rley/gfg/non_terminal_vertex.rb, line 29 def check_add_edge(anEdge) anEdge end
Validation method for adding an outgoing edge to the vertex. A start vertex may accept an indegree and outdegree greater than one