## @file
# This file contained the parser for [Guids], [Ppis], [Protocols] 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.
#
'''
InfGuidPpiProtocolSectionParser
'''
##
# Import Modules
#
## InfGuidParser
#
#
#
# Macro defined in this section
#
SectionMacros = {}
ValueList = []
GuidList = []
CommentsList = []
CurrentLineVar = None
#
# Parse section content
#
for Line in SectionString:
CommentsList = []
continue
continue
else:
#
# Encounter a GUID entry
#
LineNo))
LineContent = \
if LineContent != '':
#
# Find Macro
#
if Name != None:
CommentsList = []
ValueList = []
continue
#
# Replace with Local section Macro and [Defines] section Macro.
#
CommentsList = []
ValueList = []
continue
#
# Current section archs
#
ArchList = []
LineIndex = -1
## InfPpiParser
#
#
#
# Macro defined in this section
#
SectionMacros = {}
ValueList = []
PpiList = []
CommentsList = []
CurrentLineVar = None
#
# Parse section content
#
for Line in SectionString:
CommentsList = []
continue
continue
else:
#
# Encounter a PPI entry
#
LineNo))
LineContent = \
if LineContent != '':
#
# Find Macro
#
if Name != None:
ValueList = []
CommentsList = []
continue
#
# Replace with Local section Macro and [Defines] section Macro.
#
ValueList = [InfExpandMacro(Value, (FileName, LineContent, LineNo), self.FileLocalMacros, SectionMacros)
ValueList = []
CommentsList = []
continue
#
# Current section archs
#
ArchList = []
LineIndex = -1
## InfUserExtensionParser
#
#
UserExtensionContent = ''
#
# Parse section content
#
for Line in SectionString:
continue
#
# Replace with [Defines] section Macro
#
None)
continue
#
# Current section UserId, IdString
#
IdContentList = []
LastItem = ''
SectionLineNo = None
if not IsValidArch(Arch):
'InfParser',
ExtraData=None)
#
# To check the UserId and IdString valid or not.
#
if not IsValidUserId(UserId):
ExtraData=None)
if not IsValidIdString(IdString):
ExtraData=None)
else:
#
# Each UserExtensions section header must have a unique set
# of UserId, IdString and Arch values.
# This means that the same UserId can be used in more than one
# section header, provided the IdString or Arch values are
# different. The same IdString values can be used in more than
# one section header if the UserId or Arch values are
# different. The same UserId and the same IdString can be used
# in a section header if the Arch values are different in each
# of the section headers.
#
IdString),
ExtraData=None)
('InfParser', FORMAT_INVALID, \
#
# Macro defined in this section
#
SectionMacros = {}
ValueList = []
ProtocolList = []
CommentsList = []
CurrentLineVar = None
#
# Parse section content
#
for Line in SectionString:
CommentsList = []
continue
continue
else:
#
# Encounter a Protocol entry
#
LineNo))
LineContent = \
if LineContent != '':
#
# Find Macro
#
if Name != None:
ValueList = []
CommentsList = []
continue
#
# Replace with Local section Macro and [Defines] section Macro.
#
ValueList = [InfExpandMacro(Value, (FileName, LineContent, LineNo), self.FileLocalMacros, SectionMacros)
ValueList = []
CommentsList = []
continue
#
# Current section archs
#
ArchList = []
LineIndex = -1
('InfParser', FORMAT_INVALID, \