forked from csaroff/MiniJava-Compiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMinijavaVisitor.java
More file actions
258 lines (257 loc) · 9.6 KB
/
Copy pathMinijavaVisitor.java
File metadata and controls
258 lines (257 loc) · 9.6 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
// Generated from Minijava.g4 by ANTLR 4.4
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
/**
* This interface defines a complete generic visitor for a parse tree produced
* by {@link MinijavaParser}.
*
* @param <T> The return type of the visit operation. Use {@link Void} for
* operations with no return type.
*/
public interface MinijavaVisitor<T> extends ParseTreeVisitor<T> {
/**
* Visit a parse tree produced by the {@code thisExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitThisExpression(@NotNull MinijavaParser.ThisExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code variableAssignmentStatement}
* labeled alternative in {@link MinijavaParser#statement}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitVariableAssignmentStatement(@NotNull MinijavaParser.VariableAssignmentStatementContext ctx);
/**
* Visit a parse tree produced by the {@code powExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitPowExpression(@NotNull MinijavaParser.PowExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code addExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAddExpression(@NotNull MinijavaParser.AddExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code arrayInstantiationExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitArrayInstantiationExpression(@NotNull MinijavaParser.ArrayInstantiationExpressionContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#elseBlock}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitElseBlock(@NotNull MinijavaParser.ElseBlockContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#type}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitType(@NotNull MinijavaParser.TypeContext ctx);
/**
* Visit a parse tree produced by the {@code andExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAndExpression(@NotNull MinijavaParser.AndExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code ltExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLtExpression(@NotNull MinijavaParser.LtExpressionContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#parameter}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitParameter(@NotNull MinijavaParser.ParameterContext ctx);
/**
* Visit a parse tree produced by the {@code arrayAccessExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitArrayAccessExpression(@NotNull MinijavaParser.ArrayAccessExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code nestedStatement}
* labeled alternative in {@link MinijavaParser#statement}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitNestedStatement(@NotNull MinijavaParser.NestedStatementContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#mainClass}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMainClass(@NotNull MinijavaParser.MainClassContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#parameterList}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitParameterList(@NotNull MinijavaParser.ParameterListContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#fieldDeclaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFieldDeclaration(@NotNull MinijavaParser.FieldDeclarationContext ctx);
/**
* Visit a parse tree produced by the {@code methodCallExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMethodCallExpression(@NotNull MinijavaParser.MethodCallExpressionContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#localDeclaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLocalDeclaration(@NotNull MinijavaParser.LocalDeclarationContext ctx);
/**
* Visit a parse tree produced by the {@code ifElseStatement}
* labeled alternative in {@link MinijavaParser#statement}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitIfElseStatement(@NotNull MinijavaParser.IfElseStatementContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#methodDeclaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMethodDeclaration(@NotNull MinijavaParser.MethodDeclarationContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#varDeclaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitVarDeclaration(@NotNull MinijavaParser.VarDeclarationContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#whileBlock}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitWhileBlock(@NotNull MinijavaParser.WhileBlockContext ctx);
/**
* Visit a parse tree produced by the {@code intLitExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitIntLitExpression(@NotNull MinijavaParser.IntLitExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code booleanLitExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitBooleanLitExpression(@NotNull MinijavaParser.BooleanLitExpressionContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#ifBlock}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitIfBlock(@NotNull MinijavaParser.IfBlockContext ctx);
/**
* Visit a parse tree produced by the {@code subExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSubExpression(@NotNull MinijavaParser.SubExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code mulExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMulExpression(@NotNull MinijavaParser.MulExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code identifierExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitIdentifierExpression(@NotNull MinijavaParser.IdentifierExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code notExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitNotExpression(@NotNull MinijavaParser.NotExpressionContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#classDeclaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitClassDeclaration(@NotNull MinijavaParser.ClassDeclarationContext ctx);
/**
* Visit a parse tree produced by the {@code arrayAssignmentStatement}
* labeled alternative in {@link MinijavaParser#statement}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitArrayAssignmentStatement(@NotNull MinijavaParser.ArrayAssignmentStatementContext ctx);
/**
* Visit a parse tree produced by the {@code printStatement}
* labeled alternative in {@link MinijavaParser#statement}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitPrintStatement(@NotNull MinijavaParser.PrintStatementContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#goal}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitGoal(@NotNull MinijavaParser.GoalContext ctx);
/**
* Visit a parse tree produced by {@link MinijavaParser#methodBody}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMethodBody(@NotNull MinijavaParser.MethodBodyContext ctx);
/**
* Visit a parse tree produced by the {@code whileStatement}
* labeled alternative in {@link MinijavaParser#statement}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitWhileStatement(@NotNull MinijavaParser.WhileStatementContext ctx);
/**
* Visit a parse tree produced by the {@code parenExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitParenExpression(@NotNull MinijavaParser.ParenExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code objectInstantiationExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitObjectInstantiationExpression(@NotNull MinijavaParser.ObjectInstantiationExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code arrayLengthExpression}
* labeled alternative in {@link MinijavaParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitArrayLengthExpression(@NotNull MinijavaParser.ArrayLengthExpressionContext ctx);
}