Yay - the productions and reduction functions of the grammar are now completely and correctly generated.