Rewrite shiftReduction

Less recursion