Skip to content

Check for invalid literals as ouput of parsers #140

@pchampin

Description

@pchampin

The current Turtle file is valid according to the grammar:

[] <tag:> "foo"@abcde .

However, abcde is not a valid BCP47 language tag, so the produced graph is not valid according to the RDF abstract syntax.

Currently, Sophia blindly trusts the output of the parsers, creating the corresponding language rag with LanguageTag::new_unchecked, which results in a value violating the contract of its type.

The output of parsers should therefore be checked, at least for the language tags.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions