[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: functioncall vs varlist ambiguity
- From: Peter Cawley <lua@...>
- Date: Sun, 25 Jul 2010 11:18:04 +0100
On Sun, Jul 25, 2010 at 1:13 AM, David Manura <dm.lua@math2.org> wrote:
> Perhaps the one that gets furthest along in the token
> stream would be ideal, but a difficulty is that Lua currently doesn't
> include column numbers in parser error messages (which at times I've
> thought it should--like it would be of some use to me in LuaInspect).
For this particular case, perhaps you could use a custom lua_Reader
which feeds in the chunk one byte at a time, and keeps track of how
many bytes have been requested. For large inputs, this might be
inefficient, but a combination of feeding one byte at a time and
binary search should fix that.