qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/9] tests: QAPI schema parser tests


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 1/9] tests: QAPI schema parser tests
Date: Fri, 26 Jul 2013 16:16:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 07/26/2013 06:39 AM, Markus Armbruster wrote:
>> The parser handles erroneous input badly.  To be improved shortly.
>> 
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>
> Lots of proof on how bad it is!  I'd also like to see a couple tests on
> trailing commas:
>
> { 'enum': 'Foo', [ 'bar' ], }
> { 'enum': 'Gur', [ 'ble', ] }

I figure you mean

{ 'enum': 'Foo', 'data': [ 'bar' ], }
{ 'enum': 'Gur', 'data': [ 'ble', ] }

My parser rejects both:

<stdin>:1:37: Expected string
<stdin>:2:35: Expected "{", "[" or string

I commented out the first to get the second error.  Making the parser
continue after errors didn't seem to be worthwhile.

> since we have had patches in the past to clean them up (shame on JSON
> for copying C89 instead of C99 with regards to trailing commas).

Indeed.

> Either way,
>
> Reviewed-by: Eric Blake <address@hidden>

Thanks!



reply via email to

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