#\r
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
#\r
-# This program and the accompanying materials are licensed and made available\r
-# under the terms and conditions of the BSD License which accompanies this\r
-# distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
\r
'''\r
"The format %s of ErrorCode is not valid, should be UNIT32 type or long type" % Value,\r
File = ContainerFile,\r
Line = LineNum)\r
- return hex(ErrorCode)\r
+ ErrorCode = '0x%x' % ErrorCode\r
+ return ErrorCode\r
except ValueError as XStr:\r
if XStr:\r
pass\r
\r
return IsValidListExpr(ListExpr)\r
\r
-## _CheckExpreesion\r
+## _CheckExpression\r
#\r
# @param Expression: Pcd value expression\r
#\r
\r
def GenerateTokenList (Comment):\r
#\r
- # Tokenize Comment using '#' and ' ' as token seperators\r
+ # Tokenize Comment using '#' and ' ' as token separators\r
#\r
- RelplacedComment = None\r
- while Comment != RelplacedComment:\r
- RelplacedComment = Comment\r
+ ReplacedComment = None\r
+ while Comment != ReplacedComment:\r
+ ReplacedComment = Comment\r
Comment = Comment.replace('##', '#').replace(' ', ' ').replace(' ', '#').strip('# ')\r
return Comment.split('#')\r
\r
NumTokens = 1\r
\r
#\r
- # Initialze HelpText to Comment.\r
+ # Initialize HelpText to Comment.\r
# Content will be remove from HelpText as matching tokens are found\r
#\r
HelpText = Comment\r
\r
#\r
- # Tokenize Comment using '#' and ' ' as token seperators\r
+ # Tokenize Comment using '#' and ' ' as token separators\r
#\r
List = GenerateTokenList (Comment)\r
\r