private int execute() { int exeCount = 0; final int size = this.tokenList.size(); this.printTokenList(); for (int i = 0; i < size; i++) { Token<?> token = this.tokenList.get(i); if (token.getType() == TokenType.Operator) { final OperatorToken op = (OperatorToken) token; final OperatorType operatorType = op.getOperatorType(); final int operandCount = operatorType.getOperandCount(); switch (operatorType) { case FUNC: case INDEX: // Could not optimize function and index call break; default: Map<Integer, DelegateTokenType> index2DelegateType = this.getIndex2DelegateTypeMap(operatorType); final int result = this.executeOperator(i, operatorType, operandCount, index2DelegateType); if (result < 0) { this.compactTokenList(); return exeCount; } exeCount += result; break; } } } this.compactTokenList(); return exeCount; }