qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>
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	[thread overview]
Message-ID: <537BAB18.6090708@redhat.com> (raw)
In-Reply-To: <1400576881-6954-3-git-send-email-famz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

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

I applied this patch and tried to break things.

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

Post-patch,
{ '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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2014-05-20 19:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20  9:07 [Qemu-devel] [RFC PATCH v2 0/7] qapi: Specify default value for optional argument in schema json Fam Zheng
2014-05-20  9:07 ` [Qemu-devel] [RFC PATCH v2 1/7] qapi: Allow decimal values Fam Zheng
2014-05-20 15:11   ` Eric Blake
2014-05-20  9:07 ` [Qemu-devel] [RFC PATCH v2 2/7] qapi: Allow true, false and null in schema json Fam Zheng
2014-05-20 19:20   ` Eric Blake [this message]
2014-05-20  9:07 ` [Qemu-devel] [RFC PATCH v2 3/7] tests: Add decimal test cases for qapi-schema Fam Zheng
2014-05-20 12:43   ` Eric Blake
2014-05-20  9:07 ` [Qemu-devel] [RFC PATCH v2 4/7] qapi: Add c_val(t, val) for int Fam Zheng
2014-05-20  9:07 ` [Qemu-devel] [RFC PATCH v2 5/7] qapi: Add @arg property dictionary syntax Fam Zheng
2014-05-20  9:08 ` [Qemu-devel] [RFC PATCH v2 6/7] qapi: Initialize argument value in generated code if has 'default' Fam Zheng
2014-05-20  9:08 ` [Qemu-devel] [RFC PATCH v2 7/7] qmp: Convert block-commit speed to arg property dict Fam Zheng
2014-05-20  9:16 ` [Qemu-devel] [RFC PATCH v2 0/7] qapi: Specify default value for optional argument in schema json Fam Zheng
2014-05-20 19:13 ` Eric Blake
2014-05-21  1:59   ` Fam Zheng
2014-05-21  5:54     ` Markus Armbruster
2014-05-21  7:09       ` Fam Zheng
2014-05-21  7:46         ` Markus Armbruster
2014-05-21  8:23           ` Kevin Wolf
2014-05-21  8:42             ` Fam Zheng
2014-05-21  9:01               ` Kevin Wolf
2014-05-21 11:32               ` Eric Blake
2014-05-21  9:35             ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=537BAB18.6090708@redhat.com \
    --to=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).