bug fixes to p6 grammar generation