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.

Tue, 12 Jun 2012


Announcing Marpa::R2

What is Marpa?

I am very pleased to announce Marpa::R2 -- "Release 2" of the Marpa parser. For those unfamiliar, the Marpa algorithm 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, it parses it in linear time. Marpa::R2's parse engine is written in optimized C, so that Marpa::R2's speed is competitive with parsers of far less power.

An important feature of the Marpa algorithm is "situational awareness". Marpa knows at every point in the parse exactly how far it has progressed in each rule, and can share this information with the application. The advantages of this go beyond error detection -- Marpa's situational awareness is accurate, graceful and fast enough to be used as a parsing technique in its own right -- Ruby Slippers parsing.

Announcing Marpa::R2

Marpa::R2 2.006000 is alpha, and its interface is not yet frozen. Those who want a stable version of Marpa should prefer Marpa::XS. But Marpa::R2 does pass the same test suite as Marpa::XS, and at least one module has already successfully converted to Marpa::R2.

Marpa::R2 is heavily refactored internally. I expect more benefits of this refactoring to come over the next weeks, in the form of new features. Here are the new features available in this first announced release of Marpa::R2:

Users migrating from Marpa::XS should be aware that, while Marpa::R2's interface is similar to Marpa::XS's, it is not fully compatible. The list of incompatible changes can be found in the Marpa::R2 documentation.


posted at: 18:04 | direct link to this entry

§         §         §