Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird parsing of q:w with matching delimiters when same delimiters appear inside #5832

Open
p6rt opened this issue Nov 28, 2016 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Nov 28, 2016

Migrated from rt.perl.org#130205 (status was 'open')

Searchable as RT130205$

@p6rt
Copy link
Author

p6rt commented Nov 28, 2016

From @zoffixznet

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")␤»

@p6rt
Copy link
Author

p6rt commented Mar 15, 2017

From @LLFourn

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

@p6rt
Copy link
Author

p6rt commented Oct 9, 2017

From @samcv

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.

@p6rt
Copy link
Author

p6rt commented Oct 9, 2017

From @skids

On Sun, 08 Oct 2017 17​:35​:21 -0700, samantham@​posteo.net wrote​:

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

@p6rt
Copy link
Author

p6rt commented Oct 9, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant