-
-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving queyr grammar to a different crate. (#645)
- Loading branch information
1 parent
d74f71b
commit 4b9c1dc
Showing
13 changed files
with
71 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
test: | ||
echo "Run test only... No examples." | ||
cargo test --tests --lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "tantivy-query-grammar" | ||
version = "0.11.0" | ||
authors = ["Paul Masurel <paul.masurel@gmail.com>"] | ||
license = "MIT" | ||
categories = ["database-implementations", "data-structures"] | ||
description = """Search engine library""" | ||
documentation = "https://tantivy-search.github.io/tantivy/tantivy/index.html" | ||
homepage = "https://github.com/tantivy-search/tantivy" | ||
repository = "https://github.com/tantivy-search/tantivy" | ||
readme = "README.md" | ||
keywords = ["search", "information", "retrieval"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
combine = ">=3.6.0,<4.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#![recursion_limit = "100"] | ||
|
||
mod occur; | ||
mod query_grammar; | ||
mod user_input_ast; | ||
use combine::parser::Parser; | ||
|
||
pub use crate::occur::Occur; | ||
use crate::query_grammar::parse_to_ast; | ||
pub use crate::user_input_ast::{UserInputAST, UserInputBound, UserInputLeaf, UserInputLiteral}; | ||
|
||
pub struct Error; | ||
|
||
pub fn parse_query(query: &str) -> Result<UserInputAST, Error> { | ||
let (user_input_ast, _remaining) = parse_to_ast().parse(query).map_err(|_| Error)?; | ||
Ok(user_input_ast) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
src/query/query_parser/query_grammar.rs → query-grammar/src/query_grammar.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/query/query_parser/user_input_ast.rs → query-grammar/src/user_input_ast.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters