lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Your suggestion is very appealing.. but I suspect it will fly like a lead-balloon around these parts.
I'd probably get comments something like  "Must be able to handle any and all Lua source"... if I raised it..

Anyway, thanks heaps for the suggestion &-)

> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
> Behalf Of Pierre-Yves Gérardy
> Sent: Friday, 3 February 2012 8:32 p.m.
> To: Lua mailing list
> Subject: Re: Lua 5.2 - How do I resume an interrupted parse?
> 
> Now that I think of it there may be a non-invasive method to achieve what
> you want, but it would require some discipline at the code emitting side.
> 
> Your reader could use an approach similar to the one found in the REPL, but
> using semi-columns as a trigger instead of line ends. If you insert semi-
> columns after each top-level statement, you'll get what you want.
> 
> If you want to avoid failed parsing attempts based on semi-columns inserted
> in other places, you could use a group of semi-columns instead... Or a pattern
> less likely to be found accidentally in code, like ";;--;;\n".
> 
> -- Pierre-Yves