Help language development. Donate to The Perl Foundation

Grammar::PrettyErrors cpan:BDUGGAN last updated on 2019-10-09

eg/orange.p6
use lib $*HOME.child('p6-Grammar-PrettyErrors/lib');
use Grammar::PrettyErrors;

grammar G does Grammar::PrettyErrors {
  rule TOP {
    'orange'+ % ' '
  }
}

my $g = G.new(:quiet, :!colors);
$g.parse('orange orange orange banana');
say .parsed with $g.error;