[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: poll on luac
- From: Luiz Henrique de Figueiredo <lhf@<a href="/cgi-bin/echo.cgi?tecgraf.puc-rio.br">...</a>>
- Date: Fri, 3 Jun 2005 16:33:18 -0300
> I'm shifting my position. I no longer care about byte-order independent code.
Thanks. I'm really leaning towards a simple and fast dump/undump pair for
the Lua core.
I'm convinced that the best route to byte order or cross-compiling is
third-party dump/undump pairs. The files ldump.c and lundump.c are
completely replaceable; they export a single, well-defined, entry point.
The format of precompiled chunks is not sacred at all; you can use any
format, as long as ldump.c and lundump.c agree about it. (For instance,
Rici Lake is considering writing a text format for precompiled chunks.)
For the Lua core, I prefer a simple and fast one. For cross-compiling,
it should be simple to change ldump.c for instance. We just have to wait
till someone writes it and makes it available.
> I would however like a parser that took Lua sources and built
> Lua-based syntax trees out of them.
Ah, that's an old dream. My main problem with this is that it'll have to
be a different parser from the Lua core. I don't think lparser.c is easy
to reuse. That is a shame, because having another parser opens the door to
inconsistencies. (At least, the lexer is easy to reuse, which goes helps