N3.js
N3.js copied to clipboard
Pass new N3 tests
Main topics include:
- [x] formulas inside lists (https://github.com/rdfjs/N3.js/pull/194)
- [x] literals as subjects (https://github.com/rdfjs/N3.js/pull/193)
- [ ] N3 path syntax
Do you happen to have a grammar specification (e.g., EBNF)? ..
Not really, I started from https://www.w3.org/TR/turtle/#sec-grammar and combined https://www.w3.org/DesignIssues/Notation3 and https://www.w3.org/TeamSubmission/n3/ into it.
@RubenVerborgh Didn't you use a compiler-compiler to generate the parser? ..
Didn't you use a compiler-compiler to generate the parser?
I did for a SPARQL parser, but not for this library, given 1) performance and 2) the fact that it supports streaming parsing (for which it is hard to find parser generators). We want to parse files that are larger than main memory.
That said, this might create interesting requirements for Notation3, such that the meaning of a document cannot be changed by a forAll
or so at the end of the document (I have no idea what the spec says now, if anything).