self._SubsectionType = MODEL_META_DATA_SUBSECTION_HEADER\r
# directive line\r
elif Line[0] == '!':\r
- self._DirectiveParser()\r
+ TokenList = GetSplitValueList(Line, ' ', 1)\r
+ if TokenList[0] == TAB_INCLUDE:\r
+ for Arch, ModuleType, DefaultStore in self._Scope:\r
+ if self._SubsectionType != MODEL_UNKNOWN and Arch in OwnerId:\r
+ self._Owner[-1] = OwnerId[Arch]\r
+ self._DirectiveParser()\r
+ else:\r
+ self._DirectiveParser()\r
continue\r
if Line[0] == TAB_OPTION_START and not self._InSubsection:\r
EdkLogger.error("Parser", FILE_READ_FAILURE, "Missing the '{' before %s in Line %s" % (Line, Index+1), ExtraData=self.MetaFile)\r
#\r
for Arch, ModuleType, DefaultStore in self._Scope:\r
Owner = self._Owner[-1]\r
- if self._SubsectionType != MODEL_UNKNOWN:\r
+ if self._SubsectionType != MODEL_UNKNOWN and Arch in OwnerId:\r
Owner = OwnerId[Arch]\r
self._LastItem = self._Store(\r
self._ItemType,\r
if self._CurrentLine[-1] == '{':\r
self._ValueList[0] = self._CurrentLine[0:-1].strip()\r
self._InSubsection = True\r
+ self._SubsectionType = MODEL_UNKNOWN\r
else:\r
self._ValueList[0] = self._CurrentLine\r
\r
\r
# set the parser status with current status\r
Parser._SectionName = self._SectionName\r
- if self._InSubsection:\r
- Parser._SectionType = self._SubsectionType\r
- else:\r
- Parser._SectionType = self._SectionType\r
+ Parser._SubsectionType = self._SubsectionType\r
+ Parser._InSubsection = self._InSubsection\r
+ Parser._SectionType = self._SectionType\r
Parser._Scope = self._Scope\r
Parser._Enabled = self._Enabled\r
# Parse the included file\r
Parser.Start()\r
\r
- # update current status with sub-parser's status\r
- self._SectionName = Parser._SectionName\r
- if not self._InSubsection:\r
- self._SectionType = Parser._SectionType\r
- self._SubsectionType = Parser._SubsectionType\r
- self._InSubsection = Parser._InSubsection\r
-\r
- self._Scope = Parser._Scope\r
- self._Enabled = Parser._Enabled\r
\r
# Insert all records in the table for the included file into dsc file table\r
Records = IncludedFileTable.GetAll()\r