'Populate self.items with the tokens from the formula.'

def parse(self):

    if (not self.formula):
        return
    elif (self.formula[0] == '='):
        self.offset += 1
    else:
        self.items.append(Token(self.formula, Token.LITERAL))
        return
    consumers = (('"\'', self.parse_string), ('[', self.parse_brackets), ('#', self.parse_error), ('    ', self.parse_whitespace), ('+-*/^&=><%', self.parse_operator), ('{(', self.parse_opener), (')}', self.parse_closer), (';,', self.parse_separator))
    dispatcher = {}
    for (chars, consumer) in consumers:
        dispatcher.update(dict.fromkeys(chars, consumer))
    while (self.offset < len(self.formula)):
        if self.check_scientific_notation():
            continue
        curr_char = self.formula[self.offset]
        if (curr_char in self.TOKEN_ENDERS):
            self.save_token()
        if (curr_char in dispatcher):
            self.offset += dispatcher[curr_char]()
        else:
            self.token.append(curr_char)
            self.offset += 1
    self.save_token()
