Skip to content

Implement SPARQL 1.2 grammar support#1

Open
rybesh wants to merge 2 commits into
masterfrom
sparql-1.2
Open

Implement SPARQL 1.2 grammar support#1
rybesh wants to merge 2 commits into
masterfrom
sparql-1.2

Conversation

@rybesh

@rybesh rybesh commented Jan 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Add support for SPARQL 1.2 syntax including triple terms, reified triples, annotations, VERSION declaration, language direction, and new built-in functions
  • All 212 W3C SPARQL 1.2 tests pass
  • Maintains backwards compatibility with SPARQL 1.1

Test plan

  • npm test - 7 unit tests pass
  • npm run test:w3c - 212 W3C SPARQL 1.2 tests pass
  • Build succeeds with npm run build

🤖 Generated with Claude Code

rybesh and others added 2 commits January 25, 2026 19:06
Add support for SPARQL 1.2 features including:
- Triple terms: <<( :s :p :o )>>
- Reified triples: << :s :p :o >>
- Annotations: {| :prop :value |}
- VERSION declaration
- Language direction: @en--ltr
- New built-in functions: TRIPLE, SUBJECT, PREDICATE, OBJECT, ISTRIPLE,
  LANGDIR, HASLANG, HASLANGDIR, STRLANGDIR
- Codepoint escapes in strings

All 212 W3C SPARQL 1.2 tests pass.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add test runners for SPARQL 1.0 and 1.1 W3C test suites
- Create shared test runner module to reduce code duplication
- Fix grammar to support keywords with digits (MD5, SHA1, etc.)
- Add property path quantifiers {n}, {n,}, {n,m}, {,m}
- Add unicode escape support (\u, \U) in IRIs

All three test suites now pass with 0 failures:
- SPARQL 1.0: 464 passed
- SPARQL 1.1: 551 passed
- SPARQL 1.2: 214 passed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant