tracematch: Fix array parsing.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 27 Nov 2012 20:06:40 +0000 (20:06 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 27 Nov 2012 20:06:40 +0000 (20:06 +0000)
tracematch.py

index aebbfd3d5c2a3be001e4a736a9e881d6825c4d25..ec0509e5285e0983a3203dd989129aef08b13afb 100755 (executable)
@@ -545,13 +545,14 @@ class TraceParser(Parser):
     def parse_opt_pair(self):
         '''Parse an optional `name = value` pair.'''
         if self.match(ID):
-            name = self.consume(ID).text
+            token = self.consume(ID)
             if self.match(EQUAL):
                 self.consume(EQUAL)
+                name = token.text
                 value = self.parse_value()
             else:
-                value = name
                 name = None
+                value = self.handleID(token.text)
         else:
             name = None
             value = self.parse_value()