#NEWLINE# def validate_literals( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# for c in self . literals : #NEWLINE# #INDENT# if ( ( not isinstance ( c , StringTypes ) ) or ( len ( c ) > 1 ) ) : #NEWLINE# #INDENT# self . log . error ( 'Invalid literal %s. Must be a single character' , repr ( c ) ) #NEWLINE# self . error = 1 #NEWLINE# continue #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except TypeError : #NEWLINE# #INDENT# self . log . error ( 'Invalid literals specification. literals must be a sequence of characters' ) #NEWLINE# self . error = 1