Skip to contentSkip to conversation

'!' as separator for sxp?

PATCH Jim Fehlig 1 participant 1 message Oct 27, 2009

lore
Share & tools
lore

Jim Fehlig

author
#0 lore raw

I'm trying to determine if '!' is in fact a separator in domain sxp. According to is_separator() in tools/python/xen/xend/sxp.py it is

def is_separator(self, c):
return self.in_class(c, '{}()<>[]!;')

But '!' is a valid character in domain sxp, e.g.

(vbd
(protocol x86_64-abi)
...
(mode w!)
...
)

With '!' being a separator, mode must be quoted in order to parse the above sxp config correctly. I cannot find any other use of '!' in domain sxp - and certainly no use of it as a separator.

Does anyone know of the use of '!' as a separator? If not, the attached patch removes it from is_separator().

Regards,
Jim

tools/python/xen/xend/sxp.py +1 -1
diff -r c4958b2edaa5 tools/python/xen/xend/sxp.py
@@ -142,7 +142,7 @@
         return self.in_class(c, ' \t\n\v\f\r')
 
     def is_separator(self, c):
-        return self.in_class(c, '{}()<>[]!;')
+        return self.in_class(c, '{}()<>[];')
 
     def in_comment_class(self, c):
         return self.in_class(c, '#')

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel