From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id E7663AC095C for ; Mon, 22 Apr 2024 01:36:59 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=2+XpV0YOuJbmGAkgjwVPKzvFpbLodpPNa9/OY4W48Sc=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1713749818; v=1; b=s1BTwMYerEVOxXW3bJRa7hLD6npw4/yjVR4htJRIHbzqgCWK52HDw5EBWLlQyPS3cqUoYVeG CxSFgOc4ArNm9qWF3eRQ4H2eh2Mje1MBDnMQ2rUDktDIcSaDqNCACEYprUK4YlZQQoAy8Nxn7vy B4zeHKWSviUaAVs5/e7klsjG1pLLJ84bO+zSmDpEGzOsqu2iiH5wCR5t1sZusozpTmJUVcNw6tX tj8EAAiVFFqp8Z60lzD23tpHrzysyax/w/QCm416GAQs3BxJVItQM6E1j7cDk9haXSwe+6bsIi/ PGrbc+0aEwtgC3lHnwcutHLqgEJZp8yI0ms4nfEo9yGGg== X-Received: by 127.0.0.2 with SMTP id ibzLYY7687511xOlDnChKoIo; Sun, 21 Apr 2024 18:36:58 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mx.groups.io with SMTP id smtpd.web11.8749.1713749815276833478 for ; Sun, 21 Apr 2024 18:36:57 -0700 X-CSE-ConnectionGUID: 8yvFQcqfThmf/I3lXSyZOA== X-CSE-MsgGUID: jqV7aek/ScaJaABch+tz0w== X-IronPort-AV: E=McAfee;i="6600,9927,11051"; a="9151744" X-IronPort-AV: E=Sophos;i="6.07,219,1708416000"; d="scan'208";a="9151744" X-Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2024 18:36:57 -0700 X-CSE-ConnectionGUID: 1nQYsqD/RMO825jL6r3hRA== X-CSE-MsgGUID: 9Km7N+0VSnavyCT7Ls0sLQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,219,1708416000"; d="scan'208";a="23885962" X-Received: from gguo-desk.gar.corp.intel.com ([10.225.76.26]) by fmviesa009.fm.intel.com with ESMTP; 21 Apr 2024 18:36:55 -0700 From: "Guo, Gua" To: devel@edk2.groups.io Cc: gua.guo@intel.com, Chasel Chiu , Nate DeSimone , Duggapu Chinni B , Star Zeng , Ted Kuo , Ashraf Ali S , Susovan Mohapatra Subject: [edk2-devel] [PATCH v1 1/2] IntelFsp2Pkg/GenCfgOpt.py: Python 3.12 support Date: Mon, 22 Apr 2024 09:36:45 +0800 Message-Id: <20240422013646.1769-2-gua.guo@intel.com> In-Reply-To: <20240422013646.1769-1-gua.guo@intel.com> References: <20240422013646.1769-1-gua.guo@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Sun, 21 Apr 2024 18:36:57 -0700 Resent-From: gua.guo@intel.com Reply-To: devel@edk2.groups.io,gua.guo@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: OEuDlJFtwgotuvxlgYLQwf7Jx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=s1BTwMYe; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io From: Gua Guo Ref to https://docs.python.org/3/whatsnew/3.12.html A backslash-character pair that is not a valid escape sequence now generates Cc: Chasel Chiu Cc: Nate DeSimone Cc: Duggapu Chinni B Cc: Star Zeng Cc: Ted Kuo Cc: Ashraf Ali S Cc: Susovan Mohapatra Signed-off-by: Gua Guo --- IntelFsp2Pkg/Tools/GenCfgOpt.py | 96 ++++++++++++++++----------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt= .py index 13be81ddbc..79923c07ed 100644 --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py @@ -136,7 +136,7 @@ class CLogicalExpression: var =3D var.strip()=0D if re.match('^0x[a-fA-F0-9]+$', var):=0D value =3D int(var, 16)=0D - elif re.match('^[+-]?\d+$', var):=0D + elif re.match(r'^[+-]?\d+$', var):=0D value =3D int(var, 10)=0D else:=0D value =3D None=0D @@ -147,7 +147,7 @@ class CLogicalExpression: var =3D ''=0D while not self.isLast():=0D char =3D self.getCurr()=0D - if re.match('^[\w.]', char):=0D + if re.match(r'^[\w.]', char):=0D var +=3D char=0D self.moveNext()=0D else:=0D @@ -161,7 +161,7 @@ class CLogicalExpression: =0D def parseSingleOp(self):=0D self.skipSpace()=0D - if re.match('^NOT\W', self.getCurr(-1)):=0D + if re.match(r'^NOT\W', self.getCurr(-1)):=0D self.moveNext(3)=0D op =3D self.parseBrace()=0D val =3D self.getNumber (op)=0D @@ -225,7 +225,7 @@ class CLogicalExpression: value =3D self.parseCompare()=0D while True:=0D self.skipSpace()=0D - if re.match('^AND\W', self.getCurr(-1)):=0D + if re.match(r'^AND\W', self.getCurr(-1)):=0D self.moveNext(3)=0D result =3D self.parseCompare()=0D test =3D self.getNonNumber(result, value)=0D @@ -243,10 +243,10 @@ class CLogicalExpression: while True:=0D self.skipSpace()=0D op =3D None=0D - if re.match('^XOR\W', self.getCurr(-1)):=0D + if re.match(r'^XOR\W', self.getCurr(-1)):=0D self.moveNext(3)=0D op =3D '^'=0D - elif re.match('^OR\W', self.getCurr(-1)):=0D + elif re.match(r'^OR\W', self.getCurr(-1)):=0D self.moveNext(2)=0D op =3D '|'=0D else:=0D @@ -330,11 +330,11 @@ EndList continue=0D if IsExpression:=0D IsExpression =3D False=0D - Match =3D re.match("(\w+)=3D(.+)", Macro)=0D + Match =3D re.match(r"(\w+)=3D(.+)", Macro)=0D if Match:=0D self._MacroDict[Match.group(1)] =3D Match.group(2)=0D else:=0D - Match =3D re.match("(\w+)", Macro)=0D + Match =3D re.match(r"(\w+)", Macro)=0D if Match:=0D self._MacroDict[Match.group(1)] =3D ''=0D if len(self._MacroDict) =3D=3D 0:=0D @@ -355,7 +355,7 @@ EndList =0D def ExpandMacros (self, Input, Preserve =3D False):=0D Line =3D Input=0D - Match =3D re.findall("\$\(\w+\)", Input)=0D + Match =3D re.findall(r"\$\(\w+\)", Input)=0D if Match:=0D for Each in Match:=0D Variable =3D Each[2:-1]=0D @@ -370,7 +370,7 @@ EndList =0D def ExpandPcds (self, Input):=0D Line =3D Input=0D - Match =3D re.findall("(\w+\.\w+)", Input)=0D + Match =3D re.findall(r"(\w+\.\w+)", Input)=0D if Match:=0D for PcdName in Match:=0D if PcdName in self._PcdsDict:=0D @@ -390,7 +390,7 @@ EndList return Result=0D =0D def ValueToByteArray (self, ValueStr, Length):=0D - Match =3D re.match("\{\s*FILE:(.+)\}", ValueStr)=0D + Match =3D re.match(r"\{\s*FILE:(.+)\}", ValueStr)=0D if Match:=0D FileList =3D Match.group(1).split(',')=0D Result =3D bytearray()=0D @@ -427,7 +427,7 @@ EndList if Each[0] in ['"', "'"]:=0D Result.extend(list(bytearray(Each[1:-1], 'utf-8'))= )=0D elif ':' in Each:=0D - Match =3D re.match("(.+):(\d+)b", Each)=0D + Match =3D re.match(r"(.+):(\d+)b", Each)=0D if Match is None:=0D raise Exception("Invald value list format '%s'= !" % Each)=0D InBitField =3D True=0D @@ -539,7 +539,7 @@ EndList continue=0D =0D Handle =3D False=0D - Match =3D re.match("^\[(.+)\]", DscLine)=0D + Match =3D re.match(r"^\[(.+)\]", DscLine)=0D if Match is not None:=0D IsDefSect =3D False=0D IsPcdSect =3D False=0D @@ -575,7 +575,7 @@ EndList =0D Match =3D False if DscLine[0] !=3D '!' else True=0D if Match:=0D - Match =3D re.match("^!(else|endif|ifdef|ifndef|if|= elseif|include)\s*(.+)?$", DscLine.split("#")[0])=0D + Match =3D re.match(r"^!(else|endif|ifdef|ifndef|if= |elseif|include)\s*(.+)?$", DscLine.split("#")[0])=0D Keyword =3D Match.group(1) if Match else ''=0D Remaining =3D Match.group(2) if Match else ''=0D Remaining =3D '' if Remaining is None else Remaining.s= trip()=0D @@ -620,7 +620,7 @@ EndList else:=0D Handle =3D True=0D if Handle:=0D - Match =3D re.match("!include\s+(.+)", DscLine)= =0D + Match =3D re.match(r"!include\s+(.+)", DscLine= )=0D if Match:=0D IncludeFilePath =3D Match.group(1)=0D IncludeFilePath =3D self.ExpandMacros(Incl= udeFilePath)=0D @@ -660,7 +660,7 @@ EndList #DEFINE FSP_T_UPD_TOOL_GUID =3D 34686CA3-34F9-4901-B82A-BA= 630F0714C6=0D #DEFINE FSP_M_UPD_TOOL_GUID =3D 39A250DB-E465-4DD1-A2AC-E2= BD3C0E2385=0D #DEFINE FSP_S_UPD_TOOL_GUID =3D CAE3605B-5B34-4C85-B3D7-27= D54273C40F=0D - Match =3D re.match("^\s*(?:DEFINE\s+)*(\w+)\s*=3D\s*(.+)",= DscLine)=0D + Match =3D re.match(r"^\s*(?:DEFINE\s+)*(\w+)\s*=3D\s*(.+)"= , DscLine)=0D if Match:=0D self._MacroDict[Match.group(1)] =3D self.ExpandMacros(= Match.group(2))=0D if self.Debug:=0D @@ -668,21 +668,21 @@ EndList elif IsPcdSect:=0D #gSiPkgTokenSpaceGuid.PcdTxtEnable|FALSE=0D #gSiPkgTokenSpaceGuid.PcdOverclockEnable|TRUE=0D - Match =3D re.match("^\s*([\w\.]+)\s*\|\s*(\w+)", DscLine)= =0D + Match =3D re.match(r"^\s*([\w\.]+)\s*\|\s*(\w+)", DscLine)= =0D if Match:=0D self._PcdsDict[Match.group(1)] =3D Match.group(2)=0D if self.Debug:=0D print ("INFO : PCD %s =3D [ %s ]" % (Match.group(1= ), Match.group(2)))=0D i =3D 0=0D while i < len(BuildOptionPcd):=0D - Match =3D re.match("\s*([\w\.]+)\s*\=3D\s*(\w+)", = BuildOptionPcd[i])=0D + Match =3D re.match(r"\s*([\w\.]+)\s*\=3D\s*(\w+)",= BuildOptionPcd[i])=0D if Match:=0D self._PcdsDict[Match.group(1)] =3D Match.group= (2)=0D i +=3D 1=0D =0D elif IsTmpSect:=0D # !BSF DEFT:{GPIO_TMPL:START}=0D - Match =3D re.match("^\s*#\s+(!BSF)\s+DEFT:{(.+?):(START|EN= D)}", DscLine)=0D + Match =3D re.match(r"^\s*#\s+(!BSF)\s+DEFT:{(.+?):(START|E= ND)}", DscLine)=0D if Match:=0D if Match.group(3) =3D=3D 'START' and not TemplateName:= =0D TemplateName =3D Match.group(2).strip()=0D @@ -691,33 +691,33 @@ EndList TemplateName =3D ''=0D else:=0D if TemplateName:=0D - Match =3D re.match("^!include\s*(.+)?$", DscLine)= =0D + Match =3D re.match(r"^!include\s*(.+)?$", DscLine)= =0D if Match:=0D continue=0D self._BsfTempDict[TemplateName].append(DscLine)=0D =0D else:=0D - Match =3D re.match("^\s*#\s+(!BSF|@Bsf|!HDR)\s+(.+)", DscL= ine)=0D + Match =3D re.match(r"^\s*#\s+(!BSF|@Bsf|!HDR)\s+(.+)", Dsc= Line)=0D if Match:=0D Remaining =3D Match.group(2)=0D if Match.group(1) =3D=3D '!BSF' or Match.group(1) =3D= =3D '@Bsf':=0D - Match =3D re.match("(?:^|.+\s+)PAGES:{(.+?)}", Rem= aining)=0D + Match =3D re.match(r"(?:^|.+\s+)PAGES:{(.+?)}", Re= maining)=0D if Match:=0D # !BSF PAGES:{HSW:"Haswell System Agent", LPT:= "Lynx Point PCH"}=0D PageList =3D Match.group(1).split(',')=0D for Page in PageList:=0D Page =3D Page.strip()=0D - Match =3D re.match("(\w+):\"(.+)\"", Page)= =0D + Match =3D re.match(r"(\w+):\"(.+)\"", Page= )=0D if Match !=3D None:=0D self._CfgPageDict[Match.group(1)] =3D = Match.group(2)=0D =0D - Match =3D re.match("(?:^|.+\s+)BLOCK:{NAME:\"(.+)\= "\s*,\s*VER:\"(.+)\"\s*}", Remaining)=0D + Match =3D re.match(r"(?:^|.+\s+)BLOCK:{NAME:\"(.+)= \"\s*,\s*VER:\"(.+)\"\s*}", Remaining)=0D if Match:=0D self._CfgBlkDict['name'] =3D Match.group(1)=0D self._CfgBlkDict['ver'] =3D Match.group(2)=0D =0D for Key in self._BsfKeyList:=0D - Match =3D re.match("(?:^|.+\s+)%s:{(.+?)}" % K= ey, Remaining)=0D + Match =3D re.match(r"(?:^|.+\s+)%s:{(.+?)}" % = Key, Remaining)=0D if Match:=0D if Key in ['NAME', 'HELP', 'OPTION'] and M= atch.group(1).startswith('+'):=0D ConfigDict[Key.lower()] +=3D Match.gro= up(1)[1:]=0D @@ -725,15 +725,15 @@ EndList ConfigDict[Key.lower()] =3D Match.gro= up(1)=0D else:=0D for Key in self._HdrKeyList:=0D - Match =3D re.match("(?:^|.+\s+)%s:{(.+?)}" % K= ey, Remaining)=0D + Match =3D re.match(r"(?:^|.+\s+)%s:{(.+?)}" % = Key, Remaining)=0D if Match:=0D ConfigDict[Key.lower()] =3D Match.group(1= )=0D =0D - Match =3D re.match("^\s*#\s+@Prompt\s+(.+)", DscLine)=0D + Match =3D re.match(r"^\s*#\s+@Prompt\s+(.+)", DscLine)=0D if Match:=0D ConfigDict['name'] =3D Match.group(1)=0D =0D - Match =3D re.match("^\s*#\s*@ValidList\s*(.+)\s*\|\s*(.+)\= s*\|\s*(.+)\s*", DscLine)=0D + Match =3D re.match(r"^\s*#\s*@ValidList\s*(.+)\s*\|\s*(.+)= \s*\|\s*(.+)\s*", DscLine)=0D if Match:=0D if Match.group(2).strip() in self._BuidinOption:=0D ConfigDict['option'] =3D Match.group(2).strip()=0D @@ -749,22 +749,22 @@ EndList ConfigDict['option'] +=3D ', '=0D ConfigDict['type'] =3D "Combo"=0D =0D - Match =3D re.match("^\s*#\s*@ValidRange\s*(.+)\s*\|\s*(.+)= \s*-\s*(.+)\s*", DscLine)=0D + Match =3D re.match(r"^\s*#\s*@ValidRange\s*(.+)\s*\|\s*(.+= )\s*-\s*(.+)\s*", DscLine)=0D if Match:=0D if "0x" in Match.group(2) or "0x" in Match.group(3):=0D ConfigDict['type'] =3D "EditNum, HEX, (%s,%s)" % (= Match.group(2), Match.group(3))=0D else:=0D ConfigDict['type'] =3D "EditNum, DEC, (%s,%s)" % (= Match.group(2), Match.group(3))=0D =0D - Match =3D re.match("^\s*##\s+(.+)", DscLine)=0D + Match =3D re.match(r"^\s*##\s+(.+)", DscLine)=0D if Match:=0D ConfigDict['help'] =3D Match.group(1)=0D =0D # Check VPD/UPD=0D if IsUpdSect:=0D - Match =3D re.match("^([_a-zA-Z0-9]+).([_a-zA-Z0-9]+)\s= *\|\s*(0x[0-9A-F]+|\*)\s*\|\s*(\d+|0x[0-9a-fA-F]+)\s*\|\s*(.+)",DscLine)=0D + Match =3D re.match(r"^([_a-zA-Z0-9]+).([_a-zA-Z0-9]+)\= s*\|\s*(0x[0-9A-F]+|\*)\s*\|\s*(\d+|0x[0-9a-fA-F]+)\s*\|\s*(.+)",DscLine)=0D else:=0D - Match =3D re.match("^([_a-zA-Z0-9]+).([_a-zA-Z0-9]+)\s= *\|\s*(0x[0-9A-F]+)(?:\s*\|\s*(.+))?", DscLine)=0D + Match =3D re.match(r"^([_a-zA-Z0-9]+).([_a-zA-Z0-9]+)\= s*\|\s*(0x[0-9A-F]+)(?:\s*\|\s*(.+))?", DscLine)=0D if Match:=0D ConfigDict['space'] =3D Match.group(1)=0D ConfigDict['cname'] =3D Match.group(2)=0D @@ -796,13 +796,13 @@ EndList Value =3D ''=0D Value =3D Value.strip()=0D if '|' in Value:=0D - Match =3D re.match("^.+\s*\|\s*(.+)", Value)=0D + Match =3D re.match(r"^.+\s*\|\s*(.+)", Value)= =0D if Match:=0D Value =3D Match.group(1)=0D Length =3D -1=0D =0D ConfigDict['length'] =3D Length=0D - Match =3D re.match("\$\((\w+)\)", Value)=0D + Match =3D re.match(r"\$\((\w+)\)", Value)=0D if Match:=0D if Match.group(1) in self._MacroDict:=0D Value =3D self._MacroDict[Match.group(1)]=0D @@ -879,7 +879,7 @@ EndList # !BSF FIELD:{SerialDebugPortAddress0:1}=0D # or=0D # @Bsf FIELD:{SerialDebugPortAddress0:1b}=0D - Match =3D re.match("^\s*#\s+(!BSF|@Bsf)\s+FIELD:{(.+):= (\d+)([Bb])?}", DscLine)=0D + Match =3D re.match(r"^\s*#\s+(!BSF|@Bsf)\s+FIELD:{(.+)= :(\d+)([Bb])?}", DscLine)=0D if Match:=0D SubCfgDict =3D ConfigDict.copy()=0D if (Match.group(4) =3D=3D None) or (Match.group(4)= =3D=3D 'B'):=0D @@ -1023,7 +1023,7 @@ EndList self._VarDict['_LENGTH_'] =3D '%d' % (Item['offset'] + Item['l= ength'])=0D for Item in self._CfgItemList:=0D Embed =3D Item['embed']=0D - Match =3D re.match("^(\w+):(\w+):(START|END)", Embed)=0D + Match =3D re.match(r"^(\w+):(\w+):(START|END)", Embed)=0D if Match:=0D StructName =3D Match.group(1)=0D VarName =3D '_%s_%s_' % (Match.group(3), StructName)=0D @@ -1215,7 +1215,7 @@ EndList IsUpdHeader =3D False=0D for Line in TextBody:=0D SplitToLines =3D Line.splitlines()=0D - MatchComment =3D re.match("^/\*\sCOMMENT:(\w+):([\w|\W|\s]+)\s\= */\s([\s\S]*)", SplitToLines[0])=0D + MatchComment =3D re.match(r"^/\*\sCOMMENT:(\w+):([\w|\W|\s]+)\s= \*/\s([\s\S]*)", SplitToLines[0])=0D if MatchComment:=0D if MatchComment.group(1) =3D=3D 'FSP_UPD_HEADER':=0D IsUpdHeader =3D True=0D @@ -1226,7 +1226,7 @@ EndList NewTextBody.append("/**" + CommentLine + "**/\n")=0D Line =3D Line[(len(SplitToLines[0]) + 1):]=0D =0D - Match =3D re.match("^/\*\sEMBED_STRUCT:(\w+):(\w+):(START|END)\= s\*/\s([\s\S]*)", Line)=0D + Match =3D re.match(r"^/\*\sEMBED_STRUCT:(\w+):(\w+):(START|END)= \s\*/\s([\s\S]*)", Line)=0D if Match:=0D Line =3D Match.group(4)=0D if Match.group(1) =3D=3D 'FSP_UPD_HEADER':=0D @@ -1239,7 +1239,7 @@ EndList NewTextBody.append ('typedef struct {\n')=0D StructName =3D Match.group(1)=0D VariableName =3D Match.group(2)=0D - MatchOffset =3D re.search('/\*\*\sOffset\s0x([a-fA-F0-9]+)'= , Line)=0D + MatchOffset =3D re.search(r'/\*\*\sOffset\s0x([a-fA-F0-9]+)= ', Line)=0D if MatchOffset:=0D Offset =3D int(MatchOffset.group(1), 16)=0D else:=0D @@ -1318,12 +1318,12 @@ EndList CommentLine =3D ""=0D for Item in self._CfgItemList:=0D if Item["comment"] !=3D '' and Item["offset"] >=3D Upd= OffsetTable[UpdIdx]:=0D - MatchComment =3D re.match("^(U|V)PD_DATA_REGION:([= \w|\W|\s]+)", Item["comment"])=0D + MatchComment =3D re.match(r"^(U|V)PD_DATA_REGION:(= [\w|\W|\s]+)", Item["comment"])=0D if MatchComment and MatchComment.group(1) =3D=3D R= egion[0]:=0D CommentLine =3D " " + MatchComment.group(2) + = "\n"=0D TxtBody.append("/**" + CommentLine + "**/\n")= =0D elif Item["offset"] >=3D UpdOffsetTable[UpdIdx] and It= em["comment"] =3D=3D '':=0D - Match =3D re.match("^FSP([\w|\W|\s])_UPD", UpdStru= cture[UpdIdx])=0D + Match =3D re.match(r"^FSP([\w|\W|\s])_UPD", UpdStr= ucture[UpdIdx])=0D if Match:=0D TxtBody.append("/** Fsp " + Match.group(1) + "= UPD Configuration\n**/\n")=0D TxtBody.append("typedef struct {\n")=0D @@ -1441,7 +1441,7 @@ EndList =0D Export =3D False=0D for Line in IncLines:=0D - Match =3D re.search ("!EXPORT\s+([A-Z]+)\s+EXTERNAL_BOOTLO= ADER_STRUCT_(BEGIN|END)\s+", Line)=0D + Match =3D re.search (r"!EXPORT\s+([A-Z]+)\s+EXTERNAL_BOOTL= OADER_STRUCT_(BEGIN|END)\s+", Line)=0D if Match:=0D if Match.group(2) =3D=3D "BEGIN" and Match.group(1) = =3D=3D UpdRegionCheck[item]:=0D Export =3D True=0D @@ -1464,7 +1464,7 @@ EndList Match =3D re.match("(typedef struct {)", Line)=0D if Match:=0D StartIndex =3D Index - 1=0D - Match =3D re.match("}\s([_A-Z0-9]+);", Line)=0D + Match =3D re.match(r"}\s([_A-Z0-9]+);", Line)=0D if Match and (UpdRegionCheck[item] in Match.group(1) or Up= dConfigCheck[item] in Match.group(1)) and (ExcludedSpecificUpd[item] not in= Match.group(1)) and (ExcludedSpecificUpd1[item] not in Match.group(1)):=0D EndIndex =3D Index=0D StructStart.append(StartIndex)=0D @@ -1474,7 +1474,7 @@ EndList Index +=3D 1=0D for Item in range(len(StructStart)):=0D if Index =3D=3D StructStart[Item]:=0D - Match =3D re.match("^(/\*\*\s*)", Line)=0D + Match =3D re.match(r"^(/\*\*\s*)", Line)=0D if Match:=0D StructStartWithComment.append(StructStart[Item= ])=0D else:=0D @@ -1510,7 +1510,7 @@ EndList Match =3D re.match("(typedef struct {)", Line)=0D if Match:=0D StartIndex =3D Index - 1=0D - Match =3D re.match("#define\s([_A-Z0-9]+)\s*", Line)=0D + Match =3D re.match(r"#define\s([_A-Z0-9]+)\s*", Line)=0D if Match and (UpdSignatureCheck[item] in Match.group(1) or= UpdSignatureCheck[item] in Match.group(1)):=0D StructStart.append(Index - 1)=0D StructEnd.append(Index)=0D @@ -1519,7 +1519,7 @@ EndList Index +=3D 1=0D for Item in range(len(StructStart)):=0D if Index =3D=3D StructStart[Item]:=0D - Match =3D re.match("^(/\*\*\s*)", Line)=0D + Match =3D re.match(r"^(/\*\*\s*)", Line)=0D if Match:=0D StructStartWithComment.append(StructStart[Item= ])=0D else:=0D @@ -1543,7 +1543,7 @@ EndList else:=0D Space =3D Item['space']=0D Line =3D " $%s_%s" % (Space, Item['cname'])=0D - Match =3D re.match("\s*\{([x0-9a-fA-F,\s]+)\}\s*", Item['value'])= =0D + Match =3D re.match(r"\s*\{([x0-9a-fA-F,\s]+)\}\s*", Item['value'])= =0D if Match:=0D DefaultValue =3D Match.group(1).strip()=0D else:=0D @@ -1576,7 +1576,7 @@ EndList BsfFd.write(' %s $%s, "%s", &%s,\n' % (Item['type'], PcdNam= e, Item['name'], Options))=0D WriteHelp =3D 1=0D elif Item['type'].startswith("EditNum"):=0D - Match =3D re.match("EditNum\s*,\s*(HEX|DEC)\s*,\s*\((\d+|0x[0-= 9A-Fa-f]+)\s*,\s*(\d+|0x[0-9A-Fa-f]+)\)", Item['type'])=0D + Match =3D re.match(r"EditNum\s*,\s*(HEX|DEC)\s*,\s*\((\d+|0x[0= -9A-Fa-f]+)\s*,\s*(\d+|0x[0-9A-Fa-f]+)\)", Item['type'])=0D if Match:=0D BsfFd.write(' EditNum $%s, "%s", %s,\n' % (PcdName, Ite= m['name'], Match.group(1)))=0D WriteHelp =3D 2=0D --=20 2.39.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118060): https://edk2.groups.io/g/devel/message/118060 Mute This Topic: https://groups.io/mt/105662400/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-