sxp parser: show empty string
PATCH 1/1 sxp parser: show empty string
Hi,
This patch makes the sxp parser show empty string.
Test case:
import sxp
sxp.show(sxp.from_string('(a "")'))sxp.show(sxp.from_string("(a '')"))
Without this patch:
(a )(a )
With this patch:
(a '')(a '')
Signed-off-by Zhigang Wang <[email protected]>
Thanks,
Zhigang
tools/python/xen/xend/sxp.py +2 -0
@@ -365,6 +365,8 @@ def atomp(sxpr): """Check if an sxpr is an atom. """ + if sxpr == '': + return 0 if sxpr.isalnum() or sxpr == '@': return 1 for c in sxpr:
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel