Parrot/PGE, parsers Parsers, Perl 6 Rules, and the Parrot Grammar Engine #34

<PGE::Util::die>

The <PGE::Util::die> subrule throws an exception when it's executed, and reports the position (line number) and next ten characters of input at the point where the die was encountered.

We can use this for simple syntax error reporting.

Copyright © 2006 Patrick Michaud