fix eliminating left recursive bug