expression stack to inverted stack
full conversion function and tests