def parse_server_attributes(value)
      parts = value.to_s.split(/\s/)
      current_name = nil
      pairs = parts.each_with_object({}) { |part, attrs|
        if SERVER_ATTRIBUTE_NAMES.include?(part)
          current_name = part
          attrs[current_name] = []
        elsif current_name.nil?
          raise "Invalid server attribute: #{part}"
        else
          attrs[current_name] << part
        end
      }

      clean_parsed_server_attributes(pairs)
    end
def parse_server_attributes(value)
      parts = value.to_s.split(/\s/)
      current_name = nil
      pairs = parts.each_with_object({}) { |part, attrs|
        if SERVER_ATTRIBUTE_NAMES.include?(part)
          current_name = part
          attrs[current_name] = []
        elsif current_name.nil?
          raise "Invalid server attribute: #{part}"
        else
          attrs[current_name] << part
        end
      }

      clean_parsed_server_attributes(pairs)
    end
Parses server attributes from the server value. I couldn't manage to get treetop to do
 this.

 Types of server attributes to support:
 ipv4, boolean, string, integer, time (us, ms, s, m, h, d), url, source attributes

 BUG: If an attribute value matches an attribute name, the parser will assume that a new
 attribute value has started. I don't know how haproxy itself handles that situation.