def tokenize(self):
        self.token_list = []
        ps = self.parse_string.strip()
        i = 0
        last_token = None
        while i < len(ps) and ps[i].isspace():
            i += 1
        while i < len(ps):
            token = ''
            if ps[i].isalpha():
                while i < len(ps) and (ps[i].isalnum() or ps[i] == '_'):
                    token += ps[i]
                    i += 1
            elif ps[i].isdigit():
                while i < len(ps) and (ps[i].isdigit() or
                                       ps[i] == '.' or
                                       ps[i] == 'e' or
                                       ps[i] == 'E' or
                                       (ps[i] == '+' and (ps[i-1] == 'e' or ps[i-1] == 'E')) or
                                       (ps[i] == '-' and (ps[i-1] == 'e' or ps[i-1] == 'E'))):
                    token += ps[i]
                    i += 1
            elif ps[i] == '.':
                if ps[i+1].isdigit():
                    while i < len(ps) and (ps[i].isdigit() or ps[i] == '.'):
                        token += ps[i]
                        i += 1
                else:
                    while i < len(ps) and (ps[i].isalpha() or ps[i] == '.'):
                        token += ps[i]
                        i += 1
            else:
                token += ps[i]
                i += 1
            if token == '-' and \
               (last_token == None or last_token == '(' or self.is_op(last_token)):
                token = '~'
            self.token_list += [token]
            last_token = token
            while i < len(ps) and ps[i].isspace():
                i += 1