I think the splitRightShift function is quite an ugly hack. ;-) It would be much better if you could handle the whole thing within the parser alone. Manipulating the token-stream on-demand from within the parser kind-of breaks the layering, and makes the structure less clean.