From nobody Mon Feb 9 18:45:13 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 152235949902759.762105911481626; Thu, 29 Mar 2018 14:38:19 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9BE96225E4025; Thu, 29 Mar 2018 14:31:33 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0D8D5224DD126 for ; Thu, 29 Mar 2018 14:31:30 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2018 14:38:09 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga004.jf.intel.com with ESMTP; 29 Mar 2018 14:38:09 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,378,1517904000"; d="scan'208";a="187159591" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Thu, 29 Mar 2018 14:38:07 -0700 Message-Id: <28807b177ac651558932f1b413a5dd024a5f47d4.1522359411.git.jaben.carsey@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [edk2] [PATCH v1 2/3] BaseTools: use new RegEx from FdfParserLite X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" FdfParser has identical one. import and share. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/GenFds/FdfParser.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source= /Python/GenFds/FdfParser.py index 9903e9570cf9..4c911789fa62 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -60,7 +60,7 @@ from Common.LongFilePathSupport import OpenLongFilePath a= s open from Capsule import EFI_CERT_TYPE_PKCS7_GUID from Capsule import EFI_CERT_TYPE_RSA2048_SHA256_GUID from Common.RangeExpression import RangeExpression -from Common.FdfParserLite import FileExtensionPattern +from Common.FdfParserLite import FileExtensionPattern,TokenFindPattern =20 ##define T_CHAR_SPACE ' ' ##define T_CHAR_NULL '\0' @@ -2800,12 +2800,11 @@ class FdfParser: def __GetFileOpts(self, FfsFileObj): =20 if self.__GetNextToken(): - Pattern =3D re.compile(r'([a-zA-Z0-9\-]+|\$\(TARGET\)|\*)_([a-= zA-Z0-9\-]+|\$\(TOOL_CHAIN_TAG\)|\*)_([a-zA-Z0-9\-]+|\$\(ARCH\)|\*)') - if Pattern.match(self.__Token): + if TokenFindPattern.match(self.__Token): FfsFileObj.KeyStringList.append(self.__Token) if self.__IsToken(","): while self.__GetNextToken(): - if not Pattern.match(self.__Token): + if not TokenFindPattern.match(self.__Token): raise Warning("expected KeyString \"Target_Tag= _Arch\"", self.FileName, self.CurrentLineNumber) FfsFileObj.KeyStringList.append(self.__Token) =20 @@ -3749,12 +3748,11 @@ class FdfParser: =20 KeyStringList =3D [] if self.__GetNextToken(): - Pattern =3D re.compile(r'([a-zA-Z0-9\-]+|\$\(TARGET\)|\*)_([a-= zA-Z0-9\-]+|\$\(TOOL_CHAIN_TAG\)|\*)_([a-zA-Z0-9\-]+|\$\(ARCH\)|\*)') - if Pattern.match(self.__Token): + if TokenFindPattern.match(self.__Token): KeyStringList.append(self.__Token) if self.__IsToken(","): while self.__GetNextToken(): - if not Pattern.match(self.__Token): + if not TokenFindPattern.match(self.__Token): raise Warning("expected KeyString \"Target_Tag= _Arch\"", self.FileName, self.CurrentLineNumber) KeyStringList.append(self.__Token) =20 --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel