From: Steve Howell <showell@zi...> - 2002-07-29 18:23:01
> Should I start on the YAML library for Squeak now, or is the standard
> still too much in flux?
I recommend starting now. If the standard undergoes major changes at this
point, you will hear a lot of screaming.
You can certainly implement the core ideas of YAML--basic support for hashes and
arrays, aliases, etc.--and expect them to remain pretty stable.
I recommend writing enough of a YAML implementation in Smalltalk to parse out
the files in the TestingSuite, which is now shared by Ruby and Python. The
TestingSuite YAML files deliberately keep the YAML simple, so that new YAML
implementations can get bootstrapped on YAML-driven testing. Once you can parse
those YAML files, you can then add smalltalk tests to the files, one by one.
It's a very self-documenting, rewarding process to add tests to those files.
Even if you decide to go to a libyaml-based implementation, it may be worthwhile
having a small subset of YAML implemented in pure Smalltalk, just to get
bootstrapped more quickly.
> I've looked at the Perl, Python, and Ruby implementations; is there a
> particular advantage to using a compiler-compiler (like the Ruby one
> does), or a recursive descent parser (like the Perl and (I think)
> Python ones do)?
My choice of the hand-parsed approach for the Python implementation was mainly
fear-driven. I didn't think that a compiler-compiler approach would be flexible
enough. The Ruby implementation seems to have proven my fears unjustified.
Nonetheless, I don't think it's too hard to do the parsing by hand, so I would
go with whatever approach you're more comfortable with.
Good luck on the implementation!
Get latest updates about Open Source Projects, Conferences and News.