In wok combine sugar, water, cinnamon, allspice, and salt.
Bring mixture to a full rolling boil.
Boil gently for 4 minutes, stirring frequently.
Remove from heat.
Add pecans or walnuts; stir just till nuts are well coated.
Turn mixture out onto waxed paper or foil; using 2 forks, quickly separate the nuts into bite-size clusters.
Cool thoroughly before serving.