From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 8C5DD21B02822 for ; Tue, 4 Sep 2018 18:00:35 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2018 18:00:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,331,1531810800"; d="scan'208";a="70374654" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 04 Sep 2018 18:00:32 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 4 Sep 2018 18:00:32 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 4 Sep 2018 18:00:31 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.150]) with mapi id 14.03.0319.002; Wed, 5 Sep 2018 09:00:30 +0800 From: "Zhu, Yonghong" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [edk2] [Patch] BaseTools: Report more clear error message for PCD used in expression Thread-Index: AQHURB82HwPSl+mAOU6PdHI8Nc0JC6Tg306Q Date: Wed, 5 Sep 2018 01:00:29 +0000 Message-ID: References: <1536045335-21032-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1536045335-21032-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Report more clear error message for PCD used in expression X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2018 01:00:35 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yong= hong Zhu Sent: Tuesday, September 04, 2018 3:16 PM To: edk2-devel@lists.01.org Cc: Gao, Liming Subject: [edk2] [Patch] BaseTools: Report more clear error message for PCD = used in expression From: zhijufan Only the FeatureFlag type or FixedAtBuild type can be used in the expressio= n. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/Common/Expression.py | 2 +- BaseTools/Source/Python/Common/RangeExpression.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Sourc= e/Python/Common/Expression.py index 78c69fa..ff92710 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -27,11 +27,11 @@ ERR_STRING_EXPR =3D 'This operator cannot be us= ed in string expression: [% ERR_SNYTAX =3D 'Syntax error, the rest of expression cannot b= e evaluated: [%s].' ERR_MATCH =3D 'No matching right parenthesis.' ERR_STRING_TOKEN =3D 'Bad string token: [%s].' ERR_MACRO_TOKEN =3D 'Bad macro token: [%s].' ERR_EMPTY_TOKEN =3D 'Empty token is not allowed.' -ERR_PCD_RESOLVE =3D 'PCD token cannot be resolved: [%s].' +ERR_PCD_RESOLVE =3D 'The PCD should be FeatureFlag type or FixedAt= Build type: [%s].' ERR_VALID_TOKEN =3D 'No more valid token found from rest of string= : [%s].' ERR_EXPR_TYPE =3D 'Different types found in expression.' ERR_OPERATOR_UNSUPPORT =3D 'Unsupported operator: [%s]' ERR_REL_NOT_IN =3D 'Expect "IN" after "not" operator.' WRN_BOOL_EXPR =3D 'Operand of boolean type cannot be used in ari= thmetic expression.' diff --git a/BaseTools/Source/Python/Common/RangeExpression.py b/BaseTools/= Source/Python/Common/RangeExpression.py index 20581ed..407dc06 100644 --- a/BaseTools/Source/Python/Common/RangeExpression.py +++ b/BaseTools/Source/Python/Common/RangeExpression.py @@ -24,11 +24,11 @@ ERR_STRING_EXPR =3D 'This operator cannot be used in st= ring expression: [%s].' ERR_SNYTAX =3D 'Syntax error, the rest of expression cannot be evaluated: = [%s].' ERR_MATCH =3D 'No matching right parenthesis.' ERR_STRING_TOKEN =3D 'Bad string token: [%s].' ERR_MACRO_TOKEN =3D 'Bad macro token: [%s].' ERR_EMPTY_TOKEN =3D 'Empty token is not allowed.' -ERR_PCD_RESOLVE =3D 'PCD token cannot be resolved: [%s].' +ERR_PCD_RESOLVE =3D 'The PCD should be FeatureFlag type or FixedAtBuild ty= pe: [%s].' ERR_VALID_TOKEN =3D 'No more valid token found from rest of string: [%s].' ERR_EXPR_TYPE =3D 'Different types found in expression.' ERR_OPERATOR_UNSUPPORT =3D 'Unsupported operator: [%s]' ERR_REL_NOT_IN =3D 'Expect "IN" after "not" operator.' WRN_BOOL_EXPR =3D 'Operand of boolean type cannot be used in arithmetic ex= pression.' -- 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel