kdl icon indicating copy to clipboard operation
kdl copied to clipboard

Lua implementation (pure Lua, minimal dependencies)

Open swift2plunder opened this issue 3 years ago • 3 comments

Lua tends to get multiple protocol implementations due to the variety of niches that language serves. I'm writing a pure Lua implementation with no dependencies or minimal Lua-only dependencies. The current namespace is "kdl" with the name "KDL Documents in Lua. The current code is one file, "kdl.lua", with interfaces described as reader and writer. The reader accepts KDL passed as a UTF-8 string and emits a lua table, while the writer accepts a table and emits a string. Accepting a file handle and other types is TODO after the parser and encoder are complete. At this point, I'm still open to suggestions for how to handle types that don't have a direct representation in KDL, e.g. functions, and for handling cycles

A C implementation and Lua wrappers for such, as well as an L-PEG implementation would also be of value to the Lua community

I plan to release this with the MIT-X11 license for compatibility with other Lua infrastructure code

swift2plunder avatar Sep 13 '21 02:09 swift2plunder

that sounds great to me! Let me know if you have any questions!

zkat avatar Sep 13 '21 03:09 zkat

I'm really excited to see the C implementations coming. I'm looking a FreeKDL and considering making wrappers and/or changing my interfaces so that the wrapper and the pure Lua implementation will be interchangeable

swift2plunder avatar Sep 28 '21 07:09 swift2plunder

Is there a link to that lua implementation? I might be interested in using this. Thanks!

mna avatar Jul 17 '22 16:07 mna