in reply to perl as backend for YACC/PCCTS?

Dominus has written a program called py that uses yacc/bison to create a parser in Perl.

It may not be exactly what you're looking for, but there may be something you can borrow from it.