Skip Menu |
Report information
Id: 128832
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: denis [at] demayl.com
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] Regex subrule problem <print> related
To: rakudobug [...] perl.org
From: <denis [...] demayl.com>
Date: Wed, 03 Aug 2016 16:03:56 -0700
Download (untitled) / with headers
text/plain 2.2k
grammar Test {
    token TOP { (['"'|"'"]) <+print - [s]> ** 1..64 $0 }

};

say Test.parse('"teat"');


Dies with ( --ll-exception ):

Too many positionals passed; expected 1 argument but got 2
   at gen/moar/m-CORE.setting:1324  (/home/demayl/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:print)
 from gen/moar/stage2/QRegex.nqp:1340  (/home/demayl/rakudo/install/share/nqp/lib/QRegex.moarvm:!reduce)
 from gen/moar/stage2/QRegex.nqp:1301  (/home/demayl/rakudo/install/share/nqp/lib/QRegex.moarvm:!cursor_pass)
 from gen/moar/stage2/QRegex.nqp:1785  (/home/demayl/rakudo/install/share/nqp/lib/QRegex.moarvm:print)
 from email.pl6:11  (<ephemeral file>:TOP)
 from gen/moar/m-CORE.setting:26883  (/home/demayl/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:parse)
 from email.pl6:15  (<ephemeral file>:<unit>)
 from email.pl6:1  (<ephemeral file>:<unit-outer>)
 from gen/moar/stage2/NQPHLL.nqp:1508  (/home/demayl/rakudo/install/share/nqp/lib/NQPHLL.moarvm:eval)
 from gen/moar/stage2/NQPHLL.nqp:1711  (/home/demayl/rakudo/install/share/nqp/lib/NQPHLL.moarvm:evalfiles)
 from gen/moar/stage2/NQPHLL.nqp:1605  (/home/demayl/rakudo/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
 from src/Perl6/Compiler.nqp:27  (/home/demayl/rakudo/install/share/nqp/lib/Perl6/Compiler.moarvm:command_eval)
 from gen/moar/stage2/NQPHLL.nqp:1579  (/home/demayl/rakudo/install/share/nqp/lib/NQPHLL.moarvm:command_line)
 from gen/moar/m-main.nqp:37  (/home/demayl/rakudo/install/share/perl6/runtime/perl6.moarvm:MAIN)
 from gen/moar/m-main.nqp:33  (/home/demayl/rakudo/install/share/perl6/runtime/perl6.moarvm:<mainline>)
 from <unknown>:1  (/home/demayl/rakudo/install/share/perl6/runtime/perl6.moarvm:<main>)
 from <unknown>:1  (/home/demayl/rakudo/install/share/perl6/runtime/perl6.moarvm:<entry>)

shell returned 1

It dies with same error when used in form

CODE
grammar Test {
    token TOP{ (['"'|"'"]) [<print><!after "=">] ** 1..64 $0 }
}; 

say Test.parse('"teat"');


VERSION:
This is Rakudo version 2016.07.1-122-g7ec824e built on MoarVM version 2016.07-16-g85b6537
implementing Perl 6.c.

NOTE
Interesting is that when used in normal "regex" it works.
For example
say '"teat"' ~~  / (['"'|"'"]) <+print - [s]> ** 1..64 $0 /


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org