-
Notifications
You must be signed in to change notification settings - Fork 3
[ADR 01] Decide on a parser technology
Jose Emilio Labra Gayo edited this page Jan 6, 2024
·
4 revisions
There seems to be several parsing technologes in Rust:
- nom which is the one used in nemo. In nemo I also found a Turtle parser in nom and a SPARQL parser in nom. There is another Turtle parser written in nom which says that passes the spec's testsuite although it seems unmaintained.
- peg which I think is used in the SPARQL parser in oxigraph.
- pest which looks nice. I didn't find SPARQL/Turtle parsers written in pest.
- chumsky, seems to put emphasis on error reporting. I didn't find SPARQL or Turtle parsers in Chumsky.
- antlr4rust would be great to leverage my previous ANTLR parser in shex-s, but the project seems not to be active.
- combine seems to be one of the first Rust parser combinators. It defines a trait and some macros to handle cyclic recursive parsers.
I recently found the parse-rosetta repo that compares different parsers in Rust.
Given all those possibilities...I am considering using nom by now.
- (RDF) Information about a node in RDF file
- (RDF) Merge several RDF data files
- (RDF/SPARQL) Information about a node in Wikidata
- (ShEx) Show info about a schema
- (ShEx) Validate a specific node with a shape
- (SHACL) Show info about a SHACL schema
- (SHACL) Read a SHACL Shapes graph and convert to some format
- (SHACL) Validating RDF data using SHACL
- (SPARQL) Running SPARQL queries
- (Python) Invoking this library from Python
- (SHACL → ShEx) Convert SHACL shapes graph to ShEx schema
- (ShEx → SVG/PNG/...) Convert a ShEx schema to an UML-like visualization in SVG, PNG, ...
- (ShEx → HTML) Convert ShEx schemas to HTML views
- (ShEx → SPARQL) Convert a simple ShEx schema to SPARQL
- (DCTap → ShEx) Convert a CSV file in DCTap to a ShEx schema
- (DCTap → SVG/PNG/...) Convert a CSV file in DCTap to an UML-like visualization in SVG, PNG, ...