develooper Front page | perl.perl6.compiler | Postings from November 2004

Re: First public release of grammar engine

Thread Previous | Thread Next
Patrick R. Michaud
November 19, 2004 18:49
Re: First public release of grammar engine
Message ID:
On Sat, Nov 20, 2004 at 12:18:17AM +0000, Nicholas Clark wrote:
> $ ../../parrot demo.pir 
> input /pattern, string to match, + to continue match, ? to print pir,
> /
> Unrecognized character at offset 1 (found '')
> Segmentation fault
> Is this a known limitation? [Done after Andy's patch went in]
> Blows up the same way on x86 Linux and x86 FreeBSD. OS X gives "Bus error"
> instead.

Known limitation, and yet not entirely incorrect since null patterns
are illegal.  But p6ge should obviously do something more intelligent than

So, as a more general question, what should happen when p6ge is fed
a pattern with an error in it?  I'm guessing we'll eventually have it
throw some sort of exception, but Parrot exception handling is still
in flux so what to do in the meantime?

If we think of p6ge as a normal compiler, then perhaps it should work
the same way that imcc does -- namely, generate error messages to standard
output and return the same sort of object that imcc does when it's given
code with an error in it.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About