-
Notifications
You must be signed in to change notification settings - Fork 0
/
decafAlejandroV2Listener.py
372 lines (249 loc) · 13.4 KB
/
decafAlejandroV2Listener.py
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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# Generated from decafAlejandroV2.g4 by ANTLR 4.9.2
from antlr4 import *
if __name__ is not None and "." in __name__:
from .decafAlejandroV2Parser import decafAlejandroV2Parser
else:
from decafAlejandroV2Parser import decafAlejandroV2Parser
# This class defines a complete listener for a parse tree produced by decafAlejandroV2Parser.
class decafAlejandroV2Listener(ParseTreeListener):
# Enter a parse tree produced by decafAlejandroV2Parser#program.
def enterProgram(self, ctx:decafAlejandroV2Parser.ProgramContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#program.
def exitProgram(self, ctx:decafAlejandroV2Parser.ProgramContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#declaration.
def enterDeclaration(self, ctx:decafAlejandroV2Parser.DeclarationContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#declaration.
def exitDeclaration(self, ctx:decafAlejandroV2Parser.DeclarationContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#vardeclr.
def enterVardeclr(self, ctx:decafAlejandroV2Parser.VardeclrContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#vardeclr.
def exitVardeclr(self, ctx:decafAlejandroV2Parser.VardeclrContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#field_declr.
def enterField_declr(self, ctx:decafAlejandroV2Parser.Field_declrContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#field_declr.
def exitField_declr(self, ctx:decafAlejandroV2Parser.Field_declrContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#array_id.
def enterArray_id(self, ctx:decafAlejandroV2Parser.Array_idContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#array_id.
def exitArray_id(self, ctx:decafAlejandroV2Parser.Array_idContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#field_var.
def enterField_var(self, ctx:decafAlejandroV2Parser.Field_varContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#field_var.
def exitField_var(self, ctx:decafAlejandroV2Parser.Field_varContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#var_id.
def enterVar_id(self, ctx:decafAlejandroV2Parser.Var_idContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#var_id.
def exitVar_id(self, ctx:decafAlejandroV2Parser.Var_idContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#struct_declr.
def enterStruct_declr(self, ctx:decafAlejandroV2Parser.Struct_declrContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#struct_declr.
def exitStruct_declr(self, ctx:decafAlejandroV2Parser.Struct_declrContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#method_declr.
def enterMethod_declr(self, ctx:decafAlejandroV2Parser.Method_declrContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#method_declr.
def exitMethod_declr(self, ctx:decafAlejandroV2Parser.Method_declrContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#return_type.
def enterReturn_type(self, ctx:decafAlejandroV2Parser.Return_typeContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#return_type.
def exitReturn_type(self, ctx:decafAlejandroV2Parser.Return_typeContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#block.
def enterBlock(self, ctx:decafAlejandroV2Parser.BlockContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#block.
def exitBlock(self, ctx:decafAlejandroV2Parser.BlockContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#statement_assign.
def enterStatement_assign(self, ctx:decafAlejandroV2Parser.Statement_assignContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#statement_assign.
def exitStatement_assign(self, ctx:decafAlejandroV2Parser.Statement_assignContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#statement_methodcall.
def enterStatement_methodcall(self, ctx:decafAlejandroV2Parser.Statement_methodcallContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#statement_methodcall.
def exitStatement_methodcall(self, ctx:decafAlejandroV2Parser.Statement_methodcallContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#statement_if.
def enterStatement_if(self, ctx:decafAlejandroV2Parser.Statement_ifContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#statement_if.
def exitStatement_if(self, ctx:decafAlejandroV2Parser.Statement_ifContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#statement_while.
def enterStatement_while(self, ctx:decafAlejandroV2Parser.Statement_whileContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#statement_while.
def exitStatement_while(self, ctx:decafAlejandroV2Parser.Statement_whileContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#statement_return.
def enterStatement_return(self, ctx:decafAlejandroV2Parser.Statement_returnContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#statement_return.
def exitStatement_return(self, ctx:decafAlejandroV2Parser.Statement_returnContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#statement_for.
def enterStatement_for(self, ctx:decafAlejandroV2Parser.Statement_forContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#statement_for.
def exitStatement_for(self, ctx:decafAlejandroV2Parser.Statement_forContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#statement_break.
def enterStatement_break(self, ctx:decafAlejandroV2Parser.Statement_breakContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#statement_break.
def exitStatement_break(self, ctx:decafAlejandroV2Parser.Statement_breakContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#method_call.
def enterMethod_call(self, ctx:decafAlejandroV2Parser.Method_callContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#method_call.
def exitMethod_call(self, ctx:decafAlejandroV2Parser.Method_callContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#expr_literal.
def enterExpr_literal(self, ctx:decafAlejandroV2Parser.Expr_literalContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#expr_literal.
def exitExpr_literal(self, ctx:decafAlejandroV2Parser.Expr_literalContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#expr_location.
def enterExpr_location(self, ctx:decafAlejandroV2Parser.Expr_locationContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#expr_location.
def exitExpr_location(self, ctx:decafAlejandroV2Parser.Expr_locationContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#expr_PrecedenciaMax.
def enterExpr_PrecedenciaMax(self, ctx:decafAlejandroV2Parser.Expr_PrecedenciaMaxContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#expr_PrecedenciaMax.
def exitExpr_PrecedenciaMax(self, ctx:decafAlejandroV2Parser.Expr_PrecedenciaMaxContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#expr_menos.
def enterExpr_menos(self, ctx:decafAlejandroV2Parser.Expr_menosContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#expr_menos.
def exitExpr_menos(self, ctx:decafAlejandroV2Parser.Expr_menosContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#expr_normal.
def enterExpr_normal(self, ctx:decafAlejandroV2Parser.Expr_normalContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#expr_normal.
def exitExpr_normal(self, ctx:decafAlejandroV2Parser.Expr_normalContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#expr_PrecedenciaMenor.
def enterExpr_PrecedenciaMenor(self, ctx:decafAlejandroV2Parser.Expr_PrecedenciaMenorContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#expr_PrecedenciaMenor.
def exitExpr_PrecedenciaMenor(self, ctx:decafAlejandroV2Parser.Expr_PrecedenciaMenorContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#expr_parentesis.
def enterExpr_parentesis(self, ctx:decafAlejandroV2Parser.Expr_parentesisContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#expr_parentesis.
def exitExpr_parentesis(self, ctx:decafAlejandroV2Parser.Expr_parentesisContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#expr_methodCall.
def enterExpr_methodCall(self, ctx:decafAlejandroV2Parser.Expr_methodCallContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#expr_methodCall.
def exitExpr_methodCall(self, ctx:decafAlejandroV2Parser.Expr_methodCallContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#expr_negacion.
def enterExpr_negacion(self, ctx:decafAlejandroV2Parser.Expr_negacionContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#expr_negacion.
def exitExpr_negacion(self, ctx:decafAlejandroV2Parser.Expr_negacionContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#location.
def enterLocation(self, ctx:decafAlejandroV2Parser.LocationContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#location.
def exitLocation(self, ctx:decafAlejandroV2Parser.LocationContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#int_literal.
def enterInt_literal(self, ctx:decafAlejandroV2Parser.Int_literalContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#int_literal.
def exitInt_literal(self, ctx:decafAlejandroV2Parser.Int_literalContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#string_literal.
def enterString_literal(self, ctx:decafAlejandroV2Parser.String_literalContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#string_literal.
def exitString_literal(self, ctx:decafAlejandroV2Parser.String_literalContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#bool_literal.
def enterBool_literal(self, ctx:decafAlejandroV2Parser.Bool_literalContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#bool_literal.
def exitBool_literal(self, ctx:decafAlejandroV2Parser.Bool_literalContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#rel_op.
def enterRel_op(self, ctx:decafAlejandroV2Parser.Rel_opContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#rel_op.
def exitRel_op(self, ctx:decafAlejandroV2Parser.Rel_opContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#eq_op.
def enterEq_op(self, ctx:decafAlejandroV2Parser.Eq_opContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#eq_op.
def exitEq_op(self, ctx:decafAlejandroV2Parser.Eq_opContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#cond_op.
def enterCond_op(self, ctx:decafAlejandroV2Parser.Cond_opContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#cond_op.
def exitCond_op(self, ctx:decafAlejandroV2Parser.Cond_opContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#literal.
def enterLiteral(self, ctx:decafAlejandroV2Parser.LiteralContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#literal.
def exitLiteral(self, ctx:decafAlejandroV2Parser.LiteralContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#arith_op.
def enterArith_op(self, ctx:decafAlejandroV2Parser.Arith_opContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#arith_op.
def exitArith_op(self, ctx:decafAlejandroV2Parser.Arith_opContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#var_type.
def enterVar_type(self, ctx:decafAlejandroV2Parser.Var_typeContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#var_type.
def exitVar_type(self, ctx:decafAlejandroV2Parser.Var_typeContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#assign_op.
def enterAssign_op(self, ctx:decafAlejandroV2Parser.Assign_opContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#assign_op.
def exitAssign_op(self, ctx:decafAlejandroV2Parser.Assign_opContext):
pass
# Enter a parse tree produced by decafAlejandroV2Parser#method_name.
def enterMethod_name(self, ctx:decafAlejandroV2Parser.Method_nameContext):
pass
# Exit a parse tree produced by decafAlejandroV2Parser#method_name.
def exitMethod_name(self, ctx:decafAlejandroV2Parser.Method_nameContext):
pass
del decafAlejandroV2Parser