lua-users home
lua-l archive

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


Nicolas Devillard wrote:

> Internally, we use Lua a lot to help us generate C code, e.g.
> you can store a data structure as a tree of Lua tables and have them
> generate themselves into a static struct which you can #include in your
> library. Very handy, much easier to maintain, and you can completely
> re-organize your data structure without messing the handling C code.

This sounds like a good idea, is it for constant data or variables?  Would
you offer any more details, such as an example structure in Lua and the
resulting C code?

Thanks,
-John