parser_ttl.h 737 B

12345678910111213141516171819202122232425
  1. #ifndef _LSUP_TTL_PARSER_H
  2. #define _LSUP_TTL_PARSER_H
  3. #include "codec.h"
  4. /** @brief Parse a N-Triples document from a file handle.
  5. *
  6. * @param[in] doc N-Triples document.
  7. *
  8. * @param[out] gr Pointer to a graph handle to be created. The new graph will
  9. * have a random UUID URN.
  10. *
  11. * @param[out] ct If not NULL it is populated with the number of triples
  12. * parsed. This may be more than the triples in the resulting graph.
  13. *
  14. * @param[out] err String handle to be populated with an error message.
  15. *
  16. * @return LSUP_OK on success, LSUP_VALUE_ERR if a parsing error was
  17. * encountered. On error, `err` will contain the error message.
  18. */
  19. LSUP_rc
  20. LSUP_ttl_parse_doc (FILE *stream, LSUP_Graph **gr, size_t *ct, char **err);
  21. #endif