class Racc::Grammar

def check_symbols_useless(s)

def check_symbols_useless(s)
  s.delete_if do |t|
    t.heads.each do |ptr|
      unless ptr.rule.useless?
        t.useless = false
        break
      end
    end
    not t.useless?
  end
end