Syntact analyzer working correctly