develooper Front page | perl.perl6.compiler | Postings from February 2012

[perl #69760] [BUG] LTA error when post-declaring a grammar

Thread Previous
From:
Will Coleda via RT
Date:
February 12, 2012 18:57
Subject:
[perl #69760] [BUG] LTA error when post-declaring a grammar
Message ID:
rt-3.6.HEAD-14510-1329101835-1577.69760-15-0@perl.org
On Tue Jul 27 19:56:05 2010, coke wrote:
> On Wed Oct 14 04:38:25 2009, carlin wrote:
> > [00:19]	<carlin>	rakudo: class Foo { method bar { Quux.parse('OH
> > HAI'); } }; grammar Quux { rule TOP { .* } }; Foo.bar;
> > [00:19]	<p6eval>	-rakudo 54cfe4: OUTPUT«invoke() not implemented in
> > class 'Capture'␤in Main (file src/gen_setting.pm, line 206)␤»
> >
> > [00:20]	<moritz_>	+that's a less-than-awesome error message, but
> > you're not allowed to use Quux until it's declared
> > [00:21]	<carlin>	Yeah, I thought that was the problem but the error
> > didn't help much
> > [00:22]	<moritz_>	+carlin: feel free to ticket it
> >
> > [00:23]	<moritz_>	+std: class Foo { method bar { Quux.parse('OH
> HAI');
> > } }; grammar Quux { rule TOP { .* } }; Foo.bar;
> > [00:23]	<p6eval>	-std 28789: OUTPUT«Illegally post-declared type:␤
> > Quux used at line 1␤ok 00:02 109m␤»
> >
> > --
> > Carlin
> 
> Error message seems much more helpful now, but is still not "STD-
> compliant".
> 
> 22:54 < [Coke]> rakudo: class Foo { method bar { Quux.parse('OH HAI');
> } };
>                 grammar Quux { rule TOP { .* } }; Foo.bar;
> 22:55 <+p6eval> rakudo 2808a5: OUTPUT«Could not find sub &Quux␤  in
> 'Foo::bar'
>                 at line 22:/tmp/bZA2BcFVXe␤  in main program body at
> line
>                 22:/tmp/bZA2BcFVXe␤»
> 

Changed again:

21:55 < [Coke]> rakudo: class Foo { method bar { Quux.parse('OH HAI'); } };
                grammar Quux { rule TOP { .* } }; Foo.bar;
21:55 <+p6eval> rakudo 29f5cf: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined
                routine '&Quux' called (line 1)␤»
21:56 < [Coke]> std: class Foo { method bar { Quux.parse('OH HAI'); } }; 
                grammar Quux { rule TOP { .* } }; Foo.bar;
21:56 <+p6eval> std 52f3895: OUTPUT«===SORRY!===␤Illegally post-declared type:␤ 
                'Quux' used at line 1␤Check failed␤FAILED 00:01 111m␤»

-- 
Will "Coke" Coleda

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About