class Racc::Item

LALR item. A set of rule and its lookahead tokens.

Attributes

la[R]
rule[R]

Public Class Methods

new(rule, la) click to toggle source
# File lib/racc/state.rb, line 785
def initialize(rule, la)
  @rule = rule
  @la  = la
end

Public Instance Methods

each_la(tbl) { |tbl| ... } click to toggle source
# File lib/racc/state.rb, line 793
def each_la(tbl)
  la = @la
  0.upto(la.size - 1) do |i|
    (0..7).each do |ii|
      if la[idx = i * 8 + ii] == 1
        yield tbl[idx]
      end
    end
  end
end