id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc
104,support for pushing data to the parser,daveb@…,xi,"It would be great if there was a small extension to the libyaml api.  Basically, I want to feed data to a yaml parser incrementally so i can implement a non-blocking single-threaded server.  The ideal would be if i could write (effectively):

   void handle_data_available (yaml_parser_t *parser,
                               size_t         len,
                               const uint8_t *data)
   {
      if (!yaml_parser_push_data (parser, len, data))
        handle_error ();
      while ((parse_rv=yaml_parser_load (parser, &document)) > 0)
        {
          handle_document ();
          yaml_document_free (&document);
        }
      if (parse_rv == 0)
        handle_parse_error ();
      else if (parse_rv == -1)
        { /* need to push more data: nothing to do */ }
    }

In general, most of the current API would take on a third possible return-value, -1, if there is no input stream and there is not enough data to continue.

But of course, there are numerous other implementation possibilities.  If this design seems ok i can probably contribute a patch.",defect,new,normal,pyyaml,normal,,,
