RDF1.2 and RDF Messages support, and well-tested spec compliance - #46
Merged
Merged
Conversation
Closed
…ction - Modified getLiteralDirection() regex to allow language tags like @en without mandatory direction - Changed regex from '/^".*"(?:@[^@"]+--(ltr|rtl)|\^\^[^"]+)?$/is' to '/^".*"(?:@[^@"]+(?:--(ltr|rtl))?|\^\^[^"]+)?$/is' - This allows language-tagged literals without base direction to parse correctly - Fixes 5 RDF 1.1 N-Triples test failures: - nt-syntax-string-02 (language tag @en) - nt-syntax-string-03 (language tag @en-uk) - lantag_with_subtag (language tag @en-UK) - comment_following_triple (comments after triples) - nt-syntax-subm-01 (comprehensive submission test)
…ndling - Implements parseNegative() method alongside parse() for proper negative test support - parseNegative() expects the parser to reject invalid input (non-zero exit code) - Allows rdf-test-suite to explicitly handle positive vs negative tests
- Changed greedy [^@"]+ to non-greedy [^@"]+? to prevent consuming the direction part - Now correctly captures RTL/LTR from patterns like @en--rtl without consuming it in the language tag - Fixes testUtilUnderstandsDirectionalLanguageLiterals unit test
pietercolpaert
force-pushed
the
feat-rdf12
branch
from
June 2, 2026 18:54
8614c83 to
4666d41
Compare
Owner
Author
|
@k00ni This is ready - do you want to take a look? I’d like to release this as |
* First implementation and tests * First RDFM support * Fix messages tests * Added tests cfr spec * Proofreadinf README.md * README.md tweaks
Owner
Author
|
I’ll just release this so that it can be used: it fixes serious problems, proves spec compliance, is backwards compatible, and adds support for RDF1.2 and messages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Working on a PR that: