# File lib/chef_zero/solr/solr_parser.rb, line 87
      def read_expression
        result = read_single_expression
        # Expression is over when we hit a close paren or eof
        # (peek_token has the side effect of skipping whitespace for us, so we
        # really know if we're at eof or not)
        until peek_token == ')' || eof?
          operator = peek_token
          if binary_operator?(operator)
            next_token
          else
            # If 2 terms are next to each other, the default operator is OR
            operator = 'OR'
          end
          next_expression = read_single_expression

          # Build the operator, taking precedence into account
          if result.is_a?(Query::BinaryOperator) &&
             binary_operator_precedence(operator) > binary_operator_precedence(result.operator)
            # a+b*c -> a+(b*c)
            new_right = Query::BinaryOperator.new(result.right, operator, next_expression)
            result = Query::BinaryOperator.new(result.left, result.operator, new_right)
          else
            # a*b+c -> (a*b)+c
            result = Query::BinaryOperator.new(result, operator, next_expression)
          end
        end
        result
      end