So inspired by both this post by moritz and the awesome Regexp::Grammars module on CPAN, I created a Perl 5.10 version of the perl 6 code (also using GraphViz::Data::Grapher). There are a few differences, such as naming the top rule, the '' element that Regexp::Grammars creates, and the output format which comes from GraphViz::Data::Grapher (I am outputting to png since GraphViz's as_svg [well dot's SVG output, technically] outputs the wrong size for the outer svg tag).
Continue reading Grammars in Perl 5.10.