#NEWLINE# def nextToken( self ) : #NEWLINE# #INDENT# while ( ( not self . isEOF ( ) ) and self . is_whitespace ( ) ) : #NEWLINE# #INDENT# self . next_ch ( ) #NEWLINE# #UNINDENT# if self . isEOF ( ) : #NEWLINE# #INDENT# return Tok ( type = EOF ) #NEWLINE# #UNINDENT# t = self . match_pattern ( ) #NEWLINE# if self : #NEWLINE# #INDENT# return t #NEWLINE# #UNINDENT# te = self . curr_ch ( ) #NEWLINE# try : #NEWLINE# #INDENT# ty = single_char_lookup [ te ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise TokenStreamException ( ( 'Unexpected char %r in column %u.' % ( self . curr_ch ( ) , self . _pos ) ) ) #NEWLINE# #UNINDENT# self . next_ch ( ) #NEWLINE# return Tok ( type = ty , text = te , col = self . _pos )