Processing from right to left is more convenient, because once you see that the current character and the previous character form a specific combination, you can handle it directly.
Just handle it in reverse. In the forward direction you do addition, but now you do subtraction.