Ocean of Awareness

Jeffrey Kegler's blog about Marpa, his new parsing algorithm, and other topics of interest

Jeffrey's personal website

Google+

Marpa resources

The Marpa website

The Ocean of Awareness blog: home page, chronological index, and annotated index.

Sun, 08 Jul 2012


Two new interfaces to Marpa

"You get to create your own world, and the only thing that limits what you can do are the capabilities of the machine -- and, more and more often they days, your own abiliites" Linus Torvalds, Just For Fun, p. 74

As of Marpa::R2 2.010000, Marpa has two new, documented, interfaces. (For those new to this blog, Marpa is something new in parsing -- it parses anything you can write in BNF and, if your grammar is in one of the classes currently in practical use, parses it in linear time. Marpa's parse engine is written in optimized C, so that Marpa's speed is competitive with parsers of far less power. Marpa's stable version is Marpa::XS.)

Announcing Marpa's C library: Libmarpa

The first new interface is Libmarpa, a C language library. Previously, Marpa's only documented interfaces required the programmer to use it through Perl. Using Marpa through Perl had major advantages -- it gave the programmer convenient access not just to Perl's capabiliites, but to all of CPAN as well.

But there were downsides.

With Libmarpa, the programmer has access to the full speed and flexibility of Marpa's optimized C code.

Announcing Marpa's "thin" interface: Marpa::R2::Thin

Together with Libmarpa, I am announcing a "thin" Perl interface to it. The "thin" interface is a raw interface to Libmarpa. It's a compromise between the "thick" Marpa::R2 and Marpa::XS interfaces, and having to program in C. The thin interface will be of interest to

The documentation

If you are new to Marpa, you do NOT want to head straight to the Libmarpa and Marpa::R2::Thin documentation. Instead, I suggest that you look at the Marpa::R2 documentation, or the Marpa web page. The Libmarpa API document is a reference manual, which assumes that the user is already familiar with Marpa, either through Marpa::R2, Marpa::XS or Marpa's theory paper. Reading the Marpa::R2::Thin document, in its turn, requires continual reference back to the Libmarpa API document.

posted at: 17:31 | direct link to this entry

§         §         §