summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/Expression.py
diff options
context:
space:
mode:
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>2018-03-17 07:27:41 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-03-29 16:18:29 +0800
commitb1a9e404d4e91729b99d690fa849451269dd3a47 (patch)
tree458554d97d077c8565de6e04a751314cc8bb42e8 /BaseTools/Source/Python/Common/Expression.py
parent709c9fd56b2a3303e679858a4927e382f255d8e4 (diff)
downloadedk2-b1a9e404d4e91729b99d690fa849451269dd3a47.tar.gz
edk2-b1a9e404d4e91729b99d690fa849451269dd3a47.tar.bz2
edk2-b1a9e404d4e91729b99d690fa849451269dd3a47.zip
BaseTools: use new shared GUID regular expressions
remove local variables that are GUID matching and replace with shared expression. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common/Expression.py')
-rw-r--r--BaseTools/Source/Python/Common/Expression.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 4f0f377f37..287dddfbbc 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -214,7 +214,6 @@ class ValueExpression(object):
PcdPattern = re.compile(r'[_a-zA-Z][0-9A-Za-z_]*\.[_a-zA-Z][0-9A-Za-z_]*$')
HexPattern = re.compile(r'0[xX][0-9a-fA-F]+$')
- RegGuidPattern = re.compile(r'[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}')
SymbolPattern = re.compile("("
"\$\([A-Z][A-Z0-9_]*\)|\$\(\w+\.\w+\)|\w+\.\w+|"
@@ -725,7 +724,7 @@ class ValueExpression(object):
self._Token = ''
if Expr:
Ch = Expr[0]
- Match = self.RegGuidPattern.match(Expr)
+ Match = gGuidPattern.match(Expr)
if Match and not Expr[Match.end():Match.end()+1].isalnum() \
and Expr[Match.end():Match.end()+1] != '_':
self._Idx += Match.end()