module Net::IMAP::ResponseParser::ParserUtils

def combine_adjacent(*tokens)

That way a loop isn't needed.
TODO: after checking the lookahead, use a regexp for remaining chars.
def combine_adjacent(*tokens)
  result = "".b
  while token = accept(*tokens)
    result << token.value
  end
  if result.empty?
    parse_error('unexpected token %s (expected %s)',
                lookahead.symbol, tokens.join(" or "))
  end
  result
end