Re: Is there any sample code or library for using lua as a data parser?
[
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: 2014年3月26日 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.