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

When things go wrong -- syntax errors

Unfortunately, not every input stream to a parser is perfect -- we encounter strings that don't fit our language.

A simple "parse failed" message is not very helpful -- we often need to give some idea of where the parse failed, and perhaps why.

However, we can use simple subrules to provide context-sensitive parse-failure messages.

Copyright © 2006 Patrick Michaud