From nobody Mon Apr 29 08:20:29 2024 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 1520982713062231.72503793875433; Tue, 13 Mar 2018 16:11:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C7FB3225892B0; Tue, 13 Mar 2018 16:05:26 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 83E1D224CCC11 for ; Tue, 13 Mar 2018 16:05:23 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 16:11:45 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga005.jf.intel.com with ESMTP; 13 Mar 2018 16:11:45 -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.65; helo=mga03.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.47,466,1515484800"; d="scan'208";a="207954913" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Tue, 13 Mar 2018 16:11:31 -0700 Message-Id: X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [edk2] [PATCH v1 1/5] BaseTools: Expression - remove redundant variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" Str is created and not needed. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Expression.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Sourc= e/Python/Common/Expression.py index e76f09c367c1..bcb27ec11fd5 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -46,14 +46,13 @@ ERR_IN_OPERAND =3D 'Macro after IN operator ca= n only be: $(FAMILY), $(ARC # def SplitString(String): # There might be escaped quote: "abc\"def\\\"ghi", 'abc\'def\\\'ghi' - Str =3D String RetList =3D [] InSingleQuote =3D False InDoubleQuote =3D False Item =3D '' - for i, ch in enumerate(Str): + for i, ch in enumerate(String): if ch =3D=3D '"' and not InSingleQuote: - if Str[i - 1] !=3D '\\': + if String[i - 1] !=3D '\\': InDoubleQuote =3D not InDoubleQuote if not InDoubleQuote: Item +=3D String[i] @@ -64,7 +63,7 @@ def SplitString(String): RetList.append(Item) Item =3D '' elif ch =3D=3D "'" and not InDoubleQuote: - if Str[i - 1] !=3D '\\': + if String[i - 1] !=3D '\\': InSingleQuote =3D not InSingleQuote if not InSingleQuote: Item +=3D String[i] @@ -84,13 +83,12 @@ def SplitString(String): def SplitPcdValueString(String): # There might be escaped comma in GUID() or DEVICE_PATH() or " " # or ' ' or L' ' or L" " - Str =3D String RetList =3D [] InParenthesis =3D 0 InSingleQuote =3D False InDoubleQuote =3D False Item =3D '' - for i, ch in enumerate(Str): + for i, ch in enumerate(String): if ch =3D=3D '(': InParenthesis +=3D 1 if ch =3D=3D ')': --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Apr 29 08:20:29 2024 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 1520982710536385.6149945156833; Tue, 13 Mar 2018 16:11:50 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 66050224CCC3B; Tue, 13 Mar 2018 16:05:25 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 68F72224CCC0B for ; Tue, 13 Mar 2018 16:05:23 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 16:11:45 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga005.jf.intel.com with ESMTP; 13 Mar 2018 16:11:45 -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.65; helo=mga03.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.47,466,1515484800"; d="scan'208";a="207954914" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Tue, 13 Mar 2018 16:11:32 -0700 Message-Id: <17f7cfad50a29664b2d2fb8dbb6f32f964e4ebd1.1520982577.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/5] BaseTools: Expression refactor function X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" The function is about C Names, not C Strings. Move the re.compile outside the function call Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Expression.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Sourc= e/Python/Common/Expression.py index bcb27ec11fd5..c7037dd0d00b 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -40,6 +40,8 @@ ERR_ARRAY_ELE =3D 'This must be HEX value for N= List or Array: [%s].' ERR_EMPTY_EXPR =3D 'Empty expression is not allowed.' ERR_IN_OPERAND =3D 'Macro after IN operator can only be: $(FAMILY= ), $(ARCH), $(TOOL_CHAIN_TAG) and $(TARGET).' =20 +__ValidString =3D re.compile(r'[_a-zA-Z][_0-9a-zA-Z]*$') + ## SplitString # Split string to list according double quote # For example: abc"de\"f"ghi"jkl"mn will be: ['abc', '"de\"f"', 'ghi', '"= jkl"', 'mn'] @@ -117,11 +119,8 @@ def SplitPcdValueString(String): RetList.append(Item) return RetList =20 -def IsValidCString(Str): - ValidString =3D re.compile(r'[_a-zA-Z][_0-9a-zA-Z]*$') - if not ValidString.match(Str): - return False - return True +def IsValidCName(Str): + return True if __ValidString.match(Str) else False =20 def BuildOptionValue(PcdValue, GuidDict): IsArray =3D False @@ -912,7 +911,7 @@ class ValueExpressionEx(ValueExpression): Item =3D Item.strip() if LabelList: for Label in LabelList: - if not IsValidCString(Label): + if not IsValidCName(Label): raise BadExpression('%s is not a v= alid c variable name' % Label) if Label not in LabelDict.keys(): LabelDict[Label] =3D str(LabelOffs= et) --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Apr 29 08:20:29 2024 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 1520982715571382.3106836322122; Tue, 13 Mar 2018 16:11:55 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 40D5C22603B11; Tue, 13 Mar 2018 16:05:27 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 9D716224CCC31 for ; Tue, 13 Mar 2018 16:05:23 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 16:11:45 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga005.jf.intel.com with ESMTP; 13 Mar 2018 16:11:45 -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.65; helo=mga03.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.47,466,1515484800"; d="scan'208";a="207954916" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Tue, 13 Mar 2018 16:11:33 -0700 Message-Id: <6ac40f3a1349fa1ae00458f532bbc1138b0f536b.1520982577.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 3/5] BaseTools: Expression - change from series of if to elif X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" since the first character of the string cannot be found by multiple if statements, use elif to optomize the behavior. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Expression.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Sourc= e/Python/Common/Expression.py index c7037dd0d00b..85c1ce9bbc09 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -93,18 +93,18 @@ def SplitPcdValueString(String): for i, ch in enumerate(String): if ch =3D=3D '(': InParenthesis +=3D 1 - if ch =3D=3D ')': + elif ch =3D=3D ')': if InParenthesis: InParenthesis -=3D 1 else: raise BadExpression(ERR_STRING_TOKEN % Item) - if ch =3D=3D '"' and not InSingleQuote: + elif ch =3D=3D '"' and not InSingleQuote: if String[i-1] !=3D '\\': InDoubleQuote =3D not InDoubleQuote - if ch =3D=3D "'" and not InDoubleQuote: + elif ch =3D=3D "'" and not InDoubleQuote: if String[i-1] !=3D '\\': InSingleQuote =3D not InSingleQuote - if ch =3D=3D ',': + elif ch =3D=3D ',': if InParenthesis or InSingleQuote or InDoubleQuote: Item +=3D String[i] continue --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Apr 29 08:20:29 2024 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 152098271816277.34445209243916; Tue, 13 Mar 2018 16:11:58 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id ABC3A2264D22E; Tue, 13 Mar 2018 16:05:27 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 B7D9D224CCC35 for ; Tue, 13 Mar 2018 16:05:23 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 16:11:45 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga005.jf.intel.com with ESMTP; 13 Mar 2018 16:11:45 -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.65; helo=mga03.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.47,466,1515484800"; d="scan'208";a="207954919" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Tue, 13 Mar 2018 16:11:34 -0700 Message-Id: <4a1ad402fb829b375bef0e5d4e45d58a33494537.1520982577.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 4/5] BaseTools: Expression - remove variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" The InArary variable serves no purpose. just do the work immediately. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Expression.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Sourc= e/Python/Common/Expression.py index 85c1ce9bbc09..4f0f377f3788 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -123,7 +123,6 @@ def IsValidCName(Str): return True if __ValidString.match(Str) else False =20 def BuildOptionValue(PcdValue, GuidDict): - IsArray =3D False if PcdValue.startswith('H'): InputValue =3D PcdValue[1:] elif PcdValue.startswith("L'") or PcdValue.startswith("'"): @@ -133,8 +132,6 @@ def BuildOptionValue(PcdValue, GuidDict): else: InputValue =3D PcdValue if IsFieldValueAnArray(InputValue): - IsArray =3D True - if IsArray: try: PcdValue =3D ValueExpressionEx(InputValue, 'VOID*', GuidDict)(= True) except: --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Apr 29 08:20:29 2024 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 1520982720760216.3947172037988; Tue, 13 Mar 2018 16:12:00 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 10B7F2264D23D; Tue, 13 Mar 2018 16:05:28 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 C8C6621ED1C7D for ; Tue, 13 Mar 2018 16:05:23 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 16:11:45 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga005.jf.intel.com with ESMTP; 13 Mar 2018 16:11:45 -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.65; helo=mga03.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.47,466,1515484800"; d="scan'208";a="207954922" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Tue, 13 Mar 2018 16:11:35 -0700 Message-Id: X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [edk2] [PATCH v1 5/5] BaseTools: RangeExpression - remove unused variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" remove a never used variable. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/RangeExpression.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/BaseTools/Source/Python/Common/RangeExpression.py b/BaseTools/= Source/Python/Common/RangeExpression.py index b6c929fd885b..3449711dcc08 100644 --- a/BaseTools/Source/Python/Common/RangeExpression.py +++ b/BaseTools/Source/Python/Common/RangeExpression.py @@ -1,7 +1,7 @@ # # @file # This file is used to parse and evaluate range expression in Pcd declarat= ion. # -# Copyright (c) 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BS= D License # which accompanies this distribution. The full text of the license may= be found at @@ -214,13 +214,6 @@ class RangeExpression(object): RegGuidPattern =3D 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}') ExRegGuidPattern =3D 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}$') =20 - SymbolPattern =3D re.compile("(" - "\$\([A-Z][A-Z0-9_]*\)|\$\(\w+\.\w+\)|\w+= \.\w+|" - "&&|\|\||!(?!=3D)|" - "(?<=3D\W)AND(?=3D\W)|(?<=3D\W)OR(?=3D\W)= |(?<=3D\W)NOT(?=3D\W)|(?<=3D\W)XOR(?=3D\W)|" - "(?<=3D\W)EQ(?=3D\W)|(?<=3D\W)NE(?=3D\W)|= (?<=3D\W)GT(?=3D\W)|(?<=3D\W)LT(?=3D\W)|(?<=3D\W)GE(?=3D\W)|(?<=3D\W)LE(?= =3D\W)" - ")") - =20 RangePattern =3D re.compile(r'[0-9]+ - [0-9]+') =20 def preProcessRangeExpr(self, expr): --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel