They love parsley. Also dill, bronze fennel, lovage, and the like. We catch them and put them in our butterfly house and bring them fresh parsley daily until they pupate. Within a couple weeks they hatch and we let them go. Every summer the girls look forward to this.
Journey, it was sitting/eating on parsley. Thistle, you're right. I thought it was the yellow swallowtail but wasn't 100% sure and didn't want to give out wrong info.