-
Notifications
You must be signed in to change notification settings - Fork 0
/
YAPLVisitor.py
183 lines (111 loc) · 5.53 KB
/
YAPLVisitor.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
# Generated from YAPL.g4 by ANTLR 4.13.1
from antlr4 import *
if "." in __name__:
from .YAPLParser import YAPLParser
else:
from YAPLParser import YAPLParser
# This class defines a complete generic visitor for a parse tree produced by YAPLParser.
class YAPLVisitor(ParseTreeVisitor):
# Visit a parse tree produced by YAPLParser#start.
def visitStart(self, ctx:YAPLParser.StartContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#defClass.
def visitDefClass(self, ctx:YAPLParser.DefClassContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#defFunc.
def visitDefFunc(self, ctx:YAPLParser.DefFuncContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#defAssign.
def visitDefAssign(self, ctx:YAPLParser.DefAssignContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#formalAssign.
def visitFormalAssign(self, ctx:YAPLParser.FormalAssignContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#minus.
def visitMinus(self, ctx:YAPLParser.MinusContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#parens.
def visitParens(self, ctx:YAPLParser.ParensContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#string.
def visitString(self, ctx:YAPLParser.StringContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#isvoid.
def visitIsvoid(self, ctx:YAPLParser.IsvoidContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#while.
def visitWhile(self, ctx:YAPLParser.WhileContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#div.
def visitDiv(self, ctx:YAPLParser.DivContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#neg.
def visitNeg(self, ctx:YAPLParser.NegContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#negative.
def visitNegative(self, ctx:YAPLParser.NegativeContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#times.
def visitTimes(self, ctx:YAPLParser.TimesContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#and.
def visitAnd(self, ctx:YAPLParser.AndContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#lessThan.
def visitLessThan(self, ctx:YAPLParser.LessThanContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#block.
def visitBlock(self, ctx:YAPLParser.BlockContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#id.
def visitId(self, ctx:YAPLParser.IdContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#if.
def visitIf(self, ctx:YAPLParser.IfContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#greaterThan.
def visitGreaterThan(self, ctx:YAPLParser.GreaterThanContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#new.
def visitNew(self, ctx:YAPLParser.NewContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#or.
def visitOr(self, ctx:YAPLParser.OrContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#assignment.
def visitAssignment(self, ctx:YAPLParser.AssignmentContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#dispatchImplicit.
def visitDispatchImplicit(self, ctx:YAPLParser.DispatchImplicitContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#int.
def visitInt(self, ctx:YAPLParser.IntContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#plus.
def visitPlus(self, ctx:YAPLParser.PlusContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#dispatchAttribute.
def visitDispatchAttribute(self, ctx:YAPLParser.DispatchAttributeContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#greaterThanOrEqual.
def visitGreaterThanOrEqual(self, ctx:YAPLParser.GreaterThanOrEqualContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#equal.
def visitEqual(self, ctx:YAPLParser.EqualContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#boolean.
def visitBoolean(self, ctx:YAPLParser.BooleanContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#letId.
def visitLetId(self, ctx:YAPLParser.LetIdContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#lessThanOrEqual.
def visitLessThanOrEqual(self, ctx:YAPLParser.LessThanOrEqualContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#self.
def visitSelf(self, ctx:YAPLParser.SelfContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by YAPLParser#dispatchExplicit.
def visitDispatchExplicit(self, ctx:YAPLParser.DispatchExplicitContext):
return self.visitChildren(ctx)
del YAPLParser