Instead of recompiling it each time the API is called, just use
the global one that exists.
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>
## @file\r
# parse FDF file\r
#\r
## @file\r
# parse FDF file\r
#\r
-# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
import CommonDataClass.FdfClass\r
from Common.LongFilePathSupport import OpenLongFilePath as open\r
from Common.MultipleWorkspace import MultipleWorkspace as mws\r
import CommonDataClass.FdfClass\r
from Common.LongFilePathSupport import OpenLongFilePath as open\r
from Common.MultipleWorkspace import MultipleWorkspace as mws\r
+from Common.RangeExpression import RangeExpression\r
\r
##define T_CHAR_SPACE ' '\r
##define T_CHAR_NULL '\0'\r
\r
##define T_CHAR_SPACE ' '\r
##define T_CHAR_NULL '\0'\r
\r
if not self.__GetNextToken():\r
return False\r
\r
if not self.__GetNextToken():\r
return False\r
- p = re.compile('[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}')\r
- if p.match(self.__Token) != None:\r
+ if RangeExpression.RegGuidPattern.match(self.__Token) != None:\r
return True\r
else:\r
self.__UndoToken()\r
return True\r
else:\r
self.__UndoToken()\r
from Common.LongFilePathSupport import OpenLongFilePath as open\r
from Capsule import EFI_CERT_TYPE_PKCS7_GUID\r
from Capsule import EFI_CERT_TYPE_RSA2048_SHA256_GUID\r
from Common.LongFilePathSupport import OpenLongFilePath as open\r
from Capsule import EFI_CERT_TYPE_PKCS7_GUID\r
from Capsule import EFI_CERT_TYPE_RSA2048_SHA256_GUID\r
+from Common.RangeExpression import RangeExpression\r
\r
##define T_CHAR_SPACE ' '\r
##define T_CHAR_NULL '\0'\r
\r
##define T_CHAR_SPACE ' '\r
##define T_CHAR_NULL '\0'\r
\r
if not self.__GetNextToken():\r
return False\r
\r
if not self.__GetNextToken():\r
return False\r
- p = re.compile('[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}')\r
- if p.match(self.__Token) != None:\r
+ if RangeExpression.RegGuidPattern.match(self.__Token) != None:\r
return True\r
else:\r
self.__UndoToken()\r
return True\r
else:\r
self.__UndoToken()\r