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).
This commit is contained in:
Bram Gotink 2025-02-19 22:09:31 +01:00
parent b942867c58
commit a50b5100df
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -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