# different section should not mix in one section\r
if self._SectionName != '' and self._SectionName != ItemList[0].upper():\r
EdkLogger.error('Parser', FORMAT_INVALID, "Different section names in the same section",\r
# different section should not mix in one section\r
if self._SectionName != '' and self._SectionName != ItemList[0].upper():\r
EdkLogger.error('Parser', FORMAT_INVALID, "Different section names in the same section",\r
\r
## Construct section Macro dict \r
def _ConstructSectionMacroDict(self, Name, Value):\r
\r
## Construct section Macro dict \r
def _ConstructSectionMacroDict(self, Name, Value):\r
ScopeKey = tuple(ScopeKey)\r
#\r
# DecParser SectionType is a list, will contain more than one item only in Pcd Section\r
ScopeKey = tuple(ScopeKey)\r
#\r
# DecParser SectionType is a list, will contain more than one item only in Pcd Section\r
- Scope0, Scope1 ,Scope2= ActiveScope[0], ActiveScope[1],ActiveScope[2]\r
- if(Scope0, Scope1,Scope2) not in Scope:\r
+ Scope0, Scope1, Scope2= ActiveScope[0], ActiveScope[1], ActiveScope[2]\r
+ if(Scope0, Scope1, Scope2) not in Scope:\r
break\r
else:\r
SpeSpeMacroDict.update(self._SectionsMacroDict[(SectionType, Scope)])\r
\r
for ActiveScope in self._Scope:\r
break\r
else:\r
SpeSpeMacroDict.update(self._SectionsMacroDict[(SectionType, Scope)])\r
\r
for ActiveScope in self._Scope:\r
- Scope0, Scope1,Scope2 = ActiveScope[0], ActiveScope[1],ActiveScope[2]\r
- if(Scope0, Scope1,Scope2) not in Scope and (Scope0, TAB_COMMON, TAB_COMMON) not in Scope and (TAB_COMMON, Scope1, TAB_COMMON) not in Scope:\r
+ Scope0, Scope1, Scope2 = ActiveScope[0], ActiveScope[1], ActiveScope[2]\r
+ if(Scope0, Scope1, Scope2) not in Scope and (Scope0, TAB_COMMON, TAB_COMMON) not in Scope and (TAB_COMMON, Scope1, TAB_COMMON) not in Scope:\r
# Model, Value1, Value2, Value3, Arch, Platform, BelongsToItem=-1,\r
# LineBegin=-1, ColumnBegin=-1, LineEnd=-1, ColumnEnd=-1, Enabled=-1\r
#\r
# Model, Value1, Value2, Value3, Arch, Platform, BelongsToItem=-1,\r
# LineBegin=-1, ColumnBegin=-1, LineEnd=-1, ColumnEnd=-1, Enabled=-1\r
#\r
- EdkLogger.error("Parser", FILE_READ_FAILURE, "Missing the '{' before %s in Line %s" % (Line, Index+1),ExtraData=self.MetaFile)\r
+ EdkLogger.error("Parser", FILE_READ_FAILURE, "Missing the '{' before %s in Line %s" % (Line, Index+1), ExtraData=self.MetaFile)\r
@ParseMacro\r
def _SkuIdParser(self):\r
TokenList = GetSplitValueList(self._CurrentLine, TAB_VALUE_SPLIT)\r
@ParseMacro\r
def _SkuIdParser(self):\r
TokenList = GetSplitValueList(self._CurrentLine, TAB_VALUE_SPLIT)\r
EdkLogger.error('Parser', FORMAT_INVALID, "Correct format is '<Number>|<UiName>[|<UiName>]'",\r
ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
self._ValueList[0:len(TokenList)] = TokenList\r
EdkLogger.error('Parser', FORMAT_INVALID, "Correct format is '<Number>|<UiName>[|<UiName>]'",\r
ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
self._ValueList[0:len(TokenList)] = TokenList\r
\r
# Validate the datum type of Dynamic Defaul PCD and DynamicEx Default PCD\r
ValueList = GetSplitValueList(self._ValueList[2])\r
\r
# Validate the datum type of Dynamic Defaul PCD and DynamicEx Default PCD\r
ValueList = GetSplitValueList(self._ValueList[2])\r
- if len(ValueList) > 1 and ValueList[1] in [TAB_UINT8 , TAB_UINT16, TAB_UINT32 , TAB_UINT64] \\r
+ if len(ValueList) > 1 and ValueList[1] in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64] \\r
and self._ItemType in [MODEL_PCD_DYNAMIC_DEFAULT, MODEL_PCD_DYNAMIC_EX_DEFAULT]:\r
EdkLogger.error('Parser', FORMAT_INVALID, "The datum type '%s' of PCD is wrong" % ValueList[1],\r
ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
and self._ItemType in [MODEL_PCD_DYNAMIC_DEFAULT, MODEL_PCD_DYNAMIC_EX_DEFAULT]:\r
EdkLogger.error('Parser', FORMAT_INVALID, "The datum type '%s' of PCD is wrong" % ValueList[1],\r
ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
# Validate the VariableName of DynamicHii and DynamicExHii for PCD Entry must not be an empty string\r
if self._ItemType in [MODEL_PCD_DYNAMIC_HII, MODEL_PCD_DYNAMIC_EX_HII]:\r
DscPcdValueList = GetSplitValueList(TokenList[1], TAB_VALUE_SPLIT, 1)\r
# Validate the VariableName of DynamicHii and DynamicExHii for PCD Entry must not be an empty string\r
if self._ItemType in [MODEL_PCD_DYNAMIC_HII, MODEL_PCD_DYNAMIC_EX_HII]:\r
DscPcdValueList = GetSplitValueList(TokenList[1], TAB_VALUE_SPLIT, 1)\r
EdkLogger.error('Parser', FORMAT_INVALID, "The VariableName field in the HII format PCD entry must not be an empty string",\r
ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
\r
EdkLogger.error('Parser', FORMAT_INVALID, "The VariableName field in the HII format PCD entry must not be an empty string",\r
ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
\r
- Id, self._ItemType, V1, V2, V3, S1, S2, S3,Owner, self._From, \\r
+ Id, self._ItemType, V1, V2, V3, S1, S2, S3, Owner, self._From, \\r
LineStart, ColStart, LineEnd, ColEnd, Enabled = self._Content[self._ContentIndex]\r
\r
if self._From < 0:\r
LineStart, ColStart, LineEnd, ColEnd, Enabled = self._Content[self._ContentIndex]\r
\r
if self._From < 0:\r
- if [Record[5], Record[6],Record[7]] not in self._Scope:\r
- self._Scope.append([Record[5], Record[6],Record[7]])\r
+ if [Record[5], Record[6], Record[7]] not in self._Scope:\r
+ self._Scope.append([Record[5], Record[6], Record[7]])\r
MODEL_PCD_DYNAMIC_VPD, MODEL_PCD_DYNAMIC_EX_DEFAULT, MODEL_PCD_DYNAMIC_EX_HII,\r
MODEL_PCD_DYNAMIC_EX_VPD):\r
Records = self._RawTable.Query(PcdType, BelongsToItem= -1.0)\r
MODEL_PCD_DYNAMIC_VPD, MODEL_PCD_DYNAMIC_EX_DEFAULT, MODEL_PCD_DYNAMIC_EX_HII,\r
MODEL_PCD_DYNAMIC_EX_VPD):\r
Records = self._RawTable.Query(PcdType, BelongsToItem= -1.0)\r
- for TokenSpaceGuid, PcdName, Value, Dummy2, Dummy3, Dummy4,ID, Line in Records:\r
+ for TokenSpaceGuid, PcdName, Value, Dummy2, Dummy3, Dummy4, ID, Line in Records:\r
if self._DefinesCount > 1:\r
EdkLogger.error('Parser', FORMAT_INVALID, 'Multiple [Defines] section is exist.', self.MetaFile )\r
if self._DefinesCount == 0:\r
if self._DefinesCount > 1:\r
EdkLogger.error('Parser', FORMAT_INVALID, 'Multiple [Defines] section is exist.', self.MetaFile )\r
if self._DefinesCount == 0:\r
- EdkLogger.error('Parser', FORMAT_INVALID, 'No [Defines] section exist.',self.MetaFile)\r
+ EdkLogger.error('Parser', FORMAT_INVALID, 'No [Defines] section exist.', self.MetaFile)\r
self._CurrentStructurePcdName = ""\r
else:\r
if self._CurrentStructurePcdName != TAB_SPLIT.join(PcdNames[:2]):\r
self._CurrentStructurePcdName = ""\r
else:\r
if self._CurrentStructurePcdName != TAB_SPLIT.join(PcdNames[:2]):\r
- EdkLogger.error('Parser', FORMAT_INVALID, "Pcd Name does not match: %s and %s " % (self._CurrentStructurePcdName , TAB_SPLIT.join(PcdNames[:2])),\r
+ EdkLogger.error('Parser', FORMAT_INVALID, "Pcd Name does not match: %s and %s " % (self._CurrentStructurePcdName, TAB_SPLIT.join(PcdNames[:2])),\r
File=self.MetaFile, Line=self._LineIndex + 1)\r
self._ValueList[1] = TAB_SPLIT.join(PcdNames[2:])\r
self._ValueList[2] = PcdTockens[1]\r
File=self.MetaFile, Line=self._LineIndex + 1)\r
self._ValueList[1] = TAB_SPLIT.join(PcdNames[2:])\r
self._ValueList[2] = PcdTockens[1]\r