in reply to perl as backend for YACC/PCCTS?
It may not be exactly what you're looking for, but there may be something you can borrow from it.