Skip to content

Inf parser

inf_parser

Code to help parse EDK2 INF files.

InfParser

Object representing a parsed INF with capabilities to parse an INF.

Attributes:

Name Type Description
Parsed bool

Whether the object contains a parsed INF

Lines list[str]

ordered list of all lines in the INF

Dict dict

Key / Value pairs found in the INF.

LibraryClass str

library class of the INF

SupportedPhases list[str]

list of supported phases (i.e. "SEC", "PEIM", etc.)

PackagesUsed list[str]

list of packages used

LibrariesUsed list[str]

list of libraries used

ProtocolsUsed list[str]

list of protocols used

GuidsUsed list[str]

list of guids used

PpisUsed list[str]

list of Ppis used

PcdsUsed list[str]

list of Pcds used

Sources list[str]

list of source files used

Binaries list[str]

list of binaries used

Path str

Path to the INF file

__init__

__init__() -> InfParser

Inits an empty parser.

get_libraries

get_libraries(arch_list: list[str]) -> list[str]

Returns a list of libraries depending on the requested archs.

get_sources

get_sources(arch_list: list[str]) -> list[str]

Returns a list of sources depending on the requested archs.

ParseFile

ParseFile(filepath: str) -> None

Parses the INF file provided.