diff options
author | Liming Gao <liming.gao@intel.com> | 2013-08-23 02:18:16 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-08-23 02:18:16 +0000 |
commit | 4afd3d042215afe68d00b9ab8c32f063a3a1c03f (patch) | |
tree | b5190bd11547ac22fe35eeceee85ef42bfe6eea5 /BaseTools/Source/Python/AutoGen/UniClassObject.py | |
parent | a365eed476687881ce0ed49af7d483fd3cb0c491 (diff) | |
download | edk2-4afd3d042215afe68d00b9ab8c32f063a3a1c03f.tar.gz edk2-4afd3d042215afe68d00b9ab8c32f063a3a1c03f.tar.bz2 edk2-4afd3d042215afe68d00b9ab8c32f063a3a1c03f.zip |
Sync BaseTool trunk (version r2599) into EDKII BaseTools.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Heshen Chen <chen.heshen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14591 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/UniClassObject.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/UniClassObject.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py index ea27607fce..7b1ce72ea7 100644 --- a/BaseTools/Source/Python/AutoGen/UniClassObject.py +++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py @@ -1,4 +1,4 @@ -# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -38,6 +38,9 @@ LF = u'\u000A' NULL = u'\u0000'
TAB = u'\t'
BACK_SPLASH = u'\\'
+DOBULE_QUOTED_SPLASH = u'\\"'
+SIGLE_QUOTED_SPLASH = u"\\'"
+TAB_BACK_SLASH = u"\\/"
gIncludePattern = re.compile("^#include +[\"<]+([^\"< >]+)[>\"]+$", re.MULTILINE | re.UNICODE)
@@ -334,11 +337,11 @@ class UniFileClassObject(object): Line = Line.replace(u'/language', u'#language')
Line = Line.replace(u'/include', u'#include')
+ Line = Line.replace(u'\\\\', u'\u0006')
Line = Line.replace(UNICODE_WIDE_CHAR, WIDE_CHAR)
Line = Line.replace(UNICODE_NARROW_CHAR, NARROW_CHAR)
Line = Line.replace(UNICODE_NON_BREAKING_CHAR, NON_BREAKING_CHAR)
- Line = Line.replace(u'\\\\', u'\u0006')
Line = Line.replace(u'\\r\\n', CR + LF)
Line = Line.replace(u'\\n', CR + LF)
Line = Line.replace(u'\\r', CR)
@@ -346,7 +349,10 @@ class UniFileClassObject(object): Line = Line.replace(u'''\"''', u'''"''')
Line = Line.replace(u'\t', u' ')
Line = Line.replace(u'\u0006', u'\\')
-
+ Line = Line.replace(DOBULE_QUOTED_SPLASH, u'"')
+ Line = Line.replace(SIGLE_QUOTED_SPLASH, u"'")
+ Line = Line.replace(TAB_BACK_SLASH, u"/")
+
# if Line.find(u'\\x'):
# hex = Line[Line.find(u'\\x') + 2 : Line.find(u'\\x') + 6]
# hex = "u'\\u" + hex + "'"
|