[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v2 2/7] qapi: Allow true, false and null in

From: Eric Blake
Subject: Re: [Qemu-devel] [RFC PATCH v2 2/7] qapi: Allow true, false and null in schema json
Date: Tue, 20 May 2014 13:20:56 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/20/2014 03:07 AM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <address@hidden>
> ---
>  scripts/qapi.py | 24 +++++++++++++++++-------
>  1 file changed, 17 insertions(+), 7 deletions(-)

I applied this patch and tried to break things.

{ 'random': tru } => foo.json:1:13: Stray "t"
{ 'random': true } => foo.json:1:13: Stray "t"
{ 'random': truest } => foo.json:1:13: Stray "t"

{ 'random': tru } => foo.json:1:14: Stray "r"
{ 'random': true } => accepted
{ 'random': truest } => foo.json:1:17: Stray "s"

Not ideal that you are reporting a different stray character based on
how much (1 or 4 bytes) that you tentatively already consumed.  Better
might be to report a stray word (all characters until the next
whitespace, starting at the first bare character rather than mid-word).

Are these cases tested in 3/7?

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]