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


Currently this isn't specced (though moritz has posted a patch to p6l  
for adding it to S05).

Per IRC and pmichaud/TimToady:

http://irclog.perlgeek.de/parrot/2008-05-31#i_322490
http://irclog.perlgeek.de/parrot/2008-05-31#i_322527

The following is an example:

grammar Foo {
    rule TOP {\d+};
};

my $x = '12345';

$x ~~ Foo;     # Is $x a Foo? (No)
$x ~~ Foo.new; # does $x match Foo? (Yes)

In the latest version of Rakudo the first smart match sets $/ base on  
Foo::TOP, and the second smart match fails:

...
too few arguments passed (1) - 3 params expected
current instr.: 'parrot;PGE::Match;new' pc 25 (compilers/pge/PGE/ 
Match.pir:54)
called from Sub '_block11' pc 81 (EVAL_13:34)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806 (src/PCT/ 
HLLCompiler.pir:481)
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 15960 (perl6.pir:172)

chris

Reply via email to