From b942867c588329943d1ceeee8189c2d7bfc93170 Mon Sep 17 00:00:00 2001 From: Bram Gotink Date: Wed, 19 Feb 2025 00:19:19 +0100 Subject: [PATCH] Make whitespace required around query operators (#500) --- QUERY-SPEC.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/QUERY-SPEC.md b/QUERY-SPEC.md index 36501b3..25ad7c6 100644 --- a/QUERY-SPEC.md +++ b/QUERY-SPEC.md @@ -115,15 +115,15 @@ 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-subsequent | filter -selector-subsequent := matchers q-ws* selector-operator q-ws* selector-subsequent | matchers +query := selector q-ws+ "||" q-ws+ query | selector +selector := filter q-ws+ selector-operator q-ws+ selector-subsequent | filter +selector-subsequent := matchers q-ws+ selector-operator q-ws+ selector-subsequent | matchers selector-operator := ">>" | ">" | "++" | "+" filter := "top(" q-ws* ")" | matchers matchers := type-matcher $string? accessor-matcher* | $string accessor-matcher* | accessor-matcher+ type-matcher := "(" q-ws* ")" | $type accessor-matcher := "[" q-ws* (comparison | accessor)? q-ws* "]" -comparison := accessor q-ws* matcher-operator q-ws* ($type | $string | $number | $keyword) +comparison := accessor q-ws+ matcher-operator q-ws+ ($type | $string | $number | $keyword) accessor := "val(" q-ws* $integer q-ws* ")" | "prop(" q-ws* $string q-ws* ")" | "name(" q-ws* ")" | "tag(" q-ws* ")" | "values(" q-ws* ")" | "props(" q-ws* ")" | $string matcher-operator := "=" | "!=" | ">" | "<" | ">=" | "<=" | "^=" | "$=" | "*="