## @file
# This file contained the parser for [Packages] 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.
#
'''
InfPackageSectionParser
'''
##
# Import Modules
#
## InfPackageParser
#
#
#
# Macro defined in this section
#
SectionMacros = {}
ValueList = []
PackageList = []
HeaderComments = []
LineComment = None
#
# Parse section content
#
for Line in SectionString:
continue
#
# Find Header Comments
#
#
# Last line is comments, and this line go on.
#
if StillCommentFalg:
continue
#
# First time encounter comment
#
else:
#
# Clear original data
#
HeaderComments = []
continue
else:
LineCommentContent = ''
for Item in HeaderComments:
#
# Find Tail comment.
#
if LineComment == None:
#
# Find Macro
#
if Name != None:
LineComment = None
HeaderComments = []
continue
#
# Replace with Local section Macro and [Defines] section Macro.
#
ValueList = []
LineComment = None
TailComments = ''
HeaderComments = []
continue
#
# Current section archs
#
ArchList = []
%("[Packages]"),