-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDECAFVisitor.java
More file actions
294 lines (293 loc) · 9.32 KB
/
Copy pathDECAFVisitor.java
File metadata and controls
294 lines (293 loc) · 9.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
// Generated from DECAF.g4 by ANTLR 4.5.3
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
/**
* This interface defines a complete generic visitor for a parse tree produced
* by {@link DECAFParser}.
*
* @param <T> The return type of the visit operation. Use {@link Void} for
* operations with no return type.
*/
public interface DECAFVisitor<T> extends ParseTreeVisitor<T> {
/**
* Visit a parse tree produced by {@link DECAFParser#program}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitProgram(DECAFParser.ProgramContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#declaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitDeclaration(DECAFParser.DeclarationContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#varDeclaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitVarDeclaration(DECAFParser.VarDeclarationContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#structDeclaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitStructDeclaration(DECAFParser.StructDeclarationContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#varType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitVarType(DECAFParser.VarTypeContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#methodDeclaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMethodDeclaration(DECAFParser.MethodDeclarationContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#methodType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMethodType(DECAFParser.MethodTypeContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#parameterDeclaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitParameterDeclaration(DECAFParser.ParameterDeclarationContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#parameterType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitParameterType(DECAFParser.ParameterTypeContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#block}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitBlock(DECAFParser.BlockContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#statement}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitStatement(DECAFParser.StatementContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#assignation}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAssignation(DECAFParser.AssignationContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#whileBlock}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitWhileBlock(DECAFParser.WhileBlockContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#returnBlock}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitReturnBlock(DECAFParser.ReturnBlockContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#print}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitPrint(DECAFParser.PrintContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#scan}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitScan(DECAFParser.ScanContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#ifBlock}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitIfBlock(DECAFParser.IfBlockContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#elseBlock}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitElseBlock(DECAFParser.ElseBlockContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#elseTailBlock}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitElseTailBlock(DECAFParser.ElseTailBlockContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#location}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLocation(DECAFParser.LocationContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#dotLocation}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitDotLocation(DECAFParser.DotLocationContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#declaredVariable}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitDeclaredVariable(DECAFParser.DeclaredVariableContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#variable}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitVariable(DECAFParser.VariableContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#arrayVariable}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitArrayVariable(DECAFParser.ArrayVariableContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#expressionInP}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitExpressionInP(DECAFParser.ExpressionInPContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#nExpression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitNExpression(DECAFParser.NExpressionContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#orExpression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitOrExpression(DECAFParser.OrExpressionContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#andExpression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAndExpression(DECAFParser.AndExpressionContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#equalsExpression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitEqualsExpression(DECAFParser.EqualsExpressionContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#relationExpression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitRelationExpression(DECAFParser.RelationExpressionContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#addSubsExpression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAddSubsExpression(DECAFParser.AddSubsExpressionContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#mulDivExpression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMulDivExpression(DECAFParser.MulDivExpressionContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#prExpression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitPrExpression(DECAFParser.PrExpressionContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#basicExpression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitBasicExpression(DECAFParser.BasicExpressionContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#basic}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitBasic(DECAFParser.BasicContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#arg}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitArg(DECAFParser.ArgContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#declaredMethodCall}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitDeclaredMethodCall(DECAFParser.DeclaredMethodCallContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#as_op}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAs_op(DECAFParser.As_opContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#md_op}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMd_op(DECAFParser.Md_opContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#pr_op}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitPr_op(DECAFParser.Pr_opContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#rel_op}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitRel_op(DECAFParser.Rel_opContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#eq_op}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitEq_op(DECAFParser.Eq_opContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#cond_op}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCond_op(DECAFParser.Cond_opContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#literal}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLiteral(DECAFParser.LiteralContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#int_literal}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitInt_literal(DECAFParser.Int_literalContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#char_literal}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitChar_literal(DECAFParser.Char_literalContext ctx);
/**
* Visit a parse tree produced by {@link DECAFParser#bool_literal}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitBool_literal(DECAFParser.Bool_literalContext ctx);
}