I'm transmitting events in YAML format. This is done by sending events
as documents over a single connection.
The documents are received using yaml_parser_load(). However, I can't
ensure that all documents are always "well formed" (for example due to
Once a parser error has occured, how can I get the parser back to a
working state, where it is ready to accept another document?
I thought about calling yaml_parser_scan() until a
YAML_DOCUMENT_END_TOKEN is received, but the documenation explicitly
> An application must not alternate the calls of yaml_parser_parse()
> with the calls of yaml_parser_scan() or yaml_parser_load(). Doing
> this will break the parser.
Now I'm wondering if this rule can be broken for error recovery, as I
don't want to work at the event-reception level.