Skip to main content

Module parser

Module parser 

Source
Expand description

Turtle ACL parser (subset sufficient for WAC documents).

Accepts the subset used by real-world Solid ACL files: @prefix directives, a shorthand, and ;-separated predicate-object pairs terminated with ..

Non-recognised tokens are skipped — the parser is deliberately forgiving so that odd whitespace or extra comments do not break it.

Functions§

parse_turtle_acl
Parse a Turtle ACL document into the same AclDocument shape that the JSON-LD deserialiser produces.
parse_turtle_acl_with_limit
Parse a Turtle ACL document with a caller-supplied byte limit.