Enhance ECC to deal with quoted predicate expression.
authorjlin16 <jlin16@7335b38e-4728-0410-8992-fb3ffe349368>
Fri, 8 Jan 2010 06:01:57 +0000 (06:01 +0000)
committerjlin16 <jlin16@7335b38e-4728-0410-8992-fb3ffe349368>
Fri, 8 Jan 2010 06:01:57 +0000 (06:01 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1795 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/Ecc/c.py

index b8b1d2d..9cf4c74 100644 (file)
@@ -742,7 +742,7 @@ def SplitPredicateByOp(Str, Op, IsFuncCalling = False):
             return [Name]\r
         \r
         Name = Str[0:Index + IndexInRemainingStr].strip()\r
-        Value = Str[Index+IndexInRemainingStr+len(Op):].strip()\r
+        Value = Str[Index+IndexInRemainingStr+len(Op):].strip().strip(')')\r
         return [Name, Value]\r
     \r
     TmpStr = Str.rstrip(';').rstrip(')')\r
@@ -759,6 +759,8 @@ def SplitPredicateByOp(Str, Op, IsFuncCalling = False):
         TmpStr = Str[0:Index - 1]\r
 \r
 def SplitPredicateStr(Str):\r
+    \r
+    Str = Str.lstrip('(')\r
     IsFuncCalling = False\r
     p = GetFuncDeclPattern()\r
     TmpStr = Str.replace('.', '').replace('->', '')\r