def unique_expansion(symbol)
      pending = true
      uniques[symbol] = [] if uniques[symbol].nil?

      while pending
        if uniques[symbol].size == expand(symbol).size
          uniques[symbol] = []
          pending = false
        end

        result = expand(symbol).evaluate(@options)

        unless uniques[symbol].include?(result)
          uniques[symbol] << result
          pending = false
        end
      end

      result
    end
def unique_expansion(symbol)
      pending = true
      uniques[symbol] = [] if uniques[symbol].nil?

      while pending
        if uniques[symbol].size == expand(symbol).size
          uniques[symbol] = []
          pending = false
        end

        result = expand(symbol).evaluate(@options)

        unless uniques[symbol].include?(result)
          uniques[symbol] << result
          pending = false
        end
      end

      result
    end
Expands a unique rule symbol by evaluating it and checking that it hasn't
 previously been selected.

 @param [Symbol] symbol