def Parse(self, parser_mediator):
    """Parsers the file entry and extracts event objects.

    Args:
      parser_mediator (ParserMediator): a parser mediator.

    Raises:
      UnableToParseFile: when the file cannot be parsed.
    """
    file_entry = parser_mediator.GetFileEntry()
    if not file_entry:
      raise errors.UnableToParseFile('Invalid file entry')

    parser_mediator.AppendToParserChain(self)
    try:
      self.ParseFileEntry(parser_mediator, file_entry)
    finally:
      parser_mediator.PopFromParserChain()
Parsers the file entry and extracts event objects.

    Args:
      parser_mediator (ParserMediator): a parser mediator.

    Raises:
      UnableToParseFile: when the file cannot be parsed.