An out-of-box Lua parser written in Lark
Such parser handles a relaxed version of Lua 5.3 grammar. This is a Python-Lark implementation of Lua 5.3 parser. It has the following features: the grammar is compatible to LALR(1)/LR(1)/ALL(*) the generated parser creates declarative and typed Python dataclasses instead of error-prone CSTs — that’s why we call it “out-of-box”. Fable.Sedlex, which is an F# port of OCaml sedlex project and transpiled into Python, is used in this parser to achieve high-quality lexer that avoids unnecessary collisions of lexical rules. […]
Read more