Skip Menu |
Report information
Id: 127701
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: moritz <moritz.lenz+perl [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



From: Moritz Lenz <moritz [...] faui2k3.org>
To: rakudobug [...] perl.org
Date: Sun, 13 Mar 2016 19:46:47 +0100
Subject: Parsing bug in Rakudo when the match variable and a postfix is followed by a double minus
Download (untitled) / with headers
text/plain 712b
<moritz> m: '5x3' ~~ /(.)x(.)/ and say "$/[0]--$/[1]" <camelia> rakudo-moar 374fdd: OUTPUT«5x3[0]--3␤» <timotimo> the AST it outputs is just concatenating the value of $/ with "[0]--" and then the value of $/[1] <moritz> yes, that looks like a bug <timotimo> i'd say this is a bug. it should see that the [0] is a successful postcircumfix parse, and ignore the -- after it <timotimo> bazzaar: so, thank you for finding this bug :) <bazzaar> yes that's the kind of result I got, $0--$1 works fine Some golfing: <moritz> m: '5x3' ~~ /(.)x(.)/ and say "$/[0]--" <camelia> rakudo-moar 374fdd: OUTPUT«5x3[0]--␤» <moritz> m: '5x3' ~~ /(.)x(.)/ and say "$/[0]-" <camelia> rakudo-moar 374fdd: OUTPUT«5-␤»
From: Timo Paulssen <timo [...] wakelift.de>
To: perl6-compiler [...] perl.org
Date: Sun, 13 Mar 2016 23:57:28 +0100
Subject: Re: [perl #127701] Parsing bug in Rakudo when the match variable and a postfix is followed by a double minus
Download (untitled) / with headers
text/plain 156b
Defining new postfix:<foo> will make "foo" after [0] cause the [0] to be output verbatim rather than having [0] be interpreted as the postcircumfix on $/.
Download (untitled) / with headers
text/plain 417b
Still present in today' rakudo 2ad323: <Zoffix> m: '5x3' ~~ /(.)x(.)/ and say "$/[0]--" <camelia> rakudo-moar 2ad323: OUTPUT«5x3[0]--␤» <Zoffix> m: '5x3' ~~ /(.)x(.)/ and say "$/[0]-" <camelia> rakudo-moar 2ad323: OUTPUT«5-␤» <Zoffix> m: '5x3' ~~ /(.)x(.)/ and say "$/[0]" <camelia> rakudo-moar 2ad323: OUTPUT«5␤» <Zoffix> m: '5x3' ~~ /(.)x(.)/ and say "$/" <camelia> rakudo-moar 2ad323: OUTPUT«5x3␤»
Download (untitled) / with headers
text/plain 927b
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ 🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁 TODO-fudged tests added in https://github.com/perl6/roast/commit/e25ff99452 🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁 ♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ -- Cheers, ZZ | https://twitter.com/zoffix


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org