public BigDecimal parse(String formula) {

        List<Token> tokens = tokenizer.tokenize(formula);

        checkBalance(tokens);

        while (tokens.size() > 1) {
            parseFrom(tokens, 0);
        }

        if (tokens.isEmpty()) {
            throw new ParseException("Empty formula");
        }
        for (NumberToken numberToken : Tokens.number(tokens.get(0))) {
            return numberToken.getNumber();
        }
        throw new AssertionError("Got no result"); //this would be a real WTF that should not happen
    }