[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lpeg coroutine?
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Sat, 18 Apr 2015 13:57:18 +0200
On Thu, Apr 16, 2015 at 6:57 PM, Paul K <firstname.lastname@example.org> wrote:
> My idea was to yield from a capture function, which (obviously) didn't
> work because of the "attempt to yield across C-call boundary" error
> (same in Lua 5.2, I haven't tried Lua 5.3). LPegLJ solves this problem
> by being pure-Lua and I haven't tried Coco (http://coco.luajit.org/)
> since it's Lua 5.1 only as far as I understand.
You could yield from a LuLPeg capture (LPeg rewritten in Lua), but it
won't help with streams because the subject is bound when `match` is
called, and it can't be updated afterwards.