summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Ecc/CodeFragment.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:17:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:17:27 +0000
commitf215e02bf85f68d3a6106c2a1f4f7f063f819064 (patch)
tree6bb5b92c046312c4e95ac2620b10ddf482d3fa8b /src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Ecc/CodeFragment.py
parentInitial commit. (diff)
downloadvirtualbox-f215e02bf85f68d3a6106c2a1f4f7f063f819064.tar.xz
virtualbox-f215e02bf85f68d3a6106c2a1f4f7f063f819064.zip
Adding upstream version 7.0.14-dfsg.upstream/7.0.14-dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Ecc/CodeFragment.py')
-rwxr-xr-xsrc/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Ecc/CodeFragment.py159
1 files changed, 159 insertions, 0 deletions
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Ecc/CodeFragment.py b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Ecc/CodeFragment.py
new file mode 100755
index 00000000..fc1f8941
--- /dev/null
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Ecc/CodeFragment.py
@@ -0,0 +1,159 @@
+## @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
+