def _parse_entry(line, quoted, escaped):
 if (line == ''):
  raise IndexError('no remaining content to parse')
 (next_entry, remainder) = ('', line)
 if quoted:
  (start_quote, end_quote) = _get_quote_indices(remainder, escaped)
  if ((start_quote != 0) or (end_quote == (-1))):
   raise ValueError(("the next entry isn't a quoted value: " + line))
  (next_entry, remainder) = (remainder[1:end_quote], remainder[(end_quote + 1):])
 elif (' ' in remainder):
  (next_entry, remainder) = remainder.split(' ', 1)
 else:
  (next_entry, remainder) = (remainder, '')
 if escaped:
  next_entry = _unescape(next_entry)
 return (next_entry, remainder.lstrip())

def _parse_entry ( line , quoted , escaped ) : if ( line == '' ) : raise IndexError ( 'no remaining content to parse' ) ( next_entry , remainder ) = ( '' , line ) if quoted : ( start_quote , end_quote ) = _get_quote_indices ( remainder , escaped ) if ( ( start_quote != 0 ) or ( end_quote == ( - 1 ) ) ) : raise ValueError ( ( "the next entry isn't a quoted value: " + line ) ) ( next_entry , remainder ) = ( remainder [ 1 : end_quote ] , remainder [ ( end_quote + 1 ) : ] ) elif ( ' ' in remainder ) : ( next_entry , remainder ) = remainder . split ( ' ' , 1 ) else : ( next_entry , remainder ) = ( remainder , '' ) if escaped : next_entry = _unescape ( next_entry ) return ( next_entry , remainder . lstrip ( ) )
parses the next entry from the given space separated content .