Volksdata 1.0b7
RDF library
Loading...
Searching...
No Matches
parser_ttl.c File Reference
Include dependency graph for parser_ttl.c:

Go to the source code of this file.

Data Structures

struct  ParseIterator
struct  ParserToken

Macros

#define _VOLK_PARSER_COMMON_H
#define YYCTYPE   uint8_t
 TTL is UTF-8 encoded.
#define YYCURSOR   it->cur
#define YYMARKER   it->mar
#define YYLIMIT   it->lim
#define YYFILL   fill(it) == 0

Functions

void * TTLParseAlloc ()
void TTLParse ()
void TTLParseFree ()
VOLK_rc VOLK_ttl_parse_doc (FILE *fh, const char *sh, VOLK_Graph **gr_p, size_t *ct, char **err_p)
 Parse an RDF document in Turtle format.

Macro Definition Documentation

◆ _VOLK_PARSER_COMMON_H

#define _VOLK_PARSER_COMMON_H

Definition at line 8 of file parser_ttl.c.

◆ YYCTYPE

#define YYCTYPE   uint8_t

TTL is UTF-8 encoded.

See also
https://www.w3.org/TeamSubmission/turtle/#sec-grammar

char should be considered to be UTF-8 throughout this library, however, setting YYCTYPE to char generates case labels outside of the char range.

Definition at line 20 of file parser_ttl.c.

◆ YYCURSOR

#define YYCURSOR   it->cur

Definition at line 21 of file parser_ttl.c.

◆ YYMARKER

#define YYMARKER   it->mar

Definition at line 22 of file parser_ttl.c.

◆ YYLIMIT

#define YYLIMIT   it->lim

Definition at line 23 of file parser_ttl.c.

◆ YYFILL

#define YYFILL   fill(it) == 0

Definition at line 24 of file parser_ttl.c.

Function Documentation

◆ TTLParseAlloc()

void * TTLParseAlloc ( )

◆ TTLParse()

void TTLParse ( )

◆ TTLParseFree()

void TTLParseFree ( )

◆ VOLK_ttl_parse_doc()

VOLK_rc VOLK_ttl_parse_doc ( FILE * fh,
const char * sh,
VOLK_Graph ** gr,
size_t * ct,
char ** err )

Parse an RDF document in Turtle format.

Either an open file handle or an in-memory string can be passed for parsing.

Parameters
[in]fhTurtle doc file handle. Exclusive with sh.
[in]shTurtle doc string handle. Exclusive with fh.
[out]grPointer to a graph handle to be created. The new graph will have a random UUID URN.
[out]ctIf not NULL it is populated with the number of triples parsed. This may be more than the triples in the resulting graph.
[out]errString handle to be populated with an error message.
Returns
VOLK_OK on success, VOLK_VALUE_ERR if a parsing error was encountered. On error, err will contain the error message.

Definition at line 4356 of file parser_ttl.c.