Yes a food processor can grind coffee beans just as well as a regular coffee grinder could.
Just place the coffee beans into the food processor and run the food processor for a few minutes and it should give the coffee beans a fine enough grind to make great coffee.