From: Jaben Carsey <jaben.carsey@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>, Yonghong Zhu <yonghong.zhu@intel.com>
Subject: [PATCH v1 32/42] BaseTools: trim whitespace
Date: Fri, 27 Apr 2018 15:32:46 -0700 [thread overview]
Message-ID: <07045766a942b1b70afa367803bb87afc3442b53.1524868034.git.jaben.carsey@intel.com> (raw)
In-Reply-To: <cover.1524868033.git.jaben.carsey@intel.com>
In-Reply-To: <cover.1524868033.git.jaben.carsey@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 190 +--
BaseTools/Source/Python/AutoGen/BuildEngine.py | 2 +-
BaseTools/Source/Python/AutoGen/GenC.py | 74 +-
BaseTools/Source/Python/AutoGen/GenPcdDb.py | 208 +--
BaseTools/Source/Python/AutoGen/InfSectionParser.py | 12 +-
BaseTools/Source/Python/AutoGen/StrGather.py | 26 +-
BaseTools/Source/Python/AutoGen/UniClassObject.py | 18 +-
BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 42 +-
BaseTools/Source/Python/BPDG/BPDG.py | 56 +-
BaseTools/Source/Python/BPDG/GenVpd.py | 132 +-
BaseTools/Source/Python/BPDG/StringTable.py | 10 +-
BaseTools/Source/Python/Common/BuildVersion.py | 6 +-
BaseTools/Source/Python/Common/Database.py | 17 +-
BaseTools/Source/Python/Common/MigrationUtilities.py | 64 +-
BaseTools/Source/Python/Common/Misc.py | 50 +-
BaseTools/Source/Python/Common/MultipleWorkspace.py | 17 +-
BaseTools/Source/Python/Common/RangeExpression.py | 126 +-
BaseTools/Source/Python/Common/String.py | 2 +-
BaseTools/Source/Python/Common/ToolDefClassObject.py | 2 +-
BaseTools/Source/Python/Common/VariableAttributes.py | 12 +-
BaseTools/Source/Python/Common/VpdInfoFile.py | 82 +-
BaseTools/Source/Python/CommonDataClass/FdfClass.py | 28 +-
BaseTools/Source/Python/Ecc/CLexer.py | 8 +-
BaseTools/Source/Python/Ecc/CParser.py | 1468 ++++++++++----------
BaseTools/Source/Python/Ecc/Check.py | 22 +-
BaseTools/Source/Python/Ecc/CodeFragment.py | 3 +-
BaseTools/Source/Python/Ecc/CodeFragmentCollector.py | 124 +-
BaseTools/Source/Python/Ecc/Configuration.py | 10 +-
BaseTools/Source/Python/Ecc/Ecc.py | 26 +-
BaseTools/Source/Python/Ecc/Exception.py | 14 +-
BaseTools/Source/Python/Ecc/FileProfile.py | 5 +-
BaseTools/Source/Python/Ecc/MetaDataParser.py | 46 +-
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py | 100 +-
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileTable.py | 88 +-
BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py | 4 +-
BaseTools/Source/Python/Ecc/Xml/__init__.py | 6 +-
BaseTools/Source/Python/Ecc/c.py | 12 +-
BaseTools/Source/Python/Eot/CLexer.py | 8 +-
BaseTools/Source/Python/Eot/CParser.py | 1468 ++++++++++----------
BaseTools/Source/Python/Eot/Eot.py | 16 +-
BaseTools/Source/Python/Eot/Report.py | 4 +-
BaseTools/Source/Python/GenFds/Capsule.py | 2 +-
BaseTools/Source/Python/GenFds/CapsuleData.py | 18 +-
BaseTools/Source/Python/GenFds/EfiSection.py | 8 +-
BaseTools/Source/Python/GenFds/Fd.py | 2 +-
BaseTools/Source/Python/GenFds/FdfParser.py | 144 +-
BaseTools/Source/Python/GenFds/Ffs.py | 10 +-
BaseTools/Source/Python/GenFds/FfsFileStatement.py | 4 +-
BaseTools/Source/Python/GenFds/FfsInfStatement.py | 62 +-
BaseTools/Source/Python/GenFds/Fv.py | 26 +-
BaseTools/Source/Python/GenFds/GenFds.py | 28 +-
BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 36 +-
BaseTools/Source/Python/GenFds/GuidSection.py | 2 +-
BaseTools/Source/Python/GenFds/OptRomFileStatement.py | 6 +-
BaseTools/Source/Python/GenFds/OptRomInfStatement.py | 21 +-
BaseTools/Source/Python/GenFds/OptionRom.py | 49 +-
BaseTools/Source/Python/GenFds/Region.py | 4 +-
BaseTools/Source/Python/GenFds/Section.py | 2 +-
BaseTools/Source/Python/GenFds/Vtf.py | 18 +-
BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py | 26 +-
BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py | 6 +-
BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py | 34 +-
BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py | 30 +-
BaseTools/Source/Python/Table/Table.py | 20 +-
BaseTools/Source/Python/Table/TableDataModel.py | 14 +-
BaseTools/Source/Python/Table/TableDec.py | 12 +-
BaseTools/Source/Python/Table/TableDsc.py | 12 +-
BaseTools/Source/Python/Table/TableEotReport.py | 6 +-
BaseTools/Source/Python/Table/TableFdf.py | 12 +-
BaseTools/Source/Python/Table/TableFile.py | 12 +-
BaseTools/Source/Python/Table/TableFunction.py | 8 +-
BaseTools/Source/Python/Table/TableIdentifier.py | 4 +-
BaseTools/Source/Python/Table/TableInf.py | 12 +-
BaseTools/Source/Python/Table/TablePcd.py | 4 +-
BaseTools/Source/Python/Table/TableReport.py | 6 +-
BaseTools/Source/Python/TargetTool/TargetTool.py | 24 +-
BaseTools/Source/Python/Trim/Trim.py | 20 +-
BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +-
BaseTools/Source/Python/Workspace/MetaFileParser.py | 2 +-
BaseTools/Source/Python/Workspace/MetaFileTable.py | 88 +-
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 24 +-
BaseTools/Source/Python/build/BuildReport.py | 34 +-
BaseTools/Source/Python/build/build.py | 14 +-
BaseTools/Source/Python/sitecustomize.py | 2 +-
84 files changed, 2736 insertions(+), 2742 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index dc82075c5876..39d5932a9a66 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -236,7 +236,7 @@ class WorkspaceAutoGen(AutoGen):
super(WorkspaceAutoGen, self).__init__(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs)
self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs)
self._Init = True
-
+
## Initialize WorkspaceAutoGen
#
# @param WorkspaceDir Root directory of workspace
@@ -305,7 +305,7 @@ class WorkspaceAutoGen(AutoGen):
ExtraData="Build target [%s] is not supported by the platform. [Valid target: %s]"
% (self.BuildTarget, " ".join(self.Platform.BuildTargets)))
-
+
# parse FDF file to get PCDs in it, if any
if not self.FdfFile:
self.FdfFile = self.Platform.FlashDefinition
@@ -743,7 +743,7 @@ class WorkspaceAutoGen(AutoGen):
## _CheckDuplicateInFV() method
#
- # Check whether there is duplicate modules/files exist in FV section.
+ # Check whether there is duplicate modules/files exist in FV section.
# The check base on the file GUID;
#
def _CheckDuplicateInFV(self, Fdf):
@@ -774,7 +774,7 @@ class WorkspaceAutoGen(AutoGen):
Module.Guid.upper()),
ExtraData=self.FdfFile)
#
- # Some INF files not have entity in DSC file.
+ # Some INF files not have entity in DSC file.
#
if not InfFoundFlag:
if FfsFile.InfFileName.find('$') == -1:
@@ -784,7 +784,7 @@ class WorkspaceAutoGen(AutoGen):
PathClassObj = PathClass(FfsFile.InfFileName, self.WorkspaceDir)
#
- # Here we just need to get FILE_GUID from INF file, use 'COMMON' as ARCH attribute. and use
+ # Here we just need to get FILE_GUID from INF file, use 'COMMON' as ARCH attribute. and use
# BuildObject from one of AutoGenObjectList is enough.
#
InfObj = self.AutoGenObjectList[0].BuildDatabase.WorkspaceDb.BuildObject[PathClassObj, TAB_ARCH_COMMON, self.BuildTarget, self.ToolChain]
@@ -803,7 +803,7 @@ class WorkspaceAutoGen(AutoGen):
if FfsFile.NameGuid is not None:
#
- # If the NameGuid reference a PCD name.
+ # If the NameGuid reference a PCD name.
# The style must match: PCD(xxxx.yyy)
#
if gPCDAsGuidPattern.match(FfsFile.NameGuid):
@@ -880,7 +880,7 @@ class WorkspaceAutoGen(AutoGen):
for Pcd in Pa.Platform.Pcds:
PcdType = Pa.Platform.Pcds[Pcd].Type
- # If no PCD type, this PCD comes from FDF
+ # If no PCD type, this PCD comes from FDF
if not PcdType:
continue
@@ -972,14 +972,14 @@ class WorkspaceAutoGen(AutoGen):
## Check the PCDs token value conflict in each DEC file.
#
# Will cause build break and raise error message while two PCDs conflict.
- #
+ #
# @return None
#
def _CheckAllPcdsTokenValueConflict(self):
for Pa in self.AutoGenObjectList:
for Package in Pa.PackageList:
PcdList = Package.Pcds.values()
- PcdList.sort(lambda x, y: cmp(int(x.TokenValue, 0), int(y.TokenValue, 0)))
+ PcdList.sort(lambda x, y: cmp(int(x.TokenValue, 0), int(y.TokenValue, 0)))
Count = 0
while (Count < len(PcdList) - 1) :
Item = PcdList[Count]
@@ -1103,20 +1103,20 @@ class PlatformAutoGen(AutoGen):
self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch)
self._Init = True
#
- # Used to store all PCDs for both PEI and DXE phase, in order to generate
+ # Used to store all PCDs for both PEI and DXE phase, in order to generate
# correct PCD database
- #
+ #
_DynaPcdList_ = []
_NonDynaPcdList_ = []
_PlatformPcds = {}
-
+
#
- # The priority list while override build option
+ # The priority list while override build option
#
PrioList = {"0x11111" : 16, # TARGET_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE (Highest)
"0x01111" : 15, # ******_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE
"0x10111" : 14, # TARGET_*********_ARCH_COMMANDTYPE_ATTRIBUTE
- "0x00111" : 13, # ******_*********_ARCH_COMMANDTYPE_ATTRIBUTE
+ "0x00111" : 13, # ******_*********_ARCH_COMMANDTYPE_ATTRIBUTE
"0x11011" : 12, # TARGET_TOOLCHAIN_****_COMMANDTYPE_ATTRIBUTE
"0x01011" : 11, # ******_TOOLCHAIN_****_COMMANDTYPE_ATTRIBUTE
"0x10011" : 10, # TARGET_*********_****_COMMANDTYPE_ATTRIBUTE
@@ -1268,17 +1268,17 @@ class PlatformAutoGen(AutoGen):
#
def CollectFixedAtBuildPcds(self):
for LibAuto in self.LibraryAutoGenList:
- FixedAtBuildPcds = {}
- ShareFixedAtBuildPcdsSameValue = {}
- for Module in LibAuto._ReferenceModules:
+ FixedAtBuildPcds = {}
+ ShareFixedAtBuildPcdsSameValue = {}
+ for Module in LibAuto._ReferenceModules:
for Pcd in Module.FixedAtBuildPcds + LibAuto.FixedAtBuildPcds:
- key = ".".join((Pcd.TokenSpaceGuidCName,Pcd.TokenCName))
+ key = ".".join((Pcd.TokenSpaceGuidCName,Pcd.TokenCName))
if key not in FixedAtBuildPcds:
ShareFixedAtBuildPcdsSameValue[key] = True
FixedAtBuildPcds[key] = Pcd.DefaultValue
else:
if FixedAtBuildPcds[key] != Pcd.DefaultValue:
- ShareFixedAtBuildPcdsSameValue[key] = False
+ ShareFixedAtBuildPcdsSameValue[key] = False
for Pcd in LibAuto.FixedAtBuildPcds:
key = ".".join((Pcd.TokenSpaceGuidCName,Pcd.TokenCName))
if (Pcd.TokenCName,Pcd.TokenSpaceGuidCName) not in self.NonDynamicPcdDict:
@@ -1287,7 +1287,7 @@ class PlatformAutoGen(AutoGen):
DscPcd = self.NonDynamicPcdDict[(Pcd.TokenCName,Pcd.TokenSpaceGuidCName)]
if DscPcd.Type != TAB_PCDS_FIXED_AT_BUILD:
continue
- if key in ShareFixedAtBuildPcdsSameValue and ShareFixedAtBuildPcdsSameValue[key]:
+ if key in ShareFixedAtBuildPcdsSameValue and ShareFixedAtBuildPcdsSameValue[key]:
LibAuto.ConstPcd[key] = FixedAtBuildPcds[key]
def CollectVariables(self, DynamicPcdSet):
@@ -1388,7 +1388,7 @@ class PlatformAutoGen(AutoGen):
for F in self.Platform.Modules.keys():
M = ModuleAutoGen(self.Workspace, F, self.BuildTarget, self.ToolChain, self.Arch, self.MetaFile)
#GuidValue.update(M.Guids)
-
+
self.Platform.Modules[F].M = M
for PcdFromModule in M.ModulePcdList + M.LibraryPcdList:
@@ -1400,27 +1400,27 @@ class PlatformAutoGen(AutoGen):
if M.IsBinaryModule == True:
PcdFromModule.IsFromBinaryInf = True
- # Check the PCD from DSC or not
+ # Check the PCD from DSC or not
PcdFromModule.IsFromDsc = (PcdFromModule.TokenCName, PcdFromModule.TokenSpaceGuidCName) in self.Platform.Pcds
if PcdFromModule.Type in GenC.gDynamicPcd or PcdFromModule.Type in GenC.gDynamicExPcd:
if F.Path not in FdfModuleList:
- # If one of the Source built modules listed in the DSC is not listed
- # in FDF modules, and the INF lists a PCD can only use the PcdsDynamic
- # access method (it is only listed in the DEC file that declares the
+ # If one of the Source built modules listed in the DSC is not listed
+ # in FDF modules, and the INF lists a PCD can only use the PcdsDynamic
+ # access method (it is only listed in the DEC file that declares the
# PCD as PcdsDynamic), then build tool will report warning message
- # notify the PI that they are attempting to build a module that must
- # be included in a flash image in order to be functional. These Dynamic
- # PCD will not be added into the Database unless it is used by other
+ # notify the PI that they are attempting to build a module that must
+ # be included in a flash image in order to be functional. These Dynamic
+ # PCD will not be added into the Database unless it is used by other
# modules that are included in the FDF file.
if PcdFromModule.Type in GenC.gDynamicPcd and \
PcdFromModule.IsFromBinaryInf == False:
# Print warning message to let the developer make a determine.
continue
- # If one of the Source built modules listed in the DSC is not listed in
- # FDF modules, and the INF lists a PCD can only use the PcdsDynamicEx
- # access method (it is only listed in the DEC file that declares the
- # PCD as PcdsDynamicEx), then DO NOT break the build; DO NOT add the
+ # If one of the Source built modules listed in the DSC is not listed in
+ # FDF modules, and the INF lists a PCD can only use the PcdsDynamicEx
+ # access method (it is only listed in the DEC file that declares the
+ # PCD as PcdsDynamicEx), then DO NOT break the build; DO NOT add the
# PCD to the Platform's PCD Database.
if PcdFromModule.Type in GenC.gDynamicExPcd:
continue
@@ -1448,14 +1448,14 @@ class PlatformAutoGen(AutoGen):
PcdFromModule.Pending = False
self._NonDynaPcdList_.append (PcdFromModule)
DscModuleSet = {os.path.normpath(ModuleInf.Path) for ModuleInf in self.Platform.Modules}
- # add the PCD from modules that listed in FDF but not in DSC to Database
+ # add the PCD from modules that listed in FDF but not in DSC to Database
for InfName in FdfModuleList:
if InfName not in DscModuleSet:
InfClass = PathClass(InfName)
M = self.BuildDatabase[InfClass, self.Arch, self.BuildTarget, self.ToolChain]
- # If a module INF in FDF but not in current arch's DSC module list, it must be module (either binary or source)
- # for different Arch. PCDs in source module for different Arch is already added before, so skip the source module here.
- # For binary module, if in current arch, we need to list the PCDs into database.
+ # If a module INF in FDF but not in current arch's DSC module list, it must be module (either binary or source)
+ # for different Arch. PCDs in source module for different Arch is already added before, so skip the source module here.
+ # For binary module, if in current arch, we need to list the PCDs into database.
if not M.IsSupportedArch:
continue
# Override the module PCD setting by platform setting
@@ -1480,20 +1480,20 @@ class PlatformAutoGen(AutoGen):
self._NonDynaPcdList_.append(PcdFromModule)
if PcdFromModule in self._DynaPcdList_ and PcdFromModule.Phase == 'PEI' and PcdFromModule.Type in GenC.gDynamicExPcd:
# Overwrite the phase of any the same PCD existing, if Phase is PEI.
- # It is to solve the case that a dynamic PCD used by a PEM module/PEI
+ # It is to solve the case that a dynamic PCD used by a PEM module/PEI
# module & DXE module at a same time.
# Overwrite the type of the PCDs in source INF by the type of AsBuild
- # INF file as DynamicEx.
+ # INF file as DynamicEx.
Index = self._DynaPcdList_.index(PcdFromModule)
self._DynaPcdList_[Index].Phase = PcdFromModule.Phase
self._DynaPcdList_[Index].Type = PcdFromModule.Type
for PcdFromModule in self._NonDynaPcdList_:
- # If a PCD is not listed in the DSC file, but binary INF files used by
- # this platform all (that use this PCD) list the PCD in a [PatchPcds]
- # section, AND all source INF files used by this platform the build
- # that use the PCD list the PCD in either a [Pcds] or [PatchPcds]
+ # If a PCD is not listed in the DSC file, but binary INF files used by
+ # this platform all (that use this PCD) list the PCD in a [PatchPcds]
+ # section, AND all source INF files used by this platform the build
+ # that use the PCD list the PCD in either a [Pcds] or [PatchPcds]
# section, then the tools must NOT add the PCD to the Platform's PCD
- # Database; the build must assign the access method for this PCD as
+ # Database; the build must assign the access method for this PCD as
# PcdsPatchableInModule.
if PcdFromModule not in self._DynaPcdList_:
continue
@@ -1516,7 +1516,7 @@ class PlatformAutoGen(AutoGen):
self._DynamicPcdList = self._DynaPcdList_
#
# Sort dynamic PCD list to:
- # 1) If PCD's datum type is VOID* and value is unicode string which starts with L, the PCD item should
+ # 1) If PCD's datum type is VOID* and value is unicode string which starts with L, the PCD item should
# try to be put header of dynamicd List
# 2) If PCD is HII type, the PCD item should be put after unicode type PCD
#
@@ -1537,7 +1537,7 @@ class PlatformAutoGen(AutoGen):
if self._PlatformPcds[item].DatumType and self._PlatformPcds[item].DatumType not in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64, TAB_VOID, "BOOLEAN"]:
self._PlatformPcds[item].DatumType = TAB_VOID
- if (self.Workspace.ArchList[-1] == self.Arch):
+ if (self.Workspace.ArchList[-1] == self.Arch):
for Pcd in self._DynamicPcdList:
# just pick the a value to determine whether is unicode string type
Sku = Pcd.SkuInfoList.values()[0]
@@ -1621,7 +1621,7 @@ class PlatformAutoGen(AutoGen):
#
# Fix the PCDs define in VPD PCD section that never referenced by module.
# An example is PCD for signature usage.
- #
+ #
for DscPcd in PlatformPcds:
DscPcdEntry = self._PlatformPcds[DscPcd]
if DscPcdEntry.Type in [TAB_PCDS_DYNAMIC_VPD, TAB_PCDS_DYNAMIC_EX_VPD]:
@@ -1643,8 +1643,8 @@ class PlatformAutoGen(AutoGen):
defaultindex = SkuObjList.index((TAB_DEFAULT,DefaultSku))
SkuObjList[0],SkuObjList[defaultindex] = SkuObjList[defaultindex],SkuObjList[0]
for (SkuName,Sku) in SkuObjList:
- Sku.VpdOffset = Sku.VpdOffset.strip()
-
+ Sku.VpdOffset = Sku.VpdOffset.strip()
+
# Need to iterate DEC pcd information to get the value & datumtype
for eachDec in self.PackageList:
for DecPcd in eachDec.Pcds:
@@ -1655,8 +1655,8 @@ class PlatformAutoGen(AutoGen):
EdkLogger.warn("build", "Unreferenced vpd pcd used!",
File=self.MetaFile, \
ExtraData = "PCD: %s.%s used in the DSC file %s is unreferenced." \
- %(DscPcdEntry.TokenSpaceGuidCName, DscPcdEntry.TokenCName, self.Platform.MetaFile.Path))
-
+ %(DscPcdEntry.TokenSpaceGuidCName, DscPcdEntry.TokenCName, self.Platform.MetaFile.Path))
+
DscPcdEntry.DatumType = DecPcdEntry.DatumType
DscPcdEntry.DefaultValue = DecPcdEntry.DefaultValue
DscPcdEntry.TokenValue = DecPcdEntry.TokenValue
@@ -1664,7 +1664,7 @@ class PlatformAutoGen(AutoGen):
# Only fix the value while no value provided in DSC file.
if not Sku.DefaultValue:
DscPcdEntry.SkuInfoList[DscPcdEntry.SkuInfoList.keys()[0]].DefaultValue = DecPcdEntry.DefaultValue
-
+
if DscPcdEntry not in self._DynamicPcdList:
self._DynamicPcdList.append(DscPcdEntry)
Sku.VpdOffset = Sku.VpdOffset.strip()
@@ -1695,7 +1695,7 @@ class PlatformAutoGen(AutoGen):
VpdFile.Add(DscPcdEntry, SkuName,Sku.VpdOffset)
SkuValueMap[PcdValue].append(Sku)
if not NeedProcessVpdMapFile and Sku.VpdOffset == "*":
- NeedProcessVpdMapFile = True
+ NeedProcessVpdMapFile = True
if DscPcdEntry.DatumType == TAB_VOID and PcdValue.startswith("L"):
UnicodePcdArray.add(DscPcdEntry)
elif len(Sku.VariableName) > 0:
@@ -1707,7 +1707,7 @@ class PlatformAutoGen(AutoGen):
VpdSkuMap[DscPcd] = SkuValueMap
if (self.Platform.FlashDefinition is None or self.Platform.FlashDefinition == '') and \
VpdFile.GetCount() != 0:
- EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE,
+ EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE,
"Fail to get FLASH_DEFINITION definition in DSC file %s which is required when DSC contains VPD PCD." % str(self.Platform.MetaFile))
if VpdFile.GetCount() != 0:
@@ -2055,9 +2055,9 @@ class PlatformAutoGen(AutoGen):
self._PcdTokenNumber = OrderedDict()
TokenNumber = 1
#
- # Make the Dynamic and DynamicEx PCD use within different TokenNumber area.
+ # Make the Dynamic and DynamicEx PCD use within different TokenNumber area.
# Such as:
- #
+ #
# Dynamic PCD:
# TokenNumber 0 ~ 10
# DynamicEx PCD:
@@ -2522,7 +2522,7 @@ class PlatformAutoGen(AutoGen):
# @param Options Options to be expanded
#
# @retval options Options expanded
- #
+ #
def _ExpandBuildOption(self, Options, ModuleStyle=None):
BuildOptions = {}
FamilyMatch = False
@@ -2547,9 +2547,9 @@ class PlatformAutoGen(AutoGen):
if OverrideList.get(Key[1]) is not None:
OverrideList.pop(Key[1])
OverrideList[Key[1]] = Options[Key]
-
+
#
- # Use the highest priority value.
+ # Use the highest priority value.
#
if (len(OverrideList) >= 2):
KeyList = OverrideList.keys()
@@ -2560,7 +2560,7 @@ class PlatformAutoGen(AutoGen):
NextKey = KeyList[Index1 + Index + 1]
#
# Compare two Key, if one is included by another, choose the higher priority one
- #
+ #
Target2, ToolChain2, Arch2, CommandType2, Attr2 = NextKey.split("_")
if Target1 == Target2 or Target1 == "*" or Target2 == "*":
if ToolChain1 == ToolChain2 or ToolChain1 == "*" or ToolChain2 == "*":
@@ -2573,7 +2573,7 @@ class PlatformAutoGen(AutoGen):
else:
if Options.get((self.BuildRuleFamily, NowKey)) is not None:
Options.pop((self.BuildRuleFamily, NowKey))
-
+
for Key in Options:
if ModuleStyle is not None and len (Key) > 2:
# Check Module style is EDK or EDKII.
@@ -2762,7 +2762,7 @@ class ModuleAutoGen(AutoGen):
% (MetaFile, Arch))
return None
return obj
-
+
## Initialize ModuleAutoGen
#
# @param Workspace EdkIIWorkspaceBuild object
@@ -2861,13 +2861,13 @@ class ModuleAutoGen(AutoGen):
self.AutoGenDepSet = set()
-
+
## The Modules referenced to this Library
# Only Library has this attribute
- self._ReferenceModules = []
-
+ self._ReferenceModules = []
+
## Store the FixedAtBuild Pcds
- #
+ #
self._FixedAtBuildPcds = []
self.ConstPcd = {}
return True
@@ -2884,8 +2884,8 @@ class ModuleAutoGen(AutoGen):
continue
if Pcd not in self._FixedAtBuildPcds:
self._FixedAtBuildPcds.append(Pcd)
-
- return self._FixedAtBuildPcds
+
+ return self._FixedAtBuildPcds
def _GetUniqueBaseName(self):
BaseName = self.Name
@@ -3087,7 +3087,7 @@ class ModuleAutoGen(AutoGen):
continue
PackageList.append(Package)
return PackageList
-
+
## Get the depex string
#
# @return : a string contain all depex expresion.
@@ -3116,7 +3116,7 @@ class ModuleAutoGen(AutoGen):
(Arch.upper() == self.Arch.upper() and \
ModuleType.upper() in [TAB_ARCH_COMMON, self.ModuleType.upper()]):
DepexList.append({(Arch, ModuleType): DepexExpr})
-
+
#the type of build module is USER_DEFINED.
if self.ModuleType.upper() == SUP_MODULE_USER_DEFINED:
for Depex in DepexList:
@@ -3127,7 +3127,7 @@ class ModuleAutoGen(AutoGen):
if not DepexStr:
return '[Depex.%s]\n' % self.Arch
return DepexStr
-
+
#the type of build module not is USER_DEFINED.
Count = 0
for Depex in DepexList:
@@ -3147,7 +3147,7 @@ class ModuleAutoGen(AutoGen):
if not DepexStr:
return '[Depex.%s]\n' % self.Arch
return '[Depex.%s]\n# ' % self.Arch + DepexStr
-
+
## Merge dependency expression
#
# @retval list The token list of the dependency expression after parsed
@@ -3283,7 +3283,7 @@ class ModuleAutoGen(AutoGen):
#
self._BuildOptionIncPathList = []
return self._BuildOptionIncPathList
-
+
BuildOptionIncPathList = []
for Tool in ('CC', 'PP', 'VFRPP', 'ASLPP', 'ASLCC', 'APP', 'ASM'):
Attr = 'FLAGS'
@@ -3291,7 +3291,7 @@ class ModuleAutoGen(AutoGen):
FlagOption = self.BuildOption[Tool][Attr]
except KeyError:
FlagOption = ''
-
+
if self.PlatformInfo.ToolChainFamily != 'RVCT':
IncPathList = [NormPath(Path, self.Macros) for Path in BuildOptIncludeRegEx.findall(FlagOption)]
else:
@@ -3304,7 +3304,7 @@ class ModuleAutoGen(AutoGen):
IncPathList += [NormPath(PathEntry, self.Macros) for PathEntry in PathList]
#
- # EDK II modules must not reference header files outside of the packages they depend on or
+ # EDK II modules must not reference header files outside of the packages they depend on or
# within the module's directory tree. Report error if violation.
#
if self.AutoGenVersion >= 0x00010005 and len(IncPathList) > 0:
@@ -3316,13 +3316,13 @@ class ModuleAutoGen(AutoGen):
ExtraData=ErrMsg,
File=str(self.MetaFile))
-
+
BuildOptionIncPathList += IncPathList
-
+
self._BuildOptionIncPathList = BuildOptionIncPathList
-
+
return self._BuildOptionIncPathList
-
+
## Return a list of files which can be built from source
#
# What kind of files can be built is determined by build rules in
@@ -3374,7 +3374,7 @@ class ModuleAutoGen(AutoGen):
Order_Dict[F].sort(key=lambda i: self.BuildRuleOrder.index(i))
for Ext in Order_Dict[F][1:]:
RemoveList.append(F + Ext)
-
+
for item in RemoveList:
FileList.remove(item)
@@ -3826,12 +3826,12 @@ class ModuleAutoGen(AutoGen):
for SourceFile in self.Module.Sources:
if SourceFile.Type.upper() == ".VFR" :
#
- # search the .map file to find the offset of vfr binary in the PE32+/TE file.
+ # search the .map file to find the offset of vfr binary in the PE32+/TE file.
#
VfrUniBaseName[SourceFile.BaseName] = (SourceFile.BaseName + "Bin")
if SourceFile.Type.upper() == ".UNI" :
#
- # search the .map file to find the offset of Uni strings binary in the PE32+/TE file.
+ # search the .map file to find the offset of Uni strings binary in the PE32+/TE file.
#
VfrUniBaseName["UniOffsetName"] = (self.Name + "Strings")
@@ -3852,7 +3852,7 @@ class ModuleAutoGen(AutoGen):
EdkLogger.error("build", FILE_OPEN_FAILURE, "File open failed for %s" % UniVfrOffsetFileName,None)
# Use a instance of StringIO to cache data
- fStringIO = StringIO('')
+ fStringIO = StringIO('')
for Item in VfrUniOffsetList:
if (Item[0].find("Strings") != -1):
@@ -3863,7 +3863,7 @@ class ModuleAutoGen(AutoGen):
#
UniGuid = [0xe0, 0xc5, 0x13, 0x89, 0xf6, 0x33, 0x86, 0x4d, 0x9b, 0xf1, 0x43, 0xef, 0x89, 0xfc, 0x6, 0x66]
UniGuid = [chr(ItemGuid) for ItemGuid in UniGuid]
- fStringIO.write(''.join(UniGuid))
+ fStringIO.write(''.join(UniGuid))
UniValue = pack ('Q', int (Item[1], 16))
fStringIO.write (UniValue)
else:
@@ -3874,13 +3874,13 @@ class ModuleAutoGen(AutoGen):
#
VfrGuid = [0xb4, 0x7c, 0xbc, 0xd0, 0x47, 0x6a, 0x5f, 0x49, 0xaa, 0x11, 0x71, 0x7, 0x46, 0xda, 0x6, 0xa2]
VfrGuid = [chr(ItemGuid) for ItemGuid in VfrGuid]
- fStringIO.write(''.join(VfrGuid))
+ fStringIO.write(''.join(VfrGuid))
VfrValue = pack ('Q', int (Item[1], 16))
fStringIO.write (VfrValue)
#
# write data into file.
#
- try :
+ try :
fInputfile.write (fStringIO.getvalue())
except:
EdkLogger.error("build", FILE_WRITE_FAILURE, "Write data to file %s failed, please check whether the "
@@ -3901,15 +3901,15 @@ class ModuleAutoGen(AutoGen):
if self.IsAsBuiltInfCreated:
return
-
+
# Skip the following code for EDK I inf
if self.AutoGenVersion < 0x00010005:
return
-
+
# Skip the following code for libraries
if self.IsLibrary:
return
-
+
# Skip the following code for modules with no source files
if not self.SourceFileList:
return
@@ -3917,7 +3917,7 @@ class ModuleAutoGen(AutoGen):
# Skip the following code for modules without any binary files
if self.BinaryFileList:
return
-
+
### TODO: How to handles mixed source and binary modules
# Find all DynamicEx and PatchableInModule PCDs used by this module and dependent libraries
@@ -4211,7 +4211,7 @@ class ModuleAutoGen(AutoGen):
UsageIndex = Index
break
if UsageIndex != -1:
- PcdCommentList[UsageIndex] = '## %s %s %s' % (UsageStr, HiiInfo, PcdCommentList[UsageIndex].replace(UsageStr, ''))
+ PcdCommentList[UsageIndex] = '## %s %s %s' % (UsageStr, HiiInfo, PcdCommentList[UsageIndex].replace(UsageStr, ''))
else:
PcdCommentList.append('## UNDEFINED ' + HiiInfo)
PcdComments = '\n '.join(PcdCommentList)
@@ -4226,7 +4226,7 @@ class ModuleAutoGen(AutoGen):
# Generated LibraryClasses section in comments.
for Library in self.LibraryAutoGenList:
AsBuiltInfDict['libraryclasses_item'] += [Library.MetaFile.File.replace('\\', '/')]
-
+
# Generated UserExtensions TianoCore section.
# All tianocore user extensions are copied.
UserExtStr = ''
@@ -4242,12 +4242,12 @@ class ModuleAutoGen(AutoGen):
DepexExpresion = self._GetDepexExpresionString()
if DepexExpresion:
AsBuiltInfDict['depexsection_item'] = DepexExpresion
-
+
AsBuiltInf = TemplateString()
AsBuiltInf.Append(gAsBuiltInfHeaderString.Replace(AsBuiltInfDict))
-
+
SaveFileOnChange(os.path.join(self.OutputDir, self.Name + '.inf'), str(AsBuiltInf), False)
-
+
self.IsAsBuiltInfCreated = True
if GlobalData.gBinCacheDest:
self.CopyModuleToCache()
@@ -4570,7 +4570,7 @@ class ModuleAutoGen(AutoGen):
BuildOption = property(_GetModuleBuildOption)
BuildOptionIncPathList = property(_GetBuildOptionIncPathList)
BuildCommand = property(_GetBuildCommand)
-
+
FixedAtBuildPcds = property(_GetFixedAtBuildPcds)
# This acts like the main() function for the script, unless it is 'import'ed into another script.
diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py
index 2c823797d7c5..dc803b094300 100644
--- a/BaseTools/Source/Python/AutoGen/BuildEngine.py
+++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py
@@ -359,7 +359,7 @@ class BuildRule:
# Clean up the line and replace path separator with native one
Line = self.RuleContent[Index].strip().replace(self._PATH_SEP, os.path.sep)
self.RuleContent[Index] = Line
-
+
# find the build_rule_version
if Line and Line[0] == "#" and Line.find(TAB_BUILD_RULE_VERSION) <> -1:
if Line.find("=") <> -1 and Line.find("=") < (len(Line) - 1) and (Line[(Line.find("=") + 1):]).split():
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index 4e7e3d90be64..11c88803f201 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -789,7 +789,7 @@ gModuleTypeHeaderFile = {
"USER_DEFINED" : [gBasicHeaderFile]
}
-## Autogen internal worker macro to define DynamicEx PCD name includes both the TokenSpaceGuidName
+## Autogen internal worker macro to define DynamicEx PCD name includes both the TokenSpaceGuidName
# the TokenName and Guid comparison to avoid define name collisions.
#
# @param Info The ModuleAutoGen object
@@ -809,7 +809,7 @@ def DynExPcdTokenNumberMapping(Info, AutoGenH):
return
AutoGenH.Append('\n#define COMPAREGUID(Guid1, Guid2) (BOOLEAN)(*(CONST UINT64*)Guid1 == *(CONST UINT64*)Guid2 && *((CONST UINT64*)Guid1 + 1) == *((CONST UINT64*)Guid2 + 1))\n')
# AutoGen for each PCD listed in a [PcdEx] section of a Module/Lib INF file.
- # Auto generate a macro for each TokenName that takes a Guid pointer as a parameter.
+ # Auto generate a macro for each TokenName that takes a Guid pointer as a parameter.
# Use the Guid pointer to see if it matches any of the token space GUIDs.
TokenCNameList = set()
for TokenCName in ExTokenCNameList:
@@ -827,15 +827,15 @@ def DynExPcdTokenNumberMapping(Info, AutoGenH):
Index = Index + 1
if Index == 1:
AutoGenH.Append('\n#define __PCD_%s_ADDR_CMP(GuidPtr) (' % (RealTokenCName))
- AutoGenH.Append('\\\n (GuidPtr == &%s) ? _PCD_TOKEN_%s_%s:'
+ AutoGenH.Append('\\\n (GuidPtr == &%s) ? _PCD_TOKEN_%s_%s:'
% (Pcd.TokenSpaceGuidCName, Pcd.TokenSpaceGuidCName, RealTokenCName))
else:
- AutoGenH.Append('\\\n (GuidPtr == &%s) ? _PCD_TOKEN_%s_%s:'
+ AutoGenH.Append('\\\n (GuidPtr == &%s) ? _PCD_TOKEN_%s_%s:'
% (Pcd.TokenSpaceGuidCName, Pcd.TokenSpaceGuidCName, RealTokenCName))
if Index == Count:
AutoGenH.Append('0 \\\n )\n')
TokenCNameList.add(TokenCName)
-
+
TokenCNameList = set()
for TokenCName in ExTokenCNameList:
if TokenCName in TokenCNameList:
@@ -853,14 +853,14 @@ def DynExPcdTokenNumberMapping(Info, AutoGenH):
if Index == 1:
AutoGenH.Append('\n#define __PCD_%s_VAL_CMP(GuidPtr) (' % (RealTokenCName))
AutoGenH.Append('\\\n (GuidPtr == NULL) ? 0:')
- AutoGenH.Append('\\\n COMPAREGUID (GuidPtr, &%s) ? _PCD_TOKEN_%s_%s:'
+ AutoGenH.Append('\\\n COMPAREGUID (GuidPtr, &%s) ? _PCD_TOKEN_%s_%s:'
% (Pcd.TokenSpaceGuidCName, Pcd.TokenSpaceGuidCName, RealTokenCName))
else:
- AutoGenH.Append('\\\n COMPAREGUID (GuidPtr, &%s) ? _PCD_TOKEN_%s_%s:'
+ AutoGenH.Append('\\\n COMPAREGUID (GuidPtr, &%s) ? _PCD_TOKEN_%s_%s:'
% (Pcd.TokenSpaceGuidCName, Pcd.TokenSpaceGuidCName, RealTokenCName))
if Index == Count:
AutoGenH.Append('0 \\\n )\n')
- # Autogen internal worker macro to compare GUIDs. Guid1 is a pointer to a GUID.
+ # Autogen internal worker macro to compare GUIDs. Guid1 is a pointer to a GUID.
# Guid2 is a C name for a GUID. Compare pointers first because optimizing compiler
# can do this at build time on CONST GUID pointers and optimize away call to COMPAREGUID().
# COMPAREGUID() will only be used if the Guid passed in is local to the module.
@@ -895,22 +895,22 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
if Pcd.PcdValueFromComm:
Pcd.DefaultValue = Pcd.PcdValueFromComm
-
+
if Pcd.Type in gDynamicExPcd:
TokenNumber = int(Pcd.TokenValue, 0)
- # Add TokenSpaceGuidValue value to PcdTokenName to discriminate the DynamicEx PCDs with
+ # Add TokenSpaceGuidValue value to PcdTokenName to discriminate the DynamicEx PCDs with
# different Guids but same TokenCName
PcdExTokenName = '_PCD_TOKEN_' + Pcd.TokenSpaceGuidCName + '_' + TokenCName
AutoGenH.Append('\n#define %s %dU\n' % (PcdExTokenName, TokenNumber))
else:
if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) not in PcdTokenNumber:
- # If one of the Source built modules listed in the DSC is not listed in FDF modules,
- # and the INF lists a PCD can only use the PcdsDynamic access method (it is only
- # listed in the DEC file that declares the PCD as PcdsDynamic), then build tool will
- # report warning message notify the PI that they are attempting to build a module
- # that must be included in a flash image in order to be functional. These Dynamic PCD
- # will not be added into the Database unless it is used by other modules that are
- # included in the FDF file.
+ # If one of the Source built modules listed in the DSC is not listed in FDF modules,
+ # and the INF lists a PCD can only use the PcdsDynamic access method (it is only
+ # listed in the DEC file that declares the PCD as PcdsDynamic), then build tool will
+ # report warning message notify the PI that they are attempting to build a module
+ # that must be included in a flash image in order to be functional. These Dynamic PCD
+ # will not be added into the Database unless it is used by other modules that are
+ # included in the FDF file.
# In this case, just assign an invalid token number to make it pass build.
if Pcd.Type in PCD_DYNAMIC_TYPE_LIST:
TokenNumber = 0
@@ -934,7 +934,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
SetModeName = '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[Pcd.DatumType] + '_' + TokenCName if Pcd.DatumType in gDatumSizeStringDatabaseH else '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[TAB_VOID] + '_' + TokenCName
SetModeStatusName = '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[Pcd.DatumType] + '_S_' + TokenCName if Pcd.DatumType in gDatumSizeStringDatabaseH else '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[TAB_VOID] + '_S_' + TokenCName
GetModeSizeName = '_PCD_GET_MODE_SIZE' + '_' + TokenCName
-
+
if Pcd.Type in gDynamicExPcd:
if Info.IsLibrary:
PcdList = Info.LibraryPcdList
@@ -1049,7 +1049,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
"Too large PCD value for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, TokenCName),
ExtraData="[%s]" % str(Info))
if not Value.endswith('U'):
- Value += 'U'
+ Value += 'U'
elif Pcd.DatumType == TAB_UINT8:
if ValueNumber < 0:
EdkLogger.error("build", AUTOGEN_ERROR,
@@ -1116,7 +1116,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
PcdValueName = '_PCD_PATCHABLE_VALUE_' + TokenCName
else:
PcdValueName = '_PCD_VALUE_' + TokenCName
-
+
if Pcd.DatumType not in TAB_PCD_NUMERIC_TYPES:
#
# For unicode, UINT16 array will be generated, so the alignment of unicode is guaranteed.
@@ -1129,7 +1129,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s UINT8 %s%s = %s;\n' % (Const, PcdVariableName, Array, Value))
AutoGenH.Append('extern %s UINT8 %s%s;\n' %(Const, PcdVariableName, Array))
AutoGenH.Append('#define %s %s%s\n' %(GetModeName, Type, PcdVariableName))
-
+
PcdDataSize = Pcd.GetPcdSize()
if Pcd.Type == TAB_PCDS_FIXED_AT_BUILD:
AutoGenH.Append('#define %s %s\n' % (FixPcdSizeTokenName, PcdDataSize))
@@ -1146,10 +1146,10 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
AutoGenC.Append('volatile %s %s %s = %s;\n' %(Const, Pcd.DatumType, PcdVariableName, PcdValueName))
AutoGenH.Append('extern volatile %s %s %s%s;\n' % (Const, Pcd.DatumType, PcdVariableName, Array))
AutoGenH.Append('#define %s %s%s\n' % (GetModeName, Type, PcdVariableName))
-
+
PcdDataSize = Pcd.GetPcdSize()
AutoGenH.Append('#define %s %s\n' % (PatchPcdSizeTokenName, PcdDataSize))
-
+
AutoGenH.Append('#define %s %s \n' % (GetModeSizeName,PatchPcdSizeVariableName))
AutoGenH.Append('extern UINTN %s; \n' % PatchPcdSizeVariableName)
AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED UINTN %s = %s;\n' % (PatchPcdSizeVariableName,PcdDataSize))
@@ -1157,7 +1157,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
PcdDataSize = Pcd.GetPcdSize()
AutoGenH.Append('#define %s %s\n' % (FixPcdSizeTokenName, PcdDataSize))
AutoGenH.Append('#define %s %s \n' % (GetModeSizeName,FixPcdSizeTokenName))
-
+
AutoGenH.Append('#define %s %s\n' %(PcdValueName, Value))
AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s %s = %s;\n' %(Const, Pcd.DatumType, PcdVariableName, PcdValueName))
AutoGenH.Append('extern %s %s %s%s;\n' % (Const, Pcd.DatumType, PcdVariableName, Array))
@@ -1204,13 +1204,13 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd):
TokenNumber = int(Pcd.TokenValue, 0)
else:
if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) not in PcdTokenNumber:
- # If one of the Source built modules listed in the DSC is not listed in FDF modules,
- # and the INF lists a PCD can only use the PcdsDynamic access method (it is only
- # listed in the DEC file that declares the PCD as PcdsDynamic), then build tool will
- # report warning message notify the PI that they are attempting to build a module
- # that must be included in a flash image in order to be functional. These Dynamic PCD
- # will not be added into the Database unless it is used by other modules that are
- # included in the FDF file.
+ # If one of the Source built modules listed in the DSC is not listed in FDF modules,
+ # and the INF lists a PCD can only use the PcdsDynamic access method (it is only
+ # listed in the DEC file that declares the PCD as PcdsDynamic), then build tool will
+ # report warning message notify the PI that they are attempting to build a module
+ # that must be included in a flash image in order to be functional. These Dynamic PCD
+ # will not be added into the Database unless it is used by other modules that are
+ # included in the FDF file.
# In this case, just assign an invalid token number to make it pass build.
if Pcd.Type in PCD_DYNAMIC_TYPE_LIST:
TokenNumber = 0
@@ -1244,7 +1244,7 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd):
if PcdItemType in gDynamicExPcd:
PcdExTokenName = '_PCD_TOKEN_' + TokenSpaceGuidCName + '_' + TokenCName
AutoGenH.Append('\n#define %s %dU\n' % (PcdExTokenName, TokenNumber))
-
+
if Info.IsLibrary:
PcdList = Info.LibraryPcdList
else:
@@ -1326,7 +1326,7 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd):
AutoGenH.Append('#define %s %s\n' % (GetModeSizeName,PatchPcdSizeVariableName))
AutoGenH.Append('extern UINTN %s; \n' % PatchPcdSizeVariableName)
-
+
if PcdItemType == TAB_PCDS_FIXED_AT_BUILD or PcdItemType == TAB_PCDS_FEATURE_FLAG:
key = ".".join((Pcd.TokenSpaceGuidCName,Pcd.TokenCName))
PcdVariableName = '_gPcd_' + gItemTypeStringDatabase[Pcd.Type] + '_' + TokenCName
@@ -1337,7 +1337,7 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd):
AutoGenH.Append('extern const %s _gPcd_FixedAtBuild_%s%s;\n' %(DatumType, TokenCName, Array))
AutoGenH.Append('#define %s %s_gPcd_FixedAtBuild_%s\n' %(GetModeName, Type, TokenCName))
AutoGenH.Append('//#define %s ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD\n' % SetModeName)
-
+
ConstFixedPcd = False
if PcdItemType == TAB_PCDS_FIXED_AT_BUILD and (key in Info.ConstPcd or (Info.IsLibrary and not Info._ReferenceModules)):
ConstFixedPcd = True
@@ -1670,7 +1670,7 @@ def CreatePcdCode(Info, AutoGenC, AutoGenH):
for Pcd in Info.ModulePcdList:
if Pcd.Type in gDynamicExPcd and Pcd.TokenSpaceGuidCName not in TokenSpaceList:
TokenSpaceList += [Pcd.TokenSpaceGuidCName]
-
+
SkuMgr = Info.Workspace.Platform.SkuIdMgr
AutoGenH.Append("\n// Definition of SkuId Array\n")
AutoGenH.Append("extern UINT64 _gPcd_SkuId_Array[];\n")
@@ -1680,7 +1680,7 @@ def CreatePcdCode(Info, AutoGenC, AutoGenH):
if Info.ModuleType in ["USER_DEFINED", "BASE"]:
GuidType = "GUID"
else:
- GuidType = "EFI_GUID"
+ GuidType = "EFI_GUID"
for Item in TokenSpaceList:
AutoGenH.Append('extern %s %s;\n' % (GuidType, Item))
@@ -2032,7 +2032,7 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
and gModuleTypeHeaderFile[Info.ModuleType][0] != gBasicHeaderFile:
AutoGenH.Append("#include <%s>\n" % gModuleTypeHeaderFile[Info.ModuleType][0])
#
- # if either PcdLib in [LibraryClasses] sections or there exist Pcd section, add PcdLib.h
+ # if either PcdLib in [LibraryClasses] sections or there exist Pcd section, add PcdLib.h
# As if modules only uses FixedPcd, then PcdLib is not needed in [LibraryClasses] section.
#
if 'PcdLib' in Info.Module.LibraryClasses or Info.Module.Pcds:
diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source/Python/AutoGen/GenPcdDb.py
index 9280eeee641c..ef6647a15302 100644
--- a/BaseTools/Source/Python/AutoGen/GenPcdDb.py
+++ b/BaseTools/Source/Python/AutoGen/GenPcdDb.py
@@ -183,10 +183,10 @@ typedef struct {
//UINT32 UninitDataBaseSize;// Total size for PCD those default value with 0.
//TABLE_OFFSET LocalTokenNumberTableOffset;
//TABLE_OFFSET ExMapTableOffset;
- //TABLE_OFFSET GuidTableOffset;
+ //TABLE_OFFSET GuidTableOffset;
//TABLE_OFFSET StringTableOffset;
//TABLE_OFFSET SizeTableOffset;
- //TABLE_OFFSET SkuIdTableOffset;
+ //TABLE_OFFSET SkuIdTableOffset;
//TABLE_OFFSET PcdNameTableOffset;
//UINT16 LocalTokenCount; // LOCAL_TOKEN_NUMBER for all
//UINT16 ExTokenCount; // EX_TOKEN_NUMBER for DynamicEx
@@ -238,11 +238,11 @@ ${PHASE}_PCD_DATABASE_INIT g${PHASE}PcdDbInit = {
## DbItemList
#
-# The class holds the Pcd database items. ItemSize if not zero should match the item datum type in the C structure.
+# The class holds the Pcd database items. ItemSize if not zero should match the item datum type in the C structure.
# When the structure is changed, remember to check the ItemSize and the related PackStr in PackData()
-# RawDataList is the RawData that may need some kind of calculation or transformation,
+# RawDataList is the RawData that may need some kind of calculation or transformation,
# the DataList corresponds to the data that need to be written to database. If DataList is not present, then RawDataList
-# will be written to the database.
+# will be written to the database.
#
class DbItemList:
def __init__(self, ItemSize, DataList=None, RawDataList=None):
@@ -325,7 +325,7 @@ class DbItemList:
## DbExMapTblItemList
#
-# The class holds the ExMap table
+# The class holds the ExMap table
#
class DbExMapTblItemList (DbItemList):
def __init__(self, ItemSize, DataList=None, RawDataList=None):
@@ -335,15 +335,15 @@ class DbExMapTblItemList (DbItemList):
Buffer = ''
PackStr = "=LHH"
for Datas in self.RawDataList:
- Buffer += pack(PackStr,
+ Buffer += pack(PackStr,
GetIntegerValue(Datas[0]),
GetIntegerValue(Datas[1]),
- GetIntegerValue(Datas[2]))
+ GetIntegerValue(Datas[2]))
return Buffer
## DbComItemList
#
-# The DbComItemList is a special kind of DbItemList in case that the size of the List can not be computed by the
+# The DbComItemList is a special kind of DbItemList in case that the size of the List can not be computed by the
# ItemSize multiply the ItemCount.
#
class DbComItemList (DbItemList):
@@ -361,7 +361,7 @@ class DbComItemList (DbItemList):
else:
assert(Index < len(self.RawDataList))
for ItemIndex in xrange(Index):
- Offset += len(self.RawDataList[ItemIndex]) * self.ItemSize
+ Offset += len(self.RawDataList[ItemIndex]) * self.ItemSize
return Offset
@@ -400,12 +400,12 @@ class DbComItemList (DbItemList):
Buffer += pack(PackStr, GetIntegerValue(SingleData))
else:
Buffer += pack(PackStr, GetIntegerValue(Data))
-
+
return Buffer
## DbVariableTableItemList
#
-# The class holds the Variable header value table
+# The class holds the Variable header value table
#
class DbVariableTableItemList (DbComItemList):
def __init__(self, ItemSize, DataList=None, RawDataList=None):
@@ -416,7 +416,7 @@ class DbVariableTableItemList (DbComItemList):
Buffer = ''
for DataList in self.RawDataList:
for Data in DataList:
- Buffer += pack(PackStr,
+ Buffer += pack(PackStr,
GetIntegerValue(Data[0]),
GetIntegerValue(Data[1]),
GetIntegerValue(Data[2]),
@@ -429,7 +429,7 @@ class DbVariableTableItemList (DbComItemList):
class DbStringHeadTableItemList(DbItemList):
def __init__(self,ItemSize,DataList=None,RawDataList=None):
DbItemList.__init__(self, ItemSize, DataList, RawDataList)
-
+
def GetInterOffset(self, Index):
Offset = 0
if self.ItemSize == 0:
@@ -462,11 +462,11 @@ class DbStringHeadTableItemList(DbItemList):
self.ListSize += len(Datas) * self.ItemSize
else:
self.ListSize += self.ItemSize
- return self.ListSize
+ return self.ListSize
## DbSkuHeadTableItemList
#
-# The class holds the Sku header value table
+# The class holds the Sku header value table
#
class DbSkuHeadTableItemList (DbItemList):
def __init__(self, ItemSize, DataList=None, RawDataList=None):
@@ -476,14 +476,14 @@ class DbSkuHeadTableItemList (DbItemList):
PackStr = "=LL"
Buffer = ''
for Data in self.RawDataList:
- Buffer += pack(PackStr,
+ Buffer += pack(PackStr,
GetIntegerValue(Data[0]),
GetIntegerValue(Data[1]))
return Buffer
## DbSizeTableItemList
#
-# The class holds the size table
+# The class holds the size table
#
class DbSizeTableItemList (DbItemList):
def __init__(self, ItemSize, DataList=None, RawDataList=None):
@@ -498,16 +498,16 @@ class DbSizeTableItemList (DbItemList):
PackStr = "=H"
Buffer = ''
for Data in self.RawDataList:
- Buffer += pack(PackStr,
+ Buffer += pack(PackStr,
GetIntegerValue(Data[0]))
for subData in Data[1]:
- Buffer += pack(PackStr,
+ Buffer += pack(PackStr,
GetIntegerValue(subData))
return Buffer
## DbStringItemList
#
-# The class holds the string table
+# The class holds the string table
#
class DbStringItemList (DbComItemList):
def __init__(self, ItemSize, DataList=None, RawDataList=None, LenList=None):
@@ -517,7 +517,7 @@ class DbStringItemList (DbComItemList):
RawDataList = []
if LenList is None:
LenList = []
-
+
assert(len(RawDataList) == len(LenList))
DataList = []
# adjust DataList according to the LenList
@@ -576,7 +576,7 @@ def GetMatchedIndex(Key1, List1, Key2, List2):
return Index
else:
StartPos = Index + 1
-
+
return -1
@@ -584,7 +584,7 @@ def GetMatchedIndex(Key1, List1, Key2, List2):
# to List like [0x36, 0x00, 0x34, 0x00, 0x21, 0x00, 0x36, 0x00, 0x34, 0x00, 0x00, 0x00]
#
# @param StringArray A string array like {0x36, 0x00, 0x34, 0x00, 0x21, 0x00, 0x36, 0x00, 0x34, 0x00, 0x00, 0x00}
-#
+#
# @retval A list object of integer items
#
def StringArrayToList(StringArray):
@@ -596,7 +596,7 @@ def StringArrayToList(StringArray):
## Convert TokenType String like "PCD_DATUM_TYPE_UINT32 | PCD_TYPE_HII" to TokenType value
#
# @param TokenType A TokenType string like "PCD_DATUM_TYPE_UINT32 | PCD_TYPE_HII"
-#
+#
# @retval A integer representation of the TokenType
#
def GetTokenTypeValue(TokenType):
@@ -623,7 +623,7 @@ def GetTokenTypeValue(TokenType):
## construct the external Pcd database using data from Dict
#
# @param Dict A dictionary contains Pcd related tables
-#
+#
# @retval Buffer A byte stream of the Pcd database
#
def BuildExDataBase(Dict):
@@ -652,26 +652,26 @@ def BuildExDataBase(Dict):
NumberOfSkuEnabledPcd = GetIntegerValue(Dict['SKU_HEAD_SIZE'])
Dict['STRING_TABLE_DB_VALUE'] = [StringArrayToList(x) for x in Dict['STRING_TABLE_VALUE']]
-
+
StringTableValue = Dict['STRING_TABLE_DB_VALUE']
# when calcute the offset, should use StringTableLen instead of StringTableValue, as string maxium len may be different with actual len
StringTableLen = Dict['STRING_TABLE_LENGTH']
DbStringTableLen = DbStringItemList(0, RawDataList = StringTableValue, LenList = StringTableLen)
-
+
PcdTokenTable = Dict['PCD_TOKENSPACE']
PcdTokenLen = Dict['PCD_TOKENSPACE_LENGTH']
PcdTokenTableValue = [StringArrayToList(x) for x in Dict['PCD_TOKENSPACE']]
DbPcdTokenTable = DbStringItemList(0, RawDataList = PcdTokenTableValue, LenList = PcdTokenLen)
-
+
PcdCNameTable = Dict['PCD_CNAME']
PcdCNameLen = Dict['PCD_CNAME_LENGTH']
PcdCNameTableValue = [StringArrayToList(x) for x in Dict['PCD_CNAME']]
DbPcdCNameTable = DbStringItemList(0, RawDataList = PcdCNameTableValue, LenList = PcdCNameLen)
-
+
PcdNameOffsetTable = Dict['PCD_NAME_OFFSET']
DbPcdNameOffsetTable = DbItemList(4,RawDataList = PcdNameOffsetTable)
-
+
SizeTableValue = zip(Dict['SIZE_TABLE_MAXIMUM_LENGTH'], Dict['SIZE_TABLE_CURRENT_LENGTH'])
DbSizeTableValue = DbSizeTableItemList(2, RawDataList = SizeTableValue)
InitValueUint16 = Dict['INIT_DB_VALUE_UINT16']
@@ -690,7 +690,7 @@ def BuildExDataBase(Dict):
DbSkuidValue = DbItemList(8, RawDataList = SkuidValue)
-
+
# Unit Db Items
UnInitValueUint64 = Dict['UNINIT_GUID_DECL_UINT64']
DbUnInitValueUint64 = DbItemList(8, RawDataList = UnInitValueUint64)
@@ -703,12 +703,12 @@ def BuildExDataBase(Dict):
UnInitValueBoolean = Dict['UNINIT_GUID_DECL_BOOLEAN']
DbUnInitValueBoolean = DbItemList(1, RawDataList = UnInitValueBoolean)
PcdTokenNumberMap = Dict['PCD_ORDER_TOKEN_NUMBER_MAP']
-
+
DbNameTotle = ["SkuidValue", "InitValueUint64", "VardefValueUint64", "InitValueUint32", "VardefValueUint32", "VpdHeadValue", "ExMapTable",
"LocalTokenNumberTable", "GuidTable", "StringHeadValue", "PcdNameOffsetTable","VariableTable", "StringTableLen", "PcdTokenTable", "PcdCNameTable",
"SizeTableValue", "InitValueUint16", "VardefValueUint16", "InitValueUint8", "VardefValueUint8", "InitValueBoolean",
"VardefValueBoolean", "UnInitValueUint64", "UnInitValueUint32", "UnInitValueUint16", "UnInitValueUint8", "UnInitValueBoolean"]
-
+
DbTotal = [SkuidValue, InitValueUint64, VardefValueUint64, InitValueUint32, VardefValueUint32, VpdHeadValue, ExMapTable,
LocalTokenNumberTable, GuidTable, StringHeadValue, PcdNameOffsetTable,VariableTable, StringTableLen, PcdTokenTable,PcdCNameTable,
SizeTableValue, InitValueUint16, VardefValueUint16, InitValueUint8, VardefValueUint8, InitValueBoolean,
@@ -717,21 +717,21 @@ def BuildExDataBase(Dict):
DbLocalTokenNumberTable, DbGuidTable, DbStringHeadValue, DbPcdNameOffsetTable,DbVariableTable, DbStringTableLen, DbPcdTokenTable, DbPcdCNameTable,
DbSizeTableValue, DbInitValueUint16, DbVardefValueUint16, DbInitValueUint8, DbVardefValueUint8, DbInitValueBoolean,
DbVardefValueBoolean, DbUnInitValueUint64, DbUnInitValueUint32, DbUnInitValueUint16, DbUnInitValueUint8, DbUnInitValueBoolean]
-
+
# VardefValueBoolean is the last table in the init table items
InitTableNum = DbNameTotle.index("VardefValueBoolean") + 1
# The FixedHeader length of the PCD_DATABASE_INIT, from Signature to Pad
FixedHeaderLen = 80
- # Get offset of SkuId table in the database
+ # Get offset of SkuId table in the database
SkuIdTableOffset = FixedHeaderLen
for DbIndex in xrange(len(DbTotal)):
if DbTotal[DbIndex] is SkuidValue:
break
SkuIdTableOffset += DbItemTotal[DbIndex].GetListSize()
-
-
- # Get offset of SkuValue table in the database
+
+
+ # Get offset of SkuValue table in the database
# Fix up the LocalTokenNumberTable, SkuHeader table
for (LocalTokenNumberTableIndex, (Offset, Table)) in enumerate(LocalTokenNumberTable):
@@ -752,11 +752,11 @@ def BuildExDataBase(Dict):
TokenTypeValue = GetTokenTypeValue(TokenTypeValue)
LocalTokenNumberTable[LocalTokenNumberTableIndex] = DbOffset|int(TokenTypeValue)
# if PCD_TYPE_SKU_ENABLED, then we need to fix up the SkuTable
-
-
-
- # resolve variable table offset
+
+
+
+ # resolve variable table offset
for VariableEntries in VariableTable:
skuindex = 0
for VariableEntryPerSku in VariableEntries:
@@ -774,7 +774,7 @@ def BuildExDataBase(Dict):
else:
assert(False)
if isinstance(VariableRefTable[0],list):
- DbOffset += skuindex * 4
+ DbOffset += skuindex * 4
skuindex += 1
if DbIndex >= InitTableNum:
assert(False)
@@ -802,28 +802,28 @@ def BuildExDataBase(Dict):
DbTotalLength += DbItemTotal[DbIndex].GetListSize()
if not Dict['PCD_INFO_FLAG']:
- DbPcdNameOffset = 0
+ DbPcdNameOffset = 0
LocalTokenCount = GetIntegerValue(Dict['LOCAL_TOKEN_NUMBER'])
ExTokenCount = GetIntegerValue(Dict['EX_TOKEN_NUMBER'])
GuidTableCount = GetIntegerValue(Dict['GUID_TABLE_SIZE'])
SystemSkuId = GetIntegerValue(Dict['SYSTEM_SKU_ID_VALUE'])
Pad = 0xDA
-
+
UninitDataBaseSize = 0
for Item in (DbUnInitValueUint64, DbUnInitValueUint32, DbUnInitValueUint16, DbUnInitValueUint8, DbUnInitValueBoolean):
UninitDataBaseSize += Item.GetListSize()
-
+
if (DbTotalLength - UninitDataBaseSize) % 8:
DbTotalLength += (8 - (DbTotalLength - UninitDataBaseSize) % 8)
# Construct the database buffer
Guid = "{0x3c7d193c, 0x682c, 0x4c14, 0xa6, 0x8f, 0x55, 0x2d, 0xea, 0x4f, 0x43, 0x7e}"
Guid = StringArrayToList(Guid)
- Buffer = pack('=LHHBBBBBBBB',
- Guid[0],
- Guid[1],
- Guid[2],
- Guid[3],
- Guid[4],
+ Buffer = pack('=LHHBBBBBBBB',
+ Guid[0],
+ Guid[1],
+ Guid[2],
+ Guid[3],
+ Guid[4],
Guid[5],
Guid[6],
Guid[7],
@@ -851,7 +851,7 @@ def BuildExDataBase(Dict):
Buffer += b
b = pack('=L', ExMapTableOffset)
-
+
Buffer += b
b = pack('=L', GuidTableOffset)
@@ -875,7 +875,7 @@ def BuildExDataBase(Dict):
Buffer += b
b = pack('=H', GuidTableCount)
-
+
Buffer += b
b = pack('=B', Pad)
Buffer += b
@@ -884,18 +884,18 @@ def BuildExDataBase(Dict):
Buffer += b
Buffer += b
Buffer += b
-
+
Index = 0
for Item in DbItemTotal:
Index +=1
b = Item.PackData()
- Buffer += b
+ Buffer += b
if Index == InitTableNum:
if len(Buffer) % 8:
for num in range(8 - len(Buffer) % 8):
b = pack('=B', Pad)
Buffer += b
- break
+ break
return Buffer
## Create code for PCD database
@@ -1049,7 +1049,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
'SYSTEM_SKU_ID' : ' SKU_ID SystemSkuId;',
'SYSTEM_SKU_ID_VALUE' : '0U'
}
-
+
SkuObj = Platform.Platform.SkuIdMgr
Dict['SYSTEM_SKU_ID_VALUE'] = 0 if SkuObj.SkuUsageType == SkuObj.SINGLE else Platform.Platform.SkuIds[SkuObj.SystemSkuId][0]
@@ -1067,7 +1067,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
Dict[Init+'_NUMSKUS_DECL_' + DatumType] = []
Dict[Init+'_VALUE_' + DatumType] = []
Dict[Init+'_DB_VALUE_'+DatumType] = []
-
+
for Type in ['STRING_HEAD','VPD_HEAD','VARIABLE_HEAD']:
Dict[Type + '_CNAME_DECL'] = []
Dict[Type + '_GUID_DECL'] = []
@@ -1077,7 +1077,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
Dict['STRING_DB_VALUE'] = []
Dict['VPD_DB_VALUE'] = []
Dict['VARIABLE_DB_VALUE'] = []
-
+
Dict['STRING_TABLE_INDEX'] = []
Dict['STRING_TABLE_LENGTH'] = []
Dict['STRING_TABLE_CNAME'] = []
@@ -1100,19 +1100,19 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
Dict['LOCAL_TOKEN_NUMBER_DB_VALUE'] = []
Dict['VARIABLE_DB_VALUE'] = []
-
+
Dict['PCD_TOKENSPACE'] = []
- Dict['PCD_CNAME'] = []
+ Dict['PCD_CNAME'] = []
Dict['PCD_TOKENSPACE_LENGTH'] = []
Dict['PCD_CNAME_LENGTH'] = []
Dict['PCD_TOKENSPACE_OFFSET'] = []
Dict['PCD_CNAME_OFFSET'] = []
Dict['PCD_TOKENSPACE_MAP'] = []
Dict['PCD_NAME_OFFSET'] = []
-
+
Dict['PCD_ORDER_TOKEN_NUMBER_MAP'] = {}
PCD_STRING_INDEX_MAP = {}
-
+
StringTableIndex = 0
StringTableSize = 0
NumberOfLocalTokens = 0
@@ -1181,8 +1181,8 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
if len(Pcd.SkuInfoList) > 1:
# Pcd.TokenTypeList += ['PCD_TYPE_SKU_ENABLED']
NumberOfSkuEnabledPcd += 1
-
- SkuIdIndex = 1
+
+ SkuIdIndex = 1
VariableHeadList = []
for SkuName in Pcd.SkuInfoList:
Sku = Pcd.SkuInfoList[SkuName]
@@ -1190,9 +1190,9 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
if SkuId is None or SkuId == '':
continue
-
+
SkuIdIndex += 1
-
+
if len(Sku.VariableName) > 0:
VariableGuidStructure = Sku.VariableGuidValue
VariableGuid = GuidStructureStringToGuidValueName(VariableGuidStructure)
@@ -1243,7 +1243,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
for Index in range(Dict['STRING_TABLE_VALUE'].index(VariableNameStructure)):
VariableHeadStringIndex += Dict['STRING_TABLE_LENGTH'][Index]
VariableHeadList.append(VariableHeadStringIndex)
-
+
VariableHeadStringIndex = VariableHeadList[SkuIdIndex - 2]
# store VariableGuid to GuidTable and get the VariableHeadGuidIndex
@@ -1254,11 +1254,11 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
if "PCD_TYPE_STRING" in Pcd.TokenTypeList:
VariableHeadValueList.append('%dU, offsetof(%s_PCD_DATABASE, Init.%s_%s), %dU, %sU' %
- (VariableHeadStringIndex, Phase, CName, TokenSpaceGuid,
+ (VariableHeadStringIndex, Phase, CName, TokenSpaceGuid,
VariableHeadGuidIndex, Sku.VariableOffset))
else:
VariableHeadValueList.append('%dU, offsetof(%s_PCD_DATABASE, Init.%s_%s_VariableDefault_%s), %dU, %sU' %
- (VariableHeadStringIndex, Phase, CName, TokenSpaceGuid, SkuIdIndex,
+ (VariableHeadStringIndex, Phase, CName, TokenSpaceGuid, SkuIdIndex,
VariableHeadGuidIndex, Sku.VariableOffset))
Dict['VARDEF_CNAME_'+Pcd.DatumType].append(CName)
Dict['VARDEF_GUID_'+Pcd.DatumType].append(TokenSpaceGuid)
@@ -1271,7 +1271,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
# warning under linux building environment.
#
Dict['VARDEF_DB_VALUE_'+Pcd.DatumType].append(Sku.HiiDefaultValue)
-
+
if Pcd.DatumType == TAB_UINT64:
Dict['VARDEF_VALUE_'+Pcd.DatumType].append(Sku.HiiDefaultValue + "ULL")
elif Pcd.DatumType in (TAB_UINT32, TAB_UINT16, TAB_UINT8):
@@ -1304,13 +1304,13 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
Pcd.InitString = 'INIT'
VpdHeadOffsetList.append(str(Sku.VpdOffset) + 'U')
VpdDbOffsetList.append(Sku.VpdOffset)
- # Also add the VOID* string of VPD PCD to SizeTable
+ # Also add the VOID* string of VPD PCD to SizeTable
if Pcd.DatumType == TAB_VOID:
NumberOfSizeItems += 1
# For VPD type of PCD, its current size is equal to its MAX size.
- VoidStarTypeCurrSize = [str(Pcd.MaxDatumSize) + 'U']
+ VoidStarTypeCurrSize = [str(Pcd.MaxDatumSize) + 'U']
continue
-
+
if Pcd.DatumType == TAB_VOID:
Pcd.TokenTypeList += ['PCD_TYPE_STRING']
Pcd.InitString = 'INIT'
@@ -1337,7 +1337,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
DefaultValueBinStructure = StringToArray(Sku.DefaultValue)
Size = len(Sku.DefaultValue.split(","))
Dict['STRING_TABLE_VALUE'].append(DefaultValueBinStructure)
-
+
StringHeadOffsetList.append(str(StringTableSize) + 'U')
StringDbOffsetList.append(StringTableSize)
if Pcd.MaxDatumSize != '':
@@ -1376,10 +1376,10 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
ValueList.append(Sku.DefaultValue + "U")
elif Pcd.DatumType == "BOOLEAN":
if Sku.DefaultValue in ["1", "0"]:
- ValueList.append(Sku.DefaultValue + "U")
+ ValueList.append(Sku.DefaultValue + "U")
else:
ValueList.append(Sku.DefaultValue)
-
+
DbValueList.append(Sku.DefaultValue)
Pcd.TokenTypeList = list(set(Pcd.TokenTypeList))
@@ -1388,8 +1388,8 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
Dict['SIZE_TABLE_GUID'].append(TokenSpaceGuid)
Dict['SIZE_TABLE_MAXIMUM_LENGTH'].append(str(Pcd.MaxDatumSize) + 'U')
Dict['SIZE_TABLE_CURRENT_LENGTH'].append(VoidStarTypeCurrSize)
-
-
+
+
if 'PCD_TYPE_HII' in Pcd.TokenTypeList:
Dict['VARIABLE_HEAD_CNAME_DECL'].append(CName)
@@ -1422,7 +1422,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
else:
Dict[Pcd.InitString+'_VALUE_'+Pcd.DatumType].append(', '.join(ValueList))
Dict[Pcd.InitString+'_DB_VALUE_'+Pcd.DatumType].append(DbValueList)
-
+
if Phase == 'PEI':
NumberOfLocalTokens = NumberOfPeiLocalTokens
if Phase == 'DXE':
@@ -1434,7 +1434,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
Dict['TOKEN_TYPE'] = ['' for x in range(NumberOfLocalTokens)]
Dict['LOCAL_TOKEN_NUMBER_DB_VALUE'] = ['' for x in range(NumberOfLocalTokens)]
Dict['PCD_CNAME'] = ['' for x in range(NumberOfLocalTokens)]
- Dict['PCD_TOKENSPACE_MAP'] = ['' for x in range(NumberOfLocalTokens)]
+ Dict['PCD_TOKENSPACE_MAP'] = ['' for x in range(NumberOfLocalTokens)]
Dict['PCD_CNAME_LENGTH'] = [0 for x in range(NumberOfLocalTokens)]
SkuEnablePcdIndex = 0
for Pcd in ReorderedDynPcdList:
@@ -1459,7 +1459,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
EdkLogger.debug(EdkLogger.DEBUG_1, "PCD = %s.%s" % (CName, TokenSpaceGuidCName))
EdkLogger.debug(EdkLogger.DEBUG_1, "phase = %s" % Phase)
EdkLogger.debug(EdkLogger.DEBUG_1, "GeneratedTokenNumber = %s" % str(GeneratedTokenNumber))
-
+
#
# following four Dict items hold the information for LocalTokenNumberTable
#
@@ -1470,7 +1470,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
Dict['TOKEN_CNAME'][GeneratedTokenNumber] = CName
Dict['TOKEN_GUID'][GeneratedTokenNumber] = TokenSpaceGuid
Dict['TOKEN_TYPE'][GeneratedTokenNumber] = ' | '.join(Pcd.TokenTypeList)
-
+
if Platform.Platform.PcdInfoFlag:
TokenSpaceGuidCNameArray = StringToArray('"' + TokenSpaceGuidCName + '"' )
if TokenSpaceGuidCNameArray not in Dict['PCD_TOKENSPACE']:
@@ -1479,10 +1479,10 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
Dict['PCD_TOKENSPACE_MAP'][GeneratedTokenNumber] = Dict['PCD_TOKENSPACE'].index(TokenSpaceGuidCNameArray)
CNameBinArray = StringToArray('"' + CName + '"' )
Dict['PCD_CNAME'][GeneratedTokenNumber] = CNameBinArray
-
+
Dict['PCD_CNAME_LENGTH'][GeneratedTokenNumber] = len(CNameBinArray.split(","))
-
-
+
+
Pcd.TokenTypeList = list(set(Pcd.TokenTypeList))
# search the Offset and Table, used by LocalTokenNumberTableOffset
@@ -1508,7 +1508,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
if Pcd.InitString == 'UNINIT':
Table = Dict[Pcd.InitString+'_GUID_DECL_'+Pcd.DatumType]
else:
- Table = Dict[Pcd.InitString+'_DB_VALUE_'+Pcd.DatumType]
+ Table = Dict[Pcd.InitString+'_DB_VALUE_'+Pcd.DatumType]
Dict['LOCAL_TOKEN_NUMBER_DB_VALUE'][GeneratedTokenNumber] = (Offset, Table)
#
@@ -1518,10 +1518,10 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
Dict['VARDEF_HEADER'][GeneratedTokenNumber] = '_Variable_Header'
else:
Dict['VARDEF_HEADER'][GeneratedTokenNumber] = ''
-
-
+
+
if Pcd.Type in gDynamicExPcd:
-
+
if Phase == 'DXE':
GeneratedTokenNumber += NumberOfPeiLocalTokens
#
@@ -1533,7 +1533,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
# Therefore, 1 is added to GeneratedTokenNumber to generate a PCD Token Number before being inserted
# to the EXMAPPING_TABLE.
#
-
+
Dict['EXMAPPING_TABLE_EXTOKEN'].append(str(Pcd.TokenValue) + 'U')
Dict['EXMAPPING_TABLE_LOCAL_TOKEN'].append(str(GeneratedTokenNumber + 1) + 'U')
@@ -1544,12 +1544,12 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
TokenSpaceIndex = StringTableSize
for i in range(Dict['PCD_TOKENSPACE_MAP'][index]):
TokenSpaceIndex += Dict['PCD_TOKENSPACE_LENGTH'][i]
- Dict['PCD_TOKENSPACE_OFFSET'].append(TokenSpaceIndex)
+ Dict['PCD_TOKENSPACE_OFFSET'].append(TokenSpaceIndex)
for index in range(len(Dict['PCD_TOKENSPACE'])):
StringTableSize += Dict['PCD_TOKENSPACE_LENGTH'][index]
StringTableIndex += 1
for index in range(len(Dict['PCD_CNAME'])):
- Dict['PCD_CNAME_OFFSET'].append(StringTableSize)
+ Dict['PCD_CNAME_OFFSET'].append(StringTableSize)
Dict['PCD_NAME_OFFSET'].append(Dict['PCD_TOKENSPACE_OFFSET'][index])
Dict['PCD_NAME_OFFSET'].append(StringTableSize)
StringTableSize += Dict['PCD_CNAME_LENGTH'][index]
@@ -1592,15 +1592,15 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
if NumberOfSizeItems != 0:
Dict['SIZE_TABLE_SIZE'] = str(NumberOfSizeItems * 2) + 'U'
-
- if NumberOfSkuEnabledPcd != 0:
+
+ if NumberOfSkuEnabledPcd != 0:
Dict['SKU_HEAD_SIZE'] = str(NumberOfSkuEnabledPcd) + 'U'
-
+
for AvailableSkuNumber in SkuObj.SkuIdNumberSet:
if AvailableSkuNumber not in Dict['SKUID_VALUE']:
Dict['SKUID_VALUE'].append(AvailableSkuNumber)
Dict['SKUID_VALUE'][0] = len(Dict['SKUID_VALUE']) - 1
-
+
AutoGenH.Append(gPcdDatabaseAutoGenH.Replace(Dict))
if NumberOfLocalTokens == 0:
AutoGenC.Append(gEmptyPcdDatabaseAutoGenC.Replace(Dict))
@@ -1613,11 +1613,11 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
SizeCurLenTempList = []
SizeMaxLenTempList = []
ReOrderFlag = True
-
+
if len(Dict['SIZE_TABLE_CNAME']) == 1:
if not (Dict['SIZE_TABLE_CNAME'][0] and Dict['SIZE_TABLE_GUID'][0]):
ReOrderFlag = False
-
+
if ReOrderFlag:
for Count in range(len(Dict['TOKEN_CNAME'])):
for Count1 in range(len(Dict['SIZE_TABLE_CNAME'])):
@@ -1627,15 +1627,15 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
SizeGuidTempList.append(Dict['SIZE_TABLE_GUID'][Count1])
SizeCurLenTempList.append(Dict['SIZE_TABLE_CURRENT_LENGTH'][Count1])
SizeMaxLenTempList.append(Dict['SIZE_TABLE_MAXIMUM_LENGTH'][Count1])
-
+
for Count in range(len(Dict['SIZE_TABLE_CNAME'])):
Dict['SIZE_TABLE_CNAME'][Count] = SizeCNameTempList[Count]
Dict['SIZE_TABLE_GUID'][Count] = SizeGuidTempList[Count]
Dict['SIZE_TABLE_CURRENT_LENGTH'][Count] = SizeCurLenTempList[Count]
Dict['SIZE_TABLE_MAXIMUM_LENGTH'][Count] = SizeMaxLenTempList[Count]
-
+
AutoGenC.Append(gPcdDatabaseAutoGenC.Replace(Dict))
-
+
# print Phase
Buffer = BuildExDataBase(Dict)
diff --git a/BaseTools/Source/Python/AutoGen/InfSectionParser.py b/BaseTools/Source/Python/AutoGen/InfSectionParser.py
index 2cd5a6667a02..d98508973841 100644
--- a/BaseTools/Source/Python/AutoGen/InfSectionParser.py
+++ b/BaseTools/Source/Python/AutoGen/InfSectionParser.py
@@ -17,14 +17,14 @@
import Common.EdkLogger as EdkLogger
from Common.BuildToolError import *
from Common.DataType import *
-
+
class InfSectionParser():
def __init__(self, FilePath):
self._FilePath = FilePath
self._FileSectionDataList = []
self._ParserInf()
-
+
def _ParserInf(self):
FileLinesList = []
UserExtFind = False
@@ -32,12 +32,12 @@ class InfSectionParser():
FileLastLine = False
SectionLine = ''
SectionData = []
-
+
try:
FileLinesList = open(self._FilePath, "r", 0).readlines()
except BaseException:
EdkLogger.error("build", AUTOGEN_ERROR, 'File %s is opened failed.' % self._FilePath)
-
+
for Index in range(0, len(FileLinesList)):
line = str(FileLinesList[Index]).strip()
if Index + 1 == len(FileLinesList):
@@ -52,7 +52,7 @@ class InfSectionParser():
SectionLine = line
UserExtFind = True
FindEnd = False
-
+
if (NextLine != '' and NextLine[0] == TAB_SECTION_START and \
NextLine[-1] == TAB_SECTION_END) or FileLastLine:
UserExtFind = False
@@ -60,7 +60,7 @@ class InfSectionParser():
self._FileSectionDataList.append({SectionLine: SectionData[:]})
del SectionData[:]
SectionLine = ''
-
+
# Get user extension TianoCore data
#
# @return: a list include some dictionary that key is section and value is a list contain all data.
diff --git a/BaseTools/Source/Python/AutoGen/StrGather.py b/BaseTools/Source/Python/AutoGen/StrGather.py
index 73af1214eb0a..e97a3175e991 100644
--- a/BaseTools/Source/Python/AutoGen/StrGather.py
+++ b/BaseTools/Source/Python/AutoGen/StrGather.py
@@ -1,5 +1,5 @@
## @file
-# This file is used to parse a strings file and create or add to a string database
+# This file is used to parse a strings file and create or add to a string database
# file.
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
@@ -144,7 +144,7 @@ def CreateHFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniGenCFlag):
Str = WriteLine(Str, Line)
UnusedStr = ''
- #Group the referred/Unused STRING token together.
+ #Group the referred/Unused STRING token together.
for Index in range(2, len(UniObjectClass.OrderedStringList[UniObjectClass.LanguageDef[0][0]])):
StringItem = UniObjectClass.OrderedStringList[UniObjectClass.LanguageDef[0][0]][Index]
Name = StringItem.StringName
@@ -265,16 +265,16 @@ def GetFilteredLanguage(UniLanguageList, LanguageFilterList):
PrimaryTag = Language[0:Language.find('-')].lower()
else:
PrimaryTag = Language
-
+
if len(PrimaryTag) == 3:
PrimaryTag = LangConvTable.get(PrimaryTag)
-
+
for UniLanguage in UniLanguageList:
if UniLanguage.find('-') != -1:
UniLanguagePrimaryTag = UniLanguage[0:UniLanguage.find('-')].lower()
else:
UniLanguagePrimaryTag = UniLanguage
-
+
if len(UniLanguagePrimaryTag) == 3:
UniLanguagePrimaryTag = LangConvTable.get(UniLanguagePrimaryTag)
@@ -307,7 +307,7 @@ def GetFilteredLanguage(UniLanguageList, LanguageFilterList):
# @param UniObjectClass A UniObjectClass instance
# @param IsCompatibleMode Compatible mode
# @param UniBinBuffer UniBinBuffer to contain UniBinary data.
-# @param FilterInfo Platform language filter information
+# @param FilterInfo Platform language filter information
#
# @retval Str: A string of .c file content
#
@@ -325,14 +325,14 @@ def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniBinBuffer,
else:
# EDK module is using ISO639-2 format filter, convert to the RFC4646 format
LanguageFilterList = [LangConvTable.get(F.lower()) for F in FilterInfo[1]]
-
+
UniLanguageList = []
for IndexI in range(len(UniObjectClass.LanguageDef)):
UniLanguageList += [UniObjectClass.LanguageDef[IndexI][0]]
UniLanguageListFiltered = GetFilteredLanguage(UniLanguageList, LanguageFilterList)
-
-
+
+
#
# Create lines for each language's strings
#
@@ -340,7 +340,7 @@ def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniBinBuffer,
Language = UniObjectClass.LanguageDef[IndexI][0]
if Language not in UniLanguageListFiltered:
continue
-
+
StringBuffer = StringIO()
StrStringValue = ''
ArrayLength = 0
@@ -403,7 +403,7 @@ def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniBinBuffer,
# Add an EFI_HII_SIBT_END at last
#
Str = WriteLine(Str, ' ' + EFI_HII_SIBT_END + ",")
-
+
#
# Create binary UNI string
#
@@ -458,7 +458,7 @@ def CreateCFileEnd():
# @param BaseName: The basename of strings
# @param UniObjectClass A UniObjectClass instance
# @param IsCompatibleMode Compatible Mode
-# @param FilterInfo Platform language filter information
+# @param FilterInfo Platform language filter information
#
# @retval CFile: A string of complete .c file
#
@@ -544,7 +544,7 @@ def SearchString(UniObjectClass, FileList, IsCompatibleMode):
# This function is used for UEFI2.1 spec
#
#
-def GetStringFiles(UniFilList, SourceFileList, IncludeList, IncludePathList, SkipList, BaseName, IsCompatibleMode = False, ShellMode = False, UniGenCFlag = True, UniGenBinBuffer = None, FilterInfo = [True, []]):
+def GetStringFiles(UniFilList, SourceFileList, IncludeList, IncludePathList, SkipList, BaseName, IsCompatibleMode = False, ShellMode = False, UniGenCFlag = True, UniGenBinBuffer = None, FilterInfo = [True, []]):
if len(UniFilList) > 0:
if ShellMode:
#
diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py
index 54b6fb22a08a..ba451044f8e9 100644
--- a/BaseTools/Source/Python/AutoGen/UniClassObject.py
+++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py
@@ -283,7 +283,7 @@ class UniFileClassObject(object):
if not IsLangInDef:
#
# The found STRING tokens will be added into new language string list
- # so that the unique STRING identifier is reserved for all languages in the package list.
+ # so that the unique STRING identifier is reserved for all languages in the package list.
#
FirstLangName = self.LanguageDef[0][0]
if LangName != FirstLangName:
@@ -410,10 +410,10 @@ class UniFileClassObject(object):
#
# Ignore empty line
#
- if len(Line) == 0:
- continue
-
-
+ if len(Line) == 0:
+ continue
+
+
Line = Line.replace(u'/langdef', u'#langdef')
Line = Line.replace(u'/string', u'#string')
Line = Line.replace(u'/language', u'#language')
@@ -428,8 +428,8 @@ class UniFileClassObject(object):
Line = Line.replace(u'\\r', CR)
Line = Line.replace(u'\\t', u' ')
Line = Line.replace(u'\t', u' ')
- Line = Line.replace(u'\\"', u'"')
- Line = Line.replace(u"\\'", u"'")
+ Line = Line.replace(u'\\"', u'"')
+ Line = Line.replace(u"\\'", u"'")
Line = Line.replace(BACK_SLASH_PLACEHOLDER, u'\\')
StartPos = Line.find(u'\\x')
@@ -569,7 +569,7 @@ class UniFileClassObject(object):
else:
EdkLogger.error('Unicode File Parser', FORMAT_NOT_SUPPORTED, "The language '%s' for %s is not defined in Unicode file %s." \
% (Language, Name, self.File))
-
+
if Language not in self.OrderedStringList:
self.OrderedStringList[Language] = []
self.OrderedStringDict[Language] = {}
@@ -591,7 +591,7 @@ class UniFileClassObject(object):
for LangName in self.LanguageDef:
#
# New STRING token will be added into all language string lists.
- # so that the unique STRING identifier is reserved for all languages in the package list.
+ # so that the unique STRING identifier is reserved for all languages in the package list.
#
if LangName[0] != Language:
if UseOtherLangDef != '':
diff --git a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py
index 92c8fe2df904..f5b1574e4440 100644
--- a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py
+++ b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py
@@ -24,7 +24,7 @@ from Common.DataType import *
class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object):
def __init__(self):
self.var_check_info = []
-
+
def push_back(self, var_check_tab):
for tab in self.var_check_info:
if tab.equal(var_check_tab):
@@ -32,15 +32,15 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object):
break
else:
self.var_check_info.append(var_check_tab)
-
+
def dump(self, dest, Phase):
-
+
FormatMap = {}
FormatMap[1] = "=B"
FormatMap[2] = "=H"
FormatMap[4] = "=L"
FormatMap[8] = "=Q"
-
+
if not os.path.isabs(dest):
return
if not os.path.exists(dest):
@@ -179,7 +179,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object):
b = pack("=B", var_check_tab.pad)
Buffer += b
realLength += 1
-
+
DbFile = StringIO()
if Phase == 'DXE' and os.path.exists(BinFilePath):
BinFile = open(BinFilePath, "rb")
@@ -193,7 +193,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object):
Buffer = BinBuffer + Buffer
DbFile.write(Buffer)
SaveFileOnChange(BinFilePath, DbFile.getvalue(), True)
-
+
class VAR_CHECK_PCD_VARIABLE_TAB(object):
pad = 0xDA
@@ -211,26 +211,26 @@ class VAR_CHECK_PCD_VARIABLE_TAB(object):
def UpdateSize(self):
self.HeaderLength = 32 + len(self.Name.split(","))
self.Length = 32 + len(self.Name.split(",")) + self.GetValidTabLen()
-
+
def GetValidTabLen(self):
validtablen = 0
for item in self.validtab:
- validtablen += item.Length
- return validtablen
-
+ validtablen += item.Length
+ return validtablen
+
def SetAttributes(self, attributes):
self.Attributes = attributes
-
+
def push_back(self, valid_obj):
if valid_obj is not None:
self.validtab.append(valid_obj)
-
+
def equal(self, varchecktab):
if self.Guid == varchecktab.Guid and self.Name == varchecktab.Name:
return True
else:
return False
-
+
def merge(self, varchecktab):
for validobj in varchecktab.validtab:
if validobj in self.validtab:
@@ -253,10 +253,10 @@ class VAR_CHECK_PCD_VALID_OBJ(object):
except:
self.StorageWidth = 0
self.ValidData = False
-
- def __eq__(self, validObj):
+
+ def __eq__(self, validObj):
return validObj and self.VarOffset == validObj.VarOffset
-
+
class VAR_CHECK_PCD_VALID_LIST(VAR_CHECK_PCD_VALID_OBJ):
def __init__(self, VarOffset, validlist, PcdDataType):
super(VAR_CHECK_PCD_VALID_LIST, self).__init__(VarOffset, validlist, PcdDataType)
@@ -264,7 +264,7 @@ class VAR_CHECK_PCD_VALID_LIST(VAR_CHECK_PCD_VALID_OBJ):
valid_num_list = []
for item in self.rawdata:
valid_num_list.extend(item.split(','))
-
+
for valid_num in valid_num_list:
valid_num = valid_num.strip()
@@ -273,10 +273,10 @@ class VAR_CHECK_PCD_VALID_LIST(VAR_CHECK_PCD_VALID_OBJ):
else:
self.data.add(int(valid_num))
-
+
self.Length = 5 + len(self.data) * self.StorageWidth
-
-
+
+
class VAR_CHECK_PCD_VALID_RANGE(VAR_CHECK_PCD_VALID_OBJ):
def __init__(self, VarOffset, validrange, PcdDataType):
super(VAR_CHECK_PCD_VALID_RANGE, self).__init__(VarOffset, validrange, PcdDataType)
@@ -293,7 +293,7 @@ class VAR_CHECK_PCD_VALID_RANGE(VAR_CHECK_PCD_VALID_OBJ):
for obj in rangelist.pop():
self.data.add((obj.start, obj.end))
self.Length = 5 + len(self.data) * 2 * self.StorageWidth
-
+
def GetValidationObject(PcdClass, VarOffset):
if PcdClass.validateranges:
diff --git a/BaseTools/Source/Python/BPDG/BPDG.py b/BaseTools/Source/Python/BPDG/BPDG.py
index 6c8f89f5d12b..4f7a73b7e688 100644
--- a/BaseTools/Source/Python/BPDG/BPDG.py
+++ b/BaseTools/Source/Python/BPDG/BPDG.py
@@ -1,9 +1,9 @@
## @file
# Intel Binary Product Data Generation Tool (Intel BPDG).
-# This tool provide a simple process for the creation of a binary file containing read-only
-# configuration data for EDK II platforms that contain Dynamic and DynamicEx PCDs described
-# in VPD sections. It also provide an option for specifying an alternate name for a mapping
-# file of PCD layout for use during the build when the platform integrator selects to use
+# This tool provide a simple process for the creation of a binary file containing read-only
+# configuration data for EDK II platforms that contain Dynamic and DynamicEx PCDs described
+# in VPD sections. It also provide an option for specifying an alternate name for a mapping
+# file of PCD layout for use during the build when the platform integrator selects to use
# automatic offset calculation.
#
# Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
@@ -46,26 +46,26 @@ VERSION = (st.LBL_BPDG_VERSION + " Build " + gBUILD_VERSION)
#
def main():
global Options, Args
-
+
# Initialize log system
- EdkLogger.Initialize()
+ EdkLogger.Initialize()
Options, Args = MyOptionParser()
-
+
ReturnCode = 0
-
+
if Options.opt_verbose:
EdkLogger.SetLevel(EdkLogger.VERBOSE)
elif Options.opt_quiet:
EdkLogger.SetLevel(EdkLogger.QUIET)
elif Options.debug_level is not None:
- EdkLogger.SetLevel(Options.debug_level + 1)
+ EdkLogger.SetLevel(Options.debug_level + 1)
else:
EdkLogger.SetLevel(EdkLogger.INFO)
-
+
if Options.bin_filename is None:
- EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please use the -o option to specify the file name for the VPD binary file")
+ EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please use the -o option to specify the file name for the VPD binary file")
if Options.filename is None:
- EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please use the -m option to specify the file name for the mapping file")
+ EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please use the -m option to specify the file name for the mapping file")
Force = False
if Options.opt_force is not None:
@@ -75,8 +75,8 @@ def main():
StartBpdg(Args[0], Options.filename, Options.bin_filename, Force)
else :
EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please specify the file which contain the VPD pcd info.",
- None)
-
+ None)
+
return ReturnCode
@@ -86,8 +86,8 @@ def main():
#
# @retval options A optparse.Values object containing the parsed options
# @retval args Target of BPDG command
-#
-def MyOptionParser():
+#
+def MyOptionParser():
#
# Process command line firstly.
#
@@ -105,10 +105,10 @@ def MyOptionParser():
parser.add_option('-o', '--vpd-filename', action='store', dest='bin_filename',
help=st.MSG_OPTION_VPD_FILENAME)
parser.add_option('-m', '--map-filename', action='store', dest='filename',
- help=st.MSG_OPTION_MAP_FILENAME)
+ help=st.MSG_OPTION_MAP_FILENAME)
parser.add_option('-f', '--force', action='store_true', dest='opt_force',
- help=st.MSG_OPTION_FORCE)
-
+ help=st.MSG_OPTION_FORCE)
+
(options, args) = parser.parse_args()
if len(args) == 0:
EdkLogger.info("Please specify the filename.txt file which contain the VPD pcd info!")
@@ -117,7 +117,7 @@ def MyOptionParser():
return options, args
-## Start BPDG and call the main functions
+## Start BPDG and call the main functions
#
# This method mainly focus on call GenVPD class member functions to complete
# BPDG's target. It will process VpdFile override, and provide the interface file
@@ -136,19 +136,19 @@ def StartBpdg(InputFileName, MapFileName, VpdFileName, Force):
choice = sys.stdin.readline()
if choice.strip().lower() not in ['y', 'yes', '']:
return
-
+
GenVPD = GenVpd.GenVPD (InputFileName, MapFileName, VpdFileName)
-
- EdkLogger.info('%-24s = %s' % ("VPD input data file: ", InputFileName))
+
+ EdkLogger.info('%-24s = %s' % ("VPD input data file: ", InputFileName))
EdkLogger.info('%-24s = %s' % ("VPD output map file: ", MapFileName))
- EdkLogger.info('%-24s = %s' % ("VPD output binary file: ", VpdFileName))
-
+ EdkLogger.info('%-24s = %s' % ("VPD output binary file: ", VpdFileName))
+
GenVPD.ParserInputFile()
GenVPD.FormatFileLine()
GenVPD.FixVpdOffset()
GenVPD.GenerateVpdFile(MapFileName, VpdFileName)
-
- EdkLogger.info("- Vpd pcd fixed done! -")
+
+ EdkLogger.info("- Vpd pcd fixed done! -")
if __name__ == '__main__':
r = main()
@@ -156,4 +156,4 @@ if __name__ == '__main__':
if r < 0 or r > 127: r = 1
sys.exit(r)
-
+
diff --git a/BaseTools/Source/Python/BPDG/GenVpd.py b/BaseTools/Source/Python/BPDG/GenVpd.py
index 69a9665f5a76..f83d477c35f0 100644
--- a/BaseTools/Source/Python/BPDG/GenVpd.py
+++ b/BaseTools/Source/Python/BPDG/GenVpd.py
@@ -31,10 +31,10 @@ _FORMAT_CHAR = {1: 'B',
## The VPD PCD data structure for store and process each VPD PCD entry.
#
-# This class contain method to format and pack pcd's value.
+# This class contain method to format and pack pcd's value.
#
class PcdEntry:
- def __init__(self, PcdCName, SkuId,PcdOffset, PcdSize, PcdValue, Lineno=None, FileName=None, PcdUnpackValue=None,
+ def __init__(self, PcdCName, SkuId,PcdOffset, PcdSize, PcdValue, Lineno=None, FileName=None, PcdUnpackValue=None,
PcdBinOffset=None, PcdBinSize=None, Alignment=None):
self.PcdCName = PcdCName.strip()
self.SkuId = SkuId.strip()
@@ -47,7 +47,7 @@ class PcdEntry:
self.PcdBinOffset = PcdBinOffset
self.PcdBinSize = PcdBinSize
self.Alignment = Alignment
-
+
if self.PcdValue == '' :
EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID,
"Invalid PCD format(Name: %s File: %s line: %s) , no Value specified!" % (self.PcdCName, self.FileName, self.Lineno))
@@ -63,13 +63,13 @@ class PcdEntry:
self._GenOffsetValue ()
## Analyze the string value to judge the PCD's datum type equal to Boolean or not.
- #
+ #
# @param ValueString PCD's value
# @param Size PCD's size
- #
+ #
# @retval True PCD's datum type is Boolean
- # @retval False PCD's datum type is not Boolean.
- #
+ # @retval False PCD's datum type is not Boolean.
+ #
def _IsBoolean(self, ValueString, Size):
if (Size == "1"):
if ValueString.upper() in ["TRUE", "FALSE"]:
@@ -80,10 +80,10 @@ class PcdEntry:
return False
## Convert the PCD's value from string to integer.
- #
+ #
# This function will try to convert the Offset value form string to integer
# for both hexadecimal and decimal.
- #
+ #
def _GenOffsetValue(self):
if self.PcdOffset != "*" :
try:
@@ -96,10 +96,10 @@ class PcdEntry:
"Invalid offset value %s for PCD %s (File: %s Line: %s)" % (self.PcdOffset, self.PcdCName, self.FileName, self.Lineno))
## Pack Boolean type VPD PCD's value form string to binary type.
- #
+ #
# @param ValueString The boolean type string for pack.
- #
- #
+ #
+ #
def _PackBooleanValue(self, ValueString):
if ValueString.upper() == "TRUE" or ValueString in ["1", "0x1", "0x01"]:
try:
@@ -115,10 +115,10 @@ class PcdEntry:
"Invalid size or value for PCD %s to pack(File: %s Line: %s)." % (self.PcdCName, self.FileName, self.Lineno))
## Pack Integer type VPD PCD's value form string to binary type.
- #
+ #
# @param ValueString The Integer type string for pack.
- #
- #
+ #
+ #
def _PackIntValue(self, IntValue, Size):
if Size not in _FORMAT_CHAR:
EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID,
@@ -170,7 +170,7 @@ class PcdEntry:
# 3: {bytearray}, only support byte-array.
#
# @param ValueString The Integer type string for pack.
- #
+ #
def _PackPtrValue(self, ValueString, Size):
if ValueString.startswith('L"') or ValueString.startswith("L'"):
self._PackUnicode(ValueString, Size)
@@ -183,9 +183,9 @@ class PcdEntry:
"Invalid VOID* type PCD %s value %s (File: %s Line: %s)" % (self.PcdCName, ValueString, self.FileName, self.Lineno))
## Pack an Ascii PCD value.
- #
+ #
# An Ascii string for a PCD should be in format as ""/''.
- #
+ #
def _PackString(self, ValueString, Size):
if (Size < 0):
EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID,
@@ -198,7 +198,7 @@ class PcdEntry:
QuotedFlag = False
ValueString = ValueString[1:-1]
- # No null-terminator in 'string'
+ # No null-terminator in 'string'
if (QuotedFlag and len(ValueString) + 1 > Size) or (not QuotedFlag and len(ValueString) > Size):
EdkLogger.error("BPDG", BuildToolError.RESOURCE_OVERFLOW,
"PCD value string %s is exceed to size %d(File: %s Line: %s)" % (ValueString, Size, self.FileName, self.Lineno))
@@ -209,9 +209,9 @@ class PcdEntry:
"Invalid size or value for PCD %s to pack(File: %s Line: %s)." % (self.PcdCName, self.FileName, self.Lineno))
## Pack a byte-array PCD value.
- #
+ #
# A byte-array for a PCD should be in format as {0x01, 0x02, ...}.
- #
+ #
def _PackByteArray(self, ValueString, Size):
if (Size < 0):
EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID, "Invalid parameter Size %s of PCD %s!(File: %s Line: %s)" % (self.PcdBinSize, self.PcdCName, self.FileName, self.Lineno))
@@ -261,7 +261,7 @@ class PcdEntry:
self.PcdValue = ReturnArray.tolist()
## Pack a unicode PCD value into byte array.
- #
+ #
# A unicode string for a PCD should be in format as L""/L''.
#
def _PackUnicode(self, UnicodeString, Size):
@@ -271,7 +271,7 @@ class PcdEntry:
QuotedFlag = True
if UnicodeString.startswith("L'"):
- QuotedFlag = False
+ QuotedFlag = False
UnicodeString = UnicodeString[2:-1]
# No null-terminator in L'string'
@@ -304,7 +304,7 @@ class PcdEntry:
# 2. Format the input file data to remove unused lines;
# 3. Fixed offset if needed;
# 4. Generate output file, including guided.map and guided.bin file;
-#
+#
class GenVPD :
## Constructor of DscBuildData
#
@@ -334,9 +334,9 @@ class GenVPD :
EdkLogger.error("BPDG", BuildToolError.FILE_OPEN_FAILURE, "File open failed for %s" % InputFileName, None)
##
- # Parser the input file which is generated by the build tool. Convert the value of each pcd's
+ # Parser the input file which is generated by the build tool. Convert the value of each pcd's
# from string to it's real format. Also remove the useless line in the input file.
- #
+ #
def ParserInputFile (self):
count = 0
for line in self.FileLinesList:
@@ -390,7 +390,7 @@ class GenVPD :
#
# After remove the useless line, if there are no data remain in the file line list,
# Report warning messages to user's.
- #
+ #
if len(self.FileLinesList) == 0 :
EdkLogger.warn('BPDG', BuildToolError.RESOURCE_NOT_AVAILABLE,
"There are no VPD type pcds defined in DSC file, Please check it.")
@@ -399,7 +399,7 @@ class GenVPD :
count = 0
for line in self.FileLinesList:
if line is not None :
- PCD = PcdEntry(line[0], line[1], line[2], line[3], line[4],line[5], self.InputFileName)
+ PCD = PcdEntry(line[0], line[1], line[2], line[3], line[4],line[5], self.InputFileName)
# Strip the space char
PCD.PcdCName = PCD.PcdCName.strip(' ')
PCD.SkuId = PCD.SkuId.strip(' ')
@@ -480,14 +480,14 @@ class GenVPD :
continue
##
- # This function used to create a clean list only contain useful information and reorganized to make it
+ # This function used to create a clean list only contain useful information and reorganized to make it
# easy to be sorted
#
def FormatFileLine (self) :
for eachPcd in self.FileLinesList :
if eachPcd.PcdOffset != '*' :
- # Use pcd's Offset value as key, and pcd's Value as value
+ # Use pcd's Offset value as key, and pcd's Value as value
self.PcdFixedOffsetSizeList.append(eachPcd)
else :
# Use pcd's CName as key, and pcd's Size as value
@@ -497,11 +497,11 @@ class GenVPD :
##
# This function is use to fix the offset value which the not specified in the map file.
# Usually it use the star (meaning any offset) character in the offset field
- #
+ #
def FixVpdOffset (self):
# At first, the offset should start at 0
# Sort fixed offset list in order to find out where has free spaces for the pcd's offset
- # value is "*" to insert into.
+ # value is "*" to insert into.
self.PcdFixedOffsetSizeList.sort(lambda x, y: cmp(x.PcdBinOffset, y.PcdBinOffset))
@@ -530,57 +530,57 @@ class GenVPD :
Pcd.PcdBinOffset = NowOffset
Pcd.PcdOffset = str(hex(Pcd.PcdBinOffset))
NowOffset += Pcd.PcdOccupySize
-
+
self.PcdFixedOffsetSizeList = self.PcdUnknownOffsetList
return
- # Check the offset of VPD type pcd's offset start from 0.
+ # Check the offset of VPD type pcd's offset start from 0.
if self.PcdFixedOffsetSizeList[0].PcdBinOffset != 0 :
EdkLogger.warn("BPDG", "The offset of VPD type pcd should start with 0, please check it.",
None)
# Judge whether the offset in fixed pcd offset list is overlapped or not.
lenOfList = len(self.PcdFixedOffsetSizeList)
- count = 0
+ count = 0
while (count < lenOfList - 1) :
PcdNow = self.PcdFixedOffsetSizeList[count]
PcdNext = self.PcdFixedOffsetSizeList[count+1]
- # Two pcd's offset is same
+ # Two pcd's offset is same
if PcdNow.PcdBinOffset == PcdNext.PcdBinOffset :
EdkLogger.error("BPDG", BuildToolError.ATTRIBUTE_GET_FAILURE,
"The offset of %s at line: %s is same with %s at line: %s in file %s" % \
(PcdNow.PcdCName, PcdNow.Lineno, PcdNext.PcdCName, PcdNext.Lineno, PcdNext.FileName),
None)
- # Overlapped
+ # Overlapped
if PcdNow.PcdBinOffset + PcdNow.PcdOccupySize > PcdNext.PcdBinOffset :
EdkLogger.error("BPDG", BuildToolError.ATTRIBUTE_GET_FAILURE,
"The offset of %s at line: %s is overlapped with %s at line: %s in file %s" % \
(PcdNow.PcdCName, PcdNow.Lineno, PcdNext.PcdCName, PcdNext.Lineno, PcdNext.FileName),
None)
- # Has free space, raise a warning message
+ # Has free space, raise a warning message
if PcdNow.PcdBinOffset + PcdNow.PcdOccupySize < PcdNext.PcdBinOffset :
EdkLogger.warn("BPDG", BuildToolError.ATTRIBUTE_GET_FAILURE,
"The offsets have free space of between %s at line: %s and %s at line: %s in file %s" % \
(PcdNow.PcdCName, PcdNow.Lineno, PcdNext.PcdCName, PcdNext.Lineno, PcdNext.FileName),
None)
count += 1
-
+
LastOffset = self.PcdFixedOffsetSizeList[0].PcdBinOffset
FixOffsetSizeListCount = 0
lenOfList = len(self.PcdFixedOffsetSizeList)
lenOfUnfixedList = len(self.PcdUnknownOffsetList)
-
+
##
- # Insert the un-fixed offset pcd's list into fixed offset pcd's list if has free space between those pcds.
- #
+ # Insert the un-fixed offset pcd's list into fixed offset pcd's list if has free space between those pcds.
+ #
while (FixOffsetSizeListCount < lenOfList) :
-
- eachFixedPcd = self.PcdFixedOffsetSizeList[FixOffsetSizeListCount]
+
+ eachFixedPcd = self.PcdFixedOffsetSizeList[FixOffsetSizeListCount]
NowOffset = eachFixedPcd.PcdBinOffset
-
- # Has free space
+
+ # Has free space
if LastOffset < NowOffset :
if lenOfUnfixedList != 0 :
countOfUnfixedList = 0
@@ -598,42 +598,42 @@ class GenVPD :
eachUnfixedPcd.PcdBinOffset = LastOffset
# Insert this pcd into fixed offset pcd list.
self.PcdFixedOffsetSizeList.insert(FixOffsetSizeListCount,eachUnfixedPcd)
-
+
# Delete the item's offset that has been fixed and added into fixed offset list
self.PcdUnknownOffsetList.pop(countOfUnfixedList)
-
+
# After item added, should enlarge the length of fixed pcd offset list
- lenOfList += 1
+ lenOfList += 1
FixOffsetSizeListCount += 1
-
+
# Decrease the un-fixed pcd offset list's length
lenOfUnfixedList -= 1
-
- # Modify the last offset value
- LastOffset += needFixPcdSize
+
+ # Modify the last offset value
+ LastOffset += needFixPcdSize
else :
# It can not insert into those two pcds, need to check still has other space can store it.
LastOffset = NowOffset + self.PcdFixedOffsetSizeList[FixOffsetSizeListCount].PcdOccupySize
FixOffsetSizeListCount += 1
break
-
+
# Set the FixOffsetSizeListCount = lenOfList for quit the loop
else :
- FixOffsetSizeListCount = lenOfList
-
- # No free space, smoothly connect with previous pcd.
+ FixOffsetSizeListCount = lenOfList
+
+ # No free space, smoothly connect with previous pcd.
elif LastOffset == NowOffset :
LastOffset = NowOffset + eachFixedPcd.PcdOccupySize
FixOffsetSizeListCount += 1
- # Usually it will not enter into this thunk, if so, means it overlapped.
+ # Usually it will not enter into this thunk, if so, means it overlapped.
else :
EdkLogger.error("BPDG", BuildToolError.ATTRIBUTE_NOT_AVAILABLE,
"The offset value definition has overlapped at pcd: %s, it's offset is: %s, in file: %s line: %s" % \
(eachFixedPcd.PcdCName, eachFixedPcd.PcdOffset, eachFixedPcd.InputFileName, eachFixedPcd.Lineno),
None)
FixOffsetSizeListCount += 1
-
- # Continue to process the un-fixed offset pcd's list, add this time, just append them behind the fixed pcd's offset list.
+
+ # Continue to process the un-fixed offset pcd's list, add this time, just append them behind the fixed pcd's offset list.
lenOfUnfixedList = len(self.PcdUnknownOffsetList)
lenOfList = len(self.PcdFixedOffsetSizeList)
while (lenOfUnfixedList > 0) :
@@ -641,23 +641,23 @@ class GenVPD :
# The last pcd instance
LastPcd = self.PcdFixedOffsetSizeList[lenOfList-1]
NeedFixPcd = self.PcdUnknownOffsetList[0]
-
+
NeedFixPcd.PcdBinOffset = LastPcd.PcdBinOffset + LastPcd.PcdOccupySize
if NeedFixPcd.PcdBinOffset % NeedFixPcd.Alignment != 0:
NeedFixPcd.PcdBinOffset = (NeedFixPcd.PcdBinOffset / NeedFixPcd.Alignment + 1) * NeedFixPcd.Alignment
NeedFixPcd.PcdOffset = str(hex(NeedFixPcd.PcdBinOffset))
-
+
# Insert this pcd into fixed offset pcd list's tail.
self.PcdFixedOffsetSizeList.insert(lenOfList, NeedFixPcd)
# Delete the item's offset that has been fixed and added into fixed offset list
self.PcdUnknownOffsetList.pop(0)
-
+
lenOfList += 1
- lenOfUnfixedList -= 1
+ lenOfUnfixedList -= 1
##
# Write the final data into output files.
- #
+ #
def GenerateVpdFile (self, MapFileName, BinFileName):
#Open an VPD file to process
@@ -705,4 +705,4 @@ class GenVPD :
fStringIO.close ()
fVpdFile.close ()
fMapFile.close ()
-
+
diff --git a/BaseTools/Source/Python/BPDG/StringTable.py b/BaseTools/Source/Python/BPDG/StringTable.py
index bbcb45119868..79acefaf0a94 100644
--- a/BaseTools/Source/Python/BPDG/StringTable.py
+++ b/BaseTools/Source/Python/BPDG/StringTable.py
@@ -31,7 +31,7 @@ MAP_FILE_COMMENT_TEMPLATE = \
# THIS IS AUTO-GENERATED FILE BY BPDG TOOLS AND PLEASE DO NOT MAKE MODIFICATION.
#
# This file lists all VPD informations for a platform fixed/adjusted by BPDG tool.
-#
+#
# Copyright (c) 2010 -2016, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -53,15 +53,15 @@ LBL_BPDG_USAGE = \
Copyright (c) 2010 - 2016, Intel Corporation All Rights Reserved.
Intel(r) Binary Product Data Generation Tool (Intel(r) BPDG)
-
+
Required Flags:
-o BIN_FILENAME, --vpd-filename=BIN_FILENAME
Specify the file name for the VPD binary file
-m FILENAME, --map-filename=FILENAME
- Generate file name for consumption during the build that contains
- the mapping of Pcd name, offset, datum size and value derived
+ Generate file name for consumption during the build that contains
+ the mapping of Pcd name, offset, datum size and value derived
from the input file and any automatic calculations.
-"""
+"""
)
MSG_OPTION_HELP = ("Show this help message and exit.")
diff --git a/BaseTools/Source/Python/Common/BuildVersion.py b/BaseTools/Source/Python/Common/BuildVersion.py
index 7414d30f49ea..6dda750dc687 100644
--- a/BaseTools/Source/Python/Common/BuildVersion.py
+++ b/BaseTools/Source/Python/Common/BuildVersion.py
@@ -4,9 +4,9 @@
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
#
-# This program and the accompanying materials are licensed and made available
-# under the terms and conditions of the BSD License which accompanies this
-# distribution. The full text of the license may be found at
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
diff --git a/BaseTools/Source/Python/Common/Database.py b/BaseTools/Source/Python/Common/Database.py
index a81a44731f03..ca1859a4b912 100644
--- a/BaseTools/Source/Python/Common/Database.py
+++ b/BaseTools/Source/Python/Common/Database.py
@@ -33,7 +33,7 @@ from Table.TableDsc import TableDsc
# This class defined the build databse
# During the phase of initialization, the database will create all tables and
# insert all records of table DataModel
-#
+#
# @param object: Inherited from object class
# @param DbPath: A string for the path of the ECC database
#
@@ -54,7 +54,7 @@ class Database(object):
self.TblInf = TableInf(self.Cur)
self.TblDec = TableDec(self.Cur)
self.TblDsc = TableDsc(self.Cur)
-
+
## Initialize build database
#
# 1. Delete all old existing tables
@@ -69,7 +69,7 @@ class Database(object):
# self.TblDataModel.Drop()
# self.TblDsc.Drop()
# self.TblFile.Drop()
-
+
#
# Create new tables
#
@@ -78,7 +78,7 @@ class Database(object):
self.TblInf.Create()
self.TblDec.Create()
self.TblDsc.Create()
-
+
#
# Initialize table DataModel
#
@@ -91,10 +91,10 @@ class Database(object):
#
def QueryTable(self, Table):
Table.Query()
-
+
## Close entire database
#
- # Commit all first
+ # Commit all first
# Close the connection and cursor
#
def Close(self):
@@ -110,11 +110,10 @@ class Database(object):
if __name__ == '__main__':
EdkLogger.Initialize()
EdkLogger.SetLevel(EdkLogger.DEBUG_0)
-
+
Db = Database(DATABASE_PATH)
Db.InitDatabase()
- Db.QueryTable(Db.TblDataModel)
+ Db.QueryTable(Db.TblDataModel)
Db.QueryTable(Db.TblFile)
Db.QueryTable(Db.TblDsc)
Db.Close()
-
\ No newline at end of file
diff --git a/BaseTools/Source/Python/Common/MigrationUtilities.py b/BaseTools/Source/Python/Common/MigrationUtilities.py
index e9f1cabcb794..27d30a11b529 100644
--- a/BaseTools/Source/Python/Common/MigrationUtilities.py
+++ b/BaseTools/Source/Python/Common/MigrationUtilities.py
@@ -36,10 +36,10 @@ def SetCommon(Common, XmlCommon):
XmlTag = "FeatureFlag"
Common.FeatureFlag = XmlAttribute(XmlCommon, XmlTag)
-
+
XmlTag = "SupArchList"
Common.SupArchList = XmlAttribute(XmlCommon, XmlTag).split()
-
+
XmlTag = XmlNodeName(XmlCommon) + "/" + "HelpText"
Common.HelpText = XmlElement(XmlCommon, XmlTag)
@@ -56,7 +56,7 @@ def SetCommon(Common, XmlCommon):
#
def SetIdentification(CommonHeader, XmlCommonHeader, NameTag, FileName):
XmlParentTag = XmlNodeName(XmlCommonHeader)
-
+
XmlTag = XmlParentTag + "/" + NameTag
CommonHeader.Name = XmlElement(XmlCommonHeader, XmlTag)
@@ -102,7 +102,7 @@ def AddToSpecificationDict(SpecificationDict, SpecificationString):
def SetCommonHeader(CommonHeader, XmlCommonHeader):
"""Set all attributes of CommonHeaderClass object from XmlCommonHeader"""
XmlParent = XmlNodeName(XmlCommonHeader)
-
+
XmlTag = XmlParent + "/" + "Abstract"
CommonHeader.Abstract = XmlElement(XmlCommonHeader, XmlTag)
@@ -144,16 +144,16 @@ def LoadClonedRecord(XmlCloned):
XmlTag = "Cloned/PackageGuid"
ClonedRecord.PackageGuid = XmlElement(XmlCloned, XmlTag)
-
+
XmlTag = "Cloned/PackageVersion"
ClonedRecord.PackageVersion = XmlElement(XmlCloned, XmlTag)
-
+
XmlTag = "Cloned/ModuleGuid"
ClonedRecord.ModuleGuid = XmlElement(XmlCloned, XmlTag)
-
+
XmlTag = "Cloned/ModuleVersion"
ClonedRecord.ModuleVersion = XmlElement(XmlCloned, XmlTag)
-
+
return ClonedRecord
@@ -169,7 +169,7 @@ def LoadClonedRecord(XmlCloned):
#
def LoadGuidProtocolPpiCommon(XmlGuidProtocolPpiCommon):
GuidProtocolPpiCommon = GuidProtocolPpiCommonClass()
-
+
XmlTag = "Name"
GuidProtocolPpiCommon.Name = XmlAttribute(XmlGuidProtocolPpiCommon, XmlTag)
@@ -180,19 +180,19 @@ def LoadGuidProtocolPpiCommon(XmlGuidProtocolPpiCommon):
XmlTag = "%s/GuidCName" % XmlParent
else:
XmlTag = "%s/%sCName" % (XmlParent, XmlParent)
-
+
GuidProtocolPpiCommon.CName = XmlElement(XmlGuidProtocolPpiCommon, XmlTag)
-
+
XmlTag = XmlParent + "/" + "GuidValue"
GuidProtocolPpiCommon.Guid = XmlElement(XmlGuidProtocolPpiCommon, XmlTag)
-
+
if XmlParent.endswith("Notify"):
GuidProtocolPpiCommon.Notify = True
XmlTag = "GuidTypeList"
GuidTypes = XmlAttribute(XmlGuidProtocolPpiCommon, XmlTag)
GuidProtocolPpiCommon.GuidTypeList = GuidTypes.split()
-
+
XmlTag = "SupModuleList"
SupModules = XmlAttribute(XmlGuidProtocolPpiCommon, XmlTag)
GuidProtocolPpiCommon.SupModuleList = SupModules.split()
@@ -264,24 +264,24 @@ def LoadLibraryClass(XmlLibraryClass):
if LibraryClass.LibraryClass == "":
XmlTag = "Name"
LibraryClass.LibraryClass = XmlAttribute(XmlLibraryClass, XmlTag)
-
+
XmlTag = "LibraryClass/IncludeHeader"
LibraryClass.IncludeHeader = XmlElement(XmlLibraryClass, XmlTag)
-
+
XmlTag = "RecommendedInstanceVersion"
RecommendedInstanceVersion = XmlAttribute(XmlLibraryClass, XmlTag)
LibraryClass.RecommendedInstanceVersion = RecommendedInstanceVersion
-
+
XmlTag = "RecommendedInstanceGuid"
RecommendedInstanceGuid = XmlAttribute(XmlLibraryClass, XmlTag)
LibraryClass.RecommendedInstanceGuid = RecommendedInstanceGuid
-
+
XmlTag = "SupModuleList"
SupModules = XmlAttribute(XmlLibraryClass, XmlTag)
LibraryClass.SupModuleList = SupModules.split()
-
+
SetCommon(LibraryClass, XmlLibraryClass)
-
+
return LibraryClass
@@ -297,24 +297,24 @@ def LoadLibraryClass(XmlLibraryClass):
def LoadBuildOption(XmlBuildOption):
"""Return a new BuildOptionClass object equivalent to XmlBuildOption"""
BuildOption = BuildOptionClass()
-
+
BuildOption.Option = XmlElementData(XmlBuildOption)
XmlTag = "BuildTargets"
BuildOption.BuildTargetList = XmlAttribute(XmlBuildOption, XmlTag).split()
-
+
XmlTag = "ToolChainFamily"
BuildOption.ToolChainFamily = XmlAttribute(XmlBuildOption, XmlTag)
-
+
XmlTag = "TagName"
BuildOption.TagName = XmlAttribute(XmlBuildOption, XmlTag)
-
+
XmlTag = "ToolCode"
BuildOption.ToolCode = XmlAttribute(XmlBuildOption, XmlTag)
-
+
XmlTag = "SupArchList"
BuildOption.SupArchList = XmlAttribute(XmlBuildOption, XmlTag).split()
-
+
return BuildOption
@@ -330,15 +330,15 @@ def LoadBuildOption(XmlBuildOption):
#
def LoadUserExtensions(XmlUserExtensions):
UserExtensions = UserExtensionsClass()
-
+
XmlTag = "UserID"
UserExtensions.UserID = XmlAttribute(XmlUserExtensions, XmlTag)
-
+
XmlTag = "Identifier"
UserExtensions.Identifier = XmlAttribute(XmlUserExtensions, XmlTag)
-
+
UserExtensions.Content = XmlElementData(XmlUserExtensions)
-
+
return UserExtensions
@@ -490,7 +490,7 @@ def GetTextFileInfo(FileName, TagTuple):
ValueTuple[Index] = Value
except:
EdkLogger.info("IO Error in reading file %s" % FileName)
-
+
return ValueTuple
@@ -524,7 +524,7 @@ def MigrationOptionParser(Source, Destinate, ToolName, VersionNumber=1.0):
UsageString = "%s [-a] [-v|-q] [-o <output_file>] <input_file>" % ToolName
Version = "%s Version %.2f" % (ToolName, VersionNumber)
Copyright = "Copyright (c) 2007, Intel Corporation. All rights reserved."
-
+
Parser = OptionParser(description=Copyright, version=Version, usage=UsageString)
Parser.add_option("-o", "--output", dest="OutputFile", help="The name of the %s file to be created." % Destinate)
Parser.add_option("-a", "--auto", dest="AutoWrite", action="store_true", default=False, help="Automatically create the %s file using the name of the %s file and replacing file extension" % (Source, Destinate))
@@ -540,7 +540,7 @@ def MigrationOptionParser(Source, Destinate, ToolName, VersionNumber=1.0):
EdkLogger.setLevel(EdkLogger.QUIET)
else:
EdkLogger.setLevel(EdkLogger.INFO)
-
+
# error check
if len(Args) == 0:
raise MigrationError(PARAMETER_MISSING, name="Input file", usage=Parser.get_usage())
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index f05ae39ebb29..f6ebaa60e23f 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -56,11 +56,11 @@ gFileTimeStampCache = {} # {file path : file time stamp}
gDependencyDatabase = {} # arch : {file path : [dependent files list]}
def GetVariableOffset(mapfilepath, efifilepath, varnames):
- """ Parse map file to get variable offset in current EFI file
+ """ Parse map file to get variable offset in current EFI file
@param mapfilepath Map file absolution path
@param efifilepath: EFI binary file full path
@param varnames iteratable container whose elements are variable names to be searched
-
+
@return List whos elements are tuple with variable name and raw offset
"""
lines = []
@@ -70,7 +70,7 @@ def GetVariableOffset(mapfilepath, efifilepath, varnames):
f.close()
except:
return None
-
+
if len(lines) == 0: return None
firstline = lines[0].strip()
if (firstline.startswith("Archive member included ") and
@@ -170,7 +170,7 @@ def _parseGeneral(lines, efifilepath, varnames):
continue
if line.startswith("entry point at"):
status = 3
- continue
+ continue
if status == 1 and len(line) != 0:
m = secReGeneral.match(line)
assert m is not None, "Fail to parse the section in map file , line is %s" % line
@@ -250,7 +250,7 @@ def ProcessDuplicatedInf(Path, BaseName, Workspace):
#
# A temporary INF is copied to database path which must have write permission
# The temporary will be removed at the end of build
- # In case of name conflict, the file name is
+ # In case of name conflict, the file name is
# FILE_GUIDBaseName (0D1B936F-68F3-4589-AFCC-FB8B7AEBC836module.inf)
#
TempFullPath = os.path.join(DbDir,
@@ -261,7 +261,7 @@ def ProcessDuplicatedInf(Path, BaseName, Workspace):
#
# To build same module more than once, the module path with FILE_GUID overridden has
# the file name FILE_GUIDmodule.inf, but the relative path (self.MetaFile.File) is the real path
- # in DSC which is used as relative path by C files and other files in INF.
+ # in DSC which is used as relative path by C files and other files in INF.
# A trick was used: all module paths are PathClass instances, after the initialization
# of PathClass, the PathClass.Path is overridden by the temporary INF path.
#
@@ -1538,29 +1538,29 @@ def AnalyzeDscPcd(Setting, PcdType, DataType=''):
# Used to avoid split issue while the value string contain "|" character
#
# @param[in] Setting: A String contain value/datum type/token number information;
-#
-# @retval ValueList: A List contain value, datum type and toke number.
+#
+# @retval ValueList: A List contain value, datum type and toke number.
#
def AnalyzePcdData(Setting):
ValueList = ['', '', '']
ValueRe = re.compile(r'^\s*L?\".*\|.*\"')
PtrValue = ValueRe.findall(Setting)
-
+
ValueUpdateFlag = False
-
+
if len(PtrValue) >= 1:
Setting = re.sub(ValueRe, '', Setting)
ValueUpdateFlag = True
TokenList = Setting.split(TAB_VALUE_SPLIT)
ValueList[0:len(TokenList)] = TokenList
-
+
if ValueUpdateFlag:
ValueList[0] = PtrValue[0]
-
- return ValueList
-
+
+ return ValueList
+
## check format of PCD value against its the datum type
#
# For PCD value setting
@@ -1764,7 +1764,7 @@ class PathClass(object):
OtherKey = Other.Path
else:
OtherKey = str(Other)
-
+
SelfKey = self.Path
if SelfKey == OtherKey:
return 0
@@ -1902,7 +1902,7 @@ class PeImageClass():
def _ByteListToStr(self, ByteList):
String = ''
for index in range(len(ByteList)):
- if ByteList[index] == 0:
+ if ByteList[index] == 0:
break
String += chr(ByteList[index])
return String
@@ -1939,11 +1939,11 @@ class DefaultStore():
if sid == minid:
return name
class SkuClass():
-
+
DEFAULT = 0
SINGLE = 1
MULTIPLE =2
-
+
def __init__(self,SkuIdentifier='', SkuIds=None):
if SkuIds is None:
SkuIds = {}
@@ -1955,7 +1955,7 @@ class SkuClass():
EdkLogger.error("build", PARAMETER_INVALID,
ExtraData = "SKU-ID [%s] value %s exceeds the max value of UINT64"
% (SkuName, SkuId))
-
+
self.AvailableSkuIds = sdict()
self.SkuIdSet = []
self.SkuIdNumberSet = []
@@ -1969,10 +1969,10 @@ class SkuClass():
self.SkuIdSet = SkuIds.keys()
self.SkuIdNumberSet = [num[0].strip() + 'U' for num in SkuIds.values()]
else:
- r = SkuIdentifier.split('|')
+ r = SkuIdentifier.split('|')
self.SkuIdSet=[(r[k].strip()).upper() for k in range(len(r))]
k = None
- try:
+ try:
self.SkuIdNumberSet = [SkuIds[k][0].strip() + 'U' for k in self.SkuIdSet]
except Exception:
EdkLogger.error("build", PARAMETER_INVALID,
@@ -2021,7 +2021,7 @@ class SkuClass():
skuorderset = []
for skuname in self.SkuIdSet:
skuorderset.append(self.GetSkuChain(skuname))
-
+
skuorder = []
for index in range(max([len(item) for item in skuorderset])):
for subset in skuorderset:
@@ -2033,8 +2033,8 @@ class SkuClass():
return skuorder
- def __SkuUsageType(self):
-
+ def __SkuUsageType(self):
+
if self.__SkuIdentifier.upper() == "ALL":
return SkuClass.MULTIPLE
@@ -2067,7 +2067,7 @@ class SkuClass():
return ArrayStr
def __GetAvailableSkuIds(self):
return self.AvailableSkuIds
-
+
def __GetSystemSkuID(self):
if self.__SkuUsageType() == SkuClass.SINGLE:
if len(self.SkuIdSet) == 1:
diff --git a/BaseTools/Source/Python/Common/MultipleWorkspace.py b/BaseTools/Source/Python/Common/MultipleWorkspace.py
index 2a76d49cc627..a80f22ade7da 100644
--- a/BaseTools/Source/Python/Common/MultipleWorkspace.py
+++ b/BaseTools/Source/Python/Common/MultipleWorkspace.py
@@ -20,16 +20,16 @@ from Common.DataType import TAB_WORKSPACE
## MultipleWorkspace
#
# This class manage multiple workspace behavior
-#
+#
# @param class:
#
# @var WORKSPACE: defined the current WORKSPACE
# @var PACKAGES_PATH: defined the other WORKSAPCE, if current WORKSPACE is invalid, search valid WORKSPACE from PACKAGES_PATH
-#
+#
class MultipleWorkspace(object):
WORKSPACE = ''
PACKAGES_PATH = None
-
+
## convertPackagePath()
#
# Convert path to match workspace.
@@ -59,7 +59,7 @@ class MultipleWorkspace(object):
cls.PACKAGES_PATH = [cls.convertPackagePath (Ws, os.path.normpath(Path.strip())) for Path in PackagesPath.split(os.pathsep)]
else:
cls.PACKAGES_PATH = []
-
+
## join()
#
# rewrite os.path.join function
@@ -79,7 +79,7 @@ class MultipleWorkspace(object):
return Path
Path = os.path.join(Ws, *p)
return Path
-
+
## relpath()
#
# rewrite os.path.relpath function
@@ -98,7 +98,7 @@ class MultipleWorkspace(object):
if Path.lower().startswith(Ws.lower()):
Path = os.path.relpath(Path, Ws)
return Path
-
+
## getWs()
#
# get valid workspace for the path
@@ -117,7 +117,7 @@ class MultipleWorkspace(object):
if os.path.exists(absPath):
return Pkg
return Ws
-
+
## handleWsMacro()
#
# handle the $(WORKSPACE) tag, if current workspace is invalid path relative the tool, replace it.
@@ -143,7 +143,7 @@ class MultipleWorkspace(object):
PathList[i] = str[0:MacroStartPos] + Path
PathStr = ' '.join(PathList)
return PathStr
-
+
## getPkgPath()
#
# get all package pathes.
@@ -153,4 +153,3 @@ class MultipleWorkspace(object):
@classmethod
def getPkgPath(cls):
return cls.PACKAGES_PATH
-
\ No newline at end of file
diff --git a/BaseTools/Source/Python/Common/RangeExpression.py b/BaseTools/Source/Python/Common/RangeExpression.py
index 4d07bd752330..35b35e4893bc 100644
--- a/BaseTools/Source/Python/Common/RangeExpression.py
+++ b/BaseTools/Source/Python/Common/RangeExpression.py
@@ -42,7 +42,7 @@ ERR_IN_OPERAND = 'Macro after IN operator can only be: $(FAMILY), $(ARCH), $(TOO
class RangeObject(object):
def __init__(self, start, end, empty = False):
-
+
if int(start) < int(end):
self.start = int(start)
self.end = int(end)
@@ -54,24 +54,24 @@ class RangeObject(object):
class RangeContainer(object):
def __init__(self):
self.rangelist = []
-
+
def push(self, RangeObject):
self.rangelist.append(RangeObject)
self.rangelist = sorted(self.rangelist, key = lambda rangeobj : rangeobj.start)
self.merge()
-
+
def pop(self):
for item in self.rangelist:
yield item
-
- def __clean__(self):
+
+ def __clean__(self):
newrangelist = []
for rangeobj in self.rangelist:
if rangeobj.empty == True:
continue
else:
newrangelist.append(rangeobj)
- self.rangelist = newrangelist
+ self.rangelist = newrangelist
def merge(self):
self.__clean__()
for i in range(0, len(self.rangelist) - 1):
@@ -79,23 +79,23 @@ class RangeContainer(object):
continue
else:
self.rangelist[i + 1].start = self.rangelist[i].start
- self.rangelist[i + 1].end = self.rangelist[i + 1].end > self.rangelist[i].end and self.rangelist[i + 1].end or self.rangelist[i].end
+ self.rangelist[i + 1].end = self.rangelist[i + 1].end > self.rangelist[i].end and self.rangelist[i + 1].end or self.rangelist[i].end
self.rangelist[i].empty = True
self.__clean__()
-
+
def dump(self):
print "----------------------"
rangelist = ""
for object in self.rangelist:
rangelist = rangelist + "[%d , %d]" % (object.start, object.end)
print rangelist
-
-
-class XOROperatorObject(object):
- def __init__(self):
+
+
+class XOROperatorObject(object):
+ def __init__(self):
pass
- def Calculate(self, Operand, DataType, SymbolTable):
+ def Calculate(self, Operand, DataType, SymbolTable):
if type(Operand) == type('') and not Operand.isalnum():
Expr = "XOR ..."
raise BadExpression(ERR_SNYTAX % Expr)
@@ -107,9 +107,9 @@ class XOROperatorObject(object):
return rangeId
class LEOperatorObject(object):
- def __init__(self):
+ def __init__(self):
pass
- def Calculate(self, Operand, DataType, SymbolTable):
+ def Calculate(self, Operand, DataType, SymbolTable):
if type(Operand) == type('') and not Operand.isalnum():
Expr = "LE ..."
raise BadExpression(ERR_SNYTAX % Expr)
@@ -119,22 +119,22 @@ class LEOperatorObject(object):
SymbolTable[rangeId1] = rangeContainer
return rangeId1
class LTOperatorObject(object):
- def __init__(self):
+ def __init__(self):
pass
def Calculate(self, Operand, DataType, SymbolTable):
if type(Operand) == type('') and not Operand.isalnum():
- Expr = "LT ..."
- raise BadExpression(ERR_SNYTAX % Expr)
+ Expr = "LT ..."
+ raise BadExpression(ERR_SNYTAX % Expr)
rangeId1 = str(uuid.uuid1())
rangeContainer = RangeContainer()
rangeContainer.push(RangeObject(0, int(Operand) - 1))
SymbolTable[rangeId1] = rangeContainer
- return rangeId1
+ return rangeId1
class GEOperatorObject(object):
- def __init__(self):
+ def __init__(self):
pass
- def Calculate(self, Operand, DataType, SymbolTable):
+ def Calculate(self, Operand, DataType, SymbolTable):
if type(Operand) == type('') and not Operand.isalnum():
Expr = "GE ..."
raise BadExpression(ERR_SNYTAX % Expr)
@@ -142,12 +142,12 @@ class GEOperatorObject(object):
rangeContainer = RangeContainer()
rangeContainer.push(RangeObject(int(Operand), MAX_VAL_TYPE[DataType]))
SymbolTable[rangeId1] = rangeContainer
- return rangeId1
-
+ return rangeId1
+
class GTOperatorObject(object):
- def __init__(self):
+ def __init__(self):
pass
- def Calculate(self, Operand, DataType, SymbolTable):
+ def Calculate(self, Operand, DataType, SymbolTable):
if type(Operand) == type('') and not Operand.isalnum():
Expr = "GT ..."
raise BadExpression(ERR_SNYTAX % Expr)
@@ -155,12 +155,12 @@ class GTOperatorObject(object):
rangeContainer = RangeContainer()
rangeContainer.push(RangeObject(int(Operand) + 1, MAX_VAL_TYPE[DataType]))
SymbolTable[rangeId1] = rangeContainer
- return rangeId1
-
+ return rangeId1
+
class EQOperatorObject(object):
- def __init__(self):
+ def __init__(self):
pass
- def Calculate(self, Operand, DataType, SymbolTable):
+ def Calculate(self, Operand, DataType, SymbolTable):
if type(Operand) == type('') and not Operand.isalnum():
Expr = "EQ ..."
raise BadExpression(ERR_SNYTAX % Expr)
@@ -168,8 +168,8 @@ class EQOperatorObject(object):
rangeContainer = RangeContainer()
rangeContainer.push(RangeObject(int(Operand) , int(Operand)))
SymbolTable[rangeId1] = rangeContainer
- return rangeId1
-
+ return rangeId1
+
def GetOperatorObject(Operator):
if Operator == '>':
return GTOperatorObject()
@@ -213,8 +213,8 @@ class RangeExpression(object):
NumberDict[HexNumber] = Number
for HexNum in NumberDict:
expr = expr.replace(HexNum, NumberDict[HexNum])
-
- rangedict = {}
+
+ rangedict = {}
for validrange in self.RangePattern.findall(expr):
start, end = validrange.split(" - ")
start = start.strip()
@@ -224,19 +224,19 @@ class RangeExpression(object):
rangeContainer.push(RangeObject(start, end))
self.operanddict[str(rangeid)] = rangeContainer
rangedict[validrange] = str(rangeid)
-
+
for validrange in rangedict:
expr = expr.replace(validrange, rangedict[validrange])
-
- self._Expr = expr
+
+ self._Expr = expr
return expr
-
-
+
+
def EvalRange(self, Operator, Oprand):
operatorobj = GetOperatorObject(Operator)
return operatorobj.Calculate(Oprand, self.PcdDataType, self.operanddict)
-
+
def Rangeintersection(self, Oprand1, Oprand2):
rangeContainer1 = self.operanddict[Oprand1]
rangeContainer2 = self.operanddict[Oprand2]
@@ -265,35 +265,35 @@ class RangeExpression(object):
elif end1 >= end2:
rangeid = str(uuid.uuid1())
rangeContainer.push(RangeObject(start2, end2))
-
+
self.operanddict[rangeid] = rangeContainer
# rangeContainer.dump()
return rangeid
-
+
def Rangecollections(self, Oprand1, Oprand2):
rangeContainer1 = self.operanddict[Oprand1]
rangeContainer2 = self.operanddict[Oprand2]
rangeContainer = RangeContainer()
-
+
for rangeobj in rangeContainer2.pop():
rangeContainer.push(rangeobj)
for rangeobj in rangeContainer1.pop():
rangeContainer.push(rangeobj)
-
+
rangeid = str(uuid.uuid1())
self.operanddict[rangeid] = rangeContainer
-
+
# rangeContainer.dump()
return rangeid
-
-
+
+
def NegtiveRange(self, Oprand1):
rangeContainer1 = self.operanddict[Oprand1]
-
-
+
+
rangeids = []
-
+
for rangeobj in rangeContainer1.pop():
rangeContainer = RangeContainer()
rangeid = str(uuid.uuid1())
@@ -320,13 +320,13 @@ class RangeExpression(object):
re = self.Rangeintersection(rangeids[0], rangeids[1])
for i in range(2, len(rangeids)):
re = self.Rangeintersection(re, rangeids[i])
-
+
rangeid2 = str(uuid.uuid1())
self.operanddict[rangeid2] = self.operanddict[re]
return rangeid2
-
+
def Eval(self, Operator, Oprand1, Oprand2 = None):
-
+
if Operator in ["!", "NOT", "not"]:
if not gGuidPattern.match(Oprand1.strip()):
raise BadExpression(ERR_STRING_EXPR % Operator)
@@ -337,7 +337,7 @@ class RangeExpression(object):
elif Operator == 'and' :
if not gGuidPatternEnd.match(Oprand1.strip()) or not gGuidPatternEnd.match(Oprand2.strip()):
raise BadExpression(ERR_STRING_EXPR % Operator)
- return self.Rangeintersection(Oprand1, Oprand2)
+ return self.Rangeintersection(Oprand1, Oprand2)
elif Operator == 'or':
if not gGuidPatternEnd.match(Oprand1.strip()) or not gGuidPatternEnd.match(Oprand2.strip()):
raise BadExpression(ERR_STRING_EXPR % Operator)
@@ -367,11 +367,11 @@ class RangeExpression(object):
self._Len = len(self._Expr)
self._Token = ''
self._WarnExcept = None
-
+
# Literal token without any conversion
self._LiteralToken = ''
-
+
# store the operand object
self.operanddict = {}
# The Pcd max value depends on PcdDataType
@@ -391,9 +391,9 @@ class RangeExpression(object):
self._Depth = Depth
self._Expr = self._Expr.strip()
-
+
self.preProcessRangeExpr(self._Expr)
-
+
# check if the expression does not need to evaluate
if RealValue and Depth == 0:
self._Token = self._Expr
@@ -405,12 +405,12 @@ class RangeExpression(object):
Val = self._OrExpr()
RealVal = Val
-
+
RangeIdList = RealVal.split("or")
RangeList = []
for rangeid in RangeIdList:
RangeList.append(self.operanddict[rangeid.strip()])
-
+
return RangeList
# Template function to parse binary operators which have same precedence
@@ -706,10 +706,10 @@ class RangeExpression(object):
return False
-
-
-
-
+
+
+
+
diff --git a/BaseTools/Source/Python/Common/String.py b/BaseTools/Source/Python/Common/String.py
index ee26d7f7b1b0..389a3ca51d27 100644
--- a/BaseTools/Source/Python/Common/String.py
+++ b/BaseTools/Source/Python/Common/String.py
@@ -839,7 +839,7 @@ def StringToArray(String):
return "{%s,0x00}" % ",".join([ C.strip() for C in String[1:-1].split(',')])
else:
return "{%s}" % ",".join([ C.strip() for C in String[1:-1].split(',')])
-
+
else:
if len(String.split()) % 2:
return '{%s,0}' % ','.join(String.split())
diff --git a/BaseTools/Source/Python/Common/ToolDefClassObject.py b/BaseTools/Source/Python/Common/ToolDefClassObject.py
index 49b24ef780c7..83359586b994 100644
--- a/BaseTools/Source/Python/Common/ToolDefClassObject.py
+++ b/BaseTools/Source/Python/Common/ToolDefClassObject.py
@@ -92,7 +92,7 @@ class ToolDefClassObject(object):
KeyList = [TAB_TOD_DEFINES_TARGET, TAB_TOD_DEFINES_TOOL_CHAIN_TAG, TAB_TOD_DEFINES_TARGET_ARCH, TAB_TOD_DEFINES_COMMAND_TYPE]
for Index in range(3, -1, -1):
- # make a copy of the keys to enumerate over to prevent issues when
+ # make a copy of the keys to enumerate over to prevent issues when
# adding/removing items from the original dict.
for Key in list(self.ToolsDefTxtDictionary.keys()):
List = Key.split('_')
diff --git a/BaseTools/Source/Python/Common/VariableAttributes.py b/BaseTools/Source/Python/Common/VariableAttributes.py
index a2e22ca0409c..24d6f066fa3b 100644
--- a/BaseTools/Source/Python/Common/VariableAttributes.py
+++ b/BaseTools/Source/Python/Common/VariableAttributes.py
@@ -1,5 +1,5 @@
# # @file
-#
+#
# This file is used to handle the variable attributes and property information
#
#
@@ -12,7 +12,7 @@
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
-
+
class VariableAttributes(object):
EFI_VARIABLE_NON_VOLATILE = 0x00000001
EFI_VARIABLE_BOOTSERVICE_ACCESS = 0x00000002
@@ -24,22 +24,22 @@ class VariableAttributes(object):
"RT":EFI_VARIABLE_RUNTIME_ACCESS,
"RO":VAR_CHECK_VARIABLE_PROPERTY_READ_ONLY
}
-
+
def __init__(self):
pass
-
+
@staticmethod
def GetVarAttributes(var_attr_str):
VarAttr = 0x00000000
VarProp = 0x00000000
-
+
attr_list = var_attr_str.split(",")
for attr in attr_list:
attr = attr.strip()
if attr == 'RO':
VarProp = VariableAttributes.VAR_CHECK_VARIABLE_PROPERTY_READ_ONLY
else:
- VarAttr = VarAttr | VariableAttributes.VarAttributesMap.get(attr, 0x00000000)
+ VarAttr = VarAttr | VariableAttributes.VarAttributesMap.get(attr, 0x00000000)
return VarAttr, VarProp
@staticmethod
def ValidateVarAttributes(var_attr_str):
diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py b/BaseTools/Source/Python/Common/VpdInfoFile.py
index 32895deb5d0c..c9fdbff20e0b 100644
--- a/BaseTools/Source/Python/Common/VpdInfoFile.py
+++ b/BaseTools/Source/Python/Common/VpdInfoFile.py
@@ -1,9 +1,9 @@
## @file
-#
+#
# This package manage the VPD PCD information file which will be generated
# by build tool's autogen.
# The VPD PCD information file will be input for third-party BPDG tool which
-# is pointed by *_*_*_VPD_TOOL_GUID in conf/tools_def.txt
+# is pointed by *_*_*_VPD_TOOL_GUID in conf/tools_def.txt
#
#
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
@@ -32,7 +32,7 @@ FILE_COMMENT_TEMPLATE = \
# THIS IS AUTO-GENERATED FILE BY BUILD TOOLS AND PLEASE DO NOT MAKE MODIFICATION.
#
# This file lists all VPD informations for a platform collected by build.exe.
-#
+#
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -69,17 +69,17 @@ FILE_COMMENT_TEMPLATE = \
#
class VpdInfoFile:
- _rVpdPcdLine = None
+ _rVpdPcdLine = None
## Constructor
def __init__(self):
## Dictionary for VPD in following format
#
- # Key : PcdClassObject instance.
+ # Key : PcdClassObject instance.
# @see BuildClassObject.PcdClassObject
# Value : offset in different SKU such as [sku1_offset, sku2_offset]
self._VpdArray = {}
self._VpdInfo = {}
-
+
## Add a VPD PCD collected from platform's autogen when building.
#
# @param vpds The list of VPD PCD collected for a platform.
@@ -90,40 +90,40 @@ class VpdInfoFile:
def Add(self, Vpd, skuname,Offset):
if (Vpd is None):
EdkLogger.error("VpdInfoFile", BuildToolError.ATTRIBUTE_UNKNOWN_ERROR, "Invalid VPD PCD entry.")
-
+
if not (Offset >= 0 or Offset == "*"):
EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID, "Invalid offset parameter: %s." % Offset)
-
+
if Vpd.DatumType == TAB_VOID:
if Vpd.MaxDatumSize <= 0:
- EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID,
+ EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID,
"Invalid max datum size for VPD PCD %s.%s" % (Vpd.TokenSpaceGuidCName, Vpd.TokenCName))
- elif Vpd.DatumType in TAB_PCD_NUMERIC_TYPES:
+ elif Vpd.DatumType in TAB_PCD_NUMERIC_TYPES:
if not Vpd.MaxDatumSize:
Vpd.MaxDatumSize = MAX_SIZE_TYPE[Vpd.DatumType]
else:
if Vpd.MaxDatumSize <= 0:
EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID,
"Invalid max datum size for VPD PCD %s.%s" % (Vpd.TokenSpaceGuidCName, Vpd.TokenCName))
-
+
if Vpd not in self._VpdArray:
#
- # If there is no Vpd instance in dict, that imply this offset for a given SKU is a new one
+ # If there is no Vpd instance in dict, that imply this offset for a given SKU is a new one
#
self._VpdArray[Vpd] = {}
self._VpdArray[Vpd].update({skuname:Offset})
-
-
+
+
## Generate VPD PCD information into a text file
- #
+ #
# If parameter FilePath is invalid, then assert.
- # If
+ # If
# @param FilePath The given file path which would hold VPD information
def Write(self, FilePath):
if not (FilePath is not None or len(FilePath) != 0):
- EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID,
- "Invalid parameter FilePath: %s." % FilePath)
+ EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID,
+ "Invalid parameter FilePath: %s." % FilePath)
Content = FILE_COMMENT_TEMPLATE
Pcds = self._VpdArray.keys()
@@ -155,15 +155,15 @@ class VpdInfoFile:
try:
fd = open(FilePath, "r")
except:
- EdkLogger.error("VpdInfoFile",
- BuildToolError.FILE_OPEN_FAILURE,
+ EdkLogger.error("VpdInfoFile",
+ BuildToolError.FILE_OPEN_FAILURE,
"Fail to open file %s for written." % FilePath)
Lines = fd.readlines()
for Line in Lines:
Line = Line.strip()
if len(Line) == 0 or Line.startswith("#"):
continue
-
+
#
# the line must follow output format defined in BPDG spec.
#
@@ -173,9 +173,9 @@ class VpdInfoFile:
TokenSpaceName, PcdTokenName = PcdName.split(".")
except:
EdkLogger.error("BPDG", BuildToolError.PARSER_ERROR, "Fail to parse VPD information file %s" % FilePath)
-
+
Found = False
-
+
if (TokenSpaceName, PcdTokenName) not in self._VpdInfo:
self._VpdInfo[(TokenSpaceName, PcdTokenName)] = []
self._VpdInfo[(TokenSpaceName, PcdTokenName)].append((SkuId,Offset, Value))
@@ -188,61 +188,61 @@ class VpdInfoFile:
if VpdObject.TokenSpaceGuidCName == TokenSpaceName and VpdObjectTokenCName == PcdTokenName.strip() and sku == SkuId:
if self._VpdArray[VpdObject][sku] == "*":
if Offset == "*":
- EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID, "The offset of %s has not been fixed up by third-party BPDG tool." % PcdName)
+ EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID, "The offset of %s has not been fixed up by third-party BPDG tool." % PcdName)
self._VpdArray[VpdObject][sku] = Offset
Found = True
if not Found:
EdkLogger.error("BPDG", BuildToolError.PARSER_ERROR, "Can not find PCD defined in VPD guid file.")
-
+
## Get count of VPD PCD collected from platform's autogen when building.
#
- # @return The integer count value
+ # @return The integer count value
def GetCount(self):
Count = 0
for OffsetList in self._VpdArray.values():
Count += len(OffsetList)
-
+
return Count
-
+
## Get an offset value for a given VPD PCD
#
- # Because BPDG only support one Sku, so only return offset for SKU default.
+ # Because BPDG only support one Sku, so only return offset for SKU default.
#
- # @param vpd A given VPD PCD
+ # @param vpd A given VPD PCD
def GetOffset(self, vpd):
if not self._VpdArray.has_key(vpd):
return None
-
+
if len(self._VpdArray[vpd]) == 0:
return None
-
+
return self._VpdArray[vpd]
def GetVpdInfo(self,(PcdTokenName,TokenSpaceName)):
return self._VpdInfo.get((TokenSpaceName, PcdTokenName))
-
+
## Call external BPDG tool to process VPD file
-#
+#
# @param ToolPath The string path name for BPDG tool
# @param VpdFileName The string path name for VPD information guid.txt
-#
+#
def CallExtenalBPDGTool(ToolPath, VpdFileName):
assert ToolPath is not None, "Invalid parameter ToolPath"
assert VpdFileName is not None and os.path.exists(VpdFileName), "Invalid parameter VpdFileName"
-
+
OutputDir = os.path.dirname(VpdFileName)
FileName = os.path.basename(VpdFileName)
BaseName, ext = os.path.splitext(FileName)
OutputMapFileName = os.path.join(OutputDir, "%s.map" % BaseName)
OutputBinFileName = os.path.join(OutputDir, "%s.bin" % BaseName)
-
+
try:
PopenObject = subprocess.Popen(' '.join([ToolPath,
- '-o', OutputBinFileName,
+ '-o', OutputBinFileName,
'-m', OutputMapFileName,
'-q',
'-f',
VpdFileName]),
- stdout=subprocess.PIPE,
+ stdout=subprocess.PIPE,
stderr= subprocess.PIPE,
shell=True)
except Exception, X:
@@ -251,11 +251,11 @@ def CallExtenalBPDGTool(ToolPath, VpdFileName):
print out
while PopenObject.returncode is None :
PopenObject.wait()
-
+
if PopenObject.returncode != 0:
if PopenObject.returncode != 0:
EdkLogger.debug(EdkLogger.DEBUG_1, "Fail to call BPDG tool", str(error))
EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE, "Fail to execute BPDG tool with exit code: %d, the error message is: \n %s" % \
(PopenObject.returncode, str(error)))
-
+
return PopenObject.returncode
diff --git a/BaseTools/Source/Python/CommonDataClass/FdfClass.py b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
index 96a630f4d2cc..563a7c9ddbd9 100644
--- a/BaseTools/Source/Python/CommonDataClass/FdfClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
@@ -83,7 +83,7 @@ class RegionClassObject:
## FFS data in FDF
#
-#
+#
class FfsClassObject:
## The constructor
#
@@ -98,7 +98,7 @@ class FfsClassObject:
## FILE statement data in FDF
#
-#
+#
class FileStatementClassObject (FfsClassObject) :
## The constructor
#
@@ -149,7 +149,7 @@ class AprioriSectionClassObject:
## section data in FDF
#
-#
+#
class SectionClassObject:
## The constructor
#
@@ -157,10 +157,10 @@ class SectionClassObject:
#
def __init__(self):
self.Alignment = None
-
+
## Depex expression section in FDF
#
-#
+#
class DepexSectionClassObject (SectionClassObject):
## The constructor
#
@@ -186,7 +186,7 @@ class CompressSectionClassObject (SectionClassObject) :
## Data section data in FDF
#
-#
+#
class DataSectionClassObject (SectionClassObject):
## The constructor
#
@@ -220,7 +220,7 @@ class EfiSectionClassObject (SectionClassObject):
## FV image section data in FDF
#
-#
+#
class FvImageSectionClassObject (SectionClassObject):
## The constructor
#
@@ -237,7 +237,7 @@ class FvImageSectionClassObject (SectionClassObject):
## GUIDed section data in FDF
#
-#
+#
class GuidSectionClassObject (SectionClassObject) :
## The constructor
#
@@ -270,7 +270,7 @@ class UiSectionClassObject (SectionClassObject):
## Version section data in FDF
#
-#
+#
class VerSectionClassObject (SectionClassObject):
## The constructor
#
@@ -305,7 +305,7 @@ class RuleClassObject :
## Complex rule data in FDF
#
-#
+#
class RuleComplexFileClassObject(RuleClassObject) :
## The constructor
#
@@ -343,7 +343,7 @@ class RuleFileExtensionClassObject(RuleClassObject):
## Capsule data in FDF
#
-#
+#
class CapsuleClassObject :
## The constructor
#
@@ -380,7 +380,7 @@ class VtfClassObject :
## VTF component data in FDF
#
-#
+#
class ComponentStatementClassObject :
## The constructor
#
@@ -396,7 +396,7 @@ class ComponentStatementClassObject :
self.CompSym = None
self.CompSize = None
self.FilePos = None
-
+
## OptionROM data in FDF
#
#
@@ -408,4 +408,4 @@ class OptionRomClassObject:
def __init__(self):
self.DriverName = None
self.FfsList = []
-
+
diff --git a/BaseTools/Source/Python/Ecc/CLexer.py b/BaseTools/Source/Python/Ecc/CLexer.py
index a496f4344030..c7956e8ddae6 100644
--- a/BaseTools/Source/Python/Ecc/CLexer.py
+++ b/BaseTools/Source/Python/Ecc/CLexer.py
@@ -2,7 +2,7 @@
from antlr3 import *
from antlr3.compat import set, frozenset
-
+
## @file
# The file defines the Lexer for C source files.
#
@@ -4341,7 +4341,7 @@ class CLexer(Lexer):
u"\12\uffff"
)
-
+
DFA25_transition = [
DFA.unpack(u"\1\2\1\uffff\12\1"),
DFA.unpack(u"\1\3\1\uffff\12\1\12\uffff\1\5\1\4\1\5\35\uffff\1\5"
@@ -4479,7 +4479,7 @@ class CLexer(Lexer):
u"\u0192\uffff"
)
-
+
DFA35_transition = [
DFA.unpack(u"\6\73\2\70\1\73\2\70\22\73\1\70\1\50\1\65\1\72\1\63"
u"\1\45\1\46\1\64\1\34\1\35\1\40\1\42\1\3\1\43\1\41\1\44\1\66\11"
@@ -4943,5 +4943,5 @@ class CLexer(Lexer):
# class definition for DFA #35
DFA35 = DFA
-
+
diff --git a/BaseTools/Source/Python/Ecc/CParser.py b/BaseTools/Source/Python/Ecc/CParser.py
index 94711a9a378a..e817af86f702 100644
--- a/BaseTools/Source/Python/Ecc/CParser.py
+++ b/BaseTools/Source/Python/Ecc/CParser.py
@@ -2,7 +2,7 @@
from antlr3 import *
from antlr3.compat import set, frozenset
-
+
## @file
# The file defines the parser for C source files.
#
@@ -56,23 +56,23 @@ OctalEscape=17
# token names
tokenNames = [
- "<invalid>", "<EOR>", "<DOWN>", "<UP>",
- "IDENTIFIER", "HEX_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", "CHARACTER_LITERAL",
- "STRING_LITERAL", "FLOATING_POINT_LITERAL", "LETTER", "EscapeSequence",
- "HexDigit", "IntegerTypeSuffix", "Exponent", "FloatTypeSuffix", "OctalEscape",
- "UnicodeEscape", "WS", "BS", "UnicodeVocabulary", "COMMENT", "LINE_COMMENT",
- "LINE_COMMAND", "';'", "'typedef'", "','", "'='", "'extern'", "'static'",
- "'auto'", "'register'", "'STATIC'", "'void'", "'char'", "'short'", "'int'",
- "'long'", "'float'", "'double'", "'signed'", "'unsigned'", "'{'", "'}'",
- "'struct'", "'union'", "':'", "'enum'", "'const'", "'volatile'", "'IN'",
- "'OUT'", "'OPTIONAL'", "'CONST'", "'UNALIGNED'", "'VOLATILE'", "'GLOBAL_REMOVE_IF_UNREFERENCED'",
- "'EFIAPI'", "'EFI_BOOTSERVICE'", "'EFI_RUNTIMESERVICE'", "'PACKED'",
- "'('", "')'", "'['", "']'", "'*'", "'...'", "'+'", "'-'", "'/'", "'%'",
- "'++'", "'--'", "'sizeof'", "'.'", "'->'", "'&'", "'~'", "'!'", "'*='",
- "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'&='", "'^='", "'|='",
- "'?'", "'||'", "'&&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='",
- "'>='", "'<<'", "'>>'", "'__asm__'", "'_asm'", "'__asm'", "'case'",
- "'default'", "'if'", "'else'", "'switch'", "'while'", "'do'", "'for'",
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>",
+ "IDENTIFIER", "HEX_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", "CHARACTER_LITERAL",
+ "STRING_LITERAL", "FLOATING_POINT_LITERAL", "LETTER", "EscapeSequence",
+ "HexDigit", "IntegerTypeSuffix", "Exponent", "FloatTypeSuffix", "OctalEscape",
+ "UnicodeEscape", "WS", "BS", "UnicodeVocabulary", "COMMENT", "LINE_COMMENT",
+ "LINE_COMMAND", "';'", "'typedef'", "','", "'='", "'extern'", "'static'",
+ "'auto'", "'register'", "'STATIC'", "'void'", "'char'", "'short'", "'int'",
+ "'long'", "'float'", "'double'", "'signed'", "'unsigned'", "'{'", "'}'",
+ "'struct'", "'union'", "':'", "'enum'", "'const'", "'volatile'", "'IN'",
+ "'OUT'", "'OPTIONAL'", "'CONST'", "'UNALIGNED'", "'VOLATILE'", "'GLOBAL_REMOVE_IF_UNREFERENCED'",
+ "'EFIAPI'", "'EFI_BOOTSERVICE'", "'EFI_RUNTIMESERVICE'", "'PACKED'",
+ "'('", "')'", "'['", "']'", "'*'", "'...'", "'+'", "'-'", "'/'", "'%'",
+ "'++'", "'--'", "'sizeof'", "'.'", "'->'", "'&'", "'~'", "'!'", "'*='",
+ "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'&='", "'^='", "'|='",
+ "'?'", "'||'", "'&&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='",
+ "'>='", "'<<'", "'>>'", "'__asm__'", "'_asm'", "'__asm'", "'case'",
+ "'default'", "'if'", "'else'", "'switch'", "'while'", "'do'", "'for'",
"'goto'", "'continue'", "'break'", "'return'"
]
@@ -103,7 +103,7 @@ class CParser(Parser):
def printTokenInfo(self, line, offset, tokenText):
print str(line)+ ',' + str(offset) + ':' + str(tokenText)
-
+
def StorePredicateExpression(self, StartLine, StartOffset, EndLine, EndOffset, Text):
PredExp = CodeFragment.PredicateExpression(Text, (StartLine, StartOffset), (EndLine, EndOffset))
FileProfile.PredicateExpressionList.append(PredExp)
@@ -119,7 +119,7 @@ class CParser(Parser):
def StoreTypedefDefinition(self, StartLine, StartOffset, EndLine, EndOffset, FromText, ToText):
Tdef = CodeFragment.TypedefDefinition(FromText, ToText, (StartLine, StartOffset), (EndLine, EndOffset))
FileProfile.TypedefDefinitionList.append(Tdef)
-
+
def StoreFunctionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText, LeftBraceLine, LeftBraceOffset, DeclLine, DeclOffset):
FuncDef = CodeFragment.FunctionDefinition(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset), (LeftBraceLine, LeftBraceOffset), (DeclLine, DeclOffset))
FileProfile.FunctionDefinitionList.append(FuncDef)
@@ -127,11 +127,11 @@ class CParser(Parser):
def StoreVariableDeclaration(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText):
VarDecl = CodeFragment.VariableDeclaration(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset))
FileProfile.VariableDeclarationList.append(VarDecl)
-
+
def StoreFunctionCalling(self, StartLine, StartOffset, EndLine, EndOffset, FuncName, ParamList):
FuncCall = CodeFragment.FunctionCalling(FuncName, ParamList, (StartLine, StartOffset), (EndLine, EndOffset))
FileProfile.FunctionCallingList.append(FuncCall)
-
+
@@ -143,7 +143,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 1):
- return
+ return
# C.g:103:2: ( ( external_declaration )* )
# C.g:103:4: ( external_declaration )*
@@ -162,7 +162,7 @@ class CParser(Parser):
self.external_declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -182,7 +182,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end translation_unit
@@ -195,7 +195,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 2):
- return
+ return
# C.g:119:2: ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? )
alt3 = 3
@@ -211,7 +211,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 1, self.input)
@@ -227,7 +227,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 2, self.input)
@@ -243,7 +243,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 3, self.input)
@@ -259,7 +259,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 4, self.input)
@@ -275,7 +275,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 5, self.input)
@@ -291,7 +291,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 6, self.input)
@@ -307,7 +307,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 7, self.input)
@@ -323,7 +323,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 8, self.input)
@@ -339,7 +339,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 9, self.input)
@@ -355,7 +355,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 10, self.input)
@@ -371,7 +371,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 11, self.input)
@@ -387,7 +387,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 12, self.input)
@@ -405,7 +405,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 13, self.input)
@@ -421,7 +421,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 14, self.input)
@@ -439,7 +439,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 16, self.input)
@@ -455,7 +455,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 17, self.input)
@@ -471,7 +471,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 18, self.input)
@@ -484,7 +484,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 0, self.input)
@@ -496,7 +496,7 @@ class CParser(Parser):
self.function_definition()
self.following.pop()
if self.failed:
- return
+ return
elif alt3 == 2:
@@ -505,7 +505,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
elif alt3 == 3:
@@ -514,7 +514,7 @@ class CParser(Parser):
self.macro_statement()
self.following.pop()
if self.failed:
- return
+ return
# C.g:121:20: ( ';' )?
alt2 = 2
LA2_0 = self.input.LA(1)
@@ -525,7 +525,7 @@ class CParser(Parser):
# C.g:121:21: ';'
self.match(self.input, 25, self.FOLLOW_25_in_external_declaration126)
if self.failed:
- return
+ return
@@ -541,7 +541,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end external_declaration
@@ -568,7 +568,7 @@ class CParser(Parser):
declarator1 = None
-
+
self.function_definition_stack[-1].ModifierText = ''
self.function_definition_stack[-1].DeclText = ''
self.function_definition_stack[-1].LBLine = 0
@@ -782,7 +782,7 @@ class CParser(Parser):
if self.backtracking == 0:
-
+
if d is not None:
self.function_definition_stack[-1].ModifierText = self.input.toString(d.start,d.stop)
else:
@@ -796,7 +796,7 @@ class CParser(Parser):
else:
self.function_definition_stack[-1].LBLine = b.start.line
self.function_definition_stack[-1].LBOffset = b.start.charPositionInLine
-
+
@@ -804,7 +804,7 @@ class CParser(Parser):
retval.stop = self.input.LT(-1)
if self.backtracking == 0:
-
+
self.StoreFunctionDefinition(retval.start.line, retval.start.charPositionInLine, retval.stop.line, retval.stop.charPositionInLine, self.function_definition_stack[-1].ModifierText, self.function_definition_stack[-1].DeclText, self.function_definition_stack[-1].LBLine, self.function_definition_stack[-1].LBOffset, self.function_definition_stack[-1].DeclLine, self.function_definition_stack[-1].DeclOffset)
@@ -844,7 +844,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 4):
- return
+ return
# C.g:167:2: (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' )
alt9 = 2
@@ -857,7 +857,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("166:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' );", 9, 0, self.input)
@@ -868,7 +868,7 @@ class CParser(Parser):
a = self.input.LT(1)
self.match(self.input, 26, self.FOLLOW_26_in_declaration203)
if self.failed:
- return
+ return
# C.g:167:17: (b= declaration_specifiers )?
alt7 = 2
LA7 = self.input.LA(1)
@@ -905,7 +905,7 @@ class CParser(Parser):
b = self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
@@ -913,18 +913,18 @@ class CParser(Parser):
c = self.init_declarator_list()
self.following.pop()
if self.failed:
- return
+ return
d = self.input.LT(1)
self.match(self.input, 25, self.FOLLOW_25_in_declaration220)
if self.failed:
- return
+ return
if self.backtracking == 0:
-
+
if b is not None:
self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, self.input.toString(b.start,b.stop), self.input.toString(c.start,c.stop))
else:
self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, '', self.input.toString(c.start,c.stop))
-
+
@@ -934,7 +934,7 @@ class CParser(Parser):
s = self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# C.g:175:30: (t= init_declarator_list )?
alt8 = 2
LA8_0 = self.input.LA(1)
@@ -947,16 +947,16 @@ class CParser(Parser):
t = self.init_declarator_list()
self.following.pop()
if self.failed:
- return
+ return
e = self.input.LT(1)
self.match(self.input, 25, self.FOLLOW_25_in_declaration243)
if self.failed:
- return
+ return
if self.backtracking == 0:
-
+
if t is not None:
self.StoreVariableDeclaration(s.start.line, s.start.charPositionInLine, t.start.line, t.start.charPositionInLine, self.input.toString(s.start,s.stop), self.input.toString(t.start,t.stop))
@@ -973,7 +973,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end declaration
@@ -1184,7 +1184,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 7):
- return
+ return
# C.g:194:2: ( declarator ( '=' initializer )? )
# C.g:194:4: declarator ( '=' initializer )?
@@ -1192,7 +1192,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
# C.g:194:15: ( '=' initializer )?
alt12 = 2
LA12_0 = self.input.LA(1)
@@ -1203,12 +1203,12 @@ class CParser(Parser):
# C.g:194:16: '=' initializer
self.match(self.input, 28, self.FOLLOW_28_in_init_declarator329)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_initializer_in_init_declarator331)
self.initializer()
self.following.pop()
if self.failed:
- return
+ return
@@ -1225,7 +1225,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end init_declarator
@@ -1238,7 +1238,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 8):
- return
+ return
# C.g:198:2: ( 'extern' | 'static' | 'auto' | 'register' | 'STATIC' )
# C.g:
@@ -1250,7 +1250,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -1272,7 +1272,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end storage_class_specifier
@@ -1290,7 +1290,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 9):
- return
+ return
# C.g:206:2: ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id )
alt13 = 12
@@ -1323,7 +1323,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("205:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id );", 13, 0, self.input)
@@ -1333,63 +1333,63 @@ class CParser(Parser):
# C.g:206:4: 'void'
self.match(self.input, 34, self.FOLLOW_34_in_type_specifier376)
if self.failed:
- return
+ return
elif alt13 == 2:
# C.g:207:4: 'char'
self.match(self.input, 35, self.FOLLOW_35_in_type_specifier381)
if self.failed:
- return
+ return
elif alt13 == 3:
# C.g:208:4: 'short'
self.match(self.input, 36, self.FOLLOW_36_in_type_specifier386)
if self.failed:
- return
+ return
elif alt13 == 4:
# C.g:209:4: 'int'
self.match(self.input, 37, self.FOLLOW_37_in_type_specifier391)
if self.failed:
- return
+ return
elif alt13 == 5:
# C.g:210:4: 'long'
self.match(self.input, 38, self.FOLLOW_38_in_type_specifier396)
if self.failed:
- return
+ return
elif alt13 == 6:
# C.g:211:4: 'float'
self.match(self.input, 39, self.FOLLOW_39_in_type_specifier401)
if self.failed:
- return
+ return
elif alt13 == 7:
# C.g:212:4: 'double'
self.match(self.input, 40, self.FOLLOW_40_in_type_specifier406)
if self.failed:
- return
+ return
elif alt13 == 8:
# C.g:213:4: 'signed'
self.match(self.input, 41, self.FOLLOW_41_in_type_specifier411)
if self.failed:
- return
+ return
elif alt13 == 9:
# C.g:214:4: 'unsigned'
self.match(self.input, 42, self.FOLLOW_42_in_type_specifier416)
if self.failed:
- return
+ return
elif alt13 == 10:
@@ -1398,9 +1398,9 @@ class CParser(Parser):
s = self.struct_or_union_specifier()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
-
+
if s.stop is not None:
self.StoreStructUnionDefinition(s.start.line, s.start.charPositionInLine, s.stop.line, s.stop.charPositionInLine, self.input.toString(s.start,s.stop))
@@ -1413,9 +1413,9 @@ class CParser(Parser):
e = self.enum_specifier()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
-
+
if e.stop is not None:
self.StoreEnumerationDefinition(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -1428,7 +1428,7 @@ class CParser(Parser):
self.type_id()
self.following.pop()
if self.failed:
- return
+ return
@@ -1441,7 +1441,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end type_specifier
@@ -1454,13 +1454,13 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 10):
- return
+ return
# C.g:229:5: ( IDENTIFIER )
# C.g:229:9: IDENTIFIER
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_type_id467)
if self.failed:
- return
+ return
@@ -1474,7 +1474,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end type_id
@@ -1611,7 +1611,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 12):
- return
+ return
# C.g:240:2: ( 'struct' | 'union' )
# C.g:
@@ -1623,7 +1623,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -1645,7 +1645,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end struct_or_union
@@ -1658,7 +1658,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 13):
- return
+ return
# C.g:245:2: ( ( struct_declaration )+ )
# C.g:245:4: ( struct_declaration )+
@@ -1678,7 +1678,7 @@ class CParser(Parser):
self.struct_declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -1687,7 +1687,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(16, self.input)
raise eee
@@ -1708,7 +1708,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end struct_declaration_list
@@ -1721,7 +1721,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 14):
- return
+ return
# C.g:249:2: ( specifier_qualifier_list struct_declarator_list ';' )
# C.g:249:4: specifier_qualifier_list struct_declarator_list ';'
@@ -1729,15 +1729,15 @@ class CParser(Parser):
self.specifier_qualifier_list()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_struct_declarator_list_in_struct_declaration551)
self.struct_declarator_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_struct_declaration553)
if self.failed:
- return
+ return
@@ -1751,7 +1751,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end struct_declaration
@@ -1764,7 +1764,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 15):
- return
+ return
# C.g:253:2: ( ( type_qualifier | type_specifier )+ )
# C.g:253:4: ( type_qualifier | type_specifier )+
@@ -1831,7 +1831,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
elif alt17 == 2:
@@ -1840,7 +1840,7 @@ class CParser(Parser):
self.type_specifier()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -1849,7 +1849,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(17, self.input)
raise eee
@@ -1870,7 +1870,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end specifier_qualifier_list
@@ -1883,7 +1883,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 16):
- return
+ return
# C.g:257:2: ( struct_declarator ( ',' struct_declarator )* )
# C.g:257:4: struct_declarator ( ',' struct_declarator )*
@@ -1891,7 +1891,7 @@ class CParser(Parser):
self.struct_declarator()
self.following.pop()
if self.failed:
- return
+ return
# C.g:257:22: ( ',' struct_declarator )*
while True: #loop18
alt18 = 2
@@ -1905,12 +1905,12 @@ class CParser(Parser):
# C.g:257:23: ',' struct_declarator
self.match(self.input, 27, self.FOLLOW_27_in_struct_declarator_list587)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list589)
self.struct_declarator()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -1930,7 +1930,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end struct_declarator_list
@@ -1943,7 +1943,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 17):
- return
+ return
# C.g:261:2: ( declarator ( ':' constant_expression )? | ':' constant_expression )
alt20 = 2
@@ -1956,7 +1956,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("260:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );", 20, 0, self.input)
@@ -1968,7 +1968,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
# C.g:261:15: ( ':' constant_expression )?
alt19 = 2
LA19_0 = self.input.LA(1)
@@ -1979,12 +1979,12 @@ class CParser(Parser):
# C.g:261:16: ':' constant_expression
self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator605)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_struct_declarator607)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -1994,12 +1994,12 @@ class CParser(Parser):
# C.g:262:4: ':' constant_expression
self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator614)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_struct_declarator616)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -2012,7 +2012,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end struct_declarator
@@ -2180,7 +2180,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 19):
- return
+ return
# C.g:273:2: ( enumerator ( ',' enumerator )* )
# C.g:273:4: enumerator ( ',' enumerator )*
@@ -2188,7 +2188,7 @@ class CParser(Parser):
self.enumerator()
self.following.pop()
if self.failed:
- return
+ return
# C.g:273:15: ( ',' enumerator )*
while True: #loop24
alt24 = 2
@@ -2207,12 +2207,12 @@ class CParser(Parser):
# C.g:273:16: ',' enumerator
self.match(self.input, 27, self.FOLLOW_27_in_enumerator_list680)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_enumerator_in_enumerator_list682)
self.enumerator()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -2232,7 +2232,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end enumerator_list
@@ -2245,13 +2245,13 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 20):
- return
+ return
# C.g:277:2: ( IDENTIFIER ( '=' constant_expression )? )
# C.g:277:4: IDENTIFIER ( '=' constant_expression )?
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enumerator695)
if self.failed:
- return
+ return
# C.g:277:15: ( '=' constant_expression )?
alt25 = 2
LA25_0 = self.input.LA(1)
@@ -2262,12 +2262,12 @@ class CParser(Parser):
# C.g:277:16: '=' constant_expression
self.match(self.input, 28, self.FOLLOW_28_in_enumerator698)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_enumerator700)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -2284,7 +2284,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end enumerator
@@ -2297,7 +2297,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 21):
- return
+ return
# C.g:281:2: ( 'const' | 'volatile' | 'IN' | 'OUT' | 'OPTIONAL' | 'CONST' | 'UNALIGNED' | 'VOLATILE' | 'GLOBAL_REMOVE_IF_UNREFERENCED' | 'EFIAPI' | 'EFI_BOOTSERVICE' | 'EFI_RUNTIMESERVICE' | 'PACKED' )
# C.g:
@@ -2309,7 +2309,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -2331,7 +2331,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end type_qualifier
@@ -2486,7 +2486,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 23):
- return
+ return
# C.g:303:2: ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ )
alt34 = 2
@@ -2499,7 +2499,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("302:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ );", 34, 0, self.input)
@@ -2509,7 +2509,7 @@ class CParser(Parser):
# C.g:303:4: IDENTIFIER ( declarator_suffix )*
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_direct_declarator819)
if self.failed:
- return
+ return
# C.g:303:15: ( declarator_suffix )*
while True: #loop31
alt31 = 2
@@ -2753,7 +2753,7 @@ class CParser(Parser):
self.declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -2766,7 +2766,7 @@ class CParser(Parser):
# C.g:304:4: '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+
self.match(self.input, 62, self.FOLLOW_62_in_direct_declarator827)
if self.failed:
- return
+ return
# C.g:304:8: ( 'EFIAPI' )?
alt32 = 2
LA32_0 = self.input.LA(1)
@@ -2780,7 +2780,7 @@ class CParser(Parser):
# C.g:304:9: 'EFIAPI'
self.match(self.input, 58, self.FOLLOW_58_in_direct_declarator830)
if self.failed:
- return
+ return
@@ -2788,10 +2788,10 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_direct_declarator836)
if self.failed:
- return
+ return
# C.g:304:35: ( declarator_suffix )+
cnt33 = 0
while True: #loop33
@@ -3036,7 +3036,7 @@ class CParser(Parser):
self.declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -3045,7 +3045,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(33, self.input)
raise eee
@@ -3065,7 +3065,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end direct_declarator
@@ -3078,7 +3078,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 24):
- return
+ return
# C.g:308:2: ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' )
alt35 = 5
@@ -3094,7 +3094,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 1, self.input)
@@ -3116,7 +3116,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 29, self.input)
@@ -3125,7 +3125,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 2, self.input)
@@ -3134,7 +3134,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 0, self.input)
@@ -3144,65 +3144,65 @@ class CParser(Parser):
# C.g:308:6: '[' constant_expression ']'
self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix852)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_declarator_suffix854)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix856)
if self.failed:
- return
+ return
elif alt35 == 2:
# C.g:309:9: '[' ']'
self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix866)
if self.failed:
- return
+ return
self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix868)
if self.failed:
- return
+ return
elif alt35 == 3:
# C.g:310:9: '(' parameter_type_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix878)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_parameter_type_list_in_declarator_suffix880)
self.parameter_type_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix882)
if self.failed:
- return
+ return
elif alt35 == 4:
# C.g:311:9: '(' identifier_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix892)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_identifier_list_in_declarator_suffix894)
self.identifier_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix896)
if self.failed:
- return
+ return
elif alt35 == 5:
# C.g:312:9: '(' ')'
self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix906)
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix908)
if self.failed:
- return
+ return
@@ -3215,7 +3215,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end declarator_suffix
@@ -3228,7 +3228,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 25):
- return
+ return
# C.g:316:2: ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' )
alt38 = 3
@@ -3246,7 +3246,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 2, self.input)
@@ -3262,7 +3262,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 3, self.input)
@@ -3278,7 +3278,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 4, self.input)
@@ -3294,7 +3294,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 5, self.input)
@@ -3312,7 +3312,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 21, self.input)
@@ -3328,7 +3328,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 29, self.input)
@@ -3337,7 +3337,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 1, self.input)
@@ -3346,7 +3346,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 0, self.input)
@@ -3356,7 +3356,7 @@ class CParser(Parser):
# C.g:316:4: '*' ( type_qualifier )+ ( pointer )?
self.match(self.input, 66, self.FOLLOW_66_in_pointer919)
if self.failed:
- return
+ return
# C.g:316:8: ( type_qualifier )+
cnt36 = 0
while True: #loop36
@@ -3404,7 +3404,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -3413,7 +3413,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(36, self.input)
raise eee
@@ -3436,7 +3436,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
@@ -3446,19 +3446,19 @@ class CParser(Parser):
# C.g:317:4: '*' pointer
self.match(self.input, 66, self.FOLLOW_66_in_pointer930)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_pointer_in_pointer932)
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
elif alt38 == 3:
# C.g:318:4: '*'
self.match(self.input, 66, self.FOLLOW_66_in_pointer937)
if self.failed:
- return
+ return
@@ -3471,7 +3471,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end pointer
@@ -3484,7 +3484,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 26):
- return
+ return
# C.g:322:2: ( parameter_list ( ',' ( 'OPTIONAL' )? '...' )? )
# C.g:322:4: parameter_list ( ',' ( 'OPTIONAL' )? '...' )?
@@ -3492,7 +3492,7 @@ class CParser(Parser):
self.parameter_list()
self.following.pop()
if self.failed:
- return
+ return
# C.g:322:19: ( ',' ( 'OPTIONAL' )? '...' )?
alt40 = 2
LA40_0 = self.input.LA(1)
@@ -3503,7 +3503,7 @@ class CParser(Parser):
# C.g:322:20: ',' ( 'OPTIONAL' )? '...'
self.match(self.input, 27, self.FOLLOW_27_in_parameter_type_list951)
if self.failed:
- return
+ return
# C.g:322:24: ( 'OPTIONAL' )?
alt39 = 2
LA39_0 = self.input.LA(1)
@@ -3514,13 +3514,13 @@ class CParser(Parser):
# C.g:322:25: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_parameter_type_list954)
if self.failed:
- return
+ return
self.match(self.input, 67, self.FOLLOW_67_in_parameter_type_list958)
if self.failed:
- return
+ return
@@ -3537,7 +3537,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end parameter_type_list
@@ -3550,7 +3550,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 27):
- return
+ return
# C.g:326:2: ( parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )* )
# C.g:326:4: parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )*
@@ -3558,7 +3558,7 @@ class CParser(Parser):
self.parameter_declaration()
self.following.pop()
if self.failed:
- return
+ return
# C.g:326:26: ( ',' ( 'OPTIONAL' )? parameter_declaration )*
while True: #loop42
alt42 = 2
@@ -3584,7 +3584,7 @@ class CParser(Parser):
# C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration
self.match(self.input, 27, self.FOLLOW_27_in_parameter_list974)
if self.failed:
- return
+ return
# C.g:326:31: ( 'OPTIONAL' )?
alt41 = 2
LA41_0 = self.input.LA(1)
@@ -3598,7 +3598,7 @@ class CParser(Parser):
# C.g:326:32: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_parameter_list977)
if self.failed:
- return
+ return
@@ -3606,7 +3606,7 @@ class CParser(Parser):
self.parameter_declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -3626,7 +3626,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end parameter_list
@@ -3639,7 +3639,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 28):
- return
+ return
# C.g:330:2: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER )
alt46 = 2
@@ -3656,7 +3656,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 13, self.input)
@@ -3667,7 +3667,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 0, self.input)
@@ -3679,7 +3679,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# C.g:330:27: ( declarator | abstract_declarator )*
while True: #loop43
alt43 = 3
@@ -3763,7 +3763,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
elif alt43 == 2:
@@ -3772,7 +3772,7 @@ class CParser(Parser):
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -3789,7 +3789,7 @@ class CParser(Parser):
# C.g:330:62: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_parameter_declaration1004)
if self.failed:
- return
+ return
@@ -3812,7 +3812,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -3821,7 +3821,7 @@ class CParser(Parser):
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_parameter_declaration1016)
if self.failed:
- return
+ return
@@ -3834,7 +3834,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end parameter_declaration
@@ -3847,13 +3847,13 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 29):
- return
+ return
# C.g:336:2: ( IDENTIFIER ( ',' IDENTIFIER )* )
# C.g:336:4: IDENTIFIER ( ',' IDENTIFIER )*
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1027)
if self.failed:
- return
+ return
# C.g:337:2: ( ',' IDENTIFIER )*
while True: #loop47
alt47 = 2
@@ -3867,10 +3867,10 @@ class CParser(Parser):
# C.g:337:3: ',' IDENTIFIER
self.match(self.input, 27, self.FOLLOW_27_in_identifier_list1031)
if self.failed:
- return
+ return
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1033)
if self.failed:
- return
+ return
else:
@@ -3890,7 +3890,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end identifier_list
@@ -3903,7 +3903,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 30):
- return
+ return
# C.g:341:2: ( specifier_qualifier_list ( abstract_declarator )? | type_id )
alt49 = 2
@@ -3921,7 +3921,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 13, self.input)
@@ -3930,7 +3930,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 0, self.input)
@@ -3942,7 +3942,7 @@ class CParser(Parser):
self.specifier_qualifier_list()
self.following.pop()
if self.failed:
- return
+ return
# C.g:341:29: ( abstract_declarator )?
alt48 = 2
LA48_0 = self.input.LA(1)
@@ -3955,7 +3955,7 @@ class CParser(Parser):
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
@@ -3967,7 +3967,7 @@ class CParser(Parser):
self.type_id()
self.following.pop()
if self.failed:
- return
+ return
@@ -3980,7 +3980,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end type_name
@@ -3993,7 +3993,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 31):
- return
+ return
# C.g:346:2: ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator )
alt51 = 2
@@ -4006,7 +4006,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("345:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );", 51, 0, self.input)
@@ -4018,7 +4018,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
# C.g:346:12: ( direct_abstract_declarator )?
alt50 = 2
LA50_0 = self.input.LA(1)
@@ -4203,7 +4203,7 @@ class CParser(Parser):
self.direct_abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
@@ -4215,7 +4215,7 @@ class CParser(Parser):
self.direct_abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
@@ -4228,7 +4228,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end abstract_declarator
@@ -4241,7 +4241,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 32):
- return
+ return
# C.g:351:2: ( ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* )
# C.g:351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )*
@@ -4263,7 +4263,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 18, self.input)
@@ -4274,7 +4274,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 1, self.input)
@@ -4285,7 +4285,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 0, self.input)
@@ -4295,15 +4295,15 @@ class CParser(Parser):
# C.g:351:6: '(' abstract_declarator ')'
self.match(self.input, 62, self.FOLLOW_62_in_direct_abstract_declarator1086)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_abstract_declarator_in_direct_abstract_declarator1088)
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_direct_abstract_declarator1090)
if self.failed:
- return
+ return
elif alt52 == 2:
@@ -4312,7 +4312,7 @@ class CParser(Parser):
self.abstract_declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
@@ -4559,7 +4559,7 @@ class CParser(Parser):
self.abstract_declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -4579,7 +4579,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end direct_abstract_declarator
@@ -4592,7 +4592,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 33):
- return
+ return
# C.g:355:2: ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' )
alt54 = 4
@@ -4608,7 +4608,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 1, self.input)
@@ -4624,7 +4624,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 2, self.input)
@@ -4633,7 +4633,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 0, self.input)
@@ -4643,50 +4643,50 @@ class CParser(Parser):
# C.g:355:4: '[' ']'
self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1110)
if self.failed:
- return
+ return
self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1112)
if self.failed:
- return
+ return
elif alt54 == 2:
# C.g:356:4: '[' constant_expression ']'
self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1117)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_abstract_declarator_suffix1119)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1121)
if self.failed:
- return
+ return
elif alt54 == 3:
# C.g:357:4: '(' ')'
self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1126)
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1128)
if self.failed:
- return
+ return
elif alt54 == 4:
# C.g:358:4: '(' parameter_type_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1133)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_parameter_type_list_in_abstract_declarator_suffix1135)
self.parameter_type_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1137)
if self.failed:
- return
+ return
@@ -4699,7 +4699,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end abstract_declarator_suffix
@@ -4712,7 +4712,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 34):
- return
+ return
# C.g:363:2: ( assignment_expression | '{' initializer_list ( ',' )? '}' )
alt56 = 2
@@ -4725,7 +4725,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("361:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );", 56, 0, self.input)
@@ -4737,19 +4737,19 @@ class CParser(Parser):
self.assignment_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt56 == 2:
# C.g:364:4: '{' initializer_list ( ',' )? '}'
self.match(self.input, 43, self.FOLLOW_43_in_initializer1155)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_initializer_list_in_initializer1157)
self.initializer_list()
self.following.pop()
if self.failed:
- return
+ return
# C.g:364:25: ( ',' )?
alt55 = 2
LA55_0 = self.input.LA(1)
@@ -4760,13 +4760,13 @@ class CParser(Parser):
# C.g:0:0: ','
self.match(self.input, 27, self.FOLLOW_27_in_initializer1159)
if self.failed:
- return
+ return
self.match(self.input, 44, self.FOLLOW_44_in_initializer1162)
if self.failed:
- return
+ return
@@ -4779,7 +4779,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end initializer
@@ -4792,7 +4792,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 35):
- return
+ return
# C.g:368:2: ( initializer ( ',' initializer )* )
# C.g:368:4: initializer ( ',' initializer )*
@@ -4800,7 +4800,7 @@ class CParser(Parser):
self.initializer()
self.following.pop()
if self.failed:
- return
+ return
# C.g:368:16: ( ',' initializer )*
while True: #loop57
alt57 = 2
@@ -4819,12 +4819,12 @@ class CParser(Parser):
# C.g:368:17: ',' initializer
self.match(self.input, 27, self.FOLLOW_27_in_initializer_list1176)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_initializer_in_initializer_list1178)
self.initializer()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -4844,7 +4844,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end initializer_list
@@ -4955,7 +4955,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 37):
- return
+ return
# C.g:378:2: ( ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* )
# C.g:378:4: ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )*
@@ -4965,7 +4965,7 @@ class CParser(Parser):
self.multiplicative_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -4984,24 +4984,24 @@ class CParser(Parser):
# C.g:378:33: '+' multiplicative_expression
self.match(self.input, 68, self.FOLLOW_68_in_additive_expression1229)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1231)
self.multiplicative_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt61 == 2:
# C.g:378:65: '-' multiplicative_expression
self.match(self.input, 69, self.FOLLOW_69_in_additive_expression1235)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1237)
self.multiplicative_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -5021,7 +5021,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end additive_expression
@@ -5034,7 +5034,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 38):
- return
+ return
# C.g:382:2: ( ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* )
# C.g:382:4: ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )*
@@ -5044,7 +5044,7 @@ class CParser(Parser):
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -5063,36 +5063,36 @@ class CParser(Parser):
# C.g:382:23: '*' cast_expression
self.match(self.input, 66, self.FOLLOW_66_in_multiplicative_expression1255)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1257)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt62 == 2:
# C.g:382:45: '/' cast_expression
self.match(self.input, 70, self.FOLLOW_70_in_multiplicative_expression1261)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1263)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt62 == 3:
# C.g:382:67: '%' cast_expression
self.match(self.input, 71, self.FOLLOW_71_in_multiplicative_expression1267)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1269)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -5112,7 +5112,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end multiplicative_expression
@@ -5125,7 +5125,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 39):
- return
+ return
# C.g:386:2: ( '(' type_name ')' cast_expression | unary_expression )
alt63 = 2
@@ -5145,7 +5145,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 25, self.input)
@@ -5156,7 +5156,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 1, self.input)
@@ -5167,7 +5167,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 0, self.input)
@@ -5177,20 +5177,20 @@ class CParser(Parser):
# C.g:386:4: '(' type_name ')' cast_expression
self.match(self.input, 62, self.FOLLOW_62_in_cast_expression1282)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_type_name_in_cast_expression1284)
self.type_name()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_cast_expression1286)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_cast_expression1288)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt63 == 2:
@@ -5199,7 +5199,7 @@ class CParser(Parser):
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -5212,7 +5212,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end cast_expression
@@ -5225,7 +5225,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 40):
- return
+ return
# C.g:391:2: ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' )
alt64 = 6
@@ -5251,7 +5251,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 13, self.input)
@@ -5262,7 +5262,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 12, self.input)
@@ -5271,7 +5271,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 0, self.input)
@@ -5283,31 +5283,31 @@ class CParser(Parser):
self.postfix_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt64 == 2:
# C.g:392:4: '++' unary_expression
self.match(self.input, 72, self.FOLLOW_72_in_unary_expression1309)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_unary_expression_in_unary_expression1311)
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt64 == 3:
# C.g:393:4: '--' unary_expression
self.match(self.input, 73, self.FOLLOW_73_in_unary_expression1316)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_unary_expression_in_unary_expression1318)
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt64 == 4:
@@ -5316,42 +5316,42 @@ class CParser(Parser):
self.unary_operator()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_unary_expression1325)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt64 == 5:
# C.g:395:4: 'sizeof' unary_expression
self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1330)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_unary_expression_in_unary_expression1332)
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt64 == 6:
# C.g:396:4: 'sizeof' '(' type_name ')'
self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1337)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_unary_expression1339)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_type_name_in_unary_expression1341)
self.type_name()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_unary_expression1343)
if self.failed:
- return
+ return
@@ -5364,7 +5364,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end unary_expression
@@ -5384,13 +5384,13 @@ class CParser(Parser):
c = None
-
+
self.postfix_expression_stack[-1].FuncCallText = ''
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 41):
- return
+ return
# C.g:406:2: (p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )* )
# C.g:406:6: p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )*
@@ -5398,7 +5398,7 @@ class CParser(Parser):
p = self.primary_expression()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
self.postfix_expression_stack[-1].FuncCallText += self.input.toString(p.start,p.stop)
@@ -5460,26 +5460,26 @@ class CParser(Parser):
# C.g:407:13: '[' expression ']'
self.match(self.input, 64, self.FOLLOW_64_in_postfix_expression1383)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_postfix_expression1385)
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 65, self.FOLLOW_65_in_postfix_expression1387)
if self.failed:
- return
+ return
elif alt65 == 2:
# C.g:408:13: '(' a= ')'
self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1401)
if self.failed:
- return
+ return
a = self.input.LT(1)
self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1405)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StoreFunctionCalling(p.start.line, p.start.charPositionInLine, a.line, a.charPositionInLine, self.postfix_expression_stack[-1].FuncCallText, '')
@@ -5489,16 +5489,16 @@ class CParser(Parser):
# C.g:409:13: '(' c= argument_expression_list b= ')'
self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1420)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_argument_expression_list_in_postfix_expression1424)
c = self.argument_expression_list()
self.following.pop()
if self.failed:
- return
+ return
b = self.input.LT(1)
self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1428)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StoreFunctionCalling(p.start.line, p.start.charPositionInLine, b.line, b.charPositionInLine, self.postfix_expression_stack[-1].FuncCallText, self.input.toString(c.start,c.stop))
@@ -5508,26 +5508,26 @@ class CParser(Parser):
# C.g:410:13: '(' macro_parameter_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1444)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_macro_parameter_list_in_postfix_expression1446)
self.macro_parameter_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1448)
if self.failed:
- return
+ return
elif alt65 == 5:
# C.g:411:13: '.' x= IDENTIFIER
self.match(self.input, 75, self.FOLLOW_75_in_postfix_expression1462)
if self.failed:
- return
+ return
x = self.input.LT(1)
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1466)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.postfix_expression_stack[-1].FuncCallText += '.' + x.text
@@ -5537,11 +5537,11 @@ class CParser(Parser):
# C.g:412:13: '*' y= IDENTIFIER
self.match(self.input, 66, self.FOLLOW_66_in_postfix_expression1482)
if self.failed:
- return
+ return
y = self.input.LT(1)
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1486)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.postfix_expression_stack[-1].FuncCallText = y.text
@@ -5551,11 +5551,11 @@ class CParser(Parser):
# C.g:413:13: '->' z= IDENTIFIER
self.match(self.input, 76, self.FOLLOW_76_in_postfix_expression1502)
if self.failed:
- return
+ return
z = self.input.LT(1)
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1506)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.postfix_expression_stack[-1].FuncCallText += '->' + z.text
@@ -5565,14 +5565,14 @@ class CParser(Parser):
# C.g:414:13: '++'
self.match(self.input, 72, self.FOLLOW_72_in_postfix_expression1522)
if self.failed:
- return
+ return
elif alt65 == 9:
# C.g:415:13: '--'
self.match(self.input, 73, self.FOLLOW_73_in_postfix_expression1536)
if self.failed:
- return
+ return
else:
@@ -5593,7 +5593,7 @@ class CParser(Parser):
self.postfix_expression_stack.pop()
pass
- return
+ return
# $ANTLR end postfix_expression
@@ -5606,7 +5606,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 42):
- return
+ return
# C.g:420:2: ( parameter_declaration ( ',' parameter_declaration )* )
# C.g:420:4: parameter_declaration ( ',' parameter_declaration )*
@@ -5614,7 +5614,7 @@ class CParser(Parser):
self.parameter_declaration()
self.following.pop()
if self.failed:
- return
+ return
# C.g:420:26: ( ',' parameter_declaration )*
while True: #loop66
alt66 = 2
@@ -5628,12 +5628,12 @@ class CParser(Parser):
# C.g:420:27: ',' parameter_declaration
self.match(self.input, 27, self.FOLLOW_27_in_macro_parameter_list1562)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_parameter_declaration_in_macro_parameter_list1564)
self.parameter_declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -5653,7 +5653,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end macro_parameter_list
@@ -5666,7 +5666,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 43):
- return
+ return
# C.g:424:2: ( '&' | '*' | '+' | '-' | '~' | '!' )
# C.g:
@@ -5678,7 +5678,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -5700,7 +5700,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end unary_operator
@@ -5811,7 +5811,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 45):
- return
+ return
# C.g:439:5: ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL )
alt72 = 6
@@ -5831,7 +5831,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("438:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL );", 72, 0, self.input)
@@ -5841,28 +5841,28 @@ class CParser(Parser):
# C.g:439:9: HEX_LITERAL
self.match(self.input, HEX_LITERAL, self.FOLLOW_HEX_LITERAL_in_constant1643)
if self.failed:
- return
+ return
elif alt72 == 2:
# C.g:440:9: OCTAL_LITERAL
self.match(self.input, OCTAL_LITERAL, self.FOLLOW_OCTAL_LITERAL_in_constant1653)
if self.failed:
- return
+ return
elif alt72 == 3:
# C.g:441:9: DECIMAL_LITERAL
self.match(self.input, DECIMAL_LITERAL, self.FOLLOW_DECIMAL_LITERAL_in_constant1663)
if self.failed:
- return
+ return
elif alt72 == 4:
# C.g:442:7: CHARACTER_LITERAL
self.match(self.input, CHARACTER_LITERAL, self.FOLLOW_CHARACTER_LITERAL_in_constant1671)
if self.failed:
- return
+ return
elif alt72 == 5:
@@ -5906,7 +5906,7 @@ class CParser(Parser):
# C.g:0:0: IDENTIFIER
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1680)
if self.failed:
- return
+ return
else:
@@ -5932,7 +5932,7 @@ class CParser(Parser):
# C.g:0:0: STRING_LITERAL
self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_constant1683)
if self.failed:
- return
+ return
else:
@@ -5941,7 +5941,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(69, self.input)
raise eee
@@ -5957,7 +5957,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(70, self.input)
raise eee
@@ -5978,7 +5978,7 @@ class CParser(Parser):
# C.g:0:0: IDENTIFIER
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1688)
if self.failed:
- return
+ return
else:
@@ -5991,7 +5991,7 @@ class CParser(Parser):
# C.g:444:9: FLOATING_POINT_LITERAL
self.match(self.input, FLOATING_POINT_LITERAL, self.FOLLOW_FLOATING_POINT_LITERAL_in_constant1699)
if self.failed:
- return
+ return
@@ -6004,7 +6004,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end constant
@@ -6087,7 +6087,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 47):
- return
+ return
# C.g:454:2: ( conditional_expression )
# C.g:454:4: conditional_expression
@@ -6095,7 +6095,7 @@ class CParser(Parser):
self.conditional_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -6109,7 +6109,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end constant_expression
@@ -6122,7 +6122,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 48):
- return
+ return
# C.g:458:2: ( lvalue assignment_operator assignment_expression | conditional_expression )
alt74 = 2
@@ -6139,7 +6139,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 13, self.input)
@@ -6155,7 +6155,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 14, self.input)
@@ -6171,7 +6171,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 15, self.input)
@@ -6187,7 +6187,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 16, self.input)
@@ -6203,7 +6203,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 17, self.input)
@@ -6219,7 +6219,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 18, self.input)
@@ -6235,7 +6235,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 19, self.input)
@@ -6253,7 +6253,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 21, self.input)
@@ -6269,7 +6269,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 22, self.input)
@@ -6280,7 +6280,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 1, self.input)
@@ -6298,7 +6298,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 44, self.input)
@@ -6314,7 +6314,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 45, self.input)
@@ -6330,7 +6330,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 46, self.input)
@@ -6346,7 +6346,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 47, self.input)
@@ -6362,7 +6362,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 48, self.input)
@@ -6378,7 +6378,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 49, self.input)
@@ -6394,7 +6394,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 50, self.input)
@@ -6407,7 +6407,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 2, self.input)
@@ -6425,7 +6425,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 73, self.input)
@@ -6441,7 +6441,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 74, self.input)
@@ -6457,7 +6457,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 75, self.input)
@@ -6473,7 +6473,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 76, self.input)
@@ -6489,7 +6489,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 77, self.input)
@@ -6505,7 +6505,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 78, self.input)
@@ -6521,7 +6521,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 79, self.input)
@@ -6534,7 +6534,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 3, self.input)
@@ -6552,7 +6552,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 102, self.input)
@@ -6568,7 +6568,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 103, self.input)
@@ -6584,7 +6584,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 104, self.input)
@@ -6600,7 +6600,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 105, self.input)
@@ -6616,7 +6616,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 106, self.input)
@@ -6632,7 +6632,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 107, self.input)
@@ -6648,7 +6648,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 108, self.input)
@@ -6661,7 +6661,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 4, self.input)
@@ -6679,7 +6679,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 131, self.input)
@@ -6695,7 +6695,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 132, self.input)
@@ -6711,7 +6711,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 133, self.input)
@@ -6727,7 +6727,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 134, self.input)
@@ -6743,7 +6743,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 135, self.input)
@@ -6759,7 +6759,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 136, self.input)
@@ -6775,7 +6775,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 137, self.input)
@@ -6788,7 +6788,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 5, self.input)
@@ -6806,7 +6806,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 160, self.input)
@@ -6822,7 +6822,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 161, self.input)
@@ -6838,7 +6838,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 162, self.input)
@@ -6854,7 +6854,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 163, self.input)
@@ -6870,7 +6870,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 164, self.input)
@@ -6886,7 +6886,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 165, self.input)
@@ -6902,7 +6902,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 166, self.input)
@@ -6918,7 +6918,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 167, self.input)
@@ -6936,7 +6936,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 189, self.input)
@@ -6947,7 +6947,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 6, self.input)
@@ -6965,7 +6965,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 191, self.input)
@@ -6981,7 +6981,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 192, self.input)
@@ -6997,7 +6997,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 193, self.input)
@@ -7013,7 +7013,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 194, self.input)
@@ -7029,7 +7029,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 195, self.input)
@@ -7045,7 +7045,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 196, self.input)
@@ -7061,7 +7061,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 197, self.input)
@@ -7074,7 +7074,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 7, self.input)
@@ -7092,7 +7092,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 220, self.input)
@@ -7108,7 +7108,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 221, self.input)
@@ -7124,7 +7124,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 222, self.input)
@@ -7140,7 +7140,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 223, self.input)
@@ -7156,7 +7156,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 224, self.input)
@@ -7172,7 +7172,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 225, self.input)
@@ -7188,7 +7188,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 226, self.input)
@@ -7204,7 +7204,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 227, self.input)
@@ -7220,7 +7220,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 228, self.input)
@@ -7236,7 +7236,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 229, self.input)
@@ -7252,7 +7252,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 230, self.input)
@@ -7268,7 +7268,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 231, self.input)
@@ -7279,7 +7279,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 8, self.input)
@@ -7297,7 +7297,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 244, self.input)
@@ -7313,7 +7313,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 245, self.input)
@@ -7329,7 +7329,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 246, self.input)
@@ -7345,7 +7345,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 247, self.input)
@@ -7361,7 +7361,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 248, self.input)
@@ -7377,7 +7377,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 249, self.input)
@@ -7393,7 +7393,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 250, self.input)
@@ -7409,7 +7409,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 251, self.input)
@@ -7425,7 +7425,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 252, self.input)
@@ -7441,7 +7441,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 253, self.input)
@@ -7457,7 +7457,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 254, self.input)
@@ -7473,7 +7473,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 255, self.input)
@@ -7482,7 +7482,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 9, self.input)
@@ -7500,7 +7500,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 256, self.input)
@@ -7516,7 +7516,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 257, self.input)
@@ -7532,7 +7532,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 258, self.input)
@@ -7548,7 +7548,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 259, self.input)
@@ -7564,7 +7564,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 260, self.input)
@@ -7580,7 +7580,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 261, self.input)
@@ -7596,7 +7596,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 262, self.input)
@@ -7612,7 +7612,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 263, self.input)
@@ -7628,7 +7628,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 264, self.input)
@@ -7644,7 +7644,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 265, self.input)
@@ -7660,7 +7660,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 266, self.input)
@@ -7676,7 +7676,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 267, self.input)
@@ -7685,7 +7685,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 10, self.input)
@@ -7703,7 +7703,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 268, self.input)
@@ -7719,7 +7719,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 269, self.input)
@@ -7735,7 +7735,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 270, self.input)
@@ -7751,7 +7751,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 271, self.input)
@@ -7767,7 +7767,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 272, self.input)
@@ -7783,7 +7783,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 273, self.input)
@@ -7799,7 +7799,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 274, self.input)
@@ -7815,7 +7815,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 275, self.input)
@@ -7831,7 +7831,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 276, self.input)
@@ -7847,7 +7847,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 277, self.input)
@@ -7863,7 +7863,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 278, self.input)
@@ -7879,7 +7879,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 279, self.input)
@@ -7888,7 +7888,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 11, self.input)
@@ -7906,7 +7906,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 280, self.input)
@@ -7922,7 +7922,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 281, self.input)
@@ -7938,7 +7938,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 282, self.input)
@@ -7954,7 +7954,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 283, self.input)
@@ -7970,7 +7970,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 284, self.input)
@@ -7986,7 +7986,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 285, self.input)
@@ -8002,7 +8002,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 286, self.input)
@@ -8018,7 +8018,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 287, self.input)
@@ -8034,7 +8034,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 288, self.input)
@@ -8050,7 +8050,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 289, self.input)
@@ -8066,7 +8066,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 290, self.input)
@@ -8082,7 +8082,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 291, self.input)
@@ -8091,7 +8091,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 12, self.input)
@@ -8100,7 +8100,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 0, self.input)
@@ -8112,17 +8112,17 @@ class CParser(Parser):
self.lvalue()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_assignment_operator_in_assignment_expression1746)
self.assignment_operator()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_assignment_expression_in_assignment_expression1748)
self.assignment_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt74 == 2:
@@ -8131,7 +8131,7 @@ class CParser(Parser):
self.conditional_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -8144,7 +8144,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end assignment_expression
@@ -8157,7 +8157,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 49):
- return
+ return
# C.g:463:2: ( unary_expression )
# C.g:463:4: unary_expression
@@ -8165,7 +8165,7 @@ class CParser(Parser):
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -8179,7 +8179,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end lvalue
@@ -8192,7 +8192,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 50):
- return
+ return
# C.g:467:2: ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' )
# C.g:
@@ -8204,7 +8204,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -8226,7 +8226,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end assignment_operator
@@ -8242,7 +8242,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 51):
- return
+ return
# C.g:481:2: (e= logical_or_expression ( '?' expression ':' conditional_expression )? )
# C.g:481:4: e= logical_or_expression ( '?' expression ':' conditional_expression )?
@@ -8250,7 +8250,7 @@ class CParser(Parser):
e = self.logical_or_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:481:28: ( '?' expression ':' conditional_expression )?
alt75 = 2
LA75_0 = self.input.LA(1)
@@ -8261,20 +8261,20 @@ class CParser(Parser):
# C.g:481:29: '?' expression ':' conditional_expression
self.match(self.input, 90, self.FOLLOW_90_in_conditional_expression1842)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_conditional_expression1844)
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 47, self.FOLLOW_47_in_conditional_expression1846)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_conditional_expression_in_conditional_expression1848)
self.conditional_expression()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -8294,7 +8294,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end conditional_expression
@@ -8377,7 +8377,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 53):
- return
+ return
# C.g:489:2: ( inclusive_or_expression ( '&&' inclusive_or_expression )* )
# C.g:489:4: inclusive_or_expression ( '&&' inclusive_or_expression )*
@@ -8385,7 +8385,7 @@ class CParser(Parser):
self.inclusive_or_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:489:28: ( '&&' inclusive_or_expression )*
while True: #loop77
alt77 = 2
@@ -8399,12 +8399,12 @@ class CParser(Parser):
# C.g:489:29: '&&' inclusive_or_expression
self.match(self.input, 92, self.FOLLOW_92_in_logical_and_expression1884)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1886)
self.inclusive_or_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8424,7 +8424,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end logical_and_expression
@@ -8437,7 +8437,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 54):
- return
+ return
# C.g:493:2: ( exclusive_or_expression ( '|' exclusive_or_expression )* )
# C.g:493:4: exclusive_or_expression ( '|' exclusive_or_expression )*
@@ -8445,7 +8445,7 @@ class CParser(Parser):
self.exclusive_or_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:493:28: ( '|' exclusive_or_expression )*
while True: #loop78
alt78 = 2
@@ -8459,12 +8459,12 @@ class CParser(Parser):
# C.g:493:29: '|' exclusive_or_expression
self.match(self.input, 93, self.FOLLOW_93_in_inclusive_or_expression1902)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1904)
self.exclusive_or_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8484,7 +8484,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end inclusive_or_expression
@@ -8497,7 +8497,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 55):
- return
+ return
# C.g:497:2: ( and_expression ( '^' and_expression )* )
# C.g:497:4: and_expression ( '^' and_expression )*
@@ -8505,7 +8505,7 @@ class CParser(Parser):
self.and_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:497:19: ( '^' and_expression )*
while True: #loop79
alt79 = 2
@@ -8519,12 +8519,12 @@ class CParser(Parser):
# C.g:497:20: '^' and_expression
self.match(self.input, 94, self.FOLLOW_94_in_exclusive_or_expression1920)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1922)
self.and_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8544,7 +8544,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end exclusive_or_expression
@@ -8557,7 +8557,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 56):
- return
+ return
# C.g:501:2: ( equality_expression ( '&' equality_expression )* )
# C.g:501:4: equality_expression ( '&' equality_expression )*
@@ -8565,7 +8565,7 @@ class CParser(Parser):
self.equality_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:501:24: ( '&' equality_expression )*
while True: #loop80
alt80 = 2
@@ -8579,12 +8579,12 @@ class CParser(Parser):
# C.g:501:25: '&' equality_expression
self.match(self.input, 77, self.FOLLOW_77_in_and_expression1938)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_equality_expression_in_and_expression1940)
self.equality_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8604,7 +8604,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end and_expression
@@ -8617,7 +8617,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 57):
- return
+ return
# C.g:504:2: ( relational_expression ( ( '==' | '!=' ) relational_expression )* )
# C.g:504:4: relational_expression ( ( '==' | '!=' ) relational_expression )*
@@ -8625,7 +8625,7 @@ class CParser(Parser):
self.relational_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:504:26: ( ( '==' | '!=' ) relational_expression )*
while True: #loop81
alt81 = 2
@@ -8645,7 +8645,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -8658,7 +8658,7 @@ class CParser(Parser):
self.relational_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8678,7 +8678,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end equality_expression
@@ -8691,7 +8691,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 58):
- return
+ return
# C.g:508:2: ( shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* )
# C.g:508:4: shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*
@@ -8699,7 +8699,7 @@ class CParser(Parser):
self.shift_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:508:21: ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*
while True: #loop82
alt82 = 2
@@ -8719,7 +8719,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -8732,7 +8732,7 @@ class CParser(Parser):
self.shift_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8752,7 +8752,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end relational_expression
@@ -8765,7 +8765,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 59):
- return
+ return
# C.g:512:2: ( additive_expression ( ( '<<' | '>>' ) additive_expression )* )
# C.g:512:4: additive_expression ( ( '<<' | '>>' ) additive_expression )*
@@ -8773,7 +8773,7 @@ class CParser(Parser):
self.additive_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:512:24: ( ( '<<' | '>>' ) additive_expression )*
while True: #loop83
alt83 = 2
@@ -8793,7 +8793,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -8806,7 +8806,7 @@ class CParser(Parser):
self.additive_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8826,7 +8826,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end shift_expression
@@ -8839,7 +8839,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 60):
- return
+ return
# C.g:518:2: ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration )
alt84 = 11
@@ -8860,7 +8860,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 43, self.input)
@@ -8880,7 +8880,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 47, self.input)
@@ -8896,7 +8896,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 53, self.input)
@@ -8912,7 +8912,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 68, self.input)
@@ -8923,7 +8923,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 1, self.input)
@@ -8952,7 +8952,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 0, self.input)
@@ -8964,7 +8964,7 @@ class CParser(Parser):
self.labeled_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 2:
@@ -8973,7 +8973,7 @@ class CParser(Parser):
self.compound_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 3:
@@ -8982,7 +8982,7 @@ class CParser(Parser):
self.expression_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 4:
@@ -8991,7 +8991,7 @@ class CParser(Parser):
self.selection_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 5:
@@ -9000,7 +9000,7 @@ class CParser(Parser):
self.iteration_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 6:
@@ -9009,7 +9009,7 @@ class CParser(Parser):
self.jump_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 7:
@@ -9018,7 +9018,7 @@ class CParser(Parser):
self.macro_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 8:
@@ -9027,7 +9027,7 @@ class CParser(Parser):
self.asm2_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 9:
@@ -9036,7 +9036,7 @@ class CParser(Parser):
self.asm1_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 10:
@@ -9045,7 +9045,7 @@ class CParser(Parser):
self.asm_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 11:
@@ -9054,7 +9054,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
@@ -9067,7 +9067,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end statement
@@ -9080,7 +9080,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 61):
- return
+ return
# C.g:532:2: ( ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';' )
# C.g:532:4: ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';'
@@ -9094,16 +9094,16 @@ class CParser(Parser):
# C.g:0:0: '__asm__'
self.match(self.input, 103, self.FOLLOW_103_in_asm2_statement2086)
if self.failed:
- return
+ return
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_asm2_statement2089)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_asm2_statement2091)
if self.failed:
- return
+ return
# C.g:532:30: (~ ( ';' ) )*
while True: #loop86
alt86 = 2
@@ -9130,7 +9130,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -9147,10 +9147,10 @@ class CParser(Parser):
self.match(self.input, 63, self.FOLLOW_63_in_asm2_statement2101)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_asm2_statement2103)
if self.failed:
- return
+ return
@@ -9164,7 +9164,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end asm2_statement
@@ -9177,16 +9177,16 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 62):
- return
+ return
# C.g:536:2: ( '_asm' '{' (~ ( '}' ) )* '}' )
# C.g:536:4: '_asm' '{' (~ ( '}' ) )* '}'
self.match(self.input, 104, self.FOLLOW_104_in_asm1_statement2115)
if self.failed:
- return
+ return
self.match(self.input, 43, self.FOLLOW_43_in_asm1_statement2117)
if self.failed:
- return
+ return
# C.g:536:15: (~ ( '}' ) )*
while True: #loop87
alt87 = 2
@@ -9206,7 +9206,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -9223,7 +9223,7 @@ class CParser(Parser):
self.match(self.input, 44, self.FOLLOW_44_in_asm1_statement2127)
if self.failed:
- return
+ return
@@ -9237,7 +9237,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end asm1_statement
@@ -9250,16 +9250,16 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 63):
- return
+ return
# C.g:540:2: ( '__asm' '{' (~ ( '}' ) )* '}' )
# C.g:540:4: '__asm' '{' (~ ( '}' ) )* '}'
self.match(self.input, 105, self.FOLLOW_105_in_asm_statement2138)
if self.failed:
- return
+ return
self.match(self.input, 43, self.FOLLOW_43_in_asm_statement2140)
if self.failed:
- return
+ return
# C.g:540:16: (~ ( '}' ) )*
while True: #loop88
alt88 = 2
@@ -9279,7 +9279,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -9296,7 +9296,7 @@ class CParser(Parser):
self.match(self.input, 44, self.FOLLOW_44_in_asm_statement2150)
if self.failed:
- return
+ return
@@ -9310,7 +9310,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end asm_statement
@@ -9323,16 +9323,16 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 64):
- return
+ return
# C.g:544:2: ( IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')' )
# C.g:544:4: IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')'
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_macro_statement2162)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_macro_statement2164)
if self.failed:
- return
+ return
# C.g:544:19: ( declaration )*
while True: #loop89
alt89 = 2
@@ -11234,7 +11234,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -12440,7 +12440,7 @@ class CParser(Parser):
self.statement_list()
self.following.pop()
if self.failed:
- return
+ return
@@ -12456,13 +12456,13 @@ class CParser(Parser):
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_macro_statement2176)
if self.failed:
- return
+ return
@@ -12476,7 +12476,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end macro_statement
@@ -12489,7 +12489,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 65):
- return
+ return
# C.g:548:2: ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement )
alt92 = 3
@@ -12503,7 +12503,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("547:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );", 92, 0, self.input)
@@ -12513,50 +12513,50 @@ class CParser(Parser):
# C.g:548:4: IDENTIFIER ':' statement
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_labeled_statement2188)
if self.failed:
- return
+ return
self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2190)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_labeled_statement2192)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt92 == 2:
# C.g:549:4: 'case' constant_expression ':' statement
self.match(self.input, 106, self.FOLLOW_106_in_labeled_statement2197)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_labeled_statement2199)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2201)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_labeled_statement2203)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt92 == 3:
# C.g:550:4: 'default' ':' statement
self.match(self.input, 107, self.FOLLOW_107_in_labeled_statement2208)
if self.failed:
- return
+ return
self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2210)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_labeled_statement2212)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
@@ -12569,7 +12569,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end labeled_statement
@@ -14552,7 +14552,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 67):
- return
+ return
# C.g:558:2: ( ( statement )+ )
# C.g:558:4: ( statement )+
@@ -16230,7 +16230,7 @@ class CParser(Parser):
self.statement()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -16239,7 +16239,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(95, self.input)
raise eee
@@ -16260,7 +16260,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end statement_list
@@ -16347,7 +16347,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 69):
- return
+ return
# C.g:567:2: ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement )
alt98 = 2
@@ -16360,7 +16360,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("566:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );", 98, 0, self.input)
@@ -16370,18 +16370,18 @@ class CParser(Parser):
# C.g:567:4: 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )?
self.match(self.input, 108, self.FOLLOW_108_in_selection_statement2272)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2274)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_selection_statement2278)
e = self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2280)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -16389,7 +16389,7 @@ class CParser(Parser):
self.statement()
self.following.pop()
if self.failed:
- return
+ return
# C.g:567:167: ( options {k=1; backtrack=false; } : 'else' statement )?
alt97 = 2
LA97_0 = self.input.LA(1)
@@ -16400,12 +16400,12 @@ class CParser(Parser):
# C.g:567:200: 'else' statement
self.match(self.input, 109, self.FOLLOW_109_in_selection_statement2299)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_selection_statement2301)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
@@ -16415,23 +16415,23 @@ class CParser(Parser):
# C.g:568:4: 'switch' '(' expression ')' statement
self.match(self.input, 110, self.FOLLOW_110_in_selection_statement2308)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2310)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_selection_statement2312)
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2314)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_selection_statement2316)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
@@ -16444,7 +16444,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end selection_statement
@@ -16460,7 +16460,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 70):
- return
+ return
# C.g:572:2: ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement )
alt100 = 3
@@ -16474,7 +16474,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("571:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement );", 100, 0, self.input)
@@ -16484,23 +16484,23 @@ class CParser(Parser):
# C.g:572:4: 'while' '(' e= expression ')' statement
self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2327)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2329)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_iteration_statement2333)
e = self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2335)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_iteration_statement2337)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -16510,29 +16510,29 @@ class CParser(Parser):
# C.g:573:4: 'do' statement 'while' '(' e= expression ')' ';'
self.match(self.input, 112, self.FOLLOW_112_in_iteration_statement2344)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_iteration_statement2346)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2348)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2350)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_iteration_statement2354)
e = self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2356)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_iteration_statement2358)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -16542,20 +16542,20 @@ class CParser(Parser):
# C.g:574:4: 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement
self.match(self.input, 113, self.FOLLOW_113_in_iteration_statement2365)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2367)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2369)
self.expression_statement()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2373)
e = self.expression_statement()
self.following.pop()
if self.failed:
- return
+ return
# C.g:574:58: ( expression )?
alt99 = 2
LA99_0 = self.input.LA(1)
@@ -16568,18 +16568,18 @@ class CParser(Parser):
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2378)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_iteration_statement2380)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -16595,7 +16595,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end iteration_statement
@@ -16608,7 +16608,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 71):
- return
+ return
# C.g:578:2: ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' )
alt101 = 5
@@ -16629,7 +16629,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 4, self.input)
@@ -16638,7 +16638,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 0, self.input)
@@ -16648,58 +16648,58 @@ class CParser(Parser):
# C.g:578:4: 'goto' IDENTIFIER ';'
self.match(self.input, 114, self.FOLLOW_114_in_jump_statement2393)
if self.failed:
- return
+ return
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_jump_statement2395)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2397)
if self.failed:
- return
+ return
elif alt101 == 2:
# C.g:579:4: 'continue' ';'
self.match(self.input, 115, self.FOLLOW_115_in_jump_statement2402)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2404)
if self.failed:
- return
+ return
elif alt101 == 3:
# C.g:580:4: 'break' ';'
self.match(self.input, 116, self.FOLLOW_116_in_jump_statement2409)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2411)
if self.failed:
- return
+ return
elif alt101 == 4:
# C.g:581:4: 'return' ';'
self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2416)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2418)
if self.failed:
- return
+ return
elif alt101 == 5:
# C.g:582:4: 'return' expression ';'
self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2423)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_jump_statement2425)
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2427)
if self.failed:
- return
+ return
@@ -16712,7 +16712,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end jump_statement
@@ -16724,7 +16724,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred2
@@ -16855,7 +16855,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
@@ -16863,7 +16863,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
# C.g:119:41: ( declaration )*
while True: #loop103
alt103 = 2
@@ -16879,7 +16879,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -16888,7 +16888,7 @@ class CParser(Parser):
self.match(self.input, 43, self.FOLLOW_43_in_synpred4108)
if self.failed:
- return
+ return
# $ANTLR end synpred4
@@ -16903,7 +16903,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred5
@@ -16918,7 +16918,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred7
@@ -16933,7 +16933,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred10
@@ -16948,7 +16948,7 @@ class CParser(Parser):
self.type_specifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred14
@@ -16963,7 +16963,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred15
@@ -16978,7 +16978,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred33
@@ -16991,7 +16991,7 @@ class CParser(Parser):
# C.g:225:5: IDENTIFIER ( type_qualifier )* declarator
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred34442)
if self.failed:
- return
+ return
# C.g:225:16: ( type_qualifier )*
while True: #loop106
alt106 = 2
@@ -17026,7 +17026,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -17037,7 +17037,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred34
@@ -17052,7 +17052,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred39
@@ -17067,7 +17067,7 @@ class CParser(Parser):
self.type_specifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred40
@@ -17090,7 +17090,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
@@ -17104,7 +17104,7 @@ class CParser(Parser):
# C.g:297:14: 'EFIAPI'
self.match(self.input, 58, self.FOLLOW_58_in_synpred66788)
if self.failed:
- return
+ return
@@ -17118,7 +17118,7 @@ class CParser(Parser):
# C.g:297:26: 'EFI_BOOTSERVICE'
self.match(self.input, 59, self.FOLLOW_59_in_synpred66793)
if self.failed:
- return
+ return
@@ -17132,7 +17132,7 @@ class CParser(Parser):
# C.g:297:47: 'EFI_RUNTIMESERVICE'
self.match(self.input, 60, self.FOLLOW_60_in_synpred66798)
if self.failed:
- return
+ return
@@ -17140,7 +17140,7 @@ class CParser(Parser):
self.direct_declarator()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred66
@@ -17155,7 +17155,7 @@ class CParser(Parser):
self.declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred67
@@ -17168,7 +17168,7 @@ class CParser(Parser):
# C.g:304:9: 'EFIAPI'
self.match(self.input, 58, self.FOLLOW_58_in_synpred69830)
if self.failed:
- return
+ return
# $ANTLR end synpred69
@@ -17183,7 +17183,7 @@ class CParser(Parser):
self.declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred70
@@ -17196,15 +17196,15 @@ class CParser(Parser):
# C.g:310:9: '(' parameter_type_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_synpred73878)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_parameter_type_list_in_synpred73880)
self.parameter_type_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred73882)
if self.failed:
- return
+ return
# $ANTLR end synpred73
@@ -17217,15 +17217,15 @@ class CParser(Parser):
# C.g:311:9: '(' identifier_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_synpred74892)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_identifier_list_in_synpred74894)
self.identifier_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred74896)
if self.failed:
- return
+ return
# $ANTLR end synpred74
@@ -17240,7 +17240,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred75
@@ -17255,7 +17255,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred76
@@ -17268,7 +17268,7 @@ class CParser(Parser):
# C.g:316:4: '*' ( type_qualifier )+ ( pointer )?
self.match(self.input, 66, self.FOLLOW_66_in_synpred77919)
if self.failed:
- return
+ return
# C.g:316:8: ( type_qualifier )+
cnt116 = 0
while True: #loop116
@@ -17285,7 +17285,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -17294,7 +17294,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(116, self.input)
raise eee
@@ -17314,7 +17314,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
@@ -17330,12 +17330,12 @@ class CParser(Parser):
# C.g:317:4: '*' pointer
self.match(self.input, 66, self.FOLLOW_66_in_synpred78930)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_pointer_in_synpred78932)
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred78
@@ -17348,7 +17348,7 @@ class CParser(Parser):
# C.g:326:32: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_synpred81977)
if self.failed:
- return
+ return
# $ANTLR end synpred81
@@ -17361,7 +17361,7 @@ class CParser(Parser):
# C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration
self.match(self.input, 27, self.FOLLOW_27_in_synpred82974)
if self.failed:
- return
+ return
# C.g:326:31: ( 'OPTIONAL' )?
alt119 = 2
LA119_0 = self.input.LA(1)
@@ -17375,7 +17375,7 @@ class CParser(Parser):
# C.g:326:32: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_synpred82977)
if self.failed:
- return
+ return
@@ -17383,7 +17383,7 @@ class CParser(Parser):
self.parameter_declaration()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred82
@@ -17398,7 +17398,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred83
@@ -17413,7 +17413,7 @@ class CParser(Parser):
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred84
@@ -17428,7 +17428,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# C.g:330:27: ( declarator | abstract_declarator )*
while True: #loop120
alt120 = 3
@@ -17512,7 +17512,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
elif alt120 == 2:
@@ -17521,7 +17521,7 @@ class CParser(Parser):
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -17538,7 +17538,7 @@ class CParser(Parser):
# C.g:330:62: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_synpred861004)
if self.failed:
- return
+ return
@@ -17556,7 +17556,7 @@ class CParser(Parser):
self.specifier_qualifier_list()
self.following.pop()
if self.failed:
- return
+ return
# C.g:341:29: ( abstract_declarator )?
alt122 = 2
LA122_0 = self.input.LA(1)
@@ -17569,7 +17569,7 @@ class CParser(Parser):
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
@@ -17587,7 +17587,7 @@ class CParser(Parser):
self.direct_abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred91
@@ -17600,15 +17600,15 @@ class CParser(Parser):
# C.g:351:6: '(' abstract_declarator ')'
self.match(self.input, 62, self.FOLLOW_62_in_synpred931086)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_abstract_declarator_in_synpred931088)
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred931090)
if self.failed:
- return
+ return
# $ANTLR end synpred93
@@ -17623,7 +17623,7 @@ class CParser(Parser):
self.abstract_declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred94
@@ -17636,20 +17636,20 @@ class CParser(Parser):
# C.g:386:4: '(' type_name ')' cast_expression
self.match(self.input, 62, self.FOLLOW_62_in_synpred1091282)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_type_name_in_synpred1091284)
self.type_name()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred1091286)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_synpred1091288)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred109
@@ -17662,12 +17662,12 @@ class CParser(Parser):
# C.g:395:4: 'sizeof' unary_expression
self.match(self.input, 74, self.FOLLOW_74_in_synpred1141330)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_unary_expression_in_synpred1141332)
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred114
@@ -17680,15 +17680,15 @@ class CParser(Parser):
# C.g:409:13: '(' argument_expression_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_synpred1171420)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_argument_expression_list_in_synpred1171424)
self.argument_expression_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred1171428)
if self.failed:
- return
+ return
# $ANTLR end synpred117
@@ -17701,15 +17701,15 @@ class CParser(Parser):
# C.g:410:13: '(' macro_parameter_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_synpred1181444)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_macro_parameter_list_in_synpred1181446)
self.macro_parameter_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred1181448)
if self.failed:
- return
+ return
# $ANTLR end synpred118
@@ -17722,10 +17722,10 @@ class CParser(Parser):
# C.g:412:13: '*' IDENTIFIER
self.match(self.input, 66, self.FOLLOW_66_in_synpred1201482)
if self.failed:
- return
+ return
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1201486)
if self.failed:
- return
+ return
# $ANTLR end synpred120
@@ -17738,7 +17738,7 @@ class CParser(Parser):
# C.g:443:20: STRING_LITERAL
self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1371683)
if self.failed:
- return
+ return
# $ANTLR end synpred137
@@ -17762,7 +17762,7 @@ class CParser(Parser):
# C.g:0:0: IDENTIFIER
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1381680)
if self.failed:
- return
+ return
else:
@@ -17783,7 +17783,7 @@ class CParser(Parser):
# C.g:0:0: STRING_LITERAL
self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1381683)
if self.failed:
- return
+ return
else:
@@ -17792,7 +17792,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(126, self.input)
raise eee
@@ -17814,17 +17814,17 @@ class CParser(Parser):
self.lvalue()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_assignment_operator_in_synpred1421746)
self.assignment_operator()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_assignment_expression_in_synpred1421748)
self.assignment_expression()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred142
@@ -17839,7 +17839,7 @@ class CParser(Parser):
self.expression_statement()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred169
@@ -17854,7 +17854,7 @@ class CParser(Parser):
self.macro_statement()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred173
@@ -17869,7 +17869,7 @@ class CParser(Parser):
self.asm2_statement()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred174
@@ -17884,7 +17884,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred181
@@ -17899,7 +17899,7 @@ class CParser(Parser):
self.statement_list()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred182
@@ -17914,7 +17914,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred186
@@ -17929,7 +17929,7 @@ class CParser(Parser):
self.statement()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred188
@@ -18388,7 +18388,7 @@ class CParser(Parser):
-
+
FOLLOW_external_declaration_in_translation_unit74 = frozenset([1, 4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])
FOLLOW_function_definition_in_external_declaration113 = frozenset([1])
diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc/Check.py
index 27783e617b92..0a27081df37d 100644
--- a/BaseTools/Source/Python/Ecc/Check.py
+++ b/BaseTools/Source/Python/Ecc/Check.py
@@ -563,17 +563,17 @@ class Check(object):
op = open(FullName).readlines()
FileLinesList = op
LineNo = 0
- CurrentSection = MODEL_UNKNOWN
+ CurrentSection = MODEL_UNKNOWN
HeaderSectionLines = []
- HeaderCommentStart = False
+ HeaderCommentStart = False
HeaderCommentEnd = False
-
+
for Line in FileLinesList:
LineNo = LineNo + 1
Line = Line.strip()
if (LineNo < len(FileLinesList) - 1):
NextLine = FileLinesList[LineNo].strip()
-
+
#
# blank line
#
@@ -600,8 +600,8 @@ class Check(object):
#
HeaderSectionLines.append((Line, LineNo))
HeaderCommentStart = True
- continue
-
+ continue
+
#
# Collect Header content.
#
@@ -635,7 +635,7 @@ class Check(object):
if EccGlobalData.gConfig.HeaderCheckFileCommentEnd == '1' or EccGlobalData.gConfig.HeaderCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0])
-
+
# Check whether the function headers are followed Doxygen special documentation blocks in section 2.3.5
def DoxygenCheckFunctionHeader(self):
@@ -827,7 +827,7 @@ class Check(object):
for FilePath in FilePathList:
if not EccGlobalData.gException.IsException(ERROR_META_DATA_FILE_CHECK_LIBRARY_NAME_DUPLICATE, Record[1]):
EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_LIBRARY_NAME_DUPLICATE, OtherMsg="The Library Class [%s] is duplicated in '%s' line %s and line %s." % (Record[1], FilePath, Record[3], Record[4]), BelongsToTable='Dsc', BelongsToItem=Record[0])
-
+
# Check the header file in Include\Library directory whether be defined in the package DEC file.
def MetaDataFileCheckLibraryDefinedInDec(self):
if EccGlobalData.gConfig.MetaDataFileCheckLibraryDefinedInDec == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
@@ -842,9 +842,9 @@ class Check(object):
if not LibraryDec:
if not EccGlobalData.gException.IsException(ERROR_META_DATA_FILE_CHECK_LIBRARY_NOT_DEFINED, LibraryInInf):
EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_LIBRARY_NOT_DEFINED, \
- OtherMsg="The Library Class [%s] in %s line is not defined in the associated package file." % (LibraryInInf, Line),
+ OtherMsg="The Library Class [%s] in %s line is not defined in the associated package file." % (LibraryInInf, Line),
BelongsToTable='Inf', BelongsToItem=ID)
-
+
# Check whether an Inf file is specified in the FDF file, but not in the Dsc file, then the Inf file must be for a Binary module only
def MetaDataFileCheckBinaryInfInFdf(self):
if EccGlobalData.gConfig.MetaDataFileCheckBinaryInfInFdf == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
@@ -1244,7 +1244,7 @@ class Check(object):
group by A.ID
""" % (Table.Table, Table.Table, Model, Model)
RecordSet = Table.Exec(SqlCommand)
- for Record in RecordSet:
+ for Record in RecordSet:
if not EccGlobalData.gException.IsException(ErrorID, Record[2]):
EccGlobalData.gDb.TblReport.Insert(ErrorID, OtherMsg="The %s value [%s] is used more than one time" % (Name.upper(), Record[2]), BelongsToTable=Table.Table, BelongsToItem=Record[0])
diff --git a/BaseTools/Source/Python/Ecc/CodeFragment.py b/BaseTools/Source/Python/Ecc/CodeFragment.py
index 3bf1c4515020..beb29a8203b4 100644
--- a/BaseTools/Source/Python/Ecc/CodeFragment.py
+++ b/BaseTools/Source/Python/Ecc/CodeFragment.py
@@ -161,5 +161,4 @@ class FunctionCalling:
self.FuncName = Name
self.ParamList = Param
self.StartPos = Begin
- self.EndPos = End
-
\ No newline at end of file
+ self.EndPos = End
diff --git a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
index ffa51de7c1bf..3377f4a94003 100644
--- a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
+++ b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
@@ -46,7 +46,7 @@ from ParserWarning import Warning
T_CHAR_BACKSLASH, T_CHAR_DOUBLE_QUOTE, T_CHAR_SINGLE_QUOTE, T_CHAR_STAR, T_CHAR_HASH) = \
(' ', '\0', '\r', '\t', '\n', '/', '\\', '\"', '\'', '*', '#')
-SEPERATOR_TUPLE = ('=', '|', ',', '{', '}')
+SEPERATOR_TUPLE = ('=', '|', ',', '{', '}')
(T_COMMENT_TWO_SLASH, T_COMMENT_SLASH_STAR) = (0, 1)
@@ -58,7 +58,7 @@ SEPERATOR_TUPLE = ('=', '|', ',', '{', '}')
#
# GetNext*** procedures mean these procedures will get next token first, then make judgement.
# Get*** procedures mean these procedures will make judgement on current token only.
-#
+#
class CodeFragmentCollector:
## The constructor
#
@@ -88,7 +88,7 @@ class CodeFragmentCollector:
SizeOfLastLine = NumberOfLines
if NumberOfLines > 0:
SizeOfLastLine = len(self.Profile.FileLinesList[-1])
-
+
if self.CurrentLineNumber == NumberOfLines and self.CurrentOffsetWithinLine >= SizeOfLastLine - 1:
return True
elif self.CurrentLineNumber > NumberOfLines:
@@ -110,7 +110,7 @@ class CodeFragmentCollector:
return True
else:
return False
-
+
## Rewind() method
#
# Reset file data buffer to the initial state
@@ -120,7 +120,7 @@ class CodeFragmentCollector:
def Rewind(self):
self.CurrentLineNumber = 1
self.CurrentOffsetWithinLine = 0
-
+
## __UndoOneChar() method
#
# Go back one char in the file buffer
@@ -128,9 +128,9 @@ class CodeFragmentCollector:
# @param self The object pointer
# @retval True Successfully go back one char
# @retval False Not able to go back one char as file beginning reached
- #
+ #
def __UndoOneChar(self):
-
+
if self.CurrentLineNumber == 1 and self.CurrentOffsetWithinLine == 0:
return False
elif self.CurrentOffsetWithinLine == 0:
@@ -139,13 +139,13 @@ class CodeFragmentCollector:
else:
self.CurrentOffsetWithinLine -= 1
return True
-
+
## __GetOneChar() method
#
# Move forward one char in the file buffer
#
# @param self The object pointer
- #
+ #
def __GetOneChar(self):
if self.CurrentOffsetWithinLine == len(self.Profile.FileLinesList[self.CurrentLineNumber - 1]) - 1:
self.CurrentLineNumber += 1
@@ -159,13 +159,13 @@ class CodeFragmentCollector:
#
# @param self The object pointer
# @retval Char Current char
- #
+ #
def __CurrentChar(self):
CurrentChar = self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine]
# if CurrentChar > 255:
# raise Warning("Non-Ascii char found At Line %d, offset %d" % (self.CurrentLineNumber, self.CurrentOffsetWithinLine), self.FileName, self.CurrentLineNumber)
return CurrentChar
-
+
## __NextChar() method
#
# Get the one char pass the char pointed to by the file buffer pointer
@@ -178,7 +178,7 @@ class CodeFragmentCollector:
return self.Profile.FileLinesList[self.CurrentLineNumber][0]
else:
return self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine + 1]
-
+
## __SetCurrentCharValue() method
#
# Modify the value of current char
@@ -188,7 +188,7 @@ class CodeFragmentCollector:
#
def __SetCurrentCharValue(self, Value):
self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine] = Value
-
+
## __SetCharValue() method
#
# Modify the value of current char
@@ -198,7 +198,7 @@ class CodeFragmentCollector:
#
def __SetCharValue(self, Line, Offset, Value):
self.Profile.FileLinesList[Line - 1][Offset] = Value
-
+
## __CurrentLine() method
#
# Get the list that contains current line contents
@@ -208,7 +208,7 @@ class CodeFragmentCollector:
#
def __CurrentLine(self):
return self.Profile.FileLinesList[self.CurrentLineNumber - 1]
-
+
## __InsertComma() method
#
# Insert ',' to replace PP
@@ -217,24 +217,24 @@ class CodeFragmentCollector:
# @retval List current line contents
#
def __InsertComma(self, Line):
-
-
+
+
if self.Profile.FileLinesList[Line - 1][0] != T_CHAR_HASH:
BeforeHashPart = str(self.Profile.FileLinesList[Line - 1]).split(T_CHAR_HASH)[0]
if BeforeHashPart.rstrip().endswith(T_CHAR_COMMA) or BeforeHashPart.rstrip().endswith(';'):
return
-
+
if Line - 2 >= 0 and str(self.Profile.FileLinesList[Line - 2]).rstrip().endswith(','):
return
-
+
if Line - 2 >= 0 and str(self.Profile.FileLinesList[Line - 2]).rstrip().endswith(';'):
return
-
+
if str(self.Profile.FileLinesList[Line]).lstrip().startswith(',') or str(self.Profile.FileLinesList[Line]).lstrip().startswith(';'):
return
-
+
self.Profile.FileLinesList[Line - 1].insert(self.CurrentOffsetWithinLine, ',')
-
+
## PreprocessFile() method
#
# Preprocess file contents, replace comments with spaces.
@@ -243,7 +243,7 @@ class CodeFragmentCollector:
# !include statement should be expanded at the same FileLinesList[CurrentLineNumber - 1]
#
# @param self The object pointer
- #
+ #
def PreprocessFile(self):
self.Rewind()
@@ -255,14 +255,14 @@ class CodeFragmentCollector:
PPDirectiveObj = None
# HashComment in quoted string " " is ignored.
InString = False
- InCharLiteral = False
-
+ InCharLiteral = False
+
self.Profile.FileLinesList = [list(s) for s in self.Profile.FileLinesListFromFile]
while not self.__EndOfFile():
-
+
if not InComment and self.__CurrentChar() == T_CHAR_DOUBLE_QUOTE:
InString = not InString
-
+
if not InComment and self.__CurrentChar() == T_CHAR_SINGLE_QUOTE:
InCharLiteral = not InCharLiteral
# meet new line, then no longer in a comment for // and '#'
@@ -273,9 +273,9 @@ class CodeFragmentCollector:
PPExtend = True
else:
PPExtend = False
-
+
EndLinePos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine)
-
+
if InComment and DoubleSlashComment:
InComment = False
DoubleSlashComment = False
@@ -290,17 +290,17 @@ class CodeFragmentCollector:
PPDirectiveObj.EndPos = EndLinePos
FileProfile.PPDirectiveList.append(PPDirectiveObj)
PPDirectiveObj = None
-
+
if InString or InCharLiteral:
CurrentLine = "".join(self.__CurrentLine())
if CurrentLine.rstrip(T_CHAR_LF).rstrip(T_CHAR_CR).endswith(T_CHAR_BACKSLASH):
SlashIndex = CurrentLine.rindex(T_CHAR_BACKSLASH)
self.__SetCharValue(self.CurrentLineNumber, SlashIndex, T_CHAR_SPACE)
-
+
if InComment and not DoubleSlashComment and not HashComment:
CommentObj.Content += T_CHAR_LF
self.CurrentLineNumber += 1
- self.CurrentOffsetWithinLine = 0
+ self.CurrentOffsetWithinLine = 0
# check for */ comment end
elif InComment and not DoubleSlashComment and not HashComment and self.__CurrentChar() == T_CHAR_STAR and self.__NextChar() == T_CHAR_SLASH:
CommentObj.Content += self.__CurrentChar()
@@ -314,7 +314,7 @@ class CodeFragmentCollector:
self.__GetOneChar()
InComment = False
# set comments to spaces
- elif InComment:
+ elif InComment:
if HashComment:
# // follows hash PP directive
if self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_SLASH:
@@ -340,7 +340,7 @@ class CodeFragmentCollector:
# check for '#' comment
elif self.__CurrentChar() == T_CHAR_HASH and not InString and not InCharLiteral:
InComment = True
- HashComment = True
+ HashComment = True
PPDirectiveObj = PP_Directive('', (self.CurrentLineNumber, self.CurrentOffsetWithinLine), None)
# check for /* comment start
elif self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_STAR:
@@ -354,9 +354,9 @@ class CodeFragmentCollector:
InComment = True
else:
self.__GetOneChar()
-
+
EndLinePos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine)
-
+
if InComment and DoubleSlashComment:
CommentObj.EndPos = EndLinePos
FileProfile.CommentList.append(CommentObj)
@@ -377,14 +377,14 @@ class CodeFragmentCollector:
PPDirectiveObj = None
# HashComment in quoted string " " is ignored.
InString = False
- InCharLiteral = False
+ InCharLiteral = False
self.Profile.FileLinesList = [list(s) for s in self.Profile.FileLinesListFromFile]
while not self.__EndOfFile():
-
+
if not InComment and self.__CurrentChar() == T_CHAR_DOUBLE_QUOTE:
InString = not InString
-
+
if not InComment and self.__CurrentChar() == T_CHAR_SINGLE_QUOTE:
InCharLiteral = not InCharLiteral
# meet new line, then no longer in a comment for // and '#'
@@ -395,9 +395,9 @@ class CodeFragmentCollector:
PPExtend = True
else:
PPExtend = False
-
+
EndLinePos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine)
-
+
if InComment and DoubleSlashComment:
InComment = False
DoubleSlashComment = False
@@ -412,17 +412,17 @@ class CodeFragmentCollector:
PPDirectiveObj.EndPos = EndLinePos
FileProfile.PPDirectiveList.append(PPDirectiveObj)
PPDirectiveObj = None
-
+
if InString or InCharLiteral:
CurrentLine = "".join(self.__CurrentLine())
if CurrentLine.rstrip(T_CHAR_LF).rstrip(T_CHAR_CR).endswith(T_CHAR_BACKSLASH):
SlashIndex = CurrentLine.rindex(T_CHAR_BACKSLASH)
self.__SetCharValue(self.CurrentLineNumber, SlashIndex, T_CHAR_SPACE)
-
+
if InComment and not DoubleSlashComment and not HashComment:
CommentObj.Content += T_CHAR_LF
self.CurrentLineNumber += 1
- self.CurrentOffsetWithinLine = 0
+ self.CurrentOffsetWithinLine = 0
# check for */ comment end
elif InComment and not DoubleSlashComment and not HashComment and self.__CurrentChar() == T_CHAR_STAR and self.__NextChar() == T_CHAR_SLASH:
CommentObj.Content += self.__CurrentChar()
@@ -436,7 +436,7 @@ class CodeFragmentCollector:
self.__GetOneChar()
InComment = False
# set comments to spaces
- elif InComment:
+ elif InComment:
if HashComment:
# // follows hash PP directive
if self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_SLASH:
@@ -462,7 +462,7 @@ class CodeFragmentCollector:
# check for '#' comment
elif self.__CurrentChar() == T_CHAR_HASH and not InString and not InCharLiteral:
InComment = True
- HashComment = True
+ HashComment = True
PPDirectiveObj = PP_Directive('', (self.CurrentLineNumber, self.CurrentOffsetWithinLine), None)
# check for /* comment start
elif self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_STAR:
@@ -478,7 +478,7 @@ class CodeFragmentCollector:
self.__GetOneChar()
EndLinePos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine)
-
+
if InComment and DoubleSlashComment:
CommentObj.EndPos = EndLinePos
FileProfile.CommentList.append(CommentObj)
@@ -506,7 +506,7 @@ class CodeFragmentCollector:
tStream = antlr3.CommonTokenStream(lexer)
parser = CParser(tStream)
parser.translation_unit()
-
+
def ParseFileWithClearedPPDirective(self):
self.PreprocessFileWithClear()
# restore from ListOfList to ListOfString
@@ -519,7 +519,7 @@ class CodeFragmentCollector:
tStream = antlr3.CommonTokenStream(lexer)
parser = CParser(tStream)
parser.translation_unit()
-
+
def CleanFileProfileBuffer(self):
FileProfile.CommentList = []
FileProfile.PPDirectiveList = []
@@ -530,61 +530,61 @@ class CodeFragmentCollector:
FileProfile.StructUnionDefinitionList = []
FileProfile.TypedefDefinitionList = []
FileProfile.FunctionCallingList = []
-
+
def PrintFragments(self):
-
+
print '################# ' + self.FileName + '#####################'
-
+
print '/****************************************/'
print '/*************** COMMENTS ***************/'
print '/****************************************/'
for comment in FileProfile.CommentList:
print str(comment.StartPos) + comment.Content
-
+
print '/****************************************/'
print '/********* PREPROCESS DIRECTIVES ********/'
print '/****************************************/'
for pp in FileProfile.PPDirectiveList:
print str(pp.StartPos) + pp.Content
-
+
print '/****************************************/'
print '/********* VARIABLE DECLARATIONS ********/'
print '/****************************************/'
for var in FileProfile.VariableDeclarationList:
print str(var.StartPos) + var.Modifier + ' '+ var.Declarator
-
+
print '/****************************************/'
print '/********* FUNCTION DEFINITIONS *********/'
print '/****************************************/'
for func in FileProfile.FunctionDefinitionList:
print str(func.StartPos) + func.Modifier + ' '+ func.Declarator + ' ' + str(func.NamePos)
-
+
print '/****************************************/'
print '/************ ENUMERATIONS **************/'
print '/****************************************/'
for enum in FileProfile.EnumerationDefinitionList:
print str(enum.StartPos) + enum.Content
-
+
print '/****************************************/'
print '/*********** STRUCTS/UNIONS *************/'
print '/****************************************/'
for su in FileProfile.StructUnionDefinitionList:
print str(su.StartPos) + su.Content
-
+
print '/****************************************/'
print '/********* PREDICATE EXPRESSIONS ********/'
print '/****************************************/'
for predexp in FileProfile.PredicateExpressionList:
print str(predexp.StartPos) + predexp.Content
-
- print '/****************************************/'
+
+ print '/****************************************/'
print '/************** TYPEDEFS ****************/'
print '/****************************************/'
for typedef in FileProfile.TypedefDefinitionList:
print str(typedef.StartPos) + typedef.ToType
-
+
if __name__ == "__main__":
-
+
collector = CodeFragmentCollector(sys.argv[1])
collector.PreprocessFile()
print "For Test."
diff --git a/BaseTools/Source/Python/Ecc/Configuration.py b/BaseTools/Source/Python/Ecc/Configuration.py
index b523858e1b1f..818c4c641c74 100644
--- a/BaseTools/Source/Python/Ecc/Configuration.py
+++ b/BaseTools/Source/Python/Ecc/Configuration.py
@@ -111,7 +111,7 @@ class Configuration(object):
self.HeaderCheckCFileCommentReferenceFormat = 1
# Check whether C File header Comment have the License immediately after the ""Copyright"" line
self.HeaderCheckCFileCommentLicenseFormat = 1
-
+
## C Function Layout Checking
self.CFunctionLayoutCheckAll = 0
@@ -248,7 +248,7 @@ class Configuration(object):
self.MetaDataFileCheckModuleFilePpiFormat = 1
# Check Pcd Format in INF files
self.MetaDataFileCheckModuleFilePcdFormat = 1
-
+
# Check UNI file
self.UniCheckAll = 0
# Check INF or DEC file whether defined the localized information in the associated UNI file.
@@ -270,16 +270,16 @@ class Configuration(object):
# The directory listed here will not be parsed, split with ','
self.SkipDirList = []
-
+
# The file listed here will not be parsed, split with ','
self.SkipFileList = []
# A list for binary file ext name
self.BinaryExtList = []
-
+
# A list for only scanned folders
self.ScanOnlyDirList = []
-
+
# A list for Copyright format
self.Copyright = []
diff --git a/BaseTools/Source/Python/Ecc/Ecc.py b/BaseTools/Source/Python/Ecc/Ecc.py
index 60dfc00260f1..7760ae1359d5 100644
--- a/BaseTools/Source/Python/Ecc/Ecc.py
+++ b/BaseTools/Source/Python/Ecc/Ecc.py
@@ -66,17 +66,17 @@ class Ecc(object):
# Parse the options and args
self.ParseOption()
EdkLogger.info(time.strftime("%H:%M:%S, %b.%d %Y ", time.localtime()) + "[00:00]" + "\n")
-
+
#
# Check EFI_SOURCE (Edk build convention). EDK_SOURCE will always point to ECP
#
WorkspaceDir = os.path.normcase(os.path.normpath(os.environ["WORKSPACE"]))
os.environ["WORKSPACE"] = WorkspaceDir
-
+
# set multiple workspace
PackagesPath = os.getenv("PACKAGES_PATH")
mws.setWs(WorkspaceDir, PackagesPath)
-
+
if "ECP_SOURCE" not in os.environ:
os.environ["ECP_SOURCE"] = mws.join(WorkspaceDir, GlobalData.gEdkCompatibilityPkg)
if "EFI_SOURCE" not in os.environ:
@@ -90,11 +90,11 @@ class Ecc(object):
EfiSourceDir = os.path.normcase(os.path.normpath(os.environ["EFI_SOURCE"]))
EdkSourceDir = os.path.normcase(os.path.normpath(os.environ["EDK_SOURCE"]))
EcpSourceDir = os.path.normcase(os.path.normpath(os.environ["ECP_SOURCE"]))
-
+
os.environ["EFI_SOURCE"] = EfiSourceDir
os.environ["EDK_SOURCE"] = EdkSourceDir
os.environ["ECP_SOURCE"] = EcpSourceDir
-
+
GlobalData.gWorkspace = WorkspaceDir
GlobalData.gEfiSource = EfiSourceDir
GlobalData.gEdkSource = EdkSourceDir
@@ -104,7 +104,7 @@ class Ecc(object):
GlobalData.gGlobalDefines["EFI_SOURCE"] = EfiSourceDir
GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir
GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir
-
+
EdkLogger.info("Loading ECC configuration ... done")
# Generate checkpoints list
EccGlobalData.gConfig = Configuration(self.ConfigFile)
@@ -120,11 +120,11 @@ class Ecc(object):
# Get files real name in workspace dir
#
GlobalData.gAllFiles = DirCache(GlobalData.gWorkspace)
-
+
# Build ECC database
# self.BuildDatabase()
self.DetectOnlyScanDirs()
-
+
# Start to check
self.Check()
@@ -160,8 +160,8 @@ class Ecc(object):
EdkLogger.error("ECC", BuildToolError.OPTION_VALUE_INVALID, ExtraData="Use -f option need to fill specific folders in config.ini file")
else:
self.BuildDatabase()
-
-
+
+
## BuildDatabase
#
# Build the database for target
@@ -172,7 +172,7 @@ class Ecc(object):
EccGlobalData.gDb.TblReport.Create()
# Build database
- if self.IsInit:
+ if self.IsInit:
if self.ScanMetaData:
EdkLogger.quiet("Building database for Meta Data File ...")
self.BuildMetaDataFileDatabase(SpeciDirs)
@@ -198,7 +198,7 @@ class Ecc(object):
if SpecificDirs is None:
ScanFolders.append(EccGlobalData.gTarget)
else:
- for specificDir in SpecificDirs:
+ for specificDir in SpecificDirs:
ScanFolders.append(os.path.join(EccGlobalData.gTarget, specificDir))
EdkLogger.quiet("Building database for meta data files ...")
Op = open(EccGlobalData.gConfig.MetaDataFileCheckPathOfGenerateFileList, 'w+')
@@ -219,7 +219,7 @@ class Ecc(object):
# symlinks to directories are treated as directories
Dirs.remove(Dir)
Dirs.append(Dirname)
-
+
for File in Files:
if len(File) > 4 and File[-4:].upper() == ".DEC":
Filename = os.path.normpath(os.path.join(Root, File))
diff --git a/BaseTools/Source/Python/Ecc/Exception.py b/BaseTools/Source/Python/Ecc/Exception.py
index b0882afa6289..ef96264ab203 100644
--- a/BaseTools/Source/Python/Ecc/Exception.py
+++ b/BaseTools/Source/Python/Ecc/Exception.py
@@ -23,12 +23,12 @@ class ExceptionXml(object):
self.KeyWord = ''
self.ErrorID = ''
self.FilePath = ''
-
+
def FromXml(self, Item, Key):
self.KeyWord = XmlElement(Item, '%s/KeyWord' % Key)
self.ErrorID = XmlElement(Item, '%s/ErrorID' % Key)
self.FilePath = os.path.normpath(XmlElement(Item, '%s/FilePath' % Key))
-
+
def __str__(self):
return 'ErrorID = %s KeyWord = %s FilePath = %s' %(self.ErrorID, self.KeyWord, self.FilePath)
@@ -36,22 +36,22 @@ class ExceptionXml(object):
class ExceptionListXml(object):
def __init__(self):
self.List = []
-
+
def FromXmlFile(self, FilePath):
XmlContent = XmlParseFile(FilePath)
for Item in XmlList(XmlContent, '/ExceptionList/Exception'):
Exp = ExceptionXml()
Exp.FromXml(Item, 'Exception')
self.List.append(Exp)
-
+
def ToList(self):
RtnList = []
for Item in self.List:
#RtnList.append((Item.ErrorID, Item.KeyWord, Item.FilePath))
RtnList.append((Item.ErrorID, Item.KeyWord))
-
+
return RtnList
-
+
def __str__(self):
RtnStr = ''
if self.List:
@@ -70,7 +70,7 @@ class ExceptionCheck(object):
if FilePath and os.path.isfile(FilePath):
self.ExceptionListXml.FromXmlFile(FilePath)
self.ExceptionList = self.ExceptionListXml.ToList()
-
+
def IsException(self, ErrorID, KeyWord, FileID=-1):
if (str(ErrorID), KeyWord.replace('\r\n', '\n')) in self.ExceptionList:
return True
diff --git a/BaseTools/Source/Python/Ecc/FileProfile.py b/BaseTools/Source/Python/Ecc/FileProfile.py
index f31d37ff9683..4220a75a219e 100644
--- a/BaseTools/Source/Python/Ecc/FileProfile.py
+++ b/BaseTools/Source/Python/Ecc/FileProfile.py
@@ -36,7 +36,7 @@ FunctionCallingList = []
# May raise Exception when opening file.
#
class FileProfile :
-
+
## The constructor
#
# @param self The object pointer
@@ -54,5 +54,4 @@ class FileProfile :
except IOError:
raise Warning("Error when opening file %s" % FileName)
-
-
\ No newline at end of file
+
diff --git a/BaseTools/Source/Python/Ecc/MetaDataParser.py b/BaseTools/Source/Python/Ecc/MetaDataParser.py
index 82ede3eb330c..b6d88c7b15a0 100644
--- a/BaseTools/Source/Python/Ecc/MetaDataParser.py
+++ b/BaseTools/Source/Python/Ecc/MetaDataParser.py
@@ -87,16 +87,16 @@ def GetTableList(FileModelList, Table, Db):
# @param FileName: FileName of the comment
#
def ParseHeaderCommentSection(CommentList, FileName = None):
-
+
Abstract = ''
Description = ''
Copyright = ''
License = ''
EndOfLine = "\n"
STR_HEADER_COMMENT_START = "@file"
-
+
#
- # used to indicate the state of processing header comment section of dec,
+ # used to indicate the state of processing header comment section of dec,
# inf files
#
HEADER_COMMENT_NOT_STARTED = -1
@@ -117,11 +117,11 @@ def ParseHeaderCommentSection(CommentList, FileName = None):
if _IsCopyrightLine(Line):
Last = Index
break
-
+
for Item in CommentList:
Line = Item[0]
LineNo = Item[1]
-
+
if not Line.startswith('#') and Line:
SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName
ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement)
@@ -131,14 +131,14 @@ def ParseHeaderCommentSection(CommentList, FileName = None):
Comment = CleanString2(Line)[1]
Comment = Comment.strip()
#
- # if there are blank lines between License or Description, keep them as they would be
+ # if there are blank lines between License or Description, keep them as they would be
# indication of different block; or in the position that Abstract should be, also keep it
# as it indicates that no abstract
#
if not Comment and HeaderCommentStage not in [HEADER_COMMENT_LICENSE, \
HEADER_COMMENT_DESCRIPTION, HEADER_COMMENT_ABSTRACT]:
continue
-
+
if HeaderCommentStage == HEADER_COMMENT_NOT_STARTED:
if Comment.startswith(STR_HEADER_COMMENT_START):
HeaderCommentStage = HEADER_COMMENT_ABSTRACT
@@ -152,39 +152,39 @@ def ParseHeaderCommentSection(CommentList, FileName = None):
if not Comment:
Abstract = ''
HeaderCommentStage = HEADER_COMMENT_DESCRIPTION
- elif _IsCopyrightLine(Comment):
+ elif _IsCopyrightLine(Comment):
Copyright += Comment + EndOfLine
HeaderCommentStage = HEADER_COMMENT_COPYRIGHT
- else:
+ else:
Abstract += Comment + EndOfLine
HeaderCommentStage = HEADER_COMMENT_DESCRIPTION
elif HeaderCommentStage == HEADER_COMMENT_DESCRIPTION:
#
# in case there is no description
- #
- if _IsCopyrightLine(Comment):
+ #
+ if _IsCopyrightLine(Comment):
Copyright += Comment + EndOfLine
HeaderCommentStage = HEADER_COMMENT_COPYRIGHT
else:
- Description += Comment + EndOfLine
+ Description += Comment + EndOfLine
elif HeaderCommentStage == HEADER_COMMENT_COPYRIGHT:
- if _IsCopyrightLine(Comment):
+ if _IsCopyrightLine(Comment):
Copyright += Comment + EndOfLine
else:
#
# Contents after copyright line are license, those non-copyright lines in between
- # copyright line will be discarded
+ # copyright line will be discarded
#
if LineNo > Last:
if License:
License += EndOfLine
License += Comment + EndOfLine
- HeaderCommentStage = HEADER_COMMENT_LICENSE
+ HeaderCommentStage = HEADER_COMMENT_LICENSE
else:
if not Comment and not License:
continue
License += Comment + EndOfLine
-
+
if not Copyright.strip():
SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName
ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement)
@@ -198,19 +198,19 @@ def ParseHeaderCommentSection(CommentList, FileName = None):
for Result in ResultSet:
Msg = 'Header comment section must have license information'
EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0])
-
+
if not Abstract.strip() or Abstract.find('Component description file') > -1:
SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName
ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement)
for Result in ResultSet:
Msg = 'Header comment section must have Abstract information.'
EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0])
-
+
return Abstract.strip(), Description.strip(), Copyright.strip(), License.strip()
## _IsCopyrightLine
-# check whether current line is copyright line, the criteria is whether there is case insensitive keyword "Copyright"
-# followed by zero or more white space characters followed by a "(" character
+# check whether current line is copyright line, the criteria is whether there is case insensitive keyword "Copyright"
+# followed by zero or more white space characters followed by a "(" character
#
# @param LineContent: the line need to be checked
# @return: True if current line is copyright line, False else
@@ -218,11 +218,11 @@ def ParseHeaderCommentSection(CommentList, FileName = None):
def _IsCopyrightLine (LineContent):
LineContent = LineContent.upper()
Result = False
-
+
ReIsCopyrightRe = re.compile(r"""(^|\s)COPYRIGHT *\(""", re.DOTALL)
if ReIsCopyrightRe.search(LineContent):
Result = True
-
+
return Result
@@ -232,7 +232,7 @@ def _IsCopyrightLine (LineContent):
# Remove spaces
#
# @param Line: The string to be cleaned
-# @param CommentCharacter: Comment char, used to ignore comment content,
+# @param CommentCharacter: Comment char, used to ignore comment content,
# default is DataType.TAB_COMMENT_SPLIT
#
def CleanString2(Line, CommentCharacter='#', AllowCppStyleComment=False):
diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
index 4d61cd1cea91..659997045bc0 100644
--- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
@@ -92,7 +92,7 @@ def ParseMacro(Parser):
elif (Name in self._FileLocalMacros) and (self._FileLocalMacros[Name] != Value):
EdkLogger.error('Parser', FORMAT_INVALID, "EDK_GLOBAL defined a macro with the same name and different value as one defined by 'DEFINE'",
ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex+1)
-
+
self._ValueList = [Type, Name, Value]
return MacroParser
@@ -334,7 +334,7 @@ class MetaFileParser(object):
self._ValueList = [ReplaceMacro(Value, self._Macros) for Value in self._ValueList]
Name, Value = self._ValueList[1], self._ValueList[2]
- # Sometimes, we need to make differences between EDK and EDK2 modules
+ # Sometimes, we need to make differences between EDK and EDK2 modules
if Name == 'INF_VERSION':
try:
self._Version = int(Value, 0)
@@ -354,7 +354,7 @@ class MetaFileParser(object):
UniFile = os.path.join(os.path.dirname(self.MetaFile), Value)
if os.path.exists(UniFile):
self._UniObj = UniParser(UniFile, IsExtraUni=False, IsModuleUni=False)
-
+
if type(self) == InfParser and self._Version < 0x00010005:
# EDK module allows using defines as macros
self._FileLocalMacros[Name] = Value
@@ -390,7 +390,7 @@ class MetaFileParser(object):
return Macros
- ## Get section Macros that are applicable to current line, which may come from other sections
+ ## Get section Macros that are applicable to current line, which may come from other sections
## that share the same name while scope is wider
def _GetApplicableSectionMacro(self):
Macros = {}
@@ -473,7 +473,7 @@ class InfParser(MetaFileParser):
self.FileID = FileID
else:
self.FileID = self.TblFile.InsertFile(Filename, MODEL_FILE_INF)
-
+
# parse the file line by line
IsFindBlockComment = False
@@ -591,7 +591,7 @@ class InfParser(MetaFileParser):
)
Usage = ''
if IsFindBlockComment:
- EdkLogger.error("Parser", FORMAT_INVALID, "Open block comments (starting with /*) are expected to end with */",
+ EdkLogger.error("Parser", FORMAT_INVALID, "Open block comments (starting with /*) are expected to end with */",
File=self.MetaFile)
self._Done()
@@ -818,7 +818,7 @@ class DscParser(MetaFileParser):
# the owner item
#
self._IdMapping = {-1:-1}
-
+
self.TblFile = EccGlobalData.gDb.TblFile
self.FileID = -1
@@ -838,8 +838,8 @@ class DscParser(MetaFileParser):
self.FileID = FileID
else:
self.FileID = self.TblFile.InsertFile(Filename, MODEL_FILE_DSC)
-
-
+
+
for Index in range(0, len(Content)):
Line = CleanString(Content[Index])
# skip empty line
@@ -850,7 +850,7 @@ class DscParser(MetaFileParser):
self._LineIndex = Index
if self._InSubsection and self._Owner[-1] == -1:
self._Owner.append(self._LastItem)
-
+
# section header
if Line[0] == TAB_SECTION_START and Line[-1] == TAB_SECTION_END:
self._SectionType = MODEL_META_DATA_SECTION_HEADER
@@ -960,7 +960,7 @@ class DscParser(MetaFileParser):
elif self._From > 0:
EdkLogger.error('Parser', FORMAT_INVALID,
"No '!include' allowed in included file",
- ExtraData=self._CurrentLine, File=self.MetaFile,
+ ExtraData=self._CurrentLine, File=self.MetaFile,
Line=self._LineIndex+1)
#
@@ -1154,7 +1154,7 @@ class DscParser(MetaFileParser):
MODEL_META_DATA_USER_EXTENSION : self._Skip,
MODEL_META_DATA_CONDITIONAL_STATEMENT_ERROR : self._Skip,
}
-
+
self._RawTable = self._Table
self._Table = MetaFileStorage(self._RawTable.Cur, self.MetaFile, MODEL_FILE_DSC, True)
self._DirectiveStack = []
@@ -1184,7 +1184,7 @@ class DscParser(MetaFileParser):
try:
Processer[self._ItemType]()
except EvaluationException, Excpt:
- #
+ #
# Only catch expression evaluation error here. We need to report
# the precise number of line on which the error occurred
#
@@ -1194,11 +1194,11 @@ class DscParser(MetaFileParser):
# Line=self._LineIndex+1)
except MacroException, Excpt:
EdkLogger.error('Parser', FORMAT_INVALID, str(Excpt),
- File=self._FileWithError, ExtraData=' '.join(self._ValueList),
+ File=self._FileWithError, ExtraData=' '.join(self._ValueList),
Line=self._LineIndex+1)
if self._ValueList is None:
- continue
+ continue
NewOwner = self._IdMapping.get(Owner, -1)
self._Enabled = int((not self._DirectiveEvalStack) or (False not in self._DirectiveEvalStack))
@@ -1221,7 +1221,7 @@ class DscParser(MetaFileParser):
self._IdMapping[Id] = self._LastItem
RecordList = self._Table.GetAll()
-
+
self._RawTable.Drop()
self._Table.Drop()
for Record in RecordList:
@@ -1255,7 +1255,7 @@ class DscParser(MetaFileParser):
# Don't use PCD with different values.
if Name in self._Symbols and self._Symbols[Name] != Value:
self._Symbols.pop(Name)
- continue
+ continue
self._Symbols[Name] = Value
Records = self._RawTable.Query(MODEL_PCD_FIXED_AT_BUILD, BelongsToItem=-1.0)
@@ -1263,12 +1263,12 @@ class DscParser(MetaFileParser):
Value, DatumType, MaxDatumSize = AnalyzePcdData(Value)
# Only use PCD whose value is straitforward (no macro and PCD)
if self.SymbolPattern.findall(Value):
- continue
+ continue
Name = TokenSpaceGuid+'.'+PcdName
# Don't use PCD with different values.
if Name in self._Symbols and self._Symbols[Name] != Value:
self._Symbols.pop(Name)
- continue
+ continue
self._Symbols[Name] = Value
def __ProcessDefine(self):
@@ -1288,13 +1288,13 @@ class DscParser(MetaFileParser):
SectionLocalMacros[Name] = Value
elif self._ItemType == MODEL_META_DATA_GLOBAL_DEFINE:
GlobalData.gEdkGlobal[Name] = Value
-
+
#
# Keyword in [Defines] section can be used as Macros
#
if (self._ItemType == MODEL_META_DATA_HEADER) and (self._SectionType == MODEL_META_DATA_HEADER):
self._FileLocalMacros[Name] = Value
-
+
self._ValueList = [Type, Name, Value]
def __ProcessDirective(self):
@@ -1309,12 +1309,12 @@ class DscParser(MetaFileParser):
EdkLogger.debug(EdkLogger.DEBUG_5, str(Exc), self._ValueList[1])
Result = False
except WrnExpression, Excpt:
- #
+ #
# Catch expression evaluation warning here. We need to report
# the precise number of line and return the evaluation result
#
EdkLogger.warn('Parser', "Suspicious expression: %s" % str(Excpt),
- File=self._FileWithError, ExtraData=' '.join(self._ValueList),
+ File=self._FileWithError, ExtraData=' '.join(self._ValueList),
Line=self._LineIndex+1)
Result = Excpt.result
except BadExpression, Exc:
@@ -1365,14 +1365,14 @@ class DscParser(MetaFileParser):
#
elif "ECP_SOURCE" in GlobalData.gCommandLineDefines.keys():
__IncludeMacros['ECP_SOURCE'] = GlobalData.gCommandLineDefines['ECP_SOURCE']
-
+
__IncludeMacros['EFI_SOURCE'] = GlobalData.gGlobalDefines['EFI_SOURCE']
__IncludeMacros['EDK_SOURCE'] = GlobalData.gGlobalDefines['EDK_SOURCE']
#
- # Allow using MACROs comes from [Defines] section to keep compatible.
+ # Allow using MACROs comes from [Defines] section to keep compatible.
#
__IncludeMacros.update(self._Macros)
-
+
IncludedFile = NormPath(ReplaceMacro(self._ValueList[1], __IncludeMacros, RaiseError=True))
#
# First search the include file under the same directory as DSC file
@@ -1386,14 +1386,14 @@ class DscParser(MetaFileParser):
IncludedFile1 = PathClass(IncludedFile, GlobalData.gWorkspace)
ErrorCode, ErrorInfo2 = IncludedFile1.Validate()
if ErrorCode != 0:
- EdkLogger.error('parser', ErrorCode, File=self._FileWithError,
+ EdkLogger.error('parser', ErrorCode, File=self._FileWithError,
Line=self._LineIndex+1, ExtraData=ErrorInfo1 + "\n"+ ErrorInfo2)
self._FileWithError = IncludedFile1
IncludedFileTable = MetaFileStorage(self._Table.Cur, IncludedFile1, MODEL_FILE_DSC, True)
Owner = self._Content[self._ContentIndex-1][0]
- Parser = DscParser(IncludedFile1, self._FileType, IncludedFileTable,
+ Parser = DscParser(IncludedFile1, self._FileType, IncludedFileTable,
Owner=Owner, From=Owner)
# set the parser status with current status
@@ -1417,7 +1417,7 @@ class DscParser(MetaFileParser):
self._Content.pop(self._ContentIndex-1)
self._ValueList = None
self._ContentIndex -= 1
-
+
def __ProcessSkuId(self):
self._ValueList = [ReplaceMacro(Value, self._Macros, RaiseError=True)
for Value in self._ValueList]
@@ -1434,22 +1434,22 @@ class DscParser(MetaFileParser):
# PCD value can be an expression
#
if len(ValueList) > 1 and ValueList[1] == TAB_VOID:
- PcdValue = ValueList[0]
+ PcdValue = ValueList[0]
try:
ValueList[0] = ValueExpression(PcdValue, self._Macros)(True)
except WrnExpression, Value:
- ValueList[0] = Value.result
+ ValueList[0] = Value.result
else:
PcdValue = ValueList[-1]
try:
ValueList[-1] = ValueExpression(PcdValue, self._Macros)(True)
except WrnExpression, Value:
ValueList[-1] = Value.result
-
+
if ValueList[-1] == 'True':
ValueList[-1] = '1'
if ValueList[-1] == 'False':
- ValueList[-1] = '0'
+ ValueList[-1] = '0'
self._ValueList[2] = '|'.join(ValueList)
@@ -1548,7 +1548,7 @@ class DecParser(MetaFileParser):
self.FileID = FileID
else:
self.FileID = self.TblFile.InsertFile(Filename, MODEL_FILE_DEC)
-
+
for Index in range(0, len(Content)):
Line, Comment = CleanString2(Content[Index])
self._CurrentLine = Line
@@ -1750,19 +1750,19 @@ class DecParser(MetaFileParser):
" (<TokenSpaceGuidCName>.<PcdCName>|<DefaultValue>|<DatumType>|<Token>)",
File=self.MetaFile, Line=self._LineIndex+1)
-
+
ValueRe = re.compile(r'^\s*L?\".*\|.*\"')
PtrValue = ValueRe.findall(TokenList[1])
-
- # Has VOID* type string, may contain "|" character in the string.
+
+ # Has VOID* type string, may contain "|" character in the string.
if len(PtrValue) != 0:
ptrValueList = re.sub(ValueRe, '', TokenList[1])
ValueList = GetSplitValueList(ptrValueList)
ValueList[0] = PtrValue[0]
else:
ValueList = GetSplitValueList(TokenList[1])
-
-
+
+
# check if there's enough datum information given
if len(ValueList) != 3:
EdkLogger.error('Parser', FORMAT_INVALID, "Invalid PCD Datum information given",
@@ -1792,7 +1792,7 @@ class DecParser(MetaFileParser):
if not IsValid:
EdkLogger.error('Parser', FORMAT_INVALID, Cause, ExtraData=self._CurrentLine,
File=self.MetaFile, Line=self._LineIndex+1)
-
+
if EccGlobalData.gConfig.UniCheckPCDInfo == '1' or EccGlobalData.gConfig.UniCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
# check Description, Prompt information
PatternDesc = re.compile('##\s*([\x21-\x7E\s]*)', re.S)
@@ -1903,7 +1903,7 @@ class DecParser(MetaFileParser):
## Fdf
#
# This class defined the structure used in Fdf object
-#
+#
# @param Filename: Input value for Ffilename of Fdf file, default is None
# @param WorkspaceDir: Input value for current workspace directory, default is None
#
@@ -1911,7 +1911,7 @@ class Fdf(object):
def __init__(self, Filename = None, IsToDatabase = False, WorkspaceDir = None, Database = None):
self.WorkspaceDir = WorkspaceDir
self.IsToDatabase = IsToDatabase
-
+
self.Cur = Database.Cur
self.TblFile = Database.TblFile
self.TblFdf = Database.TblFdf
@@ -1938,15 +1938,15 @@ class Fdf(object):
self.FileList[Filename] = FileID
return self.FileList[Filename]
-
-
+
+
## Load Fdf file
#
# Load the file if it exists
#
# @param Filename: Input value for filename of Fdf file
#
- def LoadFdfFile(self, Filename):
+ def LoadFdfFile(self, Filename):
FileList = []
#
# Parse Fdf file
@@ -1991,7 +1991,7 @@ class UniParser(object):
self.FileIn = None
self.Missing = []
self.__read()
-
+
def __read(self):
try:
self.FileIn = CodecOpenLongFilePath(self.FilePath, Mode='rb', Encoding='utf_8').read()
@@ -2001,7 +2001,7 @@ class UniParser(object):
self.FileIn = CodecOpenLongFilePath(self.FilePath, Mode='rb', Encoding='utf_16_le').read()
except IOError:
self.FileIn = ""
-
+
def Start(self):
if self.IsModuleUni:
if self.IsExtraUni:
@@ -2021,7 +2021,7 @@ class UniParser(object):
self.PrintLog('STR_PACKAGE_ABSTRACT', PackageAbstract)
PackageDescription = self.CheckKeyValid('STR_PACKAGE_DESCRIPTION')
self.PrintLog('STR_PACKAGE_DESCRIPTION', PackageDescription)
-
+
def CheckKeyValid(self, Key, Contents=None):
if not Contents:
Contents = self.FileIn
@@ -2029,7 +2029,7 @@ class UniParser(object):
if KeyPattern.search(Contents):
return True
return False
-
+
def CheckPcdInfo(self, PcdCName):
PromptKey = 'STR_%s_PROMPT' % PcdCName.replace('.', '_')
PcdPrompt = self.CheckKeyValid(PromptKey)
@@ -2037,7 +2037,7 @@ class UniParser(object):
HelpKey = 'STR_%s_HELP' % PcdCName.replace('.', '_')
PcdHelp = self.CheckKeyValid(HelpKey)
self.PrintLog(HelpKey, PcdHelp)
-
+
def PrintLog(self, Key, Value):
if not Value and Key not in self.Missing:
Msg = '%s is missing in the %s file.' % (Key, self.FileName)
diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileTable.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileTable.py
index 9faa6b58b001..5376437e3d13 100644
--- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileTable.py
+++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileTable.py
@@ -25,7 +25,7 @@ from CommonDataClass.DataClass import MODEL_FILE_DSC, MODEL_FILE_DEC, MODEL_FILE
MODEL_FILE_OTHERS
class MetaFileTable(Table):
- ## Constructor
+ ## Constructor
def __init__(self, Cursor, MetaFile, FileType, TableName, Temporary = False):
self.MetaFile = MetaFile
self.TblFile = EccGlobalData.gDb.TblFile
@@ -88,30 +88,30 @@ class ModuleTable(MetaFileTable):
BelongsToItem=-1, BelongsToFile = -1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0, Usage=''):
(Value1, Value2, Value3, Usage, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Usage, Scope1, Scope2))
return Table.Insert(
- self,
- Model,
- Value1,
- Value2,
- Value3,
- Usage,
- Scope1,
+ self,
+ Model,
+ Value1,
+ Value2,
+ Value3,
+ Usage,
+ Scope1,
Scope2,
BelongsToItem,
- BelongsToFile,
- StartLine,
- StartColumn,
- EndLine,
- EndColumn,
+ BelongsToFile,
+ StartLine,
+ StartColumn,
+ EndLine,
+ EndColumn,
Enabled
)
## Query table
#
- # @param Model: The Model of Record
- # @param Arch: The Arch attribute of Record
- # @param Platform The Platform attribute of Record
+ # @param Model: The Model of Record
+ # @param Arch: The Arch attribute of Record
+ # @param Platform The Platform attribute of Record
#
- # @retval: A recordSet of all found records
+ # @retval: A recordSet of all found records
#
def Query(self, Model, Arch=None, Platform=None):
ConditionString = "Model=%s AND Enabled>=0" % Model
@@ -171,28 +171,28 @@ class PackageTable(MetaFileTable):
BelongsToItem=-1, BelongsToFile = -1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0):
(Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))
return Table.Insert(
- self,
- Model,
- Value1,
- Value2,
- Value3,
- Scope1,
+ self,
+ Model,
+ Value1,
+ Value2,
+ Value3,
+ Scope1,
Scope2,
BelongsToItem,
- BelongsToFile,
- StartLine,
- StartColumn,
- EndLine,
- EndColumn,
+ BelongsToFile,
+ StartLine,
+ StartColumn,
+ EndLine,
+ EndColumn,
Enabled
)
## Query table
#
- # @param Model: The Model of Record
- # @param Arch: The Arch attribute of Record
+ # @param Model: The Model of Record
+ # @param Arch: The Arch attribute of Record
#
- # @retval: A recordSet of all found records
+ # @retval: A recordSet of all found records
#
def Query(self, Model, Arch=None):
ConditionString = "Model=%s AND Enabled>=0" % Model
@@ -252,32 +252,32 @@ class PlatformTable(MetaFileTable):
FromItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=1):
(Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))
return Table.Insert(
- self,
- Model,
- Value1,
- Value2,
- Value3,
- Scope1,
+ self,
+ Model,
+ Value1,
+ Value2,
+ Value3,
+ Scope1,
Scope2,
- BelongsToItem,
+ BelongsToItem,
BelongsToFile,
FromItem,
- StartLine,
- StartColumn,
- EndLine,
- EndColumn,
+ StartLine,
+ StartColumn,
+ EndLine,
+ EndColumn,
Enabled
)
## Query table
#
- # @param Model: The Model of Record
+ # @param Model: The Model of Record
# @param Scope1: Arch of a Dsc item
# @param Scope2: Module type of a Dsc item
# @param BelongsToItem: The item belongs to which another item
# @param FromItem: The item belongs to which dsc file
#
- # @retval: A recordSet of all found records
+ # @retval: A recordSet of all found records
#
def Query(self, Model, Scope1=None, Scope2=None, BelongsToItem=None, FromItem=None):
ConditionString = "Model=%s AND Enabled>0" % Model
diff --git a/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py b/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py
index a86f19624c44..51772e768a8c 100644
--- a/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py
+++ b/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py
@@ -32,7 +32,7 @@ def CreateXmlElement(Name, String, NodeList, AttributeList):
Element = Doc.createElement(Name)
if String != '' and String is not None:
Element.appendChild(Doc.createTextNode(String))
-
+
for Item in NodeList:
if type(Item) == type([]):
Key = Item[0]
@@ -48,7 +48,7 @@ def CreateXmlElement(Name, String, NodeList, AttributeList):
Value = Item[1]
if Key != '' and Key is not None and Value != '' and Value is not None:
Element.setAttribute(Key, Value)
-
+
return Element
## Get a list of XML nodes using XPath style syntax.
diff --git a/BaseTools/Source/Python/Ecc/Xml/__init__.py b/BaseTools/Source/Python/Ecc/Xml/__init__.py
index f09eece5fb0e..4035345f225d 100644
--- a/BaseTools/Source/Python/Ecc/Xml/__init__.py
+++ b/BaseTools/Source/Python/Ecc/Xml/__init__.py
@@ -6,9 +6,9 @@
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
#
-# This program and the accompanying materials are licensed and made available
-# under the terms and conditions of the BSD License which accompanies this
-# distribution. The full text of the license may be found at
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py
index 175e2d2e0439..d10d12a38724 100644
--- a/BaseTools/Source/Python/Ecc/c.py
+++ b/BaseTools/Source/Python/Ecc/c.py
@@ -2348,13 +2348,13 @@ def CheckFileHeaderDoxygenComments(FullFileName):
if (len(CommentStrListTemp) <= 1):
# For Mac
CommentStrListTemp = CommentStr.split('\r')
- # Skip the content before the file header
+ # Skip the content before the file header
for CommentLine in CommentStrListTemp:
if CommentLine.strip().startswith('/** @file'):
FileStartFlag = True
if FileStartFlag == True:
CommentStrList.append(CommentLine)
-
+
ID = Result[1]
Index = 0
if CommentStrList and CommentStrList[0].strip().startswith('/** @file'):
@@ -2377,7 +2377,7 @@ def CheckFileHeaderDoxygenComments(FullFileName):
if EccGlobalData.gConfig.HeaderCheckCFileCommentStartSpacesNum == '1' or EccGlobalData.gConfig.HeaderCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
if CommentLine.startswith('/** @file') == False and CommentLine.startswith('**/') == False and CommentLine.strip() and CommentLine.startswith(' ') == False:
PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'File header comment content should start with two spaces at each line', FileTable, ID)
-
+
CommentLine = CommentLine.strip()
if CommentLine.startswith('Copyright'):
NoCopyrightFlag = False
@@ -2402,9 +2402,9 @@ def CheckFileHeaderDoxygenComments(FullFileName):
# Check whether C File header Comment's each reference at list should begin with a bullet character.
if EccGlobalData.gConfig.HeaderCheckCFileCommentReferenceFormat == '1' or EccGlobalData.gConfig.HeaderCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
if RefListFlag == True:
- if RefLine.strip() and RefLine.strip().startswith('**/') == False and RefLine.startswith(' -') == False:
- PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'Each reference on a separate line should begin with a bullet character ""-"" ', FileTable, ID)
-
+ if RefLine.strip() and RefLine.strip().startswith('**/') == False and RefLine.startswith(' -') == False:
+ PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'Each reference on a separate line should begin with a bullet character ""-"" ', FileTable, ID)
+
if NoHeaderCommentStartFlag:
PrintErrorMsg(ERROR_DOXYGEN_CHECK_FILE_HEADER, 'File header comment should begin with ""/** @file""', FileTable, ID)
return
diff --git a/BaseTools/Source/Python/Eot/CLexer.py b/BaseTools/Source/Python/Eot/CLexer.py
index a496f4344030..c7956e8ddae6 100644
--- a/BaseTools/Source/Python/Eot/CLexer.py
+++ b/BaseTools/Source/Python/Eot/CLexer.py
@@ -2,7 +2,7 @@
from antlr3 import *
from antlr3.compat import set, frozenset
-
+
## @file
# The file defines the Lexer for C source files.
#
@@ -4341,7 +4341,7 @@ class CLexer(Lexer):
u"\12\uffff"
)
-
+
DFA25_transition = [
DFA.unpack(u"\1\2\1\uffff\12\1"),
DFA.unpack(u"\1\3\1\uffff\12\1\12\uffff\1\5\1\4\1\5\35\uffff\1\5"
@@ -4479,7 +4479,7 @@ class CLexer(Lexer):
u"\u0192\uffff"
)
-
+
DFA35_transition = [
DFA.unpack(u"\6\73\2\70\1\73\2\70\22\73\1\70\1\50\1\65\1\72\1\63"
u"\1\45\1\46\1\64\1\34\1\35\1\40\1\42\1\3\1\43\1\41\1\44\1\66\11"
@@ -4943,5 +4943,5 @@ class CLexer(Lexer):
# class definition for DFA #35
DFA35 = DFA
-
+
diff --git a/BaseTools/Source/Python/Eot/CParser.py b/BaseTools/Source/Python/Eot/CParser.py
index 94711a9a378a..e817af86f702 100644
--- a/BaseTools/Source/Python/Eot/CParser.py
+++ b/BaseTools/Source/Python/Eot/CParser.py
@@ -2,7 +2,7 @@
from antlr3 import *
from antlr3.compat import set, frozenset
-
+
## @file
# The file defines the parser for C source files.
#
@@ -56,23 +56,23 @@ OctalEscape=17
# token names
tokenNames = [
- "<invalid>", "<EOR>", "<DOWN>", "<UP>",
- "IDENTIFIER", "HEX_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", "CHARACTER_LITERAL",
- "STRING_LITERAL", "FLOATING_POINT_LITERAL", "LETTER", "EscapeSequence",
- "HexDigit", "IntegerTypeSuffix", "Exponent", "FloatTypeSuffix", "OctalEscape",
- "UnicodeEscape", "WS", "BS", "UnicodeVocabulary", "COMMENT", "LINE_COMMENT",
- "LINE_COMMAND", "';'", "'typedef'", "','", "'='", "'extern'", "'static'",
- "'auto'", "'register'", "'STATIC'", "'void'", "'char'", "'short'", "'int'",
- "'long'", "'float'", "'double'", "'signed'", "'unsigned'", "'{'", "'}'",
- "'struct'", "'union'", "':'", "'enum'", "'const'", "'volatile'", "'IN'",
- "'OUT'", "'OPTIONAL'", "'CONST'", "'UNALIGNED'", "'VOLATILE'", "'GLOBAL_REMOVE_IF_UNREFERENCED'",
- "'EFIAPI'", "'EFI_BOOTSERVICE'", "'EFI_RUNTIMESERVICE'", "'PACKED'",
- "'('", "')'", "'['", "']'", "'*'", "'...'", "'+'", "'-'", "'/'", "'%'",
- "'++'", "'--'", "'sizeof'", "'.'", "'->'", "'&'", "'~'", "'!'", "'*='",
- "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'&='", "'^='", "'|='",
- "'?'", "'||'", "'&&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='",
- "'>='", "'<<'", "'>>'", "'__asm__'", "'_asm'", "'__asm'", "'case'",
- "'default'", "'if'", "'else'", "'switch'", "'while'", "'do'", "'for'",
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>",
+ "IDENTIFIER", "HEX_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", "CHARACTER_LITERAL",
+ "STRING_LITERAL", "FLOATING_POINT_LITERAL", "LETTER", "EscapeSequence",
+ "HexDigit", "IntegerTypeSuffix", "Exponent", "FloatTypeSuffix", "OctalEscape",
+ "UnicodeEscape", "WS", "BS", "UnicodeVocabulary", "COMMENT", "LINE_COMMENT",
+ "LINE_COMMAND", "';'", "'typedef'", "','", "'='", "'extern'", "'static'",
+ "'auto'", "'register'", "'STATIC'", "'void'", "'char'", "'short'", "'int'",
+ "'long'", "'float'", "'double'", "'signed'", "'unsigned'", "'{'", "'}'",
+ "'struct'", "'union'", "':'", "'enum'", "'const'", "'volatile'", "'IN'",
+ "'OUT'", "'OPTIONAL'", "'CONST'", "'UNALIGNED'", "'VOLATILE'", "'GLOBAL_REMOVE_IF_UNREFERENCED'",
+ "'EFIAPI'", "'EFI_BOOTSERVICE'", "'EFI_RUNTIMESERVICE'", "'PACKED'",
+ "'('", "')'", "'['", "']'", "'*'", "'...'", "'+'", "'-'", "'/'", "'%'",
+ "'++'", "'--'", "'sizeof'", "'.'", "'->'", "'&'", "'~'", "'!'", "'*='",
+ "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'&='", "'^='", "'|='",
+ "'?'", "'||'", "'&&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='",
+ "'>='", "'<<'", "'>>'", "'__asm__'", "'_asm'", "'__asm'", "'case'",
+ "'default'", "'if'", "'else'", "'switch'", "'while'", "'do'", "'for'",
"'goto'", "'continue'", "'break'", "'return'"
]
@@ -103,7 +103,7 @@ class CParser(Parser):
def printTokenInfo(self, line, offset, tokenText):
print str(line)+ ',' + str(offset) + ':' + str(tokenText)
-
+
def StorePredicateExpression(self, StartLine, StartOffset, EndLine, EndOffset, Text):
PredExp = CodeFragment.PredicateExpression(Text, (StartLine, StartOffset), (EndLine, EndOffset))
FileProfile.PredicateExpressionList.append(PredExp)
@@ -119,7 +119,7 @@ class CParser(Parser):
def StoreTypedefDefinition(self, StartLine, StartOffset, EndLine, EndOffset, FromText, ToText):
Tdef = CodeFragment.TypedefDefinition(FromText, ToText, (StartLine, StartOffset), (EndLine, EndOffset))
FileProfile.TypedefDefinitionList.append(Tdef)
-
+
def StoreFunctionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText, LeftBraceLine, LeftBraceOffset, DeclLine, DeclOffset):
FuncDef = CodeFragment.FunctionDefinition(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset), (LeftBraceLine, LeftBraceOffset), (DeclLine, DeclOffset))
FileProfile.FunctionDefinitionList.append(FuncDef)
@@ -127,11 +127,11 @@ class CParser(Parser):
def StoreVariableDeclaration(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText):
VarDecl = CodeFragment.VariableDeclaration(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset))
FileProfile.VariableDeclarationList.append(VarDecl)
-
+
def StoreFunctionCalling(self, StartLine, StartOffset, EndLine, EndOffset, FuncName, ParamList):
FuncCall = CodeFragment.FunctionCalling(FuncName, ParamList, (StartLine, StartOffset), (EndLine, EndOffset))
FileProfile.FunctionCallingList.append(FuncCall)
-
+
@@ -143,7 +143,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 1):
- return
+ return
# C.g:103:2: ( ( external_declaration )* )
# C.g:103:4: ( external_declaration )*
@@ -162,7 +162,7 @@ class CParser(Parser):
self.external_declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -182,7 +182,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end translation_unit
@@ -195,7 +195,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 2):
- return
+ return
# C.g:119:2: ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? )
alt3 = 3
@@ -211,7 +211,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 1, self.input)
@@ -227,7 +227,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 2, self.input)
@@ -243,7 +243,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 3, self.input)
@@ -259,7 +259,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 4, self.input)
@@ -275,7 +275,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 5, self.input)
@@ -291,7 +291,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 6, self.input)
@@ -307,7 +307,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 7, self.input)
@@ -323,7 +323,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 8, self.input)
@@ -339,7 +339,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 9, self.input)
@@ -355,7 +355,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 10, self.input)
@@ -371,7 +371,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 11, self.input)
@@ -387,7 +387,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 12, self.input)
@@ -405,7 +405,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 13, self.input)
@@ -421,7 +421,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 14, self.input)
@@ -439,7 +439,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 16, self.input)
@@ -455,7 +455,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 17, self.input)
@@ -471,7 +471,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 18, self.input)
@@ -484,7 +484,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 0, self.input)
@@ -496,7 +496,7 @@ class CParser(Parser):
self.function_definition()
self.following.pop()
if self.failed:
- return
+ return
elif alt3 == 2:
@@ -505,7 +505,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
elif alt3 == 3:
@@ -514,7 +514,7 @@ class CParser(Parser):
self.macro_statement()
self.following.pop()
if self.failed:
- return
+ return
# C.g:121:20: ( ';' )?
alt2 = 2
LA2_0 = self.input.LA(1)
@@ -525,7 +525,7 @@ class CParser(Parser):
# C.g:121:21: ';'
self.match(self.input, 25, self.FOLLOW_25_in_external_declaration126)
if self.failed:
- return
+ return
@@ -541,7 +541,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end external_declaration
@@ -568,7 +568,7 @@ class CParser(Parser):
declarator1 = None
-
+
self.function_definition_stack[-1].ModifierText = ''
self.function_definition_stack[-1].DeclText = ''
self.function_definition_stack[-1].LBLine = 0
@@ -782,7 +782,7 @@ class CParser(Parser):
if self.backtracking == 0:
-
+
if d is not None:
self.function_definition_stack[-1].ModifierText = self.input.toString(d.start,d.stop)
else:
@@ -796,7 +796,7 @@ class CParser(Parser):
else:
self.function_definition_stack[-1].LBLine = b.start.line
self.function_definition_stack[-1].LBOffset = b.start.charPositionInLine
-
+
@@ -804,7 +804,7 @@ class CParser(Parser):
retval.stop = self.input.LT(-1)
if self.backtracking == 0:
-
+
self.StoreFunctionDefinition(retval.start.line, retval.start.charPositionInLine, retval.stop.line, retval.stop.charPositionInLine, self.function_definition_stack[-1].ModifierText, self.function_definition_stack[-1].DeclText, self.function_definition_stack[-1].LBLine, self.function_definition_stack[-1].LBOffset, self.function_definition_stack[-1].DeclLine, self.function_definition_stack[-1].DeclOffset)
@@ -844,7 +844,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 4):
- return
+ return
# C.g:167:2: (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' )
alt9 = 2
@@ -857,7 +857,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("166:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' );", 9, 0, self.input)
@@ -868,7 +868,7 @@ class CParser(Parser):
a = self.input.LT(1)
self.match(self.input, 26, self.FOLLOW_26_in_declaration203)
if self.failed:
- return
+ return
# C.g:167:17: (b= declaration_specifiers )?
alt7 = 2
LA7 = self.input.LA(1)
@@ -905,7 +905,7 @@ class CParser(Parser):
b = self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
@@ -913,18 +913,18 @@ class CParser(Parser):
c = self.init_declarator_list()
self.following.pop()
if self.failed:
- return
+ return
d = self.input.LT(1)
self.match(self.input, 25, self.FOLLOW_25_in_declaration220)
if self.failed:
- return
+ return
if self.backtracking == 0:
-
+
if b is not None:
self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, self.input.toString(b.start,b.stop), self.input.toString(c.start,c.stop))
else:
self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, '', self.input.toString(c.start,c.stop))
-
+
@@ -934,7 +934,7 @@ class CParser(Parser):
s = self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# C.g:175:30: (t= init_declarator_list )?
alt8 = 2
LA8_0 = self.input.LA(1)
@@ -947,16 +947,16 @@ class CParser(Parser):
t = self.init_declarator_list()
self.following.pop()
if self.failed:
- return
+ return
e = self.input.LT(1)
self.match(self.input, 25, self.FOLLOW_25_in_declaration243)
if self.failed:
- return
+ return
if self.backtracking == 0:
-
+
if t is not None:
self.StoreVariableDeclaration(s.start.line, s.start.charPositionInLine, t.start.line, t.start.charPositionInLine, self.input.toString(s.start,s.stop), self.input.toString(t.start,t.stop))
@@ -973,7 +973,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end declaration
@@ -1184,7 +1184,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 7):
- return
+ return
# C.g:194:2: ( declarator ( '=' initializer )? )
# C.g:194:4: declarator ( '=' initializer )?
@@ -1192,7 +1192,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
# C.g:194:15: ( '=' initializer )?
alt12 = 2
LA12_0 = self.input.LA(1)
@@ -1203,12 +1203,12 @@ class CParser(Parser):
# C.g:194:16: '=' initializer
self.match(self.input, 28, self.FOLLOW_28_in_init_declarator329)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_initializer_in_init_declarator331)
self.initializer()
self.following.pop()
if self.failed:
- return
+ return
@@ -1225,7 +1225,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end init_declarator
@@ -1238,7 +1238,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 8):
- return
+ return
# C.g:198:2: ( 'extern' | 'static' | 'auto' | 'register' | 'STATIC' )
# C.g:
@@ -1250,7 +1250,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -1272,7 +1272,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end storage_class_specifier
@@ -1290,7 +1290,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 9):
- return
+ return
# C.g:206:2: ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id )
alt13 = 12
@@ -1323,7 +1323,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("205:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id );", 13, 0, self.input)
@@ -1333,63 +1333,63 @@ class CParser(Parser):
# C.g:206:4: 'void'
self.match(self.input, 34, self.FOLLOW_34_in_type_specifier376)
if self.failed:
- return
+ return
elif alt13 == 2:
# C.g:207:4: 'char'
self.match(self.input, 35, self.FOLLOW_35_in_type_specifier381)
if self.failed:
- return
+ return
elif alt13 == 3:
# C.g:208:4: 'short'
self.match(self.input, 36, self.FOLLOW_36_in_type_specifier386)
if self.failed:
- return
+ return
elif alt13 == 4:
# C.g:209:4: 'int'
self.match(self.input, 37, self.FOLLOW_37_in_type_specifier391)
if self.failed:
- return
+ return
elif alt13 == 5:
# C.g:210:4: 'long'
self.match(self.input, 38, self.FOLLOW_38_in_type_specifier396)
if self.failed:
- return
+ return
elif alt13 == 6:
# C.g:211:4: 'float'
self.match(self.input, 39, self.FOLLOW_39_in_type_specifier401)
if self.failed:
- return
+ return
elif alt13 == 7:
# C.g:212:4: 'double'
self.match(self.input, 40, self.FOLLOW_40_in_type_specifier406)
if self.failed:
- return
+ return
elif alt13 == 8:
# C.g:213:4: 'signed'
self.match(self.input, 41, self.FOLLOW_41_in_type_specifier411)
if self.failed:
- return
+ return
elif alt13 == 9:
# C.g:214:4: 'unsigned'
self.match(self.input, 42, self.FOLLOW_42_in_type_specifier416)
if self.failed:
- return
+ return
elif alt13 == 10:
@@ -1398,9 +1398,9 @@ class CParser(Parser):
s = self.struct_or_union_specifier()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
-
+
if s.stop is not None:
self.StoreStructUnionDefinition(s.start.line, s.start.charPositionInLine, s.stop.line, s.stop.charPositionInLine, self.input.toString(s.start,s.stop))
@@ -1413,9 +1413,9 @@ class CParser(Parser):
e = self.enum_specifier()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
-
+
if e.stop is not None:
self.StoreEnumerationDefinition(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -1428,7 +1428,7 @@ class CParser(Parser):
self.type_id()
self.following.pop()
if self.failed:
- return
+ return
@@ -1441,7 +1441,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end type_specifier
@@ -1454,13 +1454,13 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 10):
- return
+ return
# C.g:229:5: ( IDENTIFIER )
# C.g:229:9: IDENTIFIER
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_type_id467)
if self.failed:
- return
+ return
@@ -1474,7 +1474,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end type_id
@@ -1611,7 +1611,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 12):
- return
+ return
# C.g:240:2: ( 'struct' | 'union' )
# C.g:
@@ -1623,7 +1623,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -1645,7 +1645,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end struct_or_union
@@ -1658,7 +1658,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 13):
- return
+ return
# C.g:245:2: ( ( struct_declaration )+ )
# C.g:245:4: ( struct_declaration )+
@@ -1678,7 +1678,7 @@ class CParser(Parser):
self.struct_declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -1687,7 +1687,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(16, self.input)
raise eee
@@ -1708,7 +1708,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end struct_declaration_list
@@ -1721,7 +1721,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 14):
- return
+ return
# C.g:249:2: ( specifier_qualifier_list struct_declarator_list ';' )
# C.g:249:4: specifier_qualifier_list struct_declarator_list ';'
@@ -1729,15 +1729,15 @@ class CParser(Parser):
self.specifier_qualifier_list()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_struct_declarator_list_in_struct_declaration551)
self.struct_declarator_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_struct_declaration553)
if self.failed:
- return
+ return
@@ -1751,7 +1751,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end struct_declaration
@@ -1764,7 +1764,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 15):
- return
+ return
# C.g:253:2: ( ( type_qualifier | type_specifier )+ )
# C.g:253:4: ( type_qualifier | type_specifier )+
@@ -1831,7 +1831,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
elif alt17 == 2:
@@ -1840,7 +1840,7 @@ class CParser(Parser):
self.type_specifier()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -1849,7 +1849,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(17, self.input)
raise eee
@@ -1870,7 +1870,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end specifier_qualifier_list
@@ -1883,7 +1883,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 16):
- return
+ return
# C.g:257:2: ( struct_declarator ( ',' struct_declarator )* )
# C.g:257:4: struct_declarator ( ',' struct_declarator )*
@@ -1891,7 +1891,7 @@ class CParser(Parser):
self.struct_declarator()
self.following.pop()
if self.failed:
- return
+ return
# C.g:257:22: ( ',' struct_declarator )*
while True: #loop18
alt18 = 2
@@ -1905,12 +1905,12 @@ class CParser(Parser):
# C.g:257:23: ',' struct_declarator
self.match(self.input, 27, self.FOLLOW_27_in_struct_declarator_list587)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list589)
self.struct_declarator()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -1930,7 +1930,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end struct_declarator_list
@@ -1943,7 +1943,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 17):
- return
+ return
# C.g:261:2: ( declarator ( ':' constant_expression )? | ':' constant_expression )
alt20 = 2
@@ -1956,7 +1956,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("260:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );", 20, 0, self.input)
@@ -1968,7 +1968,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
# C.g:261:15: ( ':' constant_expression )?
alt19 = 2
LA19_0 = self.input.LA(1)
@@ -1979,12 +1979,12 @@ class CParser(Parser):
# C.g:261:16: ':' constant_expression
self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator605)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_struct_declarator607)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -1994,12 +1994,12 @@ class CParser(Parser):
# C.g:262:4: ':' constant_expression
self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator614)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_struct_declarator616)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -2012,7 +2012,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end struct_declarator
@@ -2180,7 +2180,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 19):
- return
+ return
# C.g:273:2: ( enumerator ( ',' enumerator )* )
# C.g:273:4: enumerator ( ',' enumerator )*
@@ -2188,7 +2188,7 @@ class CParser(Parser):
self.enumerator()
self.following.pop()
if self.failed:
- return
+ return
# C.g:273:15: ( ',' enumerator )*
while True: #loop24
alt24 = 2
@@ -2207,12 +2207,12 @@ class CParser(Parser):
# C.g:273:16: ',' enumerator
self.match(self.input, 27, self.FOLLOW_27_in_enumerator_list680)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_enumerator_in_enumerator_list682)
self.enumerator()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -2232,7 +2232,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end enumerator_list
@@ -2245,13 +2245,13 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 20):
- return
+ return
# C.g:277:2: ( IDENTIFIER ( '=' constant_expression )? )
# C.g:277:4: IDENTIFIER ( '=' constant_expression )?
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enumerator695)
if self.failed:
- return
+ return
# C.g:277:15: ( '=' constant_expression )?
alt25 = 2
LA25_0 = self.input.LA(1)
@@ -2262,12 +2262,12 @@ class CParser(Parser):
# C.g:277:16: '=' constant_expression
self.match(self.input, 28, self.FOLLOW_28_in_enumerator698)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_enumerator700)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -2284,7 +2284,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end enumerator
@@ -2297,7 +2297,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 21):
- return
+ return
# C.g:281:2: ( 'const' | 'volatile' | 'IN' | 'OUT' | 'OPTIONAL' | 'CONST' | 'UNALIGNED' | 'VOLATILE' | 'GLOBAL_REMOVE_IF_UNREFERENCED' | 'EFIAPI' | 'EFI_BOOTSERVICE' | 'EFI_RUNTIMESERVICE' | 'PACKED' )
# C.g:
@@ -2309,7 +2309,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -2331,7 +2331,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end type_qualifier
@@ -2486,7 +2486,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 23):
- return
+ return
# C.g:303:2: ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ )
alt34 = 2
@@ -2499,7 +2499,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("302:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ );", 34, 0, self.input)
@@ -2509,7 +2509,7 @@ class CParser(Parser):
# C.g:303:4: IDENTIFIER ( declarator_suffix )*
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_direct_declarator819)
if self.failed:
- return
+ return
# C.g:303:15: ( declarator_suffix )*
while True: #loop31
alt31 = 2
@@ -2753,7 +2753,7 @@ class CParser(Parser):
self.declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -2766,7 +2766,7 @@ class CParser(Parser):
# C.g:304:4: '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+
self.match(self.input, 62, self.FOLLOW_62_in_direct_declarator827)
if self.failed:
- return
+ return
# C.g:304:8: ( 'EFIAPI' )?
alt32 = 2
LA32_0 = self.input.LA(1)
@@ -2780,7 +2780,7 @@ class CParser(Parser):
# C.g:304:9: 'EFIAPI'
self.match(self.input, 58, self.FOLLOW_58_in_direct_declarator830)
if self.failed:
- return
+ return
@@ -2788,10 +2788,10 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_direct_declarator836)
if self.failed:
- return
+ return
# C.g:304:35: ( declarator_suffix )+
cnt33 = 0
while True: #loop33
@@ -3036,7 +3036,7 @@ class CParser(Parser):
self.declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -3045,7 +3045,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(33, self.input)
raise eee
@@ -3065,7 +3065,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end direct_declarator
@@ -3078,7 +3078,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 24):
- return
+ return
# C.g:308:2: ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' )
alt35 = 5
@@ -3094,7 +3094,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 1, self.input)
@@ -3116,7 +3116,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 29, self.input)
@@ -3125,7 +3125,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 2, self.input)
@@ -3134,7 +3134,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 0, self.input)
@@ -3144,65 +3144,65 @@ class CParser(Parser):
# C.g:308:6: '[' constant_expression ']'
self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix852)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_declarator_suffix854)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix856)
if self.failed:
- return
+ return
elif alt35 == 2:
# C.g:309:9: '[' ']'
self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix866)
if self.failed:
- return
+ return
self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix868)
if self.failed:
- return
+ return
elif alt35 == 3:
# C.g:310:9: '(' parameter_type_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix878)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_parameter_type_list_in_declarator_suffix880)
self.parameter_type_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix882)
if self.failed:
- return
+ return
elif alt35 == 4:
# C.g:311:9: '(' identifier_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix892)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_identifier_list_in_declarator_suffix894)
self.identifier_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix896)
if self.failed:
- return
+ return
elif alt35 == 5:
# C.g:312:9: '(' ')'
self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix906)
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix908)
if self.failed:
- return
+ return
@@ -3215,7 +3215,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end declarator_suffix
@@ -3228,7 +3228,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 25):
- return
+ return
# C.g:316:2: ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' )
alt38 = 3
@@ -3246,7 +3246,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 2, self.input)
@@ -3262,7 +3262,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 3, self.input)
@@ -3278,7 +3278,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 4, self.input)
@@ -3294,7 +3294,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 5, self.input)
@@ -3312,7 +3312,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 21, self.input)
@@ -3328,7 +3328,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 29, self.input)
@@ -3337,7 +3337,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 1, self.input)
@@ -3346,7 +3346,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 0, self.input)
@@ -3356,7 +3356,7 @@ class CParser(Parser):
# C.g:316:4: '*' ( type_qualifier )+ ( pointer )?
self.match(self.input, 66, self.FOLLOW_66_in_pointer919)
if self.failed:
- return
+ return
# C.g:316:8: ( type_qualifier )+
cnt36 = 0
while True: #loop36
@@ -3404,7 +3404,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -3413,7 +3413,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(36, self.input)
raise eee
@@ -3436,7 +3436,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
@@ -3446,19 +3446,19 @@ class CParser(Parser):
# C.g:317:4: '*' pointer
self.match(self.input, 66, self.FOLLOW_66_in_pointer930)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_pointer_in_pointer932)
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
elif alt38 == 3:
# C.g:318:4: '*'
self.match(self.input, 66, self.FOLLOW_66_in_pointer937)
if self.failed:
- return
+ return
@@ -3471,7 +3471,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end pointer
@@ -3484,7 +3484,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 26):
- return
+ return
# C.g:322:2: ( parameter_list ( ',' ( 'OPTIONAL' )? '...' )? )
# C.g:322:4: parameter_list ( ',' ( 'OPTIONAL' )? '...' )?
@@ -3492,7 +3492,7 @@ class CParser(Parser):
self.parameter_list()
self.following.pop()
if self.failed:
- return
+ return
# C.g:322:19: ( ',' ( 'OPTIONAL' )? '...' )?
alt40 = 2
LA40_0 = self.input.LA(1)
@@ -3503,7 +3503,7 @@ class CParser(Parser):
# C.g:322:20: ',' ( 'OPTIONAL' )? '...'
self.match(self.input, 27, self.FOLLOW_27_in_parameter_type_list951)
if self.failed:
- return
+ return
# C.g:322:24: ( 'OPTIONAL' )?
alt39 = 2
LA39_0 = self.input.LA(1)
@@ -3514,13 +3514,13 @@ class CParser(Parser):
# C.g:322:25: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_parameter_type_list954)
if self.failed:
- return
+ return
self.match(self.input, 67, self.FOLLOW_67_in_parameter_type_list958)
if self.failed:
- return
+ return
@@ -3537,7 +3537,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end parameter_type_list
@@ -3550,7 +3550,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 27):
- return
+ return
# C.g:326:2: ( parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )* )
# C.g:326:4: parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )*
@@ -3558,7 +3558,7 @@ class CParser(Parser):
self.parameter_declaration()
self.following.pop()
if self.failed:
- return
+ return
# C.g:326:26: ( ',' ( 'OPTIONAL' )? parameter_declaration )*
while True: #loop42
alt42 = 2
@@ -3584,7 +3584,7 @@ class CParser(Parser):
# C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration
self.match(self.input, 27, self.FOLLOW_27_in_parameter_list974)
if self.failed:
- return
+ return
# C.g:326:31: ( 'OPTIONAL' )?
alt41 = 2
LA41_0 = self.input.LA(1)
@@ -3598,7 +3598,7 @@ class CParser(Parser):
# C.g:326:32: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_parameter_list977)
if self.failed:
- return
+ return
@@ -3606,7 +3606,7 @@ class CParser(Parser):
self.parameter_declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -3626,7 +3626,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end parameter_list
@@ -3639,7 +3639,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 28):
- return
+ return
# C.g:330:2: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER )
alt46 = 2
@@ -3656,7 +3656,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 13, self.input)
@@ -3667,7 +3667,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 0, self.input)
@@ -3679,7 +3679,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# C.g:330:27: ( declarator | abstract_declarator )*
while True: #loop43
alt43 = 3
@@ -3763,7 +3763,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
elif alt43 == 2:
@@ -3772,7 +3772,7 @@ class CParser(Parser):
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -3789,7 +3789,7 @@ class CParser(Parser):
# C.g:330:62: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_parameter_declaration1004)
if self.failed:
- return
+ return
@@ -3812,7 +3812,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -3821,7 +3821,7 @@ class CParser(Parser):
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_parameter_declaration1016)
if self.failed:
- return
+ return
@@ -3834,7 +3834,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end parameter_declaration
@@ -3847,13 +3847,13 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 29):
- return
+ return
# C.g:336:2: ( IDENTIFIER ( ',' IDENTIFIER )* )
# C.g:336:4: IDENTIFIER ( ',' IDENTIFIER )*
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1027)
if self.failed:
- return
+ return
# C.g:337:2: ( ',' IDENTIFIER )*
while True: #loop47
alt47 = 2
@@ -3867,10 +3867,10 @@ class CParser(Parser):
# C.g:337:3: ',' IDENTIFIER
self.match(self.input, 27, self.FOLLOW_27_in_identifier_list1031)
if self.failed:
- return
+ return
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1033)
if self.failed:
- return
+ return
else:
@@ -3890,7 +3890,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end identifier_list
@@ -3903,7 +3903,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 30):
- return
+ return
# C.g:341:2: ( specifier_qualifier_list ( abstract_declarator )? | type_id )
alt49 = 2
@@ -3921,7 +3921,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 13, self.input)
@@ -3930,7 +3930,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 0, self.input)
@@ -3942,7 +3942,7 @@ class CParser(Parser):
self.specifier_qualifier_list()
self.following.pop()
if self.failed:
- return
+ return
# C.g:341:29: ( abstract_declarator )?
alt48 = 2
LA48_0 = self.input.LA(1)
@@ -3955,7 +3955,7 @@ class CParser(Parser):
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
@@ -3967,7 +3967,7 @@ class CParser(Parser):
self.type_id()
self.following.pop()
if self.failed:
- return
+ return
@@ -3980,7 +3980,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end type_name
@@ -3993,7 +3993,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 31):
- return
+ return
# C.g:346:2: ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator )
alt51 = 2
@@ -4006,7 +4006,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("345:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );", 51, 0, self.input)
@@ -4018,7 +4018,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
# C.g:346:12: ( direct_abstract_declarator )?
alt50 = 2
LA50_0 = self.input.LA(1)
@@ -4203,7 +4203,7 @@ class CParser(Parser):
self.direct_abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
@@ -4215,7 +4215,7 @@ class CParser(Parser):
self.direct_abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
@@ -4228,7 +4228,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end abstract_declarator
@@ -4241,7 +4241,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 32):
- return
+ return
# C.g:351:2: ( ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* )
# C.g:351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )*
@@ -4263,7 +4263,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 18, self.input)
@@ -4274,7 +4274,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 1, self.input)
@@ -4285,7 +4285,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 0, self.input)
@@ -4295,15 +4295,15 @@ class CParser(Parser):
# C.g:351:6: '(' abstract_declarator ')'
self.match(self.input, 62, self.FOLLOW_62_in_direct_abstract_declarator1086)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_abstract_declarator_in_direct_abstract_declarator1088)
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_direct_abstract_declarator1090)
if self.failed:
- return
+ return
elif alt52 == 2:
@@ -4312,7 +4312,7 @@ class CParser(Parser):
self.abstract_declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
@@ -4559,7 +4559,7 @@ class CParser(Parser):
self.abstract_declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -4579,7 +4579,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end direct_abstract_declarator
@@ -4592,7 +4592,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 33):
- return
+ return
# C.g:355:2: ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' )
alt54 = 4
@@ -4608,7 +4608,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 1, self.input)
@@ -4624,7 +4624,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 2, self.input)
@@ -4633,7 +4633,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 0, self.input)
@@ -4643,50 +4643,50 @@ class CParser(Parser):
# C.g:355:4: '[' ']'
self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1110)
if self.failed:
- return
+ return
self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1112)
if self.failed:
- return
+ return
elif alt54 == 2:
# C.g:356:4: '[' constant_expression ']'
self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1117)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_abstract_declarator_suffix1119)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1121)
if self.failed:
- return
+ return
elif alt54 == 3:
# C.g:357:4: '(' ')'
self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1126)
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1128)
if self.failed:
- return
+ return
elif alt54 == 4:
# C.g:358:4: '(' parameter_type_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1133)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_parameter_type_list_in_abstract_declarator_suffix1135)
self.parameter_type_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1137)
if self.failed:
- return
+ return
@@ -4699,7 +4699,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end abstract_declarator_suffix
@@ -4712,7 +4712,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 34):
- return
+ return
# C.g:363:2: ( assignment_expression | '{' initializer_list ( ',' )? '}' )
alt56 = 2
@@ -4725,7 +4725,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("361:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );", 56, 0, self.input)
@@ -4737,19 +4737,19 @@ class CParser(Parser):
self.assignment_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt56 == 2:
# C.g:364:4: '{' initializer_list ( ',' )? '}'
self.match(self.input, 43, self.FOLLOW_43_in_initializer1155)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_initializer_list_in_initializer1157)
self.initializer_list()
self.following.pop()
if self.failed:
- return
+ return
# C.g:364:25: ( ',' )?
alt55 = 2
LA55_0 = self.input.LA(1)
@@ -4760,13 +4760,13 @@ class CParser(Parser):
# C.g:0:0: ','
self.match(self.input, 27, self.FOLLOW_27_in_initializer1159)
if self.failed:
- return
+ return
self.match(self.input, 44, self.FOLLOW_44_in_initializer1162)
if self.failed:
- return
+ return
@@ -4779,7 +4779,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end initializer
@@ -4792,7 +4792,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 35):
- return
+ return
# C.g:368:2: ( initializer ( ',' initializer )* )
# C.g:368:4: initializer ( ',' initializer )*
@@ -4800,7 +4800,7 @@ class CParser(Parser):
self.initializer()
self.following.pop()
if self.failed:
- return
+ return
# C.g:368:16: ( ',' initializer )*
while True: #loop57
alt57 = 2
@@ -4819,12 +4819,12 @@ class CParser(Parser):
# C.g:368:17: ',' initializer
self.match(self.input, 27, self.FOLLOW_27_in_initializer_list1176)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_initializer_in_initializer_list1178)
self.initializer()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -4844,7 +4844,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end initializer_list
@@ -4955,7 +4955,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 37):
- return
+ return
# C.g:378:2: ( ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* )
# C.g:378:4: ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )*
@@ -4965,7 +4965,7 @@ class CParser(Parser):
self.multiplicative_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -4984,24 +4984,24 @@ class CParser(Parser):
# C.g:378:33: '+' multiplicative_expression
self.match(self.input, 68, self.FOLLOW_68_in_additive_expression1229)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1231)
self.multiplicative_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt61 == 2:
# C.g:378:65: '-' multiplicative_expression
self.match(self.input, 69, self.FOLLOW_69_in_additive_expression1235)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1237)
self.multiplicative_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -5021,7 +5021,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end additive_expression
@@ -5034,7 +5034,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 38):
- return
+ return
# C.g:382:2: ( ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* )
# C.g:382:4: ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )*
@@ -5044,7 +5044,7 @@ class CParser(Parser):
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -5063,36 +5063,36 @@ class CParser(Parser):
# C.g:382:23: '*' cast_expression
self.match(self.input, 66, self.FOLLOW_66_in_multiplicative_expression1255)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1257)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt62 == 2:
# C.g:382:45: '/' cast_expression
self.match(self.input, 70, self.FOLLOW_70_in_multiplicative_expression1261)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1263)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt62 == 3:
# C.g:382:67: '%' cast_expression
self.match(self.input, 71, self.FOLLOW_71_in_multiplicative_expression1267)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1269)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -5112,7 +5112,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end multiplicative_expression
@@ -5125,7 +5125,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 39):
- return
+ return
# C.g:386:2: ( '(' type_name ')' cast_expression | unary_expression )
alt63 = 2
@@ -5145,7 +5145,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 25, self.input)
@@ -5156,7 +5156,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 1, self.input)
@@ -5167,7 +5167,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 0, self.input)
@@ -5177,20 +5177,20 @@ class CParser(Parser):
# C.g:386:4: '(' type_name ')' cast_expression
self.match(self.input, 62, self.FOLLOW_62_in_cast_expression1282)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_type_name_in_cast_expression1284)
self.type_name()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_cast_expression1286)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_cast_expression1288)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt63 == 2:
@@ -5199,7 +5199,7 @@ class CParser(Parser):
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -5212,7 +5212,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end cast_expression
@@ -5225,7 +5225,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 40):
- return
+ return
# C.g:391:2: ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' )
alt64 = 6
@@ -5251,7 +5251,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 13, self.input)
@@ -5262,7 +5262,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 12, self.input)
@@ -5271,7 +5271,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 0, self.input)
@@ -5283,31 +5283,31 @@ class CParser(Parser):
self.postfix_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt64 == 2:
# C.g:392:4: '++' unary_expression
self.match(self.input, 72, self.FOLLOW_72_in_unary_expression1309)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_unary_expression_in_unary_expression1311)
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt64 == 3:
# C.g:393:4: '--' unary_expression
self.match(self.input, 73, self.FOLLOW_73_in_unary_expression1316)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_unary_expression_in_unary_expression1318)
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt64 == 4:
@@ -5316,42 +5316,42 @@ class CParser(Parser):
self.unary_operator()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_unary_expression1325)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt64 == 5:
# C.g:395:4: 'sizeof' unary_expression
self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1330)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_unary_expression_in_unary_expression1332)
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt64 == 6:
# C.g:396:4: 'sizeof' '(' type_name ')'
self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1337)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_unary_expression1339)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_type_name_in_unary_expression1341)
self.type_name()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_unary_expression1343)
if self.failed:
- return
+ return
@@ -5364,7 +5364,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end unary_expression
@@ -5384,13 +5384,13 @@ class CParser(Parser):
c = None
-
+
self.postfix_expression_stack[-1].FuncCallText = ''
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 41):
- return
+ return
# C.g:406:2: (p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )* )
# C.g:406:6: p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )*
@@ -5398,7 +5398,7 @@ class CParser(Parser):
p = self.primary_expression()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
self.postfix_expression_stack[-1].FuncCallText += self.input.toString(p.start,p.stop)
@@ -5460,26 +5460,26 @@ class CParser(Parser):
# C.g:407:13: '[' expression ']'
self.match(self.input, 64, self.FOLLOW_64_in_postfix_expression1383)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_postfix_expression1385)
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 65, self.FOLLOW_65_in_postfix_expression1387)
if self.failed:
- return
+ return
elif alt65 == 2:
# C.g:408:13: '(' a= ')'
self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1401)
if self.failed:
- return
+ return
a = self.input.LT(1)
self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1405)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StoreFunctionCalling(p.start.line, p.start.charPositionInLine, a.line, a.charPositionInLine, self.postfix_expression_stack[-1].FuncCallText, '')
@@ -5489,16 +5489,16 @@ class CParser(Parser):
# C.g:409:13: '(' c= argument_expression_list b= ')'
self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1420)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_argument_expression_list_in_postfix_expression1424)
c = self.argument_expression_list()
self.following.pop()
if self.failed:
- return
+ return
b = self.input.LT(1)
self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1428)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StoreFunctionCalling(p.start.line, p.start.charPositionInLine, b.line, b.charPositionInLine, self.postfix_expression_stack[-1].FuncCallText, self.input.toString(c.start,c.stop))
@@ -5508,26 +5508,26 @@ class CParser(Parser):
# C.g:410:13: '(' macro_parameter_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1444)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_macro_parameter_list_in_postfix_expression1446)
self.macro_parameter_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1448)
if self.failed:
- return
+ return
elif alt65 == 5:
# C.g:411:13: '.' x= IDENTIFIER
self.match(self.input, 75, self.FOLLOW_75_in_postfix_expression1462)
if self.failed:
- return
+ return
x = self.input.LT(1)
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1466)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.postfix_expression_stack[-1].FuncCallText += '.' + x.text
@@ -5537,11 +5537,11 @@ class CParser(Parser):
# C.g:412:13: '*' y= IDENTIFIER
self.match(self.input, 66, self.FOLLOW_66_in_postfix_expression1482)
if self.failed:
- return
+ return
y = self.input.LT(1)
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1486)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.postfix_expression_stack[-1].FuncCallText = y.text
@@ -5551,11 +5551,11 @@ class CParser(Parser):
# C.g:413:13: '->' z= IDENTIFIER
self.match(self.input, 76, self.FOLLOW_76_in_postfix_expression1502)
if self.failed:
- return
+ return
z = self.input.LT(1)
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1506)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.postfix_expression_stack[-1].FuncCallText += '->' + z.text
@@ -5565,14 +5565,14 @@ class CParser(Parser):
# C.g:414:13: '++'
self.match(self.input, 72, self.FOLLOW_72_in_postfix_expression1522)
if self.failed:
- return
+ return
elif alt65 == 9:
# C.g:415:13: '--'
self.match(self.input, 73, self.FOLLOW_73_in_postfix_expression1536)
if self.failed:
- return
+ return
else:
@@ -5593,7 +5593,7 @@ class CParser(Parser):
self.postfix_expression_stack.pop()
pass
- return
+ return
# $ANTLR end postfix_expression
@@ -5606,7 +5606,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 42):
- return
+ return
# C.g:420:2: ( parameter_declaration ( ',' parameter_declaration )* )
# C.g:420:4: parameter_declaration ( ',' parameter_declaration )*
@@ -5614,7 +5614,7 @@ class CParser(Parser):
self.parameter_declaration()
self.following.pop()
if self.failed:
- return
+ return
# C.g:420:26: ( ',' parameter_declaration )*
while True: #loop66
alt66 = 2
@@ -5628,12 +5628,12 @@ class CParser(Parser):
# C.g:420:27: ',' parameter_declaration
self.match(self.input, 27, self.FOLLOW_27_in_macro_parameter_list1562)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_parameter_declaration_in_macro_parameter_list1564)
self.parameter_declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -5653,7 +5653,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end macro_parameter_list
@@ -5666,7 +5666,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 43):
- return
+ return
# C.g:424:2: ( '&' | '*' | '+' | '-' | '~' | '!' )
# C.g:
@@ -5678,7 +5678,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -5700,7 +5700,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end unary_operator
@@ -5811,7 +5811,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 45):
- return
+ return
# C.g:439:5: ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL )
alt72 = 6
@@ -5831,7 +5831,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("438:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL );", 72, 0, self.input)
@@ -5841,28 +5841,28 @@ class CParser(Parser):
# C.g:439:9: HEX_LITERAL
self.match(self.input, HEX_LITERAL, self.FOLLOW_HEX_LITERAL_in_constant1643)
if self.failed:
- return
+ return
elif alt72 == 2:
# C.g:440:9: OCTAL_LITERAL
self.match(self.input, OCTAL_LITERAL, self.FOLLOW_OCTAL_LITERAL_in_constant1653)
if self.failed:
- return
+ return
elif alt72 == 3:
# C.g:441:9: DECIMAL_LITERAL
self.match(self.input, DECIMAL_LITERAL, self.FOLLOW_DECIMAL_LITERAL_in_constant1663)
if self.failed:
- return
+ return
elif alt72 == 4:
# C.g:442:7: CHARACTER_LITERAL
self.match(self.input, CHARACTER_LITERAL, self.FOLLOW_CHARACTER_LITERAL_in_constant1671)
if self.failed:
- return
+ return
elif alt72 == 5:
@@ -5906,7 +5906,7 @@ class CParser(Parser):
# C.g:0:0: IDENTIFIER
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1680)
if self.failed:
- return
+ return
else:
@@ -5932,7 +5932,7 @@ class CParser(Parser):
# C.g:0:0: STRING_LITERAL
self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_constant1683)
if self.failed:
- return
+ return
else:
@@ -5941,7 +5941,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(69, self.input)
raise eee
@@ -5957,7 +5957,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(70, self.input)
raise eee
@@ -5978,7 +5978,7 @@ class CParser(Parser):
# C.g:0:0: IDENTIFIER
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1688)
if self.failed:
- return
+ return
else:
@@ -5991,7 +5991,7 @@ class CParser(Parser):
# C.g:444:9: FLOATING_POINT_LITERAL
self.match(self.input, FLOATING_POINT_LITERAL, self.FOLLOW_FLOATING_POINT_LITERAL_in_constant1699)
if self.failed:
- return
+ return
@@ -6004,7 +6004,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end constant
@@ -6087,7 +6087,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 47):
- return
+ return
# C.g:454:2: ( conditional_expression )
# C.g:454:4: conditional_expression
@@ -6095,7 +6095,7 @@ class CParser(Parser):
self.conditional_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -6109,7 +6109,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end constant_expression
@@ -6122,7 +6122,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 48):
- return
+ return
# C.g:458:2: ( lvalue assignment_operator assignment_expression | conditional_expression )
alt74 = 2
@@ -6139,7 +6139,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 13, self.input)
@@ -6155,7 +6155,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 14, self.input)
@@ -6171,7 +6171,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 15, self.input)
@@ -6187,7 +6187,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 16, self.input)
@@ -6203,7 +6203,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 17, self.input)
@@ -6219,7 +6219,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 18, self.input)
@@ -6235,7 +6235,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 19, self.input)
@@ -6253,7 +6253,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 21, self.input)
@@ -6269,7 +6269,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 22, self.input)
@@ -6280,7 +6280,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 1, self.input)
@@ -6298,7 +6298,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 44, self.input)
@@ -6314,7 +6314,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 45, self.input)
@@ -6330,7 +6330,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 46, self.input)
@@ -6346,7 +6346,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 47, self.input)
@@ -6362,7 +6362,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 48, self.input)
@@ -6378,7 +6378,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 49, self.input)
@@ -6394,7 +6394,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 50, self.input)
@@ -6407,7 +6407,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 2, self.input)
@@ -6425,7 +6425,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 73, self.input)
@@ -6441,7 +6441,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 74, self.input)
@@ -6457,7 +6457,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 75, self.input)
@@ -6473,7 +6473,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 76, self.input)
@@ -6489,7 +6489,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 77, self.input)
@@ -6505,7 +6505,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 78, self.input)
@@ -6521,7 +6521,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 79, self.input)
@@ -6534,7 +6534,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 3, self.input)
@@ -6552,7 +6552,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 102, self.input)
@@ -6568,7 +6568,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 103, self.input)
@@ -6584,7 +6584,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 104, self.input)
@@ -6600,7 +6600,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 105, self.input)
@@ -6616,7 +6616,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 106, self.input)
@@ -6632,7 +6632,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 107, self.input)
@@ -6648,7 +6648,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 108, self.input)
@@ -6661,7 +6661,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 4, self.input)
@@ -6679,7 +6679,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 131, self.input)
@@ -6695,7 +6695,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 132, self.input)
@@ -6711,7 +6711,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 133, self.input)
@@ -6727,7 +6727,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 134, self.input)
@@ -6743,7 +6743,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 135, self.input)
@@ -6759,7 +6759,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 136, self.input)
@@ -6775,7 +6775,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 137, self.input)
@@ -6788,7 +6788,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 5, self.input)
@@ -6806,7 +6806,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 160, self.input)
@@ -6822,7 +6822,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 161, self.input)
@@ -6838,7 +6838,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 162, self.input)
@@ -6854,7 +6854,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 163, self.input)
@@ -6870,7 +6870,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 164, self.input)
@@ -6886,7 +6886,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 165, self.input)
@@ -6902,7 +6902,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 166, self.input)
@@ -6918,7 +6918,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 167, self.input)
@@ -6936,7 +6936,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 189, self.input)
@@ -6947,7 +6947,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 6, self.input)
@@ -6965,7 +6965,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 191, self.input)
@@ -6981,7 +6981,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 192, self.input)
@@ -6997,7 +6997,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 193, self.input)
@@ -7013,7 +7013,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 194, self.input)
@@ -7029,7 +7029,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 195, self.input)
@@ -7045,7 +7045,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 196, self.input)
@@ -7061,7 +7061,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 197, self.input)
@@ -7074,7 +7074,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 7, self.input)
@@ -7092,7 +7092,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 220, self.input)
@@ -7108,7 +7108,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 221, self.input)
@@ -7124,7 +7124,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 222, self.input)
@@ -7140,7 +7140,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 223, self.input)
@@ -7156,7 +7156,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 224, self.input)
@@ -7172,7 +7172,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 225, self.input)
@@ -7188,7 +7188,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 226, self.input)
@@ -7204,7 +7204,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 227, self.input)
@@ -7220,7 +7220,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 228, self.input)
@@ -7236,7 +7236,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 229, self.input)
@@ -7252,7 +7252,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 230, self.input)
@@ -7268,7 +7268,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 231, self.input)
@@ -7279,7 +7279,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 8, self.input)
@@ -7297,7 +7297,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 244, self.input)
@@ -7313,7 +7313,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 245, self.input)
@@ -7329,7 +7329,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 246, self.input)
@@ -7345,7 +7345,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 247, self.input)
@@ -7361,7 +7361,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 248, self.input)
@@ -7377,7 +7377,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 249, self.input)
@@ -7393,7 +7393,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 250, self.input)
@@ -7409,7 +7409,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 251, self.input)
@@ -7425,7 +7425,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 252, self.input)
@@ -7441,7 +7441,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 253, self.input)
@@ -7457,7 +7457,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 254, self.input)
@@ -7473,7 +7473,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 255, self.input)
@@ -7482,7 +7482,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 9, self.input)
@@ -7500,7 +7500,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 256, self.input)
@@ -7516,7 +7516,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 257, self.input)
@@ -7532,7 +7532,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 258, self.input)
@@ -7548,7 +7548,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 259, self.input)
@@ -7564,7 +7564,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 260, self.input)
@@ -7580,7 +7580,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 261, self.input)
@@ -7596,7 +7596,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 262, self.input)
@@ -7612,7 +7612,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 263, self.input)
@@ -7628,7 +7628,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 264, self.input)
@@ -7644,7 +7644,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 265, self.input)
@@ -7660,7 +7660,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 266, self.input)
@@ -7676,7 +7676,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 267, self.input)
@@ -7685,7 +7685,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 10, self.input)
@@ -7703,7 +7703,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 268, self.input)
@@ -7719,7 +7719,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 269, self.input)
@@ -7735,7 +7735,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 270, self.input)
@@ -7751,7 +7751,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 271, self.input)
@@ -7767,7 +7767,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 272, self.input)
@@ -7783,7 +7783,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 273, self.input)
@@ -7799,7 +7799,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 274, self.input)
@@ -7815,7 +7815,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 275, self.input)
@@ -7831,7 +7831,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 276, self.input)
@@ -7847,7 +7847,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 277, self.input)
@@ -7863,7 +7863,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 278, self.input)
@@ -7879,7 +7879,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 279, self.input)
@@ -7888,7 +7888,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 11, self.input)
@@ -7906,7 +7906,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 280, self.input)
@@ -7922,7 +7922,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 281, self.input)
@@ -7938,7 +7938,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 282, self.input)
@@ -7954,7 +7954,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 283, self.input)
@@ -7970,7 +7970,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 284, self.input)
@@ -7986,7 +7986,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 285, self.input)
@@ -8002,7 +8002,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 286, self.input)
@@ -8018,7 +8018,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 287, self.input)
@@ -8034,7 +8034,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 288, self.input)
@@ -8050,7 +8050,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 289, self.input)
@@ -8066,7 +8066,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 290, self.input)
@@ -8082,7 +8082,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 291, self.input)
@@ -8091,7 +8091,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 12, self.input)
@@ -8100,7 +8100,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 0, self.input)
@@ -8112,17 +8112,17 @@ class CParser(Parser):
self.lvalue()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_assignment_operator_in_assignment_expression1746)
self.assignment_operator()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_assignment_expression_in_assignment_expression1748)
self.assignment_expression()
self.following.pop()
if self.failed:
- return
+ return
elif alt74 == 2:
@@ -8131,7 +8131,7 @@ class CParser(Parser):
self.conditional_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -8144,7 +8144,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end assignment_expression
@@ -8157,7 +8157,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 49):
- return
+ return
# C.g:463:2: ( unary_expression )
# C.g:463:4: unary_expression
@@ -8165,7 +8165,7 @@ class CParser(Parser):
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
@@ -8179,7 +8179,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end lvalue
@@ -8192,7 +8192,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 50):
- return
+ return
# C.g:467:2: ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' )
# C.g:
@@ -8204,7 +8204,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -8226,7 +8226,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end assignment_operator
@@ -8242,7 +8242,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 51):
- return
+ return
# C.g:481:2: (e= logical_or_expression ( '?' expression ':' conditional_expression )? )
# C.g:481:4: e= logical_or_expression ( '?' expression ':' conditional_expression )?
@@ -8250,7 +8250,7 @@ class CParser(Parser):
e = self.logical_or_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:481:28: ( '?' expression ':' conditional_expression )?
alt75 = 2
LA75_0 = self.input.LA(1)
@@ -8261,20 +8261,20 @@ class CParser(Parser):
# C.g:481:29: '?' expression ':' conditional_expression
self.match(self.input, 90, self.FOLLOW_90_in_conditional_expression1842)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_conditional_expression1844)
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 47, self.FOLLOW_47_in_conditional_expression1846)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_conditional_expression_in_conditional_expression1848)
self.conditional_expression()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -8294,7 +8294,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end conditional_expression
@@ -8377,7 +8377,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 53):
- return
+ return
# C.g:489:2: ( inclusive_or_expression ( '&&' inclusive_or_expression )* )
# C.g:489:4: inclusive_or_expression ( '&&' inclusive_or_expression )*
@@ -8385,7 +8385,7 @@ class CParser(Parser):
self.inclusive_or_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:489:28: ( '&&' inclusive_or_expression )*
while True: #loop77
alt77 = 2
@@ -8399,12 +8399,12 @@ class CParser(Parser):
# C.g:489:29: '&&' inclusive_or_expression
self.match(self.input, 92, self.FOLLOW_92_in_logical_and_expression1884)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1886)
self.inclusive_or_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8424,7 +8424,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end logical_and_expression
@@ -8437,7 +8437,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 54):
- return
+ return
# C.g:493:2: ( exclusive_or_expression ( '|' exclusive_or_expression )* )
# C.g:493:4: exclusive_or_expression ( '|' exclusive_or_expression )*
@@ -8445,7 +8445,7 @@ class CParser(Parser):
self.exclusive_or_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:493:28: ( '|' exclusive_or_expression )*
while True: #loop78
alt78 = 2
@@ -8459,12 +8459,12 @@ class CParser(Parser):
# C.g:493:29: '|' exclusive_or_expression
self.match(self.input, 93, self.FOLLOW_93_in_inclusive_or_expression1902)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1904)
self.exclusive_or_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8484,7 +8484,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end inclusive_or_expression
@@ -8497,7 +8497,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 55):
- return
+ return
# C.g:497:2: ( and_expression ( '^' and_expression )* )
# C.g:497:4: and_expression ( '^' and_expression )*
@@ -8505,7 +8505,7 @@ class CParser(Parser):
self.and_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:497:19: ( '^' and_expression )*
while True: #loop79
alt79 = 2
@@ -8519,12 +8519,12 @@ class CParser(Parser):
# C.g:497:20: '^' and_expression
self.match(self.input, 94, self.FOLLOW_94_in_exclusive_or_expression1920)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1922)
self.and_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8544,7 +8544,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end exclusive_or_expression
@@ -8557,7 +8557,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 56):
- return
+ return
# C.g:501:2: ( equality_expression ( '&' equality_expression )* )
# C.g:501:4: equality_expression ( '&' equality_expression )*
@@ -8565,7 +8565,7 @@ class CParser(Parser):
self.equality_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:501:24: ( '&' equality_expression )*
while True: #loop80
alt80 = 2
@@ -8579,12 +8579,12 @@ class CParser(Parser):
# C.g:501:25: '&' equality_expression
self.match(self.input, 77, self.FOLLOW_77_in_and_expression1938)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_equality_expression_in_and_expression1940)
self.equality_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8604,7 +8604,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end and_expression
@@ -8617,7 +8617,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 57):
- return
+ return
# C.g:504:2: ( relational_expression ( ( '==' | '!=' ) relational_expression )* )
# C.g:504:4: relational_expression ( ( '==' | '!=' ) relational_expression )*
@@ -8625,7 +8625,7 @@ class CParser(Parser):
self.relational_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:504:26: ( ( '==' | '!=' ) relational_expression )*
while True: #loop81
alt81 = 2
@@ -8645,7 +8645,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -8658,7 +8658,7 @@ class CParser(Parser):
self.relational_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8678,7 +8678,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end equality_expression
@@ -8691,7 +8691,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 58):
- return
+ return
# C.g:508:2: ( shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* )
# C.g:508:4: shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*
@@ -8699,7 +8699,7 @@ class CParser(Parser):
self.shift_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:508:21: ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*
while True: #loop82
alt82 = 2
@@ -8719,7 +8719,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -8732,7 +8732,7 @@ class CParser(Parser):
self.shift_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8752,7 +8752,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end relational_expression
@@ -8765,7 +8765,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 59):
- return
+ return
# C.g:512:2: ( additive_expression ( ( '<<' | '>>' ) additive_expression )* )
# C.g:512:4: additive_expression ( ( '<<' | '>>' ) additive_expression )*
@@ -8773,7 +8773,7 @@ class CParser(Parser):
self.additive_expression()
self.following.pop()
if self.failed:
- return
+ return
# C.g:512:24: ( ( '<<' | '>>' ) additive_expression )*
while True: #loop83
alt83 = 2
@@ -8793,7 +8793,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -8806,7 +8806,7 @@ class CParser(Parser):
self.additive_expression()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -8826,7 +8826,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end shift_expression
@@ -8839,7 +8839,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 60):
- return
+ return
# C.g:518:2: ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration )
alt84 = 11
@@ -8860,7 +8860,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 43, self.input)
@@ -8880,7 +8880,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 47, self.input)
@@ -8896,7 +8896,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 53, self.input)
@@ -8912,7 +8912,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 68, self.input)
@@ -8923,7 +8923,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 1, self.input)
@@ -8952,7 +8952,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 0, self.input)
@@ -8964,7 +8964,7 @@ class CParser(Parser):
self.labeled_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 2:
@@ -8973,7 +8973,7 @@ class CParser(Parser):
self.compound_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 3:
@@ -8982,7 +8982,7 @@ class CParser(Parser):
self.expression_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 4:
@@ -8991,7 +8991,7 @@ class CParser(Parser):
self.selection_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 5:
@@ -9000,7 +9000,7 @@ class CParser(Parser):
self.iteration_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 6:
@@ -9009,7 +9009,7 @@ class CParser(Parser):
self.jump_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 7:
@@ -9018,7 +9018,7 @@ class CParser(Parser):
self.macro_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 8:
@@ -9027,7 +9027,7 @@ class CParser(Parser):
self.asm2_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 9:
@@ -9036,7 +9036,7 @@ class CParser(Parser):
self.asm1_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 10:
@@ -9045,7 +9045,7 @@ class CParser(Parser):
self.asm_statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt84 == 11:
@@ -9054,7 +9054,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
@@ -9067,7 +9067,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end statement
@@ -9080,7 +9080,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 61):
- return
+ return
# C.g:532:2: ( ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';' )
# C.g:532:4: ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';'
@@ -9094,16 +9094,16 @@ class CParser(Parser):
# C.g:0:0: '__asm__'
self.match(self.input, 103, self.FOLLOW_103_in_asm2_statement2086)
if self.failed:
- return
+ return
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_asm2_statement2089)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_asm2_statement2091)
if self.failed:
- return
+ return
# C.g:532:30: (~ ( ';' ) )*
while True: #loop86
alt86 = 2
@@ -9130,7 +9130,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -9147,10 +9147,10 @@ class CParser(Parser):
self.match(self.input, 63, self.FOLLOW_63_in_asm2_statement2101)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_asm2_statement2103)
if self.failed:
- return
+ return
@@ -9164,7 +9164,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end asm2_statement
@@ -9177,16 +9177,16 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 62):
- return
+ return
# C.g:536:2: ( '_asm' '{' (~ ( '}' ) )* '}' )
# C.g:536:4: '_asm' '{' (~ ( '}' ) )* '}'
self.match(self.input, 104, self.FOLLOW_104_in_asm1_statement2115)
if self.failed:
- return
+ return
self.match(self.input, 43, self.FOLLOW_43_in_asm1_statement2117)
if self.failed:
- return
+ return
# C.g:536:15: (~ ( '}' ) )*
while True: #loop87
alt87 = 2
@@ -9206,7 +9206,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -9223,7 +9223,7 @@ class CParser(Parser):
self.match(self.input, 44, self.FOLLOW_44_in_asm1_statement2127)
if self.failed:
- return
+ return
@@ -9237,7 +9237,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end asm1_statement
@@ -9250,16 +9250,16 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 63):
- return
+ return
# C.g:540:2: ( '__asm' '{' (~ ( '}' ) )* '}' )
# C.g:540:4: '__asm' '{' (~ ( '}' ) )* '}'
self.match(self.input, 105, self.FOLLOW_105_in_asm_statement2138)
if self.failed:
- return
+ return
self.match(self.input, 43, self.FOLLOW_43_in_asm_statement2140)
if self.failed:
- return
+ return
# C.g:540:16: (~ ( '}' ) )*
while True: #loop88
alt88 = 2
@@ -9279,7 +9279,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
mse = MismatchedSetException(None, self.input)
self.recoverFromMismatchedSet(
@@ -9296,7 +9296,7 @@ class CParser(Parser):
self.match(self.input, 44, self.FOLLOW_44_in_asm_statement2150)
if self.failed:
- return
+ return
@@ -9310,7 +9310,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end asm_statement
@@ -9323,16 +9323,16 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 64):
- return
+ return
# C.g:544:2: ( IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')' )
# C.g:544:4: IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')'
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_macro_statement2162)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_macro_statement2164)
if self.failed:
- return
+ return
# C.g:544:19: ( declaration )*
while True: #loop89
alt89 = 2
@@ -11234,7 +11234,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -12440,7 +12440,7 @@ class CParser(Parser):
self.statement_list()
self.following.pop()
if self.failed:
- return
+ return
@@ -12456,13 +12456,13 @@ class CParser(Parser):
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_macro_statement2176)
if self.failed:
- return
+ return
@@ -12476,7 +12476,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end macro_statement
@@ -12489,7 +12489,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 65):
- return
+ return
# C.g:548:2: ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement )
alt92 = 3
@@ -12503,7 +12503,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("547:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );", 92, 0, self.input)
@@ -12513,50 +12513,50 @@ class CParser(Parser):
# C.g:548:4: IDENTIFIER ':' statement
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_labeled_statement2188)
if self.failed:
- return
+ return
self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2190)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_labeled_statement2192)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt92 == 2:
# C.g:549:4: 'case' constant_expression ':' statement
self.match(self.input, 106, self.FOLLOW_106_in_labeled_statement2197)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_constant_expression_in_labeled_statement2199)
self.constant_expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2201)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_labeled_statement2203)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
elif alt92 == 3:
# C.g:550:4: 'default' ':' statement
self.match(self.input, 107, self.FOLLOW_107_in_labeled_statement2208)
if self.failed:
- return
+ return
self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2210)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_labeled_statement2212)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
@@ -12569,7 +12569,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end labeled_statement
@@ -14552,7 +14552,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 67):
- return
+ return
# C.g:558:2: ( ( statement )+ )
# C.g:558:4: ( statement )+
@@ -16230,7 +16230,7 @@ class CParser(Parser):
self.statement()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -16239,7 +16239,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(95, self.input)
raise eee
@@ -16260,7 +16260,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end statement_list
@@ -16347,7 +16347,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 69):
- return
+ return
# C.g:567:2: ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement )
alt98 = 2
@@ -16360,7 +16360,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("566:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );", 98, 0, self.input)
@@ -16370,18 +16370,18 @@ class CParser(Parser):
# C.g:567:4: 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )?
self.match(self.input, 108, self.FOLLOW_108_in_selection_statement2272)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2274)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_selection_statement2278)
e = self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2280)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -16389,7 +16389,7 @@ class CParser(Parser):
self.statement()
self.following.pop()
if self.failed:
- return
+ return
# C.g:567:167: ( options {k=1; backtrack=false; } : 'else' statement )?
alt97 = 2
LA97_0 = self.input.LA(1)
@@ -16400,12 +16400,12 @@ class CParser(Parser):
# C.g:567:200: 'else' statement
self.match(self.input, 109, self.FOLLOW_109_in_selection_statement2299)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_selection_statement2301)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
@@ -16415,23 +16415,23 @@ class CParser(Parser):
# C.g:568:4: 'switch' '(' expression ')' statement
self.match(self.input, 110, self.FOLLOW_110_in_selection_statement2308)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2310)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_selection_statement2312)
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2314)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_selection_statement2316)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
@@ -16444,7 +16444,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end selection_statement
@@ -16460,7 +16460,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 70):
- return
+ return
# C.g:572:2: ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement )
alt100 = 3
@@ -16474,7 +16474,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("571:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement );", 100, 0, self.input)
@@ -16484,23 +16484,23 @@ class CParser(Parser):
# C.g:572:4: 'while' '(' e= expression ')' statement
self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2327)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2329)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_iteration_statement2333)
e = self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2335)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_iteration_statement2337)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -16510,29 +16510,29 @@ class CParser(Parser):
# C.g:573:4: 'do' statement 'while' '(' e= expression ')' ';'
self.match(self.input, 112, self.FOLLOW_112_in_iteration_statement2344)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_iteration_statement2346)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2348)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2350)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_iteration_statement2354)
e = self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2356)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_iteration_statement2358)
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -16542,20 +16542,20 @@ class CParser(Parser):
# C.g:574:4: 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement
self.match(self.input, 113, self.FOLLOW_113_in_iteration_statement2365)
if self.failed:
- return
+ return
self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2367)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2369)
self.expression_statement()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2373)
e = self.expression_statement()
self.following.pop()
if self.failed:
- return
+ return
# C.g:574:58: ( expression )?
alt99 = 2
LA99_0 = self.input.LA(1)
@@ -16568,18 +16568,18 @@ class CParser(Parser):
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2378)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_statement_in_iteration_statement2380)
self.statement()
self.following.pop()
if self.failed:
- return
+ return
if self.backtracking == 0:
self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop))
@@ -16595,7 +16595,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end iteration_statement
@@ -16608,7 +16608,7 @@ class CParser(Parser):
try:
try:
if self.backtracking > 0 and self.alreadyParsedRule(self.input, 71):
- return
+ return
# C.g:578:2: ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' )
alt101 = 5
@@ -16629,7 +16629,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 4, self.input)
@@ -16638,7 +16638,7 @@ class CParser(Parser):
else:
if self.backtracking > 0:
self.failed = True
- return
+ return
nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 0, self.input)
@@ -16648,58 +16648,58 @@ class CParser(Parser):
# C.g:578:4: 'goto' IDENTIFIER ';'
self.match(self.input, 114, self.FOLLOW_114_in_jump_statement2393)
if self.failed:
- return
+ return
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_jump_statement2395)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2397)
if self.failed:
- return
+ return
elif alt101 == 2:
# C.g:579:4: 'continue' ';'
self.match(self.input, 115, self.FOLLOW_115_in_jump_statement2402)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2404)
if self.failed:
- return
+ return
elif alt101 == 3:
# C.g:580:4: 'break' ';'
self.match(self.input, 116, self.FOLLOW_116_in_jump_statement2409)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2411)
if self.failed:
- return
+ return
elif alt101 == 4:
# C.g:581:4: 'return' ';'
self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2416)
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2418)
if self.failed:
- return
+ return
elif alt101 == 5:
# C.g:582:4: 'return' expression ';'
self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2423)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_expression_in_jump_statement2425)
self.expression()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2427)
if self.failed:
- return
+ return
@@ -16712,7 +16712,7 @@ class CParser(Parser):
pass
- return
+ return
# $ANTLR end jump_statement
@@ -16724,7 +16724,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred2
@@ -16855,7 +16855,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
@@ -16863,7 +16863,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
# C.g:119:41: ( declaration )*
while True: #loop103
alt103 = 2
@@ -16879,7 +16879,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -16888,7 +16888,7 @@ class CParser(Parser):
self.match(self.input, 43, self.FOLLOW_43_in_synpred4108)
if self.failed:
- return
+ return
# $ANTLR end synpred4
@@ -16903,7 +16903,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred5
@@ -16918,7 +16918,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred7
@@ -16933,7 +16933,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred10
@@ -16948,7 +16948,7 @@ class CParser(Parser):
self.type_specifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred14
@@ -16963,7 +16963,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred15
@@ -16978,7 +16978,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred33
@@ -16991,7 +16991,7 @@ class CParser(Parser):
# C.g:225:5: IDENTIFIER ( type_qualifier )* declarator
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred34442)
if self.failed:
- return
+ return
# C.g:225:16: ( type_qualifier )*
while True: #loop106
alt106 = 2
@@ -17026,7 +17026,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -17037,7 +17037,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred34
@@ -17052,7 +17052,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred39
@@ -17067,7 +17067,7 @@ class CParser(Parser):
self.type_specifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred40
@@ -17090,7 +17090,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
@@ -17104,7 +17104,7 @@ class CParser(Parser):
# C.g:297:14: 'EFIAPI'
self.match(self.input, 58, self.FOLLOW_58_in_synpred66788)
if self.failed:
- return
+ return
@@ -17118,7 +17118,7 @@ class CParser(Parser):
# C.g:297:26: 'EFI_BOOTSERVICE'
self.match(self.input, 59, self.FOLLOW_59_in_synpred66793)
if self.failed:
- return
+ return
@@ -17132,7 +17132,7 @@ class CParser(Parser):
# C.g:297:47: 'EFI_RUNTIMESERVICE'
self.match(self.input, 60, self.FOLLOW_60_in_synpred66798)
if self.failed:
- return
+ return
@@ -17140,7 +17140,7 @@ class CParser(Parser):
self.direct_declarator()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred66
@@ -17155,7 +17155,7 @@ class CParser(Parser):
self.declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred67
@@ -17168,7 +17168,7 @@ class CParser(Parser):
# C.g:304:9: 'EFIAPI'
self.match(self.input, 58, self.FOLLOW_58_in_synpred69830)
if self.failed:
- return
+ return
# $ANTLR end synpred69
@@ -17183,7 +17183,7 @@ class CParser(Parser):
self.declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred70
@@ -17196,15 +17196,15 @@ class CParser(Parser):
# C.g:310:9: '(' parameter_type_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_synpred73878)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_parameter_type_list_in_synpred73880)
self.parameter_type_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred73882)
if self.failed:
- return
+ return
# $ANTLR end synpred73
@@ -17217,15 +17217,15 @@ class CParser(Parser):
# C.g:311:9: '(' identifier_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_synpred74892)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_identifier_list_in_synpred74894)
self.identifier_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred74896)
if self.failed:
- return
+ return
# $ANTLR end synpred74
@@ -17240,7 +17240,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred75
@@ -17255,7 +17255,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred76
@@ -17268,7 +17268,7 @@ class CParser(Parser):
# C.g:316:4: '*' ( type_qualifier )+ ( pointer )?
self.match(self.input, 66, self.FOLLOW_66_in_synpred77919)
if self.failed:
- return
+ return
# C.g:316:8: ( type_qualifier )+
cnt116 = 0
while True: #loop116
@@ -17285,7 +17285,7 @@ class CParser(Parser):
self.type_qualifier()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -17294,7 +17294,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(116, self.input)
raise eee
@@ -17314,7 +17314,7 @@ class CParser(Parser):
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
@@ -17330,12 +17330,12 @@ class CParser(Parser):
# C.g:317:4: '*' pointer
self.match(self.input, 66, self.FOLLOW_66_in_synpred78930)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_pointer_in_synpred78932)
self.pointer()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred78
@@ -17348,7 +17348,7 @@ class CParser(Parser):
# C.g:326:32: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_synpred81977)
if self.failed:
- return
+ return
# $ANTLR end synpred81
@@ -17361,7 +17361,7 @@ class CParser(Parser):
# C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration
self.match(self.input, 27, self.FOLLOW_27_in_synpred82974)
if self.failed:
- return
+ return
# C.g:326:31: ( 'OPTIONAL' )?
alt119 = 2
LA119_0 = self.input.LA(1)
@@ -17375,7 +17375,7 @@ class CParser(Parser):
# C.g:326:32: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_synpred82977)
if self.failed:
- return
+ return
@@ -17383,7 +17383,7 @@ class CParser(Parser):
self.parameter_declaration()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred82
@@ -17398,7 +17398,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred83
@@ -17413,7 +17413,7 @@ class CParser(Parser):
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred84
@@ -17428,7 +17428,7 @@ class CParser(Parser):
self.declaration_specifiers()
self.following.pop()
if self.failed:
- return
+ return
# C.g:330:27: ( declarator | abstract_declarator )*
while True: #loop120
alt120 = 3
@@ -17512,7 +17512,7 @@ class CParser(Parser):
self.declarator()
self.following.pop()
if self.failed:
- return
+ return
elif alt120 == 2:
@@ -17521,7 +17521,7 @@ class CParser(Parser):
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
else:
@@ -17538,7 +17538,7 @@ class CParser(Parser):
# C.g:330:62: 'OPTIONAL'
self.match(self.input, 53, self.FOLLOW_53_in_synpred861004)
if self.failed:
- return
+ return
@@ -17556,7 +17556,7 @@ class CParser(Parser):
self.specifier_qualifier_list()
self.following.pop()
if self.failed:
- return
+ return
# C.g:341:29: ( abstract_declarator )?
alt122 = 2
LA122_0 = self.input.LA(1)
@@ -17569,7 +17569,7 @@ class CParser(Parser):
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
@@ -17587,7 +17587,7 @@ class CParser(Parser):
self.direct_abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred91
@@ -17600,15 +17600,15 @@ class CParser(Parser):
# C.g:351:6: '(' abstract_declarator ')'
self.match(self.input, 62, self.FOLLOW_62_in_synpred931086)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_abstract_declarator_in_synpred931088)
self.abstract_declarator()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred931090)
if self.failed:
- return
+ return
# $ANTLR end synpred93
@@ -17623,7 +17623,7 @@ class CParser(Parser):
self.abstract_declarator_suffix()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred94
@@ -17636,20 +17636,20 @@ class CParser(Parser):
# C.g:386:4: '(' type_name ')' cast_expression
self.match(self.input, 62, self.FOLLOW_62_in_synpred1091282)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_type_name_in_synpred1091284)
self.type_name()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred1091286)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_cast_expression_in_synpred1091288)
self.cast_expression()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred109
@@ -17662,12 +17662,12 @@ class CParser(Parser):
# C.g:395:4: 'sizeof' unary_expression
self.match(self.input, 74, self.FOLLOW_74_in_synpred1141330)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_unary_expression_in_synpred1141332)
self.unary_expression()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred114
@@ -17680,15 +17680,15 @@ class CParser(Parser):
# C.g:409:13: '(' argument_expression_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_synpred1171420)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_argument_expression_list_in_synpred1171424)
self.argument_expression_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred1171428)
if self.failed:
- return
+ return
# $ANTLR end synpred117
@@ -17701,15 +17701,15 @@ class CParser(Parser):
# C.g:410:13: '(' macro_parameter_list ')'
self.match(self.input, 62, self.FOLLOW_62_in_synpred1181444)
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_macro_parameter_list_in_synpred1181446)
self.macro_parameter_list()
self.following.pop()
if self.failed:
- return
+ return
self.match(self.input, 63, self.FOLLOW_63_in_synpred1181448)
if self.failed:
- return
+ return
# $ANTLR end synpred118
@@ -17722,10 +17722,10 @@ class CParser(Parser):
# C.g:412:13: '*' IDENTIFIER
self.match(self.input, 66, self.FOLLOW_66_in_synpred1201482)
if self.failed:
- return
+ return
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1201486)
if self.failed:
- return
+ return
# $ANTLR end synpred120
@@ -17738,7 +17738,7 @@ class CParser(Parser):
# C.g:443:20: STRING_LITERAL
self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1371683)
if self.failed:
- return
+ return
# $ANTLR end synpred137
@@ -17762,7 +17762,7 @@ class CParser(Parser):
# C.g:0:0: IDENTIFIER
self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1381680)
if self.failed:
- return
+ return
else:
@@ -17783,7 +17783,7 @@ class CParser(Parser):
# C.g:0:0: STRING_LITERAL
self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1381683)
if self.failed:
- return
+ return
else:
@@ -17792,7 +17792,7 @@ class CParser(Parser):
if self.backtracking > 0:
self.failed = True
- return
+ return
eee = EarlyExitException(126, self.input)
raise eee
@@ -17814,17 +17814,17 @@ class CParser(Parser):
self.lvalue()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_assignment_operator_in_synpred1421746)
self.assignment_operator()
self.following.pop()
if self.failed:
- return
+ return
self.following.append(self.FOLLOW_assignment_expression_in_synpred1421748)
self.assignment_expression()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred142
@@ -17839,7 +17839,7 @@ class CParser(Parser):
self.expression_statement()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred169
@@ -17854,7 +17854,7 @@ class CParser(Parser):
self.macro_statement()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred173
@@ -17869,7 +17869,7 @@ class CParser(Parser):
self.asm2_statement()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred174
@@ -17884,7 +17884,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred181
@@ -17899,7 +17899,7 @@ class CParser(Parser):
self.statement_list()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred182
@@ -17914,7 +17914,7 @@ class CParser(Parser):
self.declaration()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred186
@@ -17929,7 +17929,7 @@ class CParser(Parser):
self.statement()
self.following.pop()
if self.failed:
- return
+ return
# $ANTLR end synpred188
@@ -18388,7 +18388,7 @@ class CParser(Parser):
-
+
FOLLOW_external_declaration_in_translation_unit74 = frozenset([1, 4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])
FOLLOW_function_definition_in_external_declaration113 = frozenset([1])
diff --git a/BaseTools/Source/Python/Eot/Eot.py b/BaseTools/Source/Python/Eot/Eot.py
index fcde8fd3e22f..712fb3cd17c9 100644
--- a/BaseTools/Source/Python/Eot/Eot.py
+++ b/BaseTools/Source/Python/Eot/Eot.py
@@ -51,7 +51,7 @@ class MultipleFv(FirmwareVolume):
Fv.frombuffer(Buf, 0, len(Buf))
self.BasicInfo.append([Fv.Name, Fv.FileSystemGuid, Fv.Size])
- self.FfsDict.append(Fv.FfsDict)
+ self.FfsDict.append(Fv.FfsDict)
## Class Eot
#
@@ -82,7 +82,7 @@ class Eot(object):
self.FvFileList = FvFileList
self.MapFileList = MapFileList
self.Dispatch = Dispatch
-
+
# Check workspace environment
if "EFI_SOURCE" not in os.environ:
if "EDK_SOURCE" not in os.environ:
@@ -122,13 +122,13 @@ class Eot(object):
if not os.path.isfile(MapFile):
EdkLogger.error("Eot", EdkLogger.EOT_ERROR, "Can not find file %s " % MapFile)
EotGlobalData.gMAP_FILE.append(MapFile)
-
+
# Generate source file list
self.GenerateSourceFileList(self.SourceFileList, self.IncludeDirList)
# Generate guid list of dec file list
self.ParseDecFile(self.DecFileList)
-
+
# Generate guid list from GUID list file
self.ParseGuidList(self.GuidList)
@@ -188,7 +188,7 @@ class Eot(object):
if len(list) == 2:
EotGlobalData.gGuidDict[list[0].strip()] = GuidStructureStringToGuidString(list[1].strip())
-
+
## ParseGuidList() method
#
# Parse Guid list and get all GUID names with GUID values as {GuidName : GuidValue}
@@ -203,7 +203,7 @@ class Eot(object):
for Line in open(Path):
(GuidName, GuidValue) = Line.split()
EotGlobalData.gGuidDict[GuidName] = GuidValue
-
+
## ConvertLogFile() method
#
# Parse a real running log file to get real dispatch order
@@ -557,7 +557,7 @@ class Eot(object):
if Options.FvFileList:
self.FvFileList = Options.FvFileList
-
+
if Options.MapFileList:
self.MapFileList = Options.FvMapFileList
@@ -569,7 +569,7 @@ class Eot(object):
if Options.DecFileList:
self.DecFileList = Options.DecFileList
-
+
if Options.GuidList:
self.GuidList = Options.GuidList
diff --git a/BaseTools/Source/Python/Eot/Report.py b/BaseTools/Source/Python/Eot/Report.py
index 7435b4d7c930..d631c036bad0 100644
--- a/BaseTools/Source/Python/Eot/Report.py
+++ b/BaseTools/Source/Python/Eot/Report.py
@@ -276,13 +276,13 @@ class Report(object):
</tr>
<tr id='Ffs%s' style='display:none;'>
<td colspan="4"><table width="100%%" border="1">""" % (self.FfsIndex, self.FfsIndex, self.FfsIndex, FfsPath, FfsName, FfsGuid, FfsOffset, FfsType, self.FfsIndex)
-
+
if self.DispatchList:
if FfsObj.Type in [0x04, 0x06]:
self.DispatchList.write("%s %s %s %s\n" % (FfsGuid, "P", FfsName, FfsPath))
if FfsObj.Type in [0x05, 0x07, 0x08, 0x0A]:
self.DispatchList.write("%s %s %s %s\n" % (FfsGuid, "D", FfsName, FfsPath))
-
+
self.WriteLn(Content)
EotGlobalData.gOP_DISPATCH_ORDER.write('%s\n' %FfsName)
diff --git a/BaseTools/Source/Python/GenFds/Capsule.py b/BaseTools/Source/Python/GenFds/Capsule.py
index fbd48f3c6d76..e2c8e388c50b 100644
--- a/BaseTools/Source/Python/GenFds/Capsule.py
+++ b/BaseTools/Source/Python/GenFds/Capsule.py
@@ -205,7 +205,7 @@ class Capsule (CapsuleClassObject) :
return GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap']
GenFdsGlobalVariable.InfLogger( "\nGenerate %s Capsule" %self.UiCapsuleName)
- if ('CAPSULE_GUID' in self.TokensDict and
+ if ('CAPSULE_GUID' in self.TokensDict and
uuid.UUID(self.TokensDict['CAPSULE_GUID']) == uuid.UUID('6DCBD5ED-E82D-4C44-BDA1-7194199AD92A')):
return self.GenFmpCapsule()
diff --git a/BaseTools/Source/Python/GenFds/CapsuleData.py b/BaseTools/Source/Python/GenFds/CapsuleData.py
index b376d6b2e9be..9766a2c984a1 100644
--- a/BaseTools/Source/Python/GenFds/CapsuleData.py
+++ b/BaseTools/Source/Python/GenFds/CapsuleData.py
@@ -32,13 +32,13 @@ class CapsuleData:
# @param self The object pointer
def __init__(self):
pass
-
+
## generate capsule data
#
# @param self The object pointer
def GenCapsuleSubItem(self):
pass
-
+
## FFS class for capsule data
#
#
@@ -119,7 +119,7 @@ class CapsuleFd (CapsuleData):
else:
FdFile = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FdName)
return FdFile
-
+
## AnyFile class for capsule data
#
#
@@ -139,7 +139,7 @@ class CapsuleAnyFile (CapsuleData):
#
def GenCapsuleSubItem(self):
return self.FileName
-
+
## Afile class for capsule data
#
#
@@ -208,11 +208,11 @@ class CapsulePayload(CapsuleData):
Guid = self.ImageTypeId.split('-')
Buffer = pack('=ILHHBBBBBBBBBBBBIIQ',
int(self.Version,16),
- int(Guid[0], 16),
- int(Guid[1], 16),
- int(Guid[2], 16),
- int(Guid[3][-4:-2], 16),
- int(Guid[3][-2:], 16),
+ int(Guid[0], 16),
+ int(Guid[1], 16),
+ int(Guid[2], 16),
+ int(Guid[3][-4:-2], 16),
+ int(Guid[3][-2:], 16),
int(Guid[4][-12:-10], 16),
int(Guid[4][-10:-8], 16),
int(Guid[4][-8:-6], 16),
diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py
index 5bb1ae6f664c..635070365b06 100644
--- a/BaseTools/Source/Python/GenFds/EfiSection.py
+++ b/BaseTools/Source/Python/GenFds/EfiSection.py
@@ -54,7 +54,7 @@ class EfiSection (EfiSectionClassObject):
# @retval tuple (Generated file name list, section alignment)
#
def GenSection(self, OutputPath, ModuleName, SecNum, KeyStringList, FfsInf = None, Dict = {}, IsMakefile = False) :
-
+
if self.FileName is not None and self.FileName.startswith('PCD('):
self.FileName = GenFdsGlobalVariable.GetPcdValue(self.FileName)
"""Prepare the parameter of GenSection"""
@@ -154,7 +154,7 @@ class EfiSection (EfiSectionClassObject):
BuildNumTuple = tuple()
BuildNumString = ' ' + ' '.join(BuildNumTuple)
- #if VerString == '' and
+ #if VerString == '' and
if BuildNumString == '':
if self.Optional == True :
GenFdsGlobalVariable.VerboseLogger( "Optional Section don't exist!")
@@ -239,7 +239,7 @@ class EfiSection (EfiSectionClassObject):
Num = '%s.%d' %(SecNum , Index)
OutputFile = os.path.join( OutputPath, ModuleName + 'SEC' + Num + Ffs.SectionSuffix.get(SectionType))
File = GenFdsGlobalVariable.MacroExtend(File, Dict)
-
+
#Get PE Section alignment when align is set to AUTO
if self.Alignment == 'Auto' and (SectionType == 'PE32' or SectionType == 'TE'):
ImageObj = PeImageClass (File)
@@ -283,7 +283,7 @@ class EfiSection (EfiSectionClassObject):
IsMakefile = IsMakefile
)
File = StrippedFile
-
+
"""For TE Section call GenFw to generate TE image"""
if SectionType == 'TE':
diff --git a/BaseTools/Source/Python/GenFds/Fd.py b/BaseTools/Source/Python/GenFds/Fd.py
index cc4124ad902e..3a90a72157e5 100644
--- a/BaseTools/Source/Python/GenFds/Fd.py
+++ b/BaseTools/Source/Python/GenFds/Fd.py
@@ -102,7 +102,7 @@ class FD(FDClassObject):
pass
GenFdsGlobalVariable.VerboseLogger('Call each region\'s AddToBuffer function')
RegionObj.AddToBuffer (TempFdBuffer, self.BaseAddress, self.BlockSizeList, self.ErasePolarity, GenFds.ImageBinDict, self.vtfRawDict, self.DefineVarDict)
-
+
FdBuffer = StringIO.StringIO('')
PreviousRegionStart = -1
PreviousRegionSize = 1
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 80ff3ece43b4..29da68e14ff8 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -172,7 +172,7 @@ class IncludeFileProfile :
self.InsertAdjust = 0
self.IncludeFileList = []
self.Level = 1 # first level include file
-
+
def GetTotalLines(self):
TotalLines = self.InsertAdjust + len(self.FileLinesList)
@@ -190,7 +190,7 @@ class IncludeFileProfile :
def GetLineInFile(self, Line):
if not self.IsLineInFile (Line):
return (self.FileName, -1)
-
+
InsertedLines = self.InsertStartLineNumber
for Profile in self.IncludeFileList:
@@ -232,7 +232,7 @@ class FileProfile :
# ECC will use this Dict and List information
self.PcdFileLineDict = {}
self.InfFileLineList = []
-
+
self.FdDict = {}
self.FdNameNotSet = False
self.FvDict = {}
@@ -338,11 +338,11 @@ class FdfParser:
#
# @param self The object pointer
# @param DestLine Optional new destination line number.
- # @param DestOffset Optional new destination offset.
+ # @param DestOffset Optional new destination offset.
#
- def Rewind(self, DestLine = 1, DestOffset = 0):
- self.CurrentLineNumber = DestLine
- self.CurrentOffsetWithinLine = DestOffset
+ def Rewind(self, DestLine = 1, DestOffset = 0):
+ self.CurrentLineNumber = DestLine
+ self.CurrentOffsetWithinLine = DestOffset
## __UndoOneChar() method
#
@@ -458,7 +458,7 @@ class FdfParser:
if MacroName.startswith('!'):
NotFlag = True
MacroName = MacroName[1:].strip()
-
+
if not MacroName.startswith('$(') or not MacroName.endswith(')'):
raise Warning("Macro name expected(Please use '$(%(Token)s)' if '%(Token)s' is a macro.)" % {"Token" : MacroName},
self.FileName, self.CurrentLineNumber)
@@ -663,7 +663,7 @@ class FdfParser:
IncludedFile1 = PathClass(IncludedFile, GlobalData.gWorkspace)
ErrorCode = IncludedFile1.Validate()[0]
if ErrorCode != 0:
- raise Warning("The include file does not exist under below directories: \n%s\n%s\n%s\n"%(os.path.dirname(self.FileName), PlatformDir, GlobalData.gWorkspace),
+ raise Warning("The include file does not exist under below directories: \n%s\n%s\n%s\n"%(os.path.dirname(self.FileName), PlatformDir, GlobalData.gWorkspace),
self.FileName, self.CurrentLineNumber)
if not IsValidInclude (IncludedFile1.Path, self.CurrentLineNumber):
@@ -706,18 +706,18 @@ class FdfParser:
Processed = False
# Preprocess done.
self.Rewind()
-
+
@staticmethod
def __GetIfListCurrentItemStat(IfList):
if len(IfList) == 0:
return True
-
+
for Item in IfList:
if Item[1] == False:
return False
-
+
return True
-
+
## PreprocessConditionalStatement() method
#
# Preprocess conditional statement.
@@ -777,7 +777,7 @@ class FdfParser:
Macro = self.__Token
if not self.__IsToken( "="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
-
+
Value = self.__GetExpression()
self.__SetMacroValue(Macro, Value)
self.__WipeOffArea.append(((DefineLine, DefineOffset), (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))
@@ -807,7 +807,7 @@ class FdfParser:
CondLabel = self.__Token
Expression = self.__GetExpression()
-
+
if CondLabel == '!if':
ConditionSatisfied = self.__EvaluateConditional(Expression, IfList[-1][0][0] + 1, 'eval')
else:
@@ -818,7 +818,7 @@ class FdfParser:
BranchDetermined = ConditionSatisfied
IfList[-1] = [IfList[-1][0], ConditionSatisfied, BranchDetermined]
if ConditionSatisfied:
- self.__WipeOffArea.append((IfList[-1][0], (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))
+ self.__WipeOffArea.append((IfList[-1][0], (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))
elif self.__Token in ('!elseif', '!else'):
ElseStartPos = (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - len(self.__Token))
if len(IfList) <= 0:
@@ -890,7 +890,7 @@ class FdfParser:
ScopeMacro = self.__MacroDict[TAB_COMMON, TAB_COMMON, TAB_COMMON]
if ScopeMacro:
MacroDict.update(ScopeMacro)
-
+
# Section macro
ScopeMacro = self.__MacroDict[
self.__CurSection[0],
@@ -923,12 +923,12 @@ class FdfParser:
else:
return ValueExpression(Expression, MacroPcdDict)()
except WrnExpression, Excpt:
- #
+ #
# Catch expression evaluation warning here. We need to report
# the precise number of line and return the evaluation result
#
EdkLogger.warn('Parser', "Suspicious expression: %s" % str(Excpt),
- File=self.FileName, ExtraData=self.__CurrentLine(),
+ File=self.FileName, ExtraData=self.__CurrentLine(),
Line=Line)
return Excpt.result
except Exception, Excpt:
@@ -947,7 +947,7 @@ class FdfParser:
raise Warning(str(Excpt), *FileLineTuple)
else:
if Expression.startswith('$(') and Expression[-1] == ')':
- Expression = Expression[2:-1]
+ Expression = Expression[2:-1]
return Expression in MacroPcdDict
## __IsToken() method
@@ -1431,9 +1431,9 @@ class FdfParser:
self.__UndoToken()
self.__GetSetStatement(None)
continue
-
+
Macro = self.__Token
-
+
if not self.__IsToken("="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
if not self.__GetNextToken() or self.__Token.startswith('['):
@@ -1480,7 +1480,7 @@ class FdfParser:
else:
raise Warning("expected FdName in [FD.] section", self.FileName, self.CurrentLineNumber)
self.CurrentFdName = FdName.upper()
-
+
if self.CurrentFdName in self.Profile.FdDict:
raise Warning("Unexpected the same FD name", self.FileName, self.CurrentLineNumber)
@@ -1566,12 +1566,12 @@ class FdfParser:
if self.__IsKeyword( "BaseAddress"):
if not self.__IsToken( "="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
-
+
if not self.__GetNextHexNumber():
raise Warning("expected Hex base address", self.FileName, self.CurrentLineNumber)
-
+
Obj.BaseAddress = self.__Token
-
+
if self.__IsToken( "|"):
pcdPair = self.__GetNextPcdName()
Obj.BaseAddressPcd = pcdPair
@@ -1583,7 +1583,7 @@ class FdfParser:
if self.__IsKeyword( "Size"):
if not self.__IsToken( "="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
-
+
if not self.__GetNextHexNumber():
raise Warning("expected Hex size", self.FileName, self.CurrentLineNumber)
@@ -1600,13 +1600,13 @@ class FdfParser:
if self.__IsKeyword( "ErasePolarity"):
if not self.__IsToken( "="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
-
+
if not self.__GetNextToken():
raise Warning("expected Erase Polarity", self.FileName, self.CurrentLineNumber)
-
+
if self.__Token != "1" and self.__Token != "0":
raise Warning("expected 1 or 0 Erase Polarity", self.FileName, self.CurrentLineNumber)
-
+
Obj.ErasePolarity = self.__Token
return True
@@ -1654,7 +1654,7 @@ class FdfParser:
IsBlock = False
while self.__GetBlockStatement(Obj):
IsBlock = True
-
+
Item = Obj.BlockSizeList[-1]
if Item[0] is None or Item[1] is None:
raise Warning("expected block statement", self.FileName, self.CurrentLineNumber)
@@ -1823,7 +1823,7 @@ class FdfParser:
# @retval False Not able to find
#
def __GetRegionLayout(self, Fd):
- Offset = self.__CalcRegionExpr()
+ Offset = self.__CalcRegionExpr()
if Offset is None:
return False
@@ -2139,9 +2139,9 @@ class FdfParser:
while True:
self.__GetSetStatements(FvObj)
- if not (self.__GetBlockStatement(FvObj) or self.__GetFvBaseAddress(FvObj) or
- self.__GetFvForceRebase(FvObj) or self.__GetFvAlignment(FvObj) or
- self.__GetFvAttributes(FvObj) or self.__GetFvNameGuid(FvObj) or
+ if not (self.__GetBlockStatement(FvObj) or self.__GetFvBaseAddress(FvObj) or
+ self.__GetFvForceRebase(FvObj) or self.__GetFvAlignment(FvObj) or
+ self.__GetFvAttributes(FvObj) or self.__GetFvNameGuid(FvObj) or
self.__GetFvExtEntryStatement(FvObj) or self.__GetFvNameString(FvObj)):
break
@@ -2186,7 +2186,7 @@ class FdfParser:
raise Warning("Unknown alignment value '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
Obj.FvAlignment = self.__Token
return True
-
+
## __GetFvBaseAddress() method
#
# Get BaseAddress for FV
@@ -2210,8 +2210,8 @@ class FdfParser:
if not BaseAddrValuePattern.match(self.__Token.upper()):
raise Warning("Unknown FV base address value '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
Obj.FvBaseAddress = self.__Token
- return True
-
+ return True
+
## __GetFvForceRebase() method
#
# Get FvForceRebase for FV
@@ -2234,14 +2234,14 @@ class FdfParser:
if self.__Token.upper() not in ["TRUE", "FALSE", "0", "0X0", "0X00", "1", "0X1", "0X01"]:
raise Warning("Unknown FvForceRebase value '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
-
+
if self.__Token.upper() in ["TRUE", "1", "0X1", "0X01"]:
Obj.FvForceRebase = True
elif self.__Token.upper() in ["FALSE", "0", "0X0", "0X00"]:
Obj.FvForceRebase = False
else:
Obj.FvForceRebase = None
-
+
return True
@@ -2276,7 +2276,7 @@ class FdfParser:
FvObj.FvAttributeDict[name] = self.__Token
return IsWordToken
-
+
## __GetFvNameGuid() method
#
# Get FV GUID for FV
@@ -2322,7 +2322,7 @@ class FdfParser:
if not self.__IsKeyword ("TYPE"):
raise Warning("expected 'TYPE'", self.FileName, self.CurrentLineNumber)
-
+
if not self.__IsToken( "="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
@@ -2343,7 +2343,7 @@ class FdfParser:
if not self.__IsToken( "="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
-
+
if not self.__IsToken( "{"):
raise Warning("expected '{'", self.FileName, self.CurrentLineNumber)
@@ -2374,13 +2374,13 @@ class FdfParser:
FvObj.FvExtEntryData += [DataString]
if self.__Token == 'FILE':
-
+
if not self.__IsToken( "="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
-
+
if not self.__GetNextToken():
raise Warning("expected FV Extension Entry file path At Line ", self.FileName, self.CurrentLineNumber)
-
+
FvObj.FvExtEntryData += [self.__Token]
if not self.__IsToken( "}"):
@@ -2543,7 +2543,7 @@ class FdfParser:
raise Warning("expected ARCH name", self.FileName, self.CurrentLineNumber)
FfsInfObj.UseArch = self.__Token
-
+
if self.__GetNextToken():
p = re.compile(r'([a-zA-Z0-9\-]+|\$\(TARGET\)|\*)_([a-zA-Z0-9\-]+|\$\(TOOL_CHAIN_TAG\)|\*)_([a-zA-Z0-9\-]+|\$\(ARCH\))')
if p.match(self.__Token) and p.match(self.__Token).span()[1] == len(self.__Token):
@@ -2584,7 +2584,7 @@ class FdfParser:
self.__UndoToken()
self.__UndoToken()
return False
-
+
FfsFileObj = FfsFileStatement.FileStatement()
FfsFileObj.FvFileType = self.__Token
@@ -2601,9 +2601,9 @@ class FdfParser:
if not self.__IsToken( ")"):
raise Warning("expected ')'", self.FileName, self.CurrentLineNumber)
self.__Token = 'PCD('+PcdPair[1]+'.'+PcdPair[0]+')'
-
+
FfsFileObj.NameGuid = self.__Token
-
+
self.__GetFilePart( FfsFileObj, MacroDict.copy())
if ForCapsule:
@@ -2879,7 +2879,7 @@ class FdfParser:
else:
VerSectionObj.FileName = self.__Token
Obj.SectionList.append(VerSectionObj)
-
+
elif self.__IsKeyword( "UI"):
if AlignValue == 'Auto':
raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
@@ -3333,7 +3333,7 @@ class FdfParser:
Value = self.__Token.strip()
else:
Value = self.__Token.strip()
- Obj.TokensDict[Name] = Value
+ Obj.TokensDict[Name] = Value
if not self.__GetNextToken():
return False
self.__UndoToken()
@@ -3475,7 +3475,7 @@ class FdfParser:
if not self.__GetNextToken():
raise Warning("expected File name", self.FileName, self.CurrentLineNumber)
-
+
AnyFileName = self.__Token
self.__VerifyFile(AnyFileName)
@@ -3508,7 +3508,7 @@ class FdfParser:
else:
CapsuleObj.CapsuleDataList.append(CapsuleAnyFile)
return True
-
+
## __GetAfileStatement() method
#
# Get Afile for capsule
@@ -3528,14 +3528,14 @@ class FdfParser:
if not self.__GetNextToken():
raise Warning("expected Afile name", self.FileName, self.CurrentLineNumber)
-
+
AfileName = self.__Token
AfileBaseName = os.path.basename(AfileName)
-
+
if os.path.splitext(AfileBaseName)[1] not in [".bin",".BIN",".Bin",".dat",".DAT",".Dat",".data",".DATA",".Data"]:
raise Warning('invalid binary file type, should be one of "bin","BIN","Bin","dat","DAT","Dat","data","DATA","Data"', \
self.FileName, self.CurrentLineNumber)
-
+
if not os.path.isabs(AfileName):
AfileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(AfileName)
self.__VerifyFile(AfileName)
@@ -3689,7 +3689,7 @@ class FdfParser:
if not self.__IsToken( ")"):
raise Warning("expected ')'", self.FileName, self.CurrentLineNumber)
self.__Token = 'PCD('+PcdPair[1]+'.'+PcdPair[0]+')'
-
+
NameGuid = self.__Token
KeepReloc = None
@@ -3951,11 +3951,11 @@ class FdfParser:
elif self.__GetNextToken():
if self.__Token not in ("}", "COMPAT16", "PE32", "PIC", "TE", "FV_IMAGE", "RAW", "DXE_DEPEX",\
"UI", "VERSION", "PEI_DEPEX", "GUID", "SMM_DEPEX"):
-
+
if self.__Token.startswith('PCD'):
self.__UndoToken()
self.__GetNextWord()
-
+
if self.__Token == 'PCD':
if not self.__IsToken( "("):
raise Warning("expected '('", self.FileName, self.CurrentLineNumber)
@@ -3963,9 +3963,9 @@ class FdfParser:
if not self.__IsToken( ")"):
raise Warning("expected ')'", self.FileName, self.CurrentLineNumber)
self.__Token = 'PCD('+PcdPair[1]+'.'+PcdPair[0]+')'
-
- EfiSectionObj.FileName = self.__Token
-
+
+ EfiSectionObj.FileName = self.__Token
+
else:
self.__UndoToken()
else:
@@ -4352,7 +4352,7 @@ class FdfParser:
self.SectionParser(S)
self.__UndoToken()
return False
-
+
self.__UndoToken()
if not self.__IsToken("[OptionRom.", True):
raise Warning("Unknown Keyword '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
@@ -4371,7 +4371,7 @@ class FdfParser:
isFile = self.__GetOptRomFileStatement(OptRomObj)
if not isInf and not isFile:
break
-
+
return True
## __GetOptRomInfStatement() method
@@ -4412,9 +4412,9 @@ class FdfParser:
else:
self.Profile.InfDict['ArchTBD'].append(ffsInf.InfFileName)
-
+
self.__GetOptRomOverrides (ffsInf)
-
+
Obj.FfsList.append(ffsInf)
return True
@@ -4476,7 +4476,7 @@ class FdfParser:
EdkLogger.error("FdfParser", FORMAT_INVALID, File=self.FileName, Line=self.CurrentLineNumber)
Obj.OverrideAttribs = Overrides
-
+
## __GetOptRomFileStatement() method
#
# Get FILE statements
@@ -4508,7 +4508,7 @@ class FdfParser:
if FfsFileObj.FileType == 'EFI':
self.__GetOptRomOverrides(FfsFileObj)
-
+
Obj.FfsList.append(FfsFileObj)
return True
@@ -4550,7 +4550,7 @@ class FdfParser:
if hasattr(CapsuleDataObj, 'FvName') and CapsuleDataObj.FvName is not None and CapsuleDataObj.FvName.upper() not in RefFvList:
RefFvList.append (CapsuleDataObj.FvName.upper())
elif hasattr(CapsuleDataObj, 'FdName') and CapsuleDataObj.FdName is not None and CapsuleDataObj.FdName.upper() not in RefFdList:
- RefFdList.append (CapsuleDataObj.FdName.upper())
+ RefFdList.append (CapsuleDataObj.FdName.upper())
elif CapsuleDataObj.Ffs is not None:
if isinstance(CapsuleDataObj.Ffs, FfsFileStatement.FileStatement):
if CapsuleDataObj.Ffs.FvName is not None and CapsuleDataObj.Ffs.FvName.upper() not in RefFvList:
@@ -4645,7 +4645,7 @@ class FdfParser:
RefFvStack = []
RefFvStack.append(FvName)
FdAnalyzedList = []
-
+
Index = 0
while RefFvStack != [] and Index < MaxLength:
Index = Index + 1
@@ -4698,7 +4698,7 @@ class FdfParser:
RefCapStack.append(CapName)
FdAnalyzedList = []
FvAnalyzedList = []
-
+
Index = 0
while RefCapStack != [] and Index < MaxLength:
Index = Index + 1
diff --git a/BaseTools/Source/Python/GenFds/Ffs.py b/BaseTools/Source/Python/GenFds/Ffs.py
index a4178121118b..f3a252ee1b9d 100644
--- a/BaseTools/Source/Python/GenFds/Ffs.py
+++ b/BaseTools/Source/Python/GenFds/Ffs.py
@@ -21,7 +21,7 @@ from CommonDataClass.FdfClass import FDClassObject
#
#
class Ffs(FDClassObject):
-
+
# mapping between MODULE type in FDF (from INF) and file type for GenFfs
ModuleTypeToFileType = {
'SEC' : 'EFI_FV_FILETYPE_SECURITY_CORE',
@@ -38,7 +38,7 @@ class Ffs(FDClassObject):
'MM_STANDALONE' : 'EFI_FV_FILETYPE_MM_STANDALONE',
'MM_CORE_STANDALONE' : 'EFI_FV_FILETYPE_MM_CORE_STANDALONE'
}
-
+
# mapping between FILE type in FDF and file type for GenFfs
FdfFvFileTypeToFileType = {
'SEC' : 'EFI_FV_FILETYPE_SECURITY_CORE',
@@ -56,7 +56,7 @@ class Ffs(FDClassObject):
'MM_STANDALONE' : 'EFI_FV_FILETYPE_MM_STANDALONE',
'MM_CORE_STANDALONE' : 'EFI_FV_FILETYPE_MM_CORE_STANDALONE'
}
-
+
# mapping between section type in FDF and file suffix
SectionSuffix = {
'PE32' : '.pe32',
@@ -68,14 +68,14 @@ class Ffs(FDClassObject):
'COMPAT16' : '.com16',
'RAW' : '.raw',
'FREEFORM_SUBTYPE_GUID': '.guid',
- 'SUBTYPE_GUID' : '.guid',
+ 'SUBTYPE_GUID' : '.guid',
'FV_IMAGE' : 'fv.sec',
'COMPRESS' : '.com',
'GUIDED' : '.guided',
'PEI_DEPEX' : '.dpx',
'SMM_DEPEX' : '.dpx'
}
-
+
## The constructor
#
# @param self The object pointer
diff --git a/BaseTools/Source/Python/GenFds/FfsFileStatement.py b/BaseTools/Source/Python/GenFds/FfsFileStatement.py
index ba8e0465ef34..cb83f6428c23 100644
--- a/BaseTools/Source/Python/GenFds/FfsFileStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsFileStatement.py
@@ -58,7 +58,7 @@ class FileStatement (FileStatementClassObject) :
# @retval string Generated FFS file name
#
def GenFfs(self, Dict = {}, FvChildAddr=[], FvParentAddr=None, IsMakefile=False, FvName=None):
-
+
if self.NameGuid is not None and self.NameGuid.startswith('PCD('):
PcdValue = GenFdsGlobalVariable.GetPcdValue(self.NameGuid)
if len(PcdValue) == 0:
@@ -71,7 +71,7 @@ class FileStatement (FileStatementClassObject) :
EdkLogger.error("GenFds", GENFDS_ERROR, 'GUID value for %s in wrong format.' \
% (self.NameGuid))
self.NameGuid = RegistryGuidStr
-
+
Str = self.NameGuid
if FvName:
Str += FvName
diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
index 3c5eef40222b..4cbc6bb9ba7f 100644
--- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
@@ -225,7 +225,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
EdkLogger.warn("GenFds", GENFDS_ERROR, "Module %s NOT found in DSC file; Is it really a binary module?" % (self.InfFileName))
if self.ModuleType == 'SMM_CORE' and int(self.PiSpecVersion, 16) < 0x0001000A:
- EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.InfFileName)
+ EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.InfFileName)
if self.ModuleType == 'MM_CORE_STANDALONE' and int(self.PiSpecVersion, 16) < 0x00010032:
EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "MM_CORE_STANDALONE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x00010032", File=self.InfFileName)
@@ -374,13 +374,13 @@ class FfsInfStatement(FfsInfStatementClassObject):
def PatchEfiFile(self, EfiFile, FileType):
#
# If the module does not have any patches, then return path to input file
- #
+ #
if not self.PatchPcds:
return EfiFile
#
# Only patch file if FileType is PE32 or ModuleType is USER_DEFINED
- #
+ #
if FileType != 'PE32' and self.ModuleType != "USER_DEFINED":
return EfiFile
@@ -398,7 +398,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
# If a different file from the same module has already been patched, then generate an error
- #
+ #
if self.PatchedBinFile:
EdkLogger.error("GenFds", GENFDS_ERROR,
'Only one binary file can be patched:\n'
@@ -408,12 +408,12 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
# Copy unpatched file contents to output file location to perform patching
- #
+ #
CopyLongFilePath(EfiFile, Output)
#
# Apply patches to patched output file
- #
+ #
for Pcd, Value in self.PatchPcds:
RetVal, RetStr = PatchBinaryFile(Output, int(Pcd.Offset, 0), Pcd.DatumType, Value, Pcd.MaxDatumSize)
if RetVal:
@@ -421,12 +421,12 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
# Save the path of the patched output file
- #
+ #
self.PatchedBinFile = Output
#
# Return path to patched output file
- #
+ #
return Output
## GenFfs() method
@@ -448,14 +448,14 @@ class FfsInfStatement(FfsInfStatementClassObject):
Arch = self.GetCurrentArch()
SrcFile = mws.join( GenFdsGlobalVariable.WorkSpaceDir , self.InfFileName);
DestFile = os.path.join( self.OutputPath, self.ModuleGuid + '.ffs')
-
+
SrcFileDir = "."
SrcPath = os.path.dirname(SrcFile)
SrcFileName = os.path.basename(SrcFile)
- SrcFileBase, SrcFileExt = os.path.splitext(SrcFileName)
+ SrcFileBase, SrcFileExt = os.path.splitext(SrcFileName)
DestPath = os.path.dirname(DestFile)
DestFileName = os.path.basename(DestFile)
- DestFileBase, DestFileExt = os.path.splitext(DestFileName)
+ DestFileBase, DestFileExt = os.path.splitext(DestFileName)
self.MacroDict = {
# source file
"${src}" : SrcFile,
@@ -473,7 +473,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
}
#
# Allow binary type module not specify override rule in FDF file.
- #
+ #
if len(self.BinFileList) > 0:
if self.Rule is None or self.Rule == "":
self.Rule = "BINARY"
@@ -534,7 +534,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
'$(NAMED_GUID)' : self.ModuleGuid
}
String = GenFdsGlobalVariable.MacroExtend(String, MacroDict)
- String = GenFdsGlobalVariable.MacroExtend(String, self.MacroDict)
+ String = GenFdsGlobalVariable.MacroExtend(String, self.MacroDict)
return String
## __GetRule__() method
@@ -960,14 +960,14 @@ class FfsInfStatement(FfsInfStatementClassObject):
Sect.FvAddr = FvChildAddr
if FvParentAddr is not None and isinstance(Sect, GuidSection):
Sect.FvParentAddr = FvParentAddr
-
+
if Rule.KeyStringList != []:
SectList, Align = Sect.GenSection(self.OutputPath , self.ModuleGuid, SecIndex, Rule.KeyStringList, self, IsMakefile = IsMakefile)
else :
SectList, Align = Sect.GenSection(self.OutputPath , self.ModuleGuid, SecIndex, self.KeyStringList, self, IsMakefile = IsMakefile)
-
+
if not HasGeneratedFlag:
- UniVfrOffsetFileSection = ""
+ UniVfrOffsetFileSection = ""
ModuleFileName = mws.join(GenFdsGlobalVariable.WorkSpaceDir, self.InfFileName)
InfData = GenFdsGlobalVariable.WorkSpace.BuildObject[PathClass(ModuleFileName), self.CurrentArch]
#
@@ -978,16 +978,16 @@ class FfsInfStatement(FfsInfStatementClassObject):
for SourceFile in InfData.Sources:
if SourceFile.Type.upper() == ".VFR" :
#
- # search the .map file to find the offset of vfr binary in the PE32+/TE file.
+ # search the .map file to find the offset of vfr binary in the PE32+/TE file.
#
VfrUniBaseName[SourceFile.BaseName] = (SourceFile.BaseName + "Bin")
if SourceFile.Type.upper() == ".UNI" :
#
- # search the .map file to find the offset of Uni strings binary in the PE32+/TE file.
+ # search the .map file to find the offset of Uni strings binary in the PE32+/TE file.
#
VfrUniBaseName["UniOffsetName"] = (self.BaseName + "Strings")
-
-
+
+
if len(VfrUniBaseName) > 0:
if IsMakefile:
if InfData.BuildType != 'UEFI_HII':
@@ -1023,7 +1023,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
if UniVfrOffsetFileSection:
SectList.append(UniVfrOffsetFileSection)
HasGeneratedFlag = True
-
+
for SecName in SectList :
SectFiles.append(SecName)
SectAlignments.append(Align)
@@ -1071,12 +1071,12 @@ class FfsInfStatement(FfsInfStatementClassObject):
# @param self The object pointer
# @param VfrUniBaseName A name list contain the UNI/INF object name.
# @retval RetValue A list contain offset of UNI/INF object.
- #
+ #
def __GetBuildOutputMapFileVfrUniInfo(self, VfrUniBaseName):
MapFileName = os.path.join(self.EfiOutputPath, self.BaseName + ".map")
EfiFileName = os.path.join(self.EfiOutputPath, self.BaseName + ".efi")
return GetVariableOffset(MapFileName, EfiFileName, VfrUniBaseName.values())
-
+
## __GenUniVfrOffsetFile() method
#
# Generate the offset file for the module which contain VFR or UNI file.
@@ -1088,8 +1088,8 @@ class FfsInfStatement(FfsInfStatementClassObject):
def __GenUniVfrOffsetFile(VfrUniOffsetList, UniVfrOffsetFileName):
# Use a instance of StringIO to cache data
- fStringIO = StringIO.StringIO('')
-
+ fStringIO = StringIO.StringIO('')
+
for Item in VfrUniOffsetList:
if (Item[0].find("Strings") != -1):
#
@@ -1099,7 +1099,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
UniGuid = [0xe0, 0xc5, 0x13, 0x89, 0xf6, 0x33, 0x86, 0x4d, 0x9b, 0xf1, 0x43, 0xef, 0x89, 0xfc, 0x6, 0x66]
UniGuid = [chr(ItemGuid) for ItemGuid in UniGuid]
- fStringIO.write(''.join(UniGuid))
+ fStringIO.write(''.join(UniGuid))
UniValue = pack ('Q', int (Item[1], 16))
fStringIO.write (UniValue)
else:
@@ -1110,11 +1110,11 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
VfrGuid = [0xb4, 0x7c, 0xbc, 0xd0, 0x47, 0x6a, 0x5f, 0x49, 0xaa, 0x11, 0x71, 0x7, 0x46, 0xda, 0x6, 0xa2]
VfrGuid = [chr(ItemGuid) for ItemGuid in VfrGuid]
- fStringIO.write(''.join(VfrGuid))
- type (Item[1])
+ fStringIO.write(''.join(VfrGuid))
+ type (Item[1])
VfrValue = pack ('Q', int (Item[1], 16))
fStringIO.write (VfrValue)
-
+
#
# write data into file.
#
@@ -1122,7 +1122,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
SaveFileOnChange(UniVfrOffsetFileName, fStringIO.getvalue())
except:
EdkLogger.error("GenFds", FILE_WRITE_FAILURE, "Write data to file %s failed, please check whether the file been locked or using by other applications." %UniVfrOffsetFileName,None)
-
+
fStringIO.close ()
-
+
diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python/GenFds/Fv.py
index 0fb2bd456a6d..2e57c5e92365 100644
--- a/BaseTools/Source/Python/GenFds/Fv.py
+++ b/BaseTools/Source/Python/GenFds/Fv.py
@@ -53,7 +53,7 @@ class FV (FvClassObject):
self.FvForceRebase = None
self.FvRegionInFD = None
self.UsedSizeEnable = False
-
+
## AddToBuffer()
#
# Generate Fv and add it to the Buffer
@@ -72,7 +72,7 @@ class FV (FvClassObject):
if BaseAddress is None and self.UiFvName.upper() + 'fv' in GenFds.ImageBinDict:
return GenFds.ImageBinDict[self.UiFvName.upper() + 'fv']
-
+
#
# Check whether FV in Capsule is in FD flash region.
# If yes, return error. Doesn't support FV in Capsule image is also in FD flash region.
@@ -92,7 +92,7 @@ class FV (FvClassObject):
GenFdsGlobalVariable.InfLogger( "\nGenerating %s FV" %self.UiFvName)
GenFdsGlobalVariable.LargeFileInFvFlags.append(False)
FFSGuid = None
-
+
if self.FvBaseAddress is not None:
BaseAddress = self.FvBaseAddress
if not Flag:
@@ -289,7 +289,7 @@ class FV (FvClassObject):
if not self._GetBlockSize():
#set default block size is 1
self.FvInfFile.writelines("EFI_BLOCK_SIZE = 0x1" + T_CHAR_LF)
-
+
for BlockSize in self.BlockSizeList :
if BlockSize[0] is not None:
self.FvInfFile.writelines("EFI_BLOCK_SIZE = " + \
@@ -331,7 +331,7 @@ class FV (FvClassObject):
self.FvAlignment.strip() + \
" = TRUE" + \
T_CHAR_LF)
-
+
#
# Generate FV extension header file
#
@@ -390,7 +390,7 @@ class FV (FvClassObject):
TotalSize += (Size + 4)
FvExtFile.seek(0)
Buffer += pack('HH', (Size + 4), int(self.FvExtEntryTypeValue[Index], 16))
- Buffer += FvExtFile.read()
+ Buffer += FvExtFile.read()
FvExtFile.close()
if self.FvExtEntryType[Index] == 'DATA':
ByteList = self.FvExtEntryData[Index].split(',')
@@ -403,12 +403,12 @@ class FV (FvClassObject):
Buffer += pack('B', int(ByteList[Index1], 16))
Guid = self.FvNameGuid.split('-')
- Buffer = pack('=LHHBBBBBBBBL',
- int(Guid[0], 16),
- int(Guid[1], 16),
- int(Guid[2], 16),
- int(Guid[3][-4:-2], 16),
- int(Guid[3][-2:], 16),
+ Buffer = pack('=LHHBBBBBBBBL',
+ int(Guid[0], 16),
+ int(Guid[1], 16),
+ int(Guid[2], 16),
+ int(Guid[3][-4:-2], 16),
+ int(Guid[3][-2:], 16),
int(Guid[4][-12:-10], 16),
int(Guid[4][-10:-8], 16),
int(Guid[4][-8:-6], 16),
@@ -434,7 +434,7 @@ class FV (FvClassObject):
FvExtHeaderFileName + \
T_CHAR_LF)
-
+
#
# Add [Files]
#
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py
index 74017e72629b..4b8c7913d2db 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -71,10 +71,10 @@ def main():
if Options.verbose is not None:
EdkLogger.SetLevel(EdkLogger.VERBOSE)
GenFdsGlobalVariable.VerboseMode = True
-
+
if Options.FixedAddress is not None:
GenFdsGlobalVariable.FixedLoadAddress = True
-
+
if Options.quiet is not None:
EdkLogger.SetLevel(EdkLogger.QUIET)
if Options.debug is not None:
@@ -99,7 +99,7 @@ def main():
if Options.GenfdsMultiThread:
GenFdsGlobalVariable.EnableGenfdsMultiThread = True
os.chdir(GenFdsGlobalVariable.WorkSpaceDir)
-
+
# set multiple workspace
PackagesPath = os.getenv("PACKAGES_PATH")
mws.setWs(GenFdsGlobalVariable.WorkSpaceDir, PackagesPath)
@@ -227,7 +227,7 @@ def main():
GlobalData.gDatabasePath = os.path.normpath(os.path.join(ConfDirectoryPath, GlobalData.gDatabasePath))
BuildWorkSpace = WorkspaceDatabase(GlobalData.gDatabasePath)
BuildWorkSpace.InitDatabase()
-
+
#
# Get files real name in workspace dir
#
@@ -243,7 +243,7 @@ def main():
TargetArchList = set(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, TAB_COMMON, Options.BuildTarget, Options.ToolChain].SupArchList) & set(ArchList)
if len(TargetArchList) == 0:
EdkLogger.error("GenFds", GENFDS_ERROR, "Target ARCH %s not in platform supported ARCH %s" % (str(ArchList), str(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, TAB_COMMON].SupArchList)))
-
+
for Arch in ArchList:
GenFdsGlobalVariable.OutputDirFromDscDict[Arch] = NormPath(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, Options.BuildTarget, Options.ToolChain].OutputDirectory)
GenFdsGlobalVariable.PlatformName = BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, Options.BuildTarget, Options.ToolChain].PlatformName
@@ -550,7 +550,7 @@ class GenFds :
Buffer = StringIO.StringIO('')
FvObj.AddToBuffer(Buffer)
Buffer.close()
-
+
if GenFds.OnlyGenerateThisFv is None and GenFds.OnlyGenerateThisFd is None and GenFds.OnlyGenerateThisCap is None:
if GenFdsGlobalVariable.FdfParser.Profile.CapsuleDict != {}:
GenFdsGlobalVariable.VerboseLogger("\n Generate other Capsule images!")
@@ -616,7 +616,7 @@ class GenFds :
# @retval None
#
def DisplayFvSpaceInfo(FdfParser):
-
+
FvSpaceInfoList = []
MaxFvNameLength = 0
for FvName in FdfParser.Profile.FvDict:
@@ -643,10 +643,10 @@ class GenFds :
if NameValue[0].strip() == 'EFI_FV_SPACE_SIZE':
FreeFound = True
Free = NameValue[1].strip()
-
+
if TotalFound and UsedFound and FreeFound:
FvSpaceInfoList.append((FvName, Total, Used, Free))
-
+
GenFdsGlobalVariable.InfLogger('\nFV Space Information')
for FvSpaceInfo in FvSpaceInfoList:
Name = FvSpaceInfo[0]
@@ -674,18 +674,18 @@ class GenFds :
if PcdObj.TokenCName == 'PcdBsBaseAddress':
PcdValue = PcdObj.DefaultValue
break
-
+
if PcdValue == '':
return
-
+
Int64PcdValue = long(PcdValue, 0)
- if Int64PcdValue == 0 or Int64PcdValue < -1:
+ if Int64PcdValue == 0 or Int64PcdValue < -1:
return
-
+
TopAddress = 0
if Int64PcdValue > 0:
TopAddress = Int64PcdValue
-
+
ModuleDict = BuildDb.BuildObject[DscFile, TAB_COMMON, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag].Modules
for Key in ModuleDict:
ModuleObj = BuildDb.BuildObject[Key, TAB_COMMON, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
index 6745a89514b7..fac9fee0bea6 100644
--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
+++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
@@ -64,7 +64,7 @@ class GenFdsGlobalVariable:
FdfFileTimeStamp = 0
FixedLoadAddress = False
PlatformName = ''
-
+
BuildRuleFamily = "MSFT"
ToolChainFamily = "MSFT"
__BuildRuleDatabase = None
@@ -74,7 +74,7 @@ class GenFdsGlobalVariable:
CopyList = []
ModuleFile = ''
EnableGenfdsMultiThread = False
-
+
#
# The list whose element are flags to indicate if large FFS or SECTION files exist in FV.
# At the beginning of each generation of FV, false flag is appended to the list,
@@ -89,7 +89,7 @@ class GenFdsGlobalVariable:
LARGE_FILE_SIZE = 0x1000000
SectionHeader = struct.Struct("3B 1B")
-
+
## LoadBuildRule
#
@staticmethod
@@ -116,7 +116,7 @@ class GenFdsGlobalVariable:
and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY] \
and ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag]:
GenFdsGlobalVariable.BuildRuleFamily = ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag]
-
+
if DataType.TAB_TOD_DEFINES_FAMILY in ToolDefinition \
and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY] \
and ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY][GenFdsGlobalVariable.ToolChainTag]:
@@ -228,11 +228,11 @@ class GenFdsGlobalVariable:
while Index < len(SourceList):
Source = SourceList[Index]
Index = Index + 1
-
+
if File.IsBinary and File == Source and Inf.Binaries is not None and File in Inf.Binaries:
# Skip all files that are not binary libraries
if not Inf.LibraryClass:
- continue
+ continue
RuleObject = BuildRules[DataType.TAB_DEFAULT_BINARY_FILE]
elif FileType in BuildRules:
RuleObject = BuildRules[FileType]
@@ -243,15 +243,15 @@ class GenFdsGlobalVariable:
if LastTarget:
TargetList.add(str(LastTarget))
break
-
+
FileType = RuleObject.SourceFileType
-
+
# stop at STATIC_LIBRARY for library
if Inf.LibraryClass and FileType == DataType.TAB_STATIC_LIBRARY:
if LastTarget:
TargetList.add(str(LastTarget))
break
-
+
Target = RuleObject.Apply(Source)
if not Target:
if LastTarget:
@@ -260,11 +260,11 @@ class GenFdsGlobalVariable:
elif not Target.Outputs:
# Only do build for target with outputs
TargetList.add(str(Target))
-
+
# to avoid cyclic rule
if FileType in RuleChain:
break
-
+
RuleChain.append(FileType)
SourceList.extend(Target.Outputs)
LastTarget = Target
@@ -647,19 +647,19 @@ class GenFdsGlobalVariable:
@staticmethod
def GenerateOptionRom(Output, EfiInput, BinaryInput, Compress=False, ClassCode=None,
Revision=None, DeviceId=None, VendorId=None, IsMakefile=False):
- InputList = []
+ InputList = []
Cmd = ["EfiRom"]
if len(EfiInput) > 0:
-
+
if Compress:
Cmd += ["-ec"]
else:
Cmd += ["-e"]
-
+
for EfiFile in EfiInput:
Cmd += [EfiFile]
InputList.append (EfiFile)
-
+
if len(BinaryInput) > 0:
Cmd += ["-b"]
for BinFile in BinaryInput:
@@ -670,7 +670,7 @@ class GenFdsGlobalVariable:
if not GenFdsGlobalVariable.NeedsUpdate(Output, InputList) and not IsMakefile:
return
GenFdsGlobalVariable.DebugLogger(EdkLogger.DEBUG_5, "%s needs update because of newer %s" % (Output, InputList))
-
+
if ClassCode is not None:
Cmd += ["-l", ClassCode]
if Revision is not None:
@@ -813,7 +813,7 @@ class GenFdsGlobalVariable:
EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern)
if PcdObj.DatumType != DataType.TAB_VOID:
EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern)
-
+
PcdValue = PcdObj.DefaultValue
return PcdValue
@@ -829,7 +829,7 @@ class GenFdsGlobalVariable:
EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern)
if PcdObj.DatumType != DataType.TAB_VOID:
EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern)
-
+
PcdValue = PcdObj.DefaultValue
return PcdValue
diff --git a/BaseTools/Source/Python/GenFds/GuidSection.py b/BaseTools/Source/Python/GenFds/GuidSection.py
index 08665a3d4d49..eebdafd823bb 100644
--- a/BaseTools/Source/Python/GenFds/GuidSection.py
+++ b/BaseTools/Source/Python/GenFds/GuidSection.py
@@ -74,7 +74,7 @@ class GuidSection(GuidSectionClassObject) :
FvAddrIsSet = True
else:
FvAddrIsSet = False
-
+
if self.ProcessRequired in ("TRUE", "1"):
if self.FvAddr != []:
#no use FvAddr when the image is processed.
diff --git a/BaseTools/Source/Python/GenFds/OptRomFileStatement.py b/BaseTools/Source/Python/GenFds/OptRomFileStatement.py
index 4ef9b4d0e9a8..744c2b0422d9 100644
--- a/BaseTools/Source/Python/GenFds/OptRomFileStatement.py
+++ b/BaseTools/Source/Python/GenFds/OptRomFileStatement.py
@@ -18,7 +18,7 @@
import Common.LongFilePathOs as os
from GenFdsGlobalVariable import GenFdsGlobalVariable
-##
+##
#
#
class OptRomFileStatement:
@@ -40,10 +40,10 @@ class OptRomFileStatement:
# @retval string Generated FFS file name
#
def GenFfs(self, Dict = {}, IsMakefile=False):
-
+
if self.FileName is not None:
self.FileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FileName)
-
+
return self.FileName
diff --git a/BaseTools/Source/Python/GenFds/OptRomInfStatement.py b/BaseTools/Source/Python/GenFds/OptRomInfStatement.py
index 62d731fb9cca..1ef82f7106a1 100644
--- a/BaseTools/Source/Python/GenFds/OptRomInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/OptRomInfStatement.py
@@ -26,7 +26,7 @@ from Common.String import *
from FfsInfStatement import FfsInfStatement
from GenFdsGlobalVariable import GenFdsGlobalVariable
-##
+##
#
#
class OptRomInfStatement (FfsInfStatement):
@@ -45,7 +45,7 @@ class OptRomInfStatement (FfsInfStatement):
# @param self The object pointer
#
def __GetOptRomParams(self):
-
+
if self.OverrideAttribs is None:
self.OverrideAttribs = OptionRom.OverrideAttribs()
@@ -59,21 +59,21 @@ class OptRomInfStatement (FfsInfStatement):
if self.OverrideAttribs.PciVendorId is None:
self.OverrideAttribs.PciVendorId = self.OptRomDefs.get ('PCI_VENDOR_ID')
-
+
if self.OverrideAttribs.PciClassCode is None:
self.OverrideAttribs.PciClassCode = self.OptRomDefs.get ('PCI_CLASS_CODE')
-
+
if self.OverrideAttribs.PciDeviceId is None:
self.OverrideAttribs.PciDeviceId = self.OptRomDefs.get ('PCI_DEVICE_ID')
-
+
if self.OverrideAttribs.PciRevision is None:
self.OverrideAttribs.PciRevision = self.OptRomDefs.get ('PCI_REVISION')
-
-# InfObj = GenFdsGlobalVariable.WorkSpace.BuildObject[self.PathClassObj, self.CurrentArch]
+
+# InfObj = GenFdsGlobalVariable.WorkSpace.BuildObject[self.PathClassObj, self.CurrentArch]
# RecordList = InfObj._RawData[MODEL_META_DATA_HEADER, InfObj._Arch, InfObj._Platform]
# for Record in RecordList:
# Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
-# Name = Record[0]
+# Name = Record[0]
## GenFfs() method
#
# Generate FFS
@@ -148,8 +148,7 @@ class OptRomInfStatement (FfsInfStatement):
OutputFileList.append(GenSecInputFile)
else:
FileList, IsSect = Section.Section.GetFileList(self, '', Sect.FileExtension)
- OutputFileList.extend(FileList)
-
+ OutputFileList.extend(FileList)
+
return OutputFileList
-
\ No newline at end of file
diff --git a/BaseTools/Source/Python/GenFds/OptionRom.py b/BaseTools/Source/Python/GenFds/OptionRom.py
index b05841529940..7373a6a2f0bf 100644
--- a/BaseTools/Source/Python/GenFds/OptionRom.py
+++ b/BaseTools/Source/Python/GenFds/OptionRom.py
@@ -29,7 +29,7 @@ from Common.BuildToolError import *
T_CHAR_LF = '\n'
-##
+##
#
#
class OPTIONROM (OptionRomClassObject):
@@ -58,7 +58,7 @@ class OPTIONROM (OptionRomClassObject):
# Process Modules in FfsList
for FfsFile in self.FfsList :
-
+
if isinstance(FfsFile, OptRomInfStatement.OptRomInfStatement):
FilePathNameList = FfsFile.GenFfs(IsMakefile=Flag)
if len(FilePathNameList) == 0:
@@ -71,14 +71,14 @@ class OPTIONROM (OptionRomClassObject):
if not os.path.exists(TmpOutputDir) :
os.makedirs(TmpOutputDir)
TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp')
-
- GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,
- FilePathNameList,
- [],
- FfsFile.OverrideAttribs.NeedCompress,
- FfsFile.OverrideAttribs.PciClassCode,
- FfsFile.OverrideAttribs.PciRevision,
- FfsFile.OverrideAttribs.PciDeviceId,
+
+ GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,
+ FilePathNameList,
+ [],
+ FfsFile.OverrideAttribs.NeedCompress,
+ FfsFile.OverrideAttribs.PciClassCode,
+ FfsFile.OverrideAttribs.PciRevision,
+ FfsFile.OverrideAttribs.PciDeviceId,
FfsFile.OverrideAttribs.PciVendorId,
IsMakefile = Flag)
BinFileList.append(TmpOutputFile)
@@ -90,14 +90,14 @@ class OPTIONROM (OptionRomClassObject):
if not os.path.exists(TmpOutputDir) :
os.makedirs(TmpOutputDir)
TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp')
-
- GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,
- [FilePathName],
- [],
- FfsFile.OverrideAttribs.NeedCompress,
- FfsFile.OverrideAttribs.PciClassCode,
- FfsFile.OverrideAttribs.PciRevision,
- FfsFile.OverrideAttribs.PciDeviceId,
+
+ GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,
+ [FilePathName],
+ [],
+ FfsFile.OverrideAttribs.NeedCompress,
+ FfsFile.OverrideAttribs.PciClassCode,
+ FfsFile.OverrideAttribs.PciRevision,
+ FfsFile.OverrideAttribs.PciDeviceId,
FfsFile.OverrideAttribs.PciVendorId,
IsMakefile=Flag)
BinFileList.append(TmpOutputFile)
@@ -106,13 +106,13 @@ class OPTIONROM (OptionRomClassObject):
EfiFileList.append(FilePathName)
else:
BinFileList.append(FilePathName)
-
+
#
# Call EfiRom tool
#
OutputFile = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName)
OutputFile = OutputFile + '.rom'
-
+
GenFdsGlobalVariable.GenerateOptionRom(
OutputFile,
EfiFileList,
@@ -122,21 +122,20 @@ class OPTIONROM (OptionRomClassObject):
if not Flag:
GenFdsGlobalVariable.InfLogger( "\nGenerate %s Option ROM Successfully" %self.DriverName)
GenFdsGlobalVariable.SharpCounter = 0
-
+
return OutputFile
class OverrideAttribs:
-
+
## The constructor
#
# @param self The object pointer
#
def __init__(self):
-
+
self.PciVendorId = None
self.PciClassCode = None
self.PciDeviceId = None
self.PciRevision = None
self.NeedCompress = None
-
-
\ No newline at end of file
+
diff --git a/BaseTools/Source/Python/GenFds/Region.py b/BaseTools/Source/Python/GenFds/Region.py
index 44f122a71216..1042281fe314 100644
--- a/BaseTools/Source/Python/GenFds/Region.py
+++ b/BaseTools/Source/Python/GenFds/Region.py
@@ -309,7 +309,7 @@ class Region(RegionClassObject):
if self.Offset >= End:
Start = End
continue
- # region located in current blocks
+ # region located in current blocks
else:
# region ended within current blocks
if self.Offset + self.Size <= End:
@@ -361,5 +361,5 @@ class Region(RegionClassObject):
else:
Index += 1
-
+
diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py
index 4b368b3ada9d..ce10c35dc880 100644
--- a/BaseTools/Source/Python/GenFds/Section.py
+++ b/BaseTools/Source/Python/GenFds/Section.py
@@ -160,7 +160,7 @@ class Section (SectionClassObject):
SuffixMap = FfsInf.GetFinalTargetSuffixMap()
if Suffix in SuffixMap:
FileList.extend(SuffixMap[Suffix])
-
+
#Process the file lists is alphabetical for a same section type
if len (FileList) > 1:
FileList.sort()
diff --git a/BaseTools/Source/Python/GenFds/Vtf.py b/BaseTools/Source/Python/GenFds/Vtf.py
index 18ea37b9afdd..beb3200f23e6 100644
--- a/BaseTools/Source/Python/GenFds/Vtf.py
+++ b/BaseTools/Source/Python/GenFds/Vtf.py
@@ -25,7 +25,7 @@ T_CHAR_LF = '\n'
#
#
class Vtf (VtfClassObject):
-
+
## The constructor
#
# @param self The object pointer
@@ -46,7 +46,7 @@ class Vtf (VtfClassObject):
OutputFile = os.path.join(GenFdsGlobalVariable.FvDir, self.UiName + '.Vtf')
BaseAddArg = self.GetBaseAddressArg(FdAddressDict)
OutputArg, VtfRawDict = self.GenOutputArg()
-
+
Cmd = (
'GenVtf',
) + OutputArg + (
@@ -55,9 +55,9 @@ class Vtf (VtfClassObject):
GenFdsGlobalVariable.CallExternalTool(Cmd, "GenFv -Vtf Failed!")
GenFdsGlobalVariable.SharpCounter = 0
-
+
return VtfRawDict
-
+
## GenBsfInf() method
#
# Generate inf used to generate VTF
@@ -154,7 +154,7 @@ class Vtf (VtfClassObject):
for component in self.ComponentStatementList :
if component.CompLoc.upper() != 'NONE' and not (component.CompLoc.upper() in FvList):
FvList.append(component.CompLoc.upper())
-
+
return FvList
## GetBaseAddressArg() method
@@ -173,13 +173,13 @@ class Vtf (VtfClassObject):
'-s', '0x%x' % Size,
)
return CmdStr
-
+
## GenOutputArg() method
#
# Get output arguments for GenVtf
#
# @param self The object pointer
- #
+ #
def GenOutputArg(self):
FvVtfDict = {}
OutputFileName = ''
@@ -192,6 +192,6 @@ class Vtf (VtfClassObject):
OutputFileName = os.path.join(GenFdsGlobalVariable.FvDir, OutputFileName)
Arg += ('-o', OutputFileName)
FvVtfDict[FvObj.upper()] = OutputFileName
-
+
return Arg, FvVtfDict
-
+
diff --git a/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py b/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
index ebd6a306390b..bf01de35a6e6 100644
--- a/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
+++ b/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
@@ -1,7 +1,7 @@
## @file
# Generate PCD table for 'Patchable In Module' type PCD with given .map file.
# The Patch PCD table like:
-#
+#
# PCD Name Offset in binary
# ======== ================
#
@@ -39,9 +39,9 @@ __copyright__ = "Copyright (c) 2008 - 2010, Intel Corporation. All rights reserv
symRe = re.compile('^([\da-fA-F]+):([\da-fA-F]+) +([\.\-:\\\\\w\?@\$<>]+) +([\da-fA-F]+)', re.UNICODE)
def parsePcdInfoFromMapFile(mapfilepath, efifilepath):
- """ Parse map file to get binary patch pcd information
+ """ Parse map file to get binary patch pcd information
@param path Map file absolution path
-
+
@return a list which element hold (PcdName, Offset, SectionName)
"""
lines = []
@@ -51,7 +51,7 @@ def parsePcdInfoFromMapFile(mapfilepath, efifilepath):
f.close()
except:
return None
-
+
if len(lines) == 0: return None
firstline = lines[0].strip()
if (firstline.startswith("Archive member included ") and
@@ -110,7 +110,7 @@ def _parseForGCC(lines, efifilepath):
m = pcdPatternGcc.match(lines[index + 1].strip())
if m is not None:
bpcds.append((PcdName, int(m.groups(0)[0], 16) , int(sections[-1][1], 16), sections[-1][0]))
-
+
# get section information from efi file
efisecs = PeImageClass(efifilepath).SectionHeaderList
if efisecs is None or len(efisecs) == 0:
@@ -128,11 +128,11 @@ def _parseForGCC(lines, efifilepath):
#assert efisec[0].strip() == pcd[3].strip() and efisec[1] + redirection == pcd[2], "There are some differences between map file and efi file"
pcds.append([pcd[0], efisec[2] + pcd[1] - efisec[1] - redirection, efisec[0]])
return pcds
-
+
def _parseGeneral(lines, efifilepath):
- """ For MSFT, ICC, EBC
+ """ For MSFT, ICC, EBC
@param lines line array for map file
-
+
@return a list which element hold (PcdName, Offset, SectionName)
"""
status = 0 #0 - beginning of file; 1 - PE section definition; 2 - symbol table
@@ -176,7 +176,7 @@ def _parseGeneral(lines, efifilepath):
efisecs = PeImageClass(efifilepath).SectionHeaderList
if efisecs is None or len(efisecs) == 0:
return None
-
+
pcds = []
for pcd in bPcds:
index = 0
@@ -187,7 +187,7 @@ def _parseGeneral(lines, efifilepath):
elif pcd[4] == index:
pcds.append([pcd[0], efisec[2] + pcd[2], efisec[0]])
return pcds
-
+
def generatePcdTable(list, pcdpath):
try:
f = open(pcdpath, 'w')
@@ -195,12 +195,12 @@ def generatePcdTable(list, pcdpath):
pass
f.write('PCD Name Offset Section Name\r\n')
-
+
for pcditem in list:
f.write('%-30s 0x%-08X %-6s\r\n' % (pcditem[0], pcditem[1], pcditem[2]))
f.close()
- #print 'Success to generate Binary Patch PCD table at %s!' % pcdpath
+ #print 'Success to generate Binary Patch PCD table at %s!' % pcdpath
if __name__ == '__main__':
UsageString = "%prog -m <MapFile> -e <EfiFile> -o <OutFile>"
@@ -212,7 +212,7 @@ if __name__ == '__main__':
help='Absolute path of EFI binary file.')
parser.add_option('-o', '--outputfile', action='store', dest='outfile',
help='Absolute path of output file to store the got patchable PCD table.')
-
+
(options, args) = parser.parse_args()
if options.mapfile is None or options.efifile is None:
diff --git a/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py b/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py
index cf2fc7c4f70a..1feec1313f95 100644
--- a/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py
+++ b/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py
@@ -35,9 +35,9 @@ __copyright__ = "Copyright (c) 2010, Intel Corporation. All rights reserved."
## PatchBinaryFile method
#
# This method mainly patches the data into binary file.
-#
+#
# @param FileName File path of the binary file
-# @param ValueOffset Offset value
+# @param ValueOffset Offset value
# @param TypeName DataType Name
# @param Value Value String
# @param MaxSize MaxSize value
@@ -173,7 +173,7 @@ def PatchBinaryFile(FileName, ValueOffset, TypeName, ValueString, MaxSize=0):
return PARAMETER_INVALID, "PCD Value %s is not valid dec or hex string array." % (ValueString)
else:
#
- # Patch ascii string
+ # Patch ascii string
#
Index = 0
for ByteString in ValueString[1:-1]:
diff --git a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py
index 9711de8f5c2e..6e28b351488d 100644
--- a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py
+++ b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py
@@ -1,11 +1,11 @@
## @file
-# This tool can be used to generate new RSA 2048 bit private/public key pairs
-# in a PEM file format using OpenSSL command line utilities that are installed
+# This tool can be used to generate new RSA 2048 bit private/public key pairs
+# in a PEM file format using OpenSSL command line utilities that are installed
# on the path specified by the system environment variable OPENSSL_PATH.
-# This tool can also optionally write one or more SHA 256 hashes of 2048 bit
-# public keys to a binary file, write one or more SHA 256 hashes of 2048 bit
-# public keys to a file in a C structure format, and in verbose mode display
-# one or more SHA 256 hashes of 2048 bit public keys in a C structure format
+# This tool can also optionally write one or more SHA 256 hashes of 2048 bit
+# public keys to a binary file, write one or more SHA 256 hashes of 2048 bit
+# public keys to a file in a C structure format, and in verbose mode display
+# one or more SHA 256 hashes of 2048 bit public keys in a C structure format
# on STDOUT.
# This tool has been tested with OpenSSL 1.0.1e 11 Feb 2013
#
@@ -25,7 +25,7 @@ Rsa2048Sha256GenerateKeys
import os
import sys
-import argparse
+import argparse
import subprocess
from Common.BuildVersion import gBUILD_VERSION
@@ -41,7 +41,7 @@ __usage__ = '%s [options]' % (__prog__)
if __name__ == '__main__':
#
# Create command line argument parser object
- #
+ #
parser = argparse.ArgumentParser(prog=__prog__, version=__version__, usage=__usage__, description=__copyright__, conflict_handler='resolve')
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument("-o", "--output", dest='OutputFile', type=argparse.FileType('wb'), metavar='filename', nargs='*', help="specify the output private key filename in PEM format")
@@ -54,7 +54,7 @@ if __name__ == '__main__':
#
# Parse command line arguments
- #
+ #
args = parser.parse_args()
#
@@ -74,18 +74,18 @@ if __name__ == '__main__':
#
try:
Process = subprocess.Popen('%s version' % (OpenSslCommand), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
- except:
+ except:
print 'ERROR: Open SSL command not available. Please verify PATH or set OPENSSL_PATH'
sys.exit(1)
-
+
Version = Process.communicate()
if Process.returncode <> 0:
print 'ERROR: Open SSL command not available. Please verify PATH or set OPENSSL_PATH'
sys.exit(Process.returncode)
print Version[0]
-
+
args.PemFileName = []
-
+
#
# Check for output file argument
#
@@ -105,7 +105,7 @@ if __name__ == '__main__':
if Process.returncode <> 0:
print 'ERROR: RSA 2048 key generation failed'
sys.exit(Process.returncode)
-
+
#
# Check for input file argument
#
@@ -157,7 +157,7 @@ if __name__ == '__main__':
for Item in PublicKeyHash:
PublicKeyHashC = PublicKeyHashC + '0x%02x, ' % (ord(Item))
PublicKeyHashC = PublicKeyHashC[:-2] + '}'
-
+
#
# Write SHA 256 of 2048 bit binary public key to public key hash C structure file
#
@@ -166,9 +166,9 @@ if __name__ == '__main__':
args.PublicKeyHashCFile.close ()
except:
pass
-
+
#
# If verbose is enabled display the public key in C structure format
#
if args.Verbose:
- print 'PublicKeySha256 = ' + PublicKeyHashC
+ print 'PublicKeySha256 = ' + PublicKeyHashC
diff --git a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py
index d36a14ffb775..1db9bb9f9705 100644
--- a/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py
+++ b/BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py
@@ -20,7 +20,7 @@ Rsa2048Sha256Sign
import os
import sys
-import argparse
+import argparse
import subprocess
import uuid
import struct
@@ -60,7 +60,7 @@ TEST_SIGNING_PRIVATE_KEY_FILENAME = 'TestSigningPrivateKey.pem'
if __name__ == '__main__':
#
# Create command line argument parser object
- #
+ #
parser = argparse.ArgumentParser(prog=__prog__, version=__version__, usage=__usage__, description=__copyright__, conflict_handler='resolve')
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument("-e", action="store_true", dest='Encode', help='encode file')
@@ -75,7 +75,7 @@ if __name__ == '__main__':
#
# Parse command line arguments
- #
+ #
args = parser.parse_args()
#
@@ -95,19 +95,19 @@ if __name__ == '__main__':
#
try:
Process = subprocess.Popen('%s version' % (OpenSslCommand), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
- except:
+ except:
print 'ERROR: Open SSL command not available. Please verify PATH or set OPENSSL_PATH'
sys.exit(1)
-
+
Version = Process.communicate()
if Process.returncode <> 0:
print 'ERROR: Open SSL command not available. Please verify PATH or set OPENSSL_PATH'
sys.exit(Process.returncode)
print Version[0]
-
+
#
# Read input file into a buffer and save input filename
- #
+ #
args.InputFileName = args.InputFile.name
args.InputFileBuffer = args.InputFile.read()
args.InputFile.close()
@@ -173,17 +173,17 @@ if __name__ == '__main__':
if args.MonotonicCountStr:
format = "%dsQ" % len(args.InputFileBuffer)
FullInputFileBuffer = struct.pack(format, args.InputFileBuffer, args.MonotonicCountValue)
- #
+ #
# Sign the input file using the specified private key and capture signature from STDOUT
#
Process = subprocess.Popen('%s dgst -sha256 -sign "%s"' % (OpenSslCommand, args.PrivateKeyFileName), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
Signature = Process.communicate(input=FullInputFileBuffer)[0]
if Process.returncode <> 0:
sys.exit(Process.returncode)
-
+
#
# Write output file that contains hash GUID, Public Key, Signature, and Input data
- #
+ #
args.OutputFile = open(args.OutputFileName, 'wb')
args.OutputFile.write(EFI_HASH_ALGORITHM_SHA256_GUID.get_bytes_le())
args.OutputFile.write(PublicKey)
@@ -197,7 +197,7 @@ if __name__ == '__main__':
#
Header = EFI_CERT_BLOCK_RSA_2048_SHA256._make(EFI_CERT_BLOCK_RSA_2048_SHA256_STRUCT.unpack_from(args.InputFileBuffer))
args.InputFileBuffer = args.InputFileBuffer[EFI_CERT_BLOCK_RSA_2048_SHA256_STRUCT.size:]
-
+
#
# Verify that the Hash Type matches the expected SHA256 type
#
@@ -221,10 +221,10 @@ if __name__ == '__main__':
# Write Signature to output file
#
open(args.OutputFileName, 'wb').write(Header.Signature)
-
+
#
# Verify signature
- #
+ #
Process = subprocess.Popen('%s dgst -sha256 -prverify "%s" -signature %s' % (OpenSslCommand, args.PrivateKeyFileName, args.OutputFileName), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
Process.communicate(input=FullInputFileBuffer)
if Process.returncode <> 0:
@@ -233,6 +233,6 @@ if __name__ == '__main__':
sys.exit(Process.returncode)
#
- # Save output file contents from input file
- #
+ # Save output file contents from input file
+ #
open(args.OutputFileName, 'wb').write(args.InputFileBuffer)
diff --git a/BaseTools/Source/Python/Table/Table.py b/BaseTools/Source/Python/Table/Table.py
index c311df91c2ec..846f76718220 100644
--- a/BaseTools/Source/Python/Table/Table.py
+++ b/BaseTools/Source/Python/Table/Table.py
@@ -19,7 +19,7 @@ import Common.EdkLogger as EdkLogger
## TableFile
#
# This class defined a common table
-#
+#
# @param object: Inherited from object class
#
# @param Cursor: Cursor of the database
@@ -30,7 +30,7 @@ class Table(object):
self.Cur = Cursor
self.Table = ''
self.ID = 0
-
+
## Create table
#
# Create a table
@@ -46,18 +46,18 @@ class Table(object):
#
def Insert(self, SqlCommand):
self.Exec(SqlCommand)
-
+
## Query table
#
# Query all records of the table
- #
+ #
def Query(self):
EdkLogger.verbose("\nQuery tabel %s started ..." % self.Table)
SqlCommand = """select * from %s""" % self.Table
self.Cur.execute(SqlCommand)
for Rs in self.Cur:
EdkLogger.verbose(str(Rs))
-
+
TotalCount = self.GetCount()
EdkLogger.verbose("*** Total %s records in table %s ***" % (TotalCount, self.Table) )
EdkLogger.verbose("Query tabel %s DONE!" % self.Table)
@@ -70,7 +70,7 @@ class Table(object):
SqlCommand = """drop table IF EXISTS %s""" % self.Table
self.Cur.execute(SqlCommand)
EdkLogger.verbose("Drop tabel %s ... DONE!" % self.Table)
-
+
## Get count
#
# Get a count of all records of the table
@@ -82,12 +82,12 @@ class Table(object):
self.Cur.execute(SqlCommand)
for Item in self.Cur:
return Item[0]
-
+
## Generate ID
#
# Generate an ID if input ID is -1
#
- # @param ID: Input ID
+ # @param ID: Input ID
#
# @retval ID: New generated ID
#
@@ -96,14 +96,14 @@ class Table(object):
self.ID = self.ID + 1
return self.ID
-
+
## Init the ID of the table
#
# Init the ID of the table
#
def InitID(self):
self.ID = self.GetCount()
-
+
## Exec
#
# Exec Sql Command, return result
diff --git a/BaseTools/Source/Python/Table/TableDataModel.py b/BaseTools/Source/Python/Table/TableDataModel.py
index 9c3d7bd9345f..b939bc217518 100644
--- a/BaseTools/Source/Python/Table/TableDataModel.py
+++ b/BaseTools/Source/Python/Table/TableDataModel.py
@@ -22,7 +22,7 @@ from Common.String import ConvertToSqlString
## TableDataModel
#
# This class defined a table used for data model
-#
+#
# @param object: Inherited from object class
#
#
@@ -30,7 +30,7 @@ class TableDataModel(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'DataModel'
-
+
## Create table
#
# Create table DataModel
@@ -62,13 +62,13 @@ class TableDataModel(Table):
(Name, Description) = ConvertToSqlString((Name, Description))
SqlCommand = """insert into %s values(%s, %s, '%s', '%s')""" % (self.Table, self.ID, CrossIndex, Name, Description)
Table.Insert(self, SqlCommand)
-
+
return self.ID
-
+
## Init table
#
# Create all default records of table DataModel
- #
+ #
def InitTable(self):
EdkLogger.verbose("\nInitialize table DataModel started ...")
for Item in DataClass.MODEL_LIST:
@@ -77,7 +77,7 @@ class TableDataModel(Table):
Description = Item[0]
self.Insert(CrossIndex, Name, Description)
EdkLogger.verbose("Initialize table DataModel ... DONE!")
-
+
## Get CrossIndex
#
# Get a model's cross index from its name
@@ -91,5 +91,5 @@ class TableDataModel(Table):
self.Cur.execute(SqlCommand)
for Item in self.Cur:
CrossIndex = Item[0]
-
+
return CrossIndex
diff --git a/BaseTools/Source/Python/Table/TableDec.py b/BaseTools/Source/Python/Table/TableDec.py
index 6b7d22c9384c..9daa5a008e6c 100644
--- a/BaseTools/Source/Python/Table/TableDec.py
+++ b/BaseTools/Source/Python/Table/TableDec.py
@@ -22,7 +22,7 @@ from Common.String import ConvertToSqlString
## TableDec
#
# This class defined a table used for data model
-#
+#
# @param object: Inherited from object class
#
#
@@ -30,7 +30,7 @@ class TableDec(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Dec'
-
+
## Create table
#
# Create table Dec
@@ -90,14 +90,14 @@ class TableDec(Table):
SqlCommand = """insert into %s values(%s, %s, '%s', '%s', '%s', '%s', %s, %s, %s, %s, %s, %s, %s)""" \
% (self.Table, self.ID, Model, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine, StartColumn, EndLine, EndColumn, Enabled)
Table.Insert(self, SqlCommand)
-
+
return self.ID
-
+
## Query table
#
- # @param Model: The Model of Record
+ # @param Model: The Model of Record
#
- # @retval: A recordSet of all found records
+ # @retval: A recordSet of all found records
#
def Query(self, Model):
SqlCommand = """select ID, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine from %s
diff --git a/BaseTools/Source/Python/Table/TableDsc.py b/BaseTools/Source/Python/Table/TableDsc.py
index 69477d544d8e..10d384dc39fa 100644
--- a/BaseTools/Source/Python/Table/TableDsc.py
+++ b/BaseTools/Source/Python/Table/TableDsc.py
@@ -22,7 +22,7 @@ from Common.String import ConvertToSqlString
## TableDsc
#
# This class defined a table used for data model
-#
+#
# @param object: Inherited from object class
#
#
@@ -30,7 +30,7 @@ class TableDsc(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Dsc'
-
+
## Create table
#
# Create table Dsc
@@ -90,14 +90,14 @@ class TableDsc(Table):
SqlCommand = """insert into %s values(%s, %s, '%s', '%s', '%s', '%s', %s, %s, %s, %s, %s, %s, %s)""" \
% (self.Table, self.ID, Model, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine, StartColumn, EndLine, EndColumn, Enabled)
Table.Insert(self, SqlCommand)
-
+
return self.ID
-
+
## Query table
#
- # @param Model: The Model of Record
+ # @param Model: The Model of Record
#
- # @retval: A recordSet of all found records
+ # @retval: A recordSet of all found records
#
def Query(self, Model):
SqlCommand = """select ID, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine from %s
diff --git a/BaseTools/Source/Python/Table/TableEotReport.py b/BaseTools/Source/Python/Table/TableEotReport.py
index 740105c8f99d..35ac291eb443 100644
--- a/BaseTools/Source/Python/Table/TableEotReport.py
+++ b/BaseTools/Source/Python/Table/TableEotReport.py
@@ -24,7 +24,7 @@ import Eot.EotGlobalData as EotGlobalData
## TableReport
#
# This class defined a table used for data model
-#
+#
# @param object: Inherited from object class
#
#
@@ -32,7 +32,7 @@ class TableEotReport(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Report'
-
+
## Create table
#
# Create table report
@@ -68,7 +68,7 @@ class TableEotReport(Table):
% (self.Table, self.ID, ModuleID, ModuleName, ModuleGuid, SourceFileID, SourceFileFullPath, \
ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, Enabled)
Table.Insert(self, SqlCommand)
-
+
def GetMaxID(self):
SqlCommand = """select max(ID) from %s""" % self.Table
self.Cur.execute(SqlCommand)
diff --git a/BaseTools/Source/Python/Table/TableFdf.py b/BaseTools/Source/Python/Table/TableFdf.py
index 927b5d1a3be6..2ee836e93b0a 100644
--- a/BaseTools/Source/Python/Table/TableFdf.py
+++ b/BaseTools/Source/Python/Table/TableFdf.py
@@ -22,7 +22,7 @@ from Common.String import ConvertToSqlString
## TableFdf
#
# This class defined a table used for data model
-#
+#
# @param object: Inherited from object class
#
#
@@ -30,7 +30,7 @@ class TableFdf(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Fdf'
-
+
## Create table
#
# Create table Fdf
@@ -91,14 +91,14 @@ class TableFdf(Table):
SqlCommand = """insert into %s values(%s, %s, '%s', '%s', '%s', '%s', '%s', %s, %s, %s, %s, %s, %s, %s)""" \
% (self.Table, self.ID, Model, Value1, Value2, Value3, Scope1, Scope2, BelongsToItem, BelongsToFile, StartLine, StartColumn, EndLine, EndColumn, Enabled)
Table.Insert(self, SqlCommand)
-
+
return self.ID
-
+
## Query table
#
- # @param Model: The Model of Record
+ # @param Model: The Model of Record
#
- # @retval: A recordSet of all found records
+ # @retval: A recordSet of all found records
#
def Query(self, Model):
SqlCommand = """select ID, Value1, Value2, Value3, Scope1, Scope2, BelongsToItem, BelongsToFile, StartLine from %s
diff --git a/BaseTools/Source/Python/Table/TableFile.py b/BaseTools/Source/Python/Table/TableFile.py
index caf749e9d3c5..723b19b69d81 100644
--- a/BaseTools/Source/Python/Table/TableFile.py
+++ b/BaseTools/Source/Python/Table/TableFile.py
@@ -23,14 +23,14 @@ from CommonDataClass.DataClass import FileClass
## TableFile
#
# This class defined a table used for file
-#
+#
# @param object: Inherited from object class
#
class TableFile(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'File'
-
+
## Create table
#
# Create table File
@@ -72,15 +72,15 @@ class TableFile(Table):
SqlCommand = """insert into %s values(%s, '%s', '%s', '%s', '%s', %s, '%s')""" \
% (self.Table, self.ID, Name, ExtName, Path, FullPath, Model, TimeStamp)
Table.Insert(self, SqlCommand)
-
+
return self.ID
## InsertFile
#
# Insert one file to table
#
# @param FileFullPath: The full path of the file
- # @param Model: The model of the file
- #
+ # @param Model: The model of the file
+ #
# @retval FileID: The ID after record is inserted
#
def InsertFile(self, FileFullPath, Model):
@@ -89,7 +89,7 @@ class TableFile(Table):
TimeStamp = os.stat(FileFullPath)[8]
File = FileClass(-1, Name, Ext, Filepath, FileFullPath, Model, '', [], [], [])
return self.Insert(File.Name, File.ExtName, File.Path, File.FullPath, File.Model, TimeStamp)
-
+
## Get ID of a given file
#
# @param FilePath Path of file
diff --git a/BaseTools/Source/Python/Table/TableFunction.py b/BaseTools/Source/Python/Table/TableFunction.py
index 3d7c2d0ea5a0..af483ebd8c12 100644
--- a/BaseTools/Source/Python/Table/TableFunction.py
+++ b/BaseTools/Source/Python/Table/TableFunction.py
@@ -21,21 +21,21 @@ from Common.String import ConvertToSqlString
## TableFunction
#
# This class defined a table used for function
-#
+#
# @param Table: Inherited from Table class
#
class TableFunction(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Function'
-
+
## Create table
#
# Create table Function
#
# @param ID: ID of a Function
# @param Header: Header of a Function
- # @param Modifier: Modifier of a Function
+ # @param Modifier: Modifier of a Function
# @param Name: Name of a Function
# @param ReturnStatement: ReturnStatement of a Funciont
# @param StartLine: StartLine of a Function
@@ -72,7 +72,7 @@ class TableFunction(Table):
#
# @param ID: ID of a Function
# @param Header: Header of a Function
- # @param Modifier: Modifier of a Function
+ # @param Modifier: Modifier of a Function
# @param Name: Name of a Function
# @param ReturnStatement: ReturnStatement of a Funciont
# @param StartLine: StartLine of a Function
diff --git a/BaseTools/Source/Python/Table/TableIdentifier.py b/BaseTools/Source/Python/Table/TableIdentifier.py
index bcd6d6e1c152..d90035c6df82 100644
--- a/BaseTools/Source/Python/Table/TableIdentifier.py
+++ b/BaseTools/Source/Python/Table/TableIdentifier.py
@@ -21,7 +21,7 @@ from Table import Table
## TableIdentifier
#
# This class defined a table used for Identifier
-#
+#
# @param object: Inherited from object class
#
#
@@ -29,7 +29,7 @@ class TableIdentifier(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Identifier'
-
+
## Create table
#
# Create table Identifier
diff --git a/BaseTools/Source/Python/Table/TableInf.py b/BaseTools/Source/Python/Table/TableInf.py
index b6e300b150c1..1480af39d718 100644
--- a/BaseTools/Source/Python/Table/TableInf.py
+++ b/BaseTools/Source/Python/Table/TableInf.py
@@ -22,7 +22,7 @@ from Common.String import ConvertToSqlString
## TableInf
#
# This class defined a table used for data model
-#
+#
# @param object: Inherited from object class
#
#
@@ -30,7 +30,7 @@ class TableInf(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Inf'
-
+
## Create table
#
# Create table Inf
@@ -96,14 +96,14 @@ class TableInf(Table):
SqlCommand = """insert into %s values(%s, %s, '%s', '%s', '%s', '%s', '%s', '%s', %s, %s, %s, %s, %s, %s, %s)""" \
% (self.Table, self.ID, Model, Value1, Value2, Value3, Value4, Value5, Arch, BelongsToItem, BelongsToFile, StartLine, StartColumn, EndLine, EndColumn, Enabled)
Table.Insert(self, SqlCommand)
-
+
return self.ID
-
+
## Query table
#
- # @param Model: The Model of Record
+ # @param Model: The Model of Record
#
- # @retval: A recordSet of all found records
+ # @retval: A recordSet of all found records
#
def Query(self, Model):
SqlCommand = """select ID, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine from %s
diff --git a/BaseTools/Source/Python/Table/TablePcd.py b/BaseTools/Source/Python/Table/TablePcd.py
index 19623f98f42c..7ea521517199 100644
--- a/BaseTools/Source/Python/Table/TablePcd.py
+++ b/BaseTools/Source/Python/Table/TablePcd.py
@@ -21,7 +21,7 @@ from Common.String import ConvertToSqlString
## TablePcd
#
# This class defined a table used for pcds
-#
+#
# @param object: Inherited from object class
#
#
@@ -29,7 +29,7 @@ class TablePcd(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Pcd'
-
+
## Create table
#
# Create table Pcd
diff --git a/BaseTools/Source/Python/Table/TableReport.py b/BaseTools/Source/Python/Table/TableReport.py
index 4af0e98d86b4..aec7c7203c44 100644
--- a/BaseTools/Source/Python/Table/TableReport.py
+++ b/BaseTools/Source/Python/Table/TableReport.py
@@ -25,7 +25,7 @@ from Common.LongFilePathSupport import OpenLongFilePath as open
## TableReport
#
# This class defined a table used for data model
-#
+#
# @param object: Inherited from object class
#
#
@@ -33,7 +33,7 @@ class TableReport(Table):
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Report'
-
+
## Create table
#
# Create table report
@@ -78,7 +78,7 @@ class TableReport(Table):
## Query table
#
- # @retval: A recordSet of all found records
+ # @retval: A recordSet of all found records
#
def Query(self):
SqlCommand = """select ID, ErrorID, OtherMsg, BelongsToTable, BelongsToItem, Corrected from %s
diff --git a/BaseTools/Source/Python/TargetTool/TargetTool.py b/BaseTools/Source/Python/TargetTool/TargetTool.py
index ecac316b7a3a..113ef11f91ba 100644
--- a/BaseTools/Source/Python/TargetTool/TargetTool.py
+++ b/BaseTools/Source/Python/TargetTool/TargetTool.py
@@ -85,13 +85,13 @@ class TargetTool():
if type(self.TargetTxtDictionary[Key]) == type([]):
print "%-30s = %s" % (Key, ''.join(elem + ' ' for elem in self.TargetTxtDictionary[Key]))
elif self.TargetTxtDictionary[Key] is None:
- errMsg += " Missing %s configuration information, please use TargetTool to set value!" % Key + os.linesep
+ errMsg += " Missing %s configuration information, please use TargetTool to set value!" % Key + os.linesep
else:
print "%-30s = %s" % (Key, self.TargetTxtDictionary[Key])
-
+
if errMsg != '':
print os.linesep + 'Warning:' + os.linesep + errMsg
-
+
def RWFile(self, CommentCharacter, KeySplitCharacter, Num):
try:
fr = open(self.FileName, 'r')
@@ -110,7 +110,7 @@ class TargetTool():
existKeys.append(Key)
else:
print "Warning: Found duplicate key item in original configuration files!"
-
+
if Num == 0:
Line = "%-30s = \n" % Key
else:
@@ -125,12 +125,12 @@ class TargetTool():
if Line is None:
Line = "%-30s = " % key
fw.write(Line)
-
+
fr.close()
fw.close()
os.remove(self.FileName)
os.rename(os.path.normpath(os.path.join(self.WorkSpace, 'Conf\\targetnew.txt')), self.FileName)
-
+
except:
last_type, last_value, last_tb = sys.exc_info()
traceback.print_exception(last_type, last_value, last_tb)
@@ -142,20 +142,20 @@ def GetConfigureKeyValue(self, Key):
if os.path.exists(dscFullPath):
Line = "%-30s = %s\n" % (Key, self.Opt.DSCFILE)
else:
- EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND,
+ EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND,
"DSC file %s does not exist!" % self.Opt.DSCFILE, RaiseError=False)
elif Key == TAB_TAT_DEFINES_TOOL_CHAIN_CONF and self.Opt.TOOL_DEFINITION_FILE is not None:
tooldefFullPath = os.path.join(self.WorkSpace, self.Opt.TOOL_DEFINITION_FILE)
if os.path.exists(tooldefFullPath):
Line = "%-30s = %s\n" % (Key, self.Opt.TOOL_DEFINITION_FILE)
else:
- EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND,
+ EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND,
"Tooldef file %s does not exist!" % self.Opt.TOOL_DEFINITION_FILE, RaiseError=False)
elif self.Opt.NUM >= 2:
Line = "%-30s = %s\n" % (Key, 'Enable')
elif self.Opt.NUM <= 1:
- Line = "%-30s = %s\n" % (Key, 'Disable')
+ Line = "%-30s = %s\n" % (Key, 'Disable')
elif Key == TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER and self.Opt.NUM is not None:
Line = "%-30s = %s\n" % (Key, str(self.Opt.NUM))
elif Key == TAB_TAT_DEFINES_TARGET and self.Opt.TARGET is not None:
@@ -169,7 +169,7 @@ def GetConfigureKeyValue(self, Key):
if os.path.exists(buildruleFullPath):
Line = "%-30s = %s\n" % (Key, self.Opt.BUILD_RULE_FILE)
else:
- EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND,
+ EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND,
"Build rule file %s does not exist!" % self.Opt.BUILD_RULE_FILE, RaiseError=False)
return Line
@@ -199,7 +199,7 @@ def RangeCheckCallback(option, opt_str, value, parser):
setattr(parser.values, option.dest, value)
else:
parser.error("Option %s only allows one instance in command line!" % option)
-
+
def MyOptionParser():
parser = OptionParser(version=__version__,prog="TargetTool.exe",usage=__usage__,description=__copyright__)
parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32','X64','IPF','EBC', 'ARM', 'AARCH64','0'], dest="TARGET_ARCH",
@@ -225,7 +225,7 @@ if __name__ == '__main__':
if os.getenv('WORKSPACE') is None:
print "ERROR: WORKSPACE should be specified or edksetup script should be executed before run TargetTool"
sys.exit(1)
-
+
(opt, args) = MyOptionParser()
if len(args) != 1 or (args[0].lower() != 'print' and args[0].lower() != 'clean' and args[0].lower() != 'set'):
print "The number of args isn't 1 or the value of args is invalid."
diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py
index 3eb7fa39209d..2b3786d78cb4 100644
--- a/BaseTools/Source/Python/Trim/Trim.py
+++ b/BaseTools/Source/Python/Trim/Trim.py
@@ -258,7 +258,7 @@ def TrimPreprocessedFile(Source, Target, ConvertHex, TrimLong):
#
def TrimPreprocessedVfr(Source, Target):
CreateDirectory(os.path.dirname(Target))
-
+
try:
f = open (Source,'r')
except:
@@ -335,7 +335,7 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None):
SearchPathList = [LocalSearchPath] + IncludePathList
else:
SearchPathList = IncludePathList
-
+
for IncludePath in SearchPathList:
IncludeFile = os.path.join(IncludePath, Source)
if os.path.isfile(IncludeFile):
@@ -346,7 +346,7 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None):
except:
EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)
-
+
# avoid A "include" B and B "include" A
IncludeFile = os.path.abspath(os.path.normpath(IncludeFile))
if IncludeFile in gIncludedAslFile:
@@ -354,7 +354,7 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None):
ExtraData= "%s -> %s" % (" -> ".join(gIncludedAslFile), IncludeFile))
return []
gIncludedAslFile.append(IncludeFile)
-
+
for Line in F:
LocalSearchPath = None
Result = gAslIncludePattern.findall(Line)
@@ -364,7 +364,7 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None):
NewFileContent.append("%s%s" % (Indent, Line))
continue
#
- # We should first search the local directory if current file are using pattern #include "XXX"
+ # We should first search the local directory if current file are using pattern #include "XXX"
#
if Result[0][2] == '"':
LocalSearchPath = os.path.dirname(IncludeFile)
@@ -385,20 +385,20 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None):
#
# @param Source File to be trimmed
# @param Target File to store the trimmed content
-# @param IncludePathFile The file to log the external include path
+# @param IncludePathFile The file to log the external include path
#
def TrimAslFile(Source, Target, IncludePathFile):
CreateDirectory(os.path.dirname(Target))
-
+
SourceDir = os.path.dirname(Source)
if SourceDir == '':
SourceDir = '.'
-
+
#
# Add source directory as the first search directory
#
IncludePathList = [SourceDir]
-
+
#
# If additional include path file is specified, append them all
# to the search directory list.
@@ -669,7 +669,7 @@ def Main():
EdkLogger.SetLevel(CommandOptions.LogLevel)
except FatalError, X:
return 1
-
+
try:
if CommandOptions.FileType == "Vfr":
if CommandOptions.OutputFile is None:
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 13a1ed886cc4..48690aa357f7 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -1059,7 +1059,7 @@ class DscBuildData(PlatformBuildClassObject):
return PcdValue
try:
PcdValue = ValueExpressionEx(PcdValue[1:], PcdDatumType, GuidDict)(True)
- except BadExpression, Value:
+ except BadExpression, Value:
EdkLogger.error('Parser', FORMAT_INVALID, 'PCD [%s.%s] Value "%s", %s' %
(TokenSpaceGuidCName, TokenCName, PcdValue, Value))
elif PcdValue.startswith("L'") or PcdValue.startswith("'"):
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index 550359f9abb2..2226f707c7aa 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -371,7 +371,7 @@ class MetaFileParser(object):
# Sometimes, we need to make differences between EDK and EDK2 modules
if Name == 'INF_VERSION':
if hexVersionPattern.match(Value):
- self._Version = int(Value, 0)
+ self._Version = int(Value, 0)
elif decVersionPattern.match(Value):
ValueList = Value.split('.')
Major = '%04o' % int(ValueList[0], 0)
diff --git a/BaseTools/Source/Python/Workspace/MetaFileTable.py b/BaseTools/Source/Python/Workspace/MetaFileTable.py
index 3c8dae0e622f..5aa5d67b8239 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileTable.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileTable.py
@@ -56,7 +56,7 @@ class MetaFileTable(Table):
Result = self.Cur.execute("select ID from %s where ID<0" % (self.Table)).fetchall()
if not Result:
# update the timestamp in database
- self._FileIndexTable.SetFileTimeStamp(self.IdBase, TimeStamp)
+ self._FileIndexTable.SetFileTimeStamp(self.IdBase, TimeStamp)
return False
if TimeStamp != self._FileIndexTable.GetFileTimeStamp(self.IdBase):
@@ -113,28 +113,28 @@ class ModuleTable(MetaFileTable):
BelongsToItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0):
(Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))
return Table.Insert(
- self,
- Model,
- Value1,
- Value2,
- Value3,
- Scope1,
+ self,
+ Model,
+ Value1,
+ Value2,
+ Value3,
+ Scope1,
Scope2,
- BelongsToItem,
- StartLine,
- StartColumn,
- EndLine,
- EndColumn,
+ BelongsToItem,
+ StartLine,
+ StartColumn,
+ EndLine,
+ EndColumn,
Enabled
)
## Query table
#
- # @param Model: The Model of Record
- # @param Arch: The Arch attribute of Record
- # @param Platform The Platform attribute of Record
+ # @param Model: The Model of Record
+ # @param Arch: The Arch attribute of Record
+ # @param Platform The Platform attribute of Record
#
- # @retval: A recordSet of all found records
+ # @retval: A recordSet of all found records
#
def Query(self, Model, Arch=None, Platform=None, BelongsToItem=None):
ConditionString = "Model=%s AND Enabled>=0" % Model
@@ -195,27 +195,27 @@ class PackageTable(MetaFileTable):
BelongsToItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0):
(Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))
return Table.Insert(
- self,
- Model,
- Value1,
- Value2,
- Value3,
- Scope1,
+ self,
+ Model,
+ Value1,
+ Value2,
+ Value3,
+ Scope1,
Scope2,
- BelongsToItem,
- StartLine,
- StartColumn,
- EndLine,
- EndColumn,
+ BelongsToItem,
+ StartLine,
+ StartColumn,
+ EndLine,
+ EndColumn,
Enabled
)
## Query table
#
- # @param Model: The Model of Record
- # @param Arch: The Arch attribute of Record
+ # @param Model: The Model of Record
+ # @param Arch: The Arch attribute of Record
#
- # @retval: A recordSet of all found records
+ # @retval: A recordSet of all found records
#
def Query(self, Model, Arch=None):
ConditionString = "Model=%s AND Enabled>=0" % Model
@@ -236,7 +236,7 @@ class PackageTable(MetaFileTable):
try:
for row in self.Cur:
comment = row[0]
-
+
LineNum = row[1]
comment = comment.strip("#")
comment = comment.strip()
@@ -310,32 +310,32 @@ class PlatformTable(MetaFileTable):
FromItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=1):
(Value1, Value2, Value3, Scope1, Scope2,Scope3) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2,Scope3))
return Table.Insert(
- self,
- Model,
- Value1,
- Value2,
- Value3,
- Scope1,
+ self,
+ Model,
+ Value1,
+ Value2,
+ Value3,
+ Scope1,
Scope2,
Scope3,
- BelongsToItem,
+ BelongsToItem,
FromItem,
- StartLine,
- StartColumn,
- EndLine,
- EndColumn,
+ StartLine,
+ StartColumn,
+ EndLine,
+ EndColumn,
Enabled
)
## Query table
#
- # @param Model: The Model of Record
+ # @param Model: The Model of Record
# @param Scope1: Arch of a Dsc item
# @param Scope2: Module type of a Dsc item
# @param BelongsToItem: The item belongs to which another item
# @param FromItem: The item belongs to which dsc file
#
- # @retval: A recordSet of all found records
+ # @retval: A recordSet of all found records
#
def Query(self, Model, Scope1=None, Scope2=None, BelongsToItem=None, FromItem=None):
ConditionString = "Model=%s AND Enabled>0" % Model
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 14dcb1ae8136..fccd2ebfb8e8 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -114,8 +114,8 @@ class WorkspaceDatabase(object):
# get the parser ready for this file
MetaFile = self._FILE_PARSER_[FileType](
- FilePath,
- FileType,
+ FilePath,
+ FileType,
Arch,
MetaFileStorage(self.WorkspaceDb.Cur, FilePath, FileType)
)
@@ -162,7 +162,7 @@ class WorkspaceDatabase(object):
# remove db file in case inconsistency between db and file in file system
if self._CheckWhetherDbNeedRenew(RenewDb, DbPath):
os.remove(DbPath)
-
+
# create db with optimized parameters
self.Conn = sqlite3.connect(DbPath, isolation_level='DEFERRED')
self.Conn.execute("PRAGMA synchronous=OFF")
@@ -199,11 +199,11 @@ class WorkspaceDatabase(object):
def _CheckWhetherDbNeedRenew (self, force, DbPath):
# if database does not exist, we need do nothing
if not os.path.exists(DbPath): return False
-
+
# if user force to renew database, then not check whether database is out of date
if force: return True
-
- #
+
+ #
# Check the time of last modified source file or build.exe
# if is newer than time of database, then database need to be re-created.
#
@@ -217,15 +217,15 @@ class WorkspaceDatabase(object):
if rootPath == "" or rootPath is None:
EdkLogger.verbose("\nFail to find the root path of build.exe or python sources, so can not \
determine whether database file is out of date!\n")
-
+
# walk the root path of source or build's binary to get the time last modified.
-
+
for root, dirs, files in os.walk (rootPath):
for dir in dirs:
- # bypass source control folder
+ # bypass source control folder
if dir.lower() in [".svn", "_svn", "cvs"]:
dirs.remove(dir)
-
+
for file in files:
ext = os.path.splitext(file)[1]
if ext.lower() == ".py": # only check .py files
@@ -235,9 +235,9 @@ determine whether database file is out of date!\n")
if timeOfToolModified > os.stat(DbPath).st_mtime:
EdkLogger.verbose("\nWorkspace database is out of data!")
return True
-
+
return False
-
+
## Initialize build database
def InitDatabase(self):
EdkLogger.verbose("\nInitialize build database started ...")
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index c4647d068a6b..bcbe6f89b48b 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -235,7 +235,7 @@ def FindIncludeFiles(Source, IncludePathList, IncludeFiles):
## Split each lines in file
#
-# This method is used to split the lines in file to make the length of each line
+# This method is used to split the lines in file to make the length of each line
# less than MaxLength.
#
# @param Content The content of file
@@ -260,12 +260,12 @@ def FileLinesSplit(Content=None, MaxLength=None):
NewContentList.append(Line)
for NewLine in NewContentList:
NewContent += NewLine + TAB_LINE_BREAK
-
+
NewContent = NewContent.replace(TAB_LINE_BREAK, gEndOfLine).replace('\r\r\n', gEndOfLine)
return NewContent
-
-
-
+
+
+
##
# Parse binary dependency expression section
#
@@ -295,10 +295,10 @@ class DepexParser(object):
for Guid in Package.Guids:
GuidValue = GuidStructureStringToGuidString(Package.Guids[Guid])
self._GuidDb[GuidValue.upper()] = Guid
-
+
##
# Parse the binary dependency expression files.
- #
+ #
# This function parses the binary dependency expression file and translate it
# to the instruction list.
#
@@ -320,7 +320,7 @@ class DepexParser(object):
OpCode = DepexFile.read(1)
return DepexStatement
-
+
##
# Reports library information
#
@@ -426,7 +426,7 @@ class DepexReport(object):
if ModuleType in ["SEC", "PEI_CORE", "DXE_CORE", "SMM_CORE", "MM_CORE_STANDALONE", "UEFI_APPLICATION"]:
return
-
+
for Source in M.SourceFileList:
if os.path.splitext(Source.Path)[1].lower() == ".dxs":
Match = gDxsDependencyPattern.search(open(Source.Path).read())
@@ -472,7 +472,7 @@ class DepexReport(object):
FileWrite(File, gSubSectionSep)
except:
EdkLogger.warn(None, "Dependency expression file is corrupted", self._DepexFileName)
-
+
FileWrite(File, "Dependency Expression (DEPEX) from %s" % self.Source)
if self.Source == "INF":
@@ -977,7 +977,7 @@ class PcdReport(object):
EdkLogger.error('BuildReport', FORMAT_INVALID, "PCD Value: %s, Type: %s" %(DscDefaultValue, Pcd.DatumType))
InfDefaultValue = None
-
+
PcdValue = DecDefaultValue
if DscDefaultValue:
PcdValue = DscDefaultValue
@@ -1519,7 +1519,7 @@ class PredictionReport(object):
EotEndTime = time.time()
EotDuration = time.strftime("%H:%M:%S", time.gmtime(int(round(EotEndTime - EotStartTime))))
EdkLogger.quiet("EOT run time: %s\n" % EotDuration)
-
+
#
# Parse the output of EOT tool
#
@@ -1717,7 +1717,7 @@ class FdRegionReport(object):
PlatformPcds = {}
#
# Collect PCDs declared in DEC files.
- #
+ #
for Pa in Wa.AutoGenObjectList:
for Package in Pa.PackageList:
for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:
@@ -1998,7 +1998,7 @@ class PlatformReport(object):
self.DepexParser = None
if "DEPEX" in ReportType:
self.DepexParser = DepexParser(Wa)
-
+
self.ModuleReportList = []
if MaList is not None:
self._IsModuleBuild = True
@@ -2073,7 +2073,7 @@ class PlatformReport(object):
if not self._IsModuleBuild:
if "PCD" in ReportType:
self.PcdReport.GenerateReport(File, None)
-
+
if "FLASH" in ReportType:
for FdReportListItem in self.FdReportList:
FdReportListItem.GenerateReport(File)
@@ -2107,7 +2107,7 @@ class BuildReport(object):
if ReportFile:
self.ReportList = []
self.ReportType = []
- if ReportType:
+ if ReportType:
for ReportTypeItem in ReportType:
if ReportTypeItem not in self.ReportType:
self.ReportType.append(ReportTypeItem)
@@ -2153,7 +2153,7 @@ class BuildReport(object):
EdkLogger.error("BuildReport", CODE_ERROR, "Unknown fatal error when generating build report", ExtraData=self.ReportFile, RaiseError=False)
EdkLogger.quiet("(Python %s on %s\n%s)" % (platform.python_version(), sys.platform, traceback.format_exc()))
File.close()
-
+
# This acts like the main() function for the script, unless it is 'import'ed into another script.
if __name__ == '__main__':
pass
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 1c26e72feb6b..0ca78c1fa451 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -110,7 +110,7 @@ def CheckEnvVariable():
EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in WORKSPACE path",
ExtraData=WorkspaceDir)
os.environ["WORKSPACE"] = WorkspaceDir
-
+
# set multiple workspace
PackagesPath = os.getenv("PACKAGES_PATH")
mws.setWs(WorkspaceDir, PackagesPath)
@@ -200,7 +200,7 @@ def CheckEnvVariable():
GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir
GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir
GlobalData.gGlobalDefines["EDK_TOOLS_PATH"] = os.environ["EDK_TOOLS_PATH"]
-
+
## Get normalized file path
#
# Convert the path to be local format, and remove the WORKSPACE path at the
@@ -265,7 +265,7 @@ def LaunchCommand(Command, WorkingDir):
# if working directory doesn't exist, Popen() will raise an exception
if not os.path.isdir(WorkingDir):
EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=WorkingDir)
-
+
# Command is used as the first Argument in following Popen().
# It could be a string or sequence. We find that if command is a string in following Popen(),
# ubuntu may fail with an error message that the command is not found.
@@ -848,14 +848,14 @@ class Build():
# print current build environment and configuration
EdkLogger.quiet("%-16s = %s" % ("WORKSPACE", os.environ["WORKSPACE"]))
if "PACKAGES_PATH" in os.environ:
- # WORKSPACE env has been converted before. Print the same path style with WORKSPACE env.
+ # WORKSPACE env has been converted before. Print the same path style with WORKSPACE env.
EdkLogger.quiet("%-16s = %s" % ("PACKAGES_PATH", os.path.normcase(os.path.normpath(os.environ["PACKAGES_PATH"]))))
EdkLogger.quiet("%-16s = %s" % ("ECP_SOURCE", os.environ["ECP_SOURCE"]))
EdkLogger.quiet("%-16s = %s" % ("EDK_SOURCE", os.environ["EDK_SOURCE"]))
EdkLogger.quiet("%-16s = %s" % ("EFI_SOURCE", os.environ["EFI_SOURCE"]))
EdkLogger.quiet("%-16s = %s" % ("EDK_TOOLS_PATH", os.environ["EDK_TOOLS_PATH"]))
if "EDK_TOOLS_BIN" in os.environ:
- # Print the same path style with WORKSPACE env.
+ # Print the same path style with WORKSPACE env.
EdkLogger.quiet("%-16s = %s" % ("EDK_TOOLS_BIN", os.path.normcase(os.path.normpath(os.environ["EDK_TOOLS_BIN"]))))
EdkLogger.quiet("%-16s = %s" % ("CONF_PATH", GlobalData.gConfDirectory))
self.InitPreBuild()
@@ -1961,7 +1961,7 @@ class Build():
self._SaveMapFile (MapBuffer, Wa)
def _GenFfsCmd(self):
- # convert dictionary of Cmd:(Inf,Arch)
+ # convert dictionary of Cmd:(Inf,Arch)
# to a new dictionary of (Inf,Arch):Cmd,Cmd,Cmd...
CmdSetDict = defaultdict(set)
GenFfsDict = GenFds.GenFfsMakefile('', GlobalData.gFdfParser, self, self.ArchList, GlobalData)
@@ -2033,7 +2033,7 @@ class Build():
for Module in ModuleList:
# Get ModuleAutoGen object to generate C code file and makefile
Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)
-
+
if Ma is None:
continue
if Ma.CanSkipbyHash():
diff --git a/BaseTools/Source/Python/sitecustomize.py b/BaseTools/Source/Python/sitecustomize.py
index 4ea84c512969..3afa90700e30 100644
--- a/BaseTools/Source/Python/sitecustomize.py
+++ b/BaseTools/Source/Python/sitecustomize.py
@@ -16,6 +16,6 @@ import locale
if sys.platform == "darwin":
DefaultLocal = locale.getdefaultlocale()[1]
if DefaultLocal is None:
- DefaultLocal = 'UTF8'
+ DefaultLocal = 'UTF8'
sys.setdefaultencoding(DefaultLocal)
--
2.16.2.windows.1
next prev parent reply other threads:[~2018-04-27 22:33 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-27 22:32 [PATCH v1 00/42] BaseTools: refactoring patches Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 01/42] BaseTools: FdfParser - update to remove duplicate constant value Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 02/42] BaseTools: AutoGen " Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 03/42] BaseTools: check before accessing members in __eq__ Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 04/42] BaseTools: this function has no purpose Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 05/42] BaseTools: AutoGen - refactor assemble_variable Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 06/42] BaseTools: AutoGen - refactor dictionary access Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 07/42] BaseTools: AutoGen - GenVar refactor static methods Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 08/42] BaseTools: AutoGen - share StripComments API Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 09/42] BaseTools: AutoGen - refactor class factory Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 10/42] BaseTools: Eot - remove unused lists Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 11/42] BaseTools: Eot - refactor global data Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 12/42] BaseTools: AutoGen - remove global line Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 13/42] BaseTools: AutoGen - UniClassObject refactor static methods Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 14/42] BaseTools: refactor to use list not dict Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 15/42] BaseTools: eliminate {} from dictionary contructor call Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 16/42] BaseTools: remove Compound statements Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 17/42] BaseTools: Workspace - refactor a dict Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 18/42] BaseTools: move PCD size calculation functions to PcdClassObject Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 19/42] BaseTools: AutoGen - refactor out functions only called in __init__ Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 20/42] BaseTools: AutoGen - refactor out a list Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 21/42] BaseTools: AutoGen - refactor out a useless class Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 22/42] BaseTools: AutoGen - no need to recompute Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 23/42] BaseTools: refactor __init__ functions to not compute temporary variable Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 24/42] BaseTools: AutoGen - remove function no one calls Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 25/42] BaseTools: AutoGen - move function to clean file namespace Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 26/42] BaseTools: AutoGen - remove another function no one calls Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 27/42] BaseTools: Refactor to share GUID packing function Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 28/42] BaseTools: AutoGen - refactor function to remove extra variables Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 29/42] BaseTools: AutoGen - refactor more functions only called in __init__ Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 30/42] BaseTools: remove unused member variable Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 31/42] BaseTools: remove redundant content in InfSectionParser Jaben Carsey
2018-04-27 22:32 ` Jaben Carsey [this message]
2018-04-27 22:32 ` [PATCH v1 33/42] BaseTools: AutoGen - add Opcode constants Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 34/42] BaseTools: standardize GUID and pack size Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 35/42] BaseTools: remove unused variable Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 36/42] BaseTools: GenFds - use existing shared string Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 37/42] BaseTools: missed a copyright update Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 38/42] BaseTools: Remove lists form set construction Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 39/42] BaseTools: refactor Depex optomization Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 40/42] BaseTools: dont make iterator into list if not needed Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 41/42] BaseTools: create base expression class Jaben Carsey
2018-04-27 22:32 ` [PATCH v1 42/42] BaseTools: use set instead of list Jaben Carsey
2018-05-04 4:33 ` [PATCH v1 00/42] BaseTools: refactoring patches Zhu, Yonghong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07045766a942b1b70afa367803bb87afc3442b53.1524868034.git.jaben.carsey@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox