#NEWLINE# def push_source( self , newstream , newfile = None ) : #NEWLINE# #INDENT# "Push an input source onto the lexer's input source stack." #NEWLINE# if isinstance ( newfile , basestring ) : #NEWLINE# #INDENT# newstream = StringIO ( newstream ) #NEWLINE# #UNINDENT# self . filestack . appendleft ( ( self . infile , self . instream , self . lineno ) ) #NEWLINE# self . infile = newfile #NEWLINE# self . instream = newstream #NEWLINE# self . lineno = 1