-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPython3Listener.py
More file actions
478 lines (320 loc) · 14.6 KB
/
Python3Listener.py
File metadata and controls
478 lines (320 loc) · 14.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
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
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# Generated from Python3.g4 by ANTLR 4.7.1
from antlr4 import *
if __name__ is not None and "." in __name__:
from .Python3Parser import Python3Parser
else:
from Python3Parser import Python3Parser
# This class defines a complete listener for a parse tree produced by Python3Parser.
class Python3Listener(ParseTreeListener):
# Enter a parse tree produced by Python3Parser#parse.
def enterParse(self, ctx:Python3Parser.ParseContext):
pass
# Exit a parse tree produced by Python3Parser#parse.
def exitParse(self, ctx:Python3Parser.ParseContext):
pass
# Enter a parse tree produced by Python3Parser#single_input.
def enterSingle_input(self, ctx:Python3Parser.Single_inputContext):
pass
# Exit a parse tree produced by Python3Parser#single_input.
def exitSingle_input(self, ctx:Python3Parser.Single_inputContext):
pass
# Enter a parse tree produced by Python3Parser#file_input.
def enterFile_input(self, ctx:Python3Parser.File_inputContext):
pass
# Exit a parse tree produced by Python3Parser#file_input.
def exitFile_input(self, ctx:Python3Parser.File_inputContext):
pass
# Enter a parse tree produced by Python3Parser#eval_input.
def enterEval_input(self, ctx:Python3Parser.Eval_inputContext):
pass
# Exit a parse tree produced by Python3Parser#eval_input.
def exitEval_input(self, ctx:Python3Parser.Eval_inputContext):
pass
# Enter a parse tree produced by Python3Parser#stmt.
def enterStmt(self, ctx:Python3Parser.StmtContext):
pass
# Exit a parse tree produced by Python3Parser#stmt.
def exitStmt(self, ctx:Python3Parser.StmtContext):
pass
# Enter a parse tree produced by Python3Parser#simple_stmt.
def enterSimple_stmt(self, ctx:Python3Parser.Simple_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#simple_stmt.
def exitSimple_stmt(self, ctx:Python3Parser.Simple_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#small_stmt.
def enterSmall_stmt(self, ctx:Python3Parser.Small_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#small_stmt.
def exitSmall_stmt(self, ctx:Python3Parser.Small_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#expr_stmt.
def enterExpr_stmt(self, ctx:Python3Parser.Expr_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#expr_stmt.
def exitExpr_stmt(self, ctx:Python3Parser.Expr_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#annassign.
def enterAnnassign(self, ctx:Python3Parser.AnnassignContext):
pass
# Exit a parse tree produced by Python3Parser#annassign.
def exitAnnassign(self, ctx:Python3Parser.AnnassignContext):
pass
# Enter a parse tree produced by Python3Parser#augassign.
def enterAugassign(self, ctx:Python3Parser.AugassignContext):
pass
# Exit a parse tree produced by Python3Parser#augassign.
def exitAugassign(self, ctx:Python3Parser.AugassignContext):
pass
# Enter a parse tree produced by Python3Parser#pass_stmt.
def enterPass_stmt(self, ctx:Python3Parser.Pass_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#pass_stmt.
def exitPass_stmt(self, ctx:Python3Parser.Pass_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#flow_stmt.
def enterFlow_stmt(self, ctx:Python3Parser.Flow_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#flow_stmt.
def exitFlow_stmt(self, ctx:Python3Parser.Flow_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#break_stmt.
def enterBreak_stmt(self, ctx:Python3Parser.Break_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#break_stmt.
def exitBreak_stmt(self, ctx:Python3Parser.Break_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#continue_stmt.
def enterContinue_stmt(self, ctx:Python3Parser.Continue_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#continue_stmt.
def exitContinue_stmt(self, ctx:Python3Parser.Continue_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#return_stmt.
def enterReturn_stmt(self, ctx:Python3Parser.Return_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#return_stmt.
def exitReturn_stmt(self, ctx:Python3Parser.Return_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#compound_stmt.
def enterCompound_stmt(self, ctx:Python3Parser.Compound_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#compound_stmt.
def exitCompound_stmt(self, ctx:Python3Parser.Compound_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#if_stmt.
def enterIf_stmt(self, ctx:Python3Parser.If_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#if_stmt.
def exitIf_stmt(self, ctx:Python3Parser.If_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#while_stmt.
def enterWhile_stmt(self, ctx:Python3Parser.While_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#while_stmt.
def exitWhile_stmt(self, ctx:Python3Parser.While_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#for_stmt.
def enterFor_stmt(self, ctx:Python3Parser.For_stmtContext):
pass
# Exit a parse tree produced by Python3Parser#for_stmt.
def exitFor_stmt(self, ctx:Python3Parser.For_stmtContext):
pass
# Enter a parse tree produced by Python3Parser#funcdef.
def enterFuncdef(self, ctx:Python3Parser.FuncdefContext):
pass
# Exit a parse tree produced by Python3Parser#funcdef.
def exitFuncdef(self, ctx:Python3Parser.FuncdefContext):
pass
# Enter a parse tree produced by Python3Parser#parameters.
def enterParameters(self, ctx:Python3Parser.ParametersContext):
pass
# Exit a parse tree produced by Python3Parser#parameters.
def exitParameters(self, ctx:Python3Parser.ParametersContext):
pass
# Enter a parse tree produced by Python3Parser#argslist.
def enterArgslist(self, ctx:Python3Parser.ArgslistContext):
pass
# Exit a parse tree produced by Python3Parser#argslist.
def exitArgslist(self, ctx:Python3Parser.ArgslistContext):
pass
# Enter a parse tree produced by Python3Parser#argslist_normal.
def enterArgslist_normal(self, ctx:Python3Parser.Argslist_normalContext):
pass
# Exit a parse tree produced by Python3Parser#argslist_normal.
def exitArgslist_normal(self, ctx:Python3Parser.Argslist_normalContext):
pass
# Enter a parse tree produced by Python3Parser#argslist_start.
def enterArgslist_start(self, ctx:Python3Parser.Argslist_startContext):
pass
# Exit a parse tree produced by Python3Parser#argslist_start.
def exitArgslist_start(self, ctx:Python3Parser.Argslist_startContext):
pass
# Enter a parse tree produced by Python3Parser#argslist_starts.
def enterArgslist_starts(self, ctx:Python3Parser.Argslist_startsContext):
pass
# Exit a parse tree produced by Python3Parser#argslist_starts.
def exitArgslist_starts(self, ctx:Python3Parser.Argslist_startsContext):
pass
# Enter a parse tree produced by Python3Parser#pdef.
def enterPdef(self, ctx:Python3Parser.PdefContext):
pass
# Exit a parse tree produced by Python3Parser#pdef.
def exitPdef(self, ctx:Python3Parser.PdefContext):
pass
# Enter a parse tree produced by Python3Parser#suite.
def enterSuite(self, ctx:Python3Parser.SuiteContext):
pass
# Exit a parse tree produced by Python3Parser#suite.
def exitSuite(self, ctx:Python3Parser.SuiteContext):
pass
# Enter a parse tree produced by Python3Parser#test.
def enterTest(self, ctx:Python3Parser.TestContext):
pass
# Exit a parse tree produced by Python3Parser#test.
def exitTest(self, ctx:Python3Parser.TestContext):
pass
# Enter a parse tree produced by Python3Parser#or_test.
def enterOr_test(self, ctx:Python3Parser.Or_testContext):
pass
# Exit a parse tree produced by Python3Parser#or_test.
def exitOr_test(self, ctx:Python3Parser.Or_testContext):
pass
# Enter a parse tree produced by Python3Parser#and_test.
def enterAnd_test(self, ctx:Python3Parser.And_testContext):
pass
# Exit a parse tree produced by Python3Parser#and_test.
def exitAnd_test(self, ctx:Python3Parser.And_testContext):
pass
# Enter a parse tree produced by Python3Parser#not_test.
def enterNot_test(self, ctx:Python3Parser.Not_testContext):
pass
# Exit a parse tree produced by Python3Parser#not_test.
def exitNot_test(self, ctx:Python3Parser.Not_testContext):
pass
# Enter a parse tree produced by Python3Parser#comparison.
def enterComparison(self, ctx:Python3Parser.ComparisonContext):
pass
# Exit a parse tree produced by Python3Parser#comparison.
def exitComparison(self, ctx:Python3Parser.ComparisonContext):
pass
# Enter a parse tree produced by Python3Parser#comp_op.
def enterComp_op(self, ctx:Python3Parser.Comp_opContext):
pass
# Exit a parse tree produced by Python3Parser#comp_op.
def exitComp_op(self, ctx:Python3Parser.Comp_opContext):
pass
# Enter a parse tree produced by Python3Parser#expr.
def enterExpr(self, ctx:Python3Parser.ExprContext):
pass
# Exit a parse tree produced by Python3Parser#expr.
def exitExpr(self, ctx:Python3Parser.ExprContext):
pass
# Enter a parse tree produced by Python3Parser#xor_expr.
def enterXor_expr(self, ctx:Python3Parser.Xor_exprContext):
pass
# Exit a parse tree produced by Python3Parser#xor_expr.
def exitXor_expr(self, ctx:Python3Parser.Xor_exprContext):
pass
# Enter a parse tree produced by Python3Parser#and_expr.
def enterAnd_expr(self, ctx:Python3Parser.And_exprContext):
pass
# Exit a parse tree produced by Python3Parser#and_expr.
def exitAnd_expr(self, ctx:Python3Parser.And_exprContext):
pass
# Enter a parse tree produced by Python3Parser#algorithm_expr.
def enterAlgorithm_expr(self, ctx:Python3Parser.Algorithm_exprContext):
pass
# Exit a parse tree produced by Python3Parser#algorithm_expr.
def exitAlgorithm_expr(self, ctx:Python3Parser.Algorithm_exprContext):
pass
# Enter a parse tree produced by Python3Parser#term.
def enterTerm(self, ctx:Python3Parser.TermContext):
pass
# Exit a parse tree produced by Python3Parser#term.
def exitTerm(self, ctx:Python3Parser.TermContext):
pass
# Enter a parse tree produced by Python3Parser#factor.
def enterFactor(self, ctx:Python3Parser.FactorContext):
pass
# Exit a parse tree produced by Python3Parser#factor.
def exitFactor(self, ctx:Python3Parser.FactorContext):
pass
# Enter a parse tree produced by Python3Parser#power.
def enterPower(self, ctx:Python3Parser.PowerContext):
pass
# Exit a parse tree produced by Python3Parser#power.
def exitPower(self, ctx:Python3Parser.PowerContext):
pass
# Enter a parse tree produced by Python3Parser#atom_expr.
def enterAtom_expr(self, ctx:Python3Parser.Atom_exprContext):
pass
# Exit a parse tree produced by Python3Parser#atom_expr.
def exitAtom_expr(self, ctx:Python3Parser.Atom_exprContext):
pass
# Enter a parse tree produced by Python3Parser#atom.
def enterAtom(self, ctx:Python3Parser.AtomContext):
pass
# Exit a parse tree produced by Python3Parser#atom.
def exitAtom(self, ctx:Python3Parser.AtomContext):
pass
# Enter a parse tree produced by Python3Parser#testlist_comp.
def enterTestlist_comp(self, ctx:Python3Parser.Testlist_compContext):
pass
# Exit a parse tree produced by Python3Parser#testlist_comp.
def exitTestlist_comp(self, ctx:Python3Parser.Testlist_compContext):
pass
# Enter a parse tree produced by Python3Parser#trailer.
def enterTrailer(self, ctx:Python3Parser.TrailerContext):
pass
# Exit a parse tree produced by Python3Parser#trailer.
def exitTrailer(self, ctx:Python3Parser.TrailerContext):
pass
# Enter a parse tree produced by Python3Parser#expr_param.
def enterExpr_param(self, ctx:Python3Parser.Expr_paramContext):
pass
# Exit a parse tree produced by Python3Parser#expr_param.
def exitExpr_param(self, ctx:Python3Parser.Expr_paramContext):
pass
# Enter a parse tree produced by Python3Parser#subscriptlist.
def enterSubscriptlist(self, ctx:Python3Parser.SubscriptlistContext):
pass
# Exit a parse tree produced by Python3Parser#subscriptlist.
def exitSubscriptlist(self, ctx:Python3Parser.SubscriptlistContext):
pass
# Enter a parse tree produced by Python3Parser#subscript.
def enterSubscript(self, ctx:Python3Parser.SubscriptContext):
pass
# Exit a parse tree produced by Python3Parser#subscript.
def exitSubscript(self, ctx:Python3Parser.SubscriptContext):
pass
# Enter a parse tree produced by Python3Parser#sliceop.
def enterSliceop(self, ctx:Python3Parser.SliceopContext):
pass
# Exit a parse tree produced by Python3Parser#sliceop.
def exitSliceop(self, ctx:Python3Parser.SliceopContext):
pass
# Enter a parse tree produced by Python3Parser#exprlist.
def enterExprlist(self, ctx:Python3Parser.ExprlistContext):
pass
# Exit a parse tree produced by Python3Parser#exprlist.
def exitExprlist(self, ctx:Python3Parser.ExprlistContext):
pass
# Enter a parse tree produced by Python3Parser#testlist.
def enterTestlist(self, ctx:Python3Parser.TestlistContext):
pass
# Exit a parse tree produced by Python3Parser#testlist.
def exitTestlist(self, ctx:Python3Parser.TestlistContext):
pass
# Enter a parse tree produced by Python3Parser#arglist.
def enterArglist(self, ctx:Python3Parser.ArglistContext):
pass
# Exit a parse tree produced by Python3Parser#arglist.
def exitArglist(self, ctx:Python3Parser.ArglistContext):
pass
# Enter a parse tree produced by Python3Parser#argument.
def enterArgument(self, ctx:Python3Parser.ArgumentContext):
pass
# Exit a parse tree produced by Python3Parser#argument.
def exitArgument(self, ctx:Python3Parser.ArgumentContext):
pass