in reply to Re: Extending a perl program with Scheme, Lua, or JS
in thread Extending a perl program with Scheme, Lua, or JS

Thanks, Marpa looks nice. I couldn't get the sample program to run, though:

Can't locate object method "parse" via package "Marpa::R2::Scanless::G" at b.pl line 24.

I guess the other disadvantage is that I would then have to design and implement my own language using Marpa. This could be simple for very simple arithmetic operations, but inevitably I can imagine then having to extend it. Probably better to start with someone else's good design and implementation.

Replies are listed 'Best First'.
Re^3: Extending a perl program with Scheme, Lua, or JS
by choroba (Cardinal) on Feb 08, 2019 at 00:44 UTC
    Maybe your version of Marpa is too old? Consult
    perldoc Marpa::R2
    locally instead of the online manual of the latest version.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]