[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: CSV File parsing
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 19 Jul 2006 21:44:17 -0300
> Is there a way to temporarily change the way the lua interpreter works to
> add the necesary characters to the file as it's read?
> preferably in lua, but C would be ok too.
Sure. Just write an appropriate reader for lua_load.
The first time it's called, it should return
"local t={}"
In subsequent calls, it should return
"t[i]={" plus one line from the input file plus "}"
where i is the input line number.
When the input ends, return "return t".
Ask for more details if you need.
--lhf