lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


We in the Marpa community are very advanced in creating an independent utility for parsing and producing an AST from Lua.  It's a spin-off of Kollos, our next version of Marpa.  Kollos will provide Marpa, which now runs in a Perl framework, with its own lighter weight semantics, and we are adopting Lua for this purpose.

Marpa is an Earley parser incorporating modern improvements -- for example it uses Joop Leo's 1991 technique for parsing all LR(k) grammars, as well as all LR-regular grammars, in O(n) time.

To find out more about there's its official web site as well as my own web site on Marpa.

Marpa is a general BNF parser -- you get exactly the language you specify in the BNF, and a syntax-driven approach to Lua has already produced one insight.  Exponentiation has different left- and right-precedence.  Lua exponentiation is, as the documentation says, tighter than unary minus to its left, but Lua exponentiation has looser precedence than unary minus to its right.

Marpa's Perl incarnation is stable and in widespread use.  We are very excited about what Lua can add to Marpa, and we hope we can contribute in return.

Jeffrey Kegler, the Marpa "Idiosyncrat"

From Dibyendu Majumdar

It is my hope that one day I will have new (alternative) parser /
compiler infrastructure for Lua that generates ASTs and allows all
kinds of tooling & optimizations. Lua's existing parser is designed
for speed and memory efficiency - so it is harder to extend it. In
fact I have not yet seen an independently implemented parser / byte
code generator for Lua