qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file
Date: Fri, 26 Jun 2009 14:36:15 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Filip Navara wrote:
On Fri, Jun 26, 2009 at 5:02 PM, Anthony Liguori<address@hidden> wrote:


It answers some of the issues I had with the original protocol
proposal (interruption of multi-line responses by asynchronous
events). What bothers me though is that it's not LL(1) grammar (not a
big problem, but writing LL parsers by hand is much easier)

Perhaps you mean LR(1) (i.e. something that can be understood by yacc). When writing parsers by hand, I tend to prefer recursive decent which easily handles LL(k).

Fortunately, this grammar is very simple and can be reasonable converted to LR(1).

 and not
all floats can be represented (eg. NaN).

I'm not sure that's so important.  JSON doesn't support NaN.

 String is underdefined - does
the syntax represent bytes or characters? If characters then the \nnn
syntax is insufficient.

Strings are UTF-8. Based on the definition of string, the only thing needing escaping is ", \\, and \n. Anything else is just cosmetic. My intention was for \nnn to be a single octal byte as an escape. You could certainly use multiple escape sequences to encoding a large UTF character.

 There's no syntax for binary data which may
eventually be required (FDT machine description), but that can be
relatively easily added with something like

I don't think binary data is a requirement. An FDT should be transmitted as a tree, not as a binary blob. You could also transmit binary as a list of bytes though.

Regards,

Anthony Liguori




reply via email to

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