]>
Commit | Line | Data |
---|---|---|
52302d4d LG |
1 | ## @file\r |
2 | # fragments of source file\r | |
3 | #\r | |
40d841f6 | 4 | # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r |
52302d4d | 5 | #\r |
40d841f6 | 6 | # This program and the accompanying materials\r |
52302d4d LG |
7 | # are licensed and made available under the terms and conditions of the BSD License\r |
8 | # which accompanies this distribution. The full text of the license may be found at\r | |
9 | # http://opensource.org/licenses/bsd-license.php\r | |
10 | #\r | |
11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | #\r | |
14 | \r | |
15 | \r | |
16 | ## The description of comment contents and start & end position\r | |
17 | #\r | |
18 | #\r | |
19 | class Comment :\r | |
20 | ## The constructor\r | |
21 | #\r | |
22 | # @param self The object pointer\r | |
23 | # @param Str The message to record\r | |
24 | # @param Begin The start position tuple.\r | |
25 | # @param End The end position tuple.\r | |
26 | # @param CommentType The type of comment (T_COMMENT_TWO_SLASH or T_COMMENT_SLASH_STAR).\r | |
27 | #\r | |
28 | def __init__(self, Str, Begin, End, CommentType):\r | |
29 | self.Content = Str\r | |
30 | self.StartPos = Begin\r | |
31 | self.EndPos = End\r | |
32 | self.Type = CommentType\r | |
33 | \r | |
34 | ## The description of preprocess directives and start & end position\r | |
35 | #\r | |
36 | #\r | |
37 | class PP_Directive :\r | |
38 | ## The constructor\r | |
39 | #\r | |
40 | # @param self The object pointer\r | |
41 | # @param Str The message to record\r | |
42 | # @param Begin The start position tuple.\r | |
43 | # @param End The end position tuple.\r | |
44 | #\r | |
45 | def __init__(self, Str, Begin, End):\r | |
46 | self.Content = Str\r | |
47 | self.StartPos = Begin\r | |
48 | self.EndPos = End\r | |
49 | \r | |
50 | ## The description of assignment expression and start & end position\r | |
51 | #\r | |
52 | #\r | |
53 | class AssignmentExpression :\r | |
54 | ## The constructor\r | |
55 | #\r | |
56 | # @param self The object pointer\r | |
57 | # @param Str The message to record\r | |
58 | # @param Begin The start position tuple.\r | |
59 | # @param End The end position tuple.\r | |
60 | #\r | |
61 | def __init__(self, Lvalue, Op, Exp, Begin, End):\r | |
62 | self.Name = Lvalue\r | |
63 | self.Operator = Op\r | |
64 | self.Value = Exp\r | |
65 | self.StartPos = Begin\r | |
66 | self.EndPos = End\r | |
67 | \r | |
68 | ## The description of predicate expression and start & end position\r | |
69 | #\r | |
70 | #\r | |
71 | class PredicateExpression :\r | |
72 | ## The constructor\r | |
73 | #\r | |
74 | # @param self The object pointer\r | |
75 | # @param Str The message to record\r | |
76 | # @param Begin The start position tuple.\r | |
77 | # @param End The end position tuple.\r | |
78 | #\r | |
79 | def __init__(self, Str, Begin, End):\r | |
80 | self.Content = Str\r | |
81 | self.StartPos = Begin\r | |
82 | self.EndPos = End\r | |
83 | \r | |
84 | ## The description of function definition and start & end position\r | |
85 | #\r | |
86 | #\r | |
87 | class FunctionDefinition :\r | |
88 | ## The constructor\r | |
89 | #\r | |
90 | # @param self The object pointer\r | |
91 | # @param Str The message to record\r | |
92 | # @param Begin The start position tuple.\r | |
93 | # @param End The end position tuple.\r | |
94 | # @param LBPos The left brace position tuple.\r | |
95 | #\r | |
96 | def __init__(self, ModifierStr, DeclStr, Begin, End, LBPos, NamePos):\r | |
97 | self.Modifier = ModifierStr\r | |
98 | self.Declarator = DeclStr\r | |
99 | self.StartPos = Begin\r | |
100 | self.EndPos = End\r | |
101 | self.LeftBracePos = LBPos\r | |
102 | self.NamePos = NamePos\r | |
103 | \r | |
104 | ## The description of variable declaration and start & end position\r | |
105 | #\r | |
106 | #\r | |
107 | class VariableDeclaration :\r | |
108 | ## The constructor\r | |
109 | #\r | |
110 | # @param self The object pointer\r | |
111 | # @param Str The message to record\r | |
112 | # @param Begin The start position tuple.\r | |
113 | # @param End The end position tuple.\r | |
114 | #\r | |
115 | def __init__(self, ModifierStr, DeclStr, Begin, End):\r | |
116 | self.Modifier = ModifierStr\r | |
117 | self.Declarator = DeclStr\r | |
118 | self.StartPos = Begin\r | |
119 | self.EndPos = End\r | |
120 | \r | |
121 | ## The description of enum definition and start & end position\r | |
122 | #\r | |
123 | #\r | |
124 | class EnumerationDefinition :\r | |
125 | ## The constructor\r | |
126 | #\r | |
127 | # @param self The object pointer\r | |
128 | # @param Str The message to record\r | |
129 | # @param Begin The start position tuple.\r | |
130 | # @param End The end position tuple.\r | |
131 | #\r | |
132 | def __init__(self, Str, Begin, End):\r | |
133 | self.Content = Str\r | |
134 | self.StartPos = Begin\r | |
135 | self.EndPos = End\r | |
136 | \r | |
137 | ## The description of struct/union definition and start & end position\r | |
138 | #\r | |
139 | #\r | |
140 | class StructUnionDefinition :\r | |
141 | ## The constructor\r | |
142 | #\r | |
143 | # @param self The object pointer\r | |
144 | # @param Str The message to record\r | |
145 | # @param Begin The start position tuple.\r | |
146 | # @param End The end position tuple.\r | |
147 | #\r | |
148 | def __init__(self, Str, Begin, End):\r | |
149 | self.Content = Str\r | |
150 | self.StartPos = Begin\r | |
151 | self.EndPos = End\r | |
152 | \r | |
153 | ## The description of 'Typedef' definition and start & end position\r | |
154 | #\r | |
155 | #\r | |
156 | class TypedefDefinition :\r | |
157 | ## The constructor\r | |
158 | #\r | |
159 | # @param self The object pointer\r | |
160 | # @param Str The message to record\r | |
161 | # @param Begin The start position tuple.\r | |
162 | # @param End The end position tuple.\r | |
163 | #\r | |
164 | def __init__(self, FromStr, ToStr, Begin, End):\r | |
165 | self.FromType = FromStr\r | |
166 | self.ToType = ToStr\r | |
167 | self.StartPos = Begin\r | |
168 | self.EndPos = End\r | |
169 | \r | |
170 | ## The description of function calling definition and start & end position\r | |
171 | #\r | |
172 | #\r | |
173 | class FunctionCalling:\r | |
174 | ## The constructor\r | |
175 | #\r | |
176 | # @param self The object pointer\r | |
177 | # @param Str The message to record\r | |
178 | # @param Begin The start position tuple.\r | |
179 | # @param End The end position tuple.\r | |
180 | #\r | |
181 | def __init__(self, Name, Param, Begin, End):\r | |
182 | self.FuncName = Name\r | |
183 | self.ParamList = Param\r | |
184 | self.StartPos = Begin\r | |
185 | self.EndPos = End\r |