indeyets / syck

swift yaml for ruby, python, perl, etc.

This URL has Read+Write access

syck /
name age message
file CHANGELOG Wed Sep 30 10:29:11 -0700 2009 bump version [indeyets]
file COPYING Wed May 14 12:52:13 -0700 2003 * lib/syck.c: memory leak in parser level domai... [_why]
file Makefile.am Wed Feb 26 22:33:04 -0800 2003 Build, test environment improved. [_why]
file README Wed Sep 30 10:29:11 -0700 2009 bump version [indeyets]
file README.BYTECODE Sun Oct 12 18:54:00 -0700 2003 - lib/implicit.re: Using the 'tag' URI rather t... [_why]
file README.EXT Wed May 18 21:51:31 -0700 2005 ext/ruby/ext/syck/rubyext.c: - const_find, now ... [_why]
file RELEASE Wed Sep 30 10:29:11 -0700 2009 bump version [indeyets]
file TODO Wed Sep 30 10:29:11 -0700 2009 bump version [indeyets]
file bootstrap Fri Aug 21 08:32:12 -0700 2009 bootstrap should be executable [indeyets]
directory config/ Mon Mar 17 06:15:21 -0800 2003 Config dir. Automake errors suppressed. [_why]
file configure.in Wed Sep 30 10:29:11 -0700 2009 bump version [indeyets]
directory ext/ Mon Nov 23 07:13:15 -0800 2009 win32 support (thanks to Stas Malyshev) [indeyets]
directory lib/ Wed Sep 30 10:29:11 -0700 2009 bump version [indeyets]
directory tests/ Sun Apr 27 11:16:45 -0700 2008 moved check to erb file and regenerated test [indeyets]
README
 

                             . syck .

                         [ version 0.70 ]





INSTALLATION

   ./configure
   make
   make check
   sudo make install

If the unit tests don't pass, notify me immediately.  This distribution
is tested on FreeBSD and Linux.  I don't release it unless the tests
pass on those machines.  If tests aren't passing, then that's a problem.

ABOUT

Syck is the Scripters' YAML Cobble-Yourself-a-Parser Kit.  I don't
much care if the acronym works, as long as the library does!

The whole point of Syck is to make parsing and emitting YAML very
simple for scripting languages through C bindings.  It doesn't strive
to be a pull parser or very extendible.  It just is concerned with
loading a YAML document into a C structure which can be easily 
translated into a scripting language's internal native data type.

RUBY INSTALLATION

You don't need to `make install', but please configure and make libsyck
as outlined above.

   cd ext/ruby
   ruby install.rb config
   ruby install.rb setup
   sudo ruby install.rb install

Syck works best with Ruby.  Ruby's symbol table is leveraged, as well
as Ruby's VALUE system.  (You can read more about that below.)

Syck is now included with Ruby (beginning with Ruby 1.8.0.)  Please
voice your support for Syck/YAML in Ruby distributions on the various
platforms.

PYTHON INSTALLATION

You'll need to `make install' as described above.

   cd ext/python/
   python setup.py build
   sudo python setup.py install

PHP INSTALLATION

You'll need to `make install' as described above.

   ln -s lib include    # or cp -r lib include
   cd ext/php/
   phpize
   ./configure --with-syck=../..
   make
   sudo make install

HOW SYCK IS SO GREAT

For example, in Ruby everything evaluates to a VALUE.  I merely
supply a handler to Syck that will take a SyckNode and transform
it into a Ruby VALUE.

A simple Ruby YAML::load could be built like so:

  static VALUE
  YAML_load( VALUE str )
  {
    SyckParser* parser;
    parser = syck_new_parser();
    syck_parser_handler( parser, YAML_handler );
    return syck_parse( parser, str );
  }

  static VALUE
  YAML_handler( SyckNode* node )
  {
    switch( node->kind )
    {
      case SYCK_MAP:
        VALUE key;
        VALUE h = rb_hash_new();
        for ( key = node->content[0]; key != null; key++ )
        {
          rb_hash_set( h, key, key++ );
        }
        return h;
      break;
    }
  }

For most C developers, it should be a no-brainer to bring
basic YAML serialization to PHP, Tcl, Cocoa, etc.

Instructions for using Syck's API are available in the
README.EXT in this very same directory.