(self, stream)
Parse a YAML stream and produce parsing events.
Parse a YAML stream and produce parsing events.
Parse a YAML stream and produce parsing events .
def parse(self, stream):
        # type: (StreamTextType) -> Any
        """
        Parse a YAML stream and produce parsing events.
        """
        _, parser = self.get_constructor_parser(stream)
        try:
            while parser.check_event():
                yield parser.get_event()
        finally:
            parser.dispose()
            try:
                self._reader.reset_reader()
            except AttributeError:
                pass
            try:
                self._scanner.reset_scanner()
            except AttributeError:
                pass
def parse ( self , stream ) : # type: (StreamTextType) -> Any _ , parser = self . get_constructor_parser ( stream ) try : while parser . check_event ( ) : yield parser . get_event ( ) finally : parser . dispose ( ) try : self . _reader . reset_reader ( ) except AttributeError : pass try : self . _scanner . reset_scanner ( ) except AttributeError : pass