diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-07-19 16:27:42 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-20 15:25:49 +0100 |
commit | 4702feb5b1958eeef9b4414a2fb7cac259394a52 (patch) | |
tree | 562cd6b8304d4e38cb0a42c49397c84f20a91aec /python_modules/spice_parser.py | |
parent | f3d92c736b5a2d25f6a881e7234e798b7e7ae7e5 (diff) | |
download | spice-protocol-4702feb5b1958eeef9b4414a2fb7cac259394a52.tar.gz spice-protocol-4702feb5b1958eeef9b4414a2fb7cac259394a52.tar.xz spice-protocol-4702feb5b1958eeef9b4414a2fb7cac259394a52.zip |
Don't send CursorHeader if cursor_flags is NONE
Diffstat (limited to 'python_modules/spice_parser.py')
-rw-r--r-- | python_modules/spice_parser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python_modules/spice_parser.py b/python_modules/spice_parser.py index ac2da8d..43e930c 100644 --- a/python_modules/spice_parser.py +++ b/python_modules/spice_parser.py @@ -93,7 +93,7 @@ def SPICE_BNF(): variableDef = Group(typeSpec + Optional("*", default=None) + identifier + Optional(arraySizeSpec, default=None) + attributes - semi) \ .setParseAction(parseVariableDef) - switchCase = Group(Group(OneOrMore(default_.setParseAction(replaceWith(None)) + colon | case_.suppress() + identifier + colon)) + variableDef) \ + switchCase = Group(Group(OneOrMore(default_.setParseAction(replaceWith(None)) + colon | Group(case_.suppress() + Optional("!", default="") + identifier) + colon)) + variableDef) \ .setParseAction(lambda toks: ptypes.SwitchCase(toks[0][0], toks[0][1])) 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])) |