Skip Menu |
Report information
Id: 122972
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: masak <cmasak [at] gmail.com>
Cc:
AdminCc:

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



From: Carl Mäsak <cmasak [...] gmail.com>
Date: Tue, 14 Oct 2014 10:02:33 +0200
To: rakudobug [...] perl.org
Subject: [BUG] Proto regex with params isn't called correctly (possibly NYI) in Rakudo
Download (untitled) / with headers
text/plain 684b
<timotimo> m: grammar Test { token TOP { <Foo(1)> }; proto token Foo(Int) {*}; token Foo:sym<a>(Int $a) { "a" }; token Foo:sym<b>(Int $a) { "b" } }; say Test.parse("a"); <camelia> rakudo-moar 8b3e8c: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in regex Foo:sym<a> [...] <timotimo> ven++ stumbled upon this * masak submits rakudobug <timotimo> that should work, right? <masak> yes. <pmnexus> It's very likely to be NYI, I think <timotimo> huh <timotimo> aren't we using something like that in rakudo's own grammar all the time? <pmnexus> A proto regex with params? Could be, but it'd be new to me <pmnexus> Also, Rakudo doesn't compile Rakudo's grammar. :-)
Still NYI (2017.11,HEAD(e5b660e))

On 2014-10-14 01:02:45, masak wrote:
Show quoted text
> <timotimo> m: grammar Test { token TOP { <Foo(1)> }; proto token
> Foo(Int) {*}; token Foo:sym<a>(Int $a) { "a" }; token Foo:sym<b>(Int
> $a) { "b" } }; say Test.parse("a");
> <camelia> rakudo-moar 8b3e8c: OUTPUT«Too few positionals passed;
> expected 2 arguments but got 1␤ in regex Foo:sym<a> [...]
> <timotimo> ven++ stumbled upon this
> * masak submits rakudobug
> <timotimo> that should work, right?
> <masak> yes.
> <pmnexus> It's very likely to be NYI, I think
> <timotimo> huh
> <timotimo> aren't we using something like that in rakudo's own grammar
> all the time?
> <pmnexus> A proto regex with params? Could be, but it'd be new to me
> <pmnexus> Also, Rakudo doesn't compile Rakudo's grammar. :-)




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