Recognizer interface change in R2?

12 views
Skip to first unread message

Thomas Weigert

unread,
Oct 23, 2018, 9:54:48 PM10/23/18
to marpa parser
Per the Docu, the recognizer setting "rejection" can be used by any recognizer setting-aware method, and "new" is one of them, I understand.

However, the following fails:

  DB<6> Marpa::R2::Scanless::R->new({ grammar => $grammar, rejection => 'event' });
Bad named argument(s) to $slr->new() method: rejection
Marpa::R2 exception at (eval 148)[/usr/share/perl/5.26/perl5db.pl:738] line 2.

This used to work a year ago. Did anything change about these options that is not discussed in the docu?

I am on Ubuntu 17.10.

Thomas Weigert

unread,
Oct 23, 2018, 10:00:20 PM10/23/18
to marpa parser
My installation is at:

libmarpa-r2-perl is already the newest version (2.086000~dfsg-6build2).

Jeffrey Kegler

unread,
Oct 23, 2018, 10:14:27 PM10/23/18
to Marpa Parser Mailing LIst
Looks like you're running 2.086.000 which is really old, 2014-06-01.  The current stable in 4.000.000 (March 2017).

--
You received this message because you are subscribed to the Google Groups "marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marpa-parser...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Weigert

unread,
Oct 23, 2018, 10:29:40 PM10/23/18
to marpa parser
Thanks. Does that mean installing from the ubuntu repos is not the recommended way of installing Marpa?

As you can see from the message, it claims it is the current latest version.

Jeffrey Kegler

unread,
Oct 23, 2018, 10:39:14 PM10/23/18
to Marpa Parser Mailing LIst
Based on this, I couldn't recommend it. :-)

The usual method is installation from CPAN, and it's the only one I use.  Anyone out there who does anything else?

Looks like Ubuntu gets its Marpa::R2 from Debian, which is still at 2.086000.  It's a common problem with the Debian perl packages that they are quite old.

Thomas Weigert

unread,
Oct 23, 2018, 11:05:16 PM10/23/18
to marpa parser
I confirm that this problem does not occur in 4.000.000.

I installed via CPAN and got the latest there.

Thanks for the help. I must have used the CPAN version in the past and then switched to the debian library for convenience. Who would have thought these are so far out of date?
Reply all
Reply to author
Forward
0 new messages