Marpa Power (or About Parsing The C Language)
MARPA OVERVIEW
- Presentation
Quoting the Marpa's author blog:
- Marpa is an Earley's parser, in that it works by creating lists of possibilities at each token.
- Marpa handles right-recursion using Joop Leo's method. This makes it O(n) for every class of grammar in practical use today.
- Marpa handles nullables using the ideas of Aycock&Horspool 2002. As a side effect, this opens the way to further improvements in the Earley parse engine.
- The Marpa algorithm allows the application to be fully aware, at all times, of what is going on in the parse. Obviously, this benefits error-handling. More importantly, it opens the road to powerful new parsing strategies.
- BNF syntax
- The Scanless interface
USE CASE: THE C LANGUAGE
- Grammar ambiguities
- Grammar constraints
IMPLEMENTATION
NEXT
SEE ALSO