[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.2 - How do I resume an interrupted parse?
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Wed, 1 Feb 2012 16:36:04 +0100
On Mon, Jan 30, 2012 at 01:00, <StephenSimpson@eaton.com> wrote:
> Typical telnet daemons are terminal centric, ie. the daemon responds to
> data "committed" by a user hitting <Enter>.
> I want the daemon to handle this traditional line-by-line input,
> AND big but potentially syntactically incomplete blocks from eg. a pipe
> directed to a ptty.
> Is it possible to drive the Lua API so that a parse can be "put on ice"
> while waiting for the arrival of new data from the comms stack.
> Is there some "approved" way of detecting the "incomplete source" syntax
> error AND storing the mid-parse Lua state so that I can simply resume
> once more data arrives???
You may want to have a look at how the standalone interpreter does it.