class Racc::Item

LALR 项。规则及其前瞻标记的集合。

属性

la[R]
rule[R]

公共类方法

new(rule, la) 点击切换源代码
# File racc-1.8.1/lib/racc/state.rb, line 792
def initialize(rule, la)
  @rule = rule
  @la  = la
end

公共实例方法

each_la(tbl) { |tbl| ... } 点击切换源代码
# File racc-1.8.1/lib/racc/state.rb, line 800
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