lib/rley/gfg/item_vertex.rb in rley-0.7.03 vs lib/rley/gfg/item_vertex.rb in rley-0.7.04

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require_relative '../syntax/non_terminal' require_relative 'vertex' module Rley # This module is used as a namespace @@ -28,23 +30,11 @@ # Set the "shortcut" edge. # @param aShortcut [ShortcutEdge] the "shortcut" edge. def shortcut=(aShortcut) unless aShortcut.kind_of?(ShortcutEdge) raise StandardError, 'Invalid shortcut argument' - end - -=begin - unless next_symbol && next_symbol.kind_of?(Syntax::NonTerminal) - raise StandardError, 'Invalid shortcut usage' - end - shortcut_d_item = aShortcut.successor.dotted_item - unless (dotted_item.production == shortcut_d_item.production) && - (dotted_item.position == shortcut_d_item.prev_position) - raise StandardError, 'Shortcut refers to wrong vertex' - end -=end @shortcut = aShortcut end # The label of this vertex. # It is the same as the label of the corresponding dotted item.