ia64/xen-unstable

changeset 12070:0d120850741a

[XEND] Fix backslash escaping so it ignores escapes if they don't make sense.

Signed-off-by: Alastair Tse <atse@xensource.com>
author acnt2@huggins.lce.cl.cam.ac.uk
date Thu Oct 05 17:29:19 2006 +0100 (2006-10-05)
parents 96a77ef725b8
children 6ffb8705f894
files tools/python/xen/xend/sxp.py
line diff
     1.1 --- a/tools/python/xen/xend/sxp.py	Mon Oct 02 13:45:44 2006 +0100
     1.2 +++ b/tools/python/xen/xend/sxp.py	Thu Oct 05 17:29:19 2006 +0100
     1.3 @@ -267,10 +267,13 @@ class Parser:
     1.4          elif c == 'x':
     1.5              self.state.fn = self.state_hex
     1.6              self.state.val = 0
     1.7 -        else:
     1.8 +        elif c == '0':
     1.9              self.state.fn = self.state_octal
    1.10              self.state.val = 0
    1.11              self.input_char(c)
    1.12 +        else:
    1.13 +            # ignore escape if it doesn't match anything we know
    1.14 +            self.pop_state()
    1.15  
    1.16      def state_octal(self, c):
    1.17          def octaldigit(c):