guile-user
[Top][All Lists]
Advanced

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

Re: YAML parser?


From: Matt Wette
Subject: Re: YAML parser?
Date: Mon, 24 Feb 2020 06:35:39 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1



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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]