def _parse_unquoted_string(data, start, stop_at_equals):
 value = u''
 pos = start
 while (pos < len(data)):
  char = data[pos]
  if (char == u'\\'):
   if ((pos + 1) < len(data)):
    value += data[(pos + 1)]
    pos += 2
   else:
    raise ParsingError(u'Unexpected end of data while escaping ({0})'.format(_format_position(data, pos)))
  elif char.isspace():
   break
  elif ((char == u'=') and stop_at_equals):
   break
  elif ((char == u"'") or (char == u'"')):
   raise ParsingError(u'Unexpected quotation mark in unquoted string ({0})'.format(_format_position(data, pos)))
  else:
   value += char
   pos += 1
 return (pos, value)

def _parse_unquoted_string ( data , start , stop_at_equals ) : value = u'' pos = start while ( pos < len ( data ) ) : char = data [ pos ] if ( char == u'\\' ) : if ( ( pos + 1 ) < len ( data ) ) : value += data [ ( pos + 1 ) ] pos += 2 else : raise ParsingError ( u'Unexpected end of data while escaping ({0})' . format ( _format_position ( data , pos ) ) ) elif char . isspace ( ) : break elif ( ( char == u'=' ) and stop_at_equals ) : break elif ( ( char == u"'" ) or ( char == u'"' ) ) : raise ParsingError ( u'Unexpected quotation mark in unquoted string ({0})' . format ( _format_position ( data , pos ) ) ) else : value += char pos += 1 return ( pos , value )
parse an unquoted string starting at position start in data .