Statistics
| Branch: | Revision:

root / scripts @ f6049f44

Latest revisions

# Date Author Comment
9213aa53 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Reject invalid characters in schema file

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

6974ccd5 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Fix schema parser to check syntax systematically

Fixes at least the following parser bugs:

  • accepts any token in place of a colon
  • treats comma as optional
  • crashes when closing braces or brackets are missing

Signed-off-by: Markus Armbruster <>...

5f3cd2b7 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Fix diagnosing non-objects at a schema's top-level

Report syntax error instead of crashing.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id: ...

28b8bd4c 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Rename expr_eval to expr in parse_schema()

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

f1a145e1 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Permit comments starting anywhere on the line

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

c7a3f252 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Restructure lexer and parser

The parser has a rather unorthodox structure:

Until EOF:
Read a section:
Generator function get_expr() yields one section after the
other, as a string. An unindented, non-empty line that...
2caba36c 07/29/2013 06:37 pm Markus Armbruster

qapi.py: Decent syntax error reporting

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Message-id:
Signed-off-by: Anthony Liguori <>

ea66c6d8 07/26/2013 10:10 pm Kevin Wolf

qapi.py: Maintain a list of union types

Signed-off-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>

69dd62df 07/26/2013 10:10 pm Kevin Wolf

qapi: Anonymous unions

The discriminator for anonymous unions is the data type. This allows to
have a union type that allows both of these:

{ 'file': 'my_existing_block_device_id' }
{ 'file': { 'filename': '/tmp/mydisk.qcow2', 'read-only': true } }...
50f2bdc7 07/26/2013 10:09 pm Kevin Wolf

qapi: Flat unions with arbitrary discriminator

Instead of the rather verbose syntax that distinguishes base and
subclass fields...

{ "type": "file",
"read-only": true,
"data": {
"filename": "test"
} }

...we can now have both in the same namespace, allowing a more direct...

View revisions

Also available in: Atom