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

Owner: Nobody
Requestors: cpan [at] zoffix.com
lloyd.fourn [at] gmail.com
Cc:
AdminCc:

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



Subject: [BUG] Weird parsing of q:w with matching delimiters when same delimiters appear inside
Download (untitled) / with headers
text/plain 1.2k
It seems that when q:w is used with a pair of open-close delimiters AND those delimiters appear inside the stuff it's quoting, all whitespace is trimmed between the opening(closing) inner delimiter and the next(previous) thing and only then does the stuff inside gets split into quote words; leading to the delimiters being, incorrectly, joined with other stuff: 16:29 m: dd q:w { [ ] { } } 16:29 camelia rakudo-moar 054aca: OUTPUT«("[", "]", "\{}")␤» 16:30 m: dd q:w / [ ] { } / 16:30 camelia rakudo-moar 054aca: OUTPUT«("[", "]", "\{", "}")␤» 16:30 viki I don't get what that { } variant is doing... 16:31 m: dd q:w [ [ ] { } ] 16:31 camelia rakudo-moar 054aca: OUTPUT«("[]", "\{", "}")␤» 16:31 viki m: dd q:w [ [ ] { } ] 16:31 camelia rakudo-moar 054aca: OUTPUT«("[]", "\{", "}")␤» 16:31 viki m: dd q:w [ [ lulzwat ] { } ] 16:31 camelia rakudo-moar 054aca: OUTPUT«("[lulzwat]", "\{", "}")␤» 16:41 m: q:w “ 12 “ lulzwat ” 42 ” 16:41 camelia rakudo-moar 054aca: ( no output ) 16:42 viki m: dd q:w “ 12 “ lulzwat ” 42 ” 16:42 camelia rakudo-moar 054aca: OUTPUT«("12", "“lulzwat”", "42")␤» 16:42 viki m: dd q:w “ 12 “ lulz wat ” 42 ” 16:42 camelia rakudo-moar 054aca: OUTPUT«("12", "“lulz", "wat”", "42")␤»
Date: Wed, 15 Mar 2017 09:56:51 +0000
To: "rakudobug [...] perl.org" <rakudobug [...] perl.org>
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
Subject: [BUG] qw word quoting merging words with internal balanced braces
Download (untitled) / with headers
text/plain 584b
20:51 < llfourn> m: .say for qw<a < b > c > # looks like a bug
20:51 <+camelia> rakudo-moar b19df9: OUTPUT: «a␤<b>␤c␤»
20:51 -!- mcmillhj [~huntermcm@c-71-62-149-7.hsd1.va.comcast.net] has joined #perl6
20:52 < Ven> m: .say for qw<<a < b > c >>
20:52 <+camelia> rakudo-moar b19df9: OUTPUT: «a␤<␤b␤>␤c␤»
20:52 < Ven> m: say <a < b > c>.perl
20:52 <+camelia> rakudo-moar b19df9: OUTPUT: «Value of type List uselessly passed to val()␤  in block <unit> at <tmp> 
                 line 1␤("a", "<b>", "c")␤»
20:52 < Ven> ...interesting.
20:52 < llfourn> huh o.O

Download (untitled) / with headers
text/plain 167b
This is happening because it appears to split it up at the matching delimiter and then concat it back together again, concatting it back together after the word split.
Download (untitled) / with headers
text/plain 275b
On Sun, 08 Oct 2017 17:35:21 -0700, samantham@posteo.net wrote: Show quoted text
> This is happening because it appears to split it up at the matching > delimiter and then concat it back together again, concatting it back > together after the word split.
Might be the same bug as RT#119401


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