From f6024b32697612500936f1d31f163f2b31daa7af Mon Sep 17 00:00:00 2001 From: Irevoire Date: Tue, 23 Aug 2022 16:10:38 +0200 Subject: [PATCH] Remove the artifacts of the past --- milli/src/search/facet/grammar.pest | 33 ----------------------------- 1 file changed, 33 deletions(-) delete mode 100644 milli/src/search/facet/grammar.pest diff --git a/milli/src/search/facet/grammar.pest b/milli/src/search/facet/grammar.pest deleted file mode 100644 index 8bfdeb667..000000000 --- a/milli/src/search/facet/grammar.pest +++ /dev/null @@ -1,33 +0,0 @@ -key = _{reserved | quoted | word } -value = _{quoted | word } -quoted = _{ (PUSH("'") | PUSH("\"")) ~ string ~ POP } -string = {char*} -word = ${(LETTER | NUMBER | "_" | "-" | ".")+} - -char = _{ !(PEEK | "\\") ~ ANY - | "\\" ~ (PEEK | "\\" | "/" | "b" | "f" | "n" | "r" | "t") - | "\\" ~ ("u" ~ ASCII_HEX_DIGIT{4})} - -reserved = { "_geoDistance" | ("_geoPoint" ~ parameters) | "_geo" } -// we deliberately choose to allow empty parameters to generate more specific error message later -parameters = {("(" ~ (value ~ ",")* ~ value? ~ ")") | ""} -condition = _{between | eq | greater | less | geq | leq | neq} -between = {key ~ value ~ "TO" ~ value} -geq = {key ~ ">=" ~ value} -leq = {key ~ "<=" ~ value} -neq = {key ~ "!=" ~ value} -eq = {key ~ "=" ~ value} -greater = {key ~ ">" ~ value} -less = {key ~ "<" ~ value} -geo_radius = {"_geoRadius" ~ parameters } - -prgm = {SOI ~ expr ~ EOI} -expr = _{ ( term ~ (operation ~ term)* ) } -term = { ("(" ~ expr ~ ")") | condition | not | geo_radius } -operation = _{ and | or } -and = {"AND"} -or = {"OR"} - -not = {"NOT" ~ term} - -WHITESPACE = _{ " " }