On 2/23/20 7:29 AM, Matt Wette wrote:
On 2/21/20 8:12 PM, Aleix Conchillo Flaqué wrote:
Hi,
does anyone know if there's any YAML parser for Guile? Haven't been
able to
find any.
Thanks!
Aleix
Hi Aleix,
I don't know of a YAML parser for Guile, but if you look at my email
posted 2/22 I have
a Guile package called NYACC. This includes a "FFI Helper" that can
generate the Guile
FFI code based on yaml.h from libyaml. The API is going to be C-like
but if you do some
work to paste something on the front you will have something, I think.
Below I have a demo program and the yaml.ffi file used to generate
yaml.scm.
When executed, the demo program outputs the following:
$ guile demo1.scm
#<yaml_node_t* 0x56353bc4af80>
YAML_MAPPING_NODE
I am working on this a bit more. This requires some second order
programming
(e.g., pointers used as vectors) so don't kill yourself. I'm looking
into it more.
Matt