summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/UPT/Library
diff options
context:
space:
mode:
authorAntoine Coeur <Coeur@gmx.fr>2019-02-06 15:44:39 +0800
committerLiming Gao <liming.gao@intel.com>2019-02-14 10:02:28 +0800
commitfb0b35e05f772bd415fe264267bbbcde2e0accda (patch)
tree02a7553984090494ef5236f043fe6b59f619b7d5 /BaseTools/Source/Python/UPT/Library
parent325ad6226099d276564a65cdef012de0ff45ba8e (diff)
downloadedk2-fb0b35e05f772bd415fe264267bbbcde2e0accda.tar.gz
edk2-fb0b35e05f772bd415fe264267bbbcde2e0accda.tar.bz2
edk2-fb0b35e05f772bd415fe264267bbbcde2e0accda.zip
BaseTools: Various typo
Various typo in BaseTools. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/UPT/Library')
-rw-r--r--BaseTools/Source/Python/UPT/Library/CommentParsing.py14
-rw-r--r--BaseTools/Source/Python/UPT/Library/DataType.py2
-rw-r--r--BaseTools/Source/Python/UPT/Library/GlobalData.py2
-rw-r--r--BaseTools/Source/Python/UPT/Library/Misc.py8
-rw-r--r--BaseTools/Source/Python/UPT/Library/ParserValidate.py14
-rw-r--r--BaseTools/Source/Python/UPT/Library/Parsing.py2
-rw-r--r--BaseTools/Source/Python/UPT/Library/StringUtils.py12
-rw-r--r--BaseTools/Source/Python/UPT/Library/UniClassObject.py20
8 files changed, 37 insertions, 37 deletions
diff --git a/BaseTools/Source/Python/UPT/Library/CommentParsing.py b/BaseTools/Source/Python/UPT/Library/CommentParsing.py
index a09a530ffb..250ba2dd5e 100644
--- a/BaseTools/Source/Python/UPT/Library/CommentParsing.py
+++ b/BaseTools/Source/Python/UPT/Library/CommentParsing.py
@@ -426,7 +426,7 @@ def _CheckListExpression(Expression):
return IsValidListExpr(ListExpr)
-## _CheckExpreesion
+## _CheckExpression
#
# @param Expression: Pcd value expression
#
@@ -476,11 +476,11 @@ def _ValidateCopyright(Line):
def GenerateTokenList (Comment):
#
- # Tokenize Comment using '#' and ' ' as token seperators
+ # Tokenize Comment using '#' and ' ' as token separators
#
- RelplacedComment = None
- while Comment != RelplacedComment:
- RelplacedComment = Comment
+ ReplacedComment = None
+ while Comment != ReplacedComment:
+ ReplacedComment = Comment
Comment = Comment.replace('##', '#').replace(' ', ' ').replace(' ', '#').strip('# ')
return Comment.split('#')
@@ -538,13 +538,13 @@ def ParseComment (Comment, UsageTokens, TypeTokens, RemoveTokens, ParseVariable)
NumTokens = 1
#
- # Initialze HelpText to Comment.
+ # Initialize HelpText to Comment.
# Content will be remove from HelpText as matching tokens are found
#
HelpText = Comment
#
- # Tokenize Comment using '#' and ' ' as token seperators
+ # Tokenize Comment using '#' and ' ' as token separators
#
List = GenerateTokenList (Comment)
diff --git a/BaseTools/Source/Python/UPT/Library/DataType.py b/BaseTools/Source/Python/UPT/Library/DataType.py
index 97ca835882..07673694b2 100644
--- a/BaseTools/Source/Python/UPT/Library/DataType.py
+++ b/BaseTools/Source/Python/UPT/Library/DataType.py
@@ -93,7 +93,7 @@ TAB_STR_TOKENHELP = 'HELP'
TAB_STR_TOKENERR = 'ERR'
#
-# Dictionary of usage tokens and their synonmys
+# Dictionary of usage tokens and their synonyms
#
ALL_USAGE_TOKENS = {
"PRODUCES" : "PRODUCES",
diff --git a/BaseTools/Source/Python/UPT/Library/GlobalData.py b/BaseTools/Source/Python/UPT/Library/GlobalData.py
index 40b17cf083..6b093873dd 100644
--- a/BaseTools/Source/Python/UPT/Library/GlobalData.py
+++ b/BaseTools/Source/Python/UPT/Library/GlobalData.py
@@ -43,7 +43,7 @@ gINVALID_MODULE_FILE = gUPT_DIR + r"Invalid_Modules.log"
gCONTENT_FILE = "dist.content"
#
-# File name for XML file in the distibution
+# File name for XML file in the distribution
#
gDESC_FILE = 'dist.pkg'
diff --git a/BaseTools/Source/Python/UPT/Library/Misc.py b/BaseTools/Source/Python/UPT/Library/Misc.py
index d69b161420..e7ee27cc53 100644
--- a/BaseTools/Source/Python/UPT/Library/Misc.py
+++ b/BaseTools/Source/Python/UPT/Library/Misc.py
@@ -788,7 +788,7 @@ def GetLibInstanceInfo(String, WorkSpace, LineNo):
FileGuidString = ""
VerString = ""
- OrignalString = String
+ OriginalString = String
String = String.strip()
if not String:
return None, None
@@ -808,7 +808,7 @@ def GetLibInstanceInfo(String, WorkSpace, LineNo):
ST.ERR_FILELIST_EXIST % (String),
File=GlobalData.gINF_MODULE_NAME,
Line=LineNo,
- ExtraData=OrignalString)
+ ExtraData=OriginalString)
#
# Validate file exist/format.
@@ -821,7 +821,7 @@ def GetLibInstanceInfo(String, WorkSpace, LineNo):
ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID % (String),
File=GlobalData.gINF_MODULE_NAME,
Line=LineNo,
- ExtraData=OrignalString)
+ ExtraData=OriginalString)
return False
if IsValidFileFlag:
FileLinesList = []
@@ -973,7 +973,7 @@ def ValidateUNIFilePath(Path):
ExtraData=Path)
#
- # Check if '..' in the file name(without suffixe)
+ # Check if '..' in the file name(without suffix)
#
if (TAB_SPLIT + TAB_SPLIT) in Path:
Logger.Error("Unicode File Parser",
diff --git a/BaseTools/Source/Python/UPT/Library/ParserValidate.py b/BaseTools/Source/Python/UPT/Library/ParserValidate.py
index 87d156fa4c..1408aec242 100644
--- a/BaseTools/Source/Python/UPT/Library/ParserValidate.py
+++ b/BaseTools/Source/Python/UPT/Library/ParserValidate.py
@@ -13,7 +13,7 @@
#
'''
-PaserValidate
+ParserValidate
'''
import os.path
@@ -68,7 +68,7 @@ def IsValidHex(HexStr):
#
def IsValidBoolType(BoolString):
#
- # Valid Ture
+ # Valid True
#
if BoolString == 'TRUE' or \
BoolString == 'True' or \
@@ -124,11 +124,11 @@ def IsValidInfComponentType(ComponentType):
## Is valid Tool Family or not
#
# @param ToolFamily: A string contain Tool Family need to be judged.
-# Famlily := [A-Z]([a-zA-Z0-9])*
+# Family := [A-Z]([a-zA-Z0-9])*
#
def IsValidToolFamily(ToolFamily):
- ReIsValieFamily = re.compile(r"^[A-Z]+[A-Za-z0-9]{0,}$", re.DOTALL)
- if ReIsValieFamily.match(ToolFamily) is None:
+ ReIsValidFamily = re.compile(r"^[A-Z]+[A-Za-z0-9]{0,}$", re.DOTALL)
+ if ReIsValidFamily.match(ToolFamily) is None:
return False
return True
@@ -158,8 +158,8 @@ def IsValidToolTagName(TagName):
def IsValidArch(Arch):
if Arch == 'common':
return True
- ReIsValieArch = re.compile(r"^[a-zA-Z]+[a-zA-Z0-9]{0,}$", re.DOTALL)
- if ReIsValieArch.match(Arch) is None:
+ ReIsValidArch = re.compile(r"^[a-zA-Z]+[a-zA-Z0-9]{0,}$", re.DOTALL)
+ if ReIsValidArch.match(Arch) is None:
return False
return True
diff --git a/BaseTools/Source/Python/UPT/Library/Parsing.py b/BaseTools/Source/Python/UPT/Library/Parsing.py
index 3eca8e3849..f7e995b93e 100644
--- a/BaseTools/Source/Python/UPT/Library/Parsing.py
+++ b/BaseTools/Source/Python/UPT/Library/Parsing.py
@@ -959,7 +959,7 @@ def MacroParser(Line, FileName, SectionType, FileLocalMacros):
# INF, DEC specs
# @param SectionDict: section statement dict, key is SectionAttrs(arch,
# moduletype or platform may exist as needed) list
-# seperated by space,
+# separated by space,
# value is statement
#
def GenSection(SectionName, SectionDict, SplitArch=True, NeedBlankLine=False):
diff --git a/BaseTools/Source/Python/UPT/Library/StringUtils.py b/BaseTools/Source/Python/UPT/Library/StringUtils.py
index a3391daa91..6fa1ee89d4 100644
--- a/BaseTools/Source/Python/UPT/Library/StringUtils.py
+++ b/BaseTools/Source/Python/UPT/Library/StringUtils.py
@@ -33,7 +33,7 @@ gMACRO_PATTERN = re.compile("\$\(([_A-Z][_A-Z0-9]*)\)", re.UNICODE)
## GetSplitValueList
#
-# Get a value list from a string with multiple values splited with SplitTag
+# Get a value list from a string with multiple values split with SplitTag
# The default SplitTag is DataType.TAB_VALUE_SPLIT
# 'AAA|BBB|CCC' -> ['AAA', 'BBB', 'CCC']
#
@@ -67,7 +67,7 @@ def MergeArches(Dict, Key, Arch):
# Return False if invalid format
#
# @param String: String with DEFINE statement
-# @param Arch: Supportted Arch
+# @param Arch: Supported Arch
# @param Defines: DEFINE statement to be parsed
#
def GenDefines(String, Arch, Defines):
@@ -236,7 +236,7 @@ def ReplaceMacro(String, MacroDefinitions=None, SelfReplacement=False, Line=None
## NormPath
#
# Create a normal path
-# And replace DFEINE in the path
+# And replace DEFINE in the path
#
# @param Path: The input value for Path to be converted
# @param Defines: A set for DEFINE statement
@@ -613,9 +613,9 @@ def WorkspaceFile(WorkspaceDir, Filename):
## Split string
#
-# Revmove '"' which startswith and endswith string
+# Remove '"' which startswith and endswith string
#
-# @param String: The string need to be splited
+# @param String: The string need to be split
#
def SplitString(String):
if String.startswith('\"'):
@@ -734,7 +734,7 @@ def IsHexDigit(Str):
return False
return False
-## Check if the string is HexDgit and its interger value within limit of UINT32
+## Check if the string is HexDgit and its integer value within limit of UINT32
#
# Return true if all characters in the string are digits and there is at
# least one character
diff --git a/BaseTools/Source/Python/UPT/Library/UniClassObject.py b/BaseTools/Source/Python/UPT/Library/UniClassObject.py
index bd7804b753..d575c6b1f8 100644
--- a/BaseTools/Source/Python/UPT/Library/UniClassObject.py
+++ b/BaseTools/Source/Python/UPT/Library/UniClassObject.py
@@ -130,12 +130,12 @@ def ConvertSpecialUnicodes(Uni):
## GetLanguageCode1766
#
# Check the language code read from .UNI file and convert RFC 4646 codes to RFC 1766 codes
-# RFC 1766 language codes supported in compatiblity mode
+# RFC 1766 language codes supported in compatibility mode
# RFC 4646 language codes supported in native mode
#
# @param LangName: Language codes read from .UNI file
#
-# @retval LangName: Valid lanugage code in RFC 1766 format or None
+# @retval LangName: Valid language code in RFC 1766 format or None
#
def GetLanguageCode1766(LangName, File=None):
return LangName
@@ -177,7 +177,7 @@ def GetLanguageCode1766(LangName, File=None):
## GetLanguageCode
#
# Check the language code read from .UNI file and convert RFC 1766 codes to RFC 4646 codes if appropriate
-# RFC 1766 language codes supported in compatiblity mode
+# RFC 1766 language codes supported in compatibility mode
# RFC 4646 language codes supported in native mode
#
# @param LangName: Language codes read from .UNI file
@@ -221,13 +221,13 @@ def GetLanguageCode(LangName, IsCompatibleMode, File):
## FormatUniEntry
#
-# Formated the entry in Uni file.
+# Formatted the entry in Uni file.
#
# @param StrTokenName StrTokenName.
# @param TokenValueList A list need to be processed.
# @param ContainerFile ContainerFile.
#
-# @return formated entry
+# @return formatted entry
def FormatUniEntry(StrTokenName, TokenValueList, ContainerFile):
SubContent = ''
PreFormatLength = 40
@@ -478,8 +478,8 @@ class UniFileClassObject(object):
MultiLineFeedExits = False
#
# 0: initial value
- # 1: signle String entry exist
- # 2: line feed exist under the some signle String entry
+ # 1: single String entry exist
+ # 2: line feed exist under the some single String entry
#
StringEntryExistsFlag = 0
for Line in FileIn:
@@ -497,7 +497,7 @@ class UniFileClassObject(object):
StringEntryExistsFlag = 2
#
# If the '#string' line and the '#language' line are not in the same line,
- # there should be only one line feed character betwwen them
+ # there should be only one line feed character between them
#
if MultiLineFeedExits:
EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)
@@ -505,7 +505,7 @@ class UniFileClassObject(object):
MultiLineFeedExits = False
#
- # Process comment embeded in string define lines
+ # Process comment embedded in string define lines
#
FindFlag = Line.find(u'//')
if FindFlag != -1 and Line.find(u'//') < Line.find(u'"'):
@@ -771,7 +771,7 @@ class UniFileClassObject(object):
#
# Check Abstract, Description, BinaryAbstract and BinaryDescription order,
- # should be Abstract, Description, BinaryAbstract, BinaryDesctiption
+ # should be Abstract, Description, BinaryAbstract, BinaryDescription
AbstractPosition = -1
DescriptionPosition = -1
BinaryAbstractPosition = -1