Add filters in spec

This commit is contained in:
Fabrice Reix 2022-10-18 21:59:54 +02:00
parent 7000c17224
commit eb4dc17ca5
No known key found for this signature in database
GPG Key ID: BF5213154B2E7155

View File

@ -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,20 +388,34 @@ 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]*
# 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"
null: "null"