[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is there any sample code or library for using lua as a data parser?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 26 Mar 2014 02:56:50 -0300
> I'd like to use lua as a configure file in a C program.
I'm probably missing something but you can just write your configuration
in Lua and load it in C using the C API, with say luaL_dofile. In the
simplest case, the configuration file will just define some global
variables in Lua which can get read in C with lua_getglobal.