lga6-2: use ply to validate a grammar