[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: for infinite loop bug
- From: Björn De Meyer <bjorn.demeyer@...>
- Date: Sat, 02 Nov 2002 11:49:02 +0100
Luiz Henrique de Figueiredo wrote:
> >Maybe the luac compiler could do some extra checks that emit these warsings?
> luac uses *exactly* the same parser as the Lua core. This is a good thing (TM).
> Otherwise, we'd have to have two different versions of the parser, even if in
> the same source file, with #ifdefs and such. But it could be done. What might be
> much more difficult is that the parser stops as soon as it finds an error. For
> emitting useful warnings it would have carry on at least after warnings; I'm not
> sure how much more complex this would make the parser.
I see... Hmmm, I'm not in favour of maintaining two different parsers.
Maybe it would be better then to have a separate program that performs
these checks. A bit like 'lint' does for C. But such a thing could be
progammed relatively easy, I think, and why not in Lua itself?
On another note, I would love the function that luac uses
to dump lua functions and data to bytecode to become
a library that can easily be integrated with the lua interpreter.
On the fly compilation in the intepreter would be useful for
AI applications or saving the complete Lua state in an easy way.
I know that it's already possible to incorporate the compiler
in the interpreter, but it is still not straightforward to do so.
Having a "libluac" much like we have a "liblualib" would be
very nice indeed.
"No one knows true heroes, for they speak not of their greatness." --
Björn De Meyer