Compare commits
3 Commits
e2ea5c9ba4
...
e4cbdf836f
| Author | SHA1 | Date | |
|---|---|---|---|
| e4cbdf836f | |||
| 242de73053 | |||
| 98b37e63b4 |
@@ -21,7 +21,7 @@ include = ["Cargo.toml", "README.md", "LICENSE", "ACKNOWLEDGEMENTS", "src/**/*.r
|
||||
build = "build.rs" # LALRPOP preprocessing
|
||||
|
||||
[lib]
|
||||
name = "parser"
|
||||
name = "mercator_parser"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[[bin]]
|
||||
|
||||
34
README.md
34
README.md
@@ -22,40 +22,6 @@ This enables the index implementations to be agnostic from the underlying data s
|
||||
|
||||
* Rust: https://www.rust-lang.org
|
||||
|
||||
## Quick start
|
||||
|
||||
## Building from sources
|
||||
|
||||
To build this project, you will need to run the following:
|
||||
|
||||
```sh
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
To install the software on the system you can use:
|
||||
|
||||
```sh
|
||||
cargo install --release
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin vehicula pretium
|
||||
quam sit amet facilisis. Class aptent taciti sociosqu ad litora torquent per
|
||||
conubia nostra, per inceptos himenaeos. Curabitur metus sapien, rhoncus vitae
|
||||
eleifend nec, convallis vel nunc. Nulla metus mauris, porta eu porta eu,
|
||||
vulputate et est. Suspendisse lacinia leo vel auctor aliquet. Maecenas non arcu
|
||||
libero. Nulla ut eleifend dui. Cras bibendum pharetra facilisis. Proin mattis
|
||||
libero non pharetra tristique. Nam massa nulla, ultrices pharetra quam a,
|
||||
fermentum placerat dolor. Nullam mollis libero et neque lobortis, id dignissim
|
||||
lectus dignissim. Maecenas ligula enim, congue in ornare vel, volutpat ut ante.
|
||||
|
||||
```sh
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
For more information, please refer to the [documentation](https://epfl-dias.github.io/mercator_parser/).
|
||||
|
||||
1
book/.gitignore
vendored
Normal file
1
book/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
book
|
||||
6
book/book.toml
Normal file
6
book/book.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[book]
|
||||
authors = ["Lionel Sambuc"]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "src"
|
||||
title = "Mercator Parser"
|
||||
5
book/src/SUMMARY.md
Normal file
5
book/src/SUMMARY.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Summary
|
||||
|
||||
[Introduction](./introduction.md)
|
||||
- [Filter Grammar](./filters.md)
|
||||
- [Query Grammar](./queries.md)
|
||||
10
book/src/filters.md
Normal file
10
book/src/filters.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Filter Grammar
|
||||
|
||||
You will find below the definition of this SDL, for filtering data
|
||||
from the index.
|
||||
|
||||
## filters.g4
|
||||
|
||||
```antlr
|
||||
{{#include ../../Grammars/filters.g4}}
|
||||
```
|
||||
7
book/src/introduction.md
Normal file
7
book/src/introduction.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Introduction
|
||||
|
||||
To support volumetric queries for Mercator, a new domain-specific language (DSL) was created.
|
||||
|
||||
ANTLR was used to write and test the SDL, to check it stays simple
|
||||
to parse and and fast to execute. The actual [parser](https://epfl-dias.github.io/mercator_parser/) and interpreter is
|
||||
defined in rust, using [LALRPOP](https://docs.rs/lalrpop/0.18.1/lalrpop/).
|
||||
9
book/src/queries.md
Normal file
9
book/src/queries.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Query Grammar
|
||||
|
||||
You will find below the definition of this SDL, for queries. This builds on top of the [filters](filters.html) grammar.
|
||||
|
||||
## queries.g4
|
||||
|
||||
```antlr
|
||||
{{#include ../../Grammars/queries.g4}}
|
||||
```
|
||||
42
src/lib.rs
42
src/lib.rs
@@ -1,17 +1,57 @@
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
//! # Mercator Parser
|
||||
//!
|
||||
//! Query parser for Mercator.
|
||||
//!
|
||||
//! ## Mercator: Spatial Index
|
||||
//!
|
||||
//! **Mercator** is a spatial *volumetric* index for the
|
||||
//! [Human Brain Project]. It is a component of the [Knowledge Graph]
|
||||
//! service, which provides the spatial anchoring for the metadata
|
||||
//! registered as well as processes the volumetric queries.
|
||||
//!
|
||||
//! It is build on top of the Iron Sea database toolkit.
|
||||
//!
|
||||
//! ## Iron Sea: Database Toolkit
|
||||
//! **Iron Sea** provides a set of database engine bricks, which can be
|
||||
//! combined and applied on arbitrary data structures.
|
||||
//!
|
||||
//! Unlike a traditional database, it does not assume a specific
|
||||
//! physical structure for the tables nor the records, but relies on the
|
||||
//! developer to provide a set of extractor functions which are used by
|
||||
//! the specific indices provided.
|
||||
//!
|
||||
//! This enables the index implementations to be agnostic from the
|
||||
//! underlying data structure, and re-used.
|
||||
//!
|
||||
//! [Human Brain Project]: http://www.humanbrainproject.eu
|
||||
//! [Knowledge Graph]: http://www.humanbrainproject.eu/en/explore-the-brain/search/
|
||||
|
||||
#[macro_use]
|
||||
extern crate lalrpop_util;
|
||||
|
||||
lalrpop_mod!(#[allow(clippy::all)] pub queries); // synthesized by LALRPOP
|
||||
lalrpop_mod!(#[allow(clippy::all,unused_parens)] pub queries); // synthesized by LALRPOP
|
||||
|
||||
// Note: We do not enable for the whole library deny(missing_docs), as
|
||||
// it requires the automatically generated parser to be documented
|
||||
// as well.
|
||||
// Instead we enable it per modules below, except for the tests.
|
||||
|
||||
#[warn(missing_docs)]
|
||||
mod evaluators;
|
||||
#[warn(missing_docs)]
|
||||
mod executors;
|
||||
#[warn(missing_docs)]
|
||||
mod expressions;
|
||||
#[warn(missing_docs)]
|
||||
mod predictors;
|
||||
#[warn(missing_docs)]
|
||||
mod validators;
|
||||
|
||||
#[warn(missing_docs)]
|
||||
mod symbols;
|
||||
#[warn(missing_docs)]
|
||||
mod types;
|
||||
|
||||
pub use expressions::Executor;
|
||||
|
||||
Reference in New Issue
Block a user