Reduce shift/reduce errors

Modify the grammar to reduce the number of shift/reduce errors from 4 to 2.