I've tried to give this a generic title to help future searchers, but concretely I am trying to parse YAML data. Import doesn't seem to support it natively and I can't find any code for it online, so I thought the easiest approach would be to wrap a C library (libyaml).
I haven't used the WSTP stuff yet, but the documentation looks pretty good at least for the easy cases, I was wondering if someone give give some tips though on
- How to either populate an Association from C or barring that at least populate a list of rules?
- How to deal with a "streaming" (e.g., SAX like) API? (See http://pyyaml.org/wiki/LibYAML#ParserAPISynopsis for a clean example).
Association[Rule["foo", 1], Rule["bar", 2]]. There's nothing special about associations compared to other expressions when sending them through MathLink. Can you explain about streaming APIs to those of us who are not familiar with this concept? What difficulty do you expect and why? – Szabolcs Sep 27 '16 at 10:41