Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua implementation (pure Lua, minimal dependencies) #145

Open
swift2plunder opened this issue Sep 13, 2021 · 3 comments
Open

Lua implementation (pure Lua, minimal dependencies) #145

swift2plunder opened this issue Sep 13, 2021 · 3 comments

Comments

@swift2plunder
Copy link
Contributor

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

@zkat
Copy link
Member

zkat commented Sep 13, 2021

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

@swift2plunder
Copy link
Contributor Author

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

@mna
Copy link

mna commented Jul 17, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants