## @file
# This file contained the parser for [Libraries] sections in INF file
#
# 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
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
'''
InfLibrarySectionParser
'''
##
# Import Modules
#
## InfLibraryParser
#
#
#
# For Common INF file
#
if not GlobalData.gIS_BINARY_INF:
#
# Macro defined in this section
#
SectionMacros = {}
ValueList = []
LibraryList = []
LibHeaderComments = []
LibLineComment = None
#
# Parse section content
#
for Line in SectionString:
continue
#
# Found Header Comments
#
#
# Last line is comments, and this line go on.
#
continue
#
# First time encounter comment
#
else:
#
# Clear original data
#
LibHeaderComments = []
continue
else:
LineCommentContent = ''
for Item in LibHeaderComments:
#
# Find Tail comment.
#
if LibLineComment == None:
#
# Find Macro
#
if Name != None:
LibLineComment = None
LibHeaderComments = []
continue
#
# Replace with Local section Macro and [Defines] section Macro.
#
ValueList = []
LibLineComment = None
LibTailComments = ''
LibHeaderComments = []
continue
#
# Current section archs
#
KeyList = []
#
# For Binary INF
#
else:
LibraryList = []
for Line in SectionString:
continue
continue
if LibInsFlag:
#
# If the VERSION_STRING is missing from the INF file, tool should default to "0".
#
if LibVer == '':
LibVer = '0'
if LibGuid != '':
else:
#
# Current section archs
#
KeyList = []