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

Guillemet form of subscript parses as infix hyperop in Rakudo #3065

Closed
p6rt opened this issue Mar 4, 2013 · 9 comments
Closed

Guillemet form of subscript parses as infix hyperop in Rakudo #3065

p6rt opened this issue Mar 4, 2013 · 9 comments

Comments

@p6rt
Copy link

p6rt commented Mar 4, 2013

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

Searchable as RT117045$

@p6rt
Copy link
Author

p6rt commented Mar 4, 2013

From @masak

<masak> r​: .say for (1, 2, 3) <<>> "!"; .say for (1, 2, 3) «» "!";
.say for (1, 2, 3)«»"!"
<p6eval> rakudo 87ad7c​: OUTPUT«1!␤2!␤3!␤1!␤2!␤3!␤1!␤2!␤3!␤»
<masak> r​: .say for (1, 2, 3)<<
>>"!"
<p6eval> rakudo 87ad7c​: OUTPUT«===SORRY!===␤Two terms in a row␤at
/tmp/Kg__QjZ4yV​:1␤------> .say for (1, 2, 3)<<>>⏏"!"␤ [...]
* masak submits rakudobug
<jnthn> masak​: It parsed as a subscript
<masak> jnthn​: I know.
<jnthn> masak​: Yes, and STD does it too.
<jnthn> masak​: It's not a bug.
<masak> jnthn​: responding to Ovid's p6u email from a week ago.
<masak> jnthn​: the fact that it parses as a subscript isn't the bug.
<masak> jnthn​: look at the evaluation before.
<masak> it parses as a subscript when it's <<
>>, but not when it's «~»
<jnthn> oh...
<jnthn> Yeah, that's 'cus we're missing those quotes in the grammar somehow
<masak> that's the bug.
<jnthn> masak​: OK, fair enough.

@p6rt
Copy link
Author

p6rt commented Mar 8, 2013

From @jnthn

On Mon Mar 04 11​:57​:36 2013, masak wrote​:

<masak> r​: .say for (1, 2, 3) <<>> "!"; .say for (1, 2, 3) «» "!";
.say for (1, 2, 3)«»"!"
<p6eval> rakudo 87ad7c​: OUTPUT«1!␤2!␤3!␤1!␤2!␤3!␤1!␤2!␤3!␤»
<masak> r​: .say for (1, 2, 3)<<
>>"!"
<p6eval> rakudo 87ad7c​: OUTPUT«===SORRY!===␤Two terms in a row␤at
/tmp/Kg__QjZ4yV​:1␤------> .say for (1, 2, 3)<<>>⏏"!"␤ [...]
* masak submits rakudobug
<jnthn> masak​: It parsed as a subscript
<masak> jnthn​: I know.
<jnthn> masak​: Yes, and STD does it too.
<jnthn> masak​: It's not a bug.
<masak> jnthn​: responding to Ovid's p6u email from a week ago.
<masak> jnthn​: the fact that it parses as a subscript isn't the bug.
<masak> jnthn​: look at the evaluation before.
<masak> it parses as a subscript when it's <<
>>, but not when it's
«~»
<jnthn> oh...
<jnthn> Yeah, that's 'cus we're missing those quotes in the grammar
somehow
<masak> that's the bug.
<jnthn> masak​: OK, fair enough.

Added the missing postcircumfixes now, so the bug is resolved.

Tagging test needed.

Thanks,

/jnthn

@p6rt
Copy link
Author

p6rt commented Mar 8, 2013

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

@p6rt
Copy link
Author

p6rt commented Jan 15, 2014

From @coke

On Fri Mar 08 06​:06​:54 2013, jnthn@​jnthn.net wrote​:

On Mon Mar 04 11​:57​:36 2013, masak wrote​:

<masak> r​: .say for (1, 2, 3) <<>> "!"; .say for (1, 2, 3) «» "!";
.say for (1, 2, 3)«»"!"
<p6eval> rakudo 87ad7c​: OUTPUT«1!␤2!␤3!␤1!␤2!␤3!␤1!␤2!␤3!␤»
<masak> r​: .say for (1, 2, 3)<<
>>"!"
<p6eval> rakudo 87ad7c​: OUTPUT«===SORRY!===␤Two terms in a row␤at
/tmp/Kg__QjZ4yV​:1␤------> .say for (1, 2, 3)<<>>⏏"!"␤ [...]
* masak submits rakudobug
<jnthn> masak​: It parsed as a subscript
<masak> jnthn​: I know.
<jnthn> masak​: Yes, and STD does it too.
<jnthn> masak​: It's not a bug.
<masak> jnthn​: responding to Ovid's p6u email from a week ago.
<masak> jnthn​: the fact that it parses as a subscript isn't the bug.
<masak> jnthn​: look at the evaluation before.
<masak> it parses as a subscript when it's <<
>>, but not when it's
«~»
<jnthn> oh...
<jnthn> Yeah, that's 'cus we're missing those quotes in the grammar
somehow
<masak> that's the bug.
<jnthn> masak​: OK, fair enough.

