1Combine the basil in with the pine nuts, pulse a few times in a food processor. (If you are using walnuts instead of pine nuts and they are not already chopped, pulse them a few times first, before adding the basil.) Add the garlic, pulse a few times more. (You can use a mortar and pestle instead, if you'd like.)
2Slowly add the olive oil in a constant stream while the food processor is on. Stop to scrape down the sides of the food processor with a rubber spatula. Add the grated cheese and pulse again until blended. Add a pinch of salt and freshly ground black pepper to taste.