I am using the latest version of marpa :: r2 (Marpa-R2-2.065_002) and it seems to eat up all the memory very quickly. I wrote a script below to test it.
use strict; use warnings FATAL => 'all'; use Marpa::R2; use Data::Dumper; my $grammar = Marpa::R2::Scanless::G->new({ action_object => __PACKAGE__, source => \(<<'END_OF_SOURCE'), :default ::= action => ::array :start ::= path path ::= step action => _do_step step ~ [az]+ END_OF_SOURCE }); sub _do_step{ return {step => $_[1]}}; sub new {}
What can I do to prevent memory leak?
Edit: this is now reported as an rt.cpan error.
Edit: It is now fixed in Marpa-R2 2.066000 release. Thanks
memory-leaks perl parsing marpa
jvverde
source share