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

Either Rakudo or STD.pm6 is wrong about comma before 'given' statement modifier #2257

Closed
p6rt opened this issue Nov 13, 2010 · 7 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Nov 13, 2010

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

Searchable as RT79174$

@p6rt
Copy link
Author

p6rt commented Nov 13, 2010

From @masak

<masak> std​: 1, 2, 3, given 4
<p6eval> std a194beb​: OUTPUT«ok 00​:01 120m␤»
<masak> rakudo​: 1, 2, 3, given 4
<p6eval> rakudo 015d77​: OUTPUT«Could not find sub &given␤ in main
program body at line 22​:/tmp/ipNXhbYj50␤»
<masak> which one's right, STD or Rakudo?
* masak submits rakudobug
<sorear> looks like rakudo is missing terminator​:sym<given>
<jnthn> Ah
<sorear> digging deeper, it looks like the problem is in
HLL​::Grammar.nulltermish
<sorear> which doesn't check <?terminator>
<masak> sorear++

@p6rt
Copy link
Author

p6rt commented Jul 5, 2011

From @masak

<masak> std​: my @​a = 1, 2, 3, given 42;
<p6eval> std 37a0cdd​: OUTPUT«ok 00​:01 122m␤»
<masak> rakudo​: my @​a = 1, 2, 3, given 42; say @​a
<p6eval> rakudo 72d158​: OUTPUT«Could not find sub &given [...]
* masak submits rakudobug

A comma at the end of a list before the end of a statement is usually
not a problem. If I'm reading the output from STD.pm6 correctly, the
same goes for commas just before 'given' (and 'if' and 'while' and
other statement modifiers). Rakudo seems to be in term position only
and treats the 'given' as a sub call.

@p6rt
Copy link
Author

p6rt commented Feb 26, 2014

From @coke

On Tue Jul 05 13​:18​:32 2011, masak wrote​:

<masak> std​: my @​a = 1, 2, 3, given 42;
<p6eval> std 37a0cdd​: OUTPUT«ok 00​:01 122m␤»
<masak> rakudo​: my @​a = 1, 2, 3, given 42; say @​a
<p6eval> rakudo 72d158​: OUTPUT«Could not find sub &given [...]
* masak submits rakudobug

A comma at the end of a list before the end of a statement is usually
not a problem. If I'm reading the output from STD.pm6 correctly, the
same goes for commas just before 'given' (and 'if' and 'while' and
other statement modifiers). Rakudo seems to be in term position only
and treats the 'given' as a sub call.

Update on rakudo behavior​:

19​:55 < [Coke]> m​: my @​a = 1, 2, 3, given 42;
19​:55 <+camelia> rakudo-moar 974d00​: OUTPUT«===SORRY!=== Error while compiling
  /tmp/HEBAcRoKPy␤Undeclared routine​:␤ given used at line 1␤␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Feb 26, 2014

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

@p6rt
Copy link
Author

p6rt commented Oct 8, 2015

From @TimToady

Statement modifiers now behave as terminators. Tests in 6fa03d9816b1613762f12def4bbc556dbb5fb3d5

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 8, 2015

From @TimToady

Statement modifiers now behave as terminators. Tests in 6fa03d9816b1613762f12def4bbc556dbb5fb3d5

@p6rt
Copy link
Author

p6rt commented Oct 8, 2015

@TimToady - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Oct 8, 2015
@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