The Perl 6 Summarizer wrote:

 Do Steve Fink's debugging for him
   Steve Fink had a problem with some generated code throwing a segfault
   when it was run and, having hit the debugging wall himself, posted the
   code to the list and asked help. Leo tracked down the bug in Parrot and
   fixed it. However, that's not why this made the summary, what's
   interesting is the sample of code that the problem code was generated
   from. Here it is:

     rule thing() {
         <[a-z]>+
     }

     rule parens() {
         { print "entering parens\n"; }
         \( [ <thing> | <parens> | \s ]* \)
         { print "leaving parens\n"; }
     }

     sub main() {
         my $t = "()()(((blah blah () blah))(blah))";
         my $t2 = $t _ ")";
         print "ok 8\n" if $t2 !~ /^ <parens> $/;
     }

   Looks tantalizing doesn't it? Someone's now going to tell me that the
   code in question has been there forever, but I'm still tantalized.


That code has been there forever. :-P


parrot/languages/perl6/t/rx/call.t - case 1

- Joe



Reply via email to