def useless_symbols
      raise 'Grammar not yet closed' unless @closed
      @useless_symbols ||= begin
        @symbols.select do |sym|
          !sym.generated? &&
          sym != @start &&
          (!sym.reachable.include?(@start) || !productive_symbols.include?(sym)) &&
          none? { |rule| rule.explicit_precedence == sym }
        end.freeze
      end
    end
def useless_symbols
      raise 'Grammar not yet closed' unless @closed
      @useless_symbols ||= begin
        @symbols.select do |sym|
          !sym.generated? &&
          sym != @start &&
          (!sym.reachable.include?(@start) || !productive_symbols.include?(sym)) &&
          none? { |rule| rule.explicit_precedence == sym }
        end.freeze
      end
    end
A useless symbol can never be a part of any valid parse tree, and is not
 used for a =<sym> precedence declaration either