# New Ticket Created by  Pim 
# Please include the string:  [perl #58544]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58544 >



Hi,

playing with pugs and parrot compiled perl6 i found this bug:

1st script :


#!/usr/local/bin/pugs -w

loop (my $i=0;$i<2;$i++) {
say $i;
}
-------------------
works well.

2nd script :


#!/usr/local/bin/pugs -w


my $n=7;
if ($n > 2) { say "$n is bigger than 2";}
------------------
works well.

3rd script (is the concatenation of both 1st and 2nd):


#!/usr/local/bin/pugs -w

loop (my $i=0;$i<2;$i++) {
say $i;
}


my $n=7;
if ($n > 2) { say "$n is bigger than 2";}
------------------
crashes with this error: 
pugs t3.pl
 *** 
     Unexpected "2"
     expecting operator or ";"
     at ./t3.pl line 9, column 10

Here's my pugs version :  Version: 6.2.13.11 according pugs -v.
-----------------
and per6 parrot compiled (THIS VERSION):
This is Rakudo Perl 6, revision 30402 built on parrot 0.7.0-devel
11:57 < pim> for i486-linux-gnu-thread-multi.
complains like this:
Statement not terminated properly at line 9, near "2) { say \""

current instr.: 'parrot;PGE::Util;die' pc 119 
(runtime/parrot/library/PGE/Util.pir:82)
called from Sub 'parrot;Perl6::Grammar;eat_terminator' pc 23817
(src/gen_grammar.pir:2840)  called from Sub 
'parrot;Perl6::Grammar;statementlist' pc 22866
(src/gen_grammar.pir:2473)  called from Sub 'parrot;Perl6::Grammar;circumfix' 
pc 77039
(src/gen_grammar.pir:23163) called from Sub 'parrot;Perl6::Grammar;noun' pc 
64913
(src/gen_grammar.pir:18584) called from Sub 'parrot;Perl6::Grammar;expect_term' 
pc 60176
(src/gen_grammar.pir:16796) called from Sub 'parrot;PGE::OPTable;parse' pc 1959
(compilers/pge/PGE/OPTable.pir:554)called from Sub 
'parrot;Perl6::Grammar;arglist' pc 92058
(src/gen_grammar.pir:29009) called from Sub 'parrot;Perl6::Grammar;term' pc 
67012
(src/gen_grammar.pir:19356) called from Sub 'parrot;Perl6::Grammar;noun' pc 
65511
(src/gen_grammar.pir:18786) called from Sub 'parrot;Perl6::Grammar;expect_term' 
pc 60176
(src/gen_grammar.pir:16796) called from Sub 'parrot;PGE::OPTable;parse' pc 1959
(compilers/pge/PGE/OPTable.pir:554) called from Sub 
'parrot;Perl6::Grammar;statement' pc 24619
(src/gen_grammar.pir:3146) called from Sub 
'parrot;Perl6::Grammar;statementlist' pc 22764
(src/gen_grammar.pir:2437) called from Sub 
'parrot;Perl6::Grammar;statement_block' pc 20803
(src/gen_grammar.pir:1665)called from Sub 'parrot;Perl6::Grammar;TOP' pc 17136 
(src/gen_grammar.pir:225)
called from Sub 'parrot;PCT::HLLCompiler;parse' pc 585 
(src/PCT/HLLCompiler.pir:371) called from Sub 'parrot;PCT::HLLCompiler;compile' 
pc 438
(src/PCT/HLLCompiler.pir:303) called from Sub 'parrot;PCT::HLLCompiler;eval' pc 
776
(src/PCT/HLLCompiler.pir:473) called from Sub 
'parrot;PCT::HLLCompiler;evalfiles' pc 1078
(src/PCT/HLLCompiler.pir:610) called from Sub 
'parrot;PCT::HLLCompiler;command_line' pc 1257
(src/PCT/HLLCompiler.pir:699) called from Sub 'parrot;Perl6::Compiler;main' pc 
15352 (perl6.pir:172)

Hope this paste is not too long.

Notice : i talked about this error on irc #perl6 and they proposed me to post
the bug here.

Kind regards.
Jean-Yves.

Reply via email to