First place a glass pan (or alternatively a normal pan) on the stove, pour in some olive oil, and heat it up. Next, fry the garlic and rosemary before adding the tomatoes and tomato sauce. Season with salt and pepper before leaving the sauce to cook. Break an egg into the pan and grate some parmesan on top. Carefully stir everything together. To finish, fold the mixture into the pasta.