class Rley::GFG::ShortcutEdge
Abstract class. Represents an edge in a grammar flow graph Responsibilities:
-
To know the successor vertex
Attributes
The terminal symbol expected from the input stream
Public Class Methods
Source
# File lib/rley/gfg/shortcut_edge.rb, line 14 def initialize(thePredecessor, theSuccessor) super(nil, theSuccessor) @nonterminal = thePredecessor.next_symbol thePredecessor.shortcut = self end
Calls superclass method
Rley::GFG::Edge::new
Public Instance Methods
Source
# File lib/rley/gfg/shortcut_edge.rb, line 20 def to_s " -#{nonterminal}-> #{successor.label}" end