lua-users home
lua-l archive

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

2016-09-28 6:51 GMT+01:00 Sean Conner <>:
>   You already have a parser available to you---Lua.  If the config file is
> just what you said:
>         a=series
>         of=key
>         value=pairs
> A small change:

You don't need to change the syntax to use the Lua parser for that.
With a metatable on the _ENV, you can have global variable reads
(__index) return the variable name, so that series is the same as
"series". This only works with valid Lua variable names, but that
covers a lot of ground and you can fall back to quotes for the rest.