in reply to Need to build attribute parser

Look into Parse::RecDescent. It should do everything you need, and comes with plenty of documentation.