Help language development. Donate to The Perl Foundation

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

eg/simple.p6
use Grammar::PrettyErrors;

grammar G does Grammar::PrettyErrors {
  rule TOP {
    <hello>
    <world>
  }
  token hello { hi }
  token world { there }
}

#G.new.parse('hi here') orelse say 'failed';
G.new.parse('hi here') orelse .exception.say;