A function that transforms a expression to a RPExpression