You've already forked slimbootloader
mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-03-06 15:26:20 -08:00
6f8c44b375
Synced up MdePkg, IntelFsp2Pkg and BaseTools to EDK2 stable tag edk2-stable201905. There are several changes for MdePkg and BaseTools. MdePkg: - Support light print to reduce SBL size MdePkg\Library\BasePrintLib\PrintLibInternal.c MdePkg\Include\Library\DebugLib.h - TCG TPM2 spec changes and remove dependencies MdePkg\Include\IndustryStandard\UefiTcgPlatform.h MdePkg\Include\IndustryStandard\Tpm2Acpi.h - Use old NVM protocol file MdePkg\Include\Protocol\NvmExpressPassthru.h - Removed unused files BaseTools: - Added LZ4 support - Removed unused files Signed-off-by: Maurice Ma <maurice.ma@intel.com>
160 lines
4.8 KiB
Python
160 lines
4.8 KiB
Python
## @file
|
|
# fragments of source file
|
|
#
|
|
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
|
|
|
|
## The description of comment contents and start & end position
|
|
#
|
|
#
|
|
class Comment :
|
|
## The constructor
|
|
#
|
|
# @param self The object pointer
|
|
# @param Str The message to record
|
|
# @param Begin The start position tuple.
|
|
# @param End The end position tuple.
|
|
# @param CommentType The type of comment (T_COMMENT_TWO_SLASH or T_COMMENT_SLASH_STAR).
|
|
#
|
|
def __init__(self, Str, Begin, End, CommentType):
|
|
self.Content = Str
|
|
self.StartPos = Begin
|
|
self.EndPos = End
|
|
self.Type = CommentType
|
|
|
|
## The description of preprocess directives and start & end position
|
|
#
|
|
#
|
|
class PP_Directive :
|
|
## The constructor
|
|
#
|
|
# @param self The object pointer
|
|
# @param Str The message to record
|
|
# @param Begin The start position tuple.
|
|
# @param End The end position tuple.
|
|
#
|
|
def __init__(self, Str, Begin, End):
|
|
self.Content = Str
|
|
self.StartPos = Begin
|
|
self.EndPos = End
|
|
|
|
## The description of predicate expression and start & end position
|
|
#
|
|
#
|
|
class PredicateExpression :
|
|
## The constructor
|
|
#
|
|
# @param self The object pointer
|
|
# @param Str The message to record
|
|
# @param Begin The start position tuple.
|
|
# @param End The end position tuple.
|
|
#
|
|
def __init__(self, Str, Begin, End):
|
|
self.Content = Str
|
|
self.StartPos = Begin
|
|
self.EndPos = End
|
|
|
|
## The description of function definition and start & end position
|
|
#
|
|
#
|
|
class FunctionDefinition :
|
|
## The constructor
|
|
#
|
|
# @param self The object pointer
|
|
# @param Str The message to record
|
|
# @param Begin The start position tuple.
|
|
# @param End The end position tuple.
|
|
# @param LBPos The left brace position tuple.
|
|
#
|
|
def __init__(self, ModifierStr, DeclStr, Begin, End, LBPos, NamePos):
|
|
self.Modifier = ModifierStr
|
|
self.Declarator = DeclStr
|
|
self.StartPos = Begin
|
|
self.EndPos = End
|
|
self.LeftBracePos = LBPos
|
|
self.NamePos = NamePos
|
|
|
|
## The description of variable declaration and start & end position
|
|
#
|
|
#
|
|
class VariableDeclaration :
|
|
## The constructor
|
|
#
|
|
# @param self The object pointer
|
|
# @param Str The message to record
|
|
# @param Begin The start position tuple.
|
|
# @param NamePos The name position tuple.
|
|
#
|
|
def __init__(self, ModifierStr, DeclStr, Begin, NamePos):
|
|
self.Modifier = ModifierStr
|
|
self.Declarator = DeclStr
|
|
self.StartPos = Begin
|
|
self.NameStartPos = NamePos
|
|
|
|
## The description of enum definition and start & end position
|
|
#
|
|
#
|
|
class EnumerationDefinition :
|
|
## The constructor
|
|
#
|
|
# @param self The object pointer
|
|
# @param Str The message to record
|
|
# @param Begin The start position tuple.
|
|
# @param End The end position tuple.
|
|
#
|
|
def __init__(self, Str, Begin, End):
|
|
self.Content = Str
|
|
self.StartPos = Begin
|
|
self.EndPos = End
|
|
|
|
## The description of struct/union definition and start & end position
|
|
#
|
|
#
|
|
class StructUnionDefinition :
|
|
## The constructor
|
|
#
|
|
# @param self The object pointer
|
|
# @param Str The message to record
|
|
# @param Begin The start position tuple.
|
|
# @param End The end position tuple.
|
|
#
|
|
def __init__(self, Str, Begin, End):
|
|
self.Content = Str
|
|
self.StartPos = Begin
|
|
self.EndPos = End
|
|
|
|
## The description of 'Typedef' definition and start & end position
|
|
#
|
|
#
|
|
class TypedefDefinition :
|
|
## The constructor
|
|
#
|
|
# @param self The object pointer
|
|
# @param Str The message to record
|
|
# @param Begin The start position tuple.
|
|
# @param End The end position tuple.
|
|
#
|
|
def __init__(self, FromStr, ToStr, Begin, End):
|
|
self.FromType = FromStr
|
|
self.ToType = ToStr
|
|
self.StartPos = Begin
|
|
self.EndPos = End
|
|
|
|
class FunctionCalling:
|
|
## The constructor
|
|
#
|
|
# @param self The object pointer
|
|
# @param Str The message to record
|
|
# @param Begin The start position tuple.
|
|
# @param End The end position tuple.
|
|
#
|
|
def __init__(self, Name, Param, Begin, End):
|
|
self.FuncName = Name
|
|
self.ParamList = Param
|
|
self.StartPos = Begin
|
|
self.EndPos = End
|
|
|