From d51832240128d5c3c21f94e3049de84bfa758224 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 29 Apr 2018 11:32:27 +0200 Subject: [PATCH] Add notes how the filter language should look like --- bin/core/imag-ids/src/id_filters.rs | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/bin/core/imag-ids/src/id_filters.rs b/bin/core/imag-ids/src/id_filters.rs index 966d7589..53c12462 100644 --- a/bin/core/imag-ids/src/id_filters.rs +++ b/bin/core/imag-ids/src/id_filters.rs @@ -43,3 +43,49 @@ impl<'a, A> Filter for IsInCollectionsFilter<'a, A> } } +/// Language definition for the header-filter language +/// +/// # Notes +/// +/// Here are some notes how the language should look like: +/// +/// ```ignore +/// query = filter (operator filter)* +/// +/// filter = unary? ((function "(" selector ")" ) | selector ) compare_op compare_val +/// +/// unary = "not" +/// +/// compare_op = +/// "is" | +/// "in" | +/// "==/eq" | +/// "!=/neq" | +/// ">=" | +/// "<=" | +/// "<" | +/// ">" | +/// "any" | +/// "all" +/// +/// compare_val = val | listofval +/// +/// val = string | int | float | bool +/// listofval = "[" (val ",")* "]" +/// +/// operator = +/// "or" | +/// "or_not" | +/// "and" | +/// "and_not" | +/// "xor" +/// +/// function = +/// "length" | +/// "keys" | +/// "values" +/// ``` +/// +mod header_filter_lang { +} +