From bbe0342b2a9b3232282dbaa2080763654e51870b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 18 Feb 2022 15:55:50 +0100 Subject: keyval: Fix grammar comment to cover downstream prefix According to the grammar, a key __com.redhat_foo would be parsed as two key fragments __com and redhat_foo. It's actually parsed as a single fragment. Fix the grammar. Signed-off-by: Markus Armbruster Message-Id: <20220218145551.892787-2-armbru@redhat.com> --- util/keyval.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/keyval.c b/util/keyval.c index 904337c8a1..0cf2e84dc8 100644 --- a/util/keyval.c +++ b/util/keyval.c @@ -16,7 +16,9 @@ * key-vals = [ key-val { ',' key-val } [ ',' ] ] * key-val = key '=' val | help * key = key-fragment { '.' key-fragment } - * key-fragment = / [^=,.]+ / + * key-fragment = qapi-name | index + * qapi-name = '__' / [a-z0-9.-]+ / '_' / [A-Za-z][A-Za-z0-9_-]* / + * index = / [0-9]+ / * val = { / [^,]+ / | ',,' } * help = 'help' | '?' * -- cgit v1.2.3