Volksdata 1.0b7
RDF library
Loading...
Searching...
No Matches
parser_trig.c File Reference
Include dependency graph for parser_trig.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 YYFILL   fill(it) == 0
#define YYLIMIT   it->lim
#define YYMARKER   it->mar

Functions

void TrigParse ()
void * TrigParseAlloc ()
void TrigParseFree ()
VOLK_rc VOLK_trig_parse_doc (FILE *fh, const char *sh, VOLK_Store *store, void *txn, size_t *ct, char **err_p)
 Parse an RDF document in TriG format.

Macro Definition Documentation

◆ VOLK_PARSER_COMMON_H

#define VOLK_PARSER_COMMON_H

Definition at line 13 of file parser_trig.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 25 of file parser_trig.c.

◆ YYCURSOR

#define YYCURSOR   it->cur

Definition at line 26 of file parser_trig.c.

◆ YYFILL

#define YYFILL   fill(it) == 0

Definition at line 29 of file parser_trig.c.

◆ YYLIMIT

#define YYLIMIT   it->lim

Definition at line 28 of file parser_trig.c.

◆ YYMARKER

#define YYMARKER   it->mar

Definition at line 27 of file parser_trig.c.

Function Documentation

◆ TrigParse()

void TrigParse ( )

◆ TrigParseAlloc()

void * TrigParseAlloc ( )

◆ TrigParseFree()

void TrigParseFree ( )

◆ VOLK_trig_parse_doc()

VOLK_rc VOLK_trig_parse_doc ( FILE * fh,
const char * sh,
VOLK_Store * store,
void * txn,
size_t * ct,
char ** err )

Parse an RDF document in TriG format.

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

Parameters
[in]fhInput file handle. Mutually exclusive with sh.
[in]shInput string handle. Mutually exclusive with fh.
[in]Backend store moduleStore handle to be populated. The store MUST be initialized and MAY be not empty.
[in]txnTransaction to wrap the operation in. If not NULL, the caller is responsible for committing or aborting the passed transaction. Otherwise, the function will begin and commit (or abort on error) a new transaction.
[out]ctIf not NULL it is populated with the number of triples parsed. This may be more than the triples in the resulting dataset.
[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 4894 of file parser_trig.c.