public ASTNode getResult(int currentParseOffset) 
    {
        while ( ! stack.isEmpty() ) {
            output( stack.pop() );
        }

        if ( valueQueue.isEmpty() ) {
            throw new ParseException("Empty expression?",currentParseOffset);
        } 

        if ( valueQueue.size() != 1 ) 
        {
            if ( valueQueue.size() > 1 ) 
            {
                boolean onlyValues = true;
                for ( ExpressionToken tok : valueQueue ) {
                    if ( ! tok.isValue() ) {
                        onlyValues = false;
                    }
                }
                if ( onlyValues ) {
                    throw new ParseException("Values without operator ?", valueQueue.peek().getTextRegion() );
                }
            }
            throw new RuntimeException("Internal error,output queue has size "+valueQueue.size()+" , expected size: 1");
        }

        final ASTNode result = valueQueue.pop().getToken();
        if ( result == null ) {
            throw new RuntimeException("Internal error");
        }
        return result;
    }