InfParser.py revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# This file contained the parser for INF file
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# This program and the accompanying materials are licensed and made available
70e5a7403f0e0a3bd292b8287c5fed5772c15270Automatic Updater# under the terms and conditions of the BSD License which accompanies this
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence# distribution. The full text of the license may be found at
f41f183f628a148860a6d1f0070208cddd45b0c6Bob Halley# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
f41f183f628a148860a6d1f0070208cddd45b0c6Bob Halley# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
import re
import os
FileLinesList = []
except BaseException:
except BaseException:
return FileLinesList
if Filename != None:
SectionLines = []
CommentBlock = []
InfSectionCommonDefObj = None
not HeaderCommentStart:
if (Line.startswith(DT.TAB_COMMENT_SPLIT) and CurrentSection == DT.MODEL_META_DATA_FILE_HEADER) and\
if (Line.startswith(DT.TAB_SPECIAL_COMMENT) or not Line.strip().startswith("#")) and HeaderCommentStart \
and not HeaderCommentEnd:
SectionLines = []
if not LastSectionFalg:
if not LastSectionFalg:
CommentBlock = []
if not FirstSectionStartFlag:
if LastSectionFalg:
SectionLines = []
ArchList = []
# Not cover Depex/UserExtension section header
if not DefineSectionParsedFlag:
return DefineSectionParsedFlag
Element = []
if MatchObject:
Element = []
if MatchObject:
Element = []
elif not Line:
Element = []
Element = []
if CheckLocation:
if MatchObject:
elif Line:
return SectionType