Start by browning a peeled garlic clove and an onion cut into big wedges in the oil in a large pan. Add the peeled tomatoes after a couple of minutes, mashing them with a wooden spoon.
Salt and let them cook with the lid on over medium heat for about 10 minutes. When the sauce has thickened, add the chopped basil or the oregano and remove the onion and garlic cloves.
Lower the heat a little bit and create a small hollow with the spoon where you will shell the first egg. Do the same thing for the other three eggs.
Cover with a lid and let it cook for 7-8 minutes if you want fully cooked eggs in purgatory; if you like a liquid egg yolk, cook them for only 3-4 minutes.
Sprinkle with a handful of parmesan and a grind of pepper and garnish with a basil leaf. Serve immediately.