def t_name(self, s):
        r'[A-Za-z_][A-Za-z_0-9]*'
        if s in RESERVED_WORDS:
            self.add_token(s.upper(), s)
        else:
            self.add_token('NAME', s)
def t_name ( self , s ) : if s in RESERVED_WORDS : self . add_token ( s . upper ( ) , s ) else : self . add_token ( 'NAME' , s )
r'[A-Za-z_][A-Za-z_0-9]*