mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-05 20:48:58 +01:00
Merge #615
615: Remove the artifacts of the past r=Kerollmops a=irevoire Co-authored-by: Irevoire <tamo@meilisearch.com>
This commit is contained in:
commit
0b55e7ce6a
@ -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 = _{ " " }
|
|
Loading…
Reference in New Issue
Block a user