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 segfaulting. 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. Pm