#NEWLINE# def get_tokens_unprocessed( self , text ) : #NEWLINE# #INDENT# mlexer = MatlabLexer ( ** self . options ) #NEWLINE# curcode = '' #NEWLINE# insertions = [ ] #NEWLINE# for match in line_re . finditer ( text ) : #NEWLINE# #INDENT# line = match . group ( ) #NEWLINE# if line . startswith ( '>>' ) : #NEWLINE# #INDENT# insertions . append ( ( len ( curcode ) , [ ( 0 , Generic . Prompt , line [ : 3 ] ) ] ) ) #NEWLINE# curcode += line [ 3 : ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if line . startswith ( '???' ) : #NEWLINE# #INDENT# idx = len ( curcode ) #NEWLINE# line = ( '\n' + line ) #NEWLINE# token = ( 0 , Generic . Traceback , line ) #NEWLINE# insertions . append ( ( idx , [ token ] ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if curcode : #NEWLINE# #INDENT# for item in do_insertions ( insertions , mlexer . get_tokens_unprocessed ( curcode ) ) : #NEWLINE# #INDENT# ( yield item ) #NEWLINE# #UNINDENT# curcode = '' #NEWLINE# insertions = [ ] #NEWLINE# #UNINDENT# ( yield ( match . start ( ) , Generic . Output , line ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if curcode : #NEWLINE# #INDENT# for item in do_insertions ( insertions , mlexer . get_tokens_unprocessed ( curcode ) ) : #NEWLINE# #INDENT# ( yield item )