# New Ticket Created by  "Brian S. Julin" 
# Please include the string:  [perl #125345]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=125345 >


This is a relatively recent regression probably sometime in May 2015:

20:44   skids   m: my $*guard = 0; grammar Foo { regex TOP { [a | [ "[" <R> b? 
"]" ]]+ % b { die if $*guard++ > 500 } }; regex b { b }; regex R { <TOP>+ % [ 
<.b>? "/" ] } }; Foo.parse("[aba]").say; Foo.parse("[abab]").say;
20:44   camelia         rakudo-moar 869306: OUTPUT«「[aba]」␤ R => 「aba」␤  TOP => 
「aba」␤Died␤  in regex TOP at /tmp/8iN9r23p25:1␤  in regex R at 
/tmp/8iN9r23p25:1␤  in regex TOP at /tmp/8iN9r23p25:1␤  in block <unit> at 
/tmp/8iN9r23p25:1␤  in any <unit-outer> at /tmp/8iN9r23p25:1…»
20:44   skids   star: my $*guard = 0; grammar Foo { regex TOP { [a | [ "[" <R> 
b? "]" ]]+ % b { die if $*guard++ > 500 } }; regex b { b }; regex R { <TOP>+ % 
[ <.b>? "/" ] } }; Foo.parse("[aba]").say; Foo.parse("[abab]").say;
20:44   camelia         star-m 2015.03: OUTPUT«「[aba]」␤ R => 「aba」␤  TOP => 
「aba」␤「[abab]」␤ R => 「aba」␤  TOP => 「aba」␤»
20:44   skids   m: my $*guard = 0; grammar Foo { regex TOP { [a | [ "[" <R> b? 
"]" ]]+ % b { die if $*guard++ > 500 } }; regex b { b }; regex R { <TOP>+ % [ 
<b>? "/" ] } }; Foo.parse("[aba]").say; Foo.parse("[abab]").say;
20:44   camelia         rakudo-moar 869306: OUTPUT«「[aba]」␤ R => 「aba」␤  TOP => 
「aba」␤「[abab]」␤ R => 「aba」␤  TOP => 「aba」␤»

The only difference in the last (successful) expression is the use of <b> 
instead of <.b>

Reply via email to