On Tue, 31 Jan 2017 08:21:34 -0800, jn...@jnthn.net wrote: > It golfs further still, it seems. This one also blows up: > > grammar Grammar::Foo { > token TOP { > 'z' | :i <[0..9]> ** 4 > } > } > my $res = Grammar::Foo.parse( '2603' ); > > And is fixed by the removal of the :i, so that's likely playing a > role. Will dig further.
Fixed and covered by tests in S05-metasyntax/longest-alternative.t. The SEGV was due to a lack of validation during NFA construction; fixing that turned it into an error, which was in turn fixed by correcting a bug in the regex to NFA compiler that left a dangling edge. The additional validation caught a second bug, which is also fixed and now spectest covered in the same file.