def get_parser(self):
        """
        Returns a ParserFactory with the state reset so it can be used to
        parse again.

        :return: ParserFactory
        """
        self.path = None
        self.anony_defs = []
        self.exhausted = False
        return self