an exercise in LL(1) parsing