Just thought I’d share this. If you’re using Parse::RecDescent and editing with vim, you’d probably like your grammar to be syntax highlighted (at least I do). Here’s a nice little trick to fool vim (and I don’t consider this a bug; vim folks, don’t fix this!):
my $grammar = <<'#'EOG';
#\
grammar goes here
#'EOG
vim doesn’t grok ‘ inside heredoc quoting, so it thinks that the # is the end of the heredoc, and puts normal highlighting back after that.

rock! I was looking for exactly that solution… google pointed me at you, and you solved my problem.
Thanks!