Why not adopt me?This distribution is up for adoption! If you're interested then please contact the PAUSE module admins via email.
Parse::RecDescent::Deparse - Turn a Parse::RecDescent object back into its grammar
use Parse::RecDescent::Deparse; my $foo = new Parse::RecDescent($grammar); print $foo->deparse;
This module adds the
deparse method to the
Parse::RecDescent class, which returns a textual description of the grammar.
Why? There are at least two equally unlikely reasons why this could be useful:
You're working on something which grovels around in the
Parse::RecDescentobject data structure and want to view the effects of your changes. For instance, a
Parse::RecDescentoptimizer. (This package does not contain a functional
You want to understand how
Parse::RecDescentdoes what it does, and fancy the source of this package is a bit more of a gentle introduction than the source of
Parse::RecDescent::Deparse can correctly deparse the metagrammar for
Parse::RecDescent input, so that's a good thing. There are no bugs in the
Parse::RecDescent optimizer as it clearly does not exist.