# New Ticket Created by Andrew Buchanan
# Please include the string: [perl #129311]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=129311 >
This is a simple two-regex grammar. It is as if the ‘?’ modifier is set on the
# New Ticket Created by Jan-Olof Hendig
# Please include the string: [perl #129321]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=129321 >
# tested with
dogbert@dogbert-VirtualBox ~ $ perl6 -v
This is Rakudo version
# New Ticket Created by Larry Brasfield
# Please include the string: [perl #129316]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=129316 >
Using Rakudo Star:
~$ perl6 -version
This is Rakudo version 2016.07.1 built on MoarVM
Is this also technically correct, even though it clearly shouldn't match?
perl6 -e '"foo" ~~ /(.*)+\:/' # hangs
In either case, going into an infinite loop is not exactly DWIM.
> On 20 Sep 2016, at 9:12 PM, Will Coleda via RT
> wrote:
>
> On Tue Sep 20
Yesterday we had the following discussion on #perl6-dev about this ticket:
start of discussion on IRC -- cmp.
http://irclog.perlgeek.de/perl6-dev/2016-09-19#i_13238477
bartolin lizmat: I saw your commit 9b6f2eb543 in the backlog. does that
shed a different light on RT #128320 and the
# New Ticket Created by Aaron Sherman
# Please include the string: [perl #129319]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=129319 >
Via IRC:
[15:39] Saw the note about unicode radixes and so immediately
tried:
[15:39]
Thank you for the report, however, this is not a bug.
Closing curlies ('}') end statements when they're the last
non-whitespace/non-unspace character on the line, which is why your first
version works.
When putting them all on one line, you have to explicitly specify where the
statements end,
Here's a much shorter way to reproduce it:
perl6 -e '"foo" ~~ /(.*)+/' # hangs
While my previous explanation for why this occurs makes sense, it's worth
noting this behaviour is not observed in Perl 5, for example:
perl -e '"foo" =~ /(.*)+/' # does not hang
I'm not seeing the bug here, to be honest.
The `Body` is asking for one or more tokens `Text`, *nothing* is a valid match
for those tokens, so after matching the provided text, your grammar continues
to match nothing infinite number of times.