rdfjs / N3.js

Lightning fast, spec-compatible, streaming RDF for JavaScript
http://rdf.js.org/N3.js/
Other
711 stars 130 forks source link

Pass new N3 tests #192

Open RubenVerborgh opened 4 years ago

RubenVerborgh commented 4 years ago

Main topics include:

william-vw commented 4 years ago

Do you happen to have a grammar specification (e.g., EBNF)? ..

RubenVerborgh commented 4 years ago

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.

william-vw commented 4 years ago

@RubenVerborgh Didn't you use a compiler-compiler to generate the parser? ..

RubenVerborgh commented 4 years ago

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).