Home

Awesome

LPegLJ v1.0

LPeg Parser in pure LuaJIT
(straight Lua + FFI translation of LPeg C code)
based on LPeg v1.0 - PEG pattern matching for Lua
Lua.org & PUC-Rio written by Roberto Ierusalimschy
http://www.inf.puc-rio.br/~roberto/lpeg/

left recursion support is based on Sérgio Medeiros algorithm http://arxiv.org/abs/1207.0443

Usage:

local lpeglj = require"lpeglj"  
local pattern = lpeglj.P("a") 
-- then:
lpeglj.match(pattern, "a") 
-- or, equivalently:  
pattern:match("a")  

Compatibility:

Differences from LPeg v1.0:

Description in doc/USAGE.md