summaryrefslogtreecommitdiffstats
path: root/python_modules/spice_parser.py
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-07-01 17:55:33 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:25:47 +0100
commit0ed056da99f2ee23da5600f76d5824c68918c1b5 (patch)
tree44be6dbfc6cf4f1f1fe5c1db60eef339ef9df41a /python_modules/spice_parser.py
parent4a12b9c0dd555695177a017f4826557dde5fbe11 (diff)
downloadspice-protocol-0ed056da99f2ee23da5600f76d5824c68918c1b5.tar.gz
spice-protocol-0ed056da99f2ee23da5600f76d5824c68918c1b5.tar.xz
spice-protocol-0ed056da99f2ee23da5600f76d5824c68918c1b5.zip
Properly parse QXLImage to the new-world SpiceImage
SpiceImage now replaces RedImage and has all image types in it. All image data are now chunked (and as such not copied when demarshalling).
Diffstat (limited to 'python_modules/spice_parser.py')
-rw-r--r--python_modules/spice_parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python_modules/spice_parser.py b/python_modules/spice_parser.py
index 61ef458..ac2da8d 100644
--- a/python_modules/spice_parser.py
+++ b/python_modules/spice_parser.py
@@ -95,7 +95,7 @@ def SPICE_BNF():
switchCase = Group(Group(OneOrMore(default_.setParseAction(replaceWith(None)) + colon | case_.suppress() + identifier + colon)) + variableDef) \
.setParseAction(lambda toks: ptypes.SwitchCase(toks[0][0], toks[0][1]))
- switchBody = Group(switch_ + lparen + identifier + rparen + lbrace + Group(OneOrMore(switchCase)) + rbrace + identifier + attributes - semi) \
+ switchBody = Group(switch_ + lparen + delimitedList(identifier,delim='.', combine=True) + rparen + lbrace + Group(OneOrMore(switchCase)) + rbrace + identifier + attributes - semi) \
.setParseAction(lambda toks: ptypes.Switch(toks[0][1], toks[0][2], toks[0][3], toks[0][4]))
messageBody = structBody = Group(lbrace + ZeroOrMore(variableDef | switchBody) + rbrace)
structSpec = Group(struct_ + identifier + structBody + attributes).setParseAction(lambda toks: ptypes.StructType(toks[0][1], toks[0][2], toks[0][3]))