#NEWLINE# def toString( self , start = None , stop = None ) : #NEWLINE# #INDENT# if ( self . p == ( - 1 ) ) : #NEWLINE# #INDENT# self . fillBuffer ( ) #NEWLINE# #UNINDENT# if ( start is None ) : #NEWLINE# #INDENT# start = 0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not isinstance ( start , int ) ) : #NEWLINE# #INDENT# start = start . index #NEWLINE# #UNINDENT# #UNINDENT# if ( stop is None ) : #NEWLINE# #INDENT# stop = ( len ( self . tokens ) - 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not isinstance ( stop , int ) ) : #NEWLINE# #INDENT# stop = stop . index #NEWLINE# #UNINDENT# #UNINDENT# if ( stop >= len ( self . tokens ) ) : #NEWLINE# #INDENT# stop = ( len ( self . tokens ) - 1 ) #NEWLINE# #UNINDENT# return '' . join ( [ t . text for t in self . tokens [ start : ( stop + 1 ) ] ] )