[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] lyaml 4 released
- From: Gary Vaughan <gary@...>
- Date: Wed, 11 Sep 2013 13:11:27 +0700
libYAML binding for Lua
I am happy to announce the release of lyaml release 4, a complete
ground up rewrite!
lyaml's home page is at http://github.com/gvvaughan/lyaml
The main purpose of this release is to rewrite the libYAML binding
much closer to the library's C API, which gives the flexibility to
write custom parsers and emitters in Lua, which in turn provides a
means to track any event metadata during load (such as line numbers
for error messages), which was not possible with the previous high
level load/dump API provided by the Andrew Danforth binding used
by previous releases.
The old APIs are broadly supported by example Lua `dump` and `load`
implementations in this release, which can be copied and tweaked to
create your own customised YAML processing.
* Noteworthy changes in release 4 (2013-09-11) [beta]
** New Features:
- New yaml.emitter API returns an object with an emit method for
adding events using yaml_*_event_initialize() calls.
- New yaml.parser API returns a Lua iterator that fetches the next
event using yaml_parser_parse().
- New yaml.scanner API returns a Lua iterator that fetches the next
token using yaml_parser_scan().
- Beginnings of Specl specs, starting with a reasonably comprehensive
specifications for the new APIs above.
- C implementation of lyaml.dump has moved to Lua implementation as
yaml.dump.
- C implementation of lyaml.load has moved to Lua implementation as
yaml.load.
- The new Lua implementation of lyaml.load () handles multi-document
streams, and returns a table of documents when the new second
argument is `true`.
Install it with LuaRocks, using:
luarocks install lyaml-4
Until the rocks are available from the official repository in a few days,
you can install directly from the lyaml release branch, with:
$ luarocks install \
http://raw.github.com/gvvaughan/lyaml/release-v4/lyaml-4-1.rockspec