[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Linking LPeg
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Tue, 19 May 2015 21:35:35 +0200
On Tue, May 19, 2015 at 9:07 PM, Александр Машин <alex.mashin@gmail.com> wrote:
> Good time of day,
>
> I am trying to link LPeg library to a very restrictive Lua environment
> (which is luasandbox Lua engine for PHP written in C++,
> https://github.com/wikimedia/mediawiki-php-luasandbox), which, in
> particular, reloads require () function.
I'm not familiar with the MediaWiki sandbox, but did you give LuLPeg a
try? It is a pure Lua implementation.
https://github.com/pygy/lulpeg/
If the sandbox is based on Lua 5.1 and disables `newproxy()`, you'll have to use
LuLPeg.L(LuLPeg.P(...))
rather than
#LuLPeg.P(...)
Otherwise, it is compatible, but slower.
—Pierre-Yves