Add filters in spec
@@ -154,7 +154,7 @@ variable-value:
# Query
-query: main-query (sp subquery)?
+query: main-query (sp filter)*
main-query:
status-query
@@ -198,13 +198,6 @@ md5-query: "md5"
bytes-query: "bytes"
-subquery: regex-subquery | count-subquery
-
-regex-subquery: "regex" sp (quoted-string | regex)
-
-count-subquery: "count"
-
-
# Predicates
predicate: ("not" sp )? predicate-func
@@ -395,19 +388,33 @@ json-string-escaped-char:
json-number: integer fraction? exponent?
-
# Template / Expression
template: "{{" expr "}}"
-expr: variable-name
+expr: variable-name (sp filter)*
variable-name: [A-Za-z] [A-Za-z_-0-9]*
-# Lexical Grammar
+# Filter
+filter:
+ regex-filter
+ | count-filter
+ | escapeurl-filter
+ | unescapeurl-filter
+regex-filter: "regex" sp (quoted-string | regex)
+
+count-filter: "count"
+
+escapeurl-filter: "escapeUrl"
+
+unescapeurl-filter: "unescapeUrl"
+
+
+# Lexical Grammar
boolean: "true" | "false"
