final-ish lab4 grammar