kql: only allow top() at start of selector

This commit is contained in:
Romain Delamare 2024-04-14 16:17:28 +02:00
parent fa204cec62
commit b08fc4382a
No known key found for this signature in database
GPG Key ID: A745121A23AF846B
1 changed files with 3 additions and 2 deletions

View File

@ -110,8 +110,9 @@ what they expand to.
```
query-str := $bom? query
query := selector q-ws* "||" q-ws* query | selector
selector := filter q-ws* selector-operator q-ws* selector | filter
query := selector-start q-ws* "||" q-ws* query | selector-start
selector-start := filter q-ws* selector-operator q-ws* selector | filter
selector := matchers q-ws* selector-operator q-ws* selector | matchers
selector-operator := ">>" | ">" | "++" | "+"
filter := "top(" q-ws* ")" | matchers
matchers := type-matcher $string? accessor-matcher* | $string accessor-matcher* | accessor-matcher+