From 04a5b27ac97f9d81a88370400760b74209f64d28 Mon Sep 17 00:00:00 2001 From: Bram Gotink Date: Mon, 27 Jan 2025 22:46:49 +0100 Subject: [PATCH] Make whitespace required around query operators --- 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 := "=" | "!=" | ">" | "<" | ">=" | "<=" | "^=" | "$=" | "*="