Throughout the RDF specs an EBNF-NOTATION XML specification is used to specify the grammar of a document. So I am wondering how to use Antlr/bison/yacc (maybe with some flag within these tools I don't know how to search for) — or other tools I don’t know about yet — to consume these specifications and generate a parser for me to use to see if my RDF is well-formed before trying to load.
An example grammar for my specific use case is: https://www.w3.org/TR/n-quads/#sec-grammar
I have already converted this grammar into Antlr4 grammar and created a parser using that tool and attempted to just write my own recursive descent parser but it was time-consuming and I'd rather not repeat the exercise if I have to do this again.
Don't really have any code, this is just a request for information.
What I want to do is basically copy/paste the grammars specified in this XML EBNF-NOTATION and produce a parser generator similar to what Antlr provides.
nquads
command line tool that does syntax checking for N-Quads. – Darcidarcia