-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathASTParserVisitor.java
More file actions
192 lines (191 loc) · 5.92 KB
/
ASTParserVisitor.java
File metadata and controls
192 lines (191 loc) · 5.92 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
// Generated from /Users/NCC1701-C/cool/LCARS/src/ast/parser/ASTParser.g4 by ANTLR 4.6
package ast.parser;
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
/**
* This interface defines a complete generic visitor for a parse tree produced
* by {@link ASTParser}.
*
* @param <T> The return type of the visit operation. Use {@link Void} for
* operations with no return type.
*/
public interface ASTParserVisitor<T> extends ParseTreeVisitor<T> {
/**
* Visit a parse tree produced by {@link ASTParser#program}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitProgram(ASTParser.ProgramContext ctx);
/**
* Visit a parse tree produced by {@link ASTParser#coolClass}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCoolClass(ASTParser.CoolClassContext ctx);
/**
* Visit a parse tree produced by {@link ASTParser#feature}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFeature(ASTParser.FeatureContext ctx);
/**
* Visit a parse tree produced by {@link ASTParser#method}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMethod(ASTParser.MethodContext ctx);
/**
* Visit a parse tree produced by {@link ASTParser#attr}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAttr(ASTParser.AttrContext ctx);
/**
* Visit a parse tree produced by {@link ASTParser#formal}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFormal(ASTParser.FormalContext ctx);
/**
* Visit a parse tree produced by {@link ASTParser#expr}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitExpr(ASTParser.ExprContext ctx);
/**
* Visit a parse tree produced by the {@code Assign}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAssign(ASTParser.AssignContext ctx);
/**
* Visit a parse tree produced by the {@code StaticDispatch}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitStaticDispatch(ASTParser.StaticDispatchContext ctx);
/**
* Visit a parse tree produced by the {@code DynamicDispatch}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitDynamicDispatch(ASTParser.DynamicDispatchContext ctx);
/**
* Visit a parse tree produced by the {@code Cond}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCond(ASTParser.CondContext ctx);
/**
* Visit a parse tree produced by the {@code Loop}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLoop(ASTParser.LoopContext ctx);
/**
* Visit a parse tree produced by the {@code Block}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitBlock(ASTParser.BlockContext ctx);
/**
* Visit a parse tree produced by the {@code Let}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLet(ASTParser.LetContext ctx);
/**
* Visit a parse tree produced by the {@code Case}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCase(ASTParser.CaseContext ctx);
/**
* Visit a parse tree produced by the {@code New}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitNew(ASTParser.NewContext ctx);
/**
* Visit a parse tree produced by the {@code Isvoid}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitIsvoid(ASTParser.IsvoidContext ctx);
/**
* Visit a parse tree produced by the {@code Binop}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitBinop(ASTParser.BinopContext ctx);
/**
* Visit a parse tree produced by the {@code Unop}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitUnop(ASTParser.UnopContext ctx);
/**
* Visit a parse tree produced by the {@code ConstInt}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitConstInt(ASTParser.ConstIntContext ctx);
/**
* Visit a parse tree produced by the {@code ConstStr}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitConstStr(ASTParser.ConstStrContext ctx);
/**
* Visit a parse tree produced by the {@code ConstBool}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitConstBool(ASTParser.ConstBoolContext ctx);
/**
* Visit a parse tree produced by the {@code Obj}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitObj(ASTParser.ObjContext ctx);
/**
* Visit a parse tree produced by the {@code NoExpr}
* labeled alternative in {@link ASTParser#expr_aux}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitNoExpr(ASTParser.NoExprContext ctx);
/**
* Visit a parse tree produced by {@link ASTParser#simplecase}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSimplecase(ASTParser.SimplecaseContext ctx);
/**
* Visit a parse tree produced by {@link ASTParser#type}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitType(ASTParser.TypeContext ctx);
/**
* Visit a parse tree produced by {@link ASTParser#id}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitId(ASTParser.IdContext ctx);
}