#NEWLINE# def parsestream( stream , encoding = None ) : #NEWLINE# #INDENT# 'Parses sql statements from file-like object.\n\n    :param stream: A file-like object.\n    :param encoding: The encoding of the stream contents (optional).\n    :returns: A generator of :class:`~sqlparse.sql.Statement` instances.\n    ' #NEWLINE# stack = engine . FilterStack ( ) #NEWLINE# stack . full_analyze ( ) #NEWLINE# return stack . run ( stream , stream )