[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Will Lua 6.0 have LPeg?
- From: Richard Hundt <richardhundt@...>
- Date: Tue, 04 Mar 2014 15:08:29 +0100
On 3/4/14 9:00 AM, Dirk Laurie wrote:
> Is LPeg useful enough to justify how very much larger
> Lua's C source code will become if it is included?
>
> IMHO, if the gain will merely be that the ordinary user
> would no longer need to build/download it separately
> (which LuaRocks can do for you) and require it (which
> takes one line of code), the answer is NO.
>
> On the other hand, if the Lua implementation itself exploits
> it for its lexer/parser/VM encoder and its string library,
> thus demonstrating how useful it can be while at the same
> time providing some highly instructive well-written LPeg
> code, the answer is YES!
>
Shameless plug, but you can try it already [1]. It should give you an
idea of how it might be integrated. Feedback welcome.
Nyanga statically links with LPeg, and although the grammar syntax is
very similar to the 're.lua' module, it doesn't pass a string to
're.lua', but produces an LPeg grammar directly using the API.
[1] https://github.com/richardhundt/nyanga#grammars