nall has asked for the wisdom of the Perl Monks concerning the following question:

i'd like to use YACC/PCCTS to parse a grammar and then use perl as the backend to create symbol tables, etc. does anyone know if this has been done already? the grammar i'd like to parse is too complex to do it all in perl. well, of course perl could do it, but it's much cleaner in a language like YACC. thanks.

Replies are listed 'Best First'.
Re: perl as backend for YACC/PCCTS?
by chromatic (Archbishop) on Feb 03, 2001 at 02:05 UTC
    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.

Re: perl as backend for YACC/PCCTS?
by stephen (Priest) on Feb 03, 2001 at 04:19 UTC
    I think what you're looking for is Parse::Yapp. That's designed to be similar to yacc. Or, if you're just looking for a parser, see Parse::RecDescent.

    stephen