class Racc::Grammar

def compute_locate

Sym#locate
def compute_locate
  @rules.each do |rule|
    t = nil
    rule.ptrs.each do |ptr|
      unless ptr.reduce?
        tok = ptr.dereference
        tok.locate.push ptr
        t = tok if tok.terminal?
      end
    end
    rule.precedence = t
  end
end