-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
NULL = u'\u0000'\r
TAB = u'\t'\r
BACK_SPLASH = u'\\'\r
+DOBULE_QUOTED_SPLASH = u'\\"'\r
+SIGLE_QUOTED_SPLASH = u"\\'"\r
+TAB_BACK_SLASH = u"\\/"\r
\r
gIncludePattern = re.compile("^#include +[\"<]+([^\"< >]+)[>\"]+$", re.MULTILINE | re.UNICODE)\r
\r
Line = Line.replace(u'/language', u'#language')\r
Line = Line.replace(u'/include', u'#include')\r
\r
+ Line = Line.replace(u'\\\\', u'\u0006')\r
Line = Line.replace(UNICODE_WIDE_CHAR, WIDE_CHAR)\r
Line = Line.replace(UNICODE_NARROW_CHAR, NARROW_CHAR)\r
Line = Line.replace(UNICODE_NON_BREAKING_CHAR, NON_BREAKING_CHAR)\r
\r
- Line = Line.replace(u'\\\\', u'\u0006')\r
Line = Line.replace(u'\\r\\n', CR + LF)\r
Line = Line.replace(u'\\n', CR + LF)\r
Line = Line.replace(u'\\r', CR)\r
Line = Line.replace(u'''\"''', u'''"''')\r
Line = Line.replace(u'\t', u' ')\r
Line = Line.replace(u'\u0006', u'\\')\r
- \r
+ Line = Line.replace(DOBULE_QUOTED_SPLASH, u'"')\r
+ Line = Line.replace(SIGLE_QUOTED_SPLASH, u"'")\r
+ Line = Line.replace(TAB_BACK_SLASH, u"/")\r
+\r
# if Line.find(u'\\x'):\r
# hex = Line[Line.find(u'\\x') + 2 : Line.find(u'\\x') + 6]\r
# hex = "u'\\u" + hex + "'"\r