From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ml01.01.org (Postfix) with ESMTP id 04ABD1A1E13 for ; Sun, 7 Aug 2016 19:39:01 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 07 Aug 2016 19:39:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,487,1464678000"; d="scan'208";a="745564477" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 07 Aug 2016 19:39:02 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 7 Aug 2016 19:39:01 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 7 Aug 2016 19:39:01 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.8]) with mapi id 14.03.0248.002; Mon, 8 Aug 2016 10:38:59 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: Felix Thread-Topic: [edk2] [Patch] BaseTools: Allow string token identifier to use lower case letters Thread-Index: AQHR7LGBP1gxUvVC6kO6phub0KRvyaA+YpVg Date: Mon, 8 Aug 2016 02:38:59 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155E60EC@shsmsx102.ccr.corp.intel.com> References: <1470137515-83680-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1470137515-83680-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: Allow string token identifier to use lower case letters X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2016 02:39:02 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Yonghong Zhu > Sent: Tuesday, August 02, 2016 7:32 PM > To: edk2-devel@lists.01.org > Cc: Felix ; Gao, Liming > Subject: [edk2] [Patch] BaseTools: Allow string token identifier to use l= ower > case letters >=20 > This patch is to align the code behavior with UNI spec that string token > identifier can use upper case and lower case letters. >=20 > Cc: Liming Gao > Cc: Felix > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/AutoGen/UniClassObject.py | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py > b/BaseTools/Source/Python/AutoGen/UniClassObject.py > index 183b2b2..856d19c 100644 > --- a/BaseTools/Source/Python/AutoGen/UniClassObject.py > +++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py > @@ -346,15 +346,15 @@ class UniFileClassObject(object): > def GetStringObject(self, Item): > Language =3D '' > Value =3D '' >=20 > Name =3D Item.split()[1] > - # Check the string name is the upper character > + # Check the string name > if Name !=3D '': > - MatchString =3D re.match('[A-Z0-9_]+', Name, re.UNICODE) > + MatchString =3D re.match('^[a-zA-Z][a-zA-Z0-9_]*$', Name, > re.UNICODE) > if MatchString =3D=3D None or MatchString.end(0) !=3D len(Na= me): > - EdkLogger.error('Unicode File Parser', FORMAT_INVALID, '= The string > token name %s defined in UNI file %s contains the invalid lower case > character.' % (Name, self.File)) > + EdkLogger.error('Unicode File Parser', FORMAT_INVALID, '= The > string token name %s defined in UNI file %s contains the invalid characte= r.' % > (Name, self.File)) > LanguageList =3D Item.split(u'#language ') > for IndexI in range(len(LanguageList)): > if IndexI =3D=3D 0: > continue > else: > @@ -516,15 +516,15 @@ class UniFileClassObject(object): > else: > IndexI =3D IndexJ > break > # Value =3D Value.replace(u'\r\n', u'') > Language =3D GetLanguageCode(Language, self.IsCompatible= Mode, > self.File) > - # Check the string name is the upper character > + # Check the string name > if not self.IsCompatibleMode and Name !=3D '': > - MatchString =3D re.match('[A-Z0-9_]+', Name, re.UNIC= ODE) > + MatchString =3D re.match('^[a-zA-Z][a-zA-Z0-9_]*$', = Name, > re.UNICODE) > if MatchString =3D=3D None or MatchString.end(0) != =3D len(Name): > - EdkLogger.error('Unicode File Parser', FORMAT_IN= VALID, 'The > string token name %s defined in UNI file %s contains the invalid lower ca= se > character.' % (Name, self.File)) > + EdkLogger.error('Unicode File Parser', FORMAT_IN= VALID, 'The > string token name %s defined in UNI file %s contains the invalid characte= r.' % > (Name, self.File)) > self.AddStringToList(Name, Language, Value) > continue >=20 > # > # Get string def information format 2 as below > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel