Pretty much anything that is green and that a human can eat, plus pesticide and fertilizer free dandilion from the garden. Stay away from ice burg lettuce - there's no nutritional value to it whatsoever, but reagular leaf lettuce is good! You can also feed sinking wafers, shrimp pellets, or buy or make your own "snail pellets."
It really depends on the type of yellow snail that you have. It would either be a brig, cana, or haustrum. (Or possibly a ramshorn depending on the shell shape.) The briggs need very mushy food that has been microwaved, blanched, or frozen first. The other snails will eat it cooked or raw, and the raw veggies last longer in the aquarium and don't foul up the water as much.
www.applesnail.net is a good place to research what type of snail you have, and give you a better idea about food choices. They also have homemade reciped to try!