All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@novell.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: '!' as separator for sxp?
Date: Tue, 27 Oct 2009 15:25:30 -0600	[thread overview]
Message-ID: <4AE7654A.5010607@novell.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 696 bytes --]

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


    Signed-off-by: Jim Fehlig <jfehlig@novell.com>




[-- Attachment #2: sxp.patch --]
[-- Type: text/x-patch, Size: 453 bytes --]

diff -r c4958b2edaa5 tools/python/xen/xend/sxp.py
--- a/tools/python/xen/xend/sxp.py	Tue Oct 27 12:52:57 2009 +0000
+++ b/tools/python/xen/xend/sxp.py	Tue Oct 27 15:23:37 2009 -0600
@@ -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, '#')

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

                 reply	other threads:[~2009-10-27 21:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AE7654A.5010607@novell.com \
    --to=jfehlig@novell.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.