Islamist extremists , Kurdish separatists and leftist militants have all carried out attacks in Turkey in the past .