def DoxyfileParse(file_contents):
   data = {}
   import shlex
   lex = shlex.shlex(instream = file_contents, posix = True)
   lex.wordchars += "*+./-:"
   lex.whitespace = lex.whitespace.replace("\n", "")
   lex.escape = ""
   lineno = lex.lineno
   token = lex.get_token()
   key = token
   last_token = ""
   key_token = False
   next_key = False
   new_data = True
   def append_data(data, key, new_data, token):
      if new_data or len(data[key]) == 0:
         data[key].append(token)
      else:
         data[key][-1] += token
   while token:
      if token in ['\n']:
         if last_token not in ['\\']:
            key_token = True
      elif token in ['\\']:
         pass
      elif key_token:
         key = token
         key_token = False
      else:
         if token == "+=":
            if not data.has_key(key):
               data[key] = list()
         elif token == "=":
            if key == "TAGFILES" and data.has_key(key):
               append_data( data, key, False, "=" )
               new_data=False
            else:
               data[key] = list()
         else:
            append_data( data, key, new_data, token )
            new_data = True
      last_token = token
      token = lex.get_token()
      if last_token == '\\' and token != '\n':
         new_data = False
         append_data( data, key, new_data, '\\' )
   for (k, v) in data.items():
      if len(v) == 0:
         data.pop(k)
      if k in ["INPUT", "FILE_PATTERNS", "EXCLUDE_PATTERNS", "TAGFILES"]:
         continue
      if len(v) == 1:
         data[k] = v[0]
   return data