Added the missing postcircumfixes now, so the bug is resolved.

Tagging test needed.

Thanks,

/jnthn

:(

Broken again​:

20​:57 < [Coke]> r​: .say for (1, 2, 3)<<>>"!" # RT # 117045
20​:57 <+camelia> rakudo-parrot 4f66ce​: OUTPUT«===SORRY!=== Error while
  compiling /tmp/4yeHzovIpJ␤Two terms in a row␤at
  /tmp/4yeHzovIpJ​:1␤------> .say for (1, 2, 3)<<
>>⏏"!" # RT #
  117045␤ expecting any of​:␤ postfix␤
  shell-quote word…»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jan 15, 2014

From @Mouq

On Tue Jan 14 17​:58​:47 2014, coke wrote​:

:(

Broken again​:

20​:57 < [Coke]> r​: .say for (1, 2, 3)<<>>"!" # RT # 117045
20​:57 <+camelia> rakudo-parrot 4f66ce​: OUTPUT«===SORRY!=== Error while
compiling /tmp/4yeHzovIpJ␤Two terms in a row␤at
/tmp/4yeHzovIpJ​:1␤------> .say for (1, 2, 3)<<
>>⏏"!"
# RT #
117045␤ expecting any of​:␤ postfix␤
shell-quote word…»

AFAICT, and as the irc log states, though entirely clearly, this is actually the correct behavior. The “<<>>” is parsed a subscript to “(1, 2, 3)”. The issue was that “(1, 2, 3)«»"!"” should have failed in the same way. The current behavior seems correct to me​:

01​:23 <Mouq> r​: .say for (1, 2, 3)«»"!"
01​:23 <camelia> rakudo-jvm 4f66ce​: OUTPUT«===SORRY!=== Error while compiling
  /tmp/Hk1vHd3zgB␤Two terms in a row␤at /tmp/Hk1vHd3zgB​:1␤------>
  .say for (1, 2, 3)«
»⏏"!"␤ expecting any of​:␤
  postfix␤ shell-quote words␤ infix…»

@p6rt
Copy link
Author

p6rt commented Jan 15, 2014

From @Mouq

On Tue Jan 14 22​:25​:10 2014, Mouq wrote​:

On Tue Jan 14 17​:58​:47 2014, coke wrote​:

:(

Broken again​:

20​:57 < [Coke]> r​: .say for (1, 2, 3)<<>>"!" # RT # 117045
20​:57 <+camelia> rakudo-parrot 4f66ce​: OUTPUT«===SORRY!=== Error
while
compiling /tmp/4yeHzovIpJ␤Two terms in a row␤at
/tmp/4yeHzovIpJ​:1␤------> .say for (1, 2,
3)<<
>>⏏"!"
# RT #
117045␤ expecting any of​:␤ postfix␤
shell-quote word…»

AFAICT, and as the irc log states, though entirely clearly, this is
actually the correct behavior. The “<<>>” is parsed a subscript to
“(1, 2, 3)”. The issue was that “(1, 2, 3)«
»"!"” should have failed
in the same way. The current behavior seems correct to me​:

01​:23 <Mouq> r​: .say for (1, 2, 3)«»"!"
01​:23 <camelia> rakudo-jvm 4f66ce​: OUTPUT«===SORRY!=== Error while
compiling
/tmp/Hk1vHd3zgB␤Two terms in a row␤at
/tmp/Hk1vHd3zgB​:1␤------>
.say for (1, 2, 3)«
»⏏"!"␤ expecting any of​:␤
postfix␤ shell-quote words␤ infix…»

Sorry, *not entirely clearly, I meant :P

@p6rt
Copy link
Author

p6rt commented Oct 15, 2014

From @usev6

I agree with Mouq and after adding a test to S03-operators/misc.t with commit Raku/roast@1e08ea21cc I'm now closing the ticket.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 15, 2014

From @usev6

I agree with Mouq and after adding a test to S03-operators/misc.t with commit Raku/roast@1e08ea21cc I'm now closing the ticket.

@p6rt p6rt closed this as completed Oct 15, 2014
@p6rt
Copy link
Author

p6rt commented Oct 15, 2014

@usev6 - 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