I'm attaching a patch that allows for formatting output as YAML. It
includes a new NSE library, yaml, that is a slightly modified copy of
the libyaml binding from yaml.luaforge.net (properly attributed). The
second diff (luayaml.diff) shows the modifications I made to it.
As it currently stands, I'm dynamically linking against libyaml, and
using systemwide headers for it, which I know is not the way we'll
want to go, but it was easiest to start. I haven't worked with
autoconfig before, so I didn't know how to package the library with
Nmap. It's pretty stable (0.1.3 was released August 2009), and not too
big, so it wouldn't be tough to include it. If you want to test, the
libyaml-0-2 and libyaml-dev packages for Ubuntu were sufficient to
build and run my patched version.