On Mon, 23 Jan 2017 01:02:07 -0800, alex.jakime...@gmail.com wrote: > Code: > grammar A { token TOP { <so> }; token so { foo } }; say A.parse('foo') > > Result: > Too many positionals passed; expected 1 argument but got 2 > in any !reduce at /tmp/whateverable/rakudo- > moar/58226059b53853134de0f265b6f46a923d2004e7/share/nqp/lib/QRegex.moarvm > line 1 > in any !cursor_pass at /tmp/whateverable/rakudo- > moar/58226059b53853134de0f265b6f46a923d2004e7/share/nqp/lib/QRegex.moarvm > line 1 > in regex so at /tmp/1zrz_lKZXc line 1 > in regex TOP at /tmp/1zrz_lKZXc line 1 > in block <unit> at /tmp/1zrz_lKZXc line 1 > > > > Code: > grammar A { token TOP { <kuso> }; token kuso { foo } }; say > A.parse('foo') > > Result: > 「foo」 > kuso => 「foo」
This is a dupe of RT#127945. Tokens with names of Mu methods invoke those on the default Actions class. The workaround is to override those in your own Actions class.