public CompiledExpression compileExpression(String expressionDefinition)
            throws CompilationException
    {
        Syntax syntax = getSyntax();
        String whiteSpaces = syntax.getWhiteSpaceCharacters() != null ? syntax
                .getWhiteSpaceCharacters() : "";
        StringTokenizer rechStr = new StringTokenizer(expressionDefinition,
                whiteSpaces);

        if (!rechStr.hasMoreTokens())
            throw new CompilationException(CompilationException.SYNTAX_ERROR, 0);

        // The hashtable will be filled with parameters during parsing
        Hashtable parameters = new Hashtable(1);

        int assignmentIndex = 0;

        if (syntax.getAssignmentOperator() != null
                && syntax.getAssignmentOperator().length() > 0)
        {
            rechStr = new StringTokenizer(expressionDefinition, whiteSpaces);
            if (!rechStr.hasMoreTokens()
                    || !rechStr.nextToken().startsWith(
                            syntax.getAssignmentOperator()))
                throw new CompilationException(
                        CompilationException.SYNTAX_ERROR, 0);
            assignmentIndex = expressionDefinition.indexOf(syntax
                    .getAssignmentOperator());
        }

        // Expression can't be empty
        if (assignmentIndex == expressionDefinition.length() - 1)
            throw new CompilationException(CompilationException.SYNTAX_ERROR,
                    assignmentIndex + 1);
                

        // Reuse the parser that parse the expressions of functions
        ExpressionNode expressionTree = (ExpressionNode) parseExpression(
                expressionDefinition,
                assignmentIndex
                        + (syntax.getAssignmentOperator() != null ? syntax
                                .getAssignmentOperator().length() : 0),
                parameters);
        // Return the instance of CompiledExpression matching
        // expressionDefinition
        return new CompiledExpression(expressionDefinition, parameters,
                expressionParameter, expressionTree);
    }