Bring the sugar, water and rosemary to the boil in a saucepan and simmer for about 30 minutes. Pass through a hair sieve, allow to cool and mix with the lime juice that has also passed through a sieve. Grate the zest of 3 limes. Freeze in the ice cream maker or place on a flat stainless steel bowl, freeze and stir regularly to prevent larger crystals from forming.