working parser gen in PLY