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

Totally legit thing inside <<...>> quotes deemed un-legit by Rakudo #2918

Closed
p6rt opened this issue Oct 15, 2012 · 6 comments
Closed

Totally legit thing inside <<...>> quotes deemed un-legit by Rakudo #2918

p6rt opened this issue Oct 15, 2012 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Oct 15, 2012

Migrated from rt.perl.org#115272 (status was 'resolved')

Searchable as RT115272$

@p6rt
Copy link
Author

p6rt commented Oct 15, 2012

From @masak

<masak> rn​: say <<<\>'n'>>
<p6eval> niecza v22-13-g0d2a99e​: OUTPUT«<>'n'␤»
<p6eval> ..rakudo 8a07b8​: OUTPUT«===SORRY!===␤Missing << or >>␤at
/tmp/rgRs_yIuEd​:1␤»
* masak submits rakudobug
<masak> motivation​: I think Niecza has it right here. thus, Rakudo has it wrong.

@p6rt
Copy link
Author

p6rt commented Oct 15, 2012

From @masak

<masak> rn​: say <<'m'<\>'n'>>
<p6eval> rakudo 8a07b8​: OUTPUT«'m'<\>'n'␤»
<p6eval> ..niecza v22-13-g0d2a99e​: OUTPUT«'m'<>'n'␤»
<masak> rn​: say <'m'<\>'n'>
<p6eval> niecza v22-13-g0d2a99e​: OUTPUT«===SORRY!===␤␤Preceding context
expects a term, but found infix < instead [...] Parse failed␤␤»
<p6eval> ..rakudo 8a07b8​: OUTPUT«'m'<>'n'␤»
* masak decides to include these discrepancies, also reported by
diakopter++, in the bug report

They seem relevant. The one who fixes the original bug may decide to
relate somehow to the above two discrepancies as well.

@p6rt
Copy link
Author

p6rt commented Oct 15, 2012

@masak - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Nov 1, 2012

From @jnthn

On Mon Oct 15 06​:58​:31 2012, masak wrote​:

<masak> rn​: say <<<\>'n'>>
<p6eval> niecza v22-13-g0d2a99e​: OUTPUT«<>'n'␤»
<p6eval> ..rakudo 8a07b8​: OUTPUT«===SORRY!===␤Missing << or >>␤at
/tmp/rgRs_yIuEd​:1␤»
* masak submits rakudobug
<masak> motivation​: I think Niecza has it right here. thus, Rakudo has
it wrong.

No, Niecza gets it wrong too. Now Rakudo gets it righter than before,
and decidedly righter than Niecza​:

<<<\>'n'>>
<> n
<<<\>'n'>>.perl
("<>", "n")

<<...>> are shell words. The \> clearly must escape the >. And quotes in
shell words have meaning.

I think this is the right answer at last. :-)

/jnthn

@p6rt
Copy link
Author

p6rt commented Jan 8, 2013

From @moritz

Tested in S02-literals/quoting.t

@p6rt
Copy link
Author

p6rt commented Jan 8, 2013

@moritz - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant