Sha256: 7c3de09c0e9ad6ca1d5ed0a53bf8bf9a7f035fe8e0f301a62d15c4cf51f70fbd
Contents?: true
Size: 730 Bytes
Versions: 22
Compression:
Stored size: 730 Bytes
Contents
module Lrama class State class Reduce # https://www.gnu.org/software/bison/manual/html_node/Default-Reductions.html attr_reader :item, :look_ahead, :not_selected_symbols attr_accessor :default_reduction def initialize(item) @item = item @look_ahead = nil @not_selected_symbols = [] end def rule @item.rule end def look_ahead=(look_ahead) @look_ahead = look_ahead.freeze end def add_not_selected_symbol(sym) @not_selected_symbols << sym end def selected_look_ahead if @look_ahead @look_ahead - @not_selected_symbols else [] end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems