## @file\r
# This file contained the parser for INF file\r
#\r
-# Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials are licensed and made available \r
# under the terms and conditions of the BSD License which accompanies this \r
SectionLines.append((Line, LineNo))\r
HeaderCommentStart = True\r
continue \r
- \r
+\r
#\r
# Collect Header content.\r
#\r
HeaderCommentEnd = True\r
BinaryHeaderCommentStart = False \r
BinaryHeaderCommentEnd = False\r
- HeaderCommentStart = False\r
+ HeaderCommentStart = False \r
if Line.find(DT.TAB_BINARY_HEADER_COMMENT) > -1:\r
self.InfHeaderParser(SectionLines, self.InfHeader, self.FileName) \r
SectionLines = []\r
else:\r
SectionLines.append((Line, LineNo))\r
- #\r
- # Call Header comment parser.\r
- #\r
- self.InfHeaderParser(SectionLines, self.InfHeader, self.FileName)\r
- SectionLines = []\r
- continue\r
+ #\r
+ # Call Header comment parser.\r
+ #\r
+ self.InfHeaderParser(SectionLines, self.InfHeader, self.FileName)\r
+ SectionLines = []\r
+ continue\r
\r
#\r
# check whether binary header comment section started\r
BinaryHeaderStarLineNo = LineNo\r
SectionLines.append((Line, LineNo))\r
BinaryHeaderCommentStart = True\r
- HeaderCommentEnd = True \r
- continue \r
- \r
+ HeaderCommentEnd = True\r
+ continue \r
+ \r
#\r
# check whether there are more than one binary header exist\r
#\r
SectionLines.append((Line, LineNo))\r
if not LastSectionFalg:\r
continue\r
- \r
+\r
#\r
# Encountered a section. start with '[' and end with ']'\r
#\r
if (Line.startswith(DT.TAB_SECTION_START) and \\r
- Line.find(DT.TAB_SECTION_END) > -1) or LastSectionFalg: \r
+ Line.find(DT.TAB_SECTION_END) > -1) or LastSectionFalg: \r
\r
HeaderCommentEnd = True \r
BinaryHeaderCommentEnd = True \r
File=self.FullPath,\r
Line=LineNo, \r
ExtraData=Line) \r
- \r
+\r
#\r
# Keep last time section header content for section parser\r
# usage.\r
#\r
self.LastSectionHeaderContent = deepcopy(self.SectionHeaderContent)\r
- \r
+\r
#\r
# TailComments in section define.\r
#\r
# Compare the new section name with current\r
#\r
self.SectionHeaderParser(Line, self.FileName, LineNo)\r
- \r
+\r
self._CheckSectionHeaders(Line, LineNo)\r
\r
SectionType = _ConvertSecNameToType(self.SectionHeaderContent[0][0])\r
- \r
+\r
if not FirstSectionStartFlag:\r
CurrentSection = SectionType\r
FirstSectionStartFlag = True\r
else:\r
SectionLines.append((Line, LineNo))\r
continue\r
- \r
+\r
if LastSectionFalg:\r
SectionLines, CurrentSection = self._ProcessLastSection(SectionLines, Line, LineNo, CurrentSection)\r
- \r
+\r
#\r
# End of section content collect.\r
# Parser the section content collected previously.\r
\r
if HeaderStarLineNo == -1:\r
Logger.Error("InfParser", \r
- FORMAT_INVALID, \r
- ST.ERR_NO_SOURCE_HEADER, \r
- File=self.FullPath)\r
+ FORMAT_INVALID,\r
+ ST.ERR_NO_SOURCE_HEADER,\r
+ File=self.FullPath) \r
if BinaryHeaderStarLineNo > -1 and HeaderStarLineNo > -1 and HeaderStarLineNo > BinaryHeaderStarLineNo:\r
Logger.Error("InfParser", \r
FORMAT_INVALID,\r