From a50b5100df446825e04415036e65a1be6e302d95 Mon Sep 17 00:00:00 2001 From: Bram Gotink Date: Wed, 19 Feb 2025 22:09:31 +0100 Subject: [PATCH] Align KDL Query grammar with prose The values() and props() accessors were only mentioned in the grammaer, with no explanation whatsoever about what they were supposed to do. The val() accessor required an argument in the grammar while the prose repeatedly mentions val() as equivalent to val(0). --- QUERY-SPEC.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QUERY-SPEC.md b/QUERY-SPEC.md index 25ad7c69..109451a4 100644 --- a/QUERY-SPEC.md +++ b/QUERY-SPEC.md @@ -124,7 +124,7 @@ matchers := type-matcher $string? accessor-matcher* | $string 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) -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 +accessor := "val(" q-ws* $integer? q-ws* ")" | "prop(" q-ws* $string q-ws* ")" | "name(" q-ws* ")" | "tag(" q-ws* ")" | $string matcher-operator := "=" | "!=" | ">" | "<" | ">=" | "<=" | "^=" | "$=" | "*=" q-ws := $node-